31 template<
class EquationOfState>
40 <<
"attempt to evaluate hPowerThermo<EquationOfState>" 41 " for negative temperature " << T
47 template<
class EquationOfState>
54 EquationOfState(name, jt),
64 template<
class EquationOfState>
67 const EquationOfState& st,
82 template<
class EquationOfState>
93 template<
class EquationOfState>
104 template<
class EquationOfState>
117 template<
class EquationOfState>
127 template<
class EquationOfState>
130 const scalar p,
const scalar T
137 template<
class EquationOfState>
140 const scalar p,
const scalar T
143 return hs(p, T) + hc();
147 template<
class EquationOfState>
150 const scalar p,
const scalar T
154 c0_*(
pow(T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1))
159 template<
class EquationOfState>
166 template<
class EquationOfState>
169 const scalar p,
const scalar T
180 template<
class EquationOfState>
181 inline void Foam::hPowerThermo<EquationOfState>::operator+=
186 scalar molr1 = this->nMoles();
188 EquationOfState::operator+=(ct);
189 molr1 /= this->nMoles();
190 scalar molr2 = ct.nMoles()/this->nMoles();
192 Hf_ = molr1*Hf_ + molr2*ct.Hf_;
193 c0_ = molr1*c0_ + molr2*ct.c0_;
194 n0_ = molr1*n0_ + molr2*ct.n0_;
195 Tref_ = molr1*Tref_ + molr2*ct.Tref_;
199 template<
class EquationOfState>
200 inline void Foam::hPowerThermo<EquationOfState>::operator-=
205 scalar molr1 = this->nMoles();
207 EquationOfState::operator-=(ct);
209 molr1 /= this->nMoles();
210 scalar molr2 = ct.nMoles()/this->nMoles();
212 Hf_ = molr1*Hf_ - molr2*ct.Hf_;
213 c0_ = (molr1*c0_ - molr2*ct.c0_);
214 n0_ = (molr1*n0_ - molr2*ct.n0_);
215 Tref_ = (molr1*Tref_ - molr2*ct.Tref_);
221 template<
class EquationOfState>
230 static_cast<const EquationOfState&>(ct1)
231 + static_cast<const EquationOfState&>(ct2)
237 ct1.nMoles()/eofs.nMoles()*ct1.c0_
238 + ct2.nMoles()/eofs.nMoles()*ct2.c0_,
239 ct1.nMoles()/eofs.nMoles()*ct1.n0_
240 + ct2.nMoles()/eofs.nMoles()*ct2.n0_,
241 ct1.nMoles()/eofs.nMoles()*ct1.Tref_
242 + ct2.nMoles()/eofs.nMoles()*ct2.Tref_,
243 ct1.nMoles()/eofs.nMoles()*ct1.Hf_
244 + ct2.nMoles()/eofs.nMoles()*ct2.Hf_
249 template<
class EquationOfState>
258 static_cast<const EquationOfState&>(ct1)
259 + static_cast<const EquationOfState&>(ct2)
265 ct1.nMoles()/eofs.nMoles()*ct1.c0_
266 - ct2.nMoles()/eofs.nMoles()*ct2.c0_,
267 ct1.nMoles()/eofs.nMoles()*ct1.n0_
268 - ct2.nMoles()/eofs.nMoles()*ct2.n0_,
269 ct1.nMoles()/eofs.nMoles()*ct1.Tref_
270 - ct2.nMoles()/eofs.nMoles()*ct2.Tref_,
271 ct1.nMoles()/eofs.nMoles()*ct1.Hf_
272 - ct2.nMoles()/eofs.nMoles()*ct2.Hf_
277 template<
class EquationOfState>
286 s*
static_cast<const EquationOfState&
>(ct),
295 template<
class EquationOfState>
autoPtr< hPowerThermo > clone() const
Construct and return a clone.
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.
scalar limit(const scalar T) const
Limit the temperature to be in the range Tlow_ to Thigh_.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
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))
scalar s(const scalar p, const scalar T) const
Entropy [J/(kmol K)].
A class for handling words, derived from string.
static autoPtr< hPowerThermo > New(Istream &is)
Selector from Istream.
scalar cp(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/(kg K)].
errorManip< error > abort(error &err)
const dimensionedScalar Tstd
Standard temperature.
const volScalarField & cp
const dimensionedScalar h
Planck constant.
scalar hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
scalar ha(const scalar p, const scalar T) const
Absolute enthalpy [J/kmol].
Power-function based thermodynamics package templated on EquationOfState.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
scalar hc() const
Chemical enthalpy [J/kg].