Cantera  2.0
Public Member Functions | List of all members

Class that handles the calculation of standard state thermo properties for a set of species belonging to a single phase in a completely general but slow way. More...

#include <VPSSMgr_General.h>

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

Public Member Functions

 VPSSMgr_General (VPStandardStateTP *vp_ptr, SpeciesThermo *spth)
 Constructor.
 
virtual ~VPSSMgr_General ()
 Destructor.
 
 VPSSMgr_General (const VPSSMgr_General &right)
 Copy Constructor for the SpeciesThermo object.
 
VPSSMgr_Generaloperator= (const VPSSMgr_General &right)
 Assignment operator for the SpeciesThermo object.
 
virtual VPSSMgrduplMyselfAsVPSSMgr () const
 Duplication routine for objects which inherit from VPSSSpeciesThermo.
 
Properties of the Standard State of the Species in the Solution
virtual void getStandardChemPotentials (doublereal *mu) const
 Get the array of chemical potentials at unit activity.
 
virtual void getGibbs_RT (doublereal *grt) const
 Get the nondimensional Gibbs functions for the species at their standard states of solution at the current T and P of the solution.
 
virtual void getEnthalpy_RT (doublereal *hrt) const
 Get the nondimensional Enthalpy functions for the species at their standard states at the current T and P of the solution.
 
const vector_fpenthalpy_RT () const
 Return a reference to a vector of the molar enthalpies of the species in their standard states.
 
virtual void getEntropy_R (doublereal *sr) const
 Get the array of nondimensional Enthalpy functions for the standard state species at the current T and P of the solution.
 
const vector_fpentropy_R () const
 Return a reference to a vector of the entropies of the species.
 
virtual void getIntEnergy_RT (doublereal *urt) const
 Returns the vector of nondimensional internal Energies of the standard state at the current temperature and pressure of the solution for each species.
 
virtual void getCp_R (doublereal *cpr) const
 Get the nondimensional Heat Capacities at constant pressure for the standard state of the species at the current T and P.
 
const vector_fpcp_R () const
 Return a reference to a vector of the constant pressure heat capacities of the species.
 
virtual void getStandardVolumes (doublereal *vol) const
 Get the molar volumes of each species in their standard states at the current T and P of the solution.
 
const vector_fpstandardVolumes () const
 Return a reference to a vector of the species standard molar volumes.
 
Thermodynamic Values for the Species Reference States (VPStandardStateTP)
virtual void getEnthalpy_RT_ref (doublereal *hrt) const
 
virtual void getGibbs_RT_ref (doublereal *grt) const
 
const vector_fpGibbs_RT_ref () const
 Return a reference to the vector of Gibbs free energies of the species.
 
virtual void getEntropy_R_ref (doublereal *er) const
 
virtual void getCp_R_ref (doublereal *cpr) const
 
virtual void getStandardVolumes_ref (doublereal *vol) const
 Get the molar volumes of the species reference states at the current T and P_ref of the solution.
 
Setting the Internal State of the System
virtual void setState_TP (doublereal T, doublereal P)
 Set the temperature (K) and pressure (Pa)
 
virtual void setState_T (doublereal T)
 Set the temperature (K)
 
virtual void setState_P (doublereal P)
 Set the pressure (Pa)
 
doublereal temperature () const
 Return the temperature stored in the object.
 
doublereal pressure () const
 Return the pressure stored in the object.
 
SpeciesThermoSpeciesThermoMgr ()
 Return the pointer to the reference-state Thermo calculator SpeciesThermo object.
 
virtual void updateStandardStateThermo ()
 Updates the internal standard state thermodynamic vectors at the current T and P of the solution.
 
virtual void updateRefStateThermo () const
 Updates the internal reference state thermodynamic vectors at the current T of the solution and the reference pressure.
 
Utility Methods - Reports on various quantities
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 the standard state.
 

Protected Member Functions

Properties of the Standard State of the Species in the Solution

Within VPStandardStateTP, these properties are calculated via a common routine, _updateStandardStateThermo(), which must be overloaded in inherited objects. The values are cached within this object, and are not recalculated unless the temperature or pressure changes.

virtual void _updateStandardStateThermo ()
 Internally updates the standard state thermodynamic functions at the current T and P of the solution.
 
virtual void _updateRefStateThermo () const
 Updates the reference state thermodynamic functions at the current T of the solution and the reference pressure.
 
Thermodynamic Values for the Species Reference States (VPStandardStateTP)
virtual void getGibbs_ref (doublereal *g) const
 

Initialization Methods - For Internal use (VPStandardState)

void initLengths ()
 Initialize the lengths within the object.
 
void installSTSpecies (size_t k, const XML_Node &speciesNode, const XML_Node *phaseNode_ptr)
 Install specific content for species k in the reference-state thermodynamic SpeciesManager object.
 
size_t m_kk
 Number of species in the phase.
 
VPStandardStateTPm_vptp_ptr
 Variable pressure ThermoPhase object.
 
SpeciesThermom_spthermo
 Pointer to reference state thermo calculator.
 
