
[Sponsors] 
July 28, 2006, 03:26 
I looked into the code of tota

#1 
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 9 
I looked into the code of totalPressure and guess that the equation for total pressure is only applied to incompressible fluid flow. The equation I copied from totalPressureFvPatchScalarField.C is:
operator==(p0_/(1.0+0.5*psi*(1.0pos(phip))*magSqr(Up))); or operator==(p0_0.5*(1.0pos(phip))*magSqr(Up)); That could be part of the reason why my simulation with sonicTurbFoam failed. So I think when using compressible solvers, atmosphere boundary type could not be used. Is my conclusion correct? In my opinion, the corresponding total pressure equation for compressible flow should be derived from second law and the enthalpy equation dh = cp(T)dT, if Cp is not constant. So the mathematical expression for ptot should be more complicated. Maybe I'm wrong, but I want to confirm this information. Thanks! 

July 28, 2006, 11:37 
I don't have time to reseach a

#2 
New Member
Javier Ros
Join Date: Mar 2009
Posts: 8
Rep Power: 9 
I don't have time to reseach about this subject.
I've revieved Frank M. Wite fluid mechanics text book, and yes. The bernouilli equation p/rho + 1/2 u_i*u_i + g *z =const Is only valid for stationary and incompresible fluids. In that text, equation 3.62 (mine is spanish version), is the one that is integrated to obtain the previous one. The asumptions of incompresibility and stationarity are take in order to make the integral. May you can use refered eq 3.62 an add your own asumptions to make the integrall correct for your pourposes. Nevertheless if density does not varies at the outlet and outlet is stationary (aproximatelly) may be the bernouilli equation with stationary and incompresibility asumptions can still be applied. I hope this helps Javier 

August 3, 2006, 01:45 
Thank you for your help. For t

#3 
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 9 
Thank you for your help. For the total pressure equation:
operator==(p0_/(1.0+0.5*psi*(1.0pos(phip))*magSqr(Up))); What is psi here, and what does the function pos() mean? I looked into the code, and phip is surface flux, isn't it? Why does the equation need surface flux? Thanks! 

August 3, 2006, 04:01 
pos(somthing) is equal to 1 if

#4 
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 13 
pos(somthing) is equal to 1 if something is positive and eqaul to 0 is something is not positive.
"psi" is the compressibility, i.e. rho/p. (Of course thats not how its calculated!) 

August 3, 2006, 04:28 
Thanks for your quick reply. B

#5 
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 9 
Thanks for your quick reply. But can you please answer me further why pos(..) is used here for the total Pressure? Since this total pressure equation is for incompressible fluid flow, I want to implement the new equation for compressible case. In my new equation, do I also need to use this pos function? Thanks again!


August 3, 2006, 06:12 
Firstly, the totalPressure bou

#6 
Senior Member
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 13 
Firstly, the totalPressure boundary condition is valid for both compressible and incompressible flows. If the "psi" variable is present, the flow is compressible, if not incompressible.
If phi is positive, the flow is outward and the total pressure is applied, (1pos(phi))=0, i.e. p=p0. If phi is negative, pos(phi)=0, the flow is inward and the pressure boundary is given by: p=p00.5*U^2. Whether you need to use pos or not depends on the reason it was used in the first place. Unfortunately, this is something I cannot comment on. 

August 3, 2006, 06:51 
Hallo Eugene,
Thanks! But I

#7 
Member
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 9 
Hallo Eugene,
Thanks! But I still doubt that the current totalPressure is only valid for incompressible flow. I have checked the equation of total pressure. If the Cp is constant, then the equation for total temperature(T0) holds: T0 = T + magSqr(Up)/(2*Cp) The total pressure equation for compressible flow should be(see Anderson's book Modern Compressible Flow with Historical Perspective page 59): p0 = p*(T0/T)^(gamma/(gamma1)) So if we replace T0 with the first equation, we get p0 = p*(1+magSqr(Up)/(2*T*Cp))^(gamma/(gamma1)) I cannot convert the equation used in OpenFoam into the above one. Sorry, if I made any possible mistake, please correct me. Thank you so much! 

June 2, 2009, 17:01 
totalPressure BC  use of pos(phip)

#8 
New Member
Suraj Deshpande
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 17
Rep Power: 9 
Hello All,
I am looking at totalPressure BC. I came across this statement: operator==(p0_  0.5*rho*(1.0  pos(phip))*magSqr(Up)) What I do not really understand is the purpose of having: 1.0  pos(phip) It would be good if somebody could explain the origins of this term. Thanks, Suraj 

Thread Tools  
Display Modes  


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
BuoyantFoam and total pressure bc problem is a bug  ariorus  OpenFOAM Bugs  3  January 28, 2008 05:20 
total pressure problem  Ermanno  CFX  5  February 19, 2007 18:16 
total pressure in CFX  Atit Koonsrisuk  CFX  0  January 1, 2005 06:46 
Total pressure to static pressure ratio  roadracer  CDadapco  1  April 17, 2003 05:31 
Total pressure etc.  Maxim Olshanskii  Main CFD Forum  2  May 1, 2000 15:58 