31 template<
class EquationOfState>
40 <<
"attempt to evaluate hPowerThermo<EquationOfState>" 41 " for negative temperature " << T
47 template<
class EquationOfState>
54 EquationOfState(name, jt),
64 template<
class EquationOfState>
67 const EquationOfState& st,
82 template<
class EquationOfState>
93 template<
class EquationOfState>
106 template<
class EquationOfState>
116 template<
class EquationOfState>
127 template<
class EquationOfState>
135 c0_*(
pow(T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1))
136 + EquationOfState::H(p, T);
140 template<
class EquationOfState>
147 return Hs(p, T) + Hf();
151 template<
class EquationOfState>
158 template<
class EquationOfState>
171 template<
class EquationOfState>
178 c0_*(
pow(T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1))
180 - c0_*(
pow(T, n0_) -
pow(
Tstd, n0_))*T/(
pow(Tref_, n0_)*n0_);
184 template<
class EquationOfState>
199 template<
class EquationOfState>
200 inline void Foam::hPowerThermo<EquationOfState>::operator+=
205 scalar Y1 = this->
Y();
207 EquationOfState::operator+=(ct);
209 if (
mag(this->
Y()) > small)
212 const scalar Y2 = ct.Y()/this->
Y();
214 Hf_ = Y1*Hf_ + Y2*ct.Hf_;
215 c0_ = Y1*c0_ + Y2*ct.c0_;
216 n0_ = Y1*n0_ + Y2*ct.n0_;
217 Tref_ = Y1*Tref_ + Y2*ct.Tref_;
224 template<
class EquationOfState>
233 static_cast<const EquationOfState&>(ct1)
234 + static_cast<const EquationOfState&>(ct2)
237 if (
mag(eofs.Y()) < small)
253 ct1.Y()/eofs.Y()*ct1.c0_
254 + ct2.Y()/eofs.Y()*ct2.c0_,
255 ct1.Y()/eofs.Y()*ct1.n0_
256 + ct2.Y()/eofs.Y()*ct2.n0_,
257 ct1.Y()/eofs.Y()*ct1.Tref_
258 + ct2.Y()/eofs.Y()*ct2.Tref_,
259 ct1.Y()/eofs.Y()*ct1.Hf_
260 + ct2.Y()/eofs.Y()*ct2.Hf_
266 template<
class EquationOfState>
275 s*
static_cast<const EquationOfState&
>(ct),
284 template<
class EquationOfState>
293 static_cast<const EquationOfState&>(ct1)
294 == static_cast<const EquationOfState&>(ct2)
300 ct2.Y()/eofs.Y()*ct2.c0_
301 - ct1.Y()/eofs.Y()*ct1.c0_,
302 ct2.Y()/eofs.Y()*ct2.n0_
303 - ct1.Y()/eofs.Y()*ct1.n0_,
304 ct2.Y()/eofs.Y()*ct2.Tref_
305 - ct1.Y()/eofs.Y()*ct1.Tref_,
306 ct2.Y()/eofs.Y()*ct2.Hf_
307 - ct1.Y()/eofs.Y()*ct1.Hf_
scalar Hs(const scalar p, const scalar T) const
A list of keyword definitions, which are a keyword followed by any number of values (e...
const dimensionedScalar Tstd
Standard temperature.
#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 the temperature to be in the range Tlow_ to Thigh_.
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.
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.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
scalar dCpdT(const scalar p, const scalar T) const
Temperature derivative of heat capacity at constant pressure.
A class for handling words, derived from string.
scalar Hf() const
Enthalpy of formation [J/kg].
errorManip< error > abort(error &err)
scalar Hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
const tmp< volScalarField::Internal > & Sp
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
static autoPtr< hPowerThermo > New(const dictionary &dict)
Selector from dictionary.
PtrList< volScalarField > & Y
scalar Cp(const scalar p, const scalar T) const
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.
dimensioned< scalar > mag(const dimensioned< Type > &)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.