69 #ifndef icoPolynomial_H 70 #define icoPolynomial_H 82 template<
class Specie,
int PolySize>
85 template<
class Specie,
int PolySize>
92 template<
class Specie,
int PolySize>
99 template<
class Specie,
int PolySize>
106 template<
class Specie,
int PolySize>
118 template<
class Specie,
int PolySize=8>
132 inline static word coeffsName(
const char*
name)
134 return word(
name + (
"Coeffs<" + std::to_string(PolySize) +
'>'));
169 return "icoPolynomial<" +
word(Specie::typeName_()) +
'>';
182 inline scalar
rho(scalar
p, scalar
T)
const;
185 inline scalar
H(
const scalar
p,
const scalar
T)
const;
188 inline scalar
Cp(scalar
p, scalar
T)
const;
191 inline scalar
E(
const scalar
p,
const scalar
T)
const;
194 inline scalar
Cv(scalar
p, scalar
T)
const;
197 inline scalar
S(
const scalar
p,
const scalar
T)
const;
200 inline scalar
psi(scalar
p, scalar
T)
const;
203 inline scalar
Z(scalar
p, scalar
T)
const;
206 inline scalar
CpMCv(scalar
p, scalar
T)
const;
244 friend Ostream& operator<< <Specie, PolySize>
258 #define makeIcoPolynomial(PolySize) \ 260 defineTemplateTypeNameAndDebugWithName \ 262 icoPolynomial<Specie, PolySize>, \ 263 "icoPolynomial<"#PolySize">", \ scalar H(const scalar p, const scalar T) const
Return enthalpy departure [J/kg].
scalar psi(scalar p, scalar T) const
Return compressibility rho/p [s^2/m^2].
autoPtr< icoPolynomial > clone() const
Construct and return a clone.
A list of keyword definitions, which are a keyword followed by a number of values (eg...
scalar E(const scalar p, const scalar T) const
Return internal energy departure [J/kg].
Incompressible, polynomial form of equation of state, using a polynomial function for density...
static const bool incompressible
Is the equation of state is incompressible i.e. rho != f(p)
scalar Z(scalar p, scalar T) const
Return compression factor [].
scalar Cp(scalar p, scalar T) const
Return Cp departure [J/(kg K].
static const bool isochoric
Is the equation of state is isochoric i.e. rho = const.
static autoPtr< icoPolynomial > New(const dictionary &dict)
void operator*=(const scalar)
scalar CpMCv(scalar p, scalar T) const
Return (Cp - Cv) [J/(kg K].
icoPolynomial(const Specie &sp, const Polynomial< PolySize > &rhoPoly)
Construct from components.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.
void write(Ostream &os) const
Write to Ostream.
A class for handling words, derived from Foam::string.
scalar S(const scalar p, const scalar T) const
Return entropy [J/(kg K)].
scalar Cv(scalar p, scalar T) const
Return Cv departure [J/(kg K].
An Ostream is an abstract base class for all output systems (streams, files, token lists...
void operator+=(const icoPolynomial &)
OBJstream os(runTime.globalPath()/outputName)
void T(FieldField< Field, Type > &f1, const FieldField< Field, Type > &f2)
Polynomial templated on size (order):
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
scalar rho(scalar p, scalar T) const
Return density [kg/m^3].
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))
static word typeName()
Return the instantiated type name.