Setting a pressure for an outlet

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
Laurent Malod-Panisset

Setting a pressure for an outlet

Post by Laurent Malod-Panisset »

Hi
 
After doing the tutorial CFDSTUDY, i would like to be able to set the static pressure as a boundary condition for the outlet
I have be reading the various posts and manual but i don't seem to get it.
For the time being, i take usclim.f90 and add 

ICODCL(IFAC,IPR(IPHAS)) = 1

  RCODCL(IFAC,IPR(IPHAS),1) = 2D5 
(for instance) 
but it doesn't seem to work
 
Does somebody as a "quick and dirty" step by step approach?
(or is it possible to have the pressure as a "standard" boundary condition in the GUI?)
 
Best regards 
Christophe Vallet

Re: Setting a pressure for an outlet

Post by Christophe Vallet »

Hi Laurent,
I can give you a first answer. Saturne developers will be able to complete it and to tell if I am not wrong.
With the standard outlet boundary condition, the pressure is already treated with a Dirichlet condition. The value of the pressure is taken as the reference pressure P0. It isn't what you want ?
If you don't want to use the GUI, here is an example using usclim.f :
 
      CALL GETFBR('surf_outlet',NLELT,LSTELT)   ('surf_outlet' being the name of your outlet surface)
      IPHAS = 1
      DO ILELT = 1, NLELT
        IFAC = LSTELT(ILELT)
        ITYPFB(IFAC,1) = ISOLIB
        ICODCL(IFAC,IPR(IPHAS)) = 1
        RCODCL(IFAC,IPR(IPHAS),1) = 1.D5
      ENDDO

I hope it can help you.
Cheers
Christophe
Alexandre Douce

Re: Setting a pressure for an outlet

Post by Alexandre Douce »

Actually it is not possible to impose a fixed value for the pressure variable with the GUI (I hope it will change very soon). In order to do that, one must use the usclim.F subroutine as described by Christophe.
David Monfort

Re: Setting a pressure for an outlet

Post by David Monfort »

Indeed Christophe is right in his suggestion.
However, outlet condition cannot be considered as a Dirichlet condition (strictly speaking). Code_Saturne extrapolates the pressure profile from the cells to the outlet boundary faces, and then shifts the pressure profile so that one of the outlet boundary face has the reference pressure p0 (if xyzp0 is not defined in usini1.f90).
You can find more information in the theory manual (in the chapter about the condli routine).
Laurent Malod-Panisset

Re: Setting a pressure for an outlet

Post by Laurent Malod-Panisset »

...and my head just exploded! lol!
 
Alexandre says: "it is not possible to impose a fixed value for the pressure variable with the GUI" but Christophe is saying that it is possible (using the reference pressure P0) and David seems to back up Christophe
So:
a. defining the pressure the way we define the temperature in the GUI (page 24 & 25 of Tjunction.pdf for Temperature): not possible
b. defining the pressure with the reference pressure P0: possible or not?
c. defining the pressure with  usclim.f: possible
 
I hope you can help me understanding this.
For the time being, i'm not an expert at CFD, i just would like to see how i can use the tool to streamline some studies (parametric design with Salome, CFD with Saturne with imposed mass flow rate, flow temperature, imposed pressure outlet, specific porosity defined in some regions)
 
Best regards
 
David Monfort

Re: Setting a pressure for an outlet

Post by David Monfort »

:D
To sum up, you have two options (for pressure outlet): 1 - Force a constant pressure (e.g. p0) everywhere at the outlet => follow Christophe's explanation 2 - Let the pressure have a non-constant profile at the outlet (non-constant, but one face will have a pressure equal to p0) => let the code deal with the outlet
In both solutions, you will have a pressure at the outlet "around p0", but in the first solution the pressure profile will be constant (this is a stronger constraint than can be false for large outlet for example)
Concerning porosity, we don't have yet this feature in the standard version of the code, just head-loss modelling. This means you won't have the velocity increase effect due to a smaller fluid area, but you can still model "blocking" effect.
Concerning parametric design, you could use the YACS module in SALOME... but this is another story (and a bit complex) ;)
David
Laurent Malod-Panisset

Re: Setting a pressure for an outlet

Post by Laurent Malod-Panisset »

Hi
 
1. Works! And according to your comments, that might be the best solution for me. typical diameter of the pipe smaller than 100mm.
2. I will still try 
 
Then i will continue with the head loss and your comment is really helpful. Thanks again and tgif!
Guest

Re: Setting a pressure for an outlet

Post by Guest »

Previously Alexandre Douce wrote;
how to have porosity field in code-saturne gui
 
 
Laurent Malod-Panisset

Re: Setting a pressure for an outlet

Post by Laurent Malod-Panisset »

For the porosity or "head loss", just click on the "head loss" tab and then, you should be able to select an area of your mesh if such group has been defined, or you can set with x<-10 x>10 and so on, then give the head loss coef.
In case it doesn't work, there might be an issue in the Gui
Post Reply