Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev

This commit is contained in:
mattijs
2012-10-05 11:14:09 +01:00
2 changed files with 15 additions and 10 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
\\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -195,10 +195,8 @@ void maxwellSlipUFvPatchVectorField::write(Ostream& os) const
<< thermalCreep_ << token::END_STATEMENT << nl;
os.writeKeyword("curvature") << curvature_ << token::END_STATEMENT << nl;
os.writeKeyword("refValue")
<< refValue() << token::END_STATEMENT << nl;
os.writeKeyword("valueFraction")
<< valueFraction() << token::END_STATEMENT << nl;
refValue().writeEntry("refValue", os);
valueFraction().writeEntry("valueFraction", os);
writeEntry("value", os);
}

View File

@ -298,15 +298,22 @@ template<class Thermo, template<class> class Type>
inline Foam::scalar
Foam::species::thermo<Thermo, Type>::K(const scalar p, const scalar T) const
{
scalar arg = -this->nMoles()*this->g(p, T)/(this->RR*T);
if (arg < 600.0)
if (equal(this->nMoles(), SMALL))
{
return ::exp(arg);
return 1.0;
}
else
{
return VGREAT;
scalar arg = -this->nMoles()*this->g(p, T)/(this->RR*T);
if (arg < 600.0)
{
return exp(arg);
}
else
{
return VGREAT;
}
}
}