Cantera  2.3.0
Public Member Functions | Protected Attributes | Friends | List of all members
VPSSMgr Class Reference

Virtual base class for the classes that manage the calculation of standard state properties for all the species in a phase. More...

#include <VPSSMgr.h>

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

Public Member Functions

 VPSSMgr (VPStandardStateTP *vptp_ptr, MultiSpeciesThermo *spth=0)
 Constructor. More...
 
 VPSSMgr (const VPSSMgr &right)
 
VPSSMgroperator= (const VPSSMgr &right)
 
virtual VPSSMgrduplMyselfAsVPSSMgr () const
 Duplication routine for objects which derive from VPSSMgr. More...
 
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. More...
 
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. More...
 
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. More...
 
const vector_fpenthalpy_RT () const
 Return a reference to a vector of the molar enthalpies of the species in their standard states. More...
 
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. More...
 
const vector_fpentropy_R () const
 Return a reference to a vector of the entropies of the species. More...
 
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. More...
 
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. More...
 
const vector_fpcp_R () const
 Return a reference to a vector of the constant pressure heat capacities of the species. More...
 
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. More...
 
virtual const vector_fpgetStandardVolumes () const
 
const vector_fpstandardVolumes () const
 Return a reference to a vector of the species standard molar volumes. More...
 
Thermodynamic Values for the Species Reference States

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

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. More...
 
virtual void getGibbs_ref (doublereal *g) const
 
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. More...
 
Utility Methods - Reports on various quantities
virtual PDSS_enumType reportPDSSType (int index=-1) const
 This utility function reports the type of parameterization used for the species with index number index. More...
 
virtual VPSSMgr_enumType reportVPSSMgrType () const
 This utility function reports the type of manager for the calculation of ss properties. 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 the standard state. More...
 
Initialization Methods - For Internal use

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

virtual void initThermo ()
 
void initLengths ()
 Initialize the lengths within the object. More...
 
virtual void initThermoXML (XML_Node &phaseNode, const std::string &id)
 Finalize the thermo after all species have been entered. More...
 
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. More...
 
virtual PDSScreateInstallPDSS (size_t k, const XML_Node &speciesNode, const XML_Node *const phaseNode_ptr)
 Install specific content for species k in the standard-state thermodynamic calculator and also create/return a PDSS object for that species. More...
 
virtual void initAllPtrs (VPStandardStateTP *vp_ptr, MultiSpeciesThermo *sp_ptr)
 Initialize the internal shallow pointers in this object. More...
 

Protected Attributes

size_t m_kk
 Number of species in the phase. More...
 
VPStandardStateTPm_vptp_ptr
 Variable pressure ThermoPhase object. More...
 
MultiSpeciesThermom_spthermo
 Pointer to reference state thermo calculator. More...
 
doublereal m_tlast
 The last temperature at which the standard state thermodynamic properties were calculated at. More...
 
doublereal m_plast
 The last pressure at which the Standard State thermodynamic properties were calculated at. More...
 
doublereal m_p0
 Reference pressure (Pa) must be the same for all species - defaults to 1 atm. More...
 
doublereal m_minTemp
 minimum temperature for the standard state calculations More...
 
doublereal m_maxTemp
 maximum temperature for the standard state calculations More...
 
bool m_useTmpRefStateStorage
 boolean indicating whether temporary reference state storage is used -> default is false More...
 
vector_fp m_h0_RT
 Vector containing the species reference enthalpies at T = m_tlast and P = p_ref. More...
 
vector_fp m_cp0_R
 Vector containing the species reference constant pressure heat capacities at T = m_tlast and P = p_ref. More...
 
vector_fp m_g0_RT
 Vector containing the species reference Gibbs functions at T = m_tlast and P = p_ref. More...
 
vector_fp m_s0_R
 Vector containing the species reference entropies at T = m_tlast and P = p_ref. More...
 
vector_fp m_V0
 Vector containing the species reference molar volumes. More...
 
bool m_useTmpStandardStateStorage
 boolean indicating whether temporary standard state storage is used -> default is false More...
 
vector_fp m_hss_RT
 Vector containing the species Standard State enthalpies at T = m_tlast and P = m_plast. More...
 
