ePolynomialThermo< EquationOfState, PolySize > Class Template Reference

Internal energy based thermodynamics package using a polynomial function of temperature for the constant heat capacity at constant volume: More...

Inheritance diagram for ePolynomialThermo< EquationOfState, PolySize >:
Collaboration diagram for ePolynomialThermo< EquationOfState, PolySize >:

Public Member Functions

 ePolynomialThermo (const word &name, const dictionary &dict)
 Construct from name and dictionary. More...
 
 ePolynomialThermo (const word &, const ePolynomialThermo &)
 Construct as a named copy. More...
 
scalar limit (const scalar) const
 Limit the temperature to be in the range Tlow_ to Thigh_. More...
 
scalar Cv (const scalar p, const scalar T) const
 Heat capacity at constant volume [J/kg/K]. More...
 
scalar Es (const scalar p, const scalar T) const
 Sensible internal energy [J/kg]. More...
 
scalar Ea (const scalar p, const scalar T) const
 Absolute internal energy [J/kg]. More...
 
scalar Hf () const
 Enthalpy of formation [J/kg]. More...
 
scalar S (const scalar p, const scalar T) const
 Entropy [J/kg/K]. More...
 
scalar Gstd (const scalar T) const
 Gibbs free energy of the mixture in the standard state [J/kg]. More...
 
scalar dCpdT (const scalar p, const scalar T) const
 Temperature derivative of heat capacity at constant pressure. More...
 
void write (Ostream &os) const
 Write to Ostream. More...
 
void operator+= (const ePolynomialThermo &)
 
void operator*= (const scalar)
 

Static Public Member Functions

static word typeName ()
 Return the instantiated type name. More...
 

Friends

ePolynomialThermo operator+ (const ePolynomialThermo &, const ePolynomialThermo &)
 
ePolynomialThermo operator* (const scalar, const ePolynomialThermo &)
 
ePolynomialThermo operator== (const ePolynomialThermo &, const ePolynomialThermo &)
 
Ostreamoperator (Ostream &, const ePolynomialThermo &)
 

Detailed Description

template<class EquationOfState, int PolySize = 8>
class Foam::ePolynomialThermo< EquationOfState, PolySize >

Internal energy based thermodynamics package using a polynomial function of temperature for the constant heat capacity at constant volume:

    Cv = CvCoeffs[0] + CvCoeffs[1]*T + CvCoeffs[2]*sqr(T)
       + CvCoeffs[3]*pow3(T) + CvCoeffs[4]*pow4(T)
       + CvCoeffs[5]*pow(T, 5) + CvCoeffs[6]*pow(T, 6)
       + CvCoeffs[7]*pow(T, 7)

The polynomial function is templated on the order of the polynomial which defaults to 8.

Usage
Property Description
Hf Heat of formation
Sf Standard entropy
CvCoeffs<8> Specific heat at constant volume polynomial coeffs

Example of the specification of the thermodynamic properties:

    thermodynamics
    {
        Hf              0;
        Sf              0;
        CvCoeffs<8>     (1000 -0.05 0.003 0 0 0 0 0);
    }

Note: Specific heat at constant volume polynomial coefficients evaluate to an expression in [J/kg/K].

Source files
See also
Foam::Polynomial

Definition at line 133 of file ePolynomialThermo.H.

Constructor & Destructor Documentation

◆ ePolynomialThermo() [1/2]

ePolynomialThermo ( const word name,
const dictionary dict 
)

Construct from name and dictionary.

Definition at line 32 of file ePolynomialThermo.C.

References Foam::constant::standard::Tstd.

◆ ePolynomialThermo() [2/2]

ePolynomialThermo ( const word name,
const ePolynomialThermo< EquationOfState, PolySize > &  pt 
)
inline

Construct as a named copy.

Definition at line 51 of file ePolynomialThermoI.H.

Member Function Documentation

◆ typeName()

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 185 of file ePolynomialThermo.H.

◆ limit()

Foam::scalar limit ( const scalar  T) const
inline

Limit the temperature to be in the range Tlow_ to Thigh_.

Definition at line 69 of file ePolynomialThermoI.H.

References Foam::T().

Here is the call graph for this function:

◆ Cv()

Foam::scalar Cv ( const scalar  p,
const scalar  T 
) const
inline

Heat capacity at constant volume [J/kg/K].

Definition at line 79 of file ePolynomialThermoI.H.

References Cv(), p, and Foam::T().

Here is the call graph for this function:

◆ Es()

Foam::scalar Es ( const scalar  p,
const scalar  T 
) const
inline

Sensible internal energy [J/kg].

Definition at line 90 of file ePolynomialThermoI.H.

References p, and Foam::T().

Here is the call graph for this function:

◆ Ea()

Foam::scalar Ea ( const scalar  p,
const scalar  T 
) const
inline

Absolute internal energy [J/kg].

Definition at line 101 of file ePolynomialThermoI.H.

References Es(), p, and Foam::T().

Here is the call graph for this function:

◆ Hf()

Foam::scalar Hf
inline

Enthalpy of formation [J/kg].

Definition at line 112 of file ePolynomialThermoI.H.

◆ S()

Foam::scalar S ( const scalar  p,
const scalar  T 
) const
inline

Entropy [J/kg/K].

Definition at line 120 of file ePolynomialThermoI.H.

References p, and Foam::T().

Here is the call graph for this function:

◆ Gstd()

Foam::scalar Gstd ( const scalar  T) const
inline

Gibbs free energy of the mixture in the standard state [J/kg].

Definition at line 131 of file ePolynomialThermoI.H.

References Foam::constant::standard::Pstd, rho, Foam::fvm::S(), and Foam::T().

Here is the call graph for this function:

◆ dCpdT()

Foam::scalar dCpdT ( const scalar  p,
const scalar  T 
) const
inline

Temperature derivative of heat capacity at constant pressure.

Definition at line 143 of file ePolynomialThermoI.H.

References NotImplemented, and Foam::T().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const

Write to Ostream.

Definition at line 65 of file ePolynomialThermo.C.

References dictionary::add(), dict, dictionaryName::dictName(), Foam::indent(), Foam::name(), and Foam::vtkWriteOps::write().

Here is the call graph for this function:

◆ operator+=()

void operator+= ( const ePolynomialThermo< EquationOfState, PolySize > &  )
inline

Definition at line 157 of file ePolynomialThermoI.H.

References Foam::mag(), and Y.

Here is the call graph for this function:

◆ operator*=()

void operator*= ( const scalar  s)
inline

Definition at line 181 of file ePolynomialThermoI.H.

References s().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator+

ePolynomialThermo operator+ ( const ePolynomialThermo< EquationOfState, PolySize > &  ,
const ePolynomialThermo< EquationOfState, PolySize > &   
)
friend

◆ operator*

ePolynomialThermo operator* ( const  scalar,
const ePolynomialThermo< EquationOfState, PolySize > &   
)
friend

◆ operator==

ePolynomialThermo operator== ( const ePolynomialThermo< EquationOfState, PolySize > &  ,
const ePolynomialThermo< EquationOfState, PolySize > &   
)
friend

◆ operator

Ostream& operator ( Ostream ,
const ePolynomialThermo< EquationOfState, PolySize > &   
)
friend

The documentation for this class was generated from the following files: