30 template<
class Specie>
46 template<
class Specie>
59 template<
class Specie>
67 template<
class Specie>
75 template<
class Specie>
88 template<
class Specie>
91 return rho0_ + psi_*
p;
95 template<
class Specie>
102 template<
class Specie>
109 template<
class Specie>
112 return -
log((rho0_ + psi_*p)/(rho0_ + psi_*
Pstd))/(T*psi_);
116 template<
class Specie>
123 template<
class Specie>
130 template<
class Specie>
139 template<
class Specie>
140 inline void Foam::linear<Specie>::operator+=
145 scalar molr1 = this->nMoles();
147 Specie::operator+=(pf);
149 molr1 /= this->nMoles();
150 scalar molr2 = pf.nMoles()/this->nMoles();
152 psi_ = molr1*psi_ + molr2*pf.psi_;
153 rho0_ = molr1*rho0_ + molr2*pf.rho0_;
157 template<
class Specie>
158 inline void Foam::linear<Specie>::operator-=
163 scalar molr1 = this->nMoles();
165 Specie::operator-=(pf);
167 molr1 /= this->nMoles();
168 scalar molr2 = pf.nMoles()/this->nMoles();
170 psi_ = molr1*psi_ - molr2*pf.psi_;
171 rho0_ = molr1*rho0_ - molr2*pf.rho0_;
175 template<
class Specie>
178 Specie::operator*=(s);
184 template<
class Specie>
191 scalar nMoles = pf1.nMoles() + pf2.nMoles();
192 scalar molr1 = pf1.nMoles()/nMoles;
193 scalar molr2 = pf2.nMoles()/nMoles;
197 static_cast<const Specie&
>(pf1)
198 + static_cast<const Specie&>(pf2),
199 molr1*pf1.psi_ + molr2*pf2.psi_,
200 molr1*pf1.rho0_ + molr2*pf2.rho0_
205 template<
class Specie>
212 scalar nMoles = pf1.nMoles() + pf2.nMoles();
213 scalar molr1 = pf1.nMoles()/nMoles;
214 scalar molr2 = pf2.nMoles()/nMoles;
218 static_cast<const Specie&
>(pf1)
219 - static_cast<const Specie&>(pf2),
220 molr1*pf1.psi_ - molr2*pf2.psi_,
221 molr1*pf1.rho0_ - molr2*pf2.rho0_
226 template<
class Specie>
235 s*
static_cast<const Specie&
>(pf),
242 template<
class Specie>
scalar s(const scalar p, const scalar T) const
Return entropy [J/(kmol K)].
scalar rho(scalar p, scalar T) const
Return density [kg/m^3].
dimensionedScalar log(const dimensionedScalar &ds)
A list of keyword definitions, which are a keyword followed by any number of values (e...
Central-differencing interpolation scheme class.
scalar psi(scalar p, scalar T) const
Return compressibility rho/p [s^2/m^2].
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))
A class for handling words, derived from string.
void operator*=(const scalar)
scalar Z(scalar p, scalar T) const
Return compression factor [].
static autoPtr< linear > New(Istream &is)
scalar cp(scalar p, scalar T) const
Return cp departure [J/(kmol K].
const dimensionedScalar Pstd
Standard pressure.
linear(const fvMesh &mesh)
Construct from mesh.
scalar h(const scalar p, const scalar T) const
Return enthalpy departure [J/kmol].
scalar cpMcv(scalar p, scalar T) const
Return (cp - cv) [J/(kmol K].
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
RhoConst (rho = const) of state.
autoPtr< linear > clone() const
Construct and return a clone.