vector_fp m_cpss_R
 Vector containing the species Standard State constant pressure heat capacities at T = m_tlast and P = m_plast. More...
 
vector_fp m_gss_RT
 Vector containing the species Standard State Gibbs functions at T = m_tlast and P = m_plast. More...
 
vector_fp m_sss_R
 Vector containing the species Standard State entropies at T = m_tlast and P = m_plast. More...
 
vector_fp m_Vss
 Vector containing the species standard state volumes at T = m_tlast and P = m_plast. More...
 
vector_fp mPDSS_h0_RT
 species reference enthalpies - used by individual PDSS objects More...
 
vector_fp mPDSS_cp0_R
 species reference heat capacities - used by individual PDSS objects More...
 
vector_fp mPDSS_g0_RT
 species reference Gibbs free energies - used by individual PDSS objects More...
 
vector_fp mPDSS_s0_R
 species reference entropies - used by individual PDSS objects More...
 
vector_fp mPDSS_V0
 species reference state molar Volumes - used by individual PDSS objects More...
 
vector_fp mPDSS_hss_RT
 species standard state enthalpies - used by individual PDSS objects More...
 
vector_fp mPDSS_cpss_R
 species standard state heat capacities - used by individual PDSS objects More...
 
vector_fp mPDSS_gss_RT
 species standard state Gibbs free energies - used by individual PDSS objects More...
 
vector_fp mPDSS_sss_R
 species standard state entropies - used by individual PDSS objects More...
 
vector_fp mPDSS_Vss
 species standard state molar Volumes - used by individual PDSS objects More...
 

Friends

class PDSS
 

Setting the Internal State of the System

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.

virtual void setState_TP (doublereal T, doublereal P)
 Set the temperature (K) and pressure (Pa) More...
 
virtual void setState_T (doublereal T)
 Set the temperature (K) More...
 
virtual void setState_P (doublereal P)
 Set the pressure (Pa) More...
 
doublereal temperature () const
 Return the temperature stored in the object. More...
 
doublereal pressure () const
 Return the pressure stored in the object. More...
 
MultiSpeciesThermoSpeciesThermoMgr ()
 Return the pointer to the reference-state Thermo calculator MultiSpeciesThermo object. More...
 
virtual void updateStandardStateThermo ()
 Updates the internal standard state thermodynamic vectors at the current T and P of the solution. More...
 
virtual void updateRefStateThermo () const
 Updates the internal reference state thermodynamic vectors at the current T of the solution and the reference pressure. More...
 
virtual void _updateStandardStateThermo ()
 Updates the standard state thermodynamic functions at the current T and P of the solution. More...
 
virtual void _updateRefStateThermo () const
 Updates the reference state thermodynamic functions at the current T of the solution and the reference pressure. More...
 

Detailed Description

Virtual base class for the classes that manage the calculation of standard state properties for all the species in a phase.

This class defines the interface which all subclasses must implement.

Class VPSSMgr is the base class for a family of classes that compute properties of a set of species in their standard state at a range of temperatures and pressures.

If m_useTmpRefStateStorage is set to true, then the following internal arrays, containing information about the reference arrays, are calculated and kept up to date at every call.

The virtual function _updateRefStateThermo() is supplied to do this and may be reimplemented in child routines. A default implementation based on the speciesThermo class is supplied in this base class. _updateStandardStateThermo() is called whenever a reference state property is needed.

When m_useTmpStandardStateStorage is true, then the following internal arrays, containing information on the standard state properties are calculated and kept up to date.

The virtual function _updateStandardStateThermo() is supplied to do this and must be reimplemented in child routines, when m_useTmpStandardStateStorage is true. It may be optionally reimplemented in child routines if m_useTmpStandardStateStorage is false. _updateStandardStateThermo() is called whenever a standard state property is needed.

This class is usually used for nearly incompressible phases. For those phases, it makes sense to change the equation of state independent variable from density to pressure.

Definition at line 228 of file VPSSMgr.h.

Constructor & Destructor Documentation

◆ VPSSMgr() [1/2]

VPSSMgr ( VPStandardStateTP vptp_ptr,
MultiSpeciesThermo spth = 0 
)

Constructor.

