Cantera  2.1.2
Public Member Functions | Protected Attributes | List of all members

Statistical mechanics. More...

#include <StatMech.h>

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

Public Member Functions

 StatMech ()
 Empty constructor. More...
 
 StatMech (int n, doublereal tlow, doublereal thigh, doublereal pref, const doublereal *coeffs, const std::string &my_name)
 constructor used in templated instantiations More...
 
 StatMech (const StatMech &b)
 copy constructor More...
 
StatMechoperator= (const StatMech &b)
 assignment operator More...
 
virtual SpeciesThermoInterpTypeduplMyselfAsSpeciesThermoInterpType () const
 duplicator More...
 
virtual int reportType () const
 Returns an integer representing the type of parameterization. More...
 
int buildmap ()
 Build a series of maps for the properties needed for species. More...
 
virtual void updateProperties (const doublereal *tt, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
 Update the properties for this species, given a temperature polynomial. More...
 
virtual void updatePropertiesTemp (const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
 Compute the reference-state property of one species. More...
 
virtual void reportParameters (size_t &n, int &type, doublereal &tlow, doublereal &thigh, doublereal &pref, doublereal *const coeffs) const
 This utility function reports back the type of parameterization and all of the parameters for the species, index. More...
 
virtual void modifyParameters (doublereal *coeffs)
 Modify parameters for the standard state. More...
 
- Public Member Functions inherited from SpeciesThermoInterpType
 SpeciesThermoInterpType ()
 Constructor. More...
 
 SpeciesThermoInterpType (size_t n, doublereal tlow, doublereal thigh, doublereal pref)
 Constructor. More...
 
virtual ~SpeciesThermoInterpType ()
 Destructor. More...
 
virtual doublereal minTemp () const
 Returns the minimum temperature that the thermo parameterization is valid. More...
 
virtual doublereal maxTemp () const
 Returns the maximum temperature that the thermo parameterization is valid. More...
 
virtual doublereal refPressure () const
 Returns the reference pressure (Pa) More...
 
virtual size_t speciesIndex () const
 Returns an integer representing the species index. More...
 

Protected Attributes

vector_fp m_coeff
 array of polynomial coefficients More...
 
std::string sp_name
 
std::map< std::string, species * > name_map
 
- Protected Attributes inherited from SpeciesThermoInterpType
doublereal m_lowT
 lowest valid temperature More...
 
doublereal m_highT
 Highest valid temperature. More...
 
doublereal m_Pref
 Reference state pressure. More...
 
size_t m_index
 species index More...
 

Detailed Description

Statistical mechanics.

Definition at line 26 of file StatMech.h.

Constructor & Destructor Documentation

StatMech ( )

Empty constructor.

Definition at line 13 of file StatMech.cpp.

Referenced by StatMech::duplMyselfAsSpeciesThermoInterpType().

StatMech ( int  n,
doublereal  tlow,
doublereal  thigh,
doublereal  pref,
const doublereal *  coeffs,
const std::string &  my_name 
)

constructor used in templated instantiations

Parameters
nSpecies index
tlowMinimum temperature
thighMaximum temperature
prefreference pressure (Pa).
coeffsVector of coefficients used to set the parameters for the standard state.

Definition at line 15 of file StatMech.cpp.

References StatMech::buildmap(), and SpeciesThermoInterpType::m_lowT.

StatMech ( const StatMech b)

copy constructor

Parameters
bobject to be copied

Definition at line 30 of file StatMech.cpp.

Member Function Documentation

StatMech & operator= ( const StatMech b)

assignment operator

Parameters
bobject to be copied

Definition at line 35 of file StatMech.cpp.

SpeciesThermoInterpType * duplMyselfAsSpeciesThermoInterpType ( ) const
virtual

duplicator

Implements SpeciesThermoInterpType.

Definition at line 44 of file StatMech.cpp.

References StatMech::StatMech().

int reportType ( ) const
virtual

Returns an integer representing the type of parameterization.

Implements SpeciesThermoInterpType.

Definition at line 49 of file StatMech.cpp.

References STAT.

int buildmap ( )

Build a series of maps for the properties needed for species.

Definition at line 54 of file StatMech.cpp.

Referenced by StatMech::StatMech().

void updateProperties ( const doublereal *  tt,
doublereal *  cp_R,
doublereal *  h_RT,
doublereal *  s_R 
) const
virtual

Update the properties for this species, given a temperature polynomial.

This method is called with a pointer to an array containing the functions of temperature needed by this parameterization, and three pointers to arrays where the computed property values should be written. This method updates only one value in each array.

\[ \frac{C_p^0(T)}{R} = \frac{C_v^0(T)}{R} + 1 \]

Where,

\[ \frac{C_v^0(T)}{R} = \frac{C_v^{tr}(T)}{R} + \frac{C_v^{vib}(T)}{R} \]

Temperature Polynomial: tt[0] = t;

Parameters
ttvector of temperature polynomials
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).

Reimplemented from SpeciesThermoInterpType.

Definition at line 552 of file StatMech.cpp.

References Cantera::GasConstant, and SpeciesThermoInterpType::m_index.

Referenced by StatMech::updatePropertiesTemp().

void updatePropertiesTemp ( const doublereal  temp,
doublereal *  cp_R,
doublereal *  h_RT,
doublereal *  s_R 
) const
virtual

Compute the reference-state property of one 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 one of the species. The species index is used to reference into the cp_R, h_RT, and s_R arrays.

Parameters
tempTemperature (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).

Implements SpeciesThermoInterpType.

Definition at line 598 of file StatMech.cpp.

References StatMech::updateProperties().

void reportParameters ( size_t &  n,
int &  type,
doublereal &  tlow,
doublereal &  thigh,
doublereal &  pref,
doublereal *const  coeffs 
) const
virtual

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

All parameters are output variables

Parameters
nSpecies index
typeInteger type of the standard type
tlowoutput - Minimum temperature
thighoutput - Maximum temperature
prefoutput - reference pressure (Pa).
coeffsVector of coefficients used to set the parameters for the standard state. There are 12 of them, designed to be compatible with the multiple temperature formulation. coeffs[0] is equal to one. coeffs[1] is min temperature coeffs[2] is max temperature coeffs[3+i] from i =0,9 are the coefficients themselves

Implements SpeciesThermoInterpType.

Definition at line 607 of file StatMech.cpp.

References Cantera::GasConstant, SpeciesThermoInterpType::m_highT, SpeciesThermoInterpType::m_index, SpeciesThermoInterpType::m_lowT, SpeciesThermoInterpType::m_Pref, STAT, and Cantera::warn_deprecated().

void modifyParameters ( doublereal *  coeffs)
virtual

Modify parameters for the standard state.

Parameters
coeffsVector of coefficients used to set the parameters for the standard state.

Reimplemented from SpeciesThermoInterpType.

Definition at line 652 of file StatMech.cpp.

Member Data Documentation

vector_fp m_coeff
protected

array of polynomial coefficients

Definition at line 145 of file StatMech.h.


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