From a732cb54d91fa707c9f4e3a934ef696c237d69d8 Mon Sep 17 00:00:00 2001 From: andy Date: Mon, 18 Oct 2010 13:03:44 +0100 Subject: [PATCH] STYLE: Updated poly thermo naming conventions --- .../icoPolynomial/icoPolynomial.C | 15 +- .../icoPolynomial/icoPolynomial.H | 4 +- .../icoPolynomial/icoPolynomialI.H | 22 +-- .../thermo/hPolynomial/hPolynomialThermo.C | 39 ++-- .../thermo/hPolynomial/hPolynomialThermo.H | 19 +- .../thermo/hPolynomial/hPolynomialThermoI.H | 66 +++---- .../polynomial/polynomialTransport.C | 32 ++-- .../polynomial/polynomialTransport.H | 8 +- .../polynomial/polynomialTransportI.H | 44 ++--- .../filter/constant/thermo.incompressiblePoly | 32 ++-- .../constant/thermo.incompressiblePoly | 32 ++-- .../constant/thermo.incompressiblePoly | 173 ++++-------------- 12 files changed, 194 insertions(+), 292 deletions(-) diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C index 180ef6a76a..5935b10102 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.C @@ -37,9 +37,9 @@ template icoPolynomial::icoPolynomial(Istream& is) : specie(is), - rhoPolynomial_("rhoPolynomial", is) + rhoCoeffs_("rhoCoeffs<" + Foam::name(PolySize) + '>', is) { - rhoPolynomial_ *= this->W(); + rhoCoeffs_ *= this->W(); } @@ -47,9 +47,9 @@ template icoPolynomial::icoPolynomial(const dictionary& dict) : specie(dict), - rhoPolynomial_(dict.lookup("rhoPolynomial")) + rhoCoeffs_(dict.lookup("rhoCoeffs<" + Foam::name(PolySize) + '>')) { - rhoPolynomial_ *= this->W(); + rhoCoeffs_ *= this->W(); } @@ -59,8 +59,8 @@ template void icoPolynomial::write(Ostream& os) const { specie::write(os); - os.writeKeyword("rhoPolynomial") << rhoPolynomial_/this->W() - << token::END_STATEMENT << nl; + os.writeKeyword(word("rhoCoeffs<" + Foam::name(PolySize) + '>')) + << rhoCoeffs_/this->W() << token::END_STATEMENT << nl; } @@ -70,7 +70,8 @@ template Ostream& operator<<(Ostream& os, const icoPolynomial& ip) { os << static_cast(ip) << tab - << "rhoPolynomial" << tab << ip.rhoPolynomial_/ip.W(); + << "rhoCoeffs<" << Foam::name(PolySize) << '>' << tab + << ip.rhoCoeffs_/ip.W(); os.check ( diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H index f178a67256..894bdae3ad 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomial.H @@ -98,9 +98,9 @@ class icoPolynomial { // Private data - //- Density + //- Density polynomial coefficients // Note: input in [kg/m3], but internally uses [kg/m3/kmol] - Polynomial rhoPolynomial_; + Polynomial rhoCoeffs_; public: diff --git a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H index 5f75c1c4b3..f1eeacef9e 100644 --- a/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H +++ b/src/thermophysicalModels/specie/equationOfState/icoPolynomial/icoPolynomialI.H @@ -31,11 +31,11 @@ template inline Foam::icoPolynomial::icoPolynomial ( const specie& sp, - const Polynomial& rhoPoly + const Polynomial& rhoCoeffs ) : specie(sp), - rhoPolynomial_(rhoPoly) + rhoCoeffs_(rhoCoeffs) {} @@ -48,7 +48,7 @@ inline Foam::icoPolynomial::icoPolynomial ) : specie(ip), - rhoPolynomial_(ip.rhoPolynomial_) + rhoCoeffs_(ip.rhoCoeffs_) {} @@ -60,7 +60,7 @@ inline Foam::icoPolynomial::icoPolynomial ) : specie(name, ip), - rhoPolynomial_(ip.rhoPolynomial_) + rhoCoeffs_(ip.rhoCoeffs_) {} @@ -99,7 +99,7 @@ Foam::icoPolynomial::New(const dictionary& dict) template inline Foam::scalar Foam::icoPolynomial::rho(scalar, scalar T) const { - return rhoPolynomial_.evaluate(T)/this->W(); + return rhoCoeffs_.evaluate(T)/this->W(); } @@ -127,7 +127,7 @@ inline Foam::icoPolynomial& Foam::icoPolynomial::operator= { specie::operator=(ip); - rhoPolynomial_ = ip.rhoPolynomial_; + rhoCoeffs_ = ip.rhoCoeffs_; return *this; } @@ -146,7 +146,7 @@ inline void Foam::icoPolynomial::operator+= molr1 /= this->nMoles(); scalar molr2 = ip.nMoles()/this->nMoles(); - rhoPolynomial_ = molr1*rhoPolynomial_ + molr2*ip.rhoPolynomial_; + rhoCoeffs_ = molr1*rhoCoeffs_ + molr2*ip.rhoCoeffs_; } @@ -163,7 +163,7 @@ inline void Foam::icoPolynomial::operator-= molr1 /= this->nMoles(); scalar molr2 = ip.nMoles()/this->nMoles(); - rhoPolynomial_ = molr1*rhoPolynomial_ - molr2*ip.rhoPolynomial_; + rhoCoeffs_ = molr1*rhoCoeffs_ - molr2*ip.rhoCoeffs_; } @@ -191,7 +191,7 @@ Foam::icoPolynomial Foam::operator+ ( static_cast(ip1) + static_cast(ip2), - molr1*ip1.rhoPolynomial_ + molr2*ip2.rhoPolynomial_ + molr1*ip1.rhoCoeffs_ + molr2*ip2.rhoCoeffs_ ); } @@ -211,7 +211,7 @@ Foam::icoPolynomial Foam::operator- ( static_cast(ip1) - static_cast(ip2), - molr1*ip1.rhoPolynomial_ - molr2*ip2.rhoPolynomial_ + molr1*ip1.rhoCoeffs_ - molr2*ip2.rhoCoeffs_ ); } @@ -226,7 +226,7 @@ Foam::icoPolynomial Foam::operator* return icoPolynomial ( s*static_cast(ip), - ip.rhoPolynomial_ + ip.rhoCoeffs_ ); } diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C index dca99a5a61..1b04a9d47c 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.C @@ -37,22 +37,22 @@ Foam::hPolynomialThermo::hPolynomialThermo EquationOfState(is), Hf_(readScalar(is)), Sf_(readScalar(is)), - cpPolynomial_("cpPolynomial", is), - hPolynomial_(), - sPolynomial_() + CpCoeffs_("CpCoeffs<" + Foam::name(PolySize) + '>', is), + hCoeffs_(), + sCoeffs_() { Hf_ *= this->W(); Sf_ *= this->W(); - cpPolynomial_ *= this->W(); + CpCoeffs_ *= this->W(); - hPolynomial_ = cpPolynomial_.integrate(); - sPolynomial_ = cpPolynomial_.integrateMinus1(); + hCoeffs_ = CpCoeffs_.integrate(); + sCoeffs_ = CpCoeffs_.integrateMinus1(); // Offset h poly so that it is relative to the enthalpy at Tstd - hPolynomial_[0] += Hf_ - hPolynomial_.evaluate(specie::Tstd); + hCoeffs_[0] += Hf_ - hCoeffs_.evaluate(specie::Tstd); // Offset s poly so that it is relative to the entropy at Tstd - sPolynomial_[0] += Sf_ - sPolynomial_.evaluate(specie::Tstd); + sCoeffs_[0] += Sf_ - sCoeffs_.evaluate(specie::Tstd); } @@ -65,22 +65,22 @@ Foam::hPolynomialThermo::hPolynomialThermo EquationOfState(dict), Hf_(readScalar(dict.lookup("Hf"))), Sf_(readScalar(dict.lookup("Sf"))), - cpPolynomial_(dict.lookup("cpPolynomial")), - hPolynomial_(), - sPolynomial_() + CpCoeffs_(dict.lookup("CpCoeffs<" + Foam::name(PolySize) + '>')), + hCoeffs_(), + sCoeffs_() { Hf_ *= this->W(); Sf_ *= this->W(); - cpPolynomial_ *= this->W(); + CpCoeffs_ *= this->W(); - hPolynomial_ = cpPolynomial_.integrate(); - sPolynomial_ = cpPolynomial_.integrateMinus1(); + hCoeffs_ = CpCoeffs_.integrate(); + sCoeffs_ = CpCoeffs_.integrateMinus1(); // Offset h poly so that it is relative to the enthalpy at Tstd - hPolynomial_[0] += Hf_ - hPolynomial_.evaluate(specie::Tstd); + hCoeffs_[0] += Hf_ - hCoeffs_.evaluate(specie::Tstd); // Offset s poly so that it is relative to the entropy at Tstd - sPolynomial_[0] += Sf_ - sPolynomial_.evaluate(specie::Tstd); + sCoeffs_[0] += Sf_ - sCoeffs_.evaluate(specie::Tstd); } @@ -95,8 +95,8 @@ void Foam::hPolynomialThermo::write EquationOfState::write(os); os.writeKeyword("Hf") << Hf_/this->W() << token::END_STATEMENT << nl; os.writeKeyword("Sf") << Sf_/this->W() << token::END_STATEMENT << nl; - os.writeKeyword("cpPolynomial") << cpPolynomial_/this->W() - << token::END_STATEMENT << nl; + os.writeKeyword(word("CpCoeffs<" + Foam::name(PolySize) + '>')) + << CpCoeffs_/this->W() << token::END_STATEMENT << nl; } @@ -112,7 +112,8 @@ Foam::Ostream& Foam::operator<< os << static_cast(pt) << tab << pt.Hf_/pt.W() << tab << pt.Sf_/pt.W() << tab - << "cpPolynomial" << tab << pt.cpPolynomial_/pt.W(); + << "CpCoeffs<" << Foam::name(PolySize) << '>' << tab + << pt.CpCoeffs_/pt.W(); os.check ( diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H index 76ba5b0c32..557aebb877 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermo.H @@ -107,14 +107,15 @@ class hPolynomialThermo // Note: input in [J/kg/K], but internally uses [J/kmol/K] scalar Sf_; - //- Specific heat at constant pressure [J/(kg.K)] - Polynomial cpPolynomial_; + //- Specific heat at constant pressure polynomial coeffs [J/(kg.K)] + Polynomial CpCoeffs_; - //- Enthalpy - derived from cp [J/kg] - relative to Tstd - typename Polynomial::intPolyType hPolynomial_; + //- Enthalpy polynomial coeffs - derived from cp [J/kg] + // NOTE: relative to Tstd + typename Polynomial::intPolyType hCoeffs_; - //- Entropy - derived from cp [J/(kg.K)] - relative to Tstd - Polynomial sPolynomial_; + //- Entropy - derived from Cp [J/(kg.K)] - relative to Tstd + Polynomial sCoeffs_; // Private Member Functions @@ -125,9 +126,9 @@ class hPolynomialThermo const EquationOfState& pt, const scalar Hf, const scalar Sf, - const Polynomial& cpPoly, - const typename Polynomial::intPolyType& hPoly, - const Polynomial& sPoly + const Polynomial& CpCoeffs, + const typename Polynomial::intPolyType& hCoeffs, + const Polynomial& sCoeffs ); diff --git a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H index b16ed5d0a6..1576c646d0 100644 --- a/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H +++ b/src/thermophysicalModels/specie/thermo/hPolynomial/hPolynomialThermoI.H @@ -33,17 +33,17 @@ inline Foam::hPolynomialThermo::hPolynomialThermo const EquationOfState& pt, const scalar Hf, const scalar Sf, - const Polynomial& cpPoly, - const typename Polynomial::intPolyType& hPoly, - const Polynomial& sPoly + const Polynomial& CpCoeffs, + const typename Polynomial::intPolyType& hCoeffs, + const Polynomial& sCoeffs ) : EquationOfState(pt), Hf_(Hf), Sf_(Sf), - cpPolynomial_(cpPoly), - hPolynomial_(hPoly), - sPolynomial_(sPoly) + CpCoeffs_(CpCoeffs), + hCoeffs_(hCoeffs), + sCoeffs_(sCoeffs) {} @@ -58,9 +58,9 @@ inline Foam::hPolynomialThermo::hPolynomialThermo EquationOfState(pt), Hf_(pt.Hf_), Sf_(pt.Sf_), - cpPolynomial_(pt.cpPolynomial_), - hPolynomial_(pt.hPolynomial_), - sPolynomial_(pt.sPolynomial_) + CpCoeffs_(pt.CpCoeffs_), + hCoeffs_(pt.hCoeffs_), + sCoeffs_(pt.sCoeffs_) {} @@ -74,9 +74,9 @@ inline Foam::hPolynomialThermo::hPolynomialThermo EquationOfState(name, pt), Hf_(pt.Hf_), Sf_(pt.Sf_), - cpPolynomial_(pt.cpPolynomial_), - hPolynomial_(pt.hPolynomial_), - sPolynomial_(pt.sPolynomial_) + CpCoeffs_(pt.CpCoeffs_), + hCoeffs_(pt.hCoeffs_), + sCoeffs_(pt.sCoeffs_) {} @@ -88,7 +88,7 @@ inline Foam::scalar Foam::hPolynomialThermo::cp const scalar T ) const { - return cpPolynomial_.evaluate(T); + return CpCoeffs_.evaluate(T); } @@ -98,7 +98,7 @@ inline Foam::scalar Foam::hPolynomialThermo::h const scalar T ) const { - return hPolynomial_.evaluate(T); + return hCoeffs_.evaluate(T); } @@ -126,7 +126,7 @@ inline Foam::scalar Foam::hPolynomialThermo::s const scalar T ) const { - return sPolynomial_.evaluate(T); + return sCoeffs_.evaluate(T); } @@ -143,9 +143,9 @@ Foam::hPolynomialThermo::operator= Hf_ = pt.Hf_; Sf_ = pt.Sf_; - cpPolynomial_ = pt.cpPolynomial_; - hPolynomial_ = pt.hPolynomial_; - sPolynomial_ = pt.sPolynomial_; + CpCoeffs_ = pt.CpCoeffs_; + hCoeffs_ = pt.hCoeffs_; + sCoeffs_ = pt.sCoeffs_; return *this; } @@ -166,9 +166,9 @@ inline void Foam::hPolynomialThermo::operator+= Hf_ = molr1*Hf_ + molr2*pt.Hf_; Sf_ = molr1*Sf_ + molr2*pt.Sf_; - cpPolynomial_ = molr1*cpPolynomial_ + molr2*pt.cpPolynomial_; - hPolynomial_ = molr1*hPolynomial_ + molr2*pt.hPolynomial_; - sPolynomial_ = molr1*sPolynomial_ + molr2*pt.sPolynomial_; + CpCoeffs_ = molr1*CpCoeffs_ + molr2*pt.CpCoeffs_; + hCoeffs_ = molr1*hCoeffs_ + molr2*pt.hCoeffs_; + sCoeffs_ = molr1*sCoeffs_ + molr2*pt.sCoeffs_; } @@ -187,9 +187,9 @@ inline void Foam::hPolynomialThermo::operator-= Hf_ = molr1*Hf_ - molr2*pt.Hf_; Sf_ = molr1*Sf_ - molr2*pt.Sf_; - cpPolynomial_ = molr1*cpPolynomial_ - molr2*pt.cpPolynomial_; - hPolynomial_ = molr1*hPolynomial_ - molr2*pt.hPolynomial_; - sPolynomial_ = molr1*sPolynomial_ - molr2*pt.sPolynomial_; + CpCoeffs_ = molr1*CpCoeffs_ - molr2*pt.CpCoeffs_; + hCoeffs_ = molr1*hCoeffs_ - molr2*pt.hCoeffs_; + sCoeffs_ = molr1*sCoeffs_ - molr2*pt.sCoeffs_; } @@ -223,9 +223,9 @@ inline Foam::hPolynomialThermo Foam::operator+ eofs, molr1*pt1.Hf_ + molr2*pt2.Hf_, molr1*pt1.Sf_ + molr2*pt2.Sf_, - molr1*pt1.cpPolynomial_ + molr2*pt2.cpPolynomial_, - molr1*pt1.hPolynomial_ + molr2*pt2.hPolynomial_, - molr1*pt1.sPolynomial_ + molr2*pt2.sPolynomial_ + molr1*pt1.CpCoeffs_ + molr2*pt2.CpCoeffs_, + molr1*pt1.hCoeffs_ + molr2*pt2.hCoeffs_, + molr1*pt1.sCoeffs_ + molr2*pt2.sCoeffs_ ); } @@ -248,9 +248,9 @@ inline Foam::hPolynomialThermo Foam::operator- eofs, molr1*pt1.Hf_ - molr2*pt2.Hf_, molr1*pt1.Sf_ - molr2*pt2.Sf_, - molr1*pt1.cpPolynomial_ - molr2*pt2.cpPolynomial_, - molr1*pt1.hPolynomial_ - molr2*pt2.hPolynomial_, - molr1*pt1.sPolynomial_ - molr2*pt2.sPolynomial_ + molr1*pt1.CpCoeffs_ - molr2*pt2.CpCoeffs_, + molr1*pt1.hCoeffs_ - molr2*pt2.hCoeffs_, + molr1*pt1.sCoeffs_ - molr2*pt2.sCoeffs_ ); } @@ -267,9 +267,9 @@ inline Foam::hPolynomialThermo Foam::operator* s*static_cast(pt), pt.Hf_, pt.Sf_, - pt.cpPolynomial_, - pt.hPolynomial_, - pt.sPolynomial_ + pt.CpCoeffs_, + pt.hCoeffs_, + pt.sCoeffs_ ); } diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C index b71ccd3f57..99b3e1ebdf 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.C @@ -32,11 +32,11 @@ template Foam::polynomialTransport::polynomialTransport(Istream& is) : Thermo(is), - muPolynomial_("muPolynomial", is), - kappaPolynomial_("kappaPolynomial", is) + muCoeffs_("muCoeffs<" + Foam::name(PolySize) + '>', is), + kappaCoeffs_("kappaCoeffs<" + Foam::name(PolySize) + '>', is) { - muPolynomial_ *= this->W(); - kappaPolynomial_ *= this->W(); + muCoeffs_ *= this->W(); + kappaCoeffs_ *= this->W(); } @@ -47,11 +47,11 @@ Foam::polynomialTransport::polynomialTransport ) : Thermo(dict), - muPolynomial_(dict.lookup("muPolynomial")), - kappaPolynomial_(dict.lookup("kappaPolynomial")) + muCoeffs_(dict.lookup("muCoeffs<" + Foam::name(PolySize) + '>')), + kappaCoeffs_(dict.lookup("kappaCoeffs<" + Foam::name(PolySize) + '>')) { - muPolynomial_ *= this->W(); - kappaPolynomial_ *= this->W(); + muCoeffs_ *= this->W(); + kappaCoeffs_ *= this->W(); } @@ -63,11 +63,11 @@ void Foam::polynomialTransport::write(Ostream& os) const os << this->name() << endl; os << token::BEGIN_BLOCK << incrIndent << nl; Thermo::write(os); - os.writeKeyword("muPolynomial") << muPolynomial_/this->W() - << token::END_STATEMENT << nl; - os.writeKeyword("kappaPolynomial") << kappaPolynomial_/this->W() - << token::END_STATEMENT << nl; - os << decrIndent << token::END_BLOCK << nl; + os.writeKeyword(word("muCoeffs<" + Foam::name(PolySize) + '>')) + << muCoeffs_/this->W() << token::END_STATEMENT << nl; + os.writeKeyword(word("kappaCoeffs<" + Foam::name(PolySize) + '>')) + << kappaCoeffs_/this->W() << token::END_STATEMENT << nl; + os << decrIndent << token::END_BLOCK << nl; } @@ -81,8 +81,10 @@ Foam::Ostream& Foam::operator<< ) { os << static_cast(pt) << tab - << "muPolynomial" << tab << pt.muPolynomial_/pt.W() << tab - << "kappaPolynomial" << tab << pt.kappaPolynomial_/pt.W(); + << "muCoeffs<" << Foam::name(PolySize) << '>' << tab + << pt.muCoeffs_/pt.W() << tab + << "kappaCoeffs<" << Foam::name(PolySize) << '>' << tab + << pt.kappaCoeffs_/pt.W(); os.check ( diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H index bc42391a8d..014ad05d2d 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransport.H @@ -94,13 +94,13 @@ class polynomialTransport { // Private data - //- Dynamic viscosity + //- Dynamic viscosity polynomial coefficients // Note: input in [Pa.s], but internally uses [Pa.s/kmol] - Polynomial muPolynomial_; + Polynomial muCoeffs_; - //- Thermal conductivity + //- Thermal conductivity polynomial coefficients // Note: input in [W/m/K], but internally uses [W/m/K/kmol] - Polynomial kappaPolynomial_; + Polynomial kappaCoeffs_; // Private Member Functions diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H index a15720860e..52094247fb 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H @@ -34,8 +34,8 @@ inline Foam::polynomialTransport::polynomialTransport ) : Thermo(pt), - muPolynomial_(pt.muPolynomial_), - kappaPolynomial_(pt.kappaPolynomial_) + muCoeffs_(pt.muCoeffs_), + kappaCoeffs_(pt.kappaCoeffs_) {} @@ -43,13 +43,13 @@ template inline Foam::polynomialTransport::polynomialTransport ( const Thermo& t, - const Polynomial& muPoly, - const Polynomial& kappaPoly + const Polynomial& muCoeffs, + const Polynomial& kappaCoeffs ) : Thermo(t), - muPolynomial_(muPoly), - kappaPolynomial_(kappaPoly) + muCoeffs_(muCoeffs), + kappaCoeffs_(kappaCoeffs) {} @@ -61,8 +61,8 @@ inline Foam::polynomialTransport::polynomialTransport ) : Thermo(name, pt), - muPolynomial_(pt.muPolynomial_), - kappaPolynomial_(pt.kappaPolynomial_) + muCoeffs_(pt.muCoeffs_), + kappaCoeffs_(pt.kappaCoeffs_) {} @@ -107,7 +107,7 @@ inline Foam::scalar Foam::polynomialTransport::mu const scalar T ) const { - return muPolynomial_.evaluate(T)/this->W(); + return muCoeffs_.evaluate(T)/this->W(); } @@ -117,7 +117,7 @@ inline Foam::scalar Foam::polynomialTransport::kappa const scalar T ) const { - return kappaPolynomial_.evaluate(T)/this->W(); + return kappaCoeffs_.evaluate(T)/this->W(); } @@ -147,8 +147,8 @@ Foam::polynomialTransport::operator= { Thermo::operator=(pt); - muPolynomial_ = pt.muPolynomial_; - kappaPolynomial_ = pt.kappaPolynomial_; + muCoeffs_ = pt.muCoeffs_; + kappaCoeffs_ = pt.kappaCoeffs_; return *this; } @@ -167,8 +167,8 @@ inline void Foam::polynomialTransport::operator+= molr1 /= this->nMoles(); scalar molr2 = pt.nMoles()/this->nMoles(); - muPolynomial_ = molr1*muPolynomial_ + molr2*pt.muPolynomial_; - kappaPolynomial_ = molr1*kappaPolynomial_ + molr2*pt.kappaPolynomial_; + muCoeffs_ = molr1*muCoeffs_ + molr2*pt.muCoeffs_; + kappaCoeffs_ = molr1*kappaCoeffs_ + molr2*pt.kappaCoeffs_; } @@ -185,8 +185,8 @@ inline void Foam::polynomialTransport::operator-= molr1 /= this->nMoles(); scalar molr2 = pt.nMoles()/this->nMoles(); - muPolynomial_ = molr1*muPolynomial_ - molr2*pt.muPolynomial_; - kappaPolynomial_ = molr1*kappaPolynomial_ - molr2*pt.kappaPolynomial_; + muCoeffs_ = molr1*muCoeffs_ - molr2*pt.muCoeffs_; + kappaCoeffs_ = molr1*kappaCoeffs_ - molr2*pt.kappaCoeffs_; } @@ -220,8 +220,8 @@ inline Foam::polynomialTransport Foam::operator+ return polynomialTransport ( t, - molr1*pt1.muPolynomial_ + molr2*pt2.muPolynomial_, - molr1*pt1.kappaPolynomial_ + molr2*pt2.kappaPolynomial_ + molr1*pt1.muCoeffs_ + molr2*pt2.muCoeffs_, + molr1*pt1.kappaCoeffs_ + molr2*pt2.kappaCoeffs_ ); } @@ -244,8 +244,8 @@ inline Foam::polynomialTransport Foam::operator- return polynomialTransport ( t, - molr1*pt1.muPolynomial_ - molr2*pt2.muPolynomial_, - molr1*pt1.kappaPolynomial_ - molr2*pt2.kappaPolynomial_ + molr1*pt1.muCoeffs_ - molr2*pt2.muCoeffs_, + molr1*pt1.kappaCoeffs_ - molr2*pt2.kappaCoeffs_ ); } @@ -260,8 +260,8 @@ inline Foam::polynomialTransport Foam::operator* return polynomialTransport ( s*static_cast(pt), - pt.muPolynomial_, - pt.kappaPolynomial_ + pt.muCoeffs_, + pt.kappaCoeffs_ ); } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermo.incompressiblePoly b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermo.incompressiblePoly index 7dda21bd8b..6d54f2dccd 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermo.incompressiblePoly +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/constant/thermo.incompressiblePoly @@ -21,10 +21,10 @@ N2 molWeight 28.0134; Hf 0; Sf 0; - rhoPolynomial ( 3.8936 -0.016463 3.2101e-05 -2.9174e-08 9.9889e-12 0 0 0 ); - cpPolynomial ( 979.08 0.41787 -0.0011761 1.6742e-06 -7.2559e-10 0 0 0 ); - muPolynomial ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); - kappaPolynomial ( 0.0031494 8.4997e-05 -1.2621e-08 0 0 0 0 0 ); + rhoCoeffs<8> ( 3.8936 -0.016463 3.2101e-05 -2.9174e-08 9.9889e-12 0 0 0 ); + CpCoeffs<8> ( 979.08 0.41787 -0.0011761 1.6742e-06 -7.2559e-10 0 0 0 ); + muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0031494 8.4997e-05 -1.2621e-08 0 0 0 0 0 ); } O2 @@ -33,10 +33,10 @@ O2 molWeight 31.9988; Hf 0; Sf 0; - rhoPolynomial ( 4.4475 -0.018805 3.6667e-05 -3.3323e-08 1.141e-11 0 0 0 ); - cpPolynomial ( 834.84 0.29297 -0.00014959 3.4143e-07 -2.2786e-10 0 0 0 ); - muPolynomial ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); - kappaPolynomial ( 0.00016082 8.5301e-05 -1.4998e-08 0 0 0 0 0 ); + rhoCoeffs<8> ( 4.4475 -0.018805 3.6667e-05 -3.3323e-08 1.141e-11 0 0 0 ); + CpCoeffs<8> ( 834.84 0.29297 -0.00014959 3.4143e-07 -2.2786e-10 0 0 0 ); + muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.00016082 8.5301e-05 -1.4998e-08 0 0 0 0 0 ); } H2O @@ -45,10 +45,10 @@ H2O molWeight 18.0153; Hf -13423000; Sf 10482; - rhoPolynomial ( 2.5039 -0.010587 2.0643e-05 -1.8761e-08 6.4237e-12 0 0 0 ); - cpPolynomial ( 1563.1 1.604 -0.0029334 3.2168e-06 -1.1571e-09 0 0 0 ); - muPolynomial ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); - kappaPolynomial ( 0.0037972 0.00015336 -1.1859e-08 0 0 0 0 0 ); + rhoCoeffs<8> ( 2.5039 -0.010587 2.0643e-05 -1.8761e-08 6.4237e-12 0 0 0 ); + CpCoeffs<8> ( 1563.1 1.604 -0.0029334 3.2168e-06 -1.1571e-09 0 0 0 ); + muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0037972 0.00015336 -1.1859e-08 0 0 0 0 0 ); } air @@ -57,10 +57,10 @@ air molWeight 28.85; Hf 0; Sf 0; - rhoPolynomial ( 4.0097 -0.016954 3.3057e-05 -3.0042e-08 1.0286e-11 0 0 0 ); - cpPolynomial ( 948.76 0.39171 -0.00095999 1.393e-06 -6.2029e-10 0 0 0 ); - muPolynomial ( 1.5061e-06 6.16e-08 -1.819e-11 0 0 0 0 0 ); - kappaPolynomial ( 0.0025219 8.506e-05 -1.312e-08 0 0 0 0 0 ); + rhoCoeffs<8> ( 4.0097 -0.016954 3.3057e-05 -3.0042e-08 1.0286e-11 0 0 0 ); + CpCoeffs<8> ( 948.76 0.39171 -0.00095999 1.393e-06 -6.2029e-10 0 0 0 ); + muCoeffs<8> ( 1.5061e-06 6.16e-08 -1.819e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0025219 8.506e-05 -1.312e-08 0 0 0 0 0 ); } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermo.incompressiblePoly b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermo.incompressiblePoly index 7dda21bd8b..6d54f2dccd 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermo.incompressiblePoly +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/parcelInBox/constant/thermo.incompressiblePoly @@ -21,10 +21,10 @@ N2 molWeight 28.0134; Hf 0; Sf 0; - rhoPolynomial ( 3.8936 -0.016463 3.2101e-05 -2.9174e-08 9.9889e-12 0 0 0 ); - cpPolynomial ( 979.08 0.41787 -0.0011761 1.6742e-06 -7.2559e-10 0 0 0 ); - muPolynomial ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); - kappaPolynomial ( 0.0031494 8.4997e-05 -1.2621e-08 0 0 0 0 0 ); + rhoCoeffs<8> ( 3.8936 -0.016463 3.2101e-05 -2.9174e-08 9.9889e-12 0 0 0 ); + CpCoeffs<8> ( 979.08 0.41787 -0.0011761 1.6742e-06 -7.2559e-10 0 0 0 ); + muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0031494 8.4997e-05 -1.2621e-08 0 0 0 0 0 ); } O2 @@ -33,10 +33,10 @@ O2 molWeight 31.9988; Hf 0; Sf 0; - rhoPolynomial ( 4.4475 -0.018805 3.6667e-05 -3.3323e-08 1.141e-11 0 0 0 ); - cpPolynomial ( 834.84 0.29297 -0.00014959 3.4143e-07 -2.2786e-10 0 0 0 ); - muPolynomial ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); - kappaPolynomial ( 0.00016082 8.5301e-05 -1.4998e-08 0 0 0 0 0 ); + rhoCoeffs<8> ( 4.4475 -0.018805 3.6667e-05 -3.3323e-08 1.141e-11 0 0 0 ); + CpCoeffs<8> ( 834.84 0.29297 -0.00014959 3.4143e-07 -2.2786e-10 0 0 0 ); + muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.00016082 8.5301e-05 -1.4998e-08 0 0 0 0 0 ); } H2O @@ -45,10 +45,10 @@ H2O molWeight 18.0153; Hf -13423000; Sf 10482; - rhoPolynomial ( 2.5039 -0.010587 2.0643e-05 -1.8761e-08 6.4237e-12 0 0 0 ); - cpPolynomial ( 1563.1 1.604 -0.0029334 3.2168e-06 -1.1571e-09 0 0 0 ); - muPolynomial ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); - kappaPolynomial ( 0.0037972 0.00015336 -1.1859e-08 0 0 0 0 0 ); + rhoCoeffs<8> ( 2.5039 -0.010587 2.0643e-05 -1.8761e-08 6.4237e-12 0 0 0 ); + CpCoeffs<8> ( 1563.1 1.604 -0.0029334 3.2168e-06 -1.1571e-09 0 0 0 ); + muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0037972 0.00015336 -1.1859e-08 0 0 0 0 0 ); } air @@ -57,10 +57,10 @@ air molWeight 28.85; Hf 0; Sf 0; - rhoPolynomial ( 4.0097 -0.016954 3.3057e-05 -3.0042e-08 1.0286e-11 0 0 0 ); - cpPolynomial ( 948.76 0.39171 -0.00095999 1.393e-06 -6.2029e-10 0 0 0 ); - muPolynomial ( 1.5061e-06 6.16e-08 -1.819e-11 0 0 0 0 0 ); - kappaPolynomial ( 0.0025219 8.506e-05 -1.312e-08 0 0 0 0 0 ); + rhoCoeffs<8> ( 4.0097 -0.016954 3.3057e-05 -3.0042e-08 1.0286e-11 0 0 0 ); + CpCoeffs<8> ( 948.76 0.39171 -0.00095999 1.393e-06 -6.2029e-10 0 0 0 ); + muCoeffs<8> ( 1.5061e-06 6.16e-08 -1.819e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0025219 8.506e-05 -1.312e-08 0 0 0 0 0 ); } diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermo.incompressiblePoly b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermo.incompressiblePoly index 1da21f4cc6..d87c99af18 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermo.incompressiblePoly +++ b/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/verticalChannel/constant/thermo.incompressiblePoly @@ -1,158 +1,55 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.com | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object thermo.incompressiblePoly; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + N2 { nMoles 1; molWeight 28.0134; Hf 0; Sf 0; - rhoPolynomial - ( - 3.8936E+00 - -1.6463E-02 - 3.2101E-05 - -2.9174E-08 - 9.9889E-12 - 0 - 0 - 0 - ); - cpPolynomial - ( - 9.7908E+02 - 4.1787E-01 - -1.1761E-03 - 1.6742E-06 - -7.2559E-10 - 0 - 0 - 0 - ); - muPolynomial - ( - 1.5068E-06 - 6.1598E-08 - -1.8188E-11 - 0 - 0 - 0 - 0 - 0 - ); - kappaPolynomial - ( - 3.1494E-03 - 8.4997E-05 - -1.2621E-08 - 0 - 0 - 0 - 0 - 0 - ); + rhoCoeffs<8> ( 3.8936 -0.016463 3.2101e-05 -2.9174e-08 9.9889e-12 0 0 0 ); + CpCoeffs<8> ( 979.08 0.41787 -0.0011761 1.6742e-06 -7.2559e-10 0 0 0 ); + muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0031494 8.4997e-05 -1.2621e-08 0 0 0 0 0 ); } - H2O { nMoles 1; molWeight 18.0153; - Hf -1.3423e07; - Sf 1.0482e04; - rhoPolynomial - ( - 2.5039E+00 - -1.0587E-02 - 2.0643E-05 - -1.8761E-08 - 6.4237E-12 - 0 - 0 - 0 - ); - cpPolynomial - ( - 1.5631E+03 - 1.6040E+00 - -2.9334E-03 - 3.2168E-06 - -1.1571E-09 - 0 - 0 - 0 - ); - muPolynomial - ( - 1.5068E-06 - 6.1598E-08 - -1.8188E-11 - 0 - 0 - 0 - 0 - 0 - ); - kappaPolynomial - ( - 3.7972E-03 - 1.5336E-04 - -1.1859E-08 - 0 - 0 - 0 - 0 - 0 - ); + Hf -13423000; + Sf 10482; + rhoCoeffs<8> ( 2.5039 -0.010587 2.0643e-05 -1.8761e-08 6.4237e-12 0 0 0 ); + CpCoeffs<8> ( 1563.1 1.604 -0.0029334 3.2168e-06 -1.1571e-09 0 0 0 ); + muCoeffs<8> ( 1.5068e-06 6.1598e-08 -1.8188e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0037972 0.00015336 -1.1859e-08 0 0 0 0 0 ); } - air { nMoles 1; molWeight 28.85; - Hf 0.0; - Sf 0.0; - rhoPolynomial - ( - 4.0097E+00 - -1.6954E-02 - 3.3057E-05 - -3.0042E-08 - 1.0286E-11 - 0 - 0 - 0 - ); - cpPolynomial - ( - 9.4876E+02 - 3.9171E-01 - -9.5999E-04 - 1.3930E-06 - -6.2029E-10 - 0 - 0 - 0 - ); - muPolynomial - ( - 1.5061E-06 - 6.1600E-08 - -1.8190E-11 - 0 - 0 - 0 - 0 - 0 - ); - kappaPolynomial - ( - 2.5219E-03 - 8.5060E-05 - -1.3120E-08 - 0 - 0 - 0 - 0 - 0 - ); + Hf 0; + Sf 0; + rhoCoeffs<8> ( 4.0097 -0.016954 3.3057e-05 -3.0042e-08 1.0286e-11 0 0 0 ); + CpCoeffs<8> ( 948.76 0.39171 -0.00095999 1.393e-06 -6.2029e-10 0 0 0 ); + muCoeffs<8> ( 1.5061e-06 6.16e-08 -1.819e-11 0 0 0 0 0 ); + kappaCoeffs<8> ( 0.0025219 8.506e-05 -1.312e-08 0 0 0 0 0 ); } + +// ************************************************************************* //