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

Total pressure problem

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

Reply
 
LinkBack Thread Tools Display Modes
Old   July 28, 2006, 03:26
Default I looked into the code of tota
  #1
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 8
tangd is on a distinguished road
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.0-pos(phip))*magSqr(Up)));

or

operator==(p0_-0.5*(1.0-pos(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!
tangd is offline   Reply With Quote

Old   July 28, 2006, 11:37
Default I don't have time to reseach a
  #2
New Member
 
Javier Ros
Join Date: Mar 2009
Posts: 8
Rep Power: 8
jros is on a distinguished road
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
jros is offline   Reply With Quote

Old   August 3, 2006, 01:45
Default Thank you for your help. For t
  #3
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 8
tangd is on a distinguished road
Thank you for your help. For the total pressure equation:

operator==(p0_/(1.0+0.5*psi*(1.0-pos(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!
tangd is offline   Reply With Quote

Old   August 3, 2006, 04:01
Default pos(somthing) is equal to 1 if
  #4
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 12
eugene is on a distinguished road
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!)
eugene is offline   Reply With Quote

Old   August 3, 2006, 04:28
Default Thanks for your quick reply. B
  #5
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 8
tangd is on a distinguished road
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!
tangd is offline   Reply With Quote

Old   August 3, 2006, 06:12
Default Firstly, the totalPressure bou
  #6
Senior Member
 
Eugene de Villiers
Join Date: Mar 2009
Posts: 725
Rep Power: 12
eugene is on a distinguished road
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, (1-pos(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=p0-0.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.
eugene is offline   Reply With Quote

Old   August 3, 2006, 06:51
Default Hallo Eugene, Thanks! But I
  #7
Member
 
Dihao Tang
Join Date: Mar 2009
Posts: 78
Rep Power: 8
tangd is on a distinguished road
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/(gamma-1))

So if we replace T0 with the first equation, we get

p0 = p*(1+magSqr(Up)/(2*T*Cp))^(gamma/(gamma-1))

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!
tangd is offline   Reply With Quote

Old   June 2, 2009, 17:01
Default totalPressure BC - use of pos(phip)
  #8
New Member
 
Suraj Deshpande
Join Date: Mar 2009
Location: Madison, WI, USA
Posts: 18
Rep Power: 8
suraj is on a distinguished road
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
suraj 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
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 CD-adapco 1 April 17, 2003 05:31
Total pressure etc. Maxim Olshanskii Main CFD Forum 2 May 1, 2000 15:58


All times are GMT -4. The time now is 17:48.