30 template<
class Specie>
50 template<
class Specie>
65 template<
class Specie>
76 template<
class Specie>
92 template<
class Specie>
99 return rho0_*
pow((p + B_)/(p0_ + B_), 1.0/gamma_);
103 template<
class Specie>
114 template<
class Specie>
125 template<
class Specie>
132 scalar
n = 1 - 1.0/gamma_;
134 -
pow(p0_ + B_, 1.0/gamma_)*(
pow((p + B_), n) -
pow((
Pstd + B_), n))
139 template<
class Specie>
147 (rho0_/(gamma_*(p0_ + B_)))
148 *
pow((p + B_)/(p0_ + B_), 1.0/gamma_ - 1.0);
152 template<
class Specie>
159 template<
class Specie>
172 template<
class Specie>
173 inline void Foam::adiabaticPerfectFluid<Specie>::operator+=
178 scalar
Y1 = this->
Y();
179 Specie::operator+=(pf);
181 if (
mag(this->
Y()) > SMALL)
184 const scalar
Y2 = pf.Y()/this->
Y();
186 p0_ = Y1*p0_ + Y2*pf.p0_;
187 rho0_ = Y1*rho0_ + Y2*pf.rho0_;
188 gamma_ = Y1*gamma_ + Y2*pf.gamma_;
189 B_ = Y1*B_ + Y2*pf.B_;
194 template<
class Specie>
197 Specie::operator*=(s);
203 template<
class Specie>
212 static_cast<const Specie&>(pf1)
213 + static_cast<const Specie&>(pf2)
216 if (
mag(sp.Y()) < SMALL)
229 const scalar
Y1 = pf1.Y()/sp.Y();
230 const scalar
Y2 = pf2.Y()/sp.Y();
235 Y1*pf1.p0_ + Y2*pf2.p0_,
236 Y1*pf1.rho0_ + Y2*pf2.rho0_,
237 Y1*pf1.gamma_ + Y2*pf2.gamma_,
238 Y1*pf1.B_ + Y2*pf2.B_
244 template<
class Specie>
253 s*
static_cast<const Specie&
>(pf),
262 template<
class Specie>
271 static_cast<const Specie&>(pf1)
272 == static_cast<const Specie&>(pf2)
275 const scalar
Y1 = pf1.Y()/sp.Y();
276 const scalar
Y2 = pf2.Y()/sp.Y();
281 Y2*pf2.p0_ - Y1*pf1.p0_,
282 Y2*pf2.rho0_ - Y1*pf1.rho0_,
283 Y2*pf2.gamma_ - Y1*pf1.gamma_,
284 Y2*pf2.B_ - Y1*pf1.B_
PtrList< volScalarField > & Y1
scalar Z(scalar p, scalar T) const
Return compression factor [].
static autoPtr< adiabaticPerfectFluid > New(const dictionary &dict)
A list of keyword definitions, which are a keyword followed by any number of values (e...
adiabaticPerfectFluid(const Specie &sp, const scalar p0, const scalar rho0, const scalar gamma, const scalar B)
Construct from components.
scalar psi(scalar p, scalar T) const
Return compressibility rho/p [s^2/m^2].
PtrList< volScalarField > & Y2
scalar S(const scalar p, const scalar T) const
Return entropy [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))
scalar Cp(scalar p, scalar T) const
Return Cp departure [J/(kg K].
A class for handling words, derived from string.
scalar CpMCv(scalar p, scalar T) const
Return (Cp - Cv) [J/(kg K].
const dimensionedScalar Pstd
Standard pressure.
scalar H(const scalar p, const scalar T) const
Return enthalpy departure [J/kg].
autoPtr< adiabaticPerfectFluid > clone() const
Construct and return a clone.
scalar rho(scalar p, scalar T) const
Return density [kg/m^3].
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
Adiabatic perfect fluid equation of state.
PtrList< volScalarField > & Y
dimensioned< scalar > mag(const dimensioned< Type > &)
void operator*=(const scalar)
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...