Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SpeciesThermo Class Referenceabstract

Pure Virtual base class for the species thermo manager classes. More...

#include <SpeciesThermo.h>

Inheritance diagram for SpeciesThermo:
[legend]

Public Member Functions

 SpeciesThermo ()
 Constructor. More...
 
virtual ~SpeciesThermo ()
 Destructor. More...
 
virtual SpeciesThermoduplMyselfAsSpeciesThermo () const =0
 Duplication routine for objects derived from SpeciesThermo. More...
 
virtual void install (const std::string &name, size_t index, int type, const doublereal *c, doublereal minTemp, doublereal maxTemp, doublereal refPressure)=0
 Install a new species thermodynamic property parameterization for one species. More...
 
virtual void install_STIT (size_t index, shared_ptr< SpeciesThermoInterpType > stit)=0
 Install a new species thermodynamic property parameterization for one species. More...
 
virtual void update (doublereal T, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const =0
 Compute the reference-state properties for all species. More...
 
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. More...
 
virtual doublereal minTemp (size_t k=npos) const =0
 Minimum temperature. More...
 
virtual doublereal maxTemp (size_t k=npos) const =0
 Maximum temperature. More...
 
virtual doublereal refPressure (size_t k=npos) const =0
 The reference-state pressure for species k. More...
 
virtual int reportType (size_t index=npos) const =0
 This utility function reports the type of parameterization used for the species with index number index. More...
 
virtual void reportParams (size_t index, int &type, doublereal *const c, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure) const =0
 This utility function reports back the type of parameterization and all of the parameters for the species with index number index. More...
 
virtual doublereal reportOneHf298 (const size_t k) const =0
 Report the 298 K Heat of Formation of the standard state of one species (J kmol-1) More...
 
virtual void modifyOneHf298 (const size_t k, const doublereal Hf298New)=0
 Modify the value of the 298 K Heat of Formation of the standard state of one species in the phase (J kmol-1) More...
 
bool ready (size_t nSpecies)
 Check if data for all species (0 through nSpecies-1) has been installed. More...
 

Protected Member Functions

void markInstalled (size_t k)
 Mark species k as having its thermodynamic data installed. More...
 

Private Attributes

std::vector< bool > m_installed
 

Detailed Description

Pure Virtual base class for the species thermo manager classes.

This class defines the interface which all subclasses must implement.

Class SpeciesThermo is the base class for a family of classes that compute properties of a set of species in their reference state at a range of temperatures. Note, the pressure dependence of the reference state is not handled by this particular species standard state model.

Definition at line 155 of file SpeciesThermo.h.

Constructor & Destructor Documentation

SpeciesThermo ( )
inline

Constructor.

Definition at line 160 of file SpeciesThermo.h.

virtual ~SpeciesThermo ( )
inlinevirtual

Destructor.

Definition at line 163 of file SpeciesThermo.h.

Member Function Documentation

virtual SpeciesThermo* duplMyselfAsSpeciesThermo ( ) const
pure virtual

Duplication routine for objects derived from SpeciesThermo.

This function can be used to duplicate objects derived from SpeciesThermo even if the application only has a pointer to SpeciesThermo to work with.

Implemented in ShomateThermo, SimpleThermo, SpeciesThermoDuo< T1, T2 >, NasaThermo, and GeneralSpeciesThermo.

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

Install a new species thermodynamic property parameterization for one species.

See Also
speciesThermoTypes.h
Parameters
nameName of the species
indexThe 'update' method will update the property values for this species at position i index in the property arrays.
typeint flag specifying the type of parameterization to be installed.
cvector of coefficients for the parameterization. This vector is simply passed through to the parameterization constructor.
minTempminimum temperature for which this parameterization is valid.
maxTempmaximum temperature for which this parameterization is valid.
refPressurestandard-state pressure for this parameterization.
Deprecated:
Use newSpeciesThermoInterpType and GeneralSpeciesThermo::install_STIT. To be removed after Cantera 2.2.

Implemented in ShomateThermo, SimpleThermo, SpeciesThermoDuo< T1, T2 >, NasaThermo, and GeneralSpeciesThermo.

virtual void install_STIT ( size_t  index,
shared_ptr< SpeciesThermoInterpType stit 
)
pure virtual

Install a new species thermodynamic property parameterization for one species.

Parameters
indexIndex of the species being installed
stitPointer to the SpeciesThermoInterpType object This will set up the thermo for one species

Implemented in ShomateThermo, SimpleThermo, SpeciesThermoDuo< T1, T2 >, NasaThermo, and GeneralSpeciesThermo.

Referenced by ThermoPhase::addSpecies(), VPSSMgr_IdealGas::createInstallPDSS(), VPSSMgr::installSTSpecies(), and SpeciesThermoFactory::installThermoForSpecies().

virtual void update ( doublereal  T,
doublereal *  cp_R,
doublereal *  h_RT,
doublereal *  s_R 
) const
pure virtual

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
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).

Implemented in ShomateThermo, SimpleThermo, GeneralSpeciesThermo, NasaThermo, and SpeciesThermoDuo< T1, T2 >.

