Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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  * Copyright (2006) Sandia Corporation. Under the terms of
11  * Contract DE-AC04-94AL85000 with Sandia Corporation, the
12  * U.S. Government retains certain rights in this software.
13  */
14 
15 #ifndef CT_VPSSMGR_WATER_HKFT_H
16 #define CT_VPSSMGR_WATER_HKFT_H
17 
18 #include "VPSSMgr.h"
19 
20 namespace Cantera
21 {
22 class PDSS_Water;
23 
24 //! Manages standard state thermo properties for real water and a set of
25 //! species which have the HKFT equation of state.
27 {
28 public:
29  //! Constructor
30  /*!
31  * @param vptp_ptr Pointer to the Variable pressure ThermoPhase object
32  * This object must have already been malloced.
33  *
34  * @param spth Pointer to the optional SpeciesThermo object
35  * that will handle the calculation of the reference
36  * state thermodynamic coefficients.
37  */
39  SpeciesThermo* spth);
40 
41  //! Copy Constructor
43 
44  //! Assignment operator
46 
47  virtual VPSSMgr* duplMyselfAsVPSSMgr() const;
48 
49  /*! @name Thermodynamic Values for the Species Reference States
50  * There are also temporary variables for holding the species reference-
51  * state values of Cp, H, S, and V at the last temperature and reference
52  * pressure called. These functions are not recalculated if a new call is
53  * made using the previous temperature. All calculations are done within
54  * the routine _updateRefStateThermo().
55  */
56  //@{
57 
58  virtual void getEnthalpy_RT_ref(doublereal* hrt) const;
59  virtual void getGibbs_RT_ref(doublereal* grt) const ;
60  virtual void getGibbs_ref(doublereal* g) const ;
61  virtual void getEntropy_R_ref(doublereal* er) const ;
62  virtual void getCp_R_ref(doublereal* cpr) const ;
63  virtual void getStandardVolumes_ref(doublereal* vol) const ;
64  //@}
65 
66  virtual void setState_TP(doublereal T, doublereal P);
67  virtual void setState_T(doublereal T);
68  virtual void setState_P(doublereal P);
69 
70  /*! @name Setting the Internal State of the System
71  * All calls to change the internal state of the system's T and P
72  * are done through these routines
73  * - setState_TP()
74  * - setState_T()
75  * - setState_P()
76  *
77  * These routine in turn call the following underlying virtual functions
78  *
79  * - _updateRefStateThermo()
80  * - _updateStandardStateThermo()
81  *
82  * An important point to note is that between calls the assumption
83  * that the underlying PDSS objects will retain their set Temperatures
84  * and Pressure CAN NOT BE MADE. For efficiency reasons, we may twiddle
85  * these to get derivatives.
86  */
87  //@{
88  virtual void updateRefStateThermo() const;
89 private:
90  virtual void _updateRefStateThermo() const;
91  virtual void _updateStandardStateThermo();
92  //@}
93 
94 public:
95  /*! @name Utility Methods - Reports on various quantities
96  * The following methods are used in the process of reporting
97  * various states and attributes
98  */
99  //@{
100  virtual PDSS_enumType reportPDSSType(int index = -1) const ;
101  virtual VPSSMgr_enumType reportVPSSMgrType() const ;
102  //@}
103 
104  /*! @name Initialization Methods - For Internal use (VPStandardState)
105  * The following methods are used in the process of constructing
106  * the phase and setting its parameters from a specification in an
107  * input file. They are not normally used in application programs.
108  * To see how they are used, see importPhase().
109  */
110  //@{
111  virtual void initThermo();
112  virtual void initThermoXML(XML_Node& phaseNode, const std::string& id);
113  virtual PDSS* createInstallPDSS(size_t k, const XML_Node& speciesNode,
114  const XML_Node* const phaseNode_ptr);
115  //@}
116 
117  //! Initialize the internal shallow pointers in this object
118  /*!
119  * There are a bunch of internal shallow pointers that point to the owning
120  * VPStandardStateTP and SpeciesThermo objects. This function reinitializes
121  * them. This function is called like an onion.
122  *
123  * @param vp_ptr Pointer to the VPStandardStateTP standard state
124  * @param sp_ptr Pointer to the SpeciesThermo standard state
125  */
126  virtual void initAllPtrs(VPStandardStateTP* vp_ptr, SpeciesThermo* sp_ptr);
127 private:
128  //! Shallow pointer to the water object
130 
131  //! Last reference temperature calculated
132  /*!
133  * Reference state calculations are totally separated from
134  * standard state calculations.
135  */
136  mutable doublereal m_tlastRef;
137 };
138 }
139 
140 #endif
virtual void setState_T(doublereal T)
Set the temperature (K)
doublereal m_tlastRef
Last reference temperature calculated.
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...
VPSSMgr_Water_HKFT(VPStandardStateTP *vptp_ptr, SpeciesThermo *spth)
Constructor.
Virtual base class for the classes that manage the calculation of standard state properties for all t...
Definition: VPSSMgr.h:235
Declaration file for a virtual base class that manages the calculation of standard state properties f...
virtual void getEntropy_R_ref(doublereal *er) const
virtual void getGibbs_RT_ref(doublereal *grt) const
PDSS_Water * m_waterSS
Shallow pointer to the water object.
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:100
virtual VPSSMgr * duplMyselfAsVPSSMgr() const
Duplication routine for objects which derive from VPSSMgr.
virtual void initAllPtrs(VPStandardStateTP *vp_ptr, SpeciesThermo *sp_ptr)
Initialize the internal shallow pointers in this object.
Pure Virtual base class for the species thermo manager classes.
VPSSMgr_enumType
enum for VPSSMgr types that are responsible for calculating the species standard state and reference-...
Definition: mix_defs.h:135
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)
virtual void getCp_R_ref(doublereal *cpr) const
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
Class for the liquid water pressure dependent standard state.
Definition: PDSS_Water.h:51
PDSS_enumType
Types of PDSS's.
Definition: mix_defs.h:121
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...
Manages standard state thermo properties for real water and a set of species which have the HKFT equa...
virtual void getGibbs_ref(doublereal *g) 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 VPSSMgr_enumType reportVPSSMgrType() const
This utility function reports the type of manager for the calculation of ss properties.
VPSSMgr_Water_HKFT & operator=(const VPSSMgr_Water_HKFT &right)
Assignment operator.
virtual void _updateRefStateThermo() const
Updates the reference state thermodynamic functions at the current T of the solution and the referenc...
Virtual base class for a species with a pressure dependent standard state.
Definition: PDSS.h:193
virtual void updateRefStateThermo() const
Updates the internal reference state thermodynamic vectors at the current T of the solution and the r...
virtual void setState_TP(doublereal T, doublereal P)
Set the temperature (K) and pressure (Pa)
virtual void _updateStandardStateThermo()
Updates the standard state thermodynamic functions at the current T and P of the solution.