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

In what unit is pressure measured on OpenFOAM?

Register Blogs Community New Posts Updated Threads Search

Like Tree5Likes
  • 1 Post By olesen
  • 1 Post By olesen
  • 1 Post By Tobi
  • 1 Post By random_ran
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 26, 2021, 14:19
Default In what unit is pressure measured on OpenFOAM?
  #1
New Member
 
Matheus
Join Date: Jan 2020
Posts: 9
Rep Power: 6
Matheus.Costa is on a distinguished road
Hi guys, while checking the results of my simulations I noticed that the pressure has an unfamiliar value, the speed vector seems to have the expected value but the same doesn't apply to the pressure. I'm simulating a pressure drop through an orifice plate inside a pipe and comparing the values with a previous experiment, the pressure at the gages were measured at 1.5 PSI (10.3Kpa) before the orifice plate and 0 PSI after. The calculated pressures for the same experiment were 1.564 PSI and 0.264 PSI respectively, which are close to the experimental result, but when I run the simulation the value for pressure before the plate is 0.764 and -0.267, after researching a little I read that openFOAM uses the pressure normalized by rho (p/rho), so, in order to find the value of the pressure I need to multiply the value that I found and rho? Even after multiplying the value in pascals is too low to be accurate (around 764pa and -267pa)

I set the boundary conditions following the pitzdaily tutorial, maybe I missed something at the inlet boundary condition, I set all the boundaries to be zerogradient for the pressure, except the outlet which is set as fixedvalue: uniform 0. I would be very thankful if any of you guys could help me out.
Matheus.Costa is offline   Reply With Quote

Old   January 26, 2021, 15:14
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Pressure is in Pascals for compressible flow solvers, and the"p/rho" for incompressible
Matheus.Costa likes this.
olesen is offline   Reply With Quote

Old   January 29, 2021, 18:12
Default
  #3
Member
 
Ran
Join Date: Aug 2016
Posts: 69
Rep Power: 10
random_ran is on a distinguished road
I am just curious that "p/rho" is used in OF.

It seems to have some calculation advantages but I do not know the details
__________________
Yours in CFD,

Ran
random_ran is offline   Reply With Quote

Old   January 30, 2021, 17:18
Default
  #4
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,715
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Quote:
Originally Posted by random_ran View Post
I am just curious that "p/rho" is used in OF.

It seems to have some calculation advantages but I do not know the details

Well if the simulation is incompressible you can either have an implied constant density to drag through all the equations (eg, multiplying by one in various places) or simply do away with density in the equations by more or less factoring it into pressure (p = p/rho, and rho == 1) thus giving the units in question.
Tobi likes this.
olesen is offline   Reply With Quote

Old   February 1, 2021, 08:41
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
I refer to my book "Mathematics, Numerics, Derivations and OpenFOAM". Here, all equations are described.

As Mark already said, if we have incompressible solvers it is ment that the density is constant and not changing, e.g., by compression or expansion or thermal behavior. As the density is constant, we can take the density out of all derivatives and can cancel via rho. Thus, in all terms including rho, it vanishes and the terms that do not have the density included (such as the pressure term) are divided by the density. Hence, p/rho = p* for incompressible flows. Nevertheless, for incompressible flows the pressure does not have the physical meaning as a "real" pressure as only the pressure gradients are of importantance. Thus, one can see negative pressure values p*.
JCAM likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   February 1, 2021, 13:15
Default
  #6
Member
 
Ran
Join Date: Aug 2016
Posts: 69
Rep Power: 10
random_ran is on a distinguished road
I know that, for the incomprensible case, the pressure is usually not
in [Pa] but it is divided by the fluid density (so the unit is
m^2/s^2) in OpenFOAM. In order to get the pressure in the unit [Pa], one
needs to multiply the result from OpenFOAM by the density.

However, this extra step makes me think there might be advantages
in using such a simplification in incompressible solver. Imaging a new
user would expect to set the pressure in the simulation and expect
the calculation result is immediately available to compare to their
experiment tests. In addition, introducing the density into the
incompressible solver might simplify the codebase. I don't know the
OOP details, but just a guess.

"the pressure does not have the physical meaning as a "real"
pressure as only the pressure gradients are of importance."

This perspective is interesting. Is there any other fundamental
measurement that exists that only has importance to their gradient but
not themselves? For example, the second, metre, kilogram, ampere,
kelvin, mole, candela.
zayou563 likes this.
__________________
Yours in CFD,

Ran
random_ran is offline   Reply With Quote