Parameters
vptp_ptrPointer to the Variable pressure ThermoPhase object
spthPointer to the optional MultiSpeciesThermo object that will handle the calculation of the reference state thermodynamic coefficients.

Definition at line 25 of file VPSSMgr.cpp.

References VPSSMgr::m_vptp_ptr.

Referenced by VPSSMgr::duplMyselfAsVPSSMgr().

◆ VPSSMgr() [2/2]

VPSSMgr ( const VPSSMgr right)
Deprecated:
Copy constructor to be removed after Cantera 2.3 for all classes derived from VPSSMgr.

Definition at line 43 of file VPSSMgr.cpp.

References Cantera::warn_deprecated().

Member Function Documentation

◆ operator=()

VPSSMgr & operator= ( const VPSSMgr right)

◆ duplMyselfAsVPSSMgr()

VPSSMgr * duplMyselfAsVPSSMgr ( ) const
virtual

Duplication routine for objects which derive from VPSSMgr.

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

Deprecated:
To be removed after Cantera 2.3 for all classes derived from VPSSMgr.

Reimplemented in VPSSMgr_General, VPSSMgr_IdealGas, VPSSMgr_ConstVol, VPSSMgr_Water_ConstVol, and VPSSMgr_Water_HKFT.

Definition at line 114 of file VPSSMgr.cpp.

References VPSSMgr::VPSSMgr(), and Cantera::warn_deprecated().

◆ getStandardChemPotentials()

void getStandardChemPotentials ( doublereal *  mu) const
virtual

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 142 of file VPSSMgr.cpp.

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

◆ getGibbs_RT()

void getGibbs_RT ( doublereal *  grt) const
virtual

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 152 of file VPSSMgr.cpp.

References VPSSMgr::m_gss_RT, and VPSSMgr::m_useTmpStandardStateStorage.

◆ getEnthalpy_RT()

void getEnthalpy_RT ( doublereal *  hrt) const
virtual

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 161 of file VPSSMgr.cpp.

References VPSSMgr::m_hss_RT, and VPSSMgr::m_useTmpStandardStateStorage.

Referenced by VPSSMgr_IdealGas::getIntEnergy_RT().

◆ enthalpy_RT()

const vector_fp& enthalpy_RT ( ) const
inline

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

Definition at line 291 of file VPSSMgr.h.

References VPSSMgr::m_hss_RT.

◆ getEntropy_R()

void getEntropy_R ( doublereal *  sr) const
virtual

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 170 of file VPSSMgr.cpp.

References VPSSMgr::m_sss_R, and VPSSMgr::m_useTmpStandardStateStorage.

◆ entropy_R()

const vector_fp& entropy_R ( ) const
inline

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

Definition at line 305 of file VPSSMgr.h.

References VPSSMgr::m_sss_R.

◆ getIntEnergy_RT()

void getIntEnergy_RT ( doublereal *  urt) const
virtual

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 179 of file VPSSMgr.cpp.

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

◆ getCp_R()

void getCp_R ( doublereal *  cpr) const
virtual

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 191 of file VPSSMgr.cpp.

References VPSSMgr::m_cpss_R, and VPSSMgr::m_useTmpStandardStateStorage.

◆ cp_R()

const vector_fp& cp_R ( ) const
inline

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

Definition at line 340 of file VPSSMgr.h.

References VPSSMgr::m_cpss_R.

◆ getStandardVolumes()

void getStandardVolumes ( doublereal *  vol) const
virtual

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 200 of file VPSSMgr.cpp.

References VPSSMgr::m_useTmpStandardStateStorage, and VPSSMgr::m_Vss.

Referenced by VPSSMgr::getStandardVolumes_ref().

◆ standardVolumes()

const vector_fp& standardVolumes ( ) const
inline

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

Definition at line 360 of file VPSSMgr.h.

References VPSSMgr::m_Vss.

◆ getEnthalpy_RT_ref()

void getEnthalpy_RT_ref ( doublereal *  hrt) const
virtual

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 218 of file VPSSMgr.cpp.

References VPSSMgr::m_h0_RT, and VPSSMgr::m_useTmpRefStateStorage.

◆ getGibbs_RT_ref()

