30 template<
class EquationOfState,
int PolySize>
33 const EquationOfState& pt,
50 template<
class EquationOfState,
int PolySize>
57 EquationOfState(
name, pt),
60 CpCoeffs_(pt.CpCoeffs_),
61 hCoeffs_(pt.hCoeffs_),
68 template<
class EquationOfState,
int PolySize>
78 template<
class EquationOfState,
int PolySize>
89 template<
class EquationOfState,
int PolySize>
96 return ha(
p,
T) - hf();
100 template<
class EquationOfState,
int PolySize>
111 template<
class EquationOfState,
int PolySize>
119 template<
class EquationOfState,
int PolySize>
126 return sCoeffs_.value(
T) + EquationOfState::sp(
p,
T);
130 template<
class EquationOfState,
int PolySize>
136 return hCoeffs_.value(
T) - sCoeffs_.value(
T)*
T;
140 template<
class EquationOfState,
int PolySize>
149 CpCoeffs_.derivative(
T)
156 template<
class EquationOfState,
int PolySize>
162 scalar Y1 = this->
Y();
164 EquationOfState::operator+=(pt);
166 if (
mag(this->
Y()) > small)
169 const scalar Y2 = pt.Y()/this->
Y();
171 hf_ = Y1*hf_ + Y2*pt.hf_;
172 sf_ = Y1*sf_ + Y2*pt.sf_;
173 CpCoeffs_ = Y1*CpCoeffs_ + Y2*pt.CpCoeffs_;
174 hCoeffs_ = Y1*hCoeffs_ + Y2*pt.hCoeffs_;
175 sCoeffs_ = Y1*sCoeffs_ + Y2*pt.sCoeffs_;
180 template<
class EquationOfState,
int PolySize>
186 EquationOfState::operator*=(
s);
192 template<
class EquationOfState,
int PolySize>
199 EquationOfState eofs = pt1;
202 if (
mag(eofs.Y()) < small)
215 const scalar Y1 = pt1.Y()/eofs.Y();
216 const scalar Y2 = pt2.Y()/eofs.Y();
218 return hPolynomialThermo<EquationOfState, PolySize>
221 Y1*pt1.hf_ + Y2*pt2.hf_,
222 Y1*pt1.sf_ + Y2*pt2.sf_,
223 Y1*pt1.CpCoeffs_ + Y2*pt2.CpCoeffs_,
224 Y1*pt1.hCoeffs_ + Y2*pt2.hCoeffs_,
225 Y1*pt1.sCoeffs_ + Y2*pt2.sCoeffs_
231 template<
class EquationOfState,
int PolySize>
235 const hPolynomialThermo<EquationOfState, PolySize>& pt
238 return hPolynomialThermo<EquationOfState, PolySize>
240 s*
static_cast<const EquationOfState&
>(pt),
250 template<
class EquationOfState,
int PolySize>
253 const hPolynomialThermo<EquationOfState, PolySize>& pt1,
254 const hPolynomialThermo<EquationOfState, PolySize>& pt2
259 static_cast<const EquationOfState&
>(pt1)
260 ==
static_cast<const EquationOfState&
>(pt2)
263 const scalar Y1 = pt1.Y()/eofs.Y();
264 const scalar Y2 = pt2.Y()/eofs.Y();
266 return hPolynomialThermo<EquationOfState, PolySize>
269 Y2*pt2.hf_ - Y1*pt1.hf_,
270 Y2*pt2.sf_ - Y1*pt1.sf_,
271 Y2*pt2.CpCoeffs_ - Y1*pt1.CpCoeffs_,
272 Y2*pt2.hCoeffs_ - Y1*pt1.hCoeffs_,
273 Y2*pt2.sCoeffs_ - Y1*pt1.sCoeffs_
scalar Cp(const scalar p, const scalar T) const
scalar ha(const scalar p, const scalar T) const
Polynomial templated on size (order):
Enthalpy based thermodynamics package using a polynomial function of temperature for the constant hea...
scalar gStd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
hPolynomialThermo(const EquationOfState &pt, const scalar hf, const scalar sf, const Polynomial< PolySize > &CpCoeffs, const typename Polynomial< PolySize >::intPolyType &hCoeffs, const Polynomial< PolySize > &sCoeffs)
Construct from components.
scalar s(const scalar p, const scalar T) const
Entropy [J/kg/K].
scalar dCpdT(const scalar p, const scalar T) const
Temperature derivative of heat capacity at constant pressure.
scalar Cp(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/kg/K].
scalar ha(const scalar p, const scalar T) const
Absolute enthalpy [J/kg].
scalar hf() const
Enthalpy of formation [J/kg].
scalar limit(const scalar) const
Limit the temperature to be in the range Tlow_ to Thigh_.
scalar hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
A class for handling words, derived from string.
volScalarField sf(fieldObject, mesh)
gmvFile<< "tracers "<< particles.size()<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().x()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().y()<< " ";}gmvFile<< nl;forAllConstIter(Cloud< passiveParticle >, particles, iter){ gmvFile<< iter().position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const dimensionedScalar h
Planck constant.
word name(const bool)
Return a word representation of a bool.
dimensioned< scalar > mag(const dimensioned< Type > &)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
PtrList< volScalarField > & Y