Old   February 2, 2021, 14:55
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Sure there is a benefit. If you use a density field in the equations, we have to interpolate these quantities to the faces even though it is everywhere the same because we calculate the face fluxes using U and rho in the cell center. Hence, we have to interpolate it to the faces. If we remove the density (as it is a constant) we only need to interpolate U and not both U and rho.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   November 20, 2023, 10:15
Smile
  #8
New Member
 
Shah Paran
Join Date: Nov 2023
Posts: 2
Rep Power: 0
paran0 is on a distinguished road
Quote:
Originally Posted by Tobi View Post
I refer to my book "Mathematics, Numerics, Derivations and OpenFOAM". Here, all equations are described.

As Mark already said, if we have incompressible solvers it is ment that the density is constant and not changing, e.g., by compression or expansion or thermal behavior. As the density is constant, we can take the density out of all derivatives and can cancel via rho. Thus, in all terms including rho, it vanishes and the terms that do not have the density included (such as the pressure term) are divided by the density. Hence, p/rho = p* for incompressible flows. Nevertheless, for incompressible flows the pressure does not have the physical meaning as a "real" pressure as only the pressure gradients are of importantance. Thus, one can see negative pressure values p*.
Hello Tobi,
I am new to CFD and I did not understand "why for incompressible flows the pressure does not have the physical meaning as a "real" pressure?" Could you please explain this or someone else who have seen my text? Thank you.
paran0 is offline   Reply With Quote

Old   November 20, 2023, 10:46
Default
  #9
Senior Member
 
M
Join Date: Dec 2017
Posts: 703
Rep Power: 13
AtoHM is on a distinguished road
As stated above, the incompressible OpenFOAM solvers solve for the kinematic pressure instead of the physical pressure: https://www.openfoam.com/documentati...-pressure.html
What drives the flow is the pressure gradient, not the physical/absolute value of pressure. It has been described nicely above, I think. All you need to know as a user is that you have to multiply by your fluid density to get the physical pressure value from the result.
AtoHM is offline   Reply With Quote

Old   November 20, 2023, 14:47
Default
  #10
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Quick addition

First: add multiply by a reference density and then second: add a reference pressure
f.khamitov likes this.
__________________
Keep foaming,
Tobias Holzmann

Last edited by Tobi; November 23, 2023 at 12:15.
Tobi is offline   Reply With Quote

Old   November 23, 2023, 12:14
Default
  #11
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Not sure what you mean but for incompressible solver in OpenFoam:

p_real = (p_cfd*rho)+p_ref
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   December 15, 2023, 06:43
Default OpenFoam transient case to steady state case
  #12
New Member
 
Shah Paran
Join Date: Nov 2023
Posts: 2
Rep Power: 0
paran0 is on a distinguished road
Hi,
I am running a propeller transient case using pimplefoam for my thesis. But, I want to run it now as a steady state case so that I can understand immediately how it looks like when the transient simulation converges to steady state. Is there any one who can help to change my case setting so that it runs as a steady state simulation? Thanks!
paran0 is offline   Reply With Quote

Old   February 21, 2024, 05:14
Default
  #13
New Member
 
Join Date: Nov 2023
Posts: 5
Rep Power: 3
vv123 is on a distinguished road
Quote:
Originally Posted by Tobi View Post
Not sure what you mean but for incompressible solver in OpenFoam:

p_real = (p_cfd*rho)+p_ref
Hi Tobi,

I don't understand what the P_ref value is. I am using the solver pimpleFoam and imply all BC for p as zeroGradient, p_out =0 and p_top = slip. I don't specify a reference pressure anywhere, so how can you know what this value is?

Some background;

I am simulating a river flow, I would like to transform the pressure calculations from OpenFoam to a water level from the rigid lid.

Thanks!!
vv123 is offline   Reply With Quote

Old   February 22, 2024, 05:25
Default
  #14
Member
 
Pedro Gouveia
Join Date: Oct 2022
Location: Portugal
Posts: 64
Rep Power: 4
unilord is on a distinguished road
Quote:
Originally Posted by vv123 View Post
Hi Tobi,

I don't understand what the P_ref value is. I am using the solver pimpleFoam and imply all BC for p as zeroGradient, p_out =0 and p_top = slip. I don't specify a reference pressure anywhere, so how can you know what this value is?

Some background;

I am simulating a river flow, I would like to transform the pressure calculations from OpenFoam to a water level from the rigid lid.

Thanks!!

Hey vv,

I know I am not Tobias, but I think I can answer your question. In incompressible solver, the pressure that you choose as inlet our outlet doesn't really matter. Pressure in itself has no real representation. However, a difference of pressure does.

