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

p_rgh in OF 1.7

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

Like Tree54Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   September 27, 2010, 04:57
Default p_rgh in OF 1.7
  #1
Member
 
Join Date: Nov 2009
Posts: 33
Rep Power: 7
stawrogin is on a distinguished road
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 p-file and p_rgh file. Is the p-file only used for postprocessing or is it also possible to define boundary conditions there?

Thanks in advance.

Stawrogin
stawrogin is offline   Reply With Quote

Old   September 27, 2010, 05:20
Default
  #2
Member
 
Juho Peltola
Join Date: Mar 2009
Location: Finland
Posts: 80
Rep Power: 8
juho is on a distinguished road
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 p-file.

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;
shash, mgg, dawnrain and 5 others like this.
juho is offline   Reply With Quote

Old   September 27, 2010, 05:27
Default
  #3
Member
 
Join Date: Nov 2009
Posts: 33
Rep Power: 7
stawrogin is on a distinguished road
Dear Juho,

thanks a lot for the help. Now it's clear for me.

Stawrogin
stawrogin is offline   Reply With Quote

Old   September 30, 2010, 06:22
Default
  #4
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 6
deniggo is on a distinguished road
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
deniggo is offline   Reply With Quote

Old   October 5, 2010, 17:52
Default
  #5
New Member
 
Angela Wang
Join Date: Mar 2009
Location: Fairfax, VA, USA
Posts: 15
Rep Power: 8
Angela Wang is on a distinguished road
Send a message via MSN to Angela Wang
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:
Originally Posted by deniggo View Post
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
Angela Wang is offline   Reply With Quote

Old   October 5, 2010, 19:20
Default
  #6
Member
 
Kevin Maki
Join Date: Mar 2009
Location: Ann Arbor, MI, USA
Posts: 41
Rep Power: 8
kjmaki is on a distinguished road
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
kjmaki is offline   Reply With Quote

Old   October 6, 2010, 03:07
Default
  #7
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 6
deniggo is on a distinguished road
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? Post-Calculation of U-field does not.

nico
deniggo is offline   Reply With Quote

Old   October 29, 2010, 15:19
Default Why p_rgh is greater than p
  #8
New Member
 
Nicolás Badano
Join Date: Sep 2010
Posts: 10
Rep Power: 8
nbadano is on a distinguished road
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 * gh
p_rgh is greater than p if z > 0

Hope this helps.

Best regards

Nicolas
nbadano is offline   Reply With Quote

Old   October 29, 2010, 15:26
Default
  #9
New Member
 
Angela Wang
Join Date: Mar 2009
Location: Fairfax, VA, USA
Posts: 15
Rep Power: 8
Angela Wang is on a distinguished road
Send a message via MSN to Angela Wang
Thanks. My problem is solved. p_rgh is the dynamic pressure = p- rho*g*h
wayne14 likes this.
Angela Wang is offline   Reply With Quote

Old   November 17, 2010, 13:01
Default
  #10
Member
 
Logan Page
Join Date: Sep 2010
Posts: 38
Rep Power: 6
Logan Page is on a distinguished road
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
Logan Page is offline   Reply With Quote

Old   December 3, 2010, 13:20
Default
  #11
New Member
 
abdikerim kurbanaliev
Join Date: Jun 2010
Location: Bloomington, IN, USA
Posts: 12
Rep Power: 7
kerim is on a distinguished road
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
kerim is offline   Reply With Quote

Old   December 3, 2010, 14:29
Default
  #12
New Member
 
Nicolás Badano
Join Date: Sep 2010
Posts: 10
Rep Power: 8
nbadano is on a distinguished road
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



Best regards!

Nico
paka, makaveli_lcf, verby and 23 others like this.
nbadano is offline   Reply With Quote

Old   December 13, 2010, 10:21
Default p and p_rgh files
  #13
New Member
 
