Setting non standard boundary conditions in simple calculation

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Thomas Aumeier

Setting non standard boundary conditions in simple calculati

Post by Thomas Aumeier »

Hi everybody,
my problem is dealing with setting a non standard boundary condition. For this I use the keyword IINDEF in subroutine usclim.f90. I would like to specify a pressure boundary condition at the outlet as well as a pressure boundary condition for the incoming flow. For the outlet it seem that I could managed the problem quite well, but I am not able to do this for the inlet. I believe that I have to indicate the direction of the velocity vector but the arrays ICODCL and RCODCL do not allow to set a direction for the velocity. How can I solve the problem?
Thomas 
David Monfort

Re: Setting non standard boundary conditions in simple calculation

Post by David Monfort »

Hi Thomas,
What you should do instead of setting up full new boundary conditions (with the IINDEF keyword) is to reuse existing ones and modify some parameters. The herebelow approach should give you what you want.
Tell me if it fulfills your needs.
Regards,
David
 
For the inlet:

ITYPFB(IFAC,IPHAS)=IENTRE
ICODCL(IFAC,IPR(IPHAS))=1               ! This tells the code you want a Dirichlet boundary condition for the Pressure
RCDOCL(IFAC,IPR(IPHAS),1)=Pinlet     ! This is the Pressure Dirichlet value
ICODCL(IFAC,IU(IPHAS))=3                 ! This tells the code you want a Neumann boundary condition for the Velocity (default value is zero)
ICODCL(IFAC,IV(IPHAS))=3
ICODCL(IFAC,IW(IPHAS))=3


For the outlet:

ITYPFB(IFAC,IPHAS)=ISOLIB
ICODCL(IFAC,IPR(IPHAS))=1                  ! This tells the code that you want a Dirichlet condition for the Pressure
RCODCL(IFAC,IPR(IPHAS),1)=Poutlet     ! This is the Pressure Dirichlet value
David Monfort

Re: Setting non standard boundary conditions in simple calculation

Post by David Monfort »

To precise what I wrote: when you specify a value for the Pressure as a boundary condition, Velocity boundary conditions should be homegeneous Neumann. You don't need to specify the velocity direction for example.
Thomas Aumeier

Re: Setting non standard boundary conditions in simple calculation

Post by Thomas Aumeier »

Hi David,
it seems to work!!! Thanks a lot for your fast and helpful response.
Regards,
 
Thomas
Thomas Aumeier

Re: Setting non standard boundary conditions in simple calculation

Post by Thomas Aumeier »

Hi David,
unfortunately I was a little bit to hasty with my conclusions. The settings do not work as I wanted. I don't know why there is no need to define a velocity direction in this case.
Thomas
Marc Sakiz

Re: Setting non standard boundary conditions in simple calculation

Post by Marc Sakiz »

Hi Thomas,
if you specify the pressure on both sides, you need to let the velocity adapt itself alone. The mass flow rate will be determined by the competition between the pressure gradient and the friction at the wall. The direction of the velocity will be determined by the physical competition between pressure gradient, inertia effects (convection) and diffusion effects. If you want to specify the pressure distribution at the boundaries AND the velocity direction, your system will be over-specified and not correct.
 
What do you mean by "The settings do not work as I wanted
" ? Do you get a crash or wrong results ? Maybe you can send us you listing, f90 and Xml files so we can see further into it.
 
  --Marc--
 
Thomas Aumeier

Re: Setting non standard boundary conditions in simple calculation

Post by Thomas Aumeier »

Hi Marc,

sorry for my late response. I still have problems to make a proper setup with pressure boundary conditions. The computation crashes after a few iterations due to " INCORRECT OR INCOMPLETE BOUNDARY CONDITIONS". Thats why I would like to send you my listing,the fortran as well as the XML file(s) of my case.
Attachments
usclim.f90
(37.13 KiB) Downloaded 216 times
Thomas Aumeier

Re: Setting non standard boundary conditions in simple calculation

Post by Thomas Aumeier »

.... here are more attachements...
Attachments
listing-11100948.txt
(81.76 KiB) Downloaded 212 times
Marc Sakiz

Re: Setting non standard boundary conditions in simple calculation

Post by Marc Sakiz »

Hi Thomas,

we've checked your usclim.f90 file and nothing seems wrong in it. We need to ckeck deeper and see why this error test is activated when it should not. Would it be possible for you to send us your full case (all f90 routines + runcase script + mesh) ? You can use the support address directly (saturne-support@edf.fr).
 
Best regards
Thomas Aumeier

Re: Setting non standard boundary conditions in simple calculation

Post by Thomas Aumeier »

Hi Marc, hi David,

I still have a question to pressure bc in CS. If I use the incompressible solver does the "total pressure" represents a static pressure (hydrostatic pressure)? I 'd like to get an information about the dynamic pressure. Do I have to add the term 1/2*rho*velocity**2 to the total pressure. I'd like to get an idea about pressure drop due to the motion of the fluid. 

Best regards
 
Thomas
Post Reply