doublereal m_tlast
 The last temperature at which the standard state thermodynamic properties were calculated at.
 
doublereal m_plast
 The last pressure at which the Standard State thermodynamic properties were calculated at.
 
doublereal m_p0
 
doublereal m_minTemp
 minimum temperature for the standard state calculations
 
doublereal m_maxTemp
 maximum temperature for the standard state calculations
 
bool m_useTmpRefStateStorage
 
vector_fp m_h0_RT
 
vector_fp m_cp0_R
 Vector containing the species reference constant pressure heat capacities at T = m_tlast and P = p_ref.
 
vector_fp m_g0_RT
 Vector containing the species reference Gibbs functions at T = m_tlast and P = p_ref.
 
vector_fp m_s0_R
 Vector containing the species reference entropies at T = m_tlast and P = p_ref.
 
vector_fp m_V0
 Vector containing the species reference molar volumes.
 
bool m_useTmpStandardStateStorage
 
vector_fp m_hss_RT
 Vector containing the species Standard State enthalpies at T = m_tlast and P = m_plast.
 
vector_fp m_cpss_R
 Vector containing the species Standard State constant pressure heat capacities at T = m_tlast and P = m_plast.
 
vector_fp m_gss_RT
 Vector containing the species Standard State Gibbs functions at T = m_tlast and P = m_plast.
 
vector_fp m_sss_R
 Vector containing the species Standard State entropies at T = m_tlast and P = m_plast.
 
vector_fp m_Vss
 Vector containing the species standard state volumes at T = m_tlast and P = m_plast.
 
vector_fp mPDSS_h0_RT
 species reference enthalpies - used by individual PDSS objects
 
vector_fp mPDSS_cp0_R
 species reference heat capacities - used by individual PDSS objects
 
vector_fp mPDSS_g0_RT
 species reference gibbs free energies - used by individual PDSS objects
 
vector_fp mPDSS_s0_R
 species reference entropies - used by individual PDSS objects
 
vector_fp mPDSS_V0
 species reference state molar Volumes - used by individual PDSS objects
 
vector_fp mPDSS_hss_RT
 species standard state enthalpies - used by individual PDSS objects
 
vector_fp mPDSS_cpss_R
 species standard state heat capacities - used by individual PDSS objects
 
vector_fp mPDSS_gss_RT
 species standard state gibbs free energies - used by individual PDSS objects
 
vector_fp mPDSS_sss_R
 species standard state entropies - used by individual PDSS objects
 
vector_fp mPDSS_Vss
 species standard state molar Volumes - used by individual PDSS objects
 

Initialization Methods - For Internal use (VPStandardState)

std::vector< PDSS * > m_PDSS_ptrs
 Shallow pointers containing the PDSS objects for the species in this phase.
 
virtual PDSScreateInstallPDSS (size_t k, const XML_Node &speciesNode, const XML_Node *const phaseNode_ptr)
 Factory routine for the creation of PDSS objects that are then internally registered with this VPSSMgr object.
 
virtual PDSS_enumType reportPDSSType (int index=-1) const
 This utility function reports the type of parameterization used for the species with index number index.
 
virtual VPSSMgr_enumType reportVPSSMgrType () const
 This utility function reports the type of manager for the calculation of the standard state properties.
 
virtual void initAllPtrs (VPStandardStateTP *vp_ptr, SpeciesThermo *sp_ptr)
 Initialize the internal shallow pointers in this object.
 
virtual void initThermo ()
 
virtual void initThermoXML (XML_Node &phaseNode, std::string id)
 Finalize the thermo objects after all species have been entered.
 
PDSSreturnPDSS_ptr (size_t k, const XML_Node &speciesNode, const XML_Node *const phaseNode_ptr, bool &doST)
 Local factory routine for the creation of PDSS objects.
 
doublereal err (std::string msg) const
 VPStandardStateTP has its own err routine.
 

Detailed Description

Class that handles the calculation of standard state thermo properties for a set of species belonging to a single phase in a completely general but slow way.

This class manages the calculation of standard state thermo properties for a set of species belonging to a single phase in a completely general but slow way. The way this does this is to call the underlying PDSS routines one at a time for every species.

Definition at line 42 of file VPSSMgr_General.h.

Constructor & Destructor Documentation

VPSSMgr_General ( VPStandardStateTP vp_ptr,
SpeciesThermo spth 
)

Constructor.

Parameters
vp_ptrPointer to the owning VPStandardStateTP object for the phase. It's a requirement that this be already malloced.
spthPointer to the SpeciesThermo object for the phase. It's a requirement that this be already malloced.

Definition at line 32 of file VPSSMgr_General.cpp.

References VPSSMgr::m_useTmpRefStateStorage, and VPSSMgr::m_useTmpStandardStateStorage.

Referenced by VPSSMgr_General::duplMyselfAsVPSSMgr().

~VPSSMgr_General ( )
virtual

Destructor.

Definition at line 43 of file VPSSMgr_General.cpp.

VPSSMgr_General ( const VPSSMgr_General right)

Copy Constructor for the SpeciesThermo object.

