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

An old story... the p_rgh field

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Tobi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 2, 2019, 10:21
Default An old story... the p_rgh field
  #1
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
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
Hi everybody,

even though people might think I am good in FOAM, I am having still problems with the p_rgh field and boundary conditions. Well in the numerical point of view it is not a big deal to get the idea of the p_rgh field and even the derivation of the equation. However, letīs talk about that (again) using a relatively simple case.

Referring to the attached PDF, we see two tanks (1) and (2) filled with water while on both tanks an atmospheric pressure is given above the fluid level. The filling level difference is given by \Delta h_{12} represents the level difference. Each tank has a pipe to the storage tank shown in the middle of the draft.

The area of interest is given in the right bottom corner. Letīs imagine infinite large tanks (1) and (2) which means that the water level does not change during time. Thus, we always have a defined (and fixed) hydrostatic pressure that acts as a driving force for the water (1) and water (2) to flow into the storage tank (3).


Let's assume that tank (1) has 30 degC warm water and tank (2) has 45 degC warm water. We take a defined mass flow out of tank (3) while new water is sucked in from tank (1) and tank (2).

The ratio depends on the hydrostatic pressures of both streams. Means, if \Delta h_{12} increases (higher water level in the tank (2)), more water from the tank (2) is flowing into tank (3).


As in all p_rgh cases, I am struggling with the correct pressure boundary conditions.


Questions
  • Which pressure boundary conditions should be used for p_rgh for the fluid (1) and (2) and at the outlet (3)
  • For (3) I would use a fixedFluxPressure while setting the mass flow rate of interest
  • For (1) and (2) I have no idea of the p_rgh values and bc; assuming a constant water height in the tank (1) and (2), it should be possible to set fixed pressure value. However, the p_rgh quantity is without the hydrostatic part which means, for example, that for constant temperature the p_rgh field is equal in the whole domain (if no flow occurs)

Did anybody had similar set-upīs before and can help me out? I was looking into the hydrostatic* pressure boundary conditions but did not find any suitable one for my case.

Any hints are welcomed.
Thank you in advance
Tobi
Attached Files
File Type: pdf p_rgh.pdf (32.1 KB, 52 views)
mikulo likes this.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   September 2, 2019, 15:33
Default
  #2
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
I think for your case, you have to set fixedValue boundary conditions in your patches (1) and (2) with the value
p_atmosphere - rho(at position of boundary) * g * h_rel


h_rel is the hight difference to your reference point (which might be set automatically to 0)
jherb is offline   Reply With Quote

Old   September 2, 2019, 17:04
Default
  #3
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
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
Hi Herb,

thank you for the quick response. One question. hrel is the difference between the level in tank (1) to the reference point as well as the level in tank (2) to the reference point?
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   September 2, 2019, 17:34
Default
  #4
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
Yes, both tanks should have the same reference point.


So if the heights are different, the boundary (fixed)Value should be different.


(I am not totally sure about the sign)


So for the bigger height, the value of p_rgh is higher (p - rho * (-9.81) * h). Which actually make sense:If there is no flow, the pressure should be the same everywhere.
jherb is offline   Reply With Quote

Old   September 2, 2019, 17:38
Default
  #5
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
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
Okay, I will check it tomorrow. Did you ever checked out the following BC:


Code:
This boundary condition provides static pressure condition for p_rgh,       
    calculated as:                                                              
                                                                                
        \f[                                                                     
            p_rgh = ph_rgh - 0.5 \rho |U|^2                                     
        \f]

Wondering in which szenario we are using it because I never realized the field ph_rgh in any solver.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   September 2, 2019, 17:43
Default
  #6
Senior Member
 
Joachim Herb
Join Date: Sep 2010
Posts: 650
Rep Power: 21
jherb is on a distinguished road
I think, you want this:
https://cpp.openfoam.org/v4/classFoa...d.html#details


This boundary condition provides static pressure condition for p_rgh, calculated as:




Or in the Foundation version: https://github.com/OpenFOAM/OpenFOAM...hScalarField.H
jherb is offline   Reply With Quote

Old   September 2, 2019, 18:07
Default
  #7
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Tussenhausen
Posts: 2,708
Blog Entries: 6
Rep Power: 51
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
Ah okay, right but shouldn't it be a totalPrghPressure somehow, which reduces the pressure at the face based on the kinematic pressure (velocity field).
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply


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
External Magnetic Field Data Format for FLUENT MHD Module eduardvinter FLUENT 0 January 24, 2019 01:54
simpleDyMFoam on v1806 gamemakerh OpenFOAM Programming & Development 0 November 8, 2018 08:15
potential flows, helmholtz decomposition and other stuffs pigna Main CFD Forum 1 October 26, 2017 08:34
[General] How to create an additional vector with {Field 4, Field 5, Field 6} Bombacar ParaView 1 August 15, 2015 18:05
Demagnetization field jan0385 ANSYS 0 April 12, 2012 09:09


All times are GMT -4. The time now is 04:57.