31 template<
class EquationOfState>
40 <<
"attempt to evaluate hPowerThermo<EquationOfState>"
41 " for negative temperature " <<
T
49 template<
class EquationOfState>
52 const EquationOfState& st,
67 template<
class EquationOfState>
74 EquationOfState(
name, jt),
82 template<
class EquationOfState>
95 template<
class EquationOfState>
105 template<
class EquationOfState>
116 template<
class EquationOfState>
124 c0_*(
pow(
T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1))
129 template<
class EquationOfState>
136 return hs(
p,
T) + hf();
140 template<
class EquationOfState>
147 template<
class EquationOfState>
156 + EquationOfState::sp(
p,
T);
160 template<
class EquationOfState>
167 c0_*(
pow(
T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1))
173 template<
class EquationOfState>
188 template<
class EquationOfState>
194 scalar Y1 = this->
Y();
196 EquationOfState::operator+=(ct);
198 if (
mag(this->
Y()) > small)
201 const scalar Y2 = ct.Y()/this->
Y();
203 hf_ = Y1*hf_ + Y2*ct.hf_;
204 c0_ = Y1*c0_ + Y2*ct.c0_;
205 n0_ = Y1*n0_ + Y2*ct.n0_;
206 Tref_ = Y1*Tref_ + Y2*ct.Tref_;
213 template<
class EquationOfState>
222 static_cast<const EquationOfState&
>(ct1)
223 +
static_cast<const EquationOfState&
>(ct2)
226 if (
mag(eofs.Y()) < small)
239 return hPowerThermo<EquationOfState>
242 ct1.Y()/eofs.Y()*ct1.c0_
243 + ct2.Y()/eofs.Y()*ct2.c0_,
244 ct1.Y()/eofs.Y()*ct1.n0_
245 + ct2.Y()/eofs.Y()*ct2.n0_,
246 ct1.Y()/eofs.Y()*ct1.Tref_
247 + ct2.Y()/eofs.Y()*ct2.Tref_,
248 ct1.Y()/eofs.Y()*ct1.hf_
249 + ct2.Y()/eofs.Y()*ct2.hf_
255 template<
class EquationOfState>
259 const hPowerThermo<EquationOfState>& ct
262 return hPowerThermo<EquationOfState>
264 s*
static_cast<const EquationOfState&
>(ct),
273 template<
class EquationOfState>
276 const hPowerThermo<EquationOfState>& ct1,
277 const hPowerThermo<EquationOfState>& ct2
282 static_cast<const EquationOfState&
>(ct1)
283 ==
static_cast<const EquationOfState&
>(ct2)
286 return hPowerThermo<EquationOfState>
289 ct2.Y()/eofs.Y()*ct2.c0_
290 - ct1.Y()/eofs.Y()*ct1.c0_,
291 ct2.Y()/eofs.Y()*ct2.n0_
292 - ct1.Y()/eofs.Y()*ct1.n0_,
293 ct2.Y()/eofs.Y()*ct2.Tref_
294 - ct1.Y()/eofs.Y()*ct1.Tref_,
295 ct2.Y()/eofs.Y()*ct2.hf_
296 - ct1.Y()/eofs.Y()*ct1.hf_
scalar hs(const scalar p, const scalar T) const
scalar Cp(const scalar p, const scalar T) const
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Enthalpy based thermodynamics package using a power function of temperature for the constant heat cap...
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_.
autoPtr< hPowerThermo > clone() const
Construct and return a clone.
scalar s(const scalar p, const scalar T) const
Entropy [J/kg/K].
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].
scalar ha(const scalar p, const scalar T) const
Absolute enthalpy [J/kg].
scalar hf() const
Enthalpy of formation [J/kg].
scalar hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
hPowerThermo(const EquationOfState &st, const scalar c0, const scalar n0, const scalar Tref, const scalar hf)
Construct from components.
A class for handling words, derived from string.
#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;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.name(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
const dimensionedScalar Tstd
Standard temperature.
const dimensionedScalar h
Planck constant.
word name(const bool)
Return a word representation of a bool.
errorManip< error > abort(error &err)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalar > mag(const dimensioned< Type > &)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
PtrList< volScalarField > & Y