34template<
class EquationOfState>
43 <<
"attempt to evaluate hPowerThermo<EquationOfState>"
44 " for negative temperature " <<
T
50template<
class EquationOfState>
57 EquationOfState(
name, jt),
67template<
class EquationOfState>
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
129 return Hs(
p,
T) + Hc();
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>
171 c0_*(
pow(
T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1))
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>
225 static_cast<const EquationOfState&
>(ct1)
226 +
static_cast<const EquationOfState&
>(ct2)
229 if (
mag(eofs.Y()) < SMALL)
242 return hPowerThermo<EquationOfState>
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>
262 const hPowerThermo<EquationOfState>& ct
265 return hPowerThermo<EquationOfState>
267 s*
static_cast<const EquationOfState&
>(ct),
276template<
class EquationOfState>
279 const hPowerThermo<EquationOfState>& ct1,
280 const hPowerThermo<EquationOfState>& ct2
285 static_cast<const EquationOfState&
>(ct1)
286 ==
static_cast<const EquationOfState&
>(ct2)
289 return hPowerThermo<EquationOfState>
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
compactSpatialTensor S
The joint motion sub-space (3-DoF)
static autoPtr< Time > New()
Construct (dummy) Time - no functionObjects or libraries.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
friend complex limit(const complex &c1, const complex &c2)
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 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 Hc() const
Chemical enthalpy [J/kg].
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
const volScalarField & Cp
#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].
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
errorManip< error > abort(error &err)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.