Parameters
rightReference to SpeciesThermo object to be copied into the current one.

Definition at line 47 of file VPSSMgr_General.cpp.

References VPSSMgr::m_useTmpRefStateStorage, and VPSSMgr::m_useTmpStandardStateStorage.

Member Function Documentation

VPSSMgr_General & operator= ( const VPSSMgr_General right)

Assignment operator for the SpeciesThermo object.

This is NOT a virtual function.

Parameters
rightReference to SpeciesThermo object to be copied into the current one.

Definition at line 55 of file VPSSMgr_General.cpp.

References VPSSMgr::m_kk, VPSSMgr_General::m_PDSS_ptrs, VPSSMgr::m_vptp_ptr, and VPSSMgr::operator=().

VPSSMgr * duplMyselfAsVPSSMgr ( ) const
virtual

Duplication routine for objects which inherit from VPSSSpeciesThermo.

This virtual routine can be used to duplicate VPSSSpeciesThermo objects inherited from VPSSSpeciesThermo even if the application only has a pointer to VPSSSpeciesThermo to work with.

Reimplemented from VPSSMgr.

Definition at line 74 of file VPSSMgr_General.cpp.

References VPSSMgr_General::VPSSMgr_General().

void _updateStandardStateThermo ( )
protectedvirtual

Internally updates the standard state thermodynamic functions at the current T and P of the solution.

If m_useTmpStandardStateStorage is true, this function must be called whenever the temperature or pressure has changed.

This function is responsible for updating the following internal members, when m_useTmpStandardStateStorage is true.

  • m_hss_RT;
  • m_cpss_R;
  • m_gss_RT;
  • m_sss_R;
  • m_Vss

If m_useTmpStandardStateStorage is not true, this function may be required to be called every time information is requested from this object.

Underscore updates never check for the state of the system They just do the calculation.

Reimplemented from VPSSMgr.

Definition at line 117 of file VPSSMgr_General.cpp.

References PDSS::cp_R(), PDSS::enthalpy_RT(), PDSS::entropy_R(), VPSSMgr::m_cpss_R, VPSSMgr::m_gss_RT, VPSSMgr::m_hss_RT, VPSSMgr::m_kk, VPSSMgr_General::m_PDSS_ptrs, VPSSMgr::m_plast, VPSSMgr::m_sss_R, VPSSMgr::m_tlast, VPSSMgr::m_Vss, PDSS::molarVolume(), and PDSS::setState_TP().

void _updateRefStateThermo ( ) const
protectedvirtual

Updates the reference state thermodynamic functions at the current T of the solution and the reference pressure.

Underscore updates never check for the state of the system They just do the calculation.

Reimplemented from VPSSMgr.

Definition at line 102 of file VPSSMgr_General.cpp.

References PDSS::cp_R_ref(), PDSS::enthalpy_RT_ref(), PDSS::entropy_R_ref(), VPSSMgr::m_cp0_R, VPSSMgr::m_g0_RT, VPSSMgr::m_h0_RT, VPSSMgr::m_kk, VPSSMgr_General::m_PDSS_ptrs, VPSSMgr::m_plast, VPSSMgr::m_s0_R, VPSSMgr::m_tlast, VPSSMgr::m_useTmpRefStateStorage, VPSSMgr::m_V0, PDSS::molarVolume_ref(), and PDSS::setState_TP().

void getGibbs_ref ( doublereal *  g) const
protectedvirtual

There are also temporary variables for holding the species reference-state values of Cp, H, S, and V at the last temperature and reference pressure called. These functions are not recalculated if a new call is made using the previous temperature. All calculations are done within the routine _updateRefStateThermo().

Returns the vector of the gibbs function of the reference state at the current temperature of the solution and the reference pressure for the species. units = J/kmol

Parameters
gOutput vector contain the Gibbs free energies of the reference state of the species length = m_kk, units = J/kmol.

Returns the vector of the gibbs function of the reference state at the current temperature of the solution and the reference pressure for the species. units = J/kmol

Parameters
gOutput vector contain the Gibbs free energies of the reference state of the species length = m_kk, units = J/kmol.

Reimplemented from VPSSMgr.

Definition at line 146 of file VPSSMgr_General.cpp.

References PDSS::enthalpy_RT_ref(), PDSS::entropy_R_ref(), Cantera::GasConstant, VPSSMgr::m_g0_RT, VPSSMgr::m_kk, VPSSMgr_General::m_PDSS_ptrs, VPSSMgr::m_plast, VPSSMgr::m_tlast, VPSSMgr::m_useTmpRefStateStorage, Cantera::scale(), and PDSS::setState_TP().

void initThermo ( )
protectedvirtual

The following methods are used in the process of constructing the phase and setting its parameters from a specification in an input file. They are not normally used in application programs. To see how they are used, see files importCTML.cpp and ThermoFactory.cpp.

Initialize the object

This method is provided to allow subclasses to perform any initialization required after all species have been added. For example, it might be used to resize internal work arrays that must have an entry for each species. The base class implementation does nothing, and subclasses that do not require initialization do not need to overload this method. When importing a CTML phase description, this method is called just prior to returning from function importPhase().

