31 template<
class EquationOfState>
37 <<
"Tlow(" << Tlow_ <<
") >= Thigh(" << Thigh_ <<
')' 41 if (Tcommon_ <= Tlow_)
44 <<
"Tcommon(" << Tcommon_ <<
") <= Tlow(" << Tlow_ <<
')' 48 if (Tcommon_ > Thigh_)
51 <<
"Tcommon(" << Tcommon_ <<
") > Thigh(" << Thigh_ <<
')' 59 template<
class EquationOfState>
71 is >> highCpCoeffs_[i];
76 is >> lowCpCoeffs_[i];
80 is.
check(
"janafThermo::janafThermo(Istream& is)");
84 template<
class EquationOfState>
87 EquationOfState(dict),
91 highCpCoeffs_(dict.subDict(
"thermodynamics").
lookup(
"highCpCoeffs")),
92 lowCpCoeffs_(dict.subDict(
"thermodynamics").
lookup(
"lowCpCoeffs"))
100 template<
class EquationOfState>
106 dict.
add(
"Tlow", Tlow_);
107 dict.
add(
"Thigh", Thigh_);
108 dict.
add(
"Tcommon", Tcommon_);
109 dict.
add(
"highCpCoeffs", highCpCoeffs_);
110 dict.
add(
"lowCpCoeffs", lowCpCoeffs_);
117 template<
class EquationOfState>
124 os << static_cast<const EquationOfState&>(jt) <<
nl 127 <<
tab << jt.Tcommon_;
131 forAll(jt.highCpCoeffs_, i)
133 os << jt.highCpCoeffs_[i] <<
' ';
138 forAll(jt.lowCpCoeffs_, i)
140 os << jt.lowCpCoeffs_[i] <<
' ';
147 "operator<<(Ostream& os, const janafThermo<EquationOfState>& jt)"
#define forAll(list, i)
Loop across all elements in list.
Ostream & indent(Ostream &os)
Indent stream.
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
const word dictName() const
Return the local dictionary name (final part of scoped name)
virtual bool check(const char *operation) const
Check IOstream status for given operation.
Ostream & endl(Ostream &os)
Add newline and flush stream.
janafThermo(const EquationOfState &st, const scalar Tlow, const scalar Thigh, const scalar Tcommon, const coeffArray &highCpCoeffs, const coeffArray &lowCpCoeffs)
Construct from components.
bool add(entry *, bool mergeEntry=false)
Add a new entry.
Useful combination of include files which define Sin, Sout and Serr and the use of IO streams general...
stressControl lookup("compactNormalStress") >> compactNormalStress
void write(Ostream &os) const
Write to Ostream.
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
JANAF tables based thermodynamics package templated into the equation of state.