31 template<
class Specie>
47 template<
class Specie>
60 template<
class Specie>
68 template<
class Specie>
76 template<
class Specie>
89 template<
class Specie>
96 template<
class Specie>
99 return rho0_ + p/(this->
R()*
T);
103 template<
class Specie>
110 template<
class Specie>
117 template<
class Specie>
124 template<
class Specie>
127 return 1.0/(this->
R()*
T);
131 template<
class Specie>
138 template<
class Specie>
147 template<
class Specie>
148 inline void Foam::perfectFluid<Specie>::operator+=
153 scalar molr1 = this->nMoles();
155 Specie::operator+=(pf);
157 molr1 /= this->nMoles();
158 scalar molr2 = pf.nMoles()/this->nMoles();
160 R_ = 1.0/(molr1/R_ + molr2/pf.R_);
161 rho0_ = molr1*rho0_ + molr2*pf.rho0_;
165 template<
class Specie>
166 inline void Foam::perfectFluid<Specie>::operator-=
171 scalar molr1 = this->nMoles();
173 Specie::operator-=(pf);
175 molr1 /= this->nMoles();
176 scalar molr2 = pf.nMoles()/this->nMoles();
178 R_ = 1.0/(molr1/R_ - molr2/pf.R_);
179 rho0_ = molr1*rho0_ - molr2*pf.rho0_;
183 template<
class Specie>
186 Specie::operator*=(s);
192 template<
class Specie>
199 scalar nMoles = pf1.nMoles() + pf2.nMoles();
200 scalar molr1 = pf1.nMoles()/nMoles;
201 scalar molr2 = pf2.nMoles()/nMoles;
205 static_cast<const Specie&
>(pf1)
206 + static_cast<const Specie&>(pf2),
207 1.0/(molr1/pf1.R_ + molr2/pf2.R_),
208 molr1*pf1.rho0_ + molr2*pf2.rho0_
213 template<
class Specie>
220 scalar nMoles = pf1.nMoles() + pf2.nMoles();
221 scalar molr1 = pf1.nMoles()/nMoles;
222 scalar molr2 = pf2.nMoles()/nMoles;
226 static_cast<const Specie&
>(pf1)
227 - static_cast<const Specie&>(pf2),
228 1.0/(molr1/pf1.R_ - molr2/pf2.R_),
229 molr1*pf1.rho0_ - molr2*pf2.rho0_
234 template<
class Specie>
243 s*
static_cast<const Specie&
>(pf),
250 template<
class Specie>
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
scalar R() const
Return fluid constant [J/(kg K)].
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
scalar cpMcv(scalar p, scalar T) const
Return (cp - cv) [J/(kmol K].
perfectFluid(const Specie &sp, const scalar R, const scalar rho0)
Construct from components.
scalar h(const scalar p, const scalar T) const
Return enthalpy departure [J/kmol].
static autoPtr< perfectFluid > New(Istream &is)
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.
void operator*=(const scalar)
const dimensionedScalar Pstd
Standard pressure.
scalar Z(scalar p, scalar T) const
Return compression factor [].
Perfect gas equation of state.
scalar s(const scalar p, const scalar T) const
Return entropy [J/(kmol K)].
#define R(A, B, C, D, E, F, K, M)
scalar psi(scalar p, scalar T) const
Return compressibility rho/p [s^2/m^2].
const scalar RR
Universal gas constant (default in [J/(kmol K)])
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
scalar rho(scalar p, scalar T) const
Return density [kg/m^3].
autoPtr< perfectFluid > clone() const
Construct and return a clone.
scalar cp(scalar p, scalar T) const
Return cp departure [J/(kmol K].