See Also
importCTML.cpp

Reimplemented from VPSSMgr.

Definition at line 131 of file VPSSMgr_General.cpp.

References VPSSMgr::initLengths().

void initThermoXML ( XML_Node phaseNode,
std::string  id 
)
protectedvirtual

Finalize the thermo objects after all species have been entered.

This function is the LAST initialization routine to be called. It's called after createInstallPDSS() has been called for each species in the phase, and after initThermo() has been called. It's called via an inner-to-outer onion-shell like manner.

Currently, this routine passed control to the parent class without doing anything.

Parameters
phaseNodeReference to the phaseNode XML node.
idID of the phase.

Reimplemented from VPSSMgr.

Definition at line 164 of file VPSSMgr_General.cpp.

References VPSSMgr::initThermoXML().

PDSS * returnPDSS_ptr ( size_t  k,
const XML_Node speciesNode,
const XML_Node *const  phaseNode_ptr,
bool &  doST 
)
private

Local factory routine for the creation of PDSS objects.

This routine is specific to the VPSSMgr_General object. It will create a PDSS object for species k, by searching and querying for the "standardState" XML node in the standard state description of the species. If this XML node doesn't exist, it will assume that the standard state is an ideal gas. It decides on the attribute, "model", what PDSS object to create.

Parameters
kSpecies number
speciesNodeXML node for the standard state of the species
phaseNode_ptrpointer to the phase XML node
doSToutput variable indicating whether the instantiation has resulted in a SpeciesThermo object being created and registered with the SpeciesThermo manager class.
Returns
Returns the pointer to a malloced PDSS object

Definition at line 170 of file VPSSMgr_General.cpp.

References XML_Node::findByName(), GeneralSpeciesThermo::installPDSShandler(), VPSSMgr::installSTSpecies(), VPSSMgr::m_spthermo, VPSSMgr::m_useTmpRefStateStorage, and VPSSMgr::m_vptp_ptr.

Referenced by VPSSMgr_General::createInstallPDSS().

PDSS * createInstallPDSS ( size_t  k,
const XML_Node speciesNode,
const XML_Node *const  phaseNode_ptr 
)
virtual

Factory routine for the creation of PDSS objects that are then internally registered with this VPSSMgr object.

This function sets up the internal data within this object for handling the calculation of the standard state for the species.

This routine will create a PDSS object for species k, by searching and querying for the "standardState" XML node in the standard state description of the species. It will then store the object's pointer in a vector of pointers, and it will own the object.

Parameters
kSpecies number
speciesNodeXML node for the standard state of the species
phaseNode_ptrpointer to the phase XML node
Returns
Returns the pointer to the malloced PDSS object

Reimplemented from VPSSMgr.

Definition at line 236 of file VPSSMgr_General.cpp.

References VPSSMgr::m_kk, VPSSMgr::m_maxTemp, VPSSMgr::m_minTemp, VPSSMgr::m_p0, VPSSMgr_General::m_PDSS_ptrs, PDSS::maxTemp(), VPSSMgr::maxTemp(), PDSS::minTemp(), VPSSMgr::minTemp(), PDSS::refPressure(), and VPSSMgr_General::returnPDSS_ptr().

PDSS_enumType reportPDSSType ( int  index = -1) const
virtual

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

Parameters
indexSpecies index

Reimplemented from VPSSMgr.

Definition at line 267 of file VPSSMgr_General.cpp.

References VPSSMgr_General::m_PDSS_ptrs, and PDSS::reportPDSSType().

VPSSMgr_enumType reportVPSSMgrType ( ) const
virtual

This utility function reports the type of manager for the calculation of the standard state properties.

Reimplemented from VPSSMgr.

Definition at line 274 of file VPSSMgr_General.cpp.

void initAllPtrs ( VPStandardStateTP vp_ptr,
SpeciesThermo sp_ptr 
)
virtual

Initialize the internal shallow pointers in this object.

There are a bunch of internal shallow pointers that point to the owning VPStandardStateTP and SpeciesThermo objects. This function reinitializes them. This function is called like an onion.

Parameters
vp_ptrPointer to the VPStandardStateTP standard state
sp_ptrPointer to the SpeciesThermo standard state

Reimplemented from VPSSMgr.

Definition at line 89 of file VPSSMgr_General.cpp.

References VPSSMgr::initAllPtrs(), VPSSMgr::m_kk, VPSSMgr_General::m_PDSS_ptrs, and VPSSMgr::m_vptp_ptr.

doublereal err ( std::string  msg) const
private

VPStandardStateTP has its own err routine.

Parameters
msgError message string
void getStandardChemPotentials ( doublereal *  mu) const
virtualinherited

Get the array of chemical potentials at unit activity.

These are the standard state chemical potentials \( \mu^0_k(T,P) \). The values are evaluated at the current temperature and pressure.

Parameters
muOutput vector of standard state chemical potentials. length = m_kk. units are J / kmol.

Definition at line 158 of file VPSSMgr.cpp.

