
[Sponsors] 
Pressure fields in FOAM, p field, total pressure, etc. 

LinkBack  Thread Tools  Search this Thread  Display Modes 
September 6, 2019, 13:39 
Pressure fields in FOAM, p field, total pressure, etc.

#1 
Super Moderator

Hi all,
I am trying to understand the pressure fields in FOAM better in order to setup the boundary conditions for p_rgh more properly. So I made a simple test geometry which is easy to understand and easy for manual recalculation based on Bernoulli. Pressure in OpenFOAM Please correct me if I am wrong (and probably, I am)
Based on Bernoulli, the energy should be everywhere constant. Thus: In the simulation, I am using a prghPressure at the inlet (top patch) and I set the field hRef to its level. That means at the top patch, the p_rgh field is equal to the static pressure p as: while h = 0 at the top patch. After the fluid flows into the small channel, it accelerates and the kinematic pressure rises while the static pressure is reduced (which can be seen in the pitcture). However, the total pressure should be constant there, shouldnīt it? Nevertheless, we can see at the section where the fluid enters into the channel, that the total pressure is nonuniform. I would expect that the total pressure should be uniformly increasing from top to bottom (based on the hydrostatic part) while the static part and the kinematic part are changing depending on the velocity/pressure distribution. For any reason, I am missing something here. By the way, I am using the buoyantPimpleFoam solver with polynomial coefficients for the properties (water) and the outlet boundary condition is a prghPressure condition too (same static pressure, thus I was expecting that the hydrostatic part will be the driving force)  however, the numerical results are not identical to the analytical calculation. The height difference from top patch to the outlet is 2 m while at the top patch only the hydrostatic pressure acts in the Bernoulli equation. The kinematic pressure is zero and the hydrostatic part is zero to as the height is zero: The static pressure at the top (p_1) is equal to the static pressure at the outlet (p_2) thus: and therefore: Nevertheless, the result is 6.26 m/s which I do not achieve at the outlet. Rough estimation. I do anything wrong. Maybe someone can light me up (:
__________________
Keep foaming, Tobias Holzmann 

September 9, 2019, 07:38 

#2 
Super Moderator

Hi all,
I freed my brain and got it. The p_rgh field is not the static pressure minus the hydrostatic part as the reference height is always different. Thatīs why we name it "working" pressure. However, some small hints:
__________________
Keep foaming, Tobias Holzmann 

September 9, 2019, 09:22 

#3 
Senior Member
anonymous
Join Date: Jan 2016
Posts: 304
Rep Power: 7 
Hi Tobi!
How do you mean that the reference height is always different? It is zero by default. Also the prghPressure BC uses the hRef value from the db() so it will be the same again. I think hRef is always the same. Sorry if this is a stupid question, but you made me a bit confused now And what was the solution for your problem? (just to clarify ) 

September 9, 2019, 11:54 

#4 
Super Moderator

Yes hRef is always set to zero by default. I am sorry for not describing it well. Lets talk about my case above. For me the reference is always the top level of the liquid. Means in my case, the top of the big storage tank. My reference value for analystic calculation should be set to 3m here. Therefore, the hydrostatic part (rho g h) will increase with respect to the top patch of the big storage tank (:
You are right, the reference height is always set to zero. However, if you move the geometry 2 m up or down, the p_rgh value will change accordingly (which made me always a bit messed up). The solution is as follows (not 100 % clear for me now):  Setting up prghTotalPressure for the inlet (1e5 Pa)  Setting up prghPressure for the outlet (1e5 Pa)  Setting hRef to 3 m It follows: p_rgh at the inlet is equal to the static pressure corrected by the fluxes (in this boundary condition no rho g h is used as the prghTotalPressure is equivalent to totalPressure) p_rgh at the outlet is equal to the static pressure  rho g dh (~2 m) Thus, the driving force is the difference. Nevertheless, I thought that the potential energy difference (rho g h) from top patch of the inlet to the outlet will relate to the velocity we achieve. I will try to make a clear statment: Position 0 (inlet; top patch of large tank Position 1 (outlet) Bernoulli Energy at Position (1) is equal to (2): infinit large tank Therefore, it follows: However, I do not reach this velocity at all. Right now I have 0.6 m/s (not converged yet).
__________________
Keep foaming, Tobias Holzmann 

September 10, 2019, 04:00 

#5 
Senior Member
anonymous
Join Date: Jan 2016
Posts: 304
Rep Power: 7 
I just made a toy case. Please don't check the turbulent BCs, random numbers... And mostly not a really correct case. BUT!
Fluid: water deltaH: 3m calculated velocity: 7.672 m/s resulted max velocity at outlet: 7.6861 m/s case:
here, (prescribed total pressure) (prescribed static pressure) thus , the same as you did. toy case attached. (WARNING! Really poor case, but correct results. At least I accept it. ) 

September 10, 2019, 04:14 

#6 
Super Moderator

Did not check the case right now but I agree that the inlet boundary condition should be totalPressure (or prghTotalPressure) in order to reduce the pressure gradient based on the fluxes.
You case should accelerate the fluid until infinty and crash if you set a staticPressure to the inlet too. Thank you very much for investigating into my "simple" topic. I will check you case now.
__________________
Keep foaming, Tobias Holzmann 

Thread Tools  Search this Thread 
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
a reconstructPar issue  immortality  OpenFOAM PostProcessing  8  June 16, 2013 12:25 
Difference between pressure, absolute pressure and Total Pressure  shaswat  CFX  1  September 6, 2012 07:12 
[Other] mesh airfoil NACA0012  anand_30  OpenFOAM Meshing & Mesh Conversion  12  December 12, 2011 05:16 
Total pressure in CFX  famarcfd  CFX  0  June 17, 2011 11:33 
[Other] StarToFoam error  Kart  OpenFOAM Meshing & Mesh Conversion  1  February 4, 2010 05:38 