30 template<
class Specie,
int PolySize>
44 template<
class Specie,
int PolySize>
51 rhoCoeffs_(ip.rhoCoeffs_)
55 template<
class Specie,
int PolySize>
63 rhoCoeffs_(ip.rhoCoeffs_)
67 template<
class Specie,
int PolySize>
78 template<
class Specie,
int PolySize>
89 template<
class Specie,
int PolySize>
102 template<
class Specie,
int PolySize>
109 return rhoCoeffs_.value(T)/this->W();
113 template<
class Specie,
int PolySize>
124 template<
class Specie,
int PolySize>
135 template<
class Specie,
int PolySize>
146 template<
class Specie,
int PolySize>
157 template<
class Specie,
int PolySize>
168 template<
class Specie,
int PolySize>
175 return -(p/
sqr(rhoCoeffs_.value(T)))*rhoCoeffs_.derivative(T);
181 template<
class Specie,
int PolySize>
182 inline void Foam::icoPolynomial<Specie, PolySize>::operator=
187 Specie::operator=(ip);
189 rhoCoeffs_ = ip.rhoCoeffs_;
193 template<
class Specie,
int PolySize>
194 inline void Foam::icoPolynomial<Specie, PolySize>::operator+=
199 scalar molr1 = this->nMoles();
201 Specie::operator+=(ip);
203 molr1 /= this->nMoles();
204 scalar molr2 = ip.nMoles()/this->nMoles();
206 rhoCoeffs_ = molr1*rhoCoeffs_ + molr2*ip.rhoCoeffs_;
210 template<
class Specie,
int PolySize>
211 inline void Foam::icoPolynomial<Specie, PolySize>::operator-=
216 scalar molr1 = this->nMoles();
218 Specie::operator-=(ip);
220 molr1 /= this->nMoles();
221 scalar molr2 = ip.nMoles()/this->nMoles();
223 rhoCoeffs_ = molr1*rhoCoeffs_ - molr2*ip.rhoCoeffs_;
227 template<
class Specie,
int PolySize>
230 Specie::operator*=(s);
236 template<
class Specie,
int PolySize>
243 scalar nMoles = ip1.nMoles() + ip2.nMoles();
244 scalar molr1 = ip1.nMoles()/nMoles;
245 scalar molr2 = ip2.nMoles()/nMoles;
249 static_cast<const Specie&
>(ip1)
250 + static_cast<const Specie&>(ip2),
251 molr1*ip1.rhoCoeffs_ + molr2*ip2.rhoCoeffs_
256 template<
class Specie,
int PolySize>
263 scalar nMoles = ip1.nMoles() + ip2.nMoles();
264 scalar molr1 = ip1.nMoles()/nMoles;
265 scalar molr2 = ip2.nMoles()/nMoles;
269 static_cast<const Specie&
>(ip1)
270 - static_cast<const Specie&>(ip2),
271 molr1*ip1.rhoCoeffs_ - molr2*ip2.rhoCoeffs_
276 template<
class Specie,
int PolySize>
285 s*
static_cast<const Specie&
>(ip),
291 template<
class Specie,
int PolySize>
autoPtr< icoPolynomial > clone() const
Construct and return a clone.
A list of keyword definitions, which are a keyword followed by any number of values (e...
Incompressible, polynomial form of equation of state, using a polynomial function for density...
dimensionedSymmTensor sqr(const dimensionedVector &dv)
scalar rho(scalar p, scalar T) const
Return density [kg/m^3].
An Istream is an abstract base class for all input systems (streams, files, token lists etc)...
scalar psi(scalar p, scalar T) const
Return compressibility rho/p [s^2/m^2].
scalar Z(scalar p, scalar T) const
Return compression factor [].
void operator*=(const scalar)
scalar cpMcv(scalar p, scalar T) const
Return (cp - cv) [J/(kmol K].
scalar cp(scalar p, scalar T) const
Return cp departure [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))
icoPolynomial(const Specie &sp, const Polynomial< PolySize > &rhoPoly)
Construct from components.
A class for handling words, derived from string.
static autoPtr< icoPolynomial > New(Istream &is)
scalar h(const scalar p, const scalar T) const
Return enthalpy departure [J/kmol].
Polynomial templated on size (order):
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
scalar s(const scalar p, const scalar T) const
Return entropy [J/(kmol K)].