31 template<
class Specie>
34 const Specie& sp,
const scalar rho0,
const scalar T0,
const scalar beta
44 template<
class Specie>
58 template<
class Specie>
69 template<
class Specie>
85 template<
class Specie>
92 return rho0_*(1.0 - beta_*(T - T0_));
96 template<
class Specie>
103 template<
class Specie>
110 template<
class Specie>
121 template<
class Specie>
132 template<
class Specie>
143 template<
class Specie>
156 template<
class Specie>
157 inline void Foam::Boussinesq<Specie>::operator=
162 Specie::operator=(b);
170 template<
class Specie>
171 inline void Foam::Boussinesq<Specie>::operator+=
176 scalar
Y1 = this->
Y();
177 Specie::operator+=(b);
179 if (
mag(this->
Y()) > SMALL)
182 const scalar
Y2 = b.Y()/this->
Y();
184 rho0_ = Y1*rho0_ + Y2*b.rho0_;
185 T0_ = Y1*T0_ + Y2*b.T0_;
186 beta_ = Y1*beta_ + Y2*b.beta_;
191 template<
class Specie>
194 Specie::operator*=(s);
200 template<
class Specie>
207 Specie sp(static_cast<const Specie&>(b1) + static_cast<const Specie&>(b2));
209 if (
mag(sp.Y()) < SMALL)
221 const scalar
Y1 = b1.Y()/sp.Y();
222 const scalar
Y2 = b2.Y()/sp.Y();
227 Y1*b1.rho0_ + Y2*b2.rho0_,
228 Y1*b1.T0_ + Y2*b2.T0_,
229 Y1*b1.beta_ + Y2*b2.beta_
235 template<
class Specie>
244 s*
static_cast<const Specie&
>(
b),
252 template<
class Specie>
259 Specie sp(static_cast<const Specie&>(b1) == static_cast<const Specie&>(b2));
261 const scalar
Y1 = b1.Y()/sp.Y();
262 const scalar
Y2 = b2.Y()/sp.Y();
267 Y2*b2.rho0_ - Y1*b1.rho0_,
268 Y2*b2.T0_ - Y1*b1.T0_,
269 Y2*b2.beta_ - Y1*b1.beta_
PtrList< volScalarField > & Y1
Boussinesq(const Specie &sp, const scalar rho0, const scalar T0, const scalar beta)
Construct from components.
A list of keyword definitions, which are a keyword followed by any number of values (e...
scalar S(const scalar p, const scalar T) const
Return entropy [J/(kg K)].
scalar rho(scalar p, scalar T) const
Return density [kg/m^3].
static autoPtr< Boussinesq > New(const dictionary &dict)
PtrList< volScalarField > & Y2
autoPtr< Boussinesq > clone() const
Construct and return a clone.
scalar Cp(scalar p, scalar T) const
Return Cp departure [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 psi(scalar p, scalar T) const
Return compressibility rho/p [s^2/m^2].
const dimensionedScalar b
Wien displacement law constant: default SI units: [m.K].
scalar Z(scalar p, scalar T) const
Return compression factor [].
A class for handling words, derived from string.
scalar H(const scalar p, const scalar T) const
Return enthalpy departure [J/kg].
#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 CpMCv(scalar p, scalar T) const
Return (Cp - Cv) [J/(kg K].
void operator*=(const scalar)
Incompressible gas equation of state using the Boussinesq approximation for the density as a function...