diff --git a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H index 6952edc423..fd3071ff11 100644 --- a/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H +++ b/src/thermophysicalModels/basic/psiThermo/ePsiThermo/ePsiThermo.H @@ -87,13 +87,13 @@ public: // Member functions - //- Return the compostion of the combustion mixture + //- Return the compostion of the mixture virtual basicMixture& composition() { return *this; } - //- Return the compostion of the combustion mixture + //- Return the compostion of the mixture virtual const basicMixture& composition() const { return *this; diff --git a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H b/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H index c1d9b513a3..4eae7214a0 100644 --- a/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H +++ b/src/thermophysicalModels/basic/psiThermo/hPsiThermo/hPsiThermo.H @@ -87,13 +87,13 @@ public: // Member functions - //- Return the compostion of the combustion mixture + //- Return the compostion of the mixture virtual basicMixture& composition() { return *this; } - //- Return the compostion of the combustion mixture + //- Return the compostion of the mixture virtual const basicMixture& composition() const { return *this; diff --git a/src/thermophysicalModels/thermophysicalFunctions/APIfunctions/APIdiffCoefFunc/APIdiffCoefFunc.H b/src/thermophysicalModels/thermophysicalFunctions/APIfunctions/APIdiffCoefFunc/APIdiffCoefFunc.H index b24d250d49..7f95e450e3 100644 --- a/src/thermophysicalModels/thermophysicalFunctions/APIfunctions/APIdiffCoefFunc/APIdiffCoefFunc.H +++ b/src/thermophysicalModels/thermophysicalFunctions/APIfunctions/APIdiffCoefFunc/APIdiffCoefFunc.H @@ -47,7 +47,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class APIdiffCoefFunc Declaration + Class APIdiffCoefFunc Declaration \*---------------------------------------------------------------------------*/ class APIdiffCoefFunc @@ -59,6 +59,9 @@ class APIdiffCoefFunc // API vapour mass diffusivity function coefficients scalar a_, b_, wf_, wa_; + // Helper variables + scalar alpha_, beta_; + public: @@ -74,7 +77,9 @@ public: a_(a), b_(b), wf_(wf), - wa_(wa) + wa_(wa), + alpha_(sqrt(1/wf_ + 1/wa_)), + beta_(sqr((cbrt(a_) + cbrt(b_)))) {} //- Construct from Istream @@ -83,21 +88,21 @@ public: a_(readScalar(is)), b_(readScalar(is)), wf_(readScalar(is)), - wa_(readScalar(is)) + wa_(readScalar(is)), + alpha_(sqrt(1/wf_ + 1/wa_)), + beta_(sqr((cbrt(a_) + cbrt(b_)))) {} // Member Functions - //- API vapour mass diffusivity function + //- API vapour mass diffusivity function using properties from + // construction scalar f(scalar p, scalar T) const { - return - 3.6059e-3*(pow(1.8*T, 1.75))*sqrt(1/wf_ + 1/wa_) - /(p*sqr((cbrt(a_) + cbrt(b_)))); + return 3.6059e-3*(pow(1.8*T, 1.75))*alpha_/(p*beta_); } - //- Write the function coefficients void writeData(Ostream& os) const {