Cantera  2.3.0
VPSSMgr_Water_HKFT.h
Go to the documentation of this file.
1 /**
2  * @file VPSSMgr_Water_HKFT.h
3  * Declaration file for a derived class that handles the calculation
4  * of standard state thermo properties for real water and
5  * a set of species which have the HKFT equation of state
6  * (see \ref mgrpdssthermocalc and
7  * class \link Cantera::VPSSMgr_Water_HKFT VPSSMgr_Water_HKFT\endlink).
8  */
9 
10 // This file is part of Cantera. See License.txt in the top-level directory or
11 // at http://www.cantera.org/license.txt for license and copyright information.
12 
13 #ifndef CT_VPSSMGR_WATER_HKFT_H
14 #define CT_VPSSMGR_WATER_HKFT_H
15 
16 #include "VPSSMgr.h"
17 
18 namespace Cantera
19 {
20 class PDSS_Water;
21 
22 //! Manages standard state thermo properties for real water and a set of
23 //! species which have the HKFT equation of state.
25 {
26 public:
27  //! Constructor
28  /*!
29  * @param vptp_ptr Pointer to the Variable pressure ThermoPhase object
30  * @param spth Pointer to the optional MultiSpeciesThermo object
31  * that will handle the calculation of the reference
32  * state thermodynamic coefficients.
33  */
35  MultiSpeciesThermo* spth);
36 
38  VPSSMgr_Water_HKFT& operator=(const VPSSMgr_Water_HKFT& right);
39  virtual VPSSMgr* duplMyselfAsVPSSMgr() const;
40 
41  /*! @name Thermodynamic Values for the Species Reference States
42  * There are also temporary variables for holding the species reference-
43  * state values of Cp, H, S, and V at the last temperature and reference
44  * pressure called. These functions are not recalculated if a new call is
45  * made using the previous temperature. All calculations are done within
46  * the routine _updateRefStateThermo().
47  */
48  //@{
49 
50  virtual void getEnthalpy_RT_ref(doublereal* hrt) const;
51  virtual void getGibbs_RT_ref(doublereal* grt) const;
52  virtual void getGibbs_ref(doublereal* g) const;
53  virtual void getEntropy_R_ref(doublereal* er) const;
54  virtual void getCp_R_ref(doublereal* cpr) const;
55  virtual void getStandardVolumes_ref(doublereal* vol) const;
56  //@}
57 
58  virtual void setState_TP(doublereal T, doublereal P);
59  virtual void setState_T(doublereal T);
60  virtual void setState_P(doublereal P);
61 
62  /*! @name Setting the Internal State of the System
63  * All calls to change the internal state of the system's T and P
64  * are done through these routines
65  * - setState_TP()
66  * - setState_T()
67  * - setState_P()
68  *
69  * These routine in turn call the following underlying virtual functions
70  *
71  * - _updateRefStateThermo()
72  * - _updateStandardStateThermo()
73  *
74  * An important point to note is that between calls the assumption
75  * that the underlying PDSS objects will retain their set Temperatures
76  * and Pressure CAN NOT BE MADE. For efficiency reasons, we may twiddle
77  * these to get derivatives.
78  */
79  //@{
80  virtual void updateRefStateThermo() const;
81 private:
82  virtual void _updateRefStateThermo() const;
83  virtual void _updateStandardStateThermo();
84  //@}
85 
86 public:
87  /*! @name Utility Methods - Reports on various quantities
88  * The following methods are used in the process of reporting
89  * various states and attributes
90  */
91  //@{
92  virtual PDSS_enumType reportPDSSType(int index = -1) const;
93  virtual VPSSMgr_enumType reportVPSSMgrType() const;
94  //@}
95 
96  /*! @name Initialization Methods - For Internal use (VPStandardState)
97  * The following methods are used in the process of constructing
98  * the phase and setting its parameters from a specification in an
99  * input file. They are not normally used in application programs.
100  * To see how they are used, see importPhase().
101  */
102  //@{
103  virtual void initThermoXML(XML_Node& phaseNode, const std::string& id);
104  virtual PDSS* createInstallPDSS(size_t k, const XML_Node& speciesNode,
105  const XML_Node* const phaseNode_ptr);
106  //@}
107 
108  //! Initialize the internal shallow pointers in this object
109  /*!
110  * There are a bunch of internal shallow pointers that point to the owning
111  * VPStandardStateTP and MultiSpeciesThermo objects. This function reinitializes
112  * them. This function is called like an onion.
113  *
114  * @param vp_ptr Pointer to the VPStandardStateTP standard state
115  * @param sp_ptr Pointer to the MultiSpeciesThermo standard state
116  */
117  virtual void initAllPtrs(VPStandardStateTP* vp_ptr, MultiSpeciesThermo* sp_ptr);
118 private:
119  //! Shallow pointer to the water object
121 
122  //! Last reference temperature calculated
123  /*!
124  * Reference state calculations are totally separated from
125  * standard state calculations.
126  */
127  mutable doublereal m_tlastRef;
128 };
129 }
130 
131 #endif
virtual void getCp_R_ref(doublereal *cpr) const
virtual void setState_T(doublereal T)
Set the temperature (K)
virtual VPSSMgr * duplMyselfAsVPSSMgr() const
Duplication routine for objects which derive from VPSSMgr.
doublereal m_tlastRef
Last reference temperature calculated.
virtual VPSSMgr_enumType reportVPSSMgrType() const
This utility function reports the type of manager for the calculation of ss properties.
virtual void getGibbs_ref(doublereal *g) const
virtual PDSS * createInstallPDSS(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...
Virtual base class for the classes that manage the calculation of standard state properties for all t...
Definition: VPSSMgr.h:228
Declaration file for a virtual base class that manages the calculation of standard state properties f...
PDSS_Water * m_waterSS
Shallow pointer to the water object.
virtual void initAllPtrs(VPStandardStateTP *vp_ptr, MultiSpeciesThermo *sp_ptr)
Initialize the internal shallow pointers in this object.
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:97
virtual void _updateRefStateThermo() const
Updates the reference state thermodynamic functions at the current T of the solution and the referenc...
virtual void getEnthalpy_RT_ref(doublereal *hrt) 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...
VPSSMgr_enumType
enum for VPSSMgr types that are responsible for calculating the species standard state and reference-...
Definition: mix_defs.h:119
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Finalize the thermo after all species have been entered.
virtual void setState_P(doublereal P)
Set the pressure (Pa)
Class for the liquid water pressure dependent standard state.
Definition: PDSS_Water.h:49
PDSS_enumType
Types of PDSS's.
Definition: mix_defs.h:105
VPSSMgr_Water_HKFT(VPStandardStateTP *vptp_ptr, MultiSpeciesThermo *spth)
Constructor.
virtual void getEntropy_R_ref(doublereal *er) const
Manages standard state thermo properties for real water and a set of species which have the HKFT equa...
virtual void getGibbs_RT_ref(doublereal *grt) const
This is a filter class for ThermoPhase that implements some prepatory steps for efficiently handling ...
virtual PDSS_enumType reportPDSSType(int index=-1) const
This utility function reports the type of parameterization used for the species with index number ind...
virtual void updateRefStateThermo() const
Updates the internal reference state thermodynamic vectors at the current T of the solution and the r...
Virtual base class for a species with a pressure dependent standard state.
Definition: PDSS.h:176
A species thermodynamic property manager for a phase.
virtual void setState_TP(doublereal T, doublereal P)
Set the temperature (K) and pressure (Pa)
Namespace for the Cantera kernel.
Definition: application.cpp:29
virtual void _updateStandardStateThermo()
Updates the standard state thermodynamic functions at the current T and P of the solution.