34template<
class EquationOfState>
35inline void Foam::hPowerThermo<EquationOfState>::checkT
43 <<
"attempt to evaluate hPowerThermo<EquationOfState>"
44 " for negative temperature " <<
T
50template<
class EquationOfState>
51inline Foam::hPowerThermo<EquationOfState>::hPowerThermo
54 const hPowerThermo& jt
57 EquationOfState(
name, jt),
67template<
class EquationOfState>
68inline Foam::hPowerThermo<EquationOfState>::hPowerThermo
70 const EquationOfState& st,
85template<
class EquationOfState>
93template<
class EquationOfState>
103template<
class EquationOfState>
113template<
class EquationOfState>
116 const scalar
p,
const scalar
T
119 return c0_*
pow(
T/Tref_, n0_) + EquationOfState::Cp(
p,
T);
123template<
class EquationOfState>
126 const scalar
p,
const scalar
T
133template<
class EquationOfState>
136 const scalar
p,
const scalar
T
140 c0_*(
pow(
T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1))
141 + EquationOfState::H(
p,
T);
145template<
class EquationOfState>
152template<
class EquationOfState>
155 const scalar
p,
const scalar
T
160 + EquationOfState::S(
p,
T);
164template<
class EquationOfState>
177template<
class EquationOfState>
180 const scalar
p,
const scalar
T
191template<
class EquationOfState>
197 scalar Y1 = this->
Y();
199 EquationOfState::operator+=(ct);
201 if (
mag(this->
Y()) > SMALL)
204 const scalar Y2 = ct.Y()/this->
Y();
206 Hf_ = Y1*Hf_ + Y2*ct.Hf_;
207 c0_ = Y1*c0_ + Y2*ct.c0_;
208 n0_ = Y1*n0_ + Y2*ct.n0_;
209 Tref_ = Y1*Tref_ + Y2*ct.Tref_;
216template<
class EquationOfState>
217inline Foam::hPowerThermo<EquationOfState> Foam::operator+
225 static_cast<const EquationOfState&
>(ct1)
226 +
static_cast<const EquationOfState&
>(ct2)
229 if (
mag(eofs.Y()) < SMALL)
245 ct1.Y()/eofs.Y()*ct1.c0_
246 + ct2.Y()/eofs.Y()*ct2.c0_,
247 ct1.Y()/eofs.Y()*ct1.n0_
248 + ct2.Y()/eofs.Y()*ct2.n0_,
249 ct1.Y()/eofs.Y()*ct1.Tref_
250 + ct2.Y()/eofs.Y()*ct2.Tref_,
251 ct1.Y()/eofs.Y()*ct1.Hf_
252 + ct2.Y()/eofs.Y()*ct2.Hf_
258template<
class EquationOfState>
259inline Foam::hPowerThermo<EquationOfState> Foam::operator*
267 s*
static_cast<const EquationOfState&
>(ct),
276template<
class EquationOfState>
277inline Foam::hPowerThermo<EquationOfState> Foam::operator==
285 static_cast<const EquationOfState&
>(ct1)
286 ==
static_cast<const EquationOfState&
>(ct2)
292 ct2.Y()/eofs.Y()*ct2.c0_
293 - ct1.Y()/eofs.Y()*ct1.c0_,
294 ct2.Y()/eofs.Y()*ct2.n0_
295 - ct1.Y()/eofs.Y()*ct1.n0_,
296 ct2.Y()/eofs.Y()*ct2.Tref_
297 - ct1.Y()/eofs.Y()*ct1.Tref_,
298 ct2.Y()/eofs.Y()*ct2.Hf_
299 - ct1.Y()/eofs.Y()*ct1.Hf_
scalar Hs(const scalar p, const scalar T) const
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Power-function based thermodynamics package templated on EquationOfState.
scalar limit(const scalar T) const
Limit temperature to be within the range.
scalar Hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
autoPtr< hPowerThermo > clone() const
Construct and return a clone.
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)].
static autoPtr< hPowerThermo > New(const dictionary &dict)
Selector from dictionary.
scalar Hc() const
Chemical enthalpy [J/kg].
scalar S(const scalar p, const scalar T) const
Entropy [J/(kg K)].
scalar Ha(const scalar p, const scalar T) const
Absolute Enthalpy [J/kg].
scalar Gstd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
A class for handling words, derived from Foam::string.
PtrList< volScalarField > & Y
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const scalar Tstd
Standard temperature: default in [K].
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)