CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Pressure in OpenFOAM

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree20Likes
  • 1 Post By piu58
  • 1 Post By Santiago
  • 2 Post By Santiago
  • 1 Post By Santiago
  • 2 Post By Santiago
  • 13 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 6, 2017, 21:23
Default Pressure in OpenFOAM
  #1
Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 52
Rep Power: 9
Sugajen is on a distinguished road
Hi all,

After using OF for a while, I have a very basic question Pressure in OF is specified after dividing it by by rho. But, which Pressure do we specify in 0 folder?

1. Is it static pressure or total pressure ?
2. Is it gauge pressure or absolute pressure ?

Here is the context in which I am asking these. The case is incompressible, laminar solved using simpleFoam and is driven by velocity at the inlet. But it also has a high pressure, say 3x10^5 Pa absolute at the outlet. The inlet pressure BC is zeroGradient. What do we specify as BC for outlet ? Is it (3x10^5 - Atm pressure)/rho or just (3x10^5)/rho? I am sure that it is static but not entirely sure about gauge vs absolute.

After reading the following discussions and documentation, I only got more confused rather than clarity

http://www.openfoam.com/documentatio...-pressure.html
Which pressure OpenFOAM use for incompressible flow? P/rho or (P-101325)/rho ?
Reference pressure in OpenFOAM

Any comments or links to the OF documentation addressing this would be great

Thanks!
Sugajen is offline   Reply With Quote

Old   July 7, 2017, 00:42
Default
  #2
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 590
Rep Power: 7
piu58 is on a distinguished road
If you calculate incompresible the absolute value for pressure doesn't count It are the pressure differences which makes the fluid flow.
You may choose 0 as reference pressure (instead of yourrather high value). The solution should remain equal.

Absolute values play a role if you give two or more pressures. But even then only the differences count.
Sugajen likes this.
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 7, 2017, 16:10
Default
  #3
Member
 
Sugajen
Join Date: Jan 2012
Location: Tempe, USA
Posts: 52
Rep Power: 9
Sugajen is on a distinguished road
Thank you for your reply.

But do tell me this, when we specify 0 at outlet, what does it mean? Is it gauge pressure? If so, to get the actual pressure should we add it to atmospheric pressure. Else does it mean it is vacuum pressure ?

Thanks in advance!
Sugajen is offline   Reply With Quote

Old   July 8, 2017, 00:44
Default
  #4
Senior Member
 
piu58's Avatar
 
Uwe Pilz
Join Date: Feb 2017
Location: Leipzig, Germany
Posts: 590
Rep Power: 7
piu58 is on a distinguished road
It may be the pressure you are imagine there. It doesn't count if you add a Constant pressure everywhere.

Sent from my Gigaset GS160 using CFD Online Forum mobile app
__________________
Uwe Pilz
--
Die der Hauptbewegung überlagerte Schwankungsbewegung ist in ihren Einzelheiten so hoffnungslos kompliziert, daß ihre theoretische Berechnung aussichtslos erscheint. (Hermann Schlichting, 1950)
piu58 is offline   Reply With Quote

Old   July 8, 2017, 08:10
Default
  #5
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 223
Rep Power: 9
Santiago is on a distinguished road
In incompressible flows pressure is a diagnostic variable, and has no physical meaning. It only has a mathematical meaning, as a lagrangian multiplier (more details in the book of Volker John, on FEM and navier stokes). The gradient of pressure does have physical meaning. This being said, the BC for pressure should be selected as to "minimize" mass conservation error.

Sent from my Lenovo A5000 using CFD Online Forum mobile app
jmonsa13 likes this.
Santiago is offline   Reply With Quote

Old   July 10, 2017, 20:53
Default
  #6
Member
 
Hooman
Join Date: Apr 2011
Posts: 35
Rep Power: 10
hooman.4028 is on a distinguished road
Quote:
Originally Posted by Santiago View Post
In incompressible flows pressure is a diagnostic variable, and has no physical meaning. It only has a mathematical meaning, as a lagrangian multiplier (more details in the book of Volker John, on FEM and navier stokes). The gradient of pressure does have physical meaning. This being said, the BC for pressure should be selected as to "minimize" mass conservation error.

Sent from my Lenovo A5000 using CFD Online Forum mobile app

