31 template<
class EquationOfState>
40 <<
"attempt to evaluate ePowerThermo<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 es(
p,
T) + hf();
140 template<
class EquationOfState>
147 template<
class EquationOfState>
156 + EquationOfState::sv(
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>
187 template<
class EquationOfState>
193 scalar Y1 = this->
Y();
195 EquationOfState::operator+=(ct);
197 if (
mag(this->
Y()) > small)
200 const scalar Y2 = ct.Y()/this->
Y();
202 hf_ = Y1*hf_ + Y2*ct.hf_;
203 c0_ = Y1*c0_ + Y2*ct.c0_;
204 n0_ = Y1*n0_ + Y2*ct.n0_;
205 Tref_ = Y1*Tref_ + Y2*ct.Tref_;
212 template<
class EquationOfState>
221 static_cast<const EquationOfState&
>(ct1)
222 +
static_cast<const EquationOfState&
>(ct2)
225 if (
mag(eofs.Y()) < small)
238 return ePowerThermo<EquationOfState>
241 ct1.Y()/eofs.Y()*ct1.c0_
242 + ct2.Y()/eofs.Y()*ct2.c0_,
243 ct1.Y()/eofs.Y()*ct1.n0_
244 + ct2.Y()/eofs.Y()*ct2.n0_,
245 ct1.Y()/eofs.Y()*ct1.Tref_
246 + ct2.Y()/eofs.Y()*ct2.Tref_,
247 ct1.Y()/eofs.Y()*ct1.hf_
248 + ct2.Y()/eofs.Y()*ct2.hf_
254 template<
class EquationOfState>
258 const ePowerThermo<EquationOfState>& ct
261 return ePowerThermo<EquationOfState>
263 s*
static_cast<const EquationOfState&
>(ct),
272 template<
class EquationOfState>
275 const ePowerThermo<EquationOfState>& ct1,
276 const ePowerThermo<EquationOfState>& ct2
281 static_cast<const EquationOfState&
>(ct1)
282 ==
static_cast<const EquationOfState&
>(ct2)
285 return ePowerThermo<EquationOfState>
288 ct2.Y()/eofs.Y()*ct2.c0_
289 - ct1.Y()/eofs.Y()*ct1.c0_,
290 ct2.Y()/eofs.Y()*ct2.n0_
291 - ct1.Y()/eofs.Y()*ct1.n0_,
292 ct2.Y()/eofs.Y()*ct2.Tref_
293 - ct1.Y()/eofs.Y()*ct1.Tref_,
294 ct2.Y()/eofs.Y()*ct2.hf_
295 - ct1.Y()/eofs.Y()*ct1.hf_
scalar es(const scalar p, const scalar T) const
scalar Cv(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...
Internal energy based thermodynamics package using a power function of temperature for the constant h...
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_.
ePowerThermo(const EquationOfState &st, const scalar c0, const scalar n0, const scalar Tref, const scalar hf)
Construct from components.
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.
autoPtr< ePowerThermo > clone() const
Construct and return a clone.
scalar ea(const scalar p, const scalar T) const
Absolute internal energy [J/kg].
scalar Cv(const scalar p, const scalar T) const
Heat capacity at constant volume [J/kg/K].
scalar hf() const
Enthalpy of formation [J/kg].
scalar es(const scalar p, const scalar T) const
Sensible internal energy [J/kg].
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 e
Elementary charge.
const dimensionedScalar Pstd
Standard pressure.
const dimensionedScalar Tstd
Standard temperature.
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