References VPSSMgr::err(), Cantera::GasConstant, VPSSMgr::m_gss_RT, VPSSMgr::m_kk, VPSSMgr::m_tlast, VPSSMgr::m_useTmpStandardStateStorage, and Cantera::scale().

Referenced by VPStandardStateTP::getPureGibbs().

void getGibbs_RT ( doublereal *  grt) const
virtualinherited

Get the nondimensional Gibbs functions for the species at their standard states of solution at the current T and P of the solution.

Parameters
grtOutput vector of nondimensional standard state Gibbs free energies. length = m_kk.

Definition at line 170 of file VPSSMgr.cpp.

References VPSSMgr::err(), VPSSMgr::m_gss_RT, and VPSSMgr::m_useTmpStandardStateStorage.

Referenced by VPStandardStateTP::getGibbs_RT().

void getEnthalpy_RT ( doublereal *  hrt) const
virtualinherited

Get the nondimensional Enthalpy functions for the species at their standard states at the current T and P of the solution.

Parameters
hrtOutput vector of standard state enthalpies. length = m_kk. units are unitless.

Definition at line 180 of file VPSSMgr.cpp.

References VPSSMgr::err(), VPSSMgr::m_hss_RT, and VPSSMgr::m_useTmpStandardStateStorage.

Referenced by VPStandardStateTP::getEnthalpy_RT(), and VPSSMgr_IdealGas::getIntEnergy_RT().

const vector_fp& enthalpy_RT ( ) const
inlineinherited

Return a reference to a vector of the molar enthalpies of the species in their standard states.

Definition at line 345 of file VPSSMgr.h.

References VPSSMgr::m_hss_RT.

Referenced by IdealSolnGasVPSS::enthalpy_mole().

void getEntropy_R ( doublereal *  sr) const
virtualinherited

Get the array of nondimensional Enthalpy functions for the standard state species at the current T and P of the solution.

Parameters
srOutput vector of nondimensional standard state entropies. length = m_kk.

Definition at line 190 of file VPSSMgr.cpp.

References VPSSMgr::err(), VPSSMgr::m_sss_R, and VPSSMgr::m_useTmpStandardStateStorage.

Referenced by VPStandardStateTP::getEntropy_R().

const vector_fp& entropy_R ( ) const
inlineinherited

Return a reference to a vector of the entropies of the species.

Definition at line 361 of file VPSSMgr.h.

References VPSSMgr::m_sss_R.

Referenced by IdealSolnGasVPSS::entropy_mole().

void getIntEnergy_RT ( doublereal *  urt) const
virtualinherited

Returns the vector of nondimensional internal Energies of the standard state at the current temperature and pressure of the solution for each species.

The internal energy is calculated from the enthalpy from the following formula:

\[ u^{ss}_k(T,P) = h^{ss}_k(T) - P * V^{ss}_k \]

Parameters
urtOutput vector of nondimensional standard state internal energies. length = m_kk.

Reimplemented in VPSSMgr_IdealGas.

Definition at line 200 of file VPSSMgr.cpp.

References VPSSMgr::err(), Cantera::GasConstant, VPSSMgr::m_hss_RT, VPSSMgr::m_kk, VPSSMgr::m_plast, VPSSMgr::m_tlast, VPSSMgr::m_useTmpStandardStateStorage, and VPSSMgr::m_Vss.

Referenced by VPStandardStateTP::getIntEnergy_RT().

void getCp_R ( doublereal *  cpr) const
virtualinherited

Get the nondimensional Heat Capacities at constant pressure for the standard state of the species at the current T and P.

This is redefined here to call the internal function, _updateStandardStateThermo(), which calculates all standard state properties at the same time.

Parameters
cprOutput vector containing the the nondimensional Heat Capacities at constant pressure for the standard state of the species. Length: m_kk.

Definition at line 214 of file VPSSMgr.cpp.

References VPSSMgr::err(), VPSSMgr::m_cpss_R, and VPSSMgr::m_useTmpStandardStateStorage.

Referenced by VPStandardStateTP::getCp_R().

const vector_fp& cp_R ( ) const
inlineinherited

Return a reference to a vector of the constant pressure heat capacities of the species.

Definition at line 398 of file VPSSMgr.h.

References VPSSMgr::m_cpss_R.

Referenced by IdealSolnGasVPSS::cp_mole().

void getStandardVolumes ( doublereal *  vol) const
virtualinherited

Get the molar volumes of each species in their standard states at the current T and P of the solution.

units = m^3 / kmol

This is redefined here to call the internal function, _updateStandardStateThermo(), which calculates all standard state properties at the same time.

Parameters
volOutput vector of species volumes. length = m_kk. units = m^3 / kmol

Reimplemented in VPSSMgr_IdealGas.

Definition at line 224 of file VPSSMgr.cpp.

References VPSSMgr::err(), VPSSMgr::m_useTmpStandardStateStorage, and VPSSMgr::m_Vss.

Referenced by VPStandardStateTP::getStandardVolumes(), and VPSSMgr::getStandardVolumes_ref().

const vector_fp& standardVolumes ( ) const
inlineinherited