That is true Santiago, but still some confusion here. Let's say you simply have a system which has to operate at a certain pressure, let's say A and you are asked to simulate the flow within this system from someone who has no idea about CFD. You are supposed to get back to the guy and tell him what pump to choose, how would you guide him?
In terms of working with OpenFoam, it is simply a fixed pressure at the outlet and this pressure does not have a physical meaning as you mentioned, but again this pressure can affect other equations which might be dependent on this outlet (operating) pressure. More specifically, how would you assume that your system is operating in atmospheric pressure? Would a 0 pressure at the outlet suffice? Thanks.
hooman.4028 is offline   Reply With Quote

Old   July 11, 2017, 04:31
Default
  #7
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 223
Rep Power: 9
Santiago is on a distinguished road
Pressure obtained from PISO/SIMPLE are solved 'up to a constant'. Adding the atmospheric pressure to your field will give you an absolute pressure field. I never set a fixed pressure unless I have no other option than set zeroGradient on velocities. Note that zeroGradient is not a good condition for velocities, and should always be avoided. Lastly, it is the velocities that induce a certain pressure field not the contrary. More clearly, given a velocity field you can always calculate the pressure, but not the converse. So operating conditions for any system are determined given a satisfactory velocity field.

Sent from my Lenovo A5000 using CFD Online Forum mobile app
Elham and hooman.4028 like this.
Santiago is offline   Reply With Quote

Old   July 11, 2017, 05:00
Default
  #8
Senior Member
 
Join Date: Aug 2014
Location: Germany
Posts: 251
Rep Power: 7
BlnPhoenix is on a distinguished road
Quote:
Originally Posted by Santiago View Post
Pressure obtained from PISO/SIMPLE are solved 'up to a constant'. Adding the atmospheric pressure to your field will give you an absolute pressure field. I never set a fixed pressure unless I have no other option than set zeroGradient on velocities. Note that zeroGradient is not a good condition for velocities, and should always be avoided. Lastly, it is the velocities that induce a certain pressure field not the contrary. More clearly, given a velocity field you can always calculate the pressure, but not the converse. So operating conditions for any system are determined given a satisfactory velocity field.
Hi, can you elaborate why it is not a good idea to set zeroGradient for velocity and fixedPressure = 0 at outlet? For me it has been common practice in OF to do so.
BlnPhoenix is offline   Reply With Quote

Old   July 11, 2017, 05:32
Default
  #9
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 223
Rep Power: 9
Santiago is on a distinguished road
zeroGradient does not correspond to the parabolic character of NS, in general reduces the solution to a L1 space. There has been extensive work on advection BC for NS. Look for Orlansky boundary condition. Physically, it does not preserve the structure of incoming eddies.

Sent from my Lenovo A5000 using CFD Online Forum mobile app
BlnPhoenix likes this.
Santiago is offline   Reply With Quote

Old   July 11, 2017, 10:15
Default
  #10
Member
 
Hooman
Join Date: Apr 2011
Posts: 35
Rep Power: 10
hooman.4028 is on a distinguished road
Quote:
Originally Posted by Santiago View Post
zeroGradient does not correspond to the parabolic character of NS, in general reduces the solution to a L1 space. There has been extensive work on advection BC for NS. Look for Orlansky boundary condition. Physically, it does not preserve the structure of incoming eddies.

Sent from my Lenovo A5000 using CFD Online Forum mobile app
Thanks Santiago! Then I have three more questions, how about the pressure driven flows? I see that it is common to use total pressure at the inlet and fixed value at the outlet?

Also, from my understanding if adding atmospheric will give us the absolute pressure, it means that the pressure being solved is gauge. Correct? Then by adding the dynamic pressure from the velocity field we can find the total pressure?

The last question, what is the role of pRef here? I see it is always set as 0.

Thank you very much!
hooman.4028 is offline   Reply With Quote

Old   July 11, 2017, 11:50
Default
  #11
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 223
Rep Power: 9
Santiago is on a distinguished road
1) if you set all pressure BC to zeroGradient or periodic, the inversion of the pressure poisson equation is ill-posed. Thus the need to set pRef. Nothing to do with a physical pressure.
2) pressure *does not* drive a flow, but when made a bodyforce by means of (miraculous) Gauss, i.e pressure gradient, it acts as a potential.
3) the term dP/dx_i in Momentum equation has different meanings depending on the system studied. For instance, when modelling gravity currents P is equal to the time-space pressure fluctuations plus the hydrostatic pressure plus the diagonal part of the stress tensor (in LES is important) plus a constant. So a much more basic answer has to be given: all bodyforces that can be written as the gradient of a potential make part of P.

