hPolynomialThermo< EquationOfState, PolySize > Class Template Reference

Thermodynamics package templated on the equation of state, using polynomial functions for cp, h and s. More...

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

Public Member Functions

 hPolynomialThermo (const dictionary &dict)
 Construct from 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 Hc () const
 Chemical enthalpy [J/kg]. More...
 
scalar S (const scalar p, const scalar T) const
 Entropy [J/kg/K]. More...
 
scalar dGdT (const scalar p, const scalar T) const
 Derivative of Gibbs free energy w.r.t. temperature. 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 >

Thermodynamics package templated on the equation of state, using polynomial functions for cp, h and s.

Polynomials for h and s derived from cp.

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 );
    }

The polynomial expression is evaluated as so:

\[ Cp = 1000 - 0.05 T + 0.003 T^2 \]

Note
  • Heat of formation is inputted in [J/kg], but internally uses [J/kmol]
  • Standard entropy is inputted in [J/kg/K], but internally uses [J/kmol/K]
  • Specific heat at constant pressure polynomial coefficients evaluate to an expression in [J/kg/K].
Source files
See also
Foam::Polynomial

Definition at line 98 of file hPolynomialThermo.H.

Constructor & Destructor Documentation

◆ hPolynomialThermo() [1/2]

hPolynomialThermo ( const dictionary dict)

Construct from dictionary.

Definition at line 33 of file hPolynomialThermo.C.

References Foam::constant::standard::Tstd, and hPolynomialThermo< EquationOfState, PolySize >::write().

Here is the call graph for this function:

◆ hPolynomialThermo() [2/2]

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

Construct as a named copy.

Definition at line 54 of file hPolynomialThermoI.H.

References hPolynomialThermo< EquationOfState, PolySize >::limit().

Here is the call graph for this function:

Member Function Documentation

◆ typeName()

◆ limit()

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

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

Definition at line 72 of file hPolynomialThermoI.H.

References hPolynomialThermo< EquationOfState, PolySize >::Cp(), and Foam::T().

Referenced by hPolynomialThermo< EquationOfState, PolySize >::hPolynomialThermo(), and hPolynomialThermo< EquationOfState, PolySize >::typeName().

Here is the call graph for this function:
Here is the caller 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 82 of file hPolynomialThermoI.H.

References Cp(), and hPolynomialThermo< EquationOfState, PolySize >::Ha().

Referenced by hPolynomialThermo< EquationOfState, PolySize >::limit(), and hPolynomialThermo< EquationOfState, PolySize >::typeName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Ha()

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

Absolute Enthalpy [J/kg].

Definition at line 92 of file hPolynomialThermoI.H.

References hPolynomialThermo< EquationOfState, PolySize >::Hs().

Referenced by hPolynomialThermo< EquationOfState, PolySize >::Cp(), hPolynomialThermo< EquationOfState, PolySize >::Hs(), and hPolynomialThermo< EquationOfState, PolySize >::typeName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Hs()

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

Sensible enthalpy [J/kg].

Definition at line 102 of file hPolynomialThermoI.H.

References hPolynomialThermo< EquationOfState, PolySize >::Ha(), and hPolynomialThermo< EquationOfState, PolySize >::Hc().

Referenced by hPolynomialThermo< EquationOfState, PolySize >::Ha(), and hPolynomialThermo< EquationOfState, PolySize >::typeName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Hc()

Foam::scalar Hc ( ) const
inline

Chemical enthalpy [J/kg].

Definition at line 111 of file hPolynomialThermoI.H.

References hPolynomialThermo< EquationOfState, PolySize >::S().

Referenced by hPolynomialThermo< EquationOfState, PolySize >::Hs(), and hPolynomialThermo< EquationOfState, PolySize >::typeName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ 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 hPolynomialThermo< EquationOfState, PolySize >::dGdT().

Referenced by hPolynomialThermo< EquationOfState, PolySize >::Hc(), and hPolynomialThermo< EquationOfState, PolySize >::typeName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dGdT()

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

Derivative of Gibbs free energy w.r.t. temperature.

Definition at line 131 of file hPolynomialThermoI.H.

References hPolynomialThermo< EquationOfState, PolySize >::dCpdT().

Referenced by hPolynomialThermo< EquationOfState, PolySize >::S(), and hPolynomialThermo< EquationOfState, PolySize >::typeName().

Here is the call graph for this function:
Here is the caller 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 147 of file hPolynomialThermoI.H.

Referenced by hPolynomialThermo< EquationOfState, PolySize >::dGdT(), and hPolynomialThermo< EquationOfState, PolySize >::typeName().

Here is the caller graph for this function:

◆ write()

void write ( Ostream os) const

◆ operator+=()

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

Definition at line 163 of file hPolynomialThermoI.H.

References Foam::mag(), and Y.

Referenced by hPolynomialThermo< EquationOfState, PolySize >::typeName().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator*=()

void operator*= ( const scalar  s)
inline

Definition at line 187 of file hPolynomialThermoI.H.

References Foam::mag(), and s().

Referenced by hPolynomialThermo< EquationOfState, PolySize >::typeName().

Here is the call graph for this function:
Here is the caller 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: