From d0d6ef505e6cbd3415e49b0f82e54cfc0108534b Mon Sep 17 00:00:00 2001 From: Henry <Henry> Date: Thu, 1 Nov 2012 13:17:02 +0000 Subject: [PATCH] thermophysicalModels/specie/thermo/thermo/thermoI.H: Reverting change to filter K based on the nMoles --- .../specie/thermo/thermo/thermoI.H | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/src/thermophysicalModels/specie/thermo/thermo/thermoI.H b/src/thermophysicalModels/specie/thermo/thermo/thermoI.H index 27bb855c438..ab19475edab 100644 --- a/src/thermophysicalModels/specie/thermo/thermo/thermoI.H +++ b/src/thermophysicalModels/specie/thermo/thermo/thermoI.H @@ -298,22 +298,15 @@ template<class Thermo, template<class> class Type> inline Foam::scalar Foam::species::thermo<Thermo, Type>::K(const scalar p, const scalar T) const { - if (equal(this->nMoles(), SMALL)) + scalar arg = -this->nMoles()*this->g(p, T)/(this->RR*T); + + if (arg < 600.0) { - return 1.0; + return exp(arg); } else { - scalar arg = -this->nMoles()*this->g(p, T)/(this->RR*T); - - if (arg < 600.0) - { - return exp(arg); - } - else - { - return VGREAT; - } + return VGREAT; } } -- GitLab