# In what unit is pressure measured on OpenFOAM?

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

 January 26, 2021, 14:19 In what unit is pressure measured on OpenFOAM? #1 New Member   Matheus Join Date: Jan 2020 Posts: 9 Rep Power: 4 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.

 January 26, 2021, 15:14 #2 Senior Member   Mark Olesen Join Date: Mar 2009 Location: https://olesenm.github.io/ Posts: 1,503 Rep Power: 35 Pressure is in Pascals for compressible flow solvers, and the"p/rho" for incompressible Matheus.Costa likes this.

 January 29, 2021, 18:12 #3 Member   Ran Join Date: Aug 2016 Posts: 69 Rep Power: 8 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

January 30, 2021, 17:18
#4
Senior Member

Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,503
Rep Power: 35
Quote:
 Originally Posted by random_ran 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.

 February 1, 2021, 08:41 #5 Super Moderator     Tobias Holzmann Join Date: Oct 2010 Location: Tussenhausen Posts: 2,677 Blog Entries: 6 Rep Power: 49 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*. __________________ Keep foaming, Tobias Holzmann

 February 1, 2021, 13:15 #6 Member   Ran Join Date: Aug 2016 Posts: 69 Rep Power: 8 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. __________________ Yours in CFD, Ran

 February 2, 2021, 14:55 #7 Super Moderator     Tobias Holzmann Join Date: Oct 2010 Location: Tussenhausen Posts: 2,677 Blog Entries: 6 Rep Power: 49 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

 Tags openfoam, orifice plate, pressure