Cantera  2.0

#include <SimpleThermo.h>

Inheritance diagram for SimpleThermo:
[legend]
Collaboration diagram for SimpleThermo:
[legend]

## Public Member Functions

SimpleThermo ()
Constructor.

virtual ~SimpleThermo ()
Destructor.

SimpleThermo (const SimpleThermo &right)
Copy constructor.

SimpleThermooperator= (const SimpleThermo &right)
Assignment operator.

virtual SpeciesThermoduplMyselfAsSpeciesThermo () const
Duplication routine for objects which inherit from SpeciesThermo.

virtual void install (std::string name, size_t index, int type, const doublereal *c, doublereal minTemp, doublereal maxTemp, doublereal refPressure)
Install a new species thermodynamic property parameterization for one species.

virtual void install_STIT (SpeciesThermoInterpType *stit_ptr)
Install a new species thermodynamic property parameterization for one species.

virtual void update (doublereal t, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state properties for all species.

virtual void update_one (size_t k, doublereal t, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Like update(), but only updates the single species k.

virtual doublereal minTemp (size_t k=npos) const
Minimum temperature.

virtual doublereal maxTemp (size_t k=npos) const
Maximum temperature.

virtual doublereal refPressure (size_t k=npos) const
The reference-state pressure for species k.

virtual int reportType (size_t index) const
This utility function reports the type of parameterization used for the species with index number index.

virtual void reportParams (size_t index, int &type, doublereal *const c, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure) const

virtual void modifyParams (size_t index, doublereal *c)
Modify parameters for the standard state.

## Public Attributes

const int ID
Initialized to the type of parameterization.

## Protected Attributes

std::map< size_t, size_t > m_loc
Mapping between the species index and the vector index where the coefficients are kept.

std::vector< size_t > m_index
Map between the vector index where the coefficients are kept and the species index.

doublereal m_tlow_max
Maximum value of the low temperature limit.

doublereal m_thigh_min
Minimum value of the high temperature limit.

vector_fp m_tlow
Vector of low temperature limits (species index)

vector_fp m_thigh
Vector of low temperature limits (species index)

vector_fp m_t0
Vector of base temperatures (kelvin)

vector_fp m_logt0
Vector of base log temperatures (kelvin)

vector_fp m_h0_R
Vector of base dimensionless Enthalpies.

vector_fp m_s0_R
Vector of base dimensionless Entropies.

vector_fp m_cp0_R
Vector of base dimensionless heat capacities.

doublereal m_p0
Reference pressure (Pa)

size_t m_nspData
Number of species data points in the object.

## Detailed Description

A constant-heat capacity species thermodynamic property manager class. This makes the assumption that the heat capacity is a constant. Then, the following relations are used to complete the specification of the thermodynamic functions for each species in the phase.

$\frac{c_p(T)}{R} = Cp0\_R$

$\frac{h^0(T)}{RT} = \frac{1}{T} * (h0\_R + (T - T_0) * Cp0\_R)$

$\frac{s^0(T)}{R} = (s0\_R + (log(T) - log(T_0)) * Cp0\_R)$

This parameterization takes 4 input values. These are:

• c[0] = $$T_0$$(Kelvin)
• c[1] = $$H_k^o(T_0, p_{ref})$$ (J/kmol)
• c[2] = $$S_k^o(T_0, p_{ref})$$ (J/kmol K)
• c[3] = $${Cp}_k^o(T_0, p_{ref})$$ (J(kmol K)

All species must have the same reference pressure. The single-species standard-state property Manager ConstCpPoly has the same parameterization as the SimpleThermo class does.

ConstCpPoly

Definition at line 48 of file SimpleThermo.h.

## Constructor & Destructor Documentation

 SimpleThermo ( )
inline

Constructor.

Definition at line 61 of file SimpleThermo.h.

Referenced by SimpleThermo::duplMyselfAsSpeciesThermo().

 virtual ~SimpleThermo ( )
inlinevirtual

Destructor.

Definition at line 69 of file SimpleThermo.h.

 SimpleThermo ( const SimpleThermo & right )
inline

Copy constructor.

Parameters
 right Object to be copied

Definition at line 75 of file SimpleThermo.h.

References SimpleThermo::operator=().

## Member Function Documentation

 SimpleThermo& operator= ( const SimpleThermo & right )
inline

Assignment operator.

Parameters
 right Object to be copied

Definition at line 91 of file SimpleThermo.h.

Referenced by SimpleThermo::SimpleThermo().

 virtual SpeciesThermo* duplMyselfAsSpeciesThermo ( ) const
inlinevirtual

Duplication routine for objects which inherit from SpeciesThermo.

This virtual routine can be used to duplicate SpeciesThermo objects inherited from SpeciesThermo even if the application only has a pointer to SpeciesThermo to work with. ->commented out because we first need to add copy constructors and assignment operators to all of the derived classes.

Implements SpeciesThermo.

Definition at line 125 of file SimpleThermo.h.

References SimpleThermo::SimpleThermo().

 virtual void install ( std::string name, size_t index, int type, const doublereal * c, doublereal minTemp, doublereal maxTemp, doublereal refPressure )
inlinevirtual

Install a new species thermodynamic property parameterization for one species.

Parameters
 name String name of the species index Species index, k type int flag specifying the type of parameterization to be installed. c Vector of coefficients for the parameterization. There are 4 coefficients. The values (and units) are the following c[0] = $$T_0$$(Kelvin) c[1] = $$H_k^o(T_0, p_{ref})$$ (J/kmol) c[2] = $$S_k^o(T_0, p_{ref})$$ (J/kmol K) c[3] = $${Cp}_k^o(T_0, p_{ref})$$ (J(kmol K) minTemp minimum temperature for which this parameterization is valid. maxTemp maximum temperature for which this parameterization is valid. refPressure standard-state pressure for this parameterization.
ConstCpPoly

Implements SpeciesThermo.

Definition at line 154 of file SimpleThermo.h.

 virtual void install_STIT ( SpeciesThermoInterpType * stit_ptr )
inlinevirtual

Install a new species thermodynamic property parameterization for one species.

Parameters
 stit_ptr Pointer to the SpeciesThermoInterpType object This will set up the thermo for one species

Implements SpeciesThermo.

Definition at line 202 of file SimpleThermo.h.

 virtual void update ( doublereal t, doublereal * cp_R, doublereal * h_RT, doublereal * s_R ) const
inlinevirtual

Compute the reference-state properties for all species.

Given temperature T in K, this method updates the values of the non-dimensional heat capacity at constant pressure, enthalpy, and entropy, at the reference pressure, Pref of each of the standard states.

Parameters
 t Temperature (Kelvin) cp_R Vector of Dimensionless heat capacities. (length m_kk). h_RT Vector of Dimensionless enthalpies. (length m_kk). s_R Vector of Dimensionless entropies. (length m_kk).

Implements SpeciesThermo.

Definition at line 221 of file SimpleThermo.h.

 virtual void update_one ( size_t k, doublereal t, doublereal * cp_R, doublereal * h_RT, doublereal * s_R ) const
inlinevirtual

Like update(), but only updates the single species k.

Parameters
 k species index t Temperature (Kelvin) cp_R Vector of Dimensionless heat capacities. (length m_kk). h_RT Vector of Dimensionless enthalpies. (length m_kk). s_R Vector of Dimensionless entropies. (length m_kk).

Reimplemented from SpeciesThermo.

Definition at line 245 of file SimpleThermo.h.

 virtual doublereal minTemp ( size_t k = npos ) const
inlinevirtual

Minimum temperature.

If no argument is supplied, this method returns the minimum temperature for which all parameterizations are valid. If an integer index k is supplied, then the value returned is the minimum temperature for species k in the phase.

Parameters
 k Species index

Implements SpeciesThermo.

Definition at line 265 of file SimpleThermo.h.

Referenced by SimpleThermo::install().

 virtual doublereal maxTemp ( size_t k = npos ) const
inlinevirtual

Maximum temperature.

If no argument is supplied, this method returns the maximum temperature for which all parameterizations are valid. If an integer index k is supplied, then the value returned is the maximum temperature for parameterization k.

Parameters
 k Species Index

Implements SpeciesThermo.

Definition at line 283 of file SimpleThermo.h.

Referenced by SimpleThermo::install().

 virtual doublereal refPressure ( size_t k = npos ) const
inlinevirtual

The reference-state pressure for species k.

returns the reference state pressure in Pascals for species k. If k is left out of the argument list, it returns the reference state pressure for the first species. Note that some SpeciesThermo implementations, such as those for ideal gases, require that all species in the same phase have the same reference state pressures.

Parameters
 k Species Index

Implements SpeciesThermo.

Definition at line 304 of file SimpleThermo.h.

References SimpleThermo::m_p0.

Referenced by SimpleThermo::install().

 virtual int reportType ( size_t index ) const
inlinevirtual

This utility function reports the type of parameterization used for the species with index number index.

Parameters
 index Species index

Implements SpeciesThermo.

Definition at line 314 of file SimpleThermo.h.

References SIMPLE.

Referenced by SimpleThermo::reportParams().

 virtual void reportParams ( size_t index, int & type, doublereal *const c, doublereal & minTemp, doublereal & maxTemp, doublereal & refPressure ) const
inlinevirtual

This utility function reports back the type of parameterization and all of the parameters for the species, index.

Parameters
 index Species index type Integer type of the standard type c Vector of coefficients used to set the parameters for the standard state. For the SimpleThermo object, there are 4 coefficients. minTemp output - Minimum temperature maxTemp output - Maximum temperature refPressure output - reference pressure (Pa).

Implements SpeciesThermo.

Definition at line 333 of file SimpleThermo.h.

 virtual void modifyParams ( size_t index, doublereal * c )
inlinevirtual

Modify parameters for the standard state.

The thermo parameterization for a single species is overwritten.

Parameters
 index Species index c Vector of coefficients used to set the parameters for the standard state. Must be length >= 4.
Deprecated:

Implements SpeciesThermo.

Definition at line 361 of file SimpleThermo.h.

## Member Data Documentation

 const int ID

Initialized to the type of parameterization.

A Note, this value is used in some template functions. For this object the value is SIMPLE.

Definition at line 58 of file SimpleThermo.h.

 std::map m_loc
mutableprotected

Mapping between the species index and the vector index where the coefficients are kept.

This object doesn't have a one-to one correspondence between the species index, kspec, and the data location index,indexData, m_cp0_R[indexData]. This index keeps track of it. indexData = m_loc[kspec]

Definition at line 397 of file SimpleThermo.h.

 std::vector m_index
protected

Map between the vector index where the coefficients are kept and the species index.

Length is equal to the number of dataPoints. kspec = m_index[indexData]

Definition at line 404 of file SimpleThermo.h.

Referenced by SimpleThermo::install(), SimpleThermo::operator=(), and SimpleThermo::update().

 doublereal m_tlow_max
protected

Maximum value of the low temperature limit.

Definition at line 407 of file SimpleThermo.h.

Referenced by SimpleThermo::install(), SimpleThermo::minTemp(), and SimpleThermo::operator=().

 doublereal m_thigh_min
protected

Minimum value of the high temperature limit.

Definition at line 410 of file SimpleThermo.h.

Referenced by SimpleThermo::install(), SimpleThermo::maxTemp(), and SimpleThermo::operator=().

 vector_fp m_tlow
protected

Vector of low temperature limits (species index)

Length is equal to number of data points

Definition at line 416 of file SimpleThermo.h.

 vector_fp m_thigh
protected

Vector of low temperature limits (species index)

Length is equal to number of data points

Definition at line 422 of file SimpleThermo.h.

 vector_fp m_t0
protected

Vector of base temperatures (kelvin)

Length is equal to the number of species data points

Definition at line 428 of file SimpleThermo.h.

 vector_fp m_logt0
protected

Vector of base log temperatures (kelvin)

Length is equal to the number of species data points

Definition at line 434 of file SimpleThermo.h.

 vector_fp m_h0_R
protected

Vector of base dimensionless Enthalpies.

Length is equal to the number of species data points

Definition at line 440 of file SimpleThermo.h.

 vector_fp m_s0_R
protected

Vector of base dimensionless Entropies.

Length is equal to the number of species data points

Definition at line 446 of file SimpleThermo.h.

 vector_fp m_cp0_R
protected

Vector of base dimensionless heat capacities.

Length is equal to the number of species data points

Definition at line 452 of file SimpleThermo.h.

 doublereal m_p0
protected

Reference pressure (Pa)

all species must have the same reference pressure.

Definition at line 458 of file SimpleThermo.h.

 size_t m_nspData
protected

Number of species data points in the object.

This is less than or equal to the number of species in the phase.

Definition at line 464 of file SimpleThermo.h.

Referenced by SimpleThermo::install(), SimpleThermo::operator=(), and SimpleThermo::update().

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