28 template<
class EquationOfState>
31 const EquationOfState& st,
48 template<
class EquationOfState>
55 EquationOfState(name, ct),
63 template<
class EquationOfState>
74 template<
class EquationOfState>
87 template<
class EquationOfState>
97 template<
class EquationOfState>
108 template<
class EquationOfState>
115 return Cv_*(T - Tref_) + Esref_ + EquationOfState::E(p, T);
119 template<
class EquationOfState>
126 template<
class EquationOfState>
133 return Es(p, T) +
Hf();
137 template<
class EquationOfState>
144 return Cp(p, T)*
log(T/
Tstd) + EquationOfState::Sv(p, T);
148 template<
class EquationOfState>
160 template<
class EquationOfState>
174 template<
class EquationOfState>
175 inline void Foam::eConstThermo<EquationOfState>::operator+=
180 scalar Y1 = this->
Y();
182 EquationOfState::operator+=(ct);
184 if (
mag(this->
Y()) > small)
193 <<
"Tref " << Tref_ <<
" for " 194 << (this->
name().size() ? this->
name() :
"others")
195 <<
" != " << ct.Tref_ <<
" for " 196 << (ct.name().size() ? ct.name() :
"others")
201 const scalar Y2 = ct.Y()/this->
Y();
203 Cv_ = Y1*Cv_ + Y2*ct.Cv_;
204 Hf_ = Y1*Hf_ + Y2*ct.Hf_;
205 Esref_ = Y1*Esref_ + Y2*ct.Esref_;
212 template<
class EquationOfState>
221 static_cast<const EquationOfState&>(ct1)
222 + static_cast<const EquationOfState&>(ct2)
225 if (
mag(eofs.Y()) < small)
245 <<
"Tref " << ct1.Tref_ <<
" for " 246 << (ct1.name().size() ? ct1.name() :
"others")
247 <<
" != " << ct2.Tref_ <<
" for " 248 << (ct2.name().size() ? ct2.name() :
"others")
255 ct1.Y()/eofs.Y()*ct1.Cv_
256 + ct2.Y()/eofs.Y()*ct2.Cv_,
257 ct1.Y()/eofs.Y()*ct1.Hf_
258 + ct2.Y()/eofs.Y()*ct2.Hf_,
260 ct1.Y()/eofs.Y()*ct1.Esref_
261 + ct2.Y()/eofs.Y()*ct2.Esref_
267 template<
class EquationOfState>
276 s*
static_cast<const EquationOfState&
>(ct),
285 template<
class EquationOfState>
294 static_cast<const EquationOfState&>(ct1)
295 == static_cast<const EquationOfState&>(ct2)
305 <<
"Tref " << ct1.Tref_ <<
" for " 306 << (ct1.name().size() ? ct1.name() :
"others")
307 <<
" != " << ct2.Tref_ <<
" for " 308 << (ct2.name().size() ? ct2.name() :
"others")
315 ct2.Y()/eofs.Y()*ct2.Cv_
316 - ct1.Y()/eofs.Y()*ct1.Cv_,
317 ct2.Y()/eofs.Y()*ct2.Hf_
318 - ct1.Y()/eofs.Y()*ct1.Hf_,
320 ct2.Y()/eofs.Y()*ct2.Esref_
321 - ct1.Y()/eofs.Y()*ct1.Esref_
scalar limit(const scalar T) const
Limit the temperature to be in the range Tlow_ to Thigh_.
bool notEqual(const Scalar s1, const Scalar s2)
dimensionedScalar log(const dimensionedScalar &ds)
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by any number of values (e...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const dimensionedScalar & Tstd
Standard temperature.
const volScalarField & Cv
scalar Ea(const scalar p, const scalar T) const
Absolute internal energy [J/kg].
scalar Hf() const
Enthalpy of formation [J/kg].
Constant properties thermodynamics package templated on an equation of state.
scalar Es(const scalar p, const scalar T) const
Sensible internal energy [J/kg].
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))
A class for handling words, derived from string.
scalar Gstd(const scalar T) const
Gibbs free energy of the mixture in the standard state [J/kg].
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
autoPtr< eConstThermo > clone() const
Construct and return a clone.
word name(const complex &)
Return a string representation of a complex.
scalar Cv(const scalar p, const scalar T) const
Heat capacity at constant volume [J/kg/K].
scalar S(const scalar p, const scalar T) const
Entropy [J/kg/K].
PtrList< volScalarField > & Y
scalar Cp(const scalar p, const scalar T) const
scalar dCpdT(const scalar p, const scalar T) const
Temperature derivative of heat capacity at constant pressure.
dimensioned< scalar > mag(const dimensioned< Type > &)
const dimensionedScalar & Pstd
Standard pressure.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
static autoPtr< eConstThermo > New(const dictionary &dict)
Selector from dictionary.
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.