Cristiano
Join Date: Jun 2010
Posts: 14
Rep Power: 7
Cristiano is on a distinguished road
Hello there,

I'm modelling a burner which has been tested at atmospheric condition and I'm a bit confused .

How can I do to set the boundary conditions properly for p and p_rgh?

Inlet -->
Outlet->
Wall--->

Thank you indeed.

Cristiano
Cristiano is offline   Reply With Quote

Old   January 14, 2011, 11:44
Default
  #14
Senior Member
 
Illya Shevchuk
Join Date: Aug 2009
Location: Darmstadt, Germany
Posts: 174
Rep Power: 7
linch is on a distinguished road
Quote:
@nbadano

I agree to your sketch: if the p-field is smooth, the h-field is also smooth, the g-field is uniform and there is a jump in the rho-field at h=h2, so the must be a jump in the p_rgh field. But if you set up your example in interFoam you'll notice, that the p_rgh field is uniform also. Though the p_rgh definition might be a littlte different.

Well, theoretically you'll get an uniform field, if you divide p_rgh by rho, but in this case you wouldn't get the p-dimension [kg*m^-1*s^-2]. So somehow the hydrostatic pressure is being substracted and not the simple product of rho*g*z.
Sorry, I was wrong about it. P_rgh is not uniform.

Last edited by linch; January 14, 2011 at 12:01.
linch is offline   Reply With Quote

Old   February 10, 2011, 11:55
Default Tip
  #15
New Member
 
Christian Fri
Join Date: Dec 2009
Posts: 5
Rep Power: 7
christianfrias is on a distinguished road
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.
christianfrias is offline   Reply With Quote

Old   May 17, 2011, 16:30
Default Bernoulli
  #16
New Member
 
Arnout
Join Date: Nov 2010
Posts: 23
Rep Power: 6
The King is on a distinguished road
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!
deji, Mojtaba.a, sharonyue and 6 others like this.
The King is offline   Reply With Quote

Old   June 24, 2011, 08:39
Default
  #17
Member
 
Nico T
Join Date: Aug 2010
Location: Leipzig, Germany
Posts: 39
Rep Power: 6
deniggo is on a distinguished road
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:

Where to define which fields to write?

Cheers,

Nico
Mojtaba.a and Pirlu like this.
deniggo is offline   Reply With Quote

Old   November 19, 2011, 06:52
Default
  #18
New Member
 
Fernando Castro
Join Date: Oct 2011
Posts: 1
Rep Power: 0
fasfcastro is on a distinguished road
I think: P_rgh is the perturbation pressure (from an hydrostatic equilibrium state) that is actually used during the simulations in the momentum equations.
fasfcastro is offline   Reply With Quote

Old   November 29, 2011, 10:11
Default
  #19
New Member
 
Howard NJOKU
Join Date: Nov 2010
Location: Nsukka, Nigeria
Posts: 9
Rep Power: 6
Oke'e is on a distinguished road
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?
Oke'e is offline   Reply With Quote

Old   November 29, 2011, 10:23
Default
  #20
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 275
Rep Power: 7
Andrea_85 is on a distinguished road
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
Andrea_85 is offline   Reply With Quote

Reply

Thread Tools
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
solver for subsonic compressible turbulent flow in OF 1.7 nileshjrane OpenFOAM Running, Solving & CFD 20 February 13, 2012 06:54
OpenFOAM 1.7 installation issue in Ubuntu 10.04 hcmadhu OpenFOAM Installation 7 August 24, 2010 16:55
YPlusRas for InterFoam (Open Foam 1.7) MrD OpenFOAM 0 August 11, 2010 15:44
OpenFOAM 1.7 - openSUSE 11.3 - gcc 4.5.0 alberto OpenFOAM 12 July 28, 2010 11:59
MixSim 1.7 Tutorials johnnyb FLUENT 0 August 25, 2003 17:13


All times are GMT -4. The time now is 11:23.