33 template<
class EquationOfState>
39 <<
"Tlow(" << Tlow_ <<
") >= Thigh(" << Thigh_ <<
')' 43 if (Tcommon_ <= Tlow_)
46 <<
"Tcommon(" << Tcommon_ <<
") <= Tlow(" << Tlow_ <<
')' 50 if (Tcommon_ > Thigh_)
53 <<
"Tcommon(" << Tcommon_ <<
") > Thigh(" << Thigh_ <<
')' 61 template<
class EquationOfState>
64 EquationOfState(
dict),
65 Tlow_(
dict.subDict(
"thermodynamics").
get<scalar>(
"Tlow")),
66 Thigh_(
dict.subDict(
"thermodynamics").
get<scalar>(
"Thigh")),
67 Tcommon_(
dict.subDict(
"thermodynamics").
get<scalar>(
"Tcommon")),
68 highCpCoeffs_(
dict.subDict(
"thermodynamics").lookup(
"highCpCoeffs")),
69 lowCpCoeffs_(
dict.subDict(
"thermodynamics").lookup(
"lowCpCoeffs"))
72 for (label coefLabel=0; coefLabel<
nCoeffs_; coefLabel++)
74 highCpCoeffs_[coefLabel] *= this->
R();
75 lowCpCoeffs_[coefLabel] *= this->
R();
84 template<
class EquationOfState>
90 coeffArray highCpCoeffs;
91 coeffArray lowCpCoeffs;
92 for (label coefLabel=0; coefLabel<nCoeffs_; coefLabel++)
94 highCpCoeffs[coefLabel] = highCpCoeffs_[coefLabel]/this->
R();
95 lowCpCoeffs[coefLabel] = lowCpCoeffs_[coefLabel]/this->
R();
113 template<
class EquationOfState>
117 const janafThermo<EquationOfState>& jt
List< ReturnType > get(const UPtrList< T > &list, const AccessOp &aop)
List of values generated by applying the access operation to each list item.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Ostream & writeEntry(const keyType &key, const T &value)
Write a keyword/value entry.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
void write(vtk::formatter &fmt, const Type &val, const label n=1)
Component-wise write of a value (N times)
virtual Ostream & endBlock()
Write end block group.
virtual bool write(const token &tok)=0
Write token to stream or otherwise handle it.
void write(Ostream &os) const
Write to Ostream.
janafThermo(const EquationOfState &st, const scalar Tlow, const scalar Thigh, const scalar Tcommon, const coeffArray &highCpCoeffs, const coeffArray &lowCpCoeffs, const bool convertCoeffs=false)
Construct from components.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
OBJstream os(runTime.globalPath()/outputName)
#define R(A, B, C, D, E, F, K, M)
JANAF tables based thermodynamics package templated into the equation of state.
static constexpr int nCoeffs_
virtual Ostream & beginBlock(const keyType &kw)
Write begin block group with the given name.