Cantera  2.0
Classes | Functions
Managers for Calculating Reference-State Thermodynamics
Thermodynamic Properties

The ThermoPhase object relies on a set of manager classes to calculate the thermodynamic properties of the reference state for all of the species in the phase. More...

Collaboration diagram for Managers for Calculating Reference-State Thermodynamics:

Classes

class  NasaThermo
 A species thermodynamic property manager for the NASA polynomial parameterization with two temperature ranges. More...
 
class  ShomateThermo
 A species thermodynamic property manager for the Shomate polynomial parameterization. More...
 
class  GeneralSpeciesThermo
 A species thermodynamic property manager for a phase. More...
 
class  SimpleThermo
 
class  SpeciesThermo
 Pure Virtual base class for the species thermo manager classes. More...
 
class  RefPressureMismatch
 Exception thrown if species reference pressures don't match. More...
 
class  UnknownSpeciesThermo
 Unknown species thermo manager string error. More...
 
class  SpeciesThermoDuo< T1, T2 >
 This species thermo manager requires that all species have one of two parameterizations. More...
 

Functions

template<class InputIter >
void _updateAll (InputIter begin, InputIter end, doublereal T, vector_fp &cp_R, vector_fp &h_RT, vector_fp &s_R)
 Invokes the 'updateProperties' method of all objects in the list.
 
template<class InputIter >
doublereal _minTemp (InputIter begin, InputIter end)
 Iterates through a list of objects which implement a method 'minTemp()', and returns the largest 'minTemp' value.
 
template<class _InputIter >
doublereal _maxTemp (_InputIter begin, _InputIter end)
 Iterates through a list of objects which implement a method 'maxTemp()', and returns the smallest 'maxTemp' value.
 

Detailed Description

The ThermoPhase object relies on a set of manager classes to calculate the thermodynamic properties of the reference state for all of the species in the phase.

This may be a computationally significant cost, so efficiency is important. This group describes how this is done efficiently within Cantera.

To compute the thermodynamic properties of multicomponent solutions, it is necessary to know something about the thermodynamic properties of the individual species present in the solution. Exactly what sort of species properties are required depends on the thermodynamic model for the solution. For a gaseous solution (i.e., a gas mixture), the species properties required are usually ideal gas properties at the mixture temperature and at a reference pressure (almost always at 1 bar).

In defining these standard states for species in a phase, we make the following definition. A reference state is a standard state of a species in a phase limited to one particular pressure, the reference pressure. The reference state specifies the dependence of all thermodynamic functions as a function of the temperature, in between a minimum temperature and a maximum temperature. The reference state also specifies the molar volume of the species as a function of temperature. The molar volume is a thermodynamic function. By contrast, a full standard state does the same thing as a reference state, but specifies the thermodynamics functions at all pressures.

Whatever the conventions used by a particular solution model, means need to be provided to compute the species properties in the reference state. Class SpeciesThermo is the base class for a family of classes that compute properties of all species in a phase in their reference states, for a range of temperatures. Note, the pressure dependence of the species thermodynamic functions is not handled by this particular species thermodynamic model. SpeciesThermo calculates the reference-state thermodynamic values of all species in a single phase during each call. The vector nature of the operation leads to a lower operation count and better efficiency, especially if the individual reference state classes are known to the reference-state manager class so that common operations may be grouped together.

The most important member function for the SpeciesThermo class is the member function update(). The function calculates the values of Cp, H, and S for all of the species at once at the specified temperature.

Usually, all of the species in a phase are installed into a SpeciesThermo class. However, there is no requirement that a SpeciesThermo object handles all of the species in a phase. There are two member functions that are called to install each species into the SpeciesThermo. One routine is called install(). It is called with the index of the species in the phase, an integer type delineating the SpeciesThermoInterpType object, and a listing of the parameters for that parameterization. A factory routine is called based on the integer type. The other routine is called install_STIT(). It accepts as an argument a pointer to an already formed SpeciesThermoInterpType object.

The following classes inherit from SpeciesThermo. Each of these classes handle multiple species, usually all of the species in a phase. However, there is no requirement that a SpeciesThermo object handles all of the species in a phase.

The class SpeciesThermoInterpType is a pure virtual base class for calculation of thermodynamic functions for a single species in its reference state. The following classes inherit from SpeciesThermoInterpType.

Function Documentation

void Cantera::_updateAll ( InputIter  begin,
InputIter  end,
doublereal  T,
vector_fp &  cp_R,
vector_fp &  h_RT,
vector_fp &  s_R 
)
inline

Invokes the 'updateProperties' method of all objects in the list.

This templated function has one template, InputIter. It should point to a class such as one that inherits from the virtual base class, SpeciesThermoInterpType, which has an updateProperties(T, Cp_R, h_RT, s)R) function

Parameters
beginBeginning iterator
endend iterator
TTemperature (Kelvin)
cp_RVector of Dimensionless heat capacities. (length m_kk).
h_RTVector of Dimensionless enthalpies. (length m_kk).
s_RVector of Dimensionless entropies. (length m_kk).
Deprecated:
unused

Definition at line 44 of file SpeciesThermoMgr.h.

doublereal Cantera::_minTemp ( InputIter  begin,
InputIter  end 
)

Iterates through a list of objects which implement a method 'minTemp()', and returns the largest 'minTemp' value.

This templated function has one template, InputIter. It should point to a class such as one that inherits from either SpeciesThermoInterpType or SpeciesThermo, which have a minTemp() function

Parameters
beginBeginning iterator
endend iterator
Deprecated:
unused

Definition at line 70 of file SpeciesThermoMgr.h.

References ckr::max().

doublereal Cantera::_maxTemp ( _InputIter  begin,
_InputIter  end 
)

Iterates through a list of objects which implement a method 'maxTemp()', and returns the smallest 'maxTemp' value.

This templated function has one template, InputIter. It should point to a class such as one that inherits from either SpeciesThermoInterpType or SpeciesThermo which have a minTemp() function

Parameters
beginBeginning iterator
endend iterator
Deprecated:
unused

Definition at line 93 of file SpeciesThermoMgr.h.

References ckr::min().