31 template<
class EquationOfState>
41 "hPowerThermo<EquationOfState>::checkT(const scalar T) const" 42 ) <<
"attempt to evaluate hPowerThermo<EquationOfState>" 43 " for negative temperature " << T
49 template<
class EquationOfState>
56 EquationOfState(name, jt),
66 template<
class EquationOfState>
69 const EquationOfState& st,
84 template<
class EquationOfState>
95 template<
class EquationOfState>
106 template<
class EquationOfState>
119 template<
class EquationOfState>
129 template<
class EquationOfState>
132 const scalar p,
const scalar T
135 return c0_*
pow(T/Tref_, n0_);
139 template<
class EquationOfState>
142 const scalar p,
const scalar T
145 return hs(p, T) + hc();
149 template<
class EquationOfState>
152 const scalar p,
const scalar T
156 c0_*(
pow(T, n0_ + 1) -
pow(
Tstd, n0_ + 1))/(
pow(Tref_, n0_)*(n0_ + 1));
160 template<
class EquationOfState>
167 template<
class EquationOfState>
170 const scalar p,
const scalar T
181 template<
class EquationOfState>
182 inline void Foam::hPowerThermo<EquationOfState>::operator+=
187 scalar molr1 = this->nMoles();
189 EquationOfState::operator+=(ct);
190 molr1 /= this->nMoles();
191 scalar molr2 = ct.nMoles()/this->nMoles();
193 Hf_ = molr1*Hf_ + molr2*ct.Hf_;
194 c0_ = molr1*c0_ + molr2*ct.c0_;
195 n0_ = molr1*n0_ + molr2*ct.n0_;
196 Tref_ = molr1*Tref_ + molr2*ct.Tref_;
200 template<
class EquationOfState>
201 inline void Foam::hPowerThermo<EquationOfState>::operator-=
206 scalar molr1 = this->nMoles();
208 EquationOfState::operator-=(ct);
210 molr1 /= this->nMoles();
211 scalar molr2 = ct.nMoles()/this->nMoles();
213 Hf_ = molr1*Hf_ - molr2*ct.Hf_;
214 c0_ = (molr1*c0_ - molr2*ct.c0_);
215 n0_ = (molr1*n0_ - molr2*ct.n0_);
216 Tref_ = (molr1*Tref_ - molr2*ct.Tref_);
222 template<
class EquationOfState>
231 static_cast<const EquationOfState&>(ct1)
232 + static_cast<const EquationOfState&>(ct2)
238 ct1.nMoles()/eofs.nMoles()*ct1.c0_
239 + ct2.nMoles()/eofs.nMoles()*ct2.c0_,
240 ct1.nMoles()/eofs.nMoles()*ct1.n0_
241 + ct2.nMoles()/eofs.nMoles()*ct2.n0_,
242 ct1.nMoles()/eofs.nMoles()*ct1.Tref_
243 + ct2.nMoles()/eofs.nMoles()*ct2.Tref_,
244 ct1.nMoles()/eofs.nMoles()*ct1.Hf_
245 + ct2.nMoles()/eofs.nMoles()*ct2.Hf_
250 template<
class EquationOfState>
259 static_cast<const EquationOfState&>(ct1)
260 + static_cast<const EquationOfState&>(ct2)
266 ct1.nMoles()/eofs.nMoles()*ct1.c0_
267 - ct2.nMoles()/eofs.nMoles()*ct2.c0_,
268 ct1.nMoles()/eofs.nMoles()*ct1.n0_
269 - ct2.nMoles()/eofs.nMoles()*ct2.n0_,
270 ct1.nMoles()/eofs.nMoles()*ct1.Tref_
271 - ct2.nMoles()/eofs.nMoles()*ct2.Tref_,
272 ct1.nMoles()/eofs.nMoles()*ct1.Hf_
273 - ct2.nMoles()/eofs.nMoles()*ct2.Hf_
278 template<
class EquationOfState>
287 s*
static_cast<const EquationOfState&
>(ct),
296 template<
class EquationOfState>
scalar hs(const scalar p, const scalar T) const
Sensible enthalpy [J/kg].
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
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 ))
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
A class for handling words, derived from string.
scalar s(const scalar p, const scalar T) const
Entropy [J/(kmol K)].
A list of keyword definitions, which are a keyword followed by any number of values (e...
scalar limit(const scalar T) const
Limit the temperature to be in the range Tlow_ to Thigh_.
Power-function based thermodynamics package templated on EquationOfState.
const dimensionedScalar Tstd
Standard temperature.
autoPtr< hPowerThermo > clone() const
Construct and return a clone.
errorManip< error > abort(error &err)
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
scalar ha(const scalar p, const scalar T) const
Absolute enthalpy [J/kmol].
scalar cp(const scalar p, const scalar T) const
Heat capacity at constant pressure [J/(kg K)].
static autoPtr< hPowerThermo > New(Istream &is)
Selector from Istream.
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].