void getGibbs_RT_ref ( doublereal *  grt) const
virtual

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_ConstVol, VPSSMgr_Water_ConstVol, and VPSSMgr_Water_HKFT.

Definition at line 227 of file VPSSMgr.cpp.

References VPSSMgr::m_g0_RT, and VPSSMgr::m_useTmpRefStateStorage.

◆ Gibbs_RT_ref()

const vector_fp& Gibbs_RT_ref ( ) const
inline

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

Definition at line 398 of file VPSSMgr.h.

References VPSSMgr::m_g0_RT.

◆ getGibbs_ref()

void getGibbs_ref ( doublereal *  g) const
virtual

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 in VPSSMgr_General, VPSSMgr_Water_ConstVol, and VPSSMgr_Water_HKFT.

Definition at line 236 of file VPSSMgr.cpp.

References Cantera::GasConstant, VPSSMgr::m_g0_RT, VPSSMgr::m_kk, VPSSMgr::m_tlast, VPSSMgr::m_useTmpRefStateStorage, and Cantera::scale().

◆ getEntropy_R_ref()

void getEntropy_R_ref ( doublereal *  er) const
virtual

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 246 of file VPSSMgr.cpp.

References VPSSMgr::m_s0_R, and VPSSMgr::m_useTmpRefStateStorage.

◆ getCp_R_ref()

void getCp_R_ref ( doublereal *  cpr) const
virtual

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 255 of file VPSSMgr.cpp.

References VPSSMgr::m_cp0_R, and VPSSMgr::m_useTmpRefStateStorage.

◆ getStandardVolumes_ref()

void getStandardVolumes_ref ( doublereal *  vol) const
virtual

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_ConstVol, and VPSSMgr_Water_HKFT.

Definition at line 264 of file VPSSMgr.cpp.

References VPSSMgr::getStandardVolumes().

◆ setState_TP()

void setState_TP ( doublereal  T,
doublereal  P 
)
virtual

Set the temperature (K) and pressure (Pa)

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 288 of file VPSSMgr.cpp.

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

◆ setState_T()

void setState_T ( doublereal  T)
virtual

Set the temperature (K)

Parameters
TTemperature (K)

Reimplemented in VPSSMgr_Water_HKFT.

Definition at line 279 of file VPSSMgr.cpp.

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

◆ setState_P()

void setState_P ( doublereal  P)
virtual

Set the pressure (Pa)

Parameters
PPressure (Pa)

Reimplemented in VPSSMgr_Water_HKFT.

Definition at line 271 of file VPSSMgr.cpp.

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

◆ temperature()

doublereal temperature ( ) const
inline

Return the temperature stored in the object.

Definition at line 487 of file VPSSMgr.h.

References VPSSMgr::m_tlast.

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

◆ pressure()

doublereal pressure ( ) const
inline

Return the pressure stored in the object.

Definition at line 492 of file VPSSMgr.h.

References VPSSMgr::m_plast.

◆ SpeciesThermoMgr()

MultiSpeciesThermo* SpeciesThermoMgr ( )
inline

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

Definition at line 498 of file VPSSMgr.h.

References VPSSMgr::m_spthermo.

◆ updateStandardStateThermo()

void updateStandardStateThermo ( )
virtual

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

If you are to peek 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 301 of file VPSSMgr.cpp.

References VPSSMgr::_updateStandardStateThermo().

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

◆ updateRefStateThermo()

void updateRefStateThermo ( ) const
virtual

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

If you are to peek 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 306 of file VPSSMgr.cpp.

References VPSSMgr::_updateRefStateThermo().

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

◆ _updateStandardStateThermo()

void _updateStandardStateThermo ( )
protectedvirtual

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 for every call to functions in this class. It checks to see whether the temperature or pressure has changed and thus the ss thermodynamics functions for all of the species must be recalculated.

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 by child classes to update internal member data.

Note, the base class implementation will throw an error. It must be reimplemented in derived classes.

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

Reimplemented in VPSSMgr_Water_HKFT, VPSSMgr_General, VPSSMgr_IdealGas, VPSSMgr_ConstVol, and VPSSMgr_Water_ConstVol.

Definition at line 311 of file VPSSMgr.cpp.

