Setting non standard boundary conditions in simple calculation
Forum rules
Please read the forum usage recommendations before posting.
Please read the forum usage recommendations before posting.
Setting non standard boundary conditions in simple calculati
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
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
Re: Setting non standard boundary conditions in simple calculation
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
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
Re: Setting non standard boundary conditions in simple calculation
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.
Re: Setting non standard boundary conditions in simple calculation
Hi David,
it seems to work!!! Thanks a lot for your fast and helpful response.
Regards,
Thomas
it seems to work!!! Thanks a lot for your fast and helpful response.
Regards,
Thomas
Re: Setting non standard boundary conditions in simple calculation
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
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
Re: Setting non standard boundary conditions in simple calculation
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--
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--
Re: Setting non standard boundary conditions in simple calculation
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.
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 691 times
Re: Setting non standard boundary conditions in simple calculation
.... here are more attachements...
- Attachments
-
- listing-11100948.txt
- (81.76 KiB) Downloaded 682 times
Re: Setting non standard boundary conditions in simple calculation
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
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
Re: Setting non standard boundary conditions in simple calculation
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
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