janafThermo< EquationOfState > Class Template Reference

Enthalpy based thermodynamics package using JANAF tables: More...

Inheritance diagram for janafThermo< EquationOfState >:
Collaboration diagram for janafThermo< EquationOfState >:

Public Types

typedef FixedList< scalar, nCoeffs_coeffArray
 Coefficient array type. More...
 

Public Member Functions

 janafThermo (const EquationOfState &st, const scalar Tlow, const scalar Thigh, const scalar Tcommon, const coeffArray &highCpCoeffs, const coeffArray &lowCpCoeffs, const bool convertCoeffs=false)
 Construct from components. More...
 
 janafThermo (const word &name, const dictionary &dict)
 Construct from name and dictionary. More...
 
 janafThermo (const word &, const janafThermo &)
 Construct as a named copy. More...
 
scalar limit (const scalar T) const
 Limit the temperature to be in the range Tlow_ to Thigh_. More...
 
scalar Tlow () const
 Return const access to the low temperature limit. More...
 
scalar Thigh () const
 Return const access to the high temperature limit. More...
 
scalar Tcommon () const
 Return const access to the common temperature. More...
 
const coeffArrayhighCpCoeffs () const
 Return const access to the high temperature poly coefficients. More...
 
const coeffArraylowCpCoeffs () const
 Return const access to the low temperature poly coefficients. 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 janafThermo &)
 

Static Public Member Functions

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

Static Public Attributes

static const int nCoeffs_ = 7
 Number of coefficients. More...
 

Friends

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

Detailed Description

template<class EquationOfState>
class Foam::janafThermo< EquationOfState >

Enthalpy based thermodynamics package using JANAF tables:

    Cp = (((a4*T + a3)*T + a2)*T + a1)*T + a0
    ha = ((((a4/5*T + a3/4)*T + a2/3)*T + a1/2)*T + a0)*T + a5
Usage
Property Description
Tlow Lower temperature limit [K]
Thigh Upper temperature limit [K]
Tcommon Transition temperature from low to high polynomials [K]
lowCpCoeffs Low temperature range heat capacity coefficients
highCpCoeffs High temperature range heat capacity coefficients

Example specification of janafThermo for air:

    thermodynamics
    {
        Tlow            100;
        Thigh           10000;
        Tcommon         1000;

        lowCpCoeffs
        (
            3.5309628
            -0.0001236595
            -5.0299339e-07
            2.4352768e-09
            -1.4087954e-12
            -1046.9637
            2.9674391
        );

        highCpCoeffs
        (
            2.9525407
            0.0013968838
            -4.9262577e-07
            7.8600091e-11
            -4.6074978e-15
            -923.93753
            5.8718221
        );
    }
Source files

Definition at line 149 of file janafThermo.H.

Member Typedef Documentation

◆ coeffArray

typedef FixedList<scalar, nCoeffs_> coeffArray

Coefficient array type.

Definition at line 165 of file janafThermo.H.

Constructor & Destructor Documentation

◆ janafThermo() [1/3]

janafThermo ( const EquationOfState &  st,
const scalar  Tlow,
const scalar  Thigh,
const scalar  Tcommon,
const coeffArray highCpCoeffs,
const coeffArray lowCpCoeffs,
const bool  convertCoeffs = false 
)
inline

Construct from components.

◆ janafThermo() [2/3]

janafThermo ( const word name,
const dictionary dict 
)

Construct from name and dictionary.

Definition at line 60 of file janafThermo.C.

References janafThermo< EquationOfState >::nCoeffs_, and Foam::R().

Here is the call graph for this function:

◆ janafThermo() [3/3]

janafThermo ( const word name,
const janafThermo< EquationOfState > &  jt 
)
inline

Construct as a named copy.

Definition at line 88 of file janafThermoI.H.

References janafThermo< EquationOfState >::nCoeffs_.

Member Function Documentation

◆ typeName()

static word typeName ( )
inlinestatic

Return the instantiated type name.

Definition at line 217 of file janafThermo.H.

◆ limit()

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

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

Definition at line 110 of file janafThermoI.H.

References Foam::endl(), Foam::max(), Foam::min(), Foam::T(), and WarningInFunction.

Here is the call graph for this function:

◆ Tlow()

Foam::scalar Tlow
inline

Return const access to the low temperature limit.

Definition at line 133 of file janafThermoI.H.

◆ Thigh()

Foam::scalar Thigh
inline

Return const access to the high temperature limit.

Definition at line 140 of file janafThermoI.H.

◆ Tcommon()

Foam::scalar Tcommon
inline

Return const access to the common temperature.

Definition at line 147 of file janafThermoI.H.

◆ highCpCoeffs()

const Foam::janafThermo< EquationOfState >::coeffArray & highCpCoeffs
inline

Return const access to the high temperature poly coefficients.

Definition at line 155 of file janafThermoI.H.

◆ lowCpCoeffs()

const Foam::janafThermo< EquationOfState >::coeffArray & lowCpCoeffs
inline

Return const access to the low temperature poly coefficients.

Definition at line 163 of file janafThermoI.H.

◆ Cp()

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

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

Definition at line 170 of file janafThermoI.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 195 of file janafThermoI.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 184 of file janafThermoI.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 211 of file janafThermoI.H.

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

◆ S()

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

Entropy [J/kg/K].

Definition at line 225 of file janafThermoI.H.

References Foam::log(), 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 241 of file janafThermoI.H.

References Foam::log(), 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 260 of file janafThermoI.H.

References Foam::T().

Here is the call graph for this function:

◆ write()

void write ( Ostream os) const

Write to Ostream.

Definition at line 87 of file janafThermo.C.

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

Here is the call graph for this function:

◆ operator+=()

void operator+= ( const janafThermo< EquationOfState > &  )
inline

Definition at line 274 of file janafThermoI.H.

References Foam::exit(), Foam::FatalError, FatalErrorInFunction, Foam::mag(), Foam::max(), Foam::min(), Foam::name(), Foam::notEqual(), and Y.

Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator+

janafThermo operator+ ( const janafThermo< EquationOfState > &  ,
const janafThermo< EquationOfState > &   
)
friend

◆ operator*

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

◆ operator==

janafThermo operator== ( const janafThermo< EquationOfState > &  ,
const janafThermo< EquationOfState > &   
)
friend

◆ operator

Ostream& operator ( Ostream ,
const janafThermo< EquationOfState > &   
)
friend

Member Data Documentation

◆ nCoeffs_

const int nCoeffs_ = 7
static

Number of coefficients.

Definition at line 159 of file janafThermo.H.

Referenced by janafThermo< EquationOfState >::janafThermo().


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