hPolynomialThermo< EquationOfState, PolySize > Class Template Reference

Enthalpy based thermodynamics package using a polynomial function of temperature for the constant heat capacity at constant pressure: More...

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

Public Member Functions

 hPolynomialThermo (const EquationOfState &pt, const scalar Hf, const scalar Sf, const Polynomial< PolySize > &CpCoeffs, const typename Polynomial< PolySize >::intPolyType &hCoeffs, const Polynomial< PolySize > &sCoeffs)
 Construct from components. More...
 
 hPolynomialThermo (const word &name, const dictionary &dict)
 Construct from name and dictionary. More...
 
 hPolynomialThermo (const word &, const hPolynomialThermo &)
 Construct as a named copy. More...
 
scalar limit (const scalar) const
 Limit the temperature to be in the range Tlow_ to Thigh_. More...
 
scalar Cp (const scalar p, const scalar T) const
 Heat capacity at constant pressure [J/kg/K]. More...
 
scalar Ha (const scalar p, const scalar T) const
 Absolute enthalpy [J/kg]. More...
 
scalar Hs (const scalar p, const scalar T) const
 Sensible enthalpy [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 hPolynomialThermo &)
 
void operator*= (const scalar)
 

Static Public Member Functions

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

Friends

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

Detailed Description

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

Enthalpy based thermodynamics package using a polynomial function of temperature for the constant heat capacity at constant pressure:

    Cp = a0 + a1*T + a2*sqr(T) + a3*pow3(T) + a4*pow4(T)
       + a5*pow(T, 5) + a6*pow(T, 6) + a7*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
CpCoeffs<8> Specific heat at constant pressure polynomial coeffs

Example of the specification of the thermodynamic properties:

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

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

Source files
See also
Foam::Polynomial

Definition at line 131 of file hPolynomialThermo.H.

Constructor & Destructor Documentation

◆ hPolynomialThermo() [1/3]

hPolynomialThermo ( const EquationOfState &  pt,
const scalar  Hf,
const scalar  Sf,
const Polynomial< PolySize > &  CpCoeffs,
const typename Polynomial< PolySize >::intPolyType &  hCoeffs,
const Polynomial< PolySize > &  sCoeffs 
)
inline

Construct from components.

Definition at line 31 of file hPolynomialThermoI.H.

◆ hPolynomialThermo() [2/3]

hPolynomialThermo ( const word name,
const dictionary dict 
)

Construct from name and dictionary.

Definition at line 32 of file hPolynomialThermo.C.

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

◆ hPolynomialThermo() [3/3]

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

Construct as a named copy.

Definition at line 51 of file hPolynomialThermoI.H.

Member Function Documentation

◆ typeName()

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 180 of file hPolynomialThermo.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 hPolynomialThermoI.H.

References Foam::T().

Here is the call graph for this function:

◆ Cp()

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

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

Definition at line 79 of file hPolynomialThermoI.H.

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

Here is the call graph for this function:

◆ Ha()

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

Absolute enthalpy [J/kg].

Definition at line 101 of file hPolynomialThermoI.H.

References p, and Foam::T().

Here is the call graph for this function:

◆ Hs()

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

Sensible enthalpy [J/kg].

Definition at line 90 of file hPolynomialThermoI.H.

References Ha(), 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 hPolynomialThermoI.H.

◆ S()

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

Entropy [J/kg/K].

Definition at line 120 of file hPolynomialThermoI.H.

References p, Foam::fvc::Sp(), 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 hPolynomialThermoI.H.

References 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 141 of file hPolynomialThermoI.H.

References 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 hPolynomialThermo.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 hPolynomialThermo< EquationOfState, PolySize > &  )
inline

Definition at line 157 of file hPolynomialThermoI.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 hPolynomialThermoI.H.

References s().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator+

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

◆ operator*

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

◆ operator==

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

◆ operator

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

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