References VPSSMgr::m_kk, VPSSMgr::m_plast, VPSSMgr::m_tlast, VPSSMgr::m_vptp_ptr, and PDSS::setState_TP().

Referenced by VPSSMgr::updateStandardStateThermo().

◆ _updateRefStateThermo()

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 in VPSSMgr_Water_HKFT, VPSSMgr_General, and VPSSMgr_Water_ConstVol.

Definition at line 320 of file VPSSMgr.cpp.

References VPSSMgr::m_cp0_R, VPSSMgr::m_g0_RT, VPSSMgr::m_h0_RT, VPSSMgr::m_kk, VPSSMgr::m_s0_R, VPSSMgr::m_spthermo, VPSSMgr::m_tlast, and MultiSpeciesThermo::update().

Referenced by VPSSMgr::updateRefStateThermo().

◆ reportPDSSType()

PDSS_enumType reportPDSSType ( int  index = -1) const
virtual

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

The following methods are used in the process of reporting various states and attributes

Parameters
indexSpecies index
Deprecated:
To be removed after Cantera 2.3.

Reimplemented in VPSSMgr_General, VPSSMgr_ConstVol, VPSSMgr_Water_HKFT, VPSSMgr_Water_ConstVol, and VPSSMgr_IdealGas.

Definition at line 418 of file VPSSMgr.cpp.

◆ reportVPSSMgrType()

VPSSMgr_enumType reportVPSSMgrType ( ) const
virtual

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

Returns
an enum type called VPSSMgr_enumType, which is a list of the known VPSSMgr objects
Deprecated:
Unused. To be removed after Cantera 2.3.

Reimplemented in VPSSMgr_General, VPSSMgr_ConstVol, VPSSMgr_Water_HKFT, VPSSMgr_Water_ConstVol, and VPSSMgr_IdealGas.

Definition at line 423 of file VPSSMgr.cpp.

◆ minTemp()

doublereal minTemp ( size_t  k = npos) const
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

Definition at line 394 of file VPSSMgr.cpp.

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

Referenced by PDSS::initThermoXML().

◆ maxTemp()

doublereal maxTemp ( size_t  k = npos) const
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

Definition at line 402 of file VPSSMgr.cpp.

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

Referenced by PDSS::initThermoXML().

◆ refPressure()

doublereal refPressure ( size_t  k = npos) const
virtual

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.

Parameters
kSpecies index. Default is -1, which returns the generic answer.

Definition at line 410 of file VPSSMgr.cpp.

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

Referenced by PDSS::initThermoXML().

◆ initThermo()

void initThermo ( )
virtual

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

Reimplemented in VPSSMgr_General.

Definition at line 332 of file VPSSMgr.cpp.

References VPSSMgr::initLengths().

Referenced by PDSS::initThermo().

◆ initLengths()

void initLengths ( )

◆ initThermoXML()

void initThermoXML ( XML_Node phaseNode,
const std::string &  id 
)
virtual

Finalize the thermo 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.

In this routine, we currently calculate the reference pressure, the minimum and maximum temperature for the applicability of the thermo formulation.

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

Reimplemented in VPSSMgr_Water_HKFT, VPSSMgr_Water_ConstVol, and VPSSMgr_ConstVol.

Definition at line 364 of file VPSSMgr.cpp.

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

Referenced by VPSSMgr_ConstVol::initThermoXML(), VPSSMgr_Water_ConstVol::initThermoXML(), and VPSSMgr_Water_HKFT::initThermoXML().

◆ installSTSpecies()

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.

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 375 of file VPSSMgr.cpp.

References XML_Node::child(), MultiSpeciesThermo::install_STIT(), VPSSMgr::m_p0, VPSSMgr::m_spthermo, Cantera::newSpeciesThermoInterpType(), and MultiSpeciesThermo::refPressure().

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

◆ createInstallPDSS()

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

Install specific content for species k in the standard-state thermodynamic calculator and also create/return a PDSS object for that species.

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

Reimplemented in VPSSMgr_General, VPSSMgr_Water_HKFT, VPSSMgr_ConstVol, VPSSMgr_Water_ConstVol, and VPSSMgr_IdealGas.

Definition at line 386 of file VPSSMgr.cpp.