Referenced by MixtureFugacityTP::_updateReferenceStateThermo(), VPSSMgr_Water_ConstVol::_updateRefStateThermo(), VPSSMgr::_updateRefStateThermo(), MaskellSolidSolnPhase::_updateThermo(), ConstDensityThermo::_updateThermo(), SingleSpeciesTP::_updateThermo(), SurfPhase::_updateThermo(), LatticePhase::_updateThermo(), IdealSolidSolnPhase::_updateThermo(), IdealGasPhase::_updateThermo(), and SpeciesThermo::update_one().

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.

The default treatment is to just call update() which means that potentially the operation takes a m_kk*m_kk hit.

Parameters
kspecies index
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).

Reimplemented in ShomateThermo, SimpleThermo, GeneralSpeciesThermo, and NasaThermo.

Definition at line 236 of file SpeciesThermo.h.

References SpeciesThermo::update().

Referenced by PureFluidPhase::initThermo(), PDSS_ConstVol::setTemperature(), PDSS_IdealGas::setTemperature(), and PDSS_SSVol::setTemperature().

virtual doublereal minTemp ( size_t  k = npos) const
pure virtual

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
kSpecies index

Implemented in ShomateThermo, SimpleThermo, GeneralSpeciesThermo, NasaThermo, and SpeciesThermoDuo< T1, T2 >.

Referenced by PDSS_IdealGas::initThermo(), PDSS_IonsFromNeutral::initThermo(), StoichSubstance::initThermo(), PDSS_ConstVol::initThermoXML(), PDSS_SSVol::initThermoXML(), and ThermoPhase::minTemp().

virtual doublereal maxTemp ( size_t  k = npos) const
pure virtual

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
kSpecies Index

Implemented in ShomateThermo, SimpleThermo, NasaThermo, GeneralSpeciesThermo, and SpeciesThermoDuo< T1, T2 >.

Referenced by PDSS_IdealGas::initThermo(), PDSS_IonsFromNeutral::initThermo(), StoichSubstance::initThermo(), PDSS_ConstVol::initThermoXML(), PDSS_SSVol::initThermoXML(), and ThermoPhase::maxTemp().

virtual doublereal refPressure ( size_t  k = npos) const
pure virtual
virtual int reportType ( size_t  index = npos) const
pure virtual

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

Parameters
indexSpecies index

Implemented in ShomateThermo, SimpleThermo, NasaThermo, GeneralSpeciesThermo, and SpeciesThermoDuo< T1, T2 >.

Referenced by IdealGasPhase::cv_tr(), IdealGasPhase::cv_vib(), and Cantera::vcs_Cantera_to_vprob().

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

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

Parameters
indexSpecies index
typeInteger type of the standard type
cVector of coefficients used to set the parameters for the standard state.
minTempoutput - Minimum temperature
maxTempoutput - Maximum temperature
refPressureoutput - reference pressure (Pa).

Implemented in ShomateThermo, SimpleThermo, NasaThermo, GeneralSpeciesThermo, and SpeciesThermoDuo< T1, T2 >.

Referenced by IdealGasPhase::cv_tr(), IdealGasPhase::cv_vib(), and Cantera::vcs_Cantera_to_vprob().

virtual doublereal reportOneHf298 ( const size_t  k) const
pure virtual

Report the 298 K Heat of Formation of the standard state of one species (J kmol-1)

The 298K Heat of Formation is defined as the enthalpy change to create the standard state of the species from its constituent elements in their standard states at 298 K and 1 bar.

Parameters
kspecies index
Returns
Returns the current value of the Heat of Formation at 298K and 1 bar

Implemented in ShomateThermo, SimpleThermo, NasaThermo, GeneralSpeciesThermo, and SpeciesThermoDuo< T1, T2 >.

Referenced by ThermoPhase::Hf298SS().

virtual void modifyOneHf298 ( const size_t  k,
const doublereal  Hf298New 
)
pure virtual

Modify the value of the 298 K Heat of Formation of the standard state of one species in the phase (J kmol-1)

The 298K heat of formation is defined as the enthalpy change to create the standard state of the species from its constituent elements in their standard states at 298 K and 1 bar.

Parameters
kIndex of the species
Hf298NewSpecify the new value of the Heat of Formation at 298K and 1 bar. units = J/kmol.

Implemented in ShomateThermo, SimpleThermo, NasaThermo, GeneralSpeciesThermo, and SpeciesThermoDuo< T1, T2 >.

Referenced by ThermoPhase::modifyOneHf298SS(), VPStandardStateTP::modifyOneHf298SS(), MixtureFugacityTP::modifyOneHf298SS(), and LatticeSolidPhase::modifyOneHf298SS().

bool ready ( size_t  nSpecies)

Check if data for all species (0 through nSpecies-1) has been installed.

Definition at line 5 of file SpeciesThermo.cpp.

Referenced by ThermoPhase::initThermo().

void markInstalled ( size_t  k)
protected

Mark species k as having its thermodynamic data installed.

Definition at line 17 of file SpeciesThermo.cpp.

Referenced by NasaThermo::install(), SimpleThermo::install(), ShomateThermo::install(), and GeneralSpeciesThermo::install_STIT().


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