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

View File

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