Sent from my Lenovo A5000 using CFD Online Forum mobile app
Tobi and hooman.4028 like this.
Santiago is offline   Reply With Quote

Old   July 17, 2017, 08:17
Default
  #12
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg
Posts: 2,230
Blog Entries: 6
Rep Power: 38
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Hi all,

I just want to include a bit more of information here. First of all I agree with the statements given by Santiago especially for turbulent flows (back flow - how are the eddies coming back etc. - by the way does FOAM provide an Orlansky BC? - I don't make LES / DNS simulations and I am not so familiar).
In addition everything that is mentioned about the pressure is correct. If you derive the Navier-Stokes-Equation for incompressible fluids, you will find that the pressure p does not have any physical meaning. Only the gradient of p has a meaning. As it was already said, it is the driving force for your flow. Therefore, if you set a fixed value of pressure at the outlet to 0 or 1e5 does not influence your system because only the gradient is of physical meaning.

Case 1 p = 0 at outlet
  • In that case you specify p at the outlet with an value of 0. Setting an inflow using U, you might see negative pressure values at the inlet or in the whole domain.
Case 2 p = 1e5 at outlet
  • In that case you will not see negative pressure values but actually if you would make the gradient of p_outlet - p_cellI it would be the same values as in Case 1
Case 3 pressure driven flows
  • The reason to specify totalPressure with (pressureInletVelocity) and fixedValue at the outlet is obvious.
  • If one would specify fixedValue at the inlet and outlet, you will have a pressure gradient which will never vanish. If you go on in time, the gradient will accelerate your flow till infty.
  • The totalPressure reduces the pressure at each face based on the flux that is coming in. E.g. the pressure at the inlet face is equal to the pressure you set minus the kinematic pressure.
  • You can see that the increase of velocity will decrease the values of the pressure at the inlet and thus the total pressure gradient and therefore the acceleration of the flud.
  • At the end you will have an established flow that is in equilibrium.
  • By the way you simply can make that test with a normal pipe flow.


Pressure values

As already mentioned you can set p to any value because only the gradients matters here (still talking about incompressible cases). Therefore if you would like to know the absolute pressure value, you can do it as follow:

  • You know that the pressure at the outlet is 1.5e5 Pa (atmospheric + 0.5 bar)
  • Incompressible means divide by density
  • Then set this values as outlet
  • After the calculation you have to multiply the pressure by the density again (to get the values in Pascal again)
  • Then you would have the absolute pressure values
I hope I did not make any mistake here but it should be fine. As you can see, the dividing and multiplying step could be removed but this is the logical way. Again, as Santiago already stated, the pressure here has no physical meaning. The solver would also run if you set p at the outlet to a value of -141235.

By the way Philippo was talking about that here too: Outflow boundary condition for LES/DNS
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   July 17, 2017, 10:15
Default
  #13
Senior Member
 
Santiago Lopez Castano
Join Date: Nov 2012
Posts: 223
Rep Power: 9
Santiago is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Hi all,

I just want to include a bit more of information here. First of all I agree with the statements given by Santiago especially for turbulent flows (back flow - how are the eddies coming back etc. - by the way does FOAM provide an Orlansky BC? - I don't make LES / DNS simulations and I am not so familiar).
In addition everything that is mentioned about the pressure is correct. If you derive the Navier-Stokes-Equation for incompressible fluids, you will find that the pressure p does not have any physical meaning. Only the gradient of p has a meaning. As it was already said, it is the driving force for your flow. Therefore, if you set a fixed value of pressure at the outlet to 0 or 1e5 does not influence your system because only the gradient is of physical meaning.

Case 1 p = 0 at outlet
  • In that case you specify p at the outlet with an value of 0. Setting an inflow using U, you might see negative pressure values at the inlet or in the whole domain.
Case 2 p = 1e5 at outlet
  • In that case you will not see negative pressure values but actually if you would make the gradient of p_outlet - p_cellI it would be the same values as in Case 1
Case 3 pressure driven flows
  • The reason to specify totalPressure with (pressureInletVelocity) and fixedValue at the outlet is obvious.
  • If one would specify fixedValue at the inlet and outlet, you will have a pressure gradient which will never vanish. If you go on in time, the gradient will accelerate your flow till infty.
  • The totalPressure reduces the pressure at each face based on the flux that is coming in. E.g. the pressure at the inlet face is equal to the pressure you set minus the kinematic pressure.
  • You can see that the increase of velocity will decrease the values of the pressure at the inlet and thus the total pressure gradient and therefore the acceleration of the flud.
  • At the end you will have an established flow that is in equilibrium.
  • By the way you simply can make that test with a normal pipe flow.


Pressure values

As already mentioned you can set p to any value because only the gradients matters here (still talking about incompressible cases). Therefore if you would like to know the absolute pressure value, you can do it as follow:

  • You know that the pressure at the outlet is 1.5e5 Pa (atmospheric + 0.5 bar)
  • Incompressible means divide by density
  • Then set this values as outlet
  • After the calculation you have to multiply the pressure by the density again (to get the values in Pascal again)
  • Then you would have the absolute pressure values
I hope I did not make any mistake here but it should be fine. As you can see, the dividing and multiplying step could be removed but this is the logical way. Again, as Santiago already stated, the pressure here has no physical meaning. The solver would also run if you set p at the outlet to a value of -141235.

By the way Philippo was talking about that here too: Outflow boundary condition for LES/DNS
The Orlansky BC is not "implemented" for PISO. nevertheless, in foam-extend there is a BC called 'advective' which is used for blast simulations, and can serve as a template for the Orlansky.

Sent from my Lenovo A5000 using CFD Online Forum mobile app
Santiago is offline   Reply With Quote

Old   July 17, 2017, 10:20
Default
  #14
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg
Posts: 2,230
Blog Entries: 6
Rep Power: 38
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Thanks for the hint.
Never came across about that boundary condition. Thank you again. By the way this BC is also available in the other derivatives, Foundation and ESI.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   May 24, 2018, 01:44
Default
  #15
New Member
 
Michael
Join Date: Feb 2015
Posts: 18
Rep Power: 6
allett02015 is on a distinguished road
I can confirm that in the openfoam version 16.12 and newer the advective (or in some cases also called convective) boundary conditions is implemented
allett02015 is offline   Reply With Quote

Old   June 20, 2018, 05:08
Default
  #16
Member
 
Ramana
Join Date: Jul 2017
Location: India
Posts: 58
Rep Power: 4
svramana is on a distinguished road
hello sir,
This is about incompressible fluid. can you please explain what about compressible fluid. because I'm working on gas turbine and so working fluid is compressible. I didn't saw anyone talking about compressible fluid.
svramana is offline   Reply With Quote

Old   June 20, 2018, 12:12
Default
  #17
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Augsburg
Posts: 2,230
Blog Entries: 6
Rep Power: 38
Tobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quote:
Originally Posted by allett02015 View Post
I can confirm that in the openfoam version 16.12 and newer the advective (or in some cases also called convective) boundary conditions is implemented

The definition is as follow:

If one is talking about the momentum then we talk about convection (Velocity field).
If one is talking about anything thing else which is transported by the velocity field, then we say that the field is advected.


Generally, people always say convected.

Quote:

hello sir,
This is about incompressible fluid. can you please explain what about compressible fluid. because I'm working on gas turbine and so working fluid is compressible. I didn't saw anyone talking about compressible fluid.
What are you referring to? Are you talking about pressure in compressible fluids?
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   June 27, 2018, 06:21
Default
  #18
Member
 
Ramana
Join Date: Jul 2017
Location: India
Posts: 58
Rep Power: 4
svramana is on a distinguished road
hello sir,

Quote:
Originally Posted by Tobi View Post
What are you referring to? Are you talking about pressure in compressible fluids?
Yes, I'm talking about pressure in compressible fluids. In above post you have explained very well about BCs of pressure in incompressible fluid. I want to know about compressible fluid.
svramana is offline   Reply With Quote

Old   July 31, 2018, 08:06
Default
  #19
New Member
 
vivek
Join Date: Oct 2011
Location: Pune Maharashtra
Posts: 6
Rep Power: 9
waradevivek is on a distinguished road
Did anyone got the pressure considerations for compressible flows. I have also got stuck into similar problem.
waradevivek is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
question regarding LES of pipe flow - pimpleFoam Dan1788 OpenFOAM Running, Solving & CFD 37 December 26, 2017 14:42
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 9 March 30, 2017 05:19
interFoam (HELYX-OS) pressure boundary conditions SFr OpenFOAM Running, Solving & CFD 8 June 23, 2016 16:36
CFX Solver stopped with error when requested for backup during solver running Mfaizan CFX 40 May 13, 2016 06:50
OpenFOAM Training, London, Chicago, Munich, Sep-Oct 2015 cfd.direct OpenFOAM Announcements from Other Sources 2 August 31, 2015 13:36


All times are GMT -4. The time now is 02:32.