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

interPhaseChangeFoam: sqrt(negativeValue) in SchnerrSauer

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 16, 2010, 10:03
Default interPhaseChangeFoam: sqrt(negativeValue) in SchnerrSauer
  #1
Member
 
David Hora
Join Date: Mar 2009
Location: Zürich, Switzerland
Posts: 63
Rep Power: 17
david is on a distinguished road
Hi everybody

A negative saturation pressure can cause a floating point exception in the following function:

Foam:haseChangeTwoPhaseMixtures::SchnerrSauer: Coeff
(
const volScalarField& p
) const
{
volScalarField limitedAlpha1 = min(max(alpha1_, scalar(0)), scalar(1));
volScalarField rho =
(limitedAlpha1*rho1() + (scalar(1) - limitedAlpha1)*rho2());


return
(3*rho1()*rho2())*sqrt(2/(3*rho1()))
*rRb(limitedAlpha1)/(rho*sqrt(mag(p - pSat()) + 0.01*pSat()));
}

The problem occured in 'sqrt(mag(p - pSat()) + 0.01*pSat())' when I tried to reduce the saturation pressure stepwise from an initial solution without cavitation. I know that a simple solution would be to use a higher pressure level but that's not really satisfying in my opininion. Does anybody know more about the term 0.01*pSat? I found some papers (not the referenced one) but this term is never mentioned.

Regards
David
david is offline   Reply With Quote

Old   November 17, 2010, 03:51
Default
  #2
Member
 
David Hora
Join Date: Mar 2009
Location: Zürich, Switzerland
Posts: 63
Rep Power: 17
david is on a distinguished road
I use

return
(3*rho1()*rho2())*sqrt(2/(3*rho1()))
*rRb(limitedAlpha1)/(rho*sqrt(max(mag(p - pSat()),dimensionedScalar("p",dimensionSet(1,-1,-2,0,0,0,0),VSMALL))));

as intermediate solution. Any comment is very appreciated.

Regards
David
david is offline   Reply With Quote

Old   February 20, 2014, 07:57
Default hi
  #3
Senior Member
 
Baris (Heewa)
Join Date: Jan 2013
Location: Japan
Posts: 130
Rep Power: 13
shipman is on a distinguished road
Quote:
Originally Posted by david View Post
I use

return
(3*rho1()*rho2())*sqrt(2/(3*rho1()))
*rRb(limitedAlpha1)/(rho*sqrt(max(mag(p - pSat()),dimensionedScalar("p",dimensionSet(1,-1,-2,0,0,0,0),VSMALL))));

as intermediate solution. Any comment is very appreciated.

Regards
David
Hi Dear David,

Maybe it is a bit late but for few months i started to interested indeed with openfoam and try to make cavitation simulation in nozzle by using interphasechangeFoam. I have faced same problem too. Could you tell me that what is the meaning of mag(p - pSat()) + 0.01*pSat()) ???

i hope that you already got answer about it and your help will be very appreciated.

Best Regards...
shipman 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
Bug about MULES::implicitSolve for interPhaseChangeFoam in OF-1.6 chiven OpenFOAM Bugs 18 April 18, 2013 22:56
interFoam vs interPhaseChangeFoam? phsieh2005 OpenFOAM Running, Solving & CFD 5 April 8, 2013 11:47
Source terms for alpha1 Equation for temeprature based interPhaseChangeFoam ovie OpenFOAM 1 February 8, 2010 20:15
MULES in interPhaseChangeFoam isabel OpenFOAM 0 July 16, 2009 07:06
gammaEqn.H in the interPhaseChangeFoam solver isabel OpenFOAM 2 July 7, 2009 13:41


All times are GMT -4. The time now is 09:53.