Return a reference to a vector of the species standard molar volumes.

Definition at line 418 of file VPSSMgr.h.

References VPSSMgr::m_Vss.

Referenced by IdealSolnGasVPSS::calcDensity(), IdealSolnGasVPSS::getActivityConcentrations(), and IdealSolnGasVPSS::standardConcentration().

void getEnthalpy_RT_ref ( doublereal *  hrt) const
virtualinherited

There are also temporary variables for holding the species reference-state values of Cp, H, S, and V at the last temperature and reference pressure called. These functions are not recalculated if a new call is made using the previous temperature. All calculations are done within the routine _updateRefStateThermo().

Returns the vector of nondimensional enthalpies of the reference state at the current temperature of the solution and the reference pressure for the species.

Parameters
hrtOutput vector contains the nondimensional enthalpies of the reference state of the species length = m_kk, units = dimensionless.

Reimplemented in VPSSMgr_Water_ConstVol, and VPSSMgr_Water_HKFT.

Definition at line 235 of file VPSSMgr.cpp.

References VPSSMgr::err(), VPSSMgr::m_h0_RT, and VPSSMgr::m_useTmpRefStateStorage.

Referenced by VPStandardStateTP::getEnthalpy_RT_ref().

void getGibbs_RT_ref ( doublereal *  grt) const
virtualinherited

Returns the vector of nondimensional Gibbs free energies of the reference state at the current temperature of the solution and the reference pressure for the species.

Parameters
grtOutput vector contains the nondimensional Gibbs free energies of the reference state of the species length = m_kk, units = dimensionless.

Reimplemented in VPSSMgr_Water_ConstVol, VPSSMgr_ConstVol, and VPSSMgr_Water_HKFT.

Definition at line 245 of file VPSSMgr.cpp.

References VPSSMgr::err(), VPSSMgr::m_g0_RT, and VPSSMgr::m_useTmpRefStateStorage.

Referenced by VPStandardStateTP::getGibbs_RT_ref().

const vector_fp& Gibbs_RT_ref ( ) const
inlineinherited

Return a reference to the vector of Gibbs free energies of the species.

Definition at line 460 of file VPSSMgr.h.

References VPSSMgr::m_g0_RT.

Referenced by IdealSolnGasVPSS::setToEquilState().

void getEntropy_R_ref ( doublereal *  er) const
virtualinherited

Returns the vector of nondimensional entropies of the reference state at the current temperature of the solution and the reference pressure for the species.

Parameters
erOutput vector contain the nondimensional entropies of the species in their reference states length: m_kk, units: dimensionless.

Reimplemented in VPSSMgr_Water_ConstVol, and VPSSMgr_Water_HKFT.

Definition at line 267 of file VPSSMgr.cpp.

References VPSSMgr::err(), VPSSMgr::m_s0_R, and VPSSMgr::m_useTmpRefStateStorage.

Referenced by VPStandardStateTP::getEntropy_R_ref().

void getCp_R_ref ( doublereal *  cpr) const
virtualinherited

Returns the vector of nondimensional constant pressure heat capacities of the reference state at the current temperature of the solution and reference pressure for the species.

Parameters
cprOutput vector contains the nondimensional heat capacities of the species in their reference states length: m_kk, units: dimensionless.

Reimplemented in VPSSMgr_Water_ConstVol, and VPSSMgr_Water_HKFT.

Definition at line 277 of file VPSSMgr.cpp.

References VPSSMgr::err(), VPSSMgr::m_cp0_R, and VPSSMgr::m_useTmpRefStateStorage.

Referenced by VPStandardStateTP::getCp_R_ref().

void getStandardVolumes_ref ( doublereal *  vol) const
virtualinherited

Get the molar volumes of the species reference states at the current T and P_ref of the solution.

units = m^3 / kmol

Parameters
volOutput vector containing the standard state volumes. Length: m_kk.

Reimplemented in VPSSMgr_Water_ConstVol, VPSSMgr_Water_HKFT, and VPSSMgr_ConstVol.

Definition at line 287 of file VPSSMgr.cpp.

References VPSSMgr::getStandardVolumes().

Referenced by VPStandardStateTP::getStandardVolumes_ref().

void setState_TP ( doublereal  T,
doublereal  P 
)
virtualinherited

Set the temperature (K) and pressure (Pa)

All calls to change the internal state of the system's T and P are done through these routines

These routine in turn call the following underlying virtual functions

An important point to note is that between calls the assumption that the underlying PDSS objects will retain their set Temperatures and Pressure CAN NOT BE MADE. For efficiency reasons, we may twiddle these to get derivatives.

This sets the temperature and pressure and triggers calculation of underlying quantities

Parameters
TTemperature (K)
PPressure (Pa)

Reimplemented in VPSSMgr_Water_HKFT.

Definition at line 312 of file VPSSMgr.cpp.

References VPSSMgr::m_plast, VPSSMgr::m_tlast, VPSSMgr::updateRefStateThermo(), and VPSSMgr::updateStandardStateThermo().

Referenced by VPStandardStateTP::_updateStandardStateThermo(), and VPStandardStateTP::operator=().

