Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
SpeciesThermoDuo< T1, T2 > Class Template Reference

This species thermo manager requires that all species have one of two parameterizations. More...

#include <SpeciesThermoMgr.h>

Inheritance diagram for SpeciesThermoDuo< T1, T2 >:
[legend]
Collaboration diagram for SpeciesThermoDuo< T1, T2 >:
[legend]

Public Member Functions

 SpeciesThermoDuo ()
 Constructor. More...
 
 SpeciesThermoDuo (const SpeciesThermoDuo &right)
 copy constructor More...
 
SpeciesThermoDuooperator= (const SpeciesThermoDuo &right)
 Assignment operator. More...
 
virtual SpeciesThermoduplMyselfAsSpeciesThermo () const
 Duplication routine for objects derived from SpeciesThermo. More...
 
virtual void install (const std::string &name, size_t sp, int type, const doublereal *c, doublereal minTemp, doublereal maxTemp, doublereal refPressure)
 Install a new species thermodynamic property parameterization for one species. More...
 
virtual void install_STIT (size_t index, shared_ptr< SpeciesThermoInterpType > stit_ptr)
 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
 Compute the reference-state properties for all species. More...
 
virtual doublereal minTemp (size_t k=npos) const
 Minimum temperature. More...
 
virtual doublereal maxTemp (size_t k=npos) const
 Maximum temperature. More...
 
virtual doublereal refPressure (size_t k=npos) const
 The reference-state pressure for species k. More...
 
virtual int reportType (size_t k) const
 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
 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
 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)
 Modify the value of the 298 K Heat of Formation of the standard state of one species in the phase (J kmol-1) More...
 
- Public Member Functions inherited from SpeciesThermo
 SpeciesThermo ()
 Constructor. More...
 
virtual ~SpeciesThermo ()
 Destructor. 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...
 
bool ready (size_t nSpecies)
 Check if data for all species (0 through nSpecies-1) has been installed. More...
 

Private Attributes

T1 m_thermo1
 Thermo Type 1. More...
 
T2 m_thermo2
 Thermo Type 2. More...
 
doublereal m_p0
 Reference pressure. More...
 
std::map< size_t, int > speciesToType
 map from species to type More...
 

Additional Inherited Members

- Protected Member Functions inherited from SpeciesThermo
void markInstalled (size_t k)
 Mark species k as having its thermodynamic data installed. More...
 

Detailed Description

template<class T1, class T2>
class Cantera::SpeciesThermoDuo< T1, T2 >

This species thermo manager requires that all species have one of two parameterizations.

Note this seems to be a slow way to do things, and it may be on its way out.

Deprecated:
To be removed after Cantera 2.2. Use GeneralSpeciesThermo instead.

Definition at line 57 of file SpeciesThermoMgr.h.

Constructor & Destructor Documentation

SpeciesThermoDuo ( )
inline

Constructor.

Definition at line 61 of file SpeciesThermoMgr.h.

References Cantera::warn_deprecated().

SpeciesThermoDuo ( const SpeciesThermoDuo< T1, T2 > &  right)
inline

copy constructor

Parameters
rightObject to be copied

Definition at line 70 of file SpeciesThermoMgr.h.

Member Function Documentation

SpeciesThermoDuo< T1, T2 > & operator= ( const SpeciesThermoDuo< T1, T2 > &  right)
SpeciesThermo * duplMyselfAsSpeciesThermo ( ) const
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.

Implements SpeciesThermo.

Definition at line 159 of file SpeciesThermoMgr.h.

void install ( const std::string &  name,
size_t  index,
int  type,
const doublereal *  c,
doublereal  minTemp,
doublereal  maxTemp,
doublereal  refPressure 
)
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.

Implements SpeciesThermo.

Definition at line 166 of file SpeciesThermoMgr.h.

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

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

Implements SpeciesThermo.

Definition at line 87 of file SpeciesThermoMgr.h.

void update ( doublereal  T,
doublereal *  cp_R,
doublereal *  h_RT,
doublereal *  s_R 
) const
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).

Implements SpeciesThermo.

Definition at line 189 of file SpeciesThermoMgr.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
kSpecies index

Implements SpeciesThermo.

Definition at line 95 of file SpeciesThermoMgr.h.

References SpeciesThermoDuo< T1, T2 >::m_thermo1, and SpeciesThermoDuo< T1, T2 >::m_thermo2.

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

Implements SpeciesThermo.

Definition at line 99 of file SpeciesThermoMgr.h.

References SpeciesThermoDuo< T1, T2 >::m_thermo1, and SpeciesThermoDuo< T1, T2 >::m_thermo2.

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

Implements SpeciesThermo.

Definition at line 103 of file SpeciesThermoMgr.h.

References SpeciesThermoDuo< T1, T2 >::m_p0.

int reportType ( size_t  index) const
virtual

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

Parameters
indexSpecies index

Implements SpeciesThermo.

Definition at line 198 of file SpeciesThermoMgr.h.

References Cantera::getValue().

void reportParams ( size_t  index,
int &  type,
doublereal *const  c,
doublereal &  minTemp,
doublereal &  maxTemp,
doublereal &  refPressure 
) const
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).

Implements SpeciesThermo.

Definition at line 205 of file SpeciesThermoMgr.h.

virtual doublereal reportOneHf298 ( const size_t  k) const
inlinevirtual

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

Implements SpeciesThermo.

Definition at line 115 of file SpeciesThermoMgr.h.

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

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.

Implements SpeciesThermo.

Definition at line 119 of file SpeciesThermoMgr.h.

Member Data Documentation

T1 m_thermo1
private
T2 m_thermo2
private
doublereal m_p0
private

Reference pressure.

Definition at line 130 of file SpeciesThermoMgr.h.

Referenced by SpeciesThermoDuo< T1, T2 >::operator=(), and SpeciesThermoDuo< T1, T2 >::refPressure().

std::map<size_t, int> speciesToType
private

map from species to type

Definition at line 132 of file SpeciesThermoMgr.h.

Referenced by SpeciesThermoDuo< T1, T2 >::operator=().


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