31 template<
class Specie>
47 template<
class Specie>
60 template<
class Specie>
68 template<
class Specie>
81 template<
class Specie>
88 template<
class Specie>
91 return rho0_ + p/(this->
R()*
T);
95 template<
class Specie>
102 template<
class Specie>
109 template<
class Specie>
116 template<
class Specie>
119 return 1.0/(this->
R()*
T);
123 template<
class Specie>
130 template<
class Specie>
139 template<
class Specie>
140 inline void Foam::perfectFluid<Specie>::operator+=
145 scalar Y1 = this->
Y();
146 Specie::operator+=(pf);
148 if (
mag(this->
Y()) > small)
151 const scalar Y2 = pf.Y()/this->
Y();
153 R_ = 1.0/(Y1/R_ + Y2/pf.R_);
154 rho0_ = Y1*rho0_ + Y2*pf.rho0_;
159 template<
class Specie>
162 Specie::operator*=(s);
168 template<
class Specie>
177 static_cast<const Specie&>(pf1)
178 + static_cast<const Specie&>(pf2)
181 if (
mag(sp.Y()) < small)
192 const scalar Y1 = pf1.Y()/sp.Y();
193 const scalar Y2 = pf2.Y()/sp.Y();
198 1.0/(Y1/pf1.R_ + Y2/pf2.R_),
199 Y1*pf1.rho0_ + Y2*pf2.rho0_
205 template<
class Specie>
214 s*
static_cast<const Specie&
>(pf),
221 template<
class Specie>
230 static_cast<const Specie&>(pf1)
231 == static_cast<const Specie&>(pf2)
234 if (
mag(sp.Y()) < small)
245 const scalar Y1 = pf1.Y()/sp.Y();
246 const scalar Y2 = pf2.Y()/sp.Y();
247 const scalar oneByR = Y2/pf2.R_ - Y1/pf1.R_;
252 mag(oneByR) < small ? great : 1/oneByR,
253 Y2*pf2.rho0_ - Y1*pf1.rho0_
autoPtr< perfectFluid > clone() const
Construct and return a clone.
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
perfectFluid(const Specie &sp, const scalar R, const scalar rho0)
Construct from components.
scalar rho(scalar p, scalar T) const
Return density [kg/m^3].
static autoPtr< perfectFluid > New(const dictionary &dict)
scalar CpMCv(scalar p, scalar T) const
Return (Cp - Cv) [J/(kg K].
scalar R() const
Return fluid constant [J/(kg K)].
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 [].
scalar H(const scalar p, const scalar T) const
Return enthalpy departure [J/kg].
scalar S(const scalar p, const scalar T) const
Return entropy [J/(kg K)].
Perfect gas equation of state.
scalar psi(scalar p, scalar T) const
Return compressibility rho/p [s^2/m^2].
#define R(A, B, C, D, E, F, K, M)
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...
scalar Cp(scalar p, scalar T) const
Return Cp departure [J/(kg K].