
[Sponsors] 
July 3, 2013, 17:05 
Hydrostatic pressure issue

#1 
New Member
Join Date: Nov 2011
Posts: 20
Rep Power: 6 
I am totally confused with the hydrostatic pressure calculations in openfoam. I've prepared a simulation of air flow through a vertical pipe (buoyantBoussinesqSimpleFoam). I've used following BC for pressures:
p Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 2 0 0 0 0]; internalField uniform 0; boundaryField { Wall { type calculated; value $internalField; } Inlet { type calculated; value $internalField; } Outlet { type fixedMean; meanValue 0; value uniform 0; } } // ************************************************************************* // Code:
/** C++ **\  =========    \\ / F ield  OpenFOAM: The Open Source CFD Toolbox   \\ / O peration  Version: 2.2.0   \\ / A nd  Web: www.OpenFOAM.org   \\/ M anipulation   \**/ FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 2 0 0 0 0]; internalField uniform 0; boundaryField { Wall { type fixedFluxPressure; rho rhok; value $internalField; } Inlet { type fixedFluxPressure; rho rhok; value $internalField; } Outlet { type fixedMean; meanValue 0; value uniform 0; } } // ************************************************************************* // Code:
p = p_rgh+(HcoordsY)*9.81*1.225 where H is the pipe height, 9.81 is gravity and 1.225 is air density My qestion is: why the original p calculations went so wrong? Is there a mistake in the BC? I've also tried to run calculations without p file in 0 folder. But in next iterations such file was created with incorect pressure field. Please, help me 

July 4, 2013, 06:30 

#2 
Senior Member

Dear Gimlas,
buoyantBoussinesqSimpleFoam is an incompressible solver, meaning that it solves for kinematic pressure, in this case corrected for hydrostatic pressure. This means that the actual pressure value is irrelevant, it is only the gradient that needs to be correct. If you compare your calculated p with the p from buoyantBoussinesqSimpleFoam you see the same gradient, except the calculated one has a density factor for the hydrostatic part, which should not be there, since p_rgh is in fact the kinematic pressure (p_rgh/rho). So you can subtract any value from p in paraview to make sure it is zero at the outlet, or equivalently move you outlet to z=0 and rerun the simulation. The gradient should not be different. Regards, Tom 

July 4, 2013, 07:39 

#3 
New Member
Join Date: Nov 2011
Posts: 20
Rep Power: 6 
Dear tomf,
Of course you're right with the density in the calculated pressure. All calculations are based on the kinematic pressure (m^2/s^2) therefore the correct equation is p_calc = p_rgh+(HcoordsY)*g. But I'm not sure if I understand you correctly: in order to receive both p and p_rgh pressures equal to 0 I would have to move the whole domain towards Y axis (vertical one) in order to place the outlet patch at 0 m? If yes, is there an another way to achieve that changing BCs or solution settings? I've tried to change the pressure reference point but it didn't work. 

July 4, 2013, 07:53 

#4 
Senior Member

Well you can just add any pressure value to the p or p_rgh value, it does not matter for the solution of your problem (the flow or temperature will not change). This is because only the pressure gradient is important, not it's actual value.
In this case the difference between the pressure p and p_rgh at the outlet is only a consequence of the ycoordinate of your outlet, following your formula. The reference point for the pressure is only used in case of a closed domain (no inlet or outlet), so it makes sense that nothing changed there. Hope this clarifies my point. Tom 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
Recorded Pressure Issue  Benjikos  FLUENT  0  November 30, 2010 11:06 
single phase hydrostatic pressure problem  erkan  FLUENT  1  March 1, 2010 13:29 
Does star cd takes reference pressure?  monica  CDadapco  1  April 19, 2007 11:26 
Gas pressure question  Dan Moskal  Main CFD Forum  0  October 24, 2002 22:02 
Hydrostatic pressure in 2phase flow modeling (CFX4.2)  HB &DS  CFX  0  January 9, 2000 14:19 