Cantera  2.1.2
Public Member Functions | Protected Member Functions | List of all members
VPSSMgr_IdealGas Class Reference

A VPSSMgr where all species in the phase obey an ideal gas equation of state. More...

#include <VPSSMgr_IdealGas.h>

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

Public Member Functions

 VPSSMgr_IdealGas (VPStandardStateTP *vp_ptr, SpeciesThermo *spth)
 Basic constructor that initializes the object. More...
 
 VPSSMgr_IdealGas (const VPSSMgr_IdealGas &right)
 Copy Constructor. More...
 
VPSSMgr_IdealGasoperator= (const VPSSMgr_IdealGas &right)
 Assignment operator. More...
 
virtual VPSSMgrduplMyselfAsVPSSMgr () const
 Duplication routine for objects which derive from VPSSMgr. More...
 
virtual PDSScreateInstallPDSS (size_t k, const XML_Node &speciesNode, const XML_Node *const phaseNode_ptr)
 Create and install an ideal gas standard state manager for one species within this object. More...
 
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...
 
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 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 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...
 
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 files importCTML.cpp and ThermoFactory.cpp.

virtual void initThermoXML (XML_Node &phaseNode, const std::string &id)
 Finalize the thermo after all species have been entered. More...
 
- Public Member Functions inherited from VPSSMgr
 VPSSMgr (VPStandardStateTP *vptp_ptr, SpeciesThermo *spth=0)
 Constructor. More...
 
virtual ~VPSSMgr ()
 Destructor. More...
 
 VPSSMgr (const VPSSMgr &right)
 Copy Constructor. More...
 
VPSSMgroperator= (const VPSSMgr &right)
 Assignment operator. More...
 
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 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 const vector_fpgetStandardVolumes () const
 
const vector_fpstandardVolumes () const
 Return a reference to a vector of the species standard molar volumes. More...
 
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...
 
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...
 
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...
 
SpeciesThermoSpeciesThermoMgr ()
 Return the pointer to the reference-state Thermo calculator SpeciesThermo 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 initThermo ()
 
void initLengths ()
 Initialize the lengths within the object. 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 void initAllPtrs (VPStandardStateTP *vp_ptr, SpeciesThermo *sp_ptr)
 Initialize the internal shallow pointers in this object. More...
 

Protected Member Functions

virtual void _updateStandardStateThermo ()
 Updates the standard state thermodynamic functions at the current T and P of the solution. More...
 
- Protected Member Functions inherited from VPSSMgr
virtual void _updateRefStateThermo () const
 Updates the reference state thermodynamic functions at the current T of the solution and the reference pressure. More...
 

Detailed Description

A VPSSMgr where all species in the phase obey an ideal gas equation of state.

Definition at line 31 of file VPSSMgr_IdealGas.h.

Constructor & Destructor Documentation

VPSSMgr_IdealGas ( VPStandardStateTP vp_ptr,
SpeciesThermo spth 
)

Basic constructor that initializes the object.

Parameters
vp_ptrPointer to the owning ThermoPhase
spthSpecies thermo pointer.

Definition at line 28 of file VPSSMgr_IdealGas.cpp.

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

Referenced by VPSSMgr_IdealGas::duplMyselfAsVPSSMgr().

VPSSMgr_IdealGas ( const VPSSMgr_IdealGas right)

Copy Constructor.

Definition at line 35 of file VPSSMgr_IdealGas.cpp.

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

Member Function Documentation

VPSSMgr_IdealGas & operator= ( const VPSSMgr_IdealGas right)

Assignment operator.

Definition at line 43 of file VPSSMgr_IdealGas.cpp.

References VPSSMgr::operator=().

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.

Reimplemented from VPSSMgr.

Definition at line 52 of file VPSSMgr_IdealGas.cpp.

References VPSSMgr_IdealGas::VPSSMgr_IdealGas().

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 from VPSSMgr.

Definition at line 57 of file VPSSMgr_IdealGas.cpp.

References VPSSMgr::getEnthalpy_RT(), and VPSSMgr::m_kk.

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 from VPSSMgr.

Definition at line 65 of file VPSSMgr_IdealGas.cpp.

References VPSSMgr::m_Vss.

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 from VPSSMgr.

Definition at line 70 of file VPSSMgr_IdealGas.cpp.

References Cantera::GasConstant, VPSSMgr::m_cp0_R, VPSSMgr::m_cpss_R, VPSSMgr::m_gss_RT, VPSSMgr::m_h0_RT, VPSSMgr::m_hss_RT, VPSSMgr::m_kk, VPSSMgr::m_p0, VPSSMgr::m_plast, VPSSMgr::m_s0_R, VPSSMgr::m_sss_R, VPSSMgr::m_Vss, and VPSSMgr::temperature().

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 from VPSSMgr.

Definition at line 86 of file VPSSMgr_IdealGas.cpp.

References VPSSMgr::initThermoXML().

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

Create and install an ideal gas standard state manager for one species within this object.

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

  • It registers the species with the SpeciesThermo object for the containing VPStandardStateTP phase.
  • It also creates a PDSS object, which basically contains a duplication of some of this information and returns a pointer to the new object.
Parameters
kSpecies index within the phase
speciesNodeReference to the species node in the XML tree
phaseNode_ptrPointer to the phase node in the XML tree
Returns
Returns a pointer to the a newly malloced PDSS object containing the parameterization

Reimplemented from VPSSMgr.

Definition at line 92 of file VPSSMgr_IdealGas.cpp.

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

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

Reimplemented from VPSSMgr.

Definition at line 119 of file VPSSMgr_IdealGas.cpp.

VPSSMgr_enumType reportVPSSMgrType ( ) const
virtual

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

Returns
Returns an enum type called VPSSMgr_enumType, which is a list of the known VPSSMgr objects

Reimplemented from VPSSMgr.

Definition at line 124 of file VPSSMgr_IdealGas.cpp.

References Cantera::cVPSSMGR_IDEALGAS.


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