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>
104 return Cp_ + EquationOfState::Cp(p, T);
108 template<
class EquationOfState>
111 const scalar p,
const scalar T
114 return Cp_*(T-Tref_) + Href_ + Hf_ + EquationOfState::H(p, T);
118 template<
class EquationOfState>
121 const scalar p,
const scalar T
124 return Cp_*(T-Tref_) + Href_ + EquationOfState::H(p, T);
128 template<
class EquationOfState>
135 template<
class EquationOfState>
138 const scalar p,
const scalar T
141 return Cp_*
log(T/
Tstd) + EquationOfState::S(p, T);
147 template<
class EquationOfState>
148 inline void Foam::hRefConstThermo<EquationOfState>::operator+=
153 scalar
Y1 = this->
Y();
155 EquationOfState::operator+=(ct);
157 if (
mag(this->
Y()) > SMALL)
160 const scalar
Y2 = ct.Y()/this->
Y();
162 Cp_ = Y1*Cp_ + Y2*ct.Cp_;
163 Hf_ = Y1*Hf_ + Y2*ct.Hf_;
170 template<
class EquationOfState>
179 static_cast<const EquationOfState&>(ct1)
180 + static_cast<const EquationOfState&>(ct2)
183 if (
mag(eofs.Y()) < SMALL)
199 ct1.Y()/eofs.Y()*ct1.Cp_
200 + ct2.Y()/eofs.Y()*ct2.Cp_,
201 ct1.Y()/eofs.Y()*ct1.Hf_
202 + ct2.Y()/eofs.Y()*ct2.Hf_,
203 ct1.Y()/eofs.Y()*ct1.Tref_
204 + ct2.Y()/eofs.Y()*ct2.Tref_,
205 ct1.Y()/eofs.Y()*ct1.Href_
206 + ct2.Y()/eofs.Y()*ct2.Href_
212 template<
class EquationOfState>
221 s*
static_cast<const EquationOfState&
>(ct),
230 template<
class EquationOfState>
239 static_cast<const EquationOfState&>(ct1)
240 == static_cast<const EquationOfState&>(ct2)
246 ct2.Y()/eofs.Y()*ct2.Cp_
247 - ct1.Y()/eofs.Y()*ct1.Cp_,
248 ct2.Y()/eofs.Y()*ct2.Hf_
249 - ct1.Y()/eofs.Y()*ct1.Hf_
PtrList< volScalarField > & Y1
scalar S(const scalar p, const scalar T) const
Entropy [J/(kg K)].
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
scalar Hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
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].
PtrList< volScalarField > & Y2
static autoPtr< hRefConstThermo > New(const dictionary &dict)
Selector from dictionary.
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 limit(const scalar T) const
Limit the temperature to be in the range Tlow_ to Thigh_.
const dimensionedScalar Tstd
Standard temperature.
const volScalarField & cp
scalar Hc() const
Chemical enthalpy [J/kg].
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
PtrList< volScalarField > & Y
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...
Constant properties thermodynamics package templated into the EquationOfState.
autoPtr< hRefConstThermo > clone() const
Construct and return a clone.