diff --git a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C index c65d8618f1..875e42683e 100644 --- a/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C +++ b/applications/solvers/compressible/rhoCentralFoam/BCs/U/maxwellSlipUFvPatchVectorField.C @@ -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); } diff --git a/src/thermophysicalModels/specie/thermo/thermo/thermoI.H b/src/thermophysicalModels/specie/thermo/thermo/thermoI.H index b8642e960b..21a58ec779 100644 --- a/src/thermophysicalModels/specie/thermo/thermo/thermoI.H +++ b/src/thermophysicalModels/specie/thermo/thermo/thermoI.H @@ -298,15 +298,22 @@ template class Type> inline Foam::scalar Foam::species::thermo::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; + } } }