◆ initAllPtrs()

void initAllPtrs ( VPStandardStateTP vp_ptr,
MultiSpeciesThermo 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 MultiSpeciesThermo objects. This function reinitializes them. This function is called like an onion.

Parameters
vp_ptrPointer to the VPStandardStateTP standard state
sp_ptrPointer to the MultiSpeciesThermo standard state
Deprecated:
To be removed after Cantera 2.3 for all classes derived from VPSSMgr.

Reimplemented in VPSSMgr_General, VPSSMgr_Water_HKFT, and VPSSMgr_Water_ConstVol.

Definition at line 121 of file VPSSMgr.cpp.

References STITbyPDSS::initAllPtrs(), VPSSMgr::m_kk, VPSSMgr::m_spthermo, VPSSMgr::m_vptp_ptr, MultiSpeciesThermo::provideSTIT(), and Cantera::warn_deprecated().

Referenced by VPSSMgr_Water_ConstVol::initAllPtrs(), VPSSMgr_Water_HKFT::initAllPtrs(), and VPSSMgr_General::initAllPtrs().

Member Data Documentation

◆ m_kk

size_t m_kk
protected

◆ m_vptp_ptr

VPStandardStateTP* m_vptp_ptr
protected

◆ m_spthermo

MultiSpeciesThermo* m_spthermo
protected

◆ m_tlast

doublereal m_tlast
mutableprotected

◆ m_plast

doublereal m_plast
mutableprotected

◆ m_p0

doublereal m_p0
mutableprotected

◆ m_minTemp

doublereal m_minTemp
protected

minimum temperature for the standard state calculations

Definition at line 727 of file VPSSMgr.h.

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

◆ m_maxTemp

doublereal m_maxTemp
protected

maximum temperature for the standard state calculations

Definition at line 730 of file VPSSMgr.h.

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

◆ m_useTmpRefStateStorage

bool m_useTmpRefStateStorage
protected

◆ m_h0_RT

vector_fp m_h0_RT
mutableprotected

◆ m_cp0_R

vector_fp m_cp0_R
mutableprotected

◆ m_g0_RT

vector_fp m_g0_RT
mutableprotected

◆ m_s0_R

vector_fp m_s0_R
mutableprotected

◆ m_V0

vector_fp m_V0
mutableprotected

◆ m_useTmpStandardStateStorage

bool m_useTmpStandardStateStorage
protected

◆ m_hss_RT

vector_fp m_hss_RT
mutableprotected

◆ m_cpss_R

vector_fp m_cpss_R
mutableprotected

◆ m_gss_RT

vector_fp m_gss_RT
mutableprotected

◆ m_sss_R

vector_fp m_sss_R
mutableprotected

◆ m_Vss

vector_fp m_Vss
mutableprotected

◆ mPDSS_h0_RT

vector_fp mPDSS_h0_RT
mutableprotected

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 784 of file VPSSMgr.h.

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

◆ mPDSS_cp0_R

vector_fp mPDSS_cp0_R
mutableprotected

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 791 of file VPSSMgr.h.

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

◆ mPDSS_g0_RT

vector_fp mPDSS_g0_RT
mutableprotected

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 798 of file VPSSMgr.h.

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

◆ mPDSS_s0_R

vector_fp mPDSS_s0_R
mutableprotected

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 805 of file VPSSMgr.h.

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

◆ mPDSS_V0

vector_fp mPDSS_V0
mutableprotected

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 812 of file VPSSMgr.h.

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

◆ mPDSS_hss_RT

vector_fp mPDSS_hss_RT
mutableprotected

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 819 of file VPSSMgr.h.

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

◆ mPDSS_cpss_R

vector_fp mPDSS_cpss_R
mutableprotected

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 826 of file VPSSMgr.h.

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

◆ mPDSS_gss_RT

vector_fp mPDSS_gss_RT
mutableprotected

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 833 of file VPSSMgr.h.

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

◆ mPDSS_sss_R

vector_fp mPDSS_sss_R
mutableprotected

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 840 of file VPSSMgr.h.

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

◆ mPDSS_Vss

vector_fp mPDSS_Vss
mutableprotected

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 847 of file VPSSMgr.h.

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


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