Go to the documentation of this file.
33 template<
class EquationOfState>
42 <<
"attempt to evaluate hPowerThermo<EquationOfState>"
43 " for negative temperature " <<
T
49 template<
class EquationOfState>
56 EquationOfState(
name, jt),
66 template<
class EquationOfState>
69 const EquationOfState& st,
84 template<
class EquationOfState>
92 template<
class EquationOfState>
102 template<
class EquationOfState>
112 template<
class EquationOfState>
115 const scalar
p,
const scalar
T
122 template<
class EquationOfState>
125 const scalar
p,
const scalar
T
128 return Hs(
p,
T) + Hc();
132 template<
class EquationOfState>
135 const scalar
p,
const scalar
T
139 c0_*(
pow(
T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1))
144 template<
class EquationOfState>
151 template<
class EquationOfState>
154 const scalar
p,
const scalar
T
159 + EquationOfState::S(
p,
T);
163 template<
class EquationOfState>
166 const scalar
p,
const scalar
T
175 template<
class EquationOfState>
178 const scalar
p,
const scalar
T
189 template<
class EquationOfState>
195 scalar Y1 = this->
Y();
197 EquationOfState::operator+=(ct);
199 if (
mag(this->
Y()) > SMALL)
202 const scalar Y2 = ct.Y()/this->
Y();
204 Hf_ = Y1*Hf_ + Y2*ct.Hf_;
205 c0_ = Y1*c0_ + Y2*ct.c0_;
206 n0_ = Y1*n0_ + Y2*ct.n0_;
207 Tref_ = Y1*Tref_ + Y2*ct.Tref_;
214 template<
class EquationOfState>
223 static_cast<const EquationOfState&
>(ct1)
224 +
static_cast<const EquationOfState&
>(ct2)
227 if (
mag(eofs.Y()) < SMALL)
240 return hPowerThermo<EquationOfState>
243 ct1.Y()/eofs.Y()*ct1.c0_
244 + ct2.Y()/eofs.Y()*ct2.c0_,
245 ct1.Y()/eofs.Y()*ct1.n0_
246 + ct2.Y()/eofs.Y()*ct2.n0_,
247 ct1.Y()/eofs.Y()*ct1.Tref_
248 + ct2.Y()/eofs.Y()*ct2.Tref_,
249 ct1.Y()/eofs.Y()*ct1.Hf_
250 + ct2.Y()/eofs.Y()*ct2.Hf_
256 template<
class EquationOfState>
260 const hPowerThermo<EquationOfState>& ct
263 return hPowerThermo<EquationOfState>
265 s*
static_cast<const EquationOfState&
>(ct),
274 template<
class EquationOfState>
277 const hPowerThermo<EquationOfState>& ct1,
278 const hPowerThermo<EquationOfState>& ct2
283 static_cast<const EquationOfState&
>(ct1)
284 ==
static_cast<const EquationOfState&
>(ct2)
287 return hPowerThermo<EquationOfState>
290 ct2.Y()/eofs.Y()*ct2.c0_
291 - ct1.Y()/eofs.Y()*ct1.c0_,
292 ct2.Y()/eofs.Y()*ct2.n0_
293 - ct1.Y()/eofs.Y()*ct1.n0_,
294 ct2.Y()/eofs.Y()*ct2.Tref_
295 - ct1.Y()/eofs.Y()*ct1.Tref_,
296 ct2.Y()/eofs.Y()*ct2.Hf_
297 - ct1.Y()/eofs.Y()*ct1.Hf_
A class for handling words, derived from Foam::string.
Power-function based thermodynamics package templated on EquationOfState.
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))
scalar Hs(const scalar p, const scalar T) const
volScalarField H(IOobject("H", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE), mesh, dimensionedScalar(dimLength, Zero))
scalar limit(const scalar T) const
Limit the temperature to be in the range Tlow_ to Thigh_.
const dimensionedScalar Tstd
Standard temperature.
scalar Hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
autoPtr< hPowerThermo > clone() const
Construct and return a clone.
word name(const complex &c)
Return string representation of complex.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
scalar Hc() const
Chemical enthalpy [J/kg].
scalar Ha(const scalar p, const scalar T) const
Absolute Enthalpy [J/kg].
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
scalar S(const scalar p, const scalar T) const
Entropy [J/(kg K)].
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
scalar dCpdT(const scalar p, const scalar T) const
Temperature derivative of heat capacity at constant pressure.
errorManip< error > abort(error &err)
PtrList< volScalarField > & Y
static autoPtr< hPowerThermo > New(const dictionary &dict)
Selector from dictionary.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tdf1, const word &name, const dimensionSet &dimensions)
Global function forwards to reuseTmpDimensionedField::New.
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
scalar Cp(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/(kg K)].
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
const volScalarField & Cp
scalar dGdT(const scalar p, const scalar T) const
Derivative of Gibbs free energy w.r.t. temperature.