mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: Misc coding cosmetics
This commit is contained in:
@ -26,14 +26,9 @@ License
|
|||||||
#include "perfectGas.H"
|
#include "perfectGas.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
perfectGas::perfectGas(Istream& is)
|
Foam::perfectGas::perfectGas(Istream& is)
|
||||||
:
|
:
|
||||||
specie(is)
|
specie(is)
|
||||||
{
|
{
|
||||||
@ -41,7 +36,7 @@ perfectGas::perfectGas(Istream& is)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
perfectGas::perfectGas(const dictionary& dict)
|
Foam::perfectGas::perfectGas(const dictionary& dict)
|
||||||
:
|
:
|
||||||
specie(dict)
|
specie(dict)
|
||||||
{}
|
{}
|
||||||
@ -49,7 +44,7 @@ perfectGas::perfectGas(const dictionary& dict)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void perfectGas::write(Ostream& os) const
|
void Foam::perfectGas::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
specie::write(os);
|
specie::write(os);
|
||||||
}
|
}
|
||||||
@ -57,7 +52,7 @@ void perfectGas::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
|
|
||||||
Ostream& operator<<(Ostream& os, const perfectGas& pg)
|
Foam::Ostream& Foam::operator<<(Ostream& os, const perfectGas& pg)
|
||||||
{
|
{
|
||||||
os << static_cast<const specie&>(pg);
|
os << static_cast<const specie&>(pg);
|
||||||
|
|
||||||
@ -66,8 +61,4 @@ Ostream& operator<<(Ostream& os, const perfectGas& pg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -25,17 +25,9 @@ License
|
|||||||
|
|
||||||
#include "perfectGas.H"
|
#include "perfectGas.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
inline perfectGas::perfectGas
|
inline Foam::perfectGas::perfectGas(const specie& sp)
|
||||||
(
|
|
||||||
const specie& sp
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
specie(sp)
|
specie(sp)
|
||||||
{}
|
{}
|
||||||
@ -43,25 +35,28 @@ inline perfectGas::perfectGas
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline perfectGas::perfectGas(const word& name, const perfectGas& pg)
|
inline Foam::perfectGas::perfectGas(const word& name, const perfectGas& pg)
|
||||||
:
|
:
|
||||||
specie(name, pg)
|
specie(name, pg)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
inline autoPtr<perfectGas> perfectGas::clone() const
|
inline Foam::autoPtr<Foam::perfectGas> Foam::perfectGas::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<perfectGas>(new perfectGas(*this));
|
return autoPtr<perfectGas>(new perfectGas(*this));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline autoPtr<perfectGas> perfectGas::New(Istream& is)
|
inline Foam::autoPtr<Foam::perfectGas> Foam::perfectGas::New(Istream& is)
|
||||||
{
|
{
|
||||||
return autoPtr<perfectGas>(new perfectGas(is));
|
return autoPtr<perfectGas>(new perfectGas(is));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline autoPtr<perfectGas> perfectGas::New(const dictionary& dict)
|
inline Foam::autoPtr<Foam::perfectGas> Foam::perfectGas::New
|
||||||
|
(
|
||||||
|
const dictionary& dict
|
||||||
|
)
|
||||||
{
|
{
|
||||||
return autoPtr<perfectGas>(new perfectGas(dict));
|
return autoPtr<perfectGas>(new perfectGas(dict));
|
||||||
}
|
}
|
||||||
@ -69,19 +64,19 @@ inline autoPtr<perfectGas> perfectGas::New(const dictionary& dict)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline scalar perfectGas::rho(scalar p, scalar T) const
|
inline Foam::scalar Foam::perfectGas::rho(scalar p, scalar T) const
|
||||||
{
|
{
|
||||||
return p/(R()*T);
|
return p/(R()*T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline scalar perfectGas::psi(scalar, scalar T) const
|
inline Foam::scalar Foam::perfectGas::psi(scalar, scalar T) const
|
||||||
{
|
{
|
||||||
return 1.0/(R()*T);
|
return 1.0/(R()*T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline scalar perfectGas::Z(scalar, scalar) const
|
inline Foam::scalar Foam::perfectGas::Z(scalar, scalar) const
|
||||||
{
|
{
|
||||||
return 1.0;
|
return 1.0;
|
||||||
}
|
}
|
||||||
@ -89,19 +84,19 @@ inline scalar perfectGas::Z(scalar, scalar) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline void perfectGas::operator+=(const perfectGas& pg)
|
inline void Foam::perfectGas::operator+=(const perfectGas& pg)
|
||||||
{
|
{
|
||||||
specie::operator+=(pg);
|
specie::operator+=(pg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void perfectGas::operator-=(const perfectGas& pg)
|
inline void Foam::perfectGas::operator-=(const perfectGas& pg)
|
||||||
{
|
{
|
||||||
specie::operator-=(pg);
|
specie::operator-=(pg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void perfectGas::operator*=(const scalar s)
|
inline void Foam::perfectGas::operator*=(const scalar s)
|
||||||
{
|
{
|
||||||
specie::operator*=(s);
|
specie::operator*=(s);
|
||||||
}
|
}
|
||||||
@ -109,7 +104,7 @@ inline void perfectGas::operator*=(const scalar s)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
inline perfectGas operator+
|
inline Foam::perfectGas Foam::operator+
|
||||||
(
|
(
|
||||||
const perfectGas& pg1,
|
const perfectGas& pg1,
|
||||||
const perfectGas& pg2
|
const perfectGas& pg2
|
||||||
@ -123,7 +118,7 @@ inline perfectGas operator+
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline perfectGas operator-
|
inline Foam::perfectGas Foam::operator-
|
||||||
(
|
(
|
||||||
const perfectGas& pg1,
|
const perfectGas& pg1,
|
||||||
const perfectGas& pg2
|
const perfectGas& pg2
|
||||||
@ -137,7 +132,7 @@ inline perfectGas operator-
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline perfectGas operator*
|
inline Foam::perfectGas Foam::operator*
|
||||||
(
|
(
|
||||||
const scalar s,
|
const scalar s,
|
||||||
const perfectGas& pg
|
const perfectGas& pg
|
||||||
@ -147,7 +142,7 @@ inline perfectGas operator*
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline perfectGas operator==
|
inline Foam::perfectGas Foam::operator==
|
||||||
(
|
(
|
||||||
const perfectGas& pg1,
|
const perfectGas& pg1,
|
||||||
const perfectGas& pg2
|
const perfectGas& pg2
|
||||||
@ -157,8 +152,4 @@ inline perfectGas operator==
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -380,6 +380,7 @@ Foam::scalar Foam::Reaction<ReactionThermo>::kr
|
|||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class ReactionThermo>
|
template<class ReactionThermo>
|
||||||
Foam::scalar Foam::Reaction<ReactionThermo>::kr
|
Foam::scalar Foam::Reaction<ReactionThermo>::kr
|
||||||
(
|
(
|
||||||
|
|||||||
@ -56,8 +56,8 @@ class powerSeriesReactionRate
|
|||||||
scalar beta_;
|
scalar beta_;
|
||||||
scalar Ta_;
|
scalar Ta_;
|
||||||
|
|
||||||
static const label nb_ = 4;
|
static const label nCoeff_ = 4;
|
||||||
FixedList<scalar, nb_> b_;
|
FixedList<scalar, nCoeff_> coeffs_;
|
||||||
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -70,7 +70,7 @@ public:
|
|||||||
const scalar A,
|
const scalar A,
|
||||||
const scalar beta,
|
const scalar beta,
|
||||||
const scalar Ta,
|
const scalar Ta,
|
||||||
const FixedList<scalar, nb_> b
|
const FixedList<scalar, nCoeff_> coeffs
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
|
|||||||
@ -30,13 +30,13 @@ inline Foam::powerSeriesReactionRate::powerSeriesReactionRate
|
|||||||
const scalar A,
|
const scalar A,
|
||||||
const scalar beta,
|
const scalar beta,
|
||||||
const scalar Ta,
|
const scalar Ta,
|
||||||
const FixedList<scalar, nb_> b
|
const FixedList<scalar, nCoeff_> coeffs
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
A_(A),
|
A_(A),
|
||||||
beta_(beta),
|
beta_(beta),
|
||||||
Ta_(Ta),
|
Ta_(Ta),
|
||||||
b_(b)
|
coeffs_(coeffs)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ inline Foam::powerSeriesReactionRate::powerSeriesReactionRate
|
|||||||
A_(readScalar(is.readBegin("powerSeriesReactionRate(Istream&)"))),
|
A_(readScalar(is.readBegin("powerSeriesReactionRate(Istream&)"))),
|
||||||
beta_(readScalar(is)),
|
beta_(readScalar(is)),
|
||||||
Ta_(readScalar(is)),
|
Ta_(readScalar(is)),
|
||||||
b_(is)
|
coeffs_(is)
|
||||||
{
|
{
|
||||||
is.readEnd("powerSeriesReactionRate(Istream&)");
|
is.readEnd("powerSeriesReactionRate(Istream&)");
|
||||||
}
|
}
|
||||||
@ -64,7 +64,7 @@ inline Foam::powerSeriesReactionRate::powerSeriesReactionRate
|
|||||||
A_(readScalar(dict.lookup("A"))),
|
A_(readScalar(dict.lookup("A"))),
|
||||||
beta_(readScalar(dict.lookup("beta"))),
|
beta_(readScalar(dict.lookup("beta"))),
|
||||||
Ta_(readScalar(dict.lookup("Ta"))),
|
Ta_(readScalar(dict.lookup("Ta"))),
|
||||||
b_(dict.lookup("coeffs"))
|
coeffs_(dict.lookup("coeffs"))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
@ -86,9 +86,9 @@ inline Foam::scalar Foam::powerSeriesReactionRate::operator()
|
|||||||
|
|
||||||
scalar expArg = 0.0;
|
scalar expArg = 0.0;
|
||||||
|
|
||||||
for (int n=0; n<nb_; n++)
|
forAll(coeffs_, n)
|
||||||
{
|
{
|
||||||
expArg += b_[n]/pow(T, n);
|
expArg += coeffs_[n]/pow(T, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
lta *= exp(expArg);
|
lta *= exp(expArg);
|
||||||
@ -102,7 +102,7 @@ inline void Foam::powerSeriesReactionRate::write(Ostream& os) const
|
|||||||
os.writeKeyword("A") << A_ << token::END_STATEMENT << nl;
|
os.writeKeyword("A") << A_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("beta") << beta_ << token::END_STATEMENT << nl;
|
os.writeKeyword("beta") << beta_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl;
|
os.writeKeyword("Ta") << Ta_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("b") << b_ << token::END_STATEMENT << nl;
|
os.writeKeyword("coeffs") << coeffs_ << token::END_STATEMENT << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -115,9 +115,9 @@ inline Foam::Ostream& Foam::operator<<
|
|||||||
os << token::BEGIN_LIST
|
os << token::BEGIN_LIST
|
||||||
<< psrr.A_ << token::SPACE << psrr.beta_ << token::SPACE << psrr.Ta_;
|
<< psrr.A_ << token::SPACE << psrr.beta_ << token::SPACE << psrr.Ta_;
|
||||||
|
|
||||||
for (int n=0; n<powerSeriesReactionRate::nb_; n++)
|
for (int n=0; n<powerSeriesReactionRate::nCoeff_; n++)
|
||||||
{
|
{
|
||||||
os << token::SPACE << psrr.b_[n];
|
os << token::SPACE << psrr.coeffs_[n];
|
||||||
}
|
}
|
||||||
|
|
||||||
os << token::END_LIST;
|
os << token::END_LIST;
|
||||||
|
|||||||
@ -28,21 +28,21 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
Foam::eConstThermo<equationOfState>::eConstThermo(Istream& is)
|
Foam::eConstThermo<EquationOfState>::eConstThermo(Istream& is)
|
||||||
:
|
:
|
||||||
equationOfState(is),
|
EquationOfState(is),
|
||||||
Cv_(readScalar(is)),
|
Cv_(readScalar(is)),
|
||||||
Hf_(readScalar(is))
|
Hf_(readScalar(is))
|
||||||
{
|
{
|
||||||
is.check("eConstThermo::eConstThermo(Istream& is)");
|
is.check("eConstThermo<EquationOfState>::eConstThermo(Istream&)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
Foam::eConstThermo<equationOfState>::eConstThermo(const dictionary& dict)
|
Foam::eConstThermo<EquationOfState>::eConstThermo(const dictionary& dict)
|
||||||
:
|
:
|
||||||
equationOfState(dict),
|
EquationOfState(dict),
|
||||||
Cv_(readScalar(dict.lookup("Cv"))),
|
Cv_(readScalar(dict.lookup("Cv"))),
|
||||||
Hf_(readScalar(dict.lookup("Hf")))
|
Hf_(readScalar(dict.lookup("Hf")))
|
||||||
{}
|
{}
|
||||||
@ -50,10 +50,10 @@ Foam::eConstThermo<equationOfState>::eConstThermo(const dictionary& dict)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
void Foam::eConstThermo<equationOfState>::write(Ostream& os) const
|
void Foam::eConstThermo<EquationOfState>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
equationOfState::write(os);
|
EquationOfState::write(os);
|
||||||
os.writeKeyword("Cv") << Cv_ << token::END_STATEMENT << nl;
|
os.writeKeyword("Cv") << Cv_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("Hf") << Hf_ << token::END_STATEMENT << nl;
|
os.writeKeyword("Hf") << Hf_ << token::END_STATEMENT << nl;
|
||||||
}
|
}
|
||||||
@ -61,17 +61,17 @@ void Foam::eConstThermo<equationOfState>::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const eConstThermo<equationOfState>& ct
|
const eConstThermo<EquationOfState>& ct
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
os << static_cast<const equationOfState&>(ct) << tab
|
os << static_cast<const EquationOfState&>(ct) << tab
|
||||||
<< ct.Cv_ << tab << ct.Hf_;
|
<< ct.Cv_ << tab << ct.Hf_;
|
||||||
|
|
||||||
os.check("Ostream& operator<<(Ostream& os, const eConstThermo& ct)");
|
os.check("Ostream& operator<<(Ostream&, const eConstThermo&)");
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -46,41 +46,41 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
template<class equationOfState> class eConstThermo;
|
template<class EquationOfState> class eConstThermo;
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline eConstThermo<equationOfState> operator+
|
inline eConstThermo<EquationOfState> operator+
|
||||||
(
|
(
|
||||||
const eConstThermo<equationOfState>&,
|
const eConstThermo<EquationOfState>&,
|
||||||
const eConstThermo<equationOfState>&
|
const eConstThermo<EquationOfState>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline eConstThermo<equationOfState> operator-
|
inline eConstThermo<EquationOfState> operator-
|
||||||
(
|
(
|
||||||
const eConstThermo<equationOfState>&,
|
const eConstThermo<EquationOfState>&,
|
||||||
const eConstThermo<equationOfState>&
|
const eConstThermo<EquationOfState>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline eConstThermo<equationOfState> operator*
|
inline eConstThermo<EquationOfState> operator*
|
||||||
(
|
(
|
||||||
const scalar,
|
const scalar,
|
||||||
const eConstThermo<equationOfState>&
|
const eConstThermo<EquationOfState>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline eConstThermo<equationOfState> operator==
|
inline eConstThermo<EquationOfState> operator==
|
||||||
(
|
(
|
||||||
const eConstThermo<equationOfState>&,
|
const eConstThermo<EquationOfState>&,
|
||||||
const eConstThermo<equationOfState>&
|
const eConstThermo<EquationOfState>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
Ostream& operator<<
|
Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const eConstThermo<equationOfState>&
|
const eConstThermo<EquationOfState>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -88,10 +88,10 @@ Ostream& operator<<
|
|||||||
Class eConstThermo Declaration
|
Class eConstThermo Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
class eConstThermo
|
class eConstThermo
|
||||||
:
|
:
|
||||||
public equationOfState
|
public EquationOfState
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -104,7 +104,7 @@ class eConstThermo
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline eConstThermo
|
inline eConstThermo
|
||||||
(
|
(
|
||||||
const equationOfState& st,
|
const EquationOfState& st,
|
||||||
const scalar cv,
|
const scalar cv,
|
||||||
const scalar hf
|
const scalar hf
|
||||||
);
|
);
|
||||||
@ -167,25 +167,25 @@ public:
|
|||||||
|
|
||||||
// Friend operators
|
// Friend operators
|
||||||
|
|
||||||
friend eConstThermo operator+ <equationOfState>
|
friend eConstThermo operator+ <EquationOfState>
|
||||||
(
|
(
|
||||||
const eConstThermo&,
|
const eConstThermo&,
|
||||||
const eConstThermo&
|
const eConstThermo&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend eConstThermo operator- <equationOfState>
|
friend eConstThermo operator- <EquationOfState>
|
||||||
(
|
(
|
||||||
const eConstThermo&,
|
const eConstThermo&,
|
||||||
const eConstThermo&
|
const eConstThermo&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend eConstThermo operator* <equationOfState>
|
friend eConstThermo operator* <EquationOfState>
|
||||||
(
|
(
|
||||||
const scalar,
|
const scalar,
|
||||||
const eConstThermo&
|
const eConstThermo&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend eConstThermo operator== <equationOfState>
|
friend eConstThermo operator== <EquationOfState>
|
||||||
(
|
(
|
||||||
const eConstThermo&,
|
const eConstThermo&,
|
||||||
const eConstThermo&
|
const eConstThermo&
|
||||||
@ -194,7 +194,7 @@ public:
|
|||||||
|
|
||||||
// IOstream Operators
|
// IOstream Operators
|
||||||
|
|
||||||
friend Ostream& operator<< <equationOfState>
|
friend Ostream& operator<< <EquationOfState>
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const eConstThermo&
|
const eConstThermo&
|
||||||
|
|||||||
@ -25,15 +25,15 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::eConstThermo<equationOfState>::eConstThermo
|
inline Foam::eConstThermo<EquationOfState>::eConstThermo
|
||||||
(
|
(
|
||||||
const equationOfState& st,
|
const EquationOfState& st,
|
||||||
const scalar cv,
|
const scalar cv,
|
||||||
const scalar hf
|
const scalar hf
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
equationOfState(st),
|
EquationOfState(st),
|
||||||
Cv_(cv),
|
Cv_(cv),
|
||||||
Hf_(hf)
|
Hf_(hf)
|
||||||
{}
|
{}
|
||||||
@ -41,56 +41,56 @@ inline Foam::eConstThermo<equationOfState>::eConstThermo
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::eConstThermo<equationOfState>::eConstThermo
|
inline Foam::eConstThermo<EquationOfState>::eConstThermo
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const eConstThermo<equationOfState>& ct
|
const eConstThermo<EquationOfState>& ct
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
equationOfState(name, ct),
|
EquationOfState(name, ct),
|
||||||
Cv_(ct.Cv_),
|
Cv_(ct.Cv_),
|
||||||
Hf_(ct.Hf_)
|
Hf_(ct.Hf_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::autoPtr<Foam::eConstThermo<equationOfState> >
|
inline Foam::autoPtr<Foam::eConstThermo<EquationOfState> >
|
||||||
Foam::eConstThermo<equationOfState>::clone() const
|
Foam::eConstThermo<EquationOfState>::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<eConstThermo<equationOfState> >
|
return autoPtr<eConstThermo<EquationOfState> >
|
||||||
(
|
(
|
||||||
new eConstThermo<equationOfState>(*this)
|
new eConstThermo<EquationOfState>(*this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::autoPtr<Foam::eConstThermo<equationOfState> >
|
inline Foam::autoPtr<Foam::eConstThermo<EquationOfState> >
|
||||||
Foam::eConstThermo<equationOfState>::New(Istream& is)
|
Foam::eConstThermo<EquationOfState>::New(Istream& is)
|
||||||
{
|
{
|
||||||
return autoPtr<eConstThermo<equationOfState> >
|
return autoPtr<eConstThermo<EquationOfState> >
|
||||||
(
|
(
|
||||||
new eConstThermo<equationOfState>(is)
|
new eConstThermo<EquationOfState>(is)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::autoPtr<Foam::eConstThermo<equationOfState> >
|
inline Foam::autoPtr<Foam::eConstThermo<EquationOfState> >
|
||||||
Foam::eConstThermo<equationOfState>::New(const dictionary& dict)
|
Foam::eConstThermo<EquationOfState>::New(const dictionary& dict)
|
||||||
{
|
{
|
||||||
return autoPtr<eConstThermo<equationOfState> >
|
return autoPtr<eConstThermo<EquationOfState> >
|
||||||
(
|
(
|
||||||
new eConstThermo<equationOfState>(dict)
|
new eConstThermo<EquationOfState>(dict)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::scalar Foam::eConstThermo<equationOfState>::cp
|
inline Foam::scalar Foam::eConstThermo<EquationOfState>::cp
|
||||||
(
|
(
|
||||||
const scalar
|
const scalar
|
||||||
) const
|
) const
|
||||||
@ -99,8 +99,8 @@ inline Foam::scalar Foam::eConstThermo<equationOfState>::cp
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::scalar Foam::eConstThermo<equationOfState>::h
|
inline Foam::scalar Foam::eConstThermo<EquationOfState>::h
|
||||||
(
|
(
|
||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
@ -109,8 +109,8 @@ inline Foam::scalar Foam::eConstThermo<equationOfState>::h
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::scalar Foam::eConstThermo<equationOfState>::hs
|
inline Foam::scalar Foam::eConstThermo<EquationOfState>::hs
|
||||||
(
|
(
|
||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
@ -119,35 +119,38 @@ inline Foam::scalar Foam::eConstThermo<equationOfState>::hs
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::scalar Foam::eConstThermo<equationOfState>::hc() const
|
inline Foam::scalar Foam::eConstThermo<EquationOfState>::hc() const
|
||||||
{
|
{
|
||||||
return Hf_*this->W();
|
return Hf_*this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::scalar Foam::eConstThermo<equationOfState>::s
|
inline Foam::scalar Foam::eConstThermo<EquationOfState>::s
|
||||||
(
|
(
|
||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
notImplemented("scalar eConstThermo::s(const scalar T) const");
|
notImplemented
|
||||||
|
(
|
||||||
|
"scalar eConstThermo<EquationOfState>::s(const scalar) const"
|
||||||
|
);
|
||||||
return T;
|
return T;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline void Foam::eConstThermo<equationOfState>::operator+=
|
inline void Foam::eConstThermo<EquationOfState>::operator+=
|
||||||
(
|
(
|
||||||
const eConstThermo<equationOfState>& ct
|
const eConstThermo<EquationOfState>& ct
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar molr1 = this->nMoles();
|
scalar molr1 = this->nMoles();
|
||||||
|
|
||||||
equationOfState::operator+=(ct);
|
EquationOfState::operator+=(ct);
|
||||||
|
|
||||||
molr1 /= this->nMoles();
|
molr1 /= this->nMoles();
|
||||||
scalar molr2 = ct.nMoles()/this->nMoles();
|
scalar molr2 = ct.nMoles()/this->nMoles();
|
||||||
@ -157,15 +160,15 @@ inline void Foam::eConstThermo<equationOfState>::operator+=
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline void Foam::eConstThermo<equationOfState>::operator-=
|
inline void Foam::eConstThermo<EquationOfState>::operator-=
|
||||||
(
|
(
|
||||||
const eConstThermo<equationOfState>& ct
|
const eConstThermo<EquationOfState>& ct
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar molr1 = this->nMoles();
|
scalar molr1 = this->nMoles();
|
||||||
|
|
||||||
equationOfState::operator-=(ct);
|
EquationOfState::operator-=(ct);
|
||||||
|
|
||||||
molr1 /= this->nMoles();
|
molr1 /= this->nMoles();
|
||||||
scalar molr2 = ct.nMoles()/this->nMoles();
|
scalar molr2 = ct.nMoles()/this->nMoles();
|
||||||
@ -177,20 +180,20 @@ inline void Foam::eConstThermo<equationOfState>::operator-=
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::eConstThermo<equationOfState> Foam::operator+
|
inline Foam::eConstThermo<EquationOfState> Foam::operator+
|
||||||
(
|
(
|
||||||
const eConstThermo<equationOfState>& ct1,
|
const eConstThermo<EquationOfState>& ct1,
|
||||||
const eConstThermo<equationOfState>& ct2
|
const eConstThermo<EquationOfState>& ct2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
equationOfState eofs
|
EquationOfState eofs
|
||||||
(
|
(
|
||||||
static_cast<const equationOfState&>(ct1)
|
static_cast<const EquationOfState&>(ct1)
|
||||||
+ static_cast<const equationOfState&>(ct2)
|
+ static_cast<const EquationOfState&>(ct2)
|
||||||
);
|
);
|
||||||
|
|
||||||
return eConstThermo<equationOfState>
|
return eConstThermo<EquationOfState>
|
||||||
(
|
(
|
||||||
eofs,
|
eofs,
|
||||||
ct1.nMoles()/eofs.nMoles()*ct1.Cv_
|
ct1.nMoles()/eofs.nMoles()*ct1.Cv_
|
||||||
@ -201,20 +204,20 @@ inline Foam::eConstThermo<equationOfState> Foam::operator+
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::eConstThermo<equationOfState> Foam::operator-
|
inline Foam::eConstThermo<EquationOfState> Foam::operator-
|
||||||
(
|
(
|
||||||
const eConstThermo<equationOfState>& ct1,
|
const eConstThermo<EquationOfState>& ct1,
|
||||||
const eConstThermo<equationOfState>& ct2
|
const eConstThermo<EquationOfState>& ct2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
equationOfState eofs
|
EquationOfState eofs
|
||||||
(
|
(
|
||||||
static_cast<const equationOfState&>(ct1)
|
static_cast<const EquationOfState&>(ct1)
|
||||||
- static_cast<const equationOfState&>(ct2)
|
- static_cast<const EquationOfState&>(ct2)
|
||||||
);
|
);
|
||||||
|
|
||||||
return eConstThermo<equationOfState>
|
return eConstThermo<EquationOfState>
|
||||||
(
|
(
|
||||||
eofs,
|
eofs,
|
||||||
ct1.nMoles()/eofs.nMoles()*ct1.Cv_
|
ct1.nMoles()/eofs.nMoles()*ct1.Cv_
|
||||||
@ -225,27 +228,27 @@ inline Foam::eConstThermo<equationOfState> Foam::operator-
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::eConstThermo<equationOfState> Foam::operator*
|
inline Foam::eConstThermo<EquationOfState> Foam::operator*
|
||||||
(
|
(
|
||||||
const scalar s,
|
const scalar s,
|
||||||
const eConstThermo<equationOfState>& ct
|
const eConstThermo<EquationOfState>& ct
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return eConstThermo<equationOfState>
|
return eConstThermo<EquationOfState>
|
||||||
(
|
(
|
||||||
s*static_cast<const equationOfState&>(ct),
|
s*static_cast<const EquationOfState&>(ct),
|
||||||
ct.Cv_,
|
ct.Cv_,
|
||||||
ct.Hf_
|
ct.Hf_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::eConstThermo<equationOfState> Foam::operator==
|
inline Foam::eConstThermo<EquationOfState> Foam::operator==
|
||||||
(
|
(
|
||||||
const eConstThermo<equationOfState>& ct1,
|
const eConstThermo<EquationOfState>& ct1,
|
||||||
const eConstThermo<equationOfState>& ct2
|
const eConstThermo<EquationOfState>& ct2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return ct2 - ct1;
|
return ct2 - ct1;
|
||||||
|
|||||||
@ -28,26 +28,26 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
void Foam::janafThermo<equationOfState>::checkInputData() const
|
void Foam::janafThermo<EquationOfState>::checkInputData() const
|
||||||
{
|
{
|
||||||
if (Tlow_ >= Thigh_)
|
if (Tlow_ >= Thigh_)
|
||||||
{
|
{
|
||||||
FatalErrorIn("janafThermo<equationOfState>::check()")
|
FatalErrorIn("janafThermo<EquationOfState>::check()")
|
||||||
<< "Tlow(" << Tlow_ << ") >= Thigh(" << Thigh_ << ')'
|
<< "Tlow(" << Tlow_ << ") >= Thigh(" << Thigh_ << ')'
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Tcommon_ <= Tlow_)
|
if (Tcommon_ <= Tlow_)
|
||||||
{
|
{
|
||||||
FatalErrorIn("janafThermo<equationOfState>::check()")
|
FatalErrorIn("janafThermo<EquationOfState>::check()")
|
||||||
<< "Tcommon(" << Tcommon_ << ") <= Tlow(" << Tlow_ << ')'
|
<< "Tcommon(" << Tcommon_ << ") <= Tlow(" << Tlow_ << ')'
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Tcommon_ > Thigh_)
|
if (Tcommon_ > Thigh_)
|
||||||
{
|
{
|
||||||
FatalErrorIn("janafThermo<equationOfState>::check()")
|
FatalErrorIn("janafThermo<EquationOfState>::check()")
|
||||||
<< "Tcommon(" << Tcommon_ << ") > Thigh(" << Thigh_ << ')'
|
<< "Tcommon(" << Tcommon_ << ") > Thigh(" << Thigh_ << ')'
|
||||||
<< exit(FatalIOError);
|
<< exit(FatalIOError);
|
||||||
}
|
}
|
||||||
@ -56,10 +56,10 @@ void Foam::janafThermo<equationOfState>::checkInputData() const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
Foam::janafThermo<equationOfState>::janafThermo(Istream& is)
|
Foam::janafThermo<EquationOfState>::janafThermo(Istream& is)
|
||||||
:
|
:
|
||||||
equationOfState(is),
|
EquationOfState(is),
|
||||||
Tlow_(readScalar(is)),
|
Tlow_(readScalar(is)),
|
||||||
Thigh_(readScalar(is)),
|
Thigh_(readScalar(is)),
|
||||||
Tcommon_(readScalar(is))
|
Tcommon_(readScalar(is))
|
||||||
@ -81,10 +81,10 @@ Foam::janafThermo<equationOfState>::janafThermo(Istream& is)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
Foam::janafThermo<equationOfState>::janafThermo(const dictionary& dict)
|
Foam::janafThermo<EquationOfState>::janafThermo(const dictionary& dict)
|
||||||
:
|
:
|
||||||
equationOfState(dict),
|
EquationOfState(dict),
|
||||||
Tlow_(readScalar(dict.lookup("Tlow"))),
|
Tlow_(readScalar(dict.lookup("Tlow"))),
|
||||||
Thigh_(readScalar(dict.lookup("Thigh"))),
|
Thigh_(readScalar(dict.lookup("Thigh"))),
|
||||||
Tcommon_(readScalar(dict.lookup("Tcommon"))),
|
Tcommon_(readScalar(dict.lookup("Tcommon"))),
|
||||||
@ -97,10 +97,10 @@ Foam::janafThermo<equationOfState>::janafThermo(const dictionary& dict)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
void Foam::janafThermo<equationOfState>::write(Ostream& os) const
|
void Foam::janafThermo<EquationOfState>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
equationOfState::write(os);
|
EquationOfState::write(os);
|
||||||
os.writeKeyword("Tlow") << Tlow_ << token::END_STATEMENT << endl;
|
os.writeKeyword("Tlow") << Tlow_ << token::END_STATEMENT << endl;
|
||||||
os.writeKeyword("Thigh") << Thigh_ << token::END_STATEMENT << endl;
|
os.writeKeyword("Thigh") << Thigh_ << token::END_STATEMENT << endl;
|
||||||
os.writeKeyword("Tcommon") << Tcommon_ << token::END_STATEMENT << endl;
|
os.writeKeyword("Tcommon") << Tcommon_ << token::END_STATEMENT << endl;
|
||||||
@ -113,14 +113,14 @@ void Foam::janafThermo<equationOfState>::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
Foam::Ostream& Foam::operator<<
|
Foam::Ostream& Foam::operator<<
|
||||||
(
|
(
|
||||||
Ostream& os,
|
Ostream& os,
|
||||||
const janafThermo<equationOfState>& jt
|
const janafThermo<EquationOfState>& jt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
os << static_cast<const equationOfState&>(jt) << nl
|
os << static_cast<const EquationOfState&>(jt) << nl
|
||||||
<< " " << jt.Tlow_
|
<< " " << jt.Tlow_
|
||||||
<< tab << jt.Thigh_
|
<< tab << jt.Thigh_
|
||||||
<< tab << jt.Tcommon_;
|
<< tab << jt.Tcommon_;
|
||||||
@ -143,7 +143,7 @@ Foam::Ostream& Foam::operator<<
|
|||||||
|
|
||||||
os.check
|
os.check
|
||||||
(
|
(
|
||||||
"operator<<(Ostream& os, const janafThermo<equationOfState>& jt)"
|
"operator<<(Ostream& os, const janafThermo<EquationOfState>& jt)"
|
||||||
);
|
);
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
|
|||||||
@ -26,7 +26,7 @@ Class
|
|||||||
|
|
||||||
Description
|
Description
|
||||||
JANAF tables based thermodynamics package templated
|
JANAF tables based thermodynamics package templated
|
||||||
into the equationOfState.
|
into the equation of state.
|
||||||
|
|
||||||
SourceFiles
|
SourceFiles
|
||||||
janafThermoI.H
|
janafThermoI.H
|
||||||
@ -47,41 +47,41 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
template<class equationOfState> class janafThermo;
|
template<class EquationOfState> class janafThermo;
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline janafThermo<equationOfState> operator+
|
inline janafThermo<EquationOfState> operator+
|
||||||
(
|
(
|
||||||
const janafThermo<equationOfState>&,
|
const janafThermo<EquationOfState>&,
|
||||||
const janafThermo<equationOfState>&
|
const janafThermo<EquationOfState>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline janafThermo<equationOfState> operator-
|
inline janafThermo<EquationOfState> operator-
|
||||||
(
|
(
|
||||||
const janafThermo<equationOfState>&,
|
const janafThermo<EquationOfState>&,
|
||||||
const janafThermo<equationOfState>&
|
const janafThermo<EquationOfState>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline janafThermo<equationOfState> operator*
|
inline janafThermo<EquationOfState> operator*
|
||||||
(
|
(
|
||||||
const scalar,
|
const scalar,
|
||||||
const janafThermo<equationOfState>&
|
const janafThermo<EquationOfState>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline janafThermo<equationOfState> operator==
|
inline janafThermo<EquationOfState> operator==
|
||||||
(
|
(
|
||||||
const janafThermo<equationOfState>&,
|
const janafThermo<EquationOfState>&,
|
||||||
const janafThermo<equationOfState>&
|
const janafThermo<EquationOfState>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
Ostream& operator<<
|
Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const janafThermo<equationOfState>&
|
const janafThermo<EquationOfState>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -89,10 +89,10 @@ Ostream& operator<<
|
|||||||
Class janafThermo Declaration
|
Class janafThermo Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
class janafThermo
|
class janafThermo
|
||||||
:
|
:
|
||||||
public equationOfState
|
public EquationOfState
|
||||||
{
|
{
|
||||||
|
|
||||||
public:
|
public:
|
||||||
@ -133,7 +133,7 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline janafThermo
|
inline janafThermo
|
||||||
(
|
(
|
||||||
const equationOfState& st,
|
const EquationOfState& st,
|
||||||
const scalar Tlow,
|
const scalar Tlow,
|
||||||
const scalar Thigh,
|
const scalar Thigh,
|
||||||
const scalar Tcommon,
|
const scalar Tcommon,
|
||||||
@ -185,25 +185,25 @@ public:
|
|||||||
|
|
||||||
// Friend operators
|
// Friend operators
|
||||||
|
|
||||||
friend janafThermo operator+ <equationOfState>
|
friend janafThermo operator+ <EquationOfState>
|
||||||
(
|
(
|
||||||
const janafThermo&,
|
const janafThermo&,
|
||||||
const janafThermo&
|
const janafThermo&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend janafThermo operator- <equationOfState>
|
friend janafThermo operator- <EquationOfState>
|
||||||
(
|
(
|
||||||
const janafThermo&,
|
const janafThermo&,
|
||||||
const janafThermo&
|
const janafThermo&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend janafThermo operator* <equationOfState>
|
friend janafThermo operator* <EquationOfState>
|
||||||
(
|
(
|
||||||
const scalar,
|
const scalar,
|
||||||
const janafThermo&
|
const janafThermo&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend janafThermo operator== <equationOfState>
|
friend janafThermo operator== <EquationOfState>
|
||||||
(
|
(
|
||||||
const janafThermo&,
|
const janafThermo&,
|
||||||
const janafThermo&
|
const janafThermo&
|
||||||
@ -212,7 +212,7 @@ public:
|
|||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|
||||||
friend Ostream& operator<< <equationOfState>
|
friend Ostream& operator<< <EquationOfState>
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const janafThermo&
|
const janafThermo&
|
||||||
|
|||||||
@ -28,18 +28,18 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::janafThermo<equationOfState>::janafThermo
|
inline Foam::janafThermo<EquationOfState>::janafThermo
|
||||||
(
|
(
|
||||||
const equationOfState& st,
|
const EquationOfState& st,
|
||||||
const scalar Tlow,
|
const scalar Tlow,
|
||||||
const scalar Thigh,
|
const scalar Thigh,
|
||||||
const scalar Tcommon,
|
const scalar Tcommon,
|
||||||
const typename janafThermo<equationOfState>::coeffArray& highCpCoeffs,
|
const typename janafThermo<EquationOfState>::coeffArray& highCpCoeffs,
|
||||||
const typename janafThermo<equationOfState>::coeffArray& lowCpCoeffs
|
const typename janafThermo<EquationOfState>::coeffArray& lowCpCoeffs
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
equationOfState(st),
|
EquationOfState(st),
|
||||||
Tlow_(Tlow),
|
Tlow_(Tlow),
|
||||||
Thigh_(Thigh),
|
Thigh_(Thigh),
|
||||||
Tcommon_(Tcommon)
|
Tcommon_(Tcommon)
|
||||||
@ -52,15 +52,15 @@ inline Foam::janafThermo<equationOfState>::janafThermo
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline void Foam::janafThermo<equationOfState>::checkT(const scalar T) const
|
inline void Foam::janafThermo<EquationOfState>::checkT(const scalar T) const
|
||||||
{
|
{
|
||||||
if (T < Tlow_ || T > Thigh_)
|
if (T < Tlow_ || T > Thigh_)
|
||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"janafThermo<equationOfState>::checkT(const scalar T) const"
|
"janafThermo<EquationOfState>::checkT(const scalar T) const"
|
||||||
) << "attempt to use janafThermo<equationOfState>"
|
) << "attempt to use janafThermo<EquationOfState>"
|
||||||
" out of temperature range "
|
" out of temperature range "
|
||||||
<< Tlow_ << " -> " << Thigh_ << "; T = " << T
|
<< Tlow_ << " -> " << Thigh_ << "; T = " << T
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
@ -68,9 +68,9 @@ inline void Foam::janafThermo<equationOfState>::checkT(const scalar T) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline const typename Foam::janafThermo<equationOfState>::coeffArray&
|
inline const typename Foam::janafThermo<EquationOfState>::coeffArray&
|
||||||
Foam::janafThermo<equationOfState>::coeffs
|
Foam::janafThermo<EquationOfState>::coeffs
|
||||||
(
|
(
|
||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
@ -90,14 +90,14 @@ Foam::janafThermo<equationOfState>::coeffs
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::janafThermo<equationOfState>::janafThermo
|
inline Foam::janafThermo<EquationOfState>::janafThermo
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const janafThermo& jt
|
const janafThermo& jt
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
equationOfState(name, jt),
|
EquationOfState(name, jt),
|
||||||
Tlow_(jt.Tlow_),
|
Tlow_(jt.Tlow_),
|
||||||
Thigh_(jt.Thigh_),
|
Thigh_(jt.Thigh_),
|
||||||
Tcommon_(jt.Tcommon_)
|
Tcommon_(jt.Tcommon_)
|
||||||
@ -112,8 +112,8 @@ inline Foam::janafThermo<equationOfState>::janafThermo
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::scalar Foam::janafThermo<equationOfState>::cp
|
inline Foam::scalar Foam::janafThermo<EquationOfState>::cp
|
||||||
(
|
(
|
||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
@ -123,8 +123,8 @@ inline Foam::scalar Foam::janafThermo<equationOfState>::cp
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::scalar Foam::janafThermo<equationOfState>::h
|
inline Foam::scalar Foam::janafThermo<EquationOfState>::h
|
||||||
(
|
(
|
||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
@ -138,8 +138,8 @@ inline Foam::scalar Foam::janafThermo<equationOfState>::h
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::scalar Foam::janafThermo<equationOfState>::hs
|
inline Foam::scalar Foam::janafThermo<EquationOfState>::hs
|
||||||
(
|
(
|
||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
@ -148,8 +148,8 @@ inline Foam::scalar Foam::janafThermo<equationOfState>::hs
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::scalar Foam::janafThermo<equationOfState>::hc() const
|
inline Foam::scalar Foam::janafThermo<EquationOfState>::hc() const
|
||||||
{
|
{
|
||||||
const coeffArray& a = lowCpCoeffs_;
|
const coeffArray& a = lowCpCoeffs_;
|
||||||
const scalar Tstd = specie::Tstd;
|
const scalar Tstd = specie::Tstd;
|
||||||
@ -163,8 +163,8 @@ inline Foam::scalar Foam::janafThermo<equationOfState>::hc() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::scalar Foam::janafThermo<equationOfState>::s
|
inline Foam::scalar Foam::janafThermo<EquationOfState>::s
|
||||||
(
|
(
|
||||||
const scalar T
|
const scalar T
|
||||||
) const
|
) const
|
||||||
@ -181,15 +181,15 @@ inline Foam::scalar Foam::janafThermo<equationOfState>::s
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline void Foam::janafThermo<equationOfState>::operator+=
|
inline void Foam::janafThermo<EquationOfState>::operator+=
|
||||||
(
|
(
|
||||||
const janafThermo<equationOfState>& jt
|
const janafThermo<EquationOfState>& jt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar molr1 = this->nMoles();
|
scalar molr1 = this->nMoles();
|
||||||
|
|
||||||
equationOfState::operator+=(jt);
|
EquationOfState::operator+=(jt);
|
||||||
|
|
||||||
molr1 /= this->nMoles();
|
molr1 /= this->nMoles();
|
||||||
scalar molr2 = jt.nMoles()/this->nMoles();
|
scalar molr2 = jt.nMoles()/this->nMoles();
|
||||||
@ -201,7 +201,7 @@ inline void Foam::janafThermo<equationOfState>::operator+=
|
|||||||
for
|
for
|
||||||
(
|
(
|
||||||
register label coefLabel=0;
|
register label coefLabel=0;
|
||||||
coefLabel<janafThermo<equationOfState>::nCoeffs_;
|
coefLabel<janafThermo<EquationOfState>::nCoeffs_;
|
||||||
coefLabel++
|
coefLabel++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -216,15 +216,15 @@ inline void Foam::janafThermo<equationOfState>::operator+=
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline void Foam::janafThermo<equationOfState>::operator-=
|
inline void Foam::janafThermo<EquationOfState>::operator-=
|
||||||
(
|
(
|
||||||
const janafThermo<equationOfState>& jt
|
const janafThermo<EquationOfState>& jt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
scalar molr1 = this->nMoles();
|
scalar molr1 = this->nMoles();
|
||||||
|
|
||||||
equationOfState::operator-=(jt);
|
EquationOfState::operator-=(jt);
|
||||||
|
|
||||||
molr1 /= this->nMoles();
|
molr1 /= this->nMoles();
|
||||||
scalar molr2 = jt.nMoles()/this->nMoles();
|
scalar molr2 = jt.nMoles()/this->nMoles();
|
||||||
@ -236,7 +236,7 @@ inline void Foam::janafThermo<equationOfState>::operator-=
|
|||||||
for
|
for
|
||||||
(
|
(
|
||||||
register label coefLabel=0;
|
register label coefLabel=0;
|
||||||
coefLabel<janafThermo<equationOfState>::nCoeffs_;
|
coefLabel<janafThermo<EquationOfState>::nCoeffs_;
|
||||||
coefLabel++
|
coefLabel++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -253,26 +253,26 @@ inline void Foam::janafThermo<equationOfState>::operator-=
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::janafThermo<equationOfState> Foam::operator+
|
inline Foam::janafThermo<EquationOfState> Foam::operator+
|
||||||
(
|
(
|
||||||
const janafThermo<equationOfState>& jt1,
|
const janafThermo<EquationOfState>& jt1,
|
||||||
const janafThermo<equationOfState>& jt2
|
const janafThermo<EquationOfState>& jt2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
equationOfState eofs = jt1;
|
EquationOfState eofs = jt1;
|
||||||
eofs += jt2;
|
eofs += jt2;
|
||||||
|
|
||||||
scalar molr1 = jt1.nMoles()/eofs.nMoles();
|
scalar molr1 = jt1.nMoles()/eofs.nMoles();
|
||||||
scalar molr2 = jt2.nMoles()/eofs.nMoles();
|
scalar molr2 = jt2.nMoles()/eofs.nMoles();
|
||||||
|
|
||||||
typename janafThermo<equationOfState>::coeffArray highCpCoeffs;
|
typename janafThermo<EquationOfState>::coeffArray highCpCoeffs;
|
||||||
typename janafThermo<equationOfState>::coeffArray lowCpCoeffs;
|
typename janafThermo<EquationOfState>::coeffArray lowCpCoeffs;
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
register label coefLabel=0;
|
register label coefLabel=0;
|
||||||
coefLabel<janafThermo<equationOfState>::nCoeffs_;
|
coefLabel<janafThermo<EquationOfState>::nCoeffs_;
|
||||||
coefLabel++
|
coefLabel++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -285,7 +285,7 @@ inline Foam::janafThermo<equationOfState> Foam::operator+
|
|||||||
+ molr2*jt2.lowCpCoeffs_[coefLabel];
|
+ molr2*jt2.lowCpCoeffs_[coefLabel];
|
||||||
}
|
}
|
||||||
|
|
||||||
return janafThermo<equationOfState>
|
return janafThermo<EquationOfState>
|
||||||
(
|
(
|
||||||
eofs,
|
eofs,
|
||||||
max(jt1.Tlow_, jt2.Tlow_),
|
max(jt1.Tlow_, jt2.Tlow_),
|
||||||
@ -297,26 +297,26 @@ inline Foam::janafThermo<equationOfState> Foam::operator+
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::janafThermo<equationOfState> Foam::operator-
|
inline Foam::janafThermo<EquationOfState> Foam::operator-
|
||||||
(
|
(
|
||||||
const janafThermo<equationOfState>& jt1,
|
const janafThermo<EquationOfState>& jt1,
|
||||||
const janafThermo<equationOfState>& jt2
|
const janafThermo<EquationOfState>& jt2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
equationOfState eofs = jt1;
|
EquationOfState eofs = jt1;
|
||||||
eofs -= jt2;
|
eofs -= jt2;
|
||||||
|
|
||||||
scalar molr1 = jt1.nMoles()/eofs.nMoles();
|
scalar molr1 = jt1.nMoles()/eofs.nMoles();
|
||||||
scalar molr2 = jt2.nMoles()/eofs.nMoles();
|
scalar molr2 = jt2.nMoles()/eofs.nMoles();
|
||||||
|
|
||||||
typename janafThermo<equationOfState>::coeffArray highCpCoeffs;
|
typename janafThermo<EquationOfState>::coeffArray highCpCoeffs;
|
||||||
typename janafThermo<equationOfState>::coeffArray lowCpCoeffs;
|
typename janafThermo<EquationOfState>::coeffArray lowCpCoeffs;
|
||||||
|
|
||||||
for
|
for
|
||||||
(
|
(
|
||||||
register label coefLabel=0;
|
register label coefLabel=0;
|
||||||
coefLabel<janafThermo<equationOfState>::nCoeffs_;
|
coefLabel<janafThermo<EquationOfState>::nCoeffs_;
|
||||||
coefLabel++
|
coefLabel++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@ -329,7 +329,7 @@ inline Foam::janafThermo<equationOfState> Foam::operator-
|
|||||||
- molr2*jt2.lowCpCoeffs_[coefLabel];
|
- molr2*jt2.lowCpCoeffs_[coefLabel];
|
||||||
}
|
}
|
||||||
|
|
||||||
return janafThermo<equationOfState>
|
return janafThermo<EquationOfState>
|
||||||
(
|
(
|
||||||
eofs,
|
eofs,
|
||||||
max(jt1.Tlow_, jt2.Tlow_),
|
max(jt1.Tlow_, jt2.Tlow_),
|
||||||
@ -341,16 +341,16 @@ inline Foam::janafThermo<equationOfState> Foam::operator-
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::janafThermo<equationOfState> Foam::operator*
|
inline Foam::janafThermo<EquationOfState> Foam::operator*
|
||||||
(
|
(
|
||||||
const scalar s,
|
const scalar s,
|
||||||
const janafThermo<equationOfState>& jt
|
const janafThermo<EquationOfState>& jt
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return janafThermo<equationOfState>
|
return janafThermo<EquationOfState>
|
||||||
(
|
(
|
||||||
s*static_cast<const equationOfState&>(jt),
|
s*static_cast<const EquationOfState&>(jt),
|
||||||
jt.Tlow_,
|
jt.Tlow_,
|
||||||
jt.Thigh_,
|
jt.Thigh_,
|
||||||
jt.Tcommon_,
|
jt.Tcommon_,
|
||||||
@ -360,11 +360,11 @@ inline Foam::janafThermo<equationOfState> Foam::operator*
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class equationOfState>
|
template<class EquationOfState>
|
||||||
inline Foam::janafThermo<equationOfState> Foam::operator==
|
inline Foam::janafThermo<EquationOfState> Foam::operator==
|
||||||
(
|
(
|
||||||
const janafThermo<equationOfState>& jt1,
|
const janafThermo<EquationOfState>& jt1,
|
||||||
const janafThermo<equationOfState>& jt2
|
const janafThermo<EquationOfState>& jt2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return jt2 - jt1;
|
return jt2 - jt1;
|
||||||
|
|||||||
@ -28,48 +28,48 @@ License
|
|||||||
|
|
||||||
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
/* * * * * * * * * * * * * * * private static data * * * * * * * * * * * * * */
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
const Foam::scalar Foam::specieThermo<thermo>::tol_ = 1.0e-4;
|
const Foam::scalar Foam::specieThermo<Thermo>::tol_ = 1.0e-4;
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
const int Foam::specieThermo<thermo>::maxIter_ = 100;
|
const int Foam::specieThermo<Thermo>::maxIter_ = 100;
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
Foam::specieThermo<thermo>::specieThermo(Istream& is)
|
Foam::specieThermo<Thermo>::specieThermo(Istream& is)
|
||||||
:
|
:
|
||||||
thermo(is)
|
Thermo(is)
|
||||||
{
|
{
|
||||||
is.check("specieThermo::specieThermo(Istream& is)");
|
is.check("specieThermo<Thermo>::specieThermo(Istream&)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
Foam::specieThermo<thermo>::specieThermo(const dictionary& dict)
|
Foam::specieThermo<Thermo>::specieThermo(const dictionary& dict)
|
||||||
:
|
:
|
||||||
thermo(dict)
|
Thermo(dict)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
void Foam::specieThermo<thermo>::write(Ostream& os) const
|
void Foam::specieThermo<Thermo>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
thermo::write(os);
|
Thermo::write(os);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Ostream Operator * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
Foam::Ostream& Foam::operator<<(Ostream& os, const specieThermo<thermo>& st)
|
Foam::Ostream& Foam::operator<<(Ostream& os, const specieThermo<Thermo>& st)
|
||||||
{
|
{
|
||||||
os << static_cast<const thermo&>(st);
|
os << static_cast<const Thermo&>(st);
|
||||||
|
|
||||||
os.check("Ostream& operator<<(Ostream& os, const specieThermo& st)");
|
os.check("Ostream& operator<<(Ostream&, const specieThermo&)");
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -45,41 +45,41 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
template<class thermo> class specieThermo;
|
template<class Thermo> class specieThermo;
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline specieThermo<thermo> operator+
|
inline specieThermo<Thermo> operator+
|
||||||
(
|
(
|
||||||
const specieThermo<thermo>&,
|
const specieThermo<Thermo>&,
|
||||||
const specieThermo<thermo>&
|
const specieThermo<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline specieThermo<thermo> operator-
|
inline specieThermo<Thermo> operator-
|
||||||
(
|
(
|
||||||
const specieThermo<thermo>&,
|
const specieThermo<Thermo>&,
|
||||||
const specieThermo<thermo>&
|
const specieThermo<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline specieThermo<thermo> operator*
|
inline specieThermo<Thermo> operator*
|
||||||
(
|
(
|
||||||
const scalar,
|
const scalar,
|
||||||
const specieThermo<thermo>&
|
const specieThermo<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline specieThermo<thermo> operator==
|
inline specieThermo<Thermo> operator==
|
||||||
(
|
(
|
||||||
const specieThermo<thermo>&,
|
const specieThermo<Thermo>&,
|
||||||
const specieThermo<thermo>&
|
const specieThermo<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
Ostream& operator<<
|
Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const specieThermo<thermo>&
|
const specieThermo<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -87,10 +87,10 @@ Ostream& operator<<
|
|||||||
Class specieThermo Declaration
|
Class specieThermo Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
class specieThermo
|
class specieThermo
|
||||||
:
|
:
|
||||||
public thermo
|
public Thermo
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ public:
|
|||||||
// Constructors
|
// Constructors
|
||||||
|
|
||||||
//- construct from components
|
//- construct from components
|
||||||
inline specieThermo(const thermo& sp);
|
inline specieThermo(const Thermo& sp);
|
||||||
|
|
||||||
//- Construct from Istream
|
//- Construct from Istream
|
||||||
specieThermo(Istream&);
|
specieThermo(Istream&);
|
||||||
@ -267,25 +267,25 @@ public:
|
|||||||
|
|
||||||
// Friend operators
|
// Friend operators
|
||||||
|
|
||||||
friend specieThermo operator+ <thermo>
|
friend specieThermo operator+ <Thermo>
|
||||||
(
|
(
|
||||||
const specieThermo&,
|
const specieThermo&,
|
||||||
const specieThermo&
|
const specieThermo&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend specieThermo operator- <thermo>
|
friend specieThermo operator- <Thermo>
|
||||||
(
|
(
|
||||||
const specieThermo&,
|
const specieThermo&,
|
||||||
const specieThermo&
|
const specieThermo&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend specieThermo operator* <thermo>
|
friend specieThermo operator* <Thermo>
|
||||||
(
|
(
|
||||||
const scalar s,
|
const scalar s,
|
||||||
const specieThermo&
|
const specieThermo&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend specieThermo operator== <thermo>
|
friend specieThermo operator== <Thermo>
|
||||||
(
|
(
|
||||||
const specieThermo&,
|
const specieThermo&,
|
||||||
const specieThermo&
|
const specieThermo&
|
||||||
@ -294,7 +294,7 @@ public:
|
|||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|
||||||
friend Ostream& operator<< <thermo>
|
friend Ostream& operator<< <Thermo>
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const specieThermo&
|
const specieThermo&
|
||||||
|
|||||||
@ -27,23 +27,23 @@ License
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::specieThermo<thermo>::specieThermo
|
inline Foam::specieThermo<Thermo>::specieThermo
|
||||||
(
|
(
|
||||||
const thermo& sp
|
const Thermo& sp
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
thermo(sp)
|
Thermo(sp)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::T
|
inline Foam::scalar Foam::specieThermo<Thermo>::T
|
||||||
(
|
(
|
||||||
scalar f,
|
scalar f,
|
||||||
scalar T0,
|
scalar T0,
|
||||||
scalar (specieThermo<thermo>::*F)(const scalar) const,
|
scalar (specieThermo<Thermo>::*F)(const scalar) const,
|
||||||
scalar (specieThermo<thermo>::*dFdT)(const scalar) const
|
scalar (specieThermo<Thermo>::*dFdT)(const scalar) const
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
scalar Test = T0;
|
scalar Test = T0;
|
||||||
@ -60,9 +60,9 @@ inline Foam::scalar Foam::specieThermo<thermo>::T
|
|||||||
{
|
{
|
||||||
FatalErrorIn
|
FatalErrorIn
|
||||||
(
|
(
|
||||||
"specieThermo<thermo>::T(scalar f, scalar T0, "
|
"specieThermo<Thermo>::T(scalar f, scalar T0, "
|
||||||
"scalar (specieThermo<thermo>::*F)(const scalar) const, "
|
"scalar (specieThermo<Thermo>::*F)(const scalar) const, "
|
||||||
"scalar (specieThermo<thermo>::*dFdT)(const scalar) const"
|
"scalar (specieThermo<Thermo>::*dFdT)(const scalar) const"
|
||||||
") const"
|
") const"
|
||||||
) << "Maximum number of iterations exceeded"
|
) << "Maximum number of iterations exceeded"
|
||||||
<< abort(FatalError);
|
<< abort(FatalError);
|
||||||
@ -76,127 +76,127 @@ inline Foam::scalar Foam::specieThermo<thermo>::T
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::specieThermo<thermo>::specieThermo
|
inline Foam::specieThermo<Thermo>::specieThermo
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const specieThermo& st
|
const specieThermo& st
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
thermo(name, st)
|
Thermo(name, st)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::cv(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::cv(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->cp(T) - this->RR;
|
return this->cp(T) - this->RR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::gamma(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::gamma(const scalar T) const
|
||||||
{
|
{
|
||||||
scalar CP = this->cp(T);
|
scalar CP = this->cp(T);
|
||||||
return CP/(CP - this->RR);
|
return CP/(CP - this->RR);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::e(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::e(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->h(T) - this->RR*(T - this->Tstd);
|
return this->h(T) - this->RR*(T - this->Tstd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::es(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::es(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->hs(T) - this->RR*(T - this->Tstd);
|
return this->hs(T) - this->RR*(T - this->Tstd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::g(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::g(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->h(T) - T*this->s(T);
|
return this->h(T) - T*this->s(T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::a(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::a(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->e(T) - T*this->s(T);
|
return this->e(T) - T*this->s(T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::Cp(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::Cp(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->cp(T)/this->W();
|
return this->cp(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::Cv(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::Cv(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->cv(T)/this->W();
|
return this->cv(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::H(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::H(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->h(T)/this->W();
|
return this->h(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::Hs(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::Hs(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->hs(T)/this->W();
|
return this->hs(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::Hc() const
|
inline Foam::scalar Foam::specieThermo<Thermo>::Hc() const
|
||||||
{
|
{
|
||||||
return this->hc()/this->W();
|
return this->hc()/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::S(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::S(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->s(T)/this->W();
|
return this->s(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::E(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::E(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->e(T)/this->W();
|
return this->e(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::G(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::G(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->g(T)/this->W();
|
return this->g(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::A(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::A(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->a(T)/this->W();
|
return this->a(T)/this->W();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::K(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::K(const scalar T) const
|
||||||
{
|
{
|
||||||
scalar arg = -this->nMoles()*this->g(T)/(this->RR*T);
|
scalar arg = -this->nMoles()*this->g(T)/(this->RR*T);
|
||||||
|
|
||||||
@ -211,15 +211,15 @@ inline Foam::scalar Foam::specieThermo<thermo>::K(const scalar T) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::Kp(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::Kp(const scalar T) const
|
||||||
{
|
{
|
||||||
return K(T);
|
return K(T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::Kc(const scalar T) const
|
inline Foam::scalar Foam::specieThermo<Thermo>::Kc(const scalar T) const
|
||||||
{
|
{
|
||||||
if (equal(this->nMoles(), SMALL))
|
if (equal(this->nMoles(), SMALL))
|
||||||
{
|
{
|
||||||
@ -232,8 +232,8 @@ inline Foam::scalar Foam::specieThermo<thermo>::Kc(const scalar T) const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::Kx
|
inline Foam::scalar Foam::specieThermo<Thermo>::Kx
|
||||||
(
|
(
|
||||||
const scalar T,
|
const scalar T,
|
||||||
const scalar p
|
const scalar p
|
||||||
@ -250,8 +250,8 @@ inline Foam::scalar Foam::specieThermo<thermo>::Kx
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::Kn
|
inline Foam::scalar Foam::specieThermo<Thermo>::Kn
|
||||||
(
|
(
|
||||||
const scalar T,
|
const scalar T,
|
||||||
const scalar p,
|
const scalar p,
|
||||||
@ -269,117 +269,117 @@ inline Foam::scalar Foam::specieThermo<thermo>::Kn
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::TH
|
inline Foam::scalar Foam::specieThermo<Thermo>::TH
|
||||||
(
|
(
|
||||||
const scalar h,
|
const scalar h,
|
||||||
const scalar T0
|
const scalar T0
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return T(h, T0, &specieThermo<thermo>::H, &specieThermo<thermo>::Cp);
|
return T(h, T0, &specieThermo<Thermo>::H, &specieThermo<Thermo>::Cp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::THs
|
inline Foam::scalar Foam::specieThermo<Thermo>::THs
|
||||||
(
|
(
|
||||||
const scalar hs,
|
const scalar hs,
|
||||||
const scalar T0
|
const scalar T0
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return T(hs, T0, &specieThermo<thermo>::Hs, &specieThermo<thermo>::Cp);
|
return T(hs, T0, &specieThermo<Thermo>::Hs, &specieThermo<Thermo>::Cp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::scalar Foam::specieThermo<thermo>::TE
|
inline Foam::scalar Foam::specieThermo<Thermo>::TE
|
||||||
(
|
(
|
||||||
const scalar e,
|
const scalar e,
|
||||||
const scalar T0
|
const scalar T0
|
||||||
) const
|
) const
|
||||||
{
|
{
|
||||||
return T(e, T0, &specieThermo<thermo>::E, &specieThermo<thermo>::Cv);
|
return T(e, T0, &specieThermo<Thermo>::E, &specieThermo<Thermo>::Cv);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline void Foam::specieThermo<thermo>::operator+=
|
inline void Foam::specieThermo<Thermo>::operator+=
|
||||||
(
|
(
|
||||||
const specieThermo<thermo>& st
|
const specieThermo<Thermo>& st
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
thermo::operator+=(st);
|
Thermo::operator+=(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline void Foam::specieThermo<thermo>::operator-=
|
inline void Foam::specieThermo<Thermo>::operator-=
|
||||||
(
|
(
|
||||||
const specieThermo<thermo>& st
|
const specieThermo<Thermo>& st
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
thermo::operator-=(st);
|
Thermo::operator-=(st);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline void Foam::specieThermo<thermo>::operator*=(const scalar s)
|
inline void Foam::specieThermo<Thermo>::operator*=(const scalar s)
|
||||||
{
|
{
|
||||||
thermo::operator*=(s);
|
Thermo::operator*=(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::specieThermo<thermo> Foam::operator+
|
inline Foam::specieThermo<Thermo> Foam::operator+
|
||||||
(
|
(
|
||||||
const specieThermo<thermo>& st1,
|
const specieThermo<Thermo>& st1,
|
||||||
const specieThermo<thermo>& st2
|
const specieThermo<Thermo>& st2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return specieThermo<thermo>
|
return specieThermo<Thermo>
|
||||||
(
|
(
|
||||||
static_cast<const thermo&>(st1) + static_cast<const thermo&>(st2)
|
static_cast<const Thermo&>(st1) + static_cast<const Thermo&>(st2)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::specieThermo<thermo> Foam::operator-
|
inline Foam::specieThermo<Thermo> Foam::operator-
|
||||||
(
|
(
|
||||||
const specieThermo<thermo>& st1,
|
const specieThermo<Thermo>& st1,
|
||||||
const specieThermo<thermo>& st2
|
const specieThermo<Thermo>& st2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return specieThermo<thermo>
|
return specieThermo<Thermo>
|
||||||
(
|
(
|
||||||
static_cast<const thermo&>(st1) - static_cast<const thermo&>(st2)
|
static_cast<const Thermo&>(st1) - static_cast<const Thermo&>(st2)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::specieThermo<thermo> Foam::operator*
|
inline Foam::specieThermo<Thermo> Foam::operator*
|
||||||
(
|
(
|
||||||
const scalar s,
|
const scalar s,
|
||||||
const specieThermo<thermo>& st
|
const specieThermo<Thermo>& st
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return specieThermo<thermo>
|
return specieThermo<Thermo>
|
||||||
(
|
(
|
||||||
s*static_cast<const thermo&>(st)
|
s*static_cast<const Thermo&>(st)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline Foam::specieThermo<thermo> Foam::operator==
|
inline Foam::specieThermo<Thermo> Foam::operator==
|
||||||
(
|
(
|
||||||
const specieThermo<thermo>& st1,
|
const specieThermo<Thermo>& st1,
|
||||||
const specieThermo<thermo>& st2
|
const specieThermo<Thermo>& st2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return st2 - st1;
|
return st2 - st1;
|
||||||
|
|||||||
@ -26,63 +26,54 @@ License
|
|||||||
#include "constTransport.H"
|
#include "constTransport.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
constTransport<thermo>::constTransport(Istream& is)
|
Foam::constTransport<Thermo>::constTransport(Istream& is)
|
||||||
:
|
:
|
||||||
thermo(is),
|
Thermo(is),
|
||||||
Mu_(readScalar(is)),
|
mu_(readScalar(is)),
|
||||||
rPr_(1.0/readScalar(is))
|
rPr_(1.0/readScalar(is))
|
||||||
{
|
{
|
||||||
is.check("constTransport::constTransport(Istream& is)");
|
is.check("constTransport::constTransport(Istream& is)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
constTransport<thermo>::constTransport(const dictionary& dict)
|
Foam::constTransport<Thermo>::constTransport(const dictionary& dict)
|
||||||
:
|
:
|
||||||
thermo(dict),
|
Thermo(dict),
|
||||||
Mu_(readScalar(dict.lookup("Mu"))),
|
mu_(readScalar(dict.lookup("mu"))),
|
||||||
rPr_(1.0/readScalar(dict.lookup("Pr")))
|
rPr_(1.0/readScalar(dict.lookup("Pr")))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
void constTransport<thermo>::constTransport::write(Ostream& os) const
|
void Foam::constTransport<Thermo>::constTransport::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << this->name() << endl;
|
os << this->name() << endl;
|
||||||
os << token::BEGIN_BLOCK << incrIndent << nl;
|
os << token::BEGIN_BLOCK << incrIndent << nl;
|
||||||
thermo::write(os);
|
Thermo::write(os);
|
||||||
os.writeKeyword("Mu") << Mu_ << token::END_STATEMENT << nl;
|
os.writeKeyword("mu") << mu_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("Pr") << Mu_ << token::END_STATEMENT << nl;
|
os.writeKeyword("Pr") << 1.0/rPr_ << token::END_STATEMENT << nl;
|
||||||
os << decrIndent << token::END_BLOCK << nl;
|
os << decrIndent << token::END_BLOCK << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
Ostream& operator<<(Ostream& os, const constTransport<thermo>& ct)
|
Foam::Ostream& Foam::operator<<(Ostream& os, const constTransport<Thermo>& ct)
|
||||||
{
|
{
|
||||||
operator<<(os, static_cast<const thermo&>(ct));
|
operator<<(os, static_cast<const Thermo&>(ct));
|
||||||
os << tab << ct.Mu_ << tab << 1.0/ct.rPr_;
|
os << tab << ct.mu_ << tab << 1.0/ct.rPr_;
|
||||||
|
|
||||||
os.check("Ostream& operator<<(Ostream& os, const constTransport& ct)");
|
os.check("Ostream& operator<<(Ostream&, const constTransport&)");
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -45,41 +45,41 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
template<class thermo> class constTransport;
|
template<class Thermo> class constTransport;
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo> operator+
|
inline constTransport<Thermo> operator+
|
||||||
(
|
(
|
||||||
const constTransport<thermo>&,
|
const constTransport<Thermo>&,
|
||||||
const constTransport<thermo>&
|
const constTransport<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo> operator-
|
inline constTransport<Thermo> operator-
|
||||||
(
|
(
|
||||||
const constTransport<thermo>&,
|
const constTransport<Thermo>&,
|
||||||
const constTransport<thermo>&
|
const constTransport<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo> operator*
|
inline constTransport<Thermo> operator*
|
||||||
(
|
(
|
||||||
const scalar,
|
const scalar,
|
||||||
const constTransport<thermo>&
|
const constTransport<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo> operator==
|
inline constTransport<Thermo> operator==
|
||||||
(
|
(
|
||||||
const constTransport<thermo>&,
|
const constTransport<Thermo>&,
|
||||||
const constTransport<thermo>&
|
const constTransport<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
Ostream& operator<<
|
Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const constTransport<thermo>&
|
const constTransport<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -87,15 +87,15 @@ Ostream& operator<<
|
|||||||
Class constTransport Declaration
|
Class constTransport Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
class constTransport
|
class constTransport
|
||||||
:
|
:
|
||||||
public thermo
|
public Thermo
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
//- Constant viscosity [Pa.s]
|
//- Constant dynamic viscosity [Pa.s]
|
||||||
scalar Mu_;
|
scalar mu_;
|
||||||
|
|
||||||
//- Reciprocal Prandtl Number []
|
//- Reciprocal Prandtl Number []
|
||||||
scalar rPr_;
|
scalar rPr_;
|
||||||
@ -106,8 +106,8 @@ class constTransport
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline constTransport
|
inline constTransport
|
||||||
(
|
(
|
||||||
const thermo& t,
|
const Thermo& t,
|
||||||
const scalar nu,
|
const scalar mu,
|
||||||
const scalar Pr
|
const scalar Pr
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -154,25 +154,25 @@ public:
|
|||||||
|
|
||||||
// Friend operators
|
// Friend operators
|
||||||
|
|
||||||
friend constTransport operator+ <thermo>
|
friend constTransport operator+ <Thermo>
|
||||||
(
|
(
|
||||||
const constTransport&,
|
const constTransport&,
|
||||||
const constTransport&
|
const constTransport&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend constTransport operator- <thermo>
|
friend constTransport operator- <Thermo>
|
||||||
(
|
(
|
||||||
const constTransport&,
|
const constTransport&,
|
||||||
const constTransport&
|
const constTransport&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend constTransport operator* <thermo>
|
friend constTransport operator* <Thermo>
|
||||||
(
|
(
|
||||||
const scalar,
|
const scalar,
|
||||||
const constTransport&
|
const constTransport&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend constTransport operator== <thermo>
|
friend constTransport operator== <Thermo>
|
||||||
(
|
(
|
||||||
const constTransport&,
|
const constTransport&,
|
||||||
const constTransport&
|
const constTransport&
|
||||||
@ -181,7 +181,7 @@ public:
|
|||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|
||||||
friend Ostream& operator<< <thermo>
|
friend Ostream& operator<< <Thermo>
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const constTransport&
|
const constTransport&
|
||||||
|
|||||||
@ -23,58 +23,53 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo>::constTransport
|
inline Foam::constTransport<Thermo>::constTransport
|
||||||
(
|
(
|
||||||
const thermo& t,
|
const Thermo& t,
|
||||||
const scalar mu,
|
const scalar mu,
|
||||||
const scalar Pr
|
const scalar Pr
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
thermo(t),
|
Thermo(t),
|
||||||
Mu_(mu),
|
mu_(mu),
|
||||||
rPr_(1.0/Pr)
|
rPr_(1.0/Pr)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo>::constTransport
|
inline Foam::constTransport<Thermo>::constTransport
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const constTransport& ct
|
const constTransport& ct
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
thermo(name, ct),
|
Thermo(name, ct),
|
||||||
Mu_(ct.Mu_),
|
mu_(ct.mu_),
|
||||||
rPr_(ct.rPr_)
|
rPr_(ct.rPr_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline scalar constTransport<thermo>::mu(const scalar) const
|
inline Foam::scalar Foam::constTransport<Thermo>::mu(const scalar) const
|
||||||
{
|
{
|
||||||
return Mu_;
|
return mu_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline scalar constTransport<thermo>::kappa(const scalar T) const
|
inline Foam::scalar Foam::constTransport<Thermo>::kappa(const scalar T) const
|
||||||
{
|
{
|
||||||
return this->Cp(T)*mu(T)*rPr_;
|
return this->Cp(T)*mu(T)*rPr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline scalar constTransport<thermo>::alpha(const scalar T) const
|
inline Foam::scalar Foam::constTransport<Thermo>::alpha(const scalar T) const
|
||||||
{
|
{
|
||||||
scalar Cp_ = this->Cp(T);
|
scalar Cp_ = this->Cp(T);
|
||||||
|
|
||||||
@ -88,15 +83,15 @@ inline scalar constTransport<thermo>::alpha(const scalar T) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo>& constTransport<thermo>::operator=
|
inline Foam::constTransport<Thermo>& Foam::constTransport<Thermo>::operator=
|
||||||
(
|
(
|
||||||
const constTransport<thermo>& ct
|
const constTransport<Thermo>& ct
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
thermo::operator=(ct);
|
Thermo::operator=(ct);
|
||||||
|
|
||||||
Mu_ = ct.Mu_;
|
mu_ = ct.mu_;
|
||||||
rPr_ = ct.rPr_;
|
rPr_ = ct.rPr_;
|
||||||
|
|
||||||
return *this;
|
return *this;
|
||||||
@ -105,83 +100,79 @@ inline constTransport<thermo>& constTransport<thermo>::operator=
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo> operator+
|
inline Foam::constTransport<Thermo> Foam::operator+
|
||||||
(
|
(
|
||||||
const constTransport<thermo>& ct1,
|
const constTransport<Thermo>& ct1,
|
||||||
const constTransport<thermo>& ct2
|
const constTransport<Thermo>& ct2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
thermo t
|
Thermo t
|
||||||
(
|
(
|
||||||
static_cast<const thermo&>(ct1) + static_cast<const thermo&>(ct2)
|
static_cast<const Thermo&>(ct1) + static_cast<const Thermo&>(ct2)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar molr1 = ct1.nMoles()/t.nMoles();
|
scalar molr1 = ct1.nMoles()/t.nMoles();
|
||||||
scalar molr2 = ct2.nMoles()/t.nMoles();
|
scalar molr2 = ct2.nMoles()/t.nMoles();
|
||||||
|
|
||||||
return constTransport<thermo>
|
return constTransport<Thermo>
|
||||||
(
|
(
|
||||||
t,
|
t,
|
||||||
molr1*ct1.Mu_ + molr2*ct2.Mu_,
|
molr1*ct1.mu_ + molr2*ct2.mu_,
|
||||||
molr1*ct1.rPr_ + molr2*ct2.rPr_
|
molr1*ct1.rPr_ + molr2*ct2.rPr_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo> operator-
|
inline Foam::constTransport<Thermo> Foam::operator-
|
||||||
(
|
(
|
||||||
const constTransport<thermo>& ct1,
|
const constTransport<Thermo>& ct1,
|
||||||
const constTransport<thermo>& ct2
|
const constTransport<Thermo>& ct2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
thermo t
|
Thermo t
|
||||||
(
|
(
|
||||||
static_cast<const thermo&>(ct1) - static_cast<const thermo&>(ct2)
|
static_cast<const Thermo&>(ct1) - static_cast<const Thermo&>(ct2)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar molr1 = ct1.nMoles()/t.nMoles();
|
scalar molr1 = ct1.nMoles()/t.nMoles();
|
||||||
scalar molr2 = ct2.nMoles()/t.nMoles();
|
scalar molr2 = ct2.nMoles()/t.nMoles();
|
||||||
|
|
||||||
return constTransport<thermo>
|
return constTransport<Thermo>
|
||||||
(
|
(
|
||||||
t,
|
t,
|
||||||
molr1*ct1.Mu_ - molr2*ct2.Mu_,
|
molr1*ct1.mu_ - molr2*ct2.mu_,
|
||||||
molr1*ct1.rPr_ - molr2*ct2.rPr_
|
molr1*ct1.rPr_ - molr2*ct2.rPr_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo> operator*
|
inline Foam::constTransport<Thermo> Foam::operator*
|
||||||
(
|
(
|
||||||
const scalar s,
|
const scalar s,
|
||||||
const constTransport<thermo>& ct
|
const constTransport<Thermo>& ct
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return constTransport<thermo>
|
return constTransport<Thermo>
|
||||||
(
|
(
|
||||||
s*static_cast<const thermo&>(ct),
|
s*static_cast<const Thermo&>(ct),
|
||||||
ct.Mu_,
|
ct.mu_,
|
||||||
ct.rPr_
|
ct.rPr_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline constTransport<thermo> operator==
|
inline Foam::constTransport<Thermo> Foam::operator==
|
||||||
(
|
(
|
||||||
const constTransport<thermo>& ct1,
|
const constTransport<Thermo>& ct1,
|
||||||
const constTransport<thermo>& ct2
|
const constTransport<Thermo>& ct2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return ct2 - ct1;
|
return ct2 - ct1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -29,14 +29,9 @@ License
|
|||||||
#include "speciesTransport.H"
|
#include "speciesTransport.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
speciesTransport::speciesTransport(Istream& is)
|
Foam::speciesTransport::speciesTransport(Istream& is)
|
||||||
:
|
:
|
||||||
janafThermo(is)
|
janafThermo(is)
|
||||||
{
|
{
|
||||||
@ -44,7 +39,7 @@ speciesTransport::speciesTransport(Istream& is)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
speciesTransport::speciesTransport(const dictionary& dict)
|
Foam::speciesTransport::speciesTransport(const dictionary& dict)
|
||||||
:
|
:
|
||||||
janafThermo(dict)
|
janafThermo(dict)
|
||||||
{}
|
{}
|
||||||
@ -52,7 +47,7 @@ speciesTransport::speciesTransport(const dictionary& dict)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
void speciesTransport::write(Ostream& os) const
|
void Foam::speciesTransport::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << this->name() << endl;
|
os << this->name() << endl;
|
||||||
os << token::BEGIN_BLOCK << incrIndent << nl;
|
os << token::BEGIN_BLOCK << incrIndent << nl;
|
||||||
@ -63,18 +58,14 @@ void speciesTransport::write(Ostream& os) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
Ostream& operator<<(Ostream& os, const speciesTransport& sTranport)
|
Foam::Ostream& Foam::operator<<(Ostream& os, const speciesTransport& sTranport)
|
||||||
{
|
{
|
||||||
os << (const janafThermo&)sTranport;
|
os << (const janafThermo&)sTranport;
|
||||||
|
|
||||||
os.check("Ostream& operator<<(Ostream& os, const speciesTransport& st)");
|
os.check("Ostream& operator<<(Ostream&, const speciesTransport)");
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -23,25 +23,12 @@ License
|
|||||||
|
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Construct from speciesThermo
|
inline Foam::speciesTransport::speciesTransport(const janafThermo& sThermo)
|
||||||
inline speciesTransport::speciesTransport
|
|
||||||
(
|
|
||||||
const janafThermo& sThermo
|
|
||||||
)
|
|
||||||
:
|
:
|
||||||
janafThermo(sThermo)
|
janafThermo(sThermo)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -26,28 +26,23 @@ License
|
|||||||
#include "sutherlandTransport.H"
|
#include "sutherlandTransport.H"
|
||||||
#include "IOstreams.H"
|
#include "IOstreams.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
sutherlandTransport<thermo>::sutherlandTransport(Istream& is)
|
Foam::sutherlandTransport<Thermo>::sutherlandTransport(Istream& is)
|
||||||
:
|
:
|
||||||
thermo(is),
|
Thermo(is),
|
||||||
As_(readScalar(is)),
|
As_(readScalar(is)),
|
||||||
Ts_(readScalar(is))
|
Ts_(readScalar(is))
|
||||||
{
|
{
|
||||||
is.check("sutherlandTransport<thermo>::sutherlandTransport(Istream&)");
|
is.check("sutherlandTransport<Thermo>::sutherlandTransport(Istream&)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
sutherlandTransport<thermo>::sutherlandTransport(const dictionary& dict)
|
Foam::sutherlandTransport<Thermo>::sutherlandTransport(const dictionary& dict)
|
||||||
:
|
:
|
||||||
thermo(dict),
|
Thermo(dict),
|
||||||
As_(readScalar(dict.lookup("As"))),
|
As_(readScalar(dict.lookup("As"))),
|
||||||
Ts_(readScalar(dict.lookup("Ts")))
|
Ts_(readScalar(dict.lookup("Ts")))
|
||||||
{}
|
{}
|
||||||
@ -55,35 +50,34 @@ sutherlandTransport<thermo>::sutherlandTransport(const dictionary& dict)
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
void sutherlandTransport<thermo>::write(Ostream& os) const
|
void Foam::sutherlandTransport<Thermo>::write(Ostream& os) const
|
||||||
{
|
{
|
||||||
os << this->name() << endl;
|
os << this->name() << endl;
|
||||||
os << token::BEGIN_BLOCK << incrIndent << nl;
|
os << token::BEGIN_BLOCK << incrIndent << nl;
|
||||||
thermo::write(os);
|
Thermo::write(os);
|
||||||
os.writeKeyword("As") << As_ << token::END_STATEMENT << nl;
|
os.writeKeyword("As") << As_ << token::END_STATEMENT << nl;
|
||||||
os.writeKeyword("Ts") << As_ << token::END_STATEMENT << nl;
|
os.writeKeyword("Ts") << Ts_ << token::END_STATEMENT << nl;
|
||||||
os << decrIndent << token::END_BLOCK << nl;
|
os << decrIndent << token::END_BLOCK << nl;
|
||||||
}
|
}
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
Ostream& operator<<(Ostream& os, const sutherlandTransport<thermo>& st)
|
Foam::Ostream& Foam::operator<<
|
||||||
|
(
|
||||||
|
Ostream& os, const sutherlandTransport<Thermo>& st
|
||||||
|
)
|
||||||
{
|
{
|
||||||
os << static_cast<const thermo&>(st) << tab << st.As_ << tab << st.Ts_;
|
os << static_cast<const Thermo&>(st) << tab << st.As_ << tab << st.Ts_;
|
||||||
|
|
||||||
os.check
|
os.check
|
||||||
(
|
(
|
||||||
"Ostream& operator<<(Ostream&, const sutherlandTransport<thermo>&)"
|
"Ostream& operator<<(Ostream&, const sutherlandTransport<Thermo>&)"
|
||||||
);
|
);
|
||||||
|
|
||||||
return os;
|
return os;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -51,41 +51,41 @@ namespace Foam
|
|||||||
|
|
||||||
// Forward declaration of friend functions and operators
|
// Forward declaration of friend functions and operators
|
||||||
|
|
||||||
template<class thermo> class sutherlandTransport;
|
template<class Thermo> class sutherlandTransport;
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo> operator+
|
inline sutherlandTransport<Thermo> operator+
|
||||||
(
|
(
|
||||||
const sutherlandTransport<thermo>&,
|
const sutherlandTransport<Thermo>&,
|
||||||
const sutherlandTransport<thermo>&
|
const sutherlandTransport<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo> operator-
|
inline sutherlandTransport<Thermo> operator-
|
||||||
(
|
(
|
||||||
const sutherlandTransport<thermo>&,
|
const sutherlandTransport<Thermo>&,
|
||||||
const sutherlandTransport<thermo>&
|
const sutherlandTransport<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo> operator*
|
inline sutherlandTransport<Thermo> operator*
|
||||||
(
|
(
|
||||||
const scalar,
|
const scalar,
|
||||||
const sutherlandTransport<thermo>&
|
const sutherlandTransport<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo> operator==
|
inline sutherlandTransport<Thermo> operator==
|
||||||
(
|
(
|
||||||
const sutherlandTransport<thermo>&,
|
const sutherlandTransport<Thermo>&,
|
||||||
const sutherlandTransport<thermo>&
|
const sutherlandTransport<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
Ostream& operator<<
|
Ostream& operator<<
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const sutherlandTransport<thermo>&
|
const sutherlandTransport<Thermo>&
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
||||||
@ -93,10 +93,10 @@ Ostream& operator<<
|
|||||||
Class sutherlandTransport Declaration
|
Class sutherlandTransport Declaration
|
||||||
\*---------------------------------------------------------------------------*/
|
\*---------------------------------------------------------------------------*/
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
class sutherlandTransport
|
class sutherlandTransport
|
||||||
:
|
:
|
||||||
public thermo
|
public Thermo
|
||||||
{
|
{
|
||||||
// Private data
|
// Private data
|
||||||
|
|
||||||
@ -122,15 +122,15 @@ public:
|
|||||||
//- Construct from components
|
//- Construct from components
|
||||||
inline sutherlandTransport
|
inline sutherlandTransport
|
||||||
(
|
(
|
||||||
const thermo& t,
|
const Thermo& t,
|
||||||
const scalar as,
|
const scalar As,
|
||||||
const scalar ts
|
const scalar Ts
|
||||||
);
|
);
|
||||||
|
|
||||||
//- Construct from two viscosities
|
//- Construct from two viscosities
|
||||||
inline sutherlandTransport
|
inline sutherlandTransport
|
||||||
(
|
(
|
||||||
const thermo& t,
|
const Thermo& t,
|
||||||
const scalar mu1, const scalar T1,
|
const scalar mu1, const scalar T1,
|
||||||
const scalar mu2, const scalar T2
|
const scalar mu2, const scalar T2
|
||||||
);
|
);
|
||||||
@ -182,25 +182,25 @@ public:
|
|||||||
|
|
||||||
// Friend operators
|
// Friend operators
|
||||||
|
|
||||||
friend sutherlandTransport operator+ <thermo>
|
friend sutherlandTransport operator+ <Thermo>
|
||||||
(
|
(
|
||||||
const sutherlandTransport&,
|
const sutherlandTransport&,
|
||||||
const sutherlandTransport&
|
const sutherlandTransport&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend sutherlandTransport operator- <thermo>
|
friend sutherlandTransport operator- <Thermo>
|
||||||
(
|
(
|
||||||
const sutherlandTransport&,
|
const sutherlandTransport&,
|
||||||
const sutherlandTransport&
|
const sutherlandTransport&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend sutherlandTransport operator* <thermo>
|
friend sutherlandTransport operator* <Thermo>
|
||||||
(
|
(
|
||||||
const scalar,
|
const scalar,
|
||||||
const sutherlandTransport&
|
const sutherlandTransport&
|
||||||
);
|
);
|
||||||
|
|
||||||
friend sutherlandTransport operator== <thermo>
|
friend sutherlandTransport operator== <Thermo>
|
||||||
(
|
(
|
||||||
const sutherlandTransport&,
|
const sutherlandTransport&,
|
||||||
const sutherlandTransport&
|
const sutherlandTransport&
|
||||||
@ -209,7 +209,7 @@ public:
|
|||||||
|
|
||||||
// Ostream Operator
|
// Ostream Operator
|
||||||
|
|
||||||
friend Ostream& operator<< <thermo>
|
friend Ostream& operator<< <Thermo>
|
||||||
(
|
(
|
||||||
Ostream&,
|
Ostream&,
|
||||||
const sutherlandTransport&
|
const sutherlandTransport&
|
||||||
|
|||||||
@ -25,15 +25,10 @@ License
|
|||||||
|
|
||||||
#include "specie.H"
|
#include "specie.H"
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
namespace Foam
|
|
||||||
{
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline void sutherlandTransport<thermo>::calcCoeffs
|
inline void Foam::sutherlandTransport<Thermo>::calcCoeffs
|
||||||
(
|
(
|
||||||
const scalar mu1, const scalar T1,
|
const scalar mu1, const scalar T1,
|
||||||
const scalar mu2, const scalar T2
|
const scalar mu2, const scalar T2
|
||||||
@ -51,104 +46,111 @@ inline void sutherlandTransport<thermo>::calcCoeffs
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo>::sutherlandTransport
|
inline Foam::sutherlandTransport<Thermo>::sutherlandTransport
|
||||||
(
|
(
|
||||||
const thermo& t,
|
const Thermo& t,
|
||||||
const scalar as,
|
const scalar As,
|
||||||
const scalar ts
|
const scalar Ts
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
thermo(t),
|
Thermo(t),
|
||||||
As_(as),
|
As_(As),
|
||||||
Ts_(ts)
|
Ts_(Ts)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo>::sutherlandTransport
|
inline Foam::sutherlandTransport<Thermo>::sutherlandTransport
|
||||||
(
|
(
|
||||||
const thermo& t,
|
const Thermo& t,
|
||||||
const scalar mu1, const scalar T1,
|
const scalar mu1, const scalar T1,
|
||||||
const scalar mu2, const scalar T2
|
const scalar mu2, const scalar T2
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
thermo(t)
|
Thermo(t)
|
||||||
{
|
{
|
||||||
calcCoeffs(mu1, T1, mu2, T2);
|
calcCoeffs(mu1, T1, mu2, T2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo>::sutherlandTransport
|
inline Foam::sutherlandTransport<Thermo>::sutherlandTransport
|
||||||
(
|
(
|
||||||
const word& name,
|
const word& name,
|
||||||
const sutherlandTransport& st
|
const sutherlandTransport& st
|
||||||
)
|
)
|
||||||
:
|
:
|
||||||
thermo(name, st),
|
Thermo(name, st),
|
||||||
As_(st.As_),
|
As_(st.As_),
|
||||||
Ts_(st.Ts_)
|
Ts_(st.Ts_)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline autoPtr<sutherlandTransport<thermo> > sutherlandTransport<thermo>::clone
|
inline Foam::autoPtr<Foam::sutherlandTransport<Thermo> >
|
||||||
() const
|
Foam::sutherlandTransport<Thermo>::clone() const
|
||||||
{
|
{
|
||||||
return autoPtr<sutherlandTransport<thermo> >
|
return autoPtr<sutherlandTransport<Thermo> >
|
||||||
(
|
(
|
||||||
new sutherlandTransport<thermo>(*this)
|
new sutherlandTransport<Thermo>(*this)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline autoPtr<sutherlandTransport<thermo> > sutherlandTransport<thermo>::New
|
inline Foam::autoPtr<Foam::sutherlandTransport<Thermo> >
|
||||||
|
Foam::sutherlandTransport<Thermo>::New
|
||||||
(
|
(
|
||||||
Istream& is
|
Istream& is
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return autoPtr<sutherlandTransport<thermo> >
|
return autoPtr<sutherlandTransport<Thermo> >
|
||||||
(
|
(
|
||||||
new sutherlandTransport<thermo>(is)
|
new sutherlandTransport<Thermo>(is)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline autoPtr<sutherlandTransport<thermo> > sutherlandTransport<thermo>::New
|
inline Foam::autoPtr<Foam::sutherlandTransport<Thermo> >
|
||||||
|
Foam::sutherlandTransport<Thermo>::New
|
||||||
(
|
(
|
||||||
const dictionary& dict
|
const dictionary& dict
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return autoPtr<sutherlandTransport<thermo> >
|
return autoPtr<sutherlandTransport<Thermo> >
|
||||||
(
|
(
|
||||||
new sutherlandTransport<thermo>(dict)
|
new sutherlandTransport<Thermo>(dict)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
|
||||||
|
|
||||||
// Dynamic viscosity [kg/ms]
|
template<class Thermo>
|
||||||
template<class thermo>
|
inline Foam::scalar Foam::sutherlandTransport<Thermo>::mu(const scalar T) const
|
||||||
inline scalar sutherlandTransport<thermo>::mu(const scalar T) const
|
|
||||||
{
|
{
|
||||||
return As_*::sqrt(T)/(1.0 + Ts_/T);
|
return As_*::sqrt(T)/(1.0 + Ts_/T);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline scalar sutherlandTransport<thermo>::kappa(const scalar T) const
|
inline Foam::scalar Foam::sutherlandTransport<Thermo>::kappa
|
||||||
|
(
|
||||||
|
const scalar T
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
scalar Cv_ = this->Cv(T);
|
scalar Cv_ = this->Cv(T);
|
||||||
return mu(T)*Cv_*(1.32 + 1.77*this->R()/Cv_);
|
return mu(T)*Cv_*(1.32 + 1.77*this->R()/Cv_);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline scalar sutherlandTransport<thermo>::alpha(const scalar T) const
|
inline Foam::scalar Foam::sutherlandTransport<Thermo>::alpha
|
||||||
|
(
|
||||||
|
const scalar T
|
||||||
|
) const
|
||||||
{
|
{
|
||||||
scalar Cv_ = this->Cv(T);
|
scalar Cv_ = this->Cv(T);
|
||||||
scalar R_ = this->R();
|
scalar R_ = this->R();
|
||||||
@ -164,13 +166,14 @@ inline scalar sutherlandTransport<thermo>::alpha(const scalar T) const
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo>& sutherlandTransport<thermo>::operator=
|
inline Foam::sutherlandTransport<Thermo>&
|
||||||
|
Foam::sutherlandTransport<Thermo>::operator=
|
||||||
(
|
(
|
||||||
const sutherlandTransport<thermo>& st
|
const sutherlandTransport<Thermo>& st
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
thermo::operator=(st);
|
Thermo::operator=(st);
|
||||||
|
|
||||||
As_ = st.As_;
|
As_ = st.As_;
|
||||||
Ts_ = st.Ts_;
|
Ts_ = st.Ts_;
|
||||||
@ -181,22 +184,22 @@ inline sutherlandTransport<thermo>& sutherlandTransport<thermo>::operator=
|
|||||||
|
|
||||||
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * //
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo> operator+
|
inline Foam::sutherlandTransport<Thermo> Foam::operator+
|
||||||
(
|
(
|
||||||
const sutherlandTransport<thermo>& st1,
|
const sutherlandTransport<Thermo>& st1,
|
||||||
const sutherlandTransport<thermo>& st2
|
const sutherlandTransport<Thermo>& st2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
thermo t
|
Thermo t
|
||||||
(
|
(
|
||||||
static_cast<const thermo&>(st1) + static_cast<const thermo&>(st2)
|
static_cast<const Thermo&>(st1) + static_cast<const Thermo&>(st2)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar molr1 = st1.nMoles()/t.nMoles();
|
scalar molr1 = st1.nMoles()/t.nMoles();
|
||||||
scalar molr2 = st2.nMoles()/t.nMoles();
|
scalar molr2 = st2.nMoles()/t.nMoles();
|
||||||
|
|
||||||
return sutherlandTransport<thermo>
|
return sutherlandTransport<Thermo>
|
||||||
(
|
(
|
||||||
t,
|
t,
|
||||||
molr1*st1.As_ + molr2*st2.As_,
|
molr1*st1.As_ + molr2*st2.As_,
|
||||||
@ -205,22 +208,22 @@ inline sutherlandTransport<thermo> operator+
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo> operator-
|
inline Foam::sutherlandTransport<Thermo> Foam::operator-
|
||||||
(
|
(
|
||||||
const sutherlandTransport<thermo>& st1,
|
const sutherlandTransport<Thermo>& st1,
|
||||||
const sutherlandTransport<thermo>& st2
|
const sutherlandTransport<Thermo>& st2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
thermo t
|
Thermo t
|
||||||
(
|
(
|
||||||
static_cast<const thermo&>(st1) - static_cast<const thermo&>(st2)
|
static_cast<const Thermo&>(st1) - static_cast<const Thermo&>(st2)
|
||||||
);
|
);
|
||||||
|
|
||||||
scalar molr1 = st1.nMoles()/t.nMoles();
|
scalar molr1 = st1.nMoles()/t.nMoles();
|
||||||
scalar molr2 = st2.nMoles()/t.nMoles();
|
scalar molr2 = st2.nMoles()/t.nMoles();
|
||||||
|
|
||||||
return sutherlandTransport<thermo>
|
return sutherlandTransport<Thermo>
|
||||||
(
|
(
|
||||||
t,
|
t,
|
||||||
molr1*st1.As_ - molr2*st2.As_,
|
molr1*st1.As_ - molr2*st2.As_,
|
||||||
@ -229,35 +232,31 @@ inline sutherlandTransport<thermo> operator-
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo> operator*
|
inline Foam::sutherlandTransport<Thermo> Foam::operator*
|
||||||
(
|
(
|
||||||
const scalar s,
|
const scalar s,
|
||||||
const sutherlandTransport<thermo>& st
|
const sutherlandTransport<Thermo>& st
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return sutherlandTransport<thermo>
|
return sutherlandTransport<Thermo>
|
||||||
(
|
(
|
||||||
s*static_cast<const thermo&>(st),
|
s*static_cast<const Thermo&>(st),
|
||||||
st.As_,
|
st.As_,
|
||||||
st.Ts_
|
st.Ts_
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<class thermo>
|
template<class Thermo>
|
||||||
inline sutherlandTransport<thermo> operator==
|
inline Foam::sutherlandTransport<Thermo> Foam::operator==
|
||||||
(
|
(
|
||||||
const sutherlandTransport<thermo>& st1,
|
const sutherlandTransport<Thermo>& st1,
|
||||||
const sutherlandTransport<thermo>& st2
|
const sutherlandTransport<Thermo>& st2
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return st2 - st1;
|
return st2 - st1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
|
||||||
|
|
||||||
} // End namespace Foam
|
|
||||||
|
|
||||||
// ************************************************************************* //
|
// ************************************************************************* //
|
||||||
|
|||||||
@ -26,7 +26,7 @@ mixture
|
|||||||
molWeight 11640.3;
|
molWeight 11640.3;
|
||||||
Cp 2.5;
|
Cp 2.5;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 0;
|
mu 0;
|
||||||
Pr 1;
|
Pr 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ mixture
|
|||||||
molWeight 11640.3;
|
molWeight 11640.3;
|
||||||
Cp 2.5;
|
Cp 2.5;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 0;
|
mu 0;
|
||||||
Pr 1;
|
Pr 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.96;
|
molWeight 28.96;
|
||||||
Cp 1004.5;
|
Cp 1004.5;
|
||||||
Hf 2.544e+06;
|
Hf 2.544e+06;
|
||||||
Mu 0;
|
mu 0;
|
||||||
Pr 1;
|
Pr 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ mixture
|
|||||||
molWeight 11640.3;
|
molWeight 11640.3;
|
||||||
Cp 2.5;
|
Cp 2.5;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 0;
|
mu 0;
|
||||||
Pr 1;
|
Pr 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1007;
|
Cp 1007;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.84e-05;
|
mu 1.84e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -26,7 +26,7 @@ mixture
|
|||||||
molWeight 11640.3;
|
molWeight 11640.3;
|
||||||
Cp 2.5;
|
Cp 2.5;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 0;
|
mu 0;
|
||||||
Pr 1;
|
Pr 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cv 717.5;
|
Cv 717.5;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 0;
|
mu 0;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cv 717.5;
|
Cv 717.5;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cv 717.5;
|
Cv 717.5;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.96;
|
molWeight 28.96;
|
||||||
Cp 1004.4;
|
Cp 1004.4;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.831e-05;
|
mu 1.831e-05;
|
||||||
Pr 0.705;
|
Pr 0.705;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -25,7 +25,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1000;
|
Cp 1000;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.8e-05;
|
mu 1.8e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,7 +23,7 @@ mixture
|
|||||||
molWeight 28.9;
|
molWeight 28.9;
|
||||||
Cp 1007;
|
Cp 1007;
|
||||||
Hf 0;
|
Hf 0;
|
||||||
Mu 1.84e-05;
|
mu 1.84e-05;
|
||||||
Pr 0.7;
|
Pr 0.7;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user