Cantera  2.3.0
PDSS_IdealGas.h
Go to the documentation of this file.
1 /**
2  * @file PDSS_IdealGas.h
3  * Declarations for the class PDSS_IdealGas (pressure dependent standard state)
4  * which handles calculations for a single ideal gas species in a phase
5  * (see \ref pdssthermo and class \link Cantera::PDSS_IdealGas PDSS_IdealGas\endlink).
6  */
7 
8 // This file is part of Cantera. See License.txt in the top-level directory or
9 // at http://www.cantera.org/license.txt for license and copyright information.
10 
11 #ifndef CT_PDSS_IDEALGAS_H
12 #define CT_PDSS_IDEALGAS_H
13 
14 #include "PDSS.h"
15 
16 namespace Cantera
17 {
18 //! Derived class for pressure dependent standard states of an ideal gas species
19 /*!
20  * This class is for a single Ideal Gas species.
21  *
22  * @ingroup pdssthermo
23  */
25 {
26 public:
27  //! @name Constructors
28  //! @{
29 
30  //! Constructor
31  /*!
32  * @param tp Pointer to the ThermoPhase object pertaining to the phase
33  * @param spindex Species index of the species in the phase
34  */
35  PDSS_IdealGas(VPStandardStateTP* tp, int spindex);
36 
37  //! Constructor that initializes the object by examining the input file
38  //! of the ThermoPhase object
39  /*!
40  * This function calls the constructPDSSFile member function.
41  *
42  * @param tp Pointer to the ThermoPhase object pertaining to the phase
43  * @param spindex Species index of the species in the phase
44  * @param inputFile String name of the input file
45  * @param id String name of the phase in the input file. The default
46  * is the empty string, in which case the first phase in
47  * the file is used.
48  * @deprecated To be removed after Cantera 2.3.
49  */
50  PDSS_IdealGas(VPStandardStateTP* tp, int spindex,
51  const std::string& inputFile, const std::string& id = "");
52 
53  //! Constructor that initializes the object by examining the input file
54  //! of the ThermoPhase object
55  /*!
56  * This function calls the constructPDSSXML member function.
57  *
58  * @param vptp_ptr Pointer to the ThermoPhase object pertaining to the phase
59  * @param spindex Species index of the species in the phase
60  * @param speciesNode Reference to the species XML tree.
61  * @param phaseRef Reference to the XML tree containing the phase information.
62  * @param spInstalled Boolean indicating whether the species is installed yet
63  * or not.
64  */
65  PDSS_IdealGas(VPStandardStateTP* vptp_ptr, size_t spindex, const XML_Node& speciesNode,
66  const XML_Node& phaseRef, bool spInstalled);
67 
68  PDSS_IdealGas(const PDSS_IdealGas& b);
69  PDSS_IdealGas& operator=(const PDSS_IdealGas& b);
70  virtual PDSS* duplMyselfAsPDSS() const;
71 
72  //! @}
73  //! @name Molar Thermodynamic Properties of the Species Standard State in the Solution
74  //! @{
75 
76  // See PDSS.h for documentation of functions overridden from Class PDSS
77 
78  virtual doublereal enthalpy_RT() const;
79  virtual doublereal intEnergy_mole() const;
80  virtual doublereal entropy_R() const;
81  virtual doublereal gibbs_RT() const;
82  virtual doublereal cp_R() const;
83  virtual doublereal cv_mole() const;
84  virtual doublereal molarVolume() const;
85  virtual doublereal density() const;
86 
87  //! @}
88  //! @name Properties of the Reference State of the Species in the Solution
89  //! @{
90 
91  virtual doublereal gibbs_RT_ref() const;
92  virtual doublereal enthalpy_RT_ref() const;
93  virtual doublereal entropy_R_ref() const;
94  virtual doublereal cp_R_ref() const;
95  virtual doublereal molarVolume_ref() const;
96 
97  //! @}
98  //! @name Mechanical Equation of State Properties
99  //! @{
100 
101  virtual doublereal pressure() const;
102  virtual void setPressure(doublereal pres);
103  virtual void setTemperature(doublereal temp);
104  virtual doublereal temperature() const;
105  virtual void setState_TP(doublereal temp, doublereal pres);
106  virtual void setState_TR(doublereal temp, doublereal rho);
107 
108  //! @}
109  //! @name Initialization of the Object
110  //! @{
111 
112  //! Initialization of a PDSS object using an input XML file.
113  /*!
114  * This routine is a precursor to constructPDSSXML(XML_Node*)
115  * routine, which does most of the work.
116  *
117  * @param vptp_ptr Pointer to the Variable pressure ThermoPhase object
118  * @param spindex Species index within the phase
119  * @param inputFile XML file containing the description of the phase
120  * @param id Optional parameter identifying the name of the
121  * phase. If none is given, the first XML
122  * phase element will be used.
123  * @deprecated To be removed after Cantera 2.3.
124  */
125  void constructPDSSFile(VPStandardStateTP* vptp_ptr, size_t spindex,
126  const std::string& inputFile, const std::string& id);
127 
128  //!Initialization of a PDSS object using an XML tree
129  /*!
130  * This routine is a driver for the initialization of the object.
131  *
132  * basic logic:
133  * - initThermo() (cascade)
134  * - get stuff from species part of XML file
135  * - initThermoXML(phaseNode) (cascade)
136  *
137  * @param vptp_ptr Pointer to the Variable pressure ThermoPhase object
138  * @param spindex Species index within the phase
139  * @param phaseNode Reference to the phase Information for the phase
140  * that owns this species.
141  * @param id Optional parameter identifying the name of the
142  * phase. If none is given, the first XML
143  * phase element will be used.
144  */
145  void constructPDSSXML(VPStandardStateTP* vptp_ptr, size_t spindex,
146  const XML_Node& phaseNode, const std::string& id);
147 
148  virtual void initThermo();
149  //@}
150 };
151 }
152 
153 #endif
virtual doublereal gibbs_RT_ref() const
Return the molar Gibbs free energy divided by RT at reference pressure.
virtual doublereal enthalpy_RT_ref() const
Return the molar enthalpy divided by RT at reference pressure.
virtual void initThermo()
Initialization routine for all of the shallow pointers.
virtual void setTemperature(doublereal temp)
Set the internal temperature.
virtual doublereal enthalpy_RT() const
Return the standard state molar enthalpy divided by RT.
virtual doublereal molarVolume_ref() const
Return the molar volume at reference pressure.
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
virtual doublereal gibbs_RT() const
Return the molar Gibbs free energy divided by RT.
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:97
PDSS_IdealGas(VPStandardStateTP *tp, int spindex)
Constructor.
virtual doublereal cp_R_ref() const
Return the molar heat capacity divided by R at reference pressure.
virtual PDSS * duplMyselfAsPDSS() const
Duplication routine for objects which inherit from PDSS.
virtual doublereal temperature() const
Return the current stored temperature.
virtual void setPressure(doublereal pres)
Sets the pressure in the object.
virtual doublereal entropy_R() const
Return the standard state entropy divided by RT.
Declarations for the virtual base class PDSS (pressure dependent standard state) which handles calcul...
virtual doublereal pressure() const
Returns the pressure (Pa)
Base class for PDSS classes which compute nondimensional properties directly.
Definition: PDSS.h:662
virtual doublereal molarVolume() const
Return the molar volume at standard state.
virtual doublereal density() const
Return the standard state density at standard state.
virtual doublereal intEnergy_mole() const
Return the molar internal Energy in units of J kmol-1.
virtual doublereal cv_mole() const
Return the molar const volume heat capacity in units of J kmol-1 K-1.
virtual void setState_TR(doublereal temp, doublereal rho)
Set the internal temperature and density.
void constructPDSSXML(VPStandardStateTP *vptp_ptr, size_t spindex, const XML_Node &phaseNode, const std::string &id)
Initialization of a PDSS object using an XML tree.
This is a filter class for ThermoPhase that implements some prepatory steps for efficiently handling ...
void constructPDSSFile(VPStandardStateTP *vptp_ptr, size_t spindex, const std::string &inputFile, const std::string &id)
Initialization of a PDSS object using an input XML file.
Virtual base class for a species with a pressure dependent standard state.
Definition: PDSS.h:176
virtual doublereal entropy_R_ref() const
Return the molar entropy divided by R at reference pressure.
Derived class for pressure dependent standard states of an ideal gas species.
Definition: PDSS_IdealGas.h:24
Namespace for the Cantera kernel.
Definition: application.cpp:29
virtual doublereal cp_R() const
Return the molar const pressure heat capacity divided by RT.