void setState_T ( doublereal  T)
virtualinherited

Set the temperature (K)

Parameters
TTemperature (K)

Reimplemented in VPSSMgr_Water_HKFT.

Definition at line 303 of file VPSSMgr.cpp.

References VPSSMgr::m_tlast, VPSSMgr::updateRefStateThermo(), and VPSSMgr::updateStandardStateThermo().

void setState_P ( doublereal  P)
virtualinherited

Set the pressure (Pa)

Parameters
PPressure (Pa)

Reimplemented in VPSSMgr_Water_HKFT.

Definition at line 295 of file VPSSMgr.cpp.

References VPSSMgr::m_plast, and VPSSMgr::updateStandardStateThermo().

doublereal temperature ( ) const
inlineinherited

Return the temperature stored in the object.

Definition at line 553 of file VPSSMgr.h.

References VPSSMgr::m_tlast.

Referenced by VPSSMgr_IdealGas::_updateStandardStateThermo(), PDSS_IdealGas::temperature(), and PDSS_IonsFromNeutral::temperature().

doublereal pressure ( ) const
inlineinherited

Return the pressure stored in the object.

Definition at line 558 of file VPSSMgr.h.

References VPSSMgr::m_plast.

SpeciesThermo* SpeciesThermoMgr ( )
inlineinherited

Return the pointer to the reference-state Thermo calculator SpeciesThermo object.

Definition at line 564 of file VPSSMgr.h.

References VPSSMgr::m_spthermo.

Referenced by Cantera::importPhase().

void updateStandardStateThermo ( )
virtualinherited

Updates the internal standard state thermodynamic vectors at the current T and P of the solution.

If you are to peak internally inside the object, you need to call these functions after setState functions in order to be sure that the vectors are current.

Definition at line 325 of file VPSSMgr.cpp.

References VPSSMgr::_updateStandardStateThermo().

Referenced by VPSSMgr::setState_P(), VPSSMgr::setState_T(), and VPSSMgr::setState_TP().

void updateRefStateThermo ( ) const
virtualinherited

Updates the internal reference state thermodynamic vectors at the current T of the solution and the reference pressure.

If you are to peak internally inside the object, you need to call these functions after setState functions in order to be sure that the vectors are current.

Reimplemented in VPSSMgr_Water_HKFT.

Definition at line 330 of file VPSSMgr.cpp.

References VPSSMgr::_updateRefStateThermo().

Referenced by VPSSMgr::setState_T(), and VPSSMgr::setState_TP().

doublereal minTemp ( size_t  k = npos) const
virtualinherited

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

Definition at line 460 of file VPSSMgr.cpp.

References VPSSMgr::m_minTemp, VPSSMgr::m_vptp_ptr, PDSS::minTemp(), and Cantera::npos.

Referenced by VPSSMgr_General::createInstallPDSS(), PDSS::initThermoXML(), and STITbyPDSS::reportParameters().

doublereal maxTemp ( size_t  k = npos) const
virtualinherited

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

Definition at line 469 of file VPSSMgr.cpp.

References VPSSMgr::m_maxTemp, VPSSMgr::m_vptp_ptr, PDSS::maxTemp(), and Cantera::npos.

Referenced by VPSSMgr_General::createInstallPDSS(), PDSS::initThermoXML(), and STITbyPDSS::reportParameters().

doublereal refPressure ( size_t  k = npos) const
virtualinherited

The reference-state pressure for the standard state.

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. Default is -1, which returns the generic answer.

Definition at line 478 of file VPSSMgr.cpp.

References VPSSMgr::m_p0, VPSSMgr::m_vptp_ptr, Cantera::npos, and PDSS::refPressure().

Referenced by PDSS::initThermoXML(), and IdealSolnGasVPSS::setToEquilState().

void initLengths ( )
inherited
void installSTSpecies ( size_t  k,
const XML_Node speciesNode,
const XML_Node phaseNode_ptr 
)
inherited

Install specific content for species k in the reference-state thermodynamic SpeciesManager object.

This occurs before matrices are sized appropriately.

Parameters
kSpecies index in the phase
speciesNodeXML Node corresponding to the species
phaseNode_ptrPointer to the XML Node corresponding to the phase which owns the species

Definition at line 440 of file VPSSMgr.cpp.

References SpeciesThermoFactory::factory(), SpeciesThermoFactory::installThermoForSpecies(), VPSSMgr::m_p0, VPSSMgr::m_spthermo, VPSSMgr::m_vptp_ptr, and SpeciesThermo::refPressure().

Referenced by VPSSMgr_ConstVol::createInstallPDSS(), VPSSMgr_Water_ConstVol::createInstallPDSS(), and VPSSMgr_General::returnPDSS_ptr().

Member Data Documentation

std::vector<PDSS*> m_PDSS_ptrs
private
size_t m_kk
protectedinherited
VPStandardStateTP* m_vptp_ptr
protectedinherited
SpeciesThermo* m_spthermo
protectedinherited
doublereal m_tlast
mutableprotectedinherited
doublereal m_plast
mutableprotectedinherited
doublereal m_p0
mutableprotectedinherited
doublereal m_minTemp
protectedinherited

