34 template<
class EquationOfState>
43 <<
"attempt to evaluate hPowerThermo<EquationOfState>" 44 " for negative temperature " <<
T 50 template<
class EquationOfState>
54 const hPowerThermo& jt
57 EquationOfState(
name, jt),
67 template<
class EquationOfState>
70 const EquationOfState& st,
85 template<
class EquationOfState>
93 template<
class EquationOfState>
103 template<
class EquationOfState>
113 template<
class EquationOfState>
116 const scalar
p,
const scalar
T 123 template<
class EquationOfState>
126 const scalar
p,
const scalar
T 129 return Hs(
p,
T) + Hc();
133 template<
class EquationOfState>
136 const scalar
p,
const scalar
T 140 c0_*(
pow(
T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1))
145 template<
class EquationOfState>
152 template<
class EquationOfState>
155 const scalar
p,
const scalar
T 160 + EquationOfState::S(
p,
T);
164 template<
class EquationOfState>
171 c0_*(
pow(
T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1))
177 template<
class EquationOfState>
180 const scalar
p,
const scalar
T 191 template<
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_;
216 template<
class EquationOfState>
219 const hPowerThermo<EquationOfState>& ct1,
220 const hPowerThermo<EquationOfState>& ct2
225 static_cast<const EquationOfState&>(ct1)
226 + static_cast<const EquationOfState&>(ct2)
229 if (
mag(eofs.Y()) < SMALL)
231 return hPowerThermo<EquationOfState>
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_
258 template<
class EquationOfState>
262 const hPowerThermo<EquationOfState>& ct
265 return hPowerThermo<EquationOfState>
267 s*
static_cast<const EquationOfState&
>(ct),
276 template<
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_
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
scalar Hs(const scalar p, const scalar T) const
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
scalar Gstd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
scalar limit(const scalar T) const
Limit temperature to be within the range.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
scalar Ha(const scalar p, const scalar T) const
Absolute Enthalpy [J/kg].
scalar S(const scalar p, const scalar T) const
Entropy [J/(kg K)].
autoPtr< hPowerThermo > clone() const
Construct and return a clone.
volScalarField H(IOobject("H", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimLength, Zero))
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
scalar dCpdT(const scalar p, const scalar T) const
Temperature derivative of heat capacity at constant pressure.
errorManip< error > abort(error &err)
scalar Hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
const dimensionedScalar Tstd
Standard temperature.
const volScalarField & Cp
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
scalar Hc() const
Chemical enthalpy [J/kg].
static autoPtr< hPowerThermo > New(const dictionary &dict)
Selector from dictionary.
PtrList< volScalarField > & Y
scalar Cp(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/(kg K)].
Power-function based thermodynamics package templated on EquationOfState.
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
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))
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.