Go to the documentation of this file.
30 template<
class Specie>
50 template<
class Specie>
65 template<
class Specie>
76 template<
class Specie>
87 template<
class Specie>
103 template<
class Specie>
110 return rho0_*
pow((
p + B_)/(p0_ + B_), 1.0/gamma_);
114 template<
class Specie>
121 scalar
n = 1 - 1.0/gamma_;
128 template<
class Specie>
136 (rho0_/(gamma_*(p0_ + B_)))
137 *
pow((
p + B_)/(p0_ + B_), 1.0/gamma_ - 1.0);
141 template<
class Specie>
148 template<
class Specie>
161 template<
class Specie>
167 scalar molr1 = this->nMoles();
169 Specie::operator+=(pf);
171 molr1 /= this->nMoles();
172 scalar molr2 = pf.nMoles()/this->nMoles();
174 p0_ = molr1*p0_ + molr2*pf.p0_;
175 rho0_ = molr1*rho0_ + molr2*pf.rho0_;
176 gamma_ = molr1*gamma_ + molr2*pf.gamma_;
177 B_ = molr1*B_ + molr2*pf.B_;
181 template<
class Specie>
187 scalar molr1 = this->nMoles();
189 Specie::operator-=(pf);
191 molr1 /= this->nMoles();
192 scalar molr2 = pf.nMoles()/this->nMoles();
194 p0_ = molr1*p0_ - molr2*pf.p0_;
195 rho0_ = molr1*rho0_ - molr2*pf.rho0_;
196 gamma_ = molr1*gamma_ - molr2*pf.gamma_;
197 B_ = molr1*B_ - molr2*pf.B_;
201 template<
class Specie>
204 Specie::operator*=(
s);
210 template<
class Specie>
217 scalar nMoles = pf1.nMoles() + pf2.nMoles();
218 scalar molr1 = pf1.nMoles()/nMoles;
219 scalar molr2 = pf2.nMoles()/nMoles;
223 static_cast<const Specie&
>(pf1)
224 +
static_cast<const Specie&
>(pf2),
225 molr1*pf1.
p0_ + molr2*pf2.p0_,
226 molr1*pf1.
rho0_ + molr2*pf2.rho0_,
227 molr1*pf1.
gamma_ + molr2*pf2.gamma_,
228 molr1*pf1.
B_ + molr2*pf2.B_
233 template<
class Specie>
236 const adiabaticPerfectFluid<Specie>& pf1,
237 const adiabaticPerfectFluid<Specie>& pf2
240 scalar nMoles = pf1.nMoles() + pf2.nMoles();
241 scalar molr1 = pf1.nMoles()/nMoles;
242 scalar molr2 = pf2.nMoles()/nMoles;
244 return rhoConst<Specie>
246 static_cast<const Specie&
>(pf1)
247 -
static_cast<const Specie&
>(pf2),
248 molr1*pf1.
p0_ - molr2*pf2.p0_,
249 molr1*pf1.
rho0_ - molr2*pf2.rho0_,
250 molr1*pf1.
gamma_ - molr2*pf2.gamma_,
251 molr1*pf1.
B_ - molr2*pf2.B_
256 template<
class Specie>
260 const adiabaticPerfectFluid<Specie>& pf
263 return adiabaticPerfectFluid<Specie>
265 s*
static_cast<const Specie&
>(pf),
274 template<
class Specie>
277 const adiabaticPerfectFluid<Specie>& pf1,
278 const adiabaticPerfectFluid<Specie>& pf2
scalar B_
Pressure offset for a stiffened gas.
scalar psi(scalar p, scalar T) const
Return compressibility rho/p [s^2/m^2].
A class for handling words, derived from string.
static autoPtr< adiabaticPerfectFluid > New(Istream &is)
const dimensionedScalar Pstd
Standard pressure.
scalar Z(scalar p, scalar T) const
Return compression factor [].
AdiabaticPerfect gas equation of state.
scalar rho0_
Reference density.
scalar gamma_
The isentropic exponent.
An Istream is an abstract base class for all input systems (streams, files, token lists etc)....
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
dimensionedScalar pow(const dimensionedScalar &ds, const dimensionedScalar &expt)
scalar rho(scalar p, scalar T) const
Return density [kg/m^3].
A list of keyword definitions, which are a keyword followed by any number of values (e....
scalar cpMcv(scalar p, scalar T) const
Return (cp - cv) [J/(kmol 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))
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
scalar p0_
Reference pressure.
scalar s(const scalar p, const scalar T) const
Return entropy [J/(kmol K)].
autoPtr< adiabaticPerfectFluid > clone() const
Construct and return a clone.
adiabaticPerfectFluid(const Specie &sp, const scalar p0, const scalar rho0, const scalar gamma, const scalar B)
Construct from components.
RhoConst (rho = const) of state.
word name(const complex &)
Return a string representation of a complex.
void operator*=(const scalar)