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))
125 + EquationOfState::E(
p,
T);
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 Cv(const scalar p, const scalar T) const
scalar Es(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 Hf() const
Enthalpy of formation [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 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 S(const scalar p, const scalar T) const
Entropy [J/kg/K].
scalar Cv(const scalar p, const scalar T) const
Heat capacity at constant volume [J/kg/K].
scalar Gstd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
scalar Es(const scalar p, const scalar T) const
Sensible internal energy [J/kg].
scalar Ea(const scalar p, const scalar T) const
Absolute 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 Pstd
Standard pressure.
const dimensionedScalar Tstd
Standard temperature.
tmp< fvMatrix< Type > > S(const Pair< tmp< volScalarField::Internal >> &, const VolField< Type > &)
errorManip< error > abort(error &err)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
dimensioned< scalar > mag(const dimensioned< Type > &)
word name(const complex &)
Return a string representation of a complex.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
PtrList< volScalarField > & Y