You can choose your outlet pressure = 0 [Pa/(kg.m^-3)], just like you mentioned. However, that won't happen in real life, as a pressure of 0 will not be a real representation of the physics of your problem. In your case, I assume your p_ref would be the environment pressure (101.325 [P/(kg.m^-3)], if it is at sea level.
unilord is offline   Reply With Quote

Old   February 22, 2024, 12:16
Default
  #15
New Member
 
Join Date: Nov 2023
Posts: 5
Rep Power: 3
vv123 is on a distinguished road
Quote:
Originally Posted by unilord View Post
Hey vv,

I know I am not Tobias, but I think I can answer your question. In incompressible solver, the pressure that you choose as inlet our outlet doesn't really matter. Pressure in itself has no real representation. However, a difference of pressure does.

You can choose your outlet pressure = 0 [Pa/(kg.m^-3)], just like you mentioned. However, that won't happen in real life, as a pressure of 0 will not be a real representation of the physics of your problem. In your case, I assume your p_ref would be the environment pressure (101.325 [P/(kg.m^-3)], if it is at sea level.
Hi Pedro,

Thanks for your answer. That makes sense. However I still have an issue. In my case I have a rigid lid, where there is actually a free surface. The changes from the rigid lid are assumed to not be super large (so that is why this choice was made). However, I would like to retrieve a deviation in the water level from the rigid lid based on the pressure levels.

The problem I am facing is that the pressure is always bigger upstream, than downstream. Therefore, after a correction for velocity it still doesn't work. Also I am not sure about my derivation of pressure to water level. I added a word document with my derivation.

Another way (that seems to work, but I didn't manage to get a derivation) is:
h = p_k/g - 0.5u^2/g

could you maybe help with this?
Attached Files
File Type: docx Pressure derivation.docx (19.2 KB, 7 views)
vv123 is offline   Reply With Quote

Old   February 23, 2024, 04:59
Default
  #16
Member
 
Pedro Gouveia
Join Date: Oct 2022
Location: Portugal
Posts: 64
Rep Power: 4
unilord is on a distinguished road
Quote:
Originally Posted by vv123 View Post
Hi Pedro,

Thanks for your answer. That makes sense. However I still have an issue. In my case I have a rigid lid, where there is actually a free surface. The changes from the rigid lid are assumed to not be super large (so that is why this choice was made). However, I would like to retrieve a deviation in the water level from the rigid lid based on the pressure levels.

The problem I am facing is that the pressure is always bigger upstream, than downstream. Therefore, after a correction for velocity it still doesn't work. Also I am not sure about my derivation of pressure to water level. I added a word document with my derivation.

Another way (that seems to work, but I didn't manage to get a derivation) is:
h = p_k/g - 0.5u^2/g

could you maybe help with this?
Hey vv,

Sorry but I am not able to understand the problem you are facing. Why is it a problem that the pressure is always bigger upstream? And what do you mean by "correction for velocity"? Maybe with some pictures of your domain it would be clearer.
unilord is offline   Reply With Quote

Old   February 23, 2024, 05:08
Default
  #17
New Member
 
Join Date: Nov 2023
Posts: 5
Rep Power: 3
vv123 is on a distinguished road
Explanation problem.png
Quote:
Originally Posted by unilord View Post
Hey vv,

Sorry but I am not able to understand the problem you are facing. Why is it a problem that the pressure is always bigger upstream? And what do you mean by "correction for velocity"? Maybe with some pictures of your domain it would be clearer.
Hi Pedro,

As I want to convert the calculated pressure to the water level. I have a rigid lid on top, but I also have the measured water levels. I made rigid lid smoother than the actual water levels. However if I calculate the water level from the pressure, I am facing a water level setup upstream. I am thinking that this might be due to the pressure that is always bigger upstream as well.
Attached Images
File Type: jpg Domain.jpg (18.9 KB, 8 views)
vv123 is offline   Reply With Quote

Reply

Tags
openfoam, orifice plate, pressure


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 06:29
What is difference between static pressure and gauge pressure? aja1345 FLUENT 1 July 20, 2018 21:05
OpenFOAM Training Jan-Jul 2017, Virtual, London, Houston, Berlin CFDFoundation OpenFOAM Announcements from Other Sources 0 January 4, 2017 07:15
Suggestion for a new sub-forum at OpenFOAM's Forum wyldckat Site Help, Feedback & Discussions 20 October 28, 2014 10:04
measured pressure in the discharge pipe jumps Jan Main CFD Forum 1 October 30, 2006 08:54


All times are GMT -4. The time now is 10:46.