minimum temperature for the standard state calculations

Definition at line 811 of file VPSSMgr.h.

Referenced by VPSSMgr_General::createInstallPDSS(), VPSSMgr::initThermoXML(), VPSSMgr::minTemp(), and VPSSMgr::operator=().

doublereal m_maxTemp
protectedinherited

maximum temperature for the standard state calculations

Definition at line 814 of file VPSSMgr.h.

Referenced by VPSSMgr_General::createInstallPDSS(), VPSSMgr::initThermoXML(), VPSSMgr::maxTemp(), and VPSSMgr::operator=().

bool m_useTmpRefStateStorage
protectedinherited
vector_fp m_h0_RT
mutableprotectedinherited
vector_fp m_cp0_R
mutableprotectedinherited
vector_fp m_g0_RT
mutableprotectedinherited
vector_fp m_s0_R
mutableprotectedinherited
vector_fp m_V0
mutableprotectedinherited
bool m_useTmpStandardStateStorage
protectedinherited
vector_fp m_hss_RT
mutableprotectedinherited
vector_fp m_cpss_R
mutableprotectedinherited
vector_fp m_gss_RT
mutableprotectedinherited
vector_fp m_sss_R
mutableprotectedinherited
vector_fp m_Vss
mutableprotectedinherited
vector_fp mPDSS_h0_RT
mutableprotectedinherited

species reference enthalpies - used by individual PDSS objects

Vector containing the species reference enthalpies at T = m_tlast and P = p_ref.

Definition at line 891 of file VPSSMgr.h.

Referenced by VPSSMgr::initLengths(), PDSS::initPtrs(), and VPSSMgr::operator=().

vector_fp mPDSS_cp0_R
mutableprotectedinherited

species reference heat capacities - used by individual PDSS objects

Vector containing the species reference constant pressure heat capacities at T = m_tlast and P = p_ref.

Definition at line 898 of file VPSSMgr.h.

Referenced by VPSSMgr::initLengths(), PDSS::initPtrs(), and VPSSMgr::operator=().

vector_fp mPDSS_g0_RT
mutableprotectedinherited

species reference gibbs free energies - used by individual PDSS objects

Vector containing the species reference Gibbs functions at T = m_tlast and P = p_ref.

Definition at line 905 of file VPSSMgr.h.

Referenced by VPSSMgr::initLengths(), PDSS::initPtrs(), and VPSSMgr::operator=().

vector_fp mPDSS_s0_R
mutableprotectedinherited

species reference entropies - used by individual PDSS objects

Vector containing the species reference entropies at T = m_tlast and P = p_ref.

Definition at line 912 of file VPSSMgr.h.

Referenced by VPSSMgr::initLengths(), PDSS::initPtrs(), and VPSSMgr::operator=().

vector_fp mPDSS_V0
mutableprotectedinherited

species reference state molar Volumes - used by individual PDSS objects

Vector containing the rf molar volumes at T = m_tlast and P = p_ref.

Definition at line 920 of file VPSSMgr.h.

Referenced by VPSSMgr::initLengths(), PDSS::initPtrs(), and VPSSMgr::operator=().

vector_fp mPDSS_hss_RT
mutableprotectedinherited

species standard state enthalpies - used by individual PDSS objects

Vector containing the species standard state enthalpies at T = m_tlast and P = p_ref.

Definition at line 927 of file VPSSMgr.h.

Referenced by VPSSMgr::initLengths(), PDSS::initPtrs(), and VPSSMgr::operator=().

vector_fp mPDSS_cpss_R
mutableprotectedinherited

species standard state heat capacities - used by individual PDSS objects

Vector containing the species standard state constant pressure heat capacities at T = m_tlast and P = p_ref.

Definition at line 934 of file VPSSMgr.h.

Referenced by VPSSMgr::initLengths(), PDSS::initPtrs(), and VPSSMgr::operator=().

vector_fp mPDSS_gss_RT
mutableprotectedinherited

species standard state gibbs free energies - used by individual PDSS objects

Vector containing the species standard state Gibbs functions at T = m_tlast and P = p_ref.

Definition at line 941 of file VPSSMgr.h.

Referenced by VPSSMgr::initLengths(), PDSS::initPtrs(), and VPSSMgr::operator=().

vector_fp mPDSS_sss_R
mutableprotectedinherited

species standard state entropies - used by individual PDSS objects

Vector containing the species standard state entropies at T = m_tlast and P = p_ref.

Definition at line 948 of file VPSSMgr.h.

Referenced by VPSSMgr::initLengths(), PDSS::initPtrs(), and VPSSMgr::operator=().

vector_fp mPDSS_Vss
mutableprotectedinherited

species standard state molar Volumes - used by individual PDSS objects

Vector containing the ss molar volumes at T = m_tlast and P = p_ref.

Definition at line 955 of file VPSSMgr.h.

Referenced by VPSSMgr::initLengths(), PDSS::initPtrs(), and VPSSMgr::operator=().


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