93 return rho0_ +
p/(this->
R()*T);
104template<
class Specie>
111template<
class Specie>
118template<
class Specie>
125template<
class Specie>
132template<
class Specie>
135 return 1.0/(this->
R()*T);
139template<
class Specie>
146template<
class Specie>
149 const scalar
R = this->
R();
150 const scalar
rho = this->
rho(p,
T);
158template<
class Specie>
164 scalar Y1 = this->
Y();
165 Specie::operator+=(pf);
167 if (
mag(this->
Y()) > SMALL)
170 const scalar Y2 = pf.Y()/this->
Y();
172 R_ = 1.0/(Y1/R_ + Y2/pf.R_);
173 rho0_ = Y1*rho0_ + Y2*pf.rho0_;
178template<
class Specie>
181 Specie::operator*=(
s);
187template<
class Specie>
188inline Foam::perfectFluid<Specie> Foam::operator+
196 static_cast<const Specie&
>(pf1)
197 +
static_cast<const Specie&
>(pf2)
200 if (
mag(sp.Y()) < SMALL)
211 const scalar Y1 = pf1.Y()/sp.Y();
212 const scalar Y2 = pf2.Y()/sp.Y();
217 1.0/(Y1/pf1.R_ + Y2/pf2.R_),
218 Y1*pf1.rho0_ + Y2*pf2.rho0_
224template<
class Specie>
225inline Foam::perfectFluid<Specie> Foam::operator*
233 s*
static_cast<const Specie&
>(pf),
240template<
class Specie>
241inline Foam::perfectFluid<Specie> Foam::operator==
249 static_cast<const Specie&
>(pf1)
250 ==
static_cast<const Specie&
>(pf2)
253 const scalar Y1 = pf1.Y()/sp.Y();
254 const scalar Y2 = pf2.Y()/sp.Y();
259 1.0/(Y2/pf2.R_ - Y1/pf1.R_),
260 Y2*pf2.rho0_ - Y1*pf1.rho0_
#define R(A, B, C, D, E, F, K, M)
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Perfect gas equation of state.
scalar Cv(scalar p, scalar T) const
Return Cv departure [J/(kg K].
scalar E(const scalar p, const scalar T) const
Return internal energy departure [J/kg].
scalar psi(scalar p, scalar T) const
Return compressibility rho/p [s^2/m^2].
scalar H(const scalar p, const scalar T) const
Return enthalpy departure [J/kg].
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].
scalar S(const scalar p, const scalar T) const
Return entropy [J/(kg K)].
autoPtr< perfectFluid > clone() const
Construct and return a clone.
scalar CpMCv(scalar p, scalar T) const
Return (Cp - Cv) [J/(kg K].
scalar Cp(scalar p, scalar T) const
Return Cp departure [J/(kg K].
static autoPtr< perfectFluid > New(const dictionary &dict)
scalar Z(scalar p, scalar T) const
Return compression factor [].
scalar R() const
Return fluid constant [J/(kg K)].
void operator*=(const scalar)
A class for handling words, derived from Foam::string.
PtrList< volScalarField > & Y
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.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))
const scalar Pstd
Standard pressure: default in [Pa].
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
dimensionedSymmTensor sqr(const dimensionedVector &dv)
dimensionedScalar log(const dimensionedScalar &ds)
dimensioned< typename typeOfMag< Type >::type > mag(const dimensioned< Type > &dt)
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for expressions::valueTypeCode::INVALID.
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)