Loading...
Searching...
No Matches
hPolynomialThermo< EquationOfState, PolySize > Class Template Reference

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

#include <hPolynomialThermo.H>

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

Public Member Functions

 hPolynomialThermo (const dictionary &dict)
 Construct from dictionary.
 hPolynomialThermo (const word &, const hPolynomialThermo &)
 Construct as a named copy.
scalar limit (const scalar) const
 Limit temperature to be within the range.
scalar Cp (const scalar p, const scalar T) const
 Heat capacity at constant pressure [J/(kg K)].
scalar Ha (const scalar p, const scalar T) const
 Absolute Enthalpy [J/kg].
scalar Hs (const scalar p, const scalar T) const
 Sensible enthalpy [J/kg].
scalar Hc () const
 Chemical enthalpy [J/kg].
scalar S (const scalar p, const scalar T) const
 Entropy [J/(kg K)].
scalar Gstd (const scalar T) const
 Gibbs free energy of the mixture in the standard state [J/kg].
scalar Cv (const scalar p, const scalar T) const
scalar Es (const scalar p, const scalar T) const
scalar Ea (const scalar p, const scalar T) const
scalar dCpdT (const scalar p, const scalar T) const
 Temperature derivative of heat capacity at constant pressure.
void write (Ostream &os) const
 Write to Ostream.
void operator+= (const hPolynomialThermo &)
void operator*= (const scalar)

Static Public Member Functions

static word typeName ()
 Return the instantiated type name.

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 136 of file hPolynomialThermo.H.

Constructor & Destructor Documentation

◆ hPolynomialThermo() [1/2]

template<class EquationOfState, int PolySize>
hPolynomialThermo ( const dictionary & dict)

Construct from dictionary.

Definition at line 28 of file hPolynomialThermo.C.

References dict.

◆ hPolynomialThermo() [2/2]

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

Construct as a named copy.

Definition at line 49 of file hPolynomialThermoI.H.

References Foam::name().

Here is the call graph for this function:

Member Function Documentation

◆ typeName()

template<class EquationOfState, int PolySize = 8>
word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 237 of file hPolynomialThermo.H.

◆ limit()

template<class EquationOfState, int PolySize>
Foam::scalar limit ( const scalar T) const
inline

Limit temperature to be within the range.

Definition at line 67 of file hPolynomialThermoI.H.

References Foam::T().

Here is the call graph for this function:

◆ Cp()

template<class EquationOfState, int PolySize>
Foam::scalar Cp ( const scalar p,
const scalar T ) const
inline

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

Definition at line 77 of file hPolynomialThermoI.H.

References p, and Foam::T().

Here is the call graph for this function:

◆ Ha()

template<class EquationOfState, int PolySize>
Foam::scalar Ha ( const scalar p,
const scalar T ) const
inline

Absolute Enthalpy [J/kg].

Definition at line 87 of file hPolynomialThermoI.H.

References p, and Foam::T().

Here is the call graph for this function:

◆ Hs()

template<class EquationOfState, int PolySize>
Foam::scalar Hs ( const scalar p,
const scalar T ) const
inline

Sensible enthalpy [J/kg].

Definition at line 97 of file hPolynomialThermoI.H.

References Ha(), Hc(), p, and Foam::T().

Here is the call graph for this function:

◆ Hc()

template<class EquationOfState, int PolySize>
Foam::scalar Hc ( ) const
inline

Chemical enthalpy [J/kg].

Definition at line 107 of file hPolynomialThermoI.H.

Referenced by Hs().

Here is the caller graph for this function:

◆ S()

template<class EquationOfState, int PolySize>
Foam::scalar S ( const scalar p,
const scalar T ) const
inline

Entropy [J/(kg K)].

Definition at line 115 of file hPolynomialThermoI.H.

References p, and Foam::T().

Here is the call graph for this function:

◆ Gstd()

template<class EquationOfState, int PolySize>
Foam::scalar Gstd ( const scalar T) const
inline

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

Definition at line 126 of file hPolynomialThermoI.H.

References Foam::T().

Here is the call graph for this function:

◆ Cv()

template<class EquationOfState, int PolySize = 8>
scalar Cv ( const scalar p,
const scalar T ) const
inline

Definition at line 2 of file hPolynomialThermo.H.

◆ Es()

template<class EquationOfState, int PolySize = 8>
scalar Es ( const scalar p,
const scalar T ) const
inline

Definition at line 17 of file hPolynomialThermo.H.

◆ Ea()

template<class EquationOfState, int PolySize = 8>
scalar Ea ( const scalar p,
const scalar T ) const
inline

Definition at line 32 of file hPolynomialThermo.H.

◆ dCpdT()

template<class EquationOfState, int PolySize>
Foam::scalar dCpdT ( const scalar p,
const scalar T ) const
inline

Temperature derivative of heat capacity at constant pressure.

Definition at line 136 of file hPolynomialThermoI.H.

References p, and Foam::T().

Here is the call graph for this function:

◆ write()

template<class EquationOfState, int PolySize>
void write ( Ostream & os) const

Write to Ostream.

Definition at line 59 of file hPolynomialThermo.C.

References os().

Here is the call graph for this function:

◆ operator+=()

template<class EquationOfState, int PolySize = 8>
void operator+= ( const hPolynomialThermo< EquationOfState, PolySize > & )
inline

Definition at line 151 of file hPolynomialThermoI.H.

References Foam::mag(), operator, and Y.

Here is the call graph for this function:

◆ operator*=()

template<class EquationOfState, int PolySize>
void operator*= ( const scalar s)
inline

Definition at line 175 of file hPolynomialThermoI.H.

References operator, and s().

Here is the call graph for this function:

◆ operator+

template<class EquationOfState, int PolySize = 8>
hPolynomialThermo operator+ ( const hPolynomialThermo< EquationOfState, PolySize > & ,
const hPolynomialThermo< EquationOfState, PolySize > &  )
friend

◆ operator*

template<class EquationOfState, int PolySize = 8>
hPolynomialThermo operator* ( const scalar ,
const hPolynomialThermo< EquationOfState, PolySize > &  )
friend

◆ operator==

template<class EquationOfState, int PolySize = 8>
hPolynomialThermo operator== ( const hPolynomialThermo< EquationOfState, PolySize > & ,
const hPolynomialThermo< EquationOfState, PolySize > &  )
friend

◆ operator

template<class EquationOfState, int PolySize = 8>
Ostream & operator ( Ostream & ,
const hPolynomialThermo< EquationOfState, PolySize > &  )
friend

Referenced by operator*=(), and operator+=().


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