p_rgh in OF 1.7
Dear Foamers,
I'm a little bit confused about the new pressure p_rgh in OpenFOAM. How is it defined? I worry a little bit the boundary conditions I have to define. For example if I would like to have a constant "pressure" at the outflow, how can this be defined ? If I define p_rgh = 0, does that mean that the pressure + (rho)*g*z is fixed to zero in this case? Also I wonder why in some solvers I find a pfile and p_rgh file. Is the pfile only used for postprocessing or is it also possible to define boundary conditions there? Thanks in advance. Stawrogin 
In the 1.7.x buoyantPimpleFoam, both the p and p_rgh files are read. The p is used in the thermodynamic model.
In the createFields the p_rgh is defined as: p_rgh = p  rho*gh; So it is the pressure without the hydrostatic pressure and is intialized from the pressure field in the pfile. In the pEqn.H file, the pressure equation is written and solved for the p_rgh, so the boundary conditions important for the pressure solution are the p_rgh conditions. After the pressure solution, the p is calculated with: p = p_rgh + rho*gh; 
Dear Juho,
thanks a lot for the help. Now it's clear for me. Stawrogin 
Hi Juho,
p_rgh seems to be the dynamic pressure. I work with pimpleFoam and pisoFoam. Is it possible to adjust these codes to obtain p_rgh? Thanks, Nico 
Hi Nico,
Does p_rgh stand for the dynamic pressure, which means p_rgh=1/2*rho*U^2? I checked the tutorial dam break case, why the value of p_rgh is greater than p? It implies that the rho*g*h is negative. I am so confused. Quote:

Hi Angela,
p_rgh is p  rho*g*h, or, the dynamic pressure. It was called pd in version 1.5, they solved for total pressure in version 1.6, and now are back to solving for only the dynamic pressure in version 1.7. Kevin 
Hi Kevin,
but why p_rgh is higher than p? How a negative static pressure (rho*g*h) is possible? Shouldn’t 1/2*rho*U^2 (dynamic pressure def.) leads to p_rgh? PostCalculation of Ufield does not. nico 
Why p_rgh is greater than p
Dear fellows,
Oddly enough, gh is defined in openFoam as: gh = g & mesh.C()In other words, gh is the dot product of the g vector and the cell center position vector. As g is usually defined as (0 0 9.81), gh often results negative in the positive z cuadrant! Finally, as: p_rgh = p  rho * ghp_rgh is greater than p if z > 0 Hope this helps. Best regards Nicolas 
Thanks. My problem is solved. p_rgh is the dynamic pressure = p rho*g*h

one more question regarding this:
Using the buoyantBoussinesqSimpleFoam solver, the units of p and p_rgh is (m^2)/(s^2) [i.e Kinematic Pressure] obviously this is quite simply defined by: (p_rgh / rho) = (p / rho)  g*h My questions is what density is used when dividing through. Is it rhok = 1  beta (T  Tref) ?? Thnks 
Hi fellows,
I'd like to continue Nico's idea. It seems to me that p_rgh is not dynamic pressure. I changed endtime to 500 in the laminar dambreak case. After that time initial transition flow will be stationary. So the there no dynamic pressure at t=500. But interfoam gives non zero p_rgh pressure. That is why I assume that p_rgh is not dynamic pressure. Could someone еxplaine me what is going on? Or am I wrong ? Kerim 
Hi Kerim,
p_rgh is not really dynamic pressure, specially in multiphase flow where rho changes throughout the domain. Is just de difference between real pressure and the rho*g*z field. I think that's one of the reasons the field is no longer called pd, as in 1.5 version of OF. Just to add to the confusion, bear in mind thart rho*g*z is not the real hydrostatic pressure either!! Even if rho is constant it differes from hydrostastic component by a constant (the distance between the z=0 plane and the atmosphere p=0 plane times rho*g). Here's a quick sketch of the relation between p_rgh, rgh and p for a hydrostatic condition (no movement at all). Hope this helps http://lausinacreativa.com.ar/OpenFO...H_equals_P.jpg Best regards! Nico 
p and p_rgh files
Hello there,
I'm modelling a burner which has been tested at atmospheric condition and I'm a bit confused :confused:. How can I do to set the boundary conditions properly for p and p_rgh? Inlet > Outlet> Wall> Thank you indeed. Cristiano 
Quote:

Tip
Despite this a very simple suggestion it is worth to say it.
In case you have an OpenFOAM 1.6 case that had run successfully and want to run it in OpenFOAM 1.7 remember that you can just rename your p file to p_rgh (and also change some other parameters in your transportProperties and fvSchemes files). Then change the value of g from (0 0 9.81) to (0 0 0). The case should work the same as in OpenFOAM 1.6 and you won't have to worry about if the BC that you are using in OpenFOAM 1.7 are ok if they were ok in OpenFOAM 1.6. Cheers, Christian F. 
Bernoulli
To understand the different pressures, look at Bernoulli:
Dynamic pressure > 1/2*rho*v^2 Hydraulic pressure> rho*g*h Static pressure > p 1/2*rho*v^2 + rho*g*h + p = Constant From the openFoam site, p_rgh = p  rho*g*h. So, p_rgh is the static pressure minus the hydraulic pressure, based on a arbitrary height. I do not understand where the dynamic pressure came into this discussion. I think it has nothing to do p_rgh. Dynamic pressure is the pressure of the moving fluid and it will convert into static pressure if you bring the velocity of the fluid to zero. Conservation of energy, back to Bernoulli. Good to know: To get my VOF model working, I placed in the fvSolutions file under the PISO solver pRefPoint (0.0 0.0 0.0); pRefValue 1e5; Succes! 
Hello,
thanks King, for the clearing explanation. To finish the pressure confusion: The postprocessing utility "ptot" calculates the total pressure (static + dynamic) for every time step: http://www.cfdonline.com/Forums/ope...ldswrite.html Cheers, Nico 
I think: P_rgh is the perturbation pressure (from an hydrostatic equilibrium state) that is actually used during the simulations in the momentum equations.

why does p_rgh have units of m^2s^2 in the bouyantBoussinesqPimpleFoam and the bouyantBoussinesqSimpleFoam examples, but has units of kgm^1s^2 under the (multiphase) interFoam examples?

Because it is divided by the density in the first two cases. To have the "real" pressure" you have to multiply by density [kg/m^3].
best andrea 
All times are GMT 4. The time now is 12:30. 