Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDSS.h
Go to the documentation of this file.
1 /**
2  * @file PDSS.h
3  * Declarations for the virtual base class PDSS (pressure dependent standard state)
4  * which handles calculations for a single species in a phase
5  * (see \ref pdssthermo and class \link Cantera::PDSS PDSS\endlink).
6  */
7 /*
8  * Copyright (2006) Sandia Corporation. Under the terms of
9  * Contract DE-AC04-94AL85000 with Sandia Corporation, the
10  * U.S. Government retains certain rights in this software.
11  */
12 #ifndef CT_PDSS_H
13 #define CT_PDSS_H
14 #include "cantera/base/ct_defs.h"
15 #include "mix_defs.h"
16 
17 namespace Cantera
18 {
19 /**
20  * @defgroup pdssthermo Species Standard-State Thermodynamic Properties
21  *
22  * In this module we describe %Cantera's treatment of
23  * pressure dependent standard states
24  * (PDSS) objects. These are objects that calculate the standard
25  * state of a single species that depends on both temperature
26  * and pressure.
27  *
28  * To compute the thermodynamic properties of multicomponent
29  * solutions, it is necessary to know something about the
30  * thermodynamic properties of the individual species present in
31  * the solution. Exactly what sort of species properties are
32  * required depends on the thermodynamic model for the
33  * solution. For a gaseous solution (i.e., a gas mixture), the
34  * species properties required are usually ideal gas properties at
35  * the mixture temperature and at a reference pressure (almost always at
36  * 1 bar). For other types of solutions, however, it may
37  * not be possible to isolate the species in a "pure" state. For
38  * example, the thermodynamic properties of, say, Na+ and Cl- in
39  * saltwater are not easily determined from data on the properties
40  * of solid NaCl, or solid Na metal, or chlorine gas. In this
41  * case, the solvation in water is fundamental to the identity of
42  * the species, and some other reference state must be used. One
43  * common convention for liquid solutions is to use thermodynamic
44  * data for the solutes in the limit of infinite dilution within the
45  * pure solvent; another convention is to reference all properties
46  * to unit molality.
47  *
48  * In defining these standard states for species in a phase, we make
49  * the following definition. A reference state is a standard state
50  * of a species in a phase limited to one particular pressure, the reference
51  * pressure. The reference state specifies the dependence of all
52  * thermodynamic functions as a function of the temperature, in
53  * between a minimum temperature and a maximum temperature. The
54  * reference state also specifies the molar volume of the species
55  * as a function of temperature. The molar volume is a thermodynamic
56  * function.
57  * A full standard state does the same thing as a reference state,
58  * but specifies the thermodynamics functions at all pressures.
59  *
60  * Class PDSS is the base class
61  * for a family of classes that compute properties of a single
62  * species in a phase at its standard states, for a range of temperatures
63  * and pressures.
64  *
65  * Phases which use the VPSSMGr class must have their respective
66  * ThermoPhase objects actually be derivatives of the VPStandardState
67  * class. These classes assume that there exists a standard state
68  * for each species in the phase, where the Thermodynamic functions are specified
69  * as a function of temperature and pressure. Standard state objects for each
70  * species in the phase are all derived from the PDSS virtual base class.
71  *
72  * The following classes inherit from PDSS. Each of these classes
73  * handles just one species.
74  *
75  * - PDSS_IdealGas
76  * - standardState model = "IdealGas"
77  * - This model assumes that the species in the phase obeys the
78  * ideal gas law for their pressure dependence. The manager
79  * uses a SimpleThermo object to handle the calculation of the
80  * reference state. This object adds the pressure dependencies
81  * to the thermo functions.
82  *
83  * - PDSS_ConstVol
84  * - standardState model = "ConstVol"
85  * - This model assumes that the species in the phase obeys the
86  * constant partial molar volume pressure dependence.
87  * The manager uses a SimpleThermo object to handle the
88  * calculation of the reference state. This object adds the
89  * pressure dependencies to these thermo functions.
90  *
91  * - PDSS_SSVol
92  * - standardState model = "constant_incompressible" || model == "constant"
93  * - standardState model = "temperature_polynomial"
94  * - standardState model = "density_temperature_polynomial"
95  * - This model assumes that the species in the phase obey a
96  * fairly general equation of state, but one that separates out
97  * the calculation of the standard state density and/or volume.
98  * Models include a cubic polynomial in temperature for either
99  * the standard state volume or the standard state density.
100  * The manager uses a SimpleThermo object to handle the
101  * calculation of the reference state. This object then adds the
102  * pressure dependencies and the volume terms to these thermo functions
103  * to complete the representation.
104  *
105  * - PDSS_Water
106  * - standardState model = "Water"
107  * - This model assumes that
108  * Species 0 is assumed to be water, and a real equation
109  * of state is used to model the T, P behavior.
110  * Note, the model assumes that the species is liquid water,
111  * and not steam.
112  *
113  * - PDSS_HKFT
114  * - standardState model = "HKFT"
115  * - This model assumes that the species follows the
116  * HKFT pressure dependent equation of state
117  *
118  * The choice of which VPSSMGr object to be used is either implicitly made by
119  * Cantera by querying the XML data file for compatibility or it may
120  * be explicitly requested in the XML file.
121  *
122  * Normally the PDSS object is not called directly. Instead the VPSSMgr
123  * object manages the calls to the PDSS object for the entire set of species
124  * that comprise a phase. Additionally, sometimes the VPSSMgr object will not
125  * call the PDSS object at all to calculate thermodynamic properties, instead
126  * relying on its own determination/knowledge for how to calculate thermo
127  * quantities quickly given what it knows about the PDSS objects under its
128  * control.
129  *
130  * The PDSS objects may or may not utilize the SpeciesThermo reference state
131  * manager class to calculate the reference state thermodynamics functions in
132  * its own calculation. There are some classes, such as PDSS_IdealGas and
133  * PDSS+_ConstVol, which utilize the SpeciesThermo object because the
134  * calculation is very similar to the reference state calculation, while
135  * there are other classes, PDSS_Water and PDSS_HKFT, which don't utilize the
136  * reference state calculation at all, because it wouldn't make sense to. For
137  * example, using the PDSS_Water module, there isn't anything special about
138  * the reference pressure of 1 bar, so the reference state calculation would
139  * represent a duplication of work. Additionally, when evaluating
140  * thermodynamic properties at higher pressures and temperatures, near the
141  * critical point, evaluation of the thermodynamics at a pressure of 1 bar
142  * may lead to situations where the liquid is unstable, i.e., beyond the
143  * spinodal curve leading to potentially wrong evaluation results.
144  *
145  * For cases where the PDSS object doesn't use the SpeciesThermo object, a
146  * dummy SpeciesThermoInterpType object is actually installed into the
147  * SpeciesThermo object for that species. This dummy SpeciesThermoInterpType
148  * object is called a STITbyPDSS object. This object satisfies calls to
149  * SpeciesThermo member functions by actually calling the PDSS object at the
150  * reference pressure.
151  *
152  * @ingroup thermoprops
153  */
154 
155 class XML_Node;
156 class SpeciesThermo;
157 class VPStandardStateTP;
158 class VPSSMgr;
159 
160 //! Virtual base class for a species with a pressure dependent
161 //! standard state
162 /*!
163  * Virtual base class for calculation of the
164  * pressure dependent standard state for a single species
165  *
166  * Class PDSS is the base class for a family of classes that compute
167  * properties of a set of species in their standard states at a range of
168  * temperatures and pressures. The independent variables for this object are
169  * temperature and pressure. The class may have a reference to a SpeciesThermo
170  * object which handles the calculation of the reference state temperature
171  * behavior of a subset of species.
172  *
173  * This class is analogous to the SpeciesThermoInterpType class, except that
174  * the standard state inherently incorporates the pressure dependence.
175  *
176  * The class operates on a setState temperature and pressure basis.
177  * It only recalculates the standard state when the setState functions
178  * for temperature and pressure are called.
179  *
180  * <H3> Thread Safety </H3>
181  *
182  * These classes are designed such that they are not thread safe when called
183  * by themselves. The reason for this is that they sometimes use shared
184  * SpeciesThermo resources where they set the states. This condition may be
185  * remedied in the future if we get serious about employing multithreaded
186  * capabilities by adding mutex locks to the SpeciesThermo resources.
187  *
188  * However, in many other respects they can be thread safe. They use separate
189  * memory and hold intermediate data.
190  *
191  * @ingroup pdssthermo
192  */
193 class PDSS
194 {
195 public:
196  //! @name Constructors
197  //! @{
198 
199  //! Empty Constructor
200  PDSS();
201 
202  //! Constructor that initializes the object by examining the XML entries
203  //! from the ThermoPhase object
204  /*!
205  * This function calls the constructPDSS member function.
206  *
207  * @param tp Pointer to the ThermoPhase object pertaining to the phase
208  * @param spindex Species index of the species in the phase
209  */
210  PDSS(VPStandardStateTP* tp, size_t spindex);
211 
212  //! Copy Constructor
213  /*!
214  * @param b object to be copied
215  */
216  PDSS(const PDSS& b);
217 
218  //! Assignment operator
219  /*!
220  * @param b Object to be copied
221  */
222  PDSS& operator=(const PDSS& b);
223 
224  //! Destructor for the phase
225  virtual ~PDSS() {}
226 
227  //! Duplication routine for objects which inherit from PDSS
228  /*!
229  * This function can be used to duplicate objects derived from PDSS even
230  * if the application only has a pointer to PDSS to work with.
231  *
232  * @return A pointer to the base PDSS object type
233  */
234  virtual PDSS* duplMyselfAsPDSS() const;
235 
236  //! @}
237  //! @name Utilities
238  //! @{
239 
240  //! Returns the type of the standard state parameterization
241  /*!
242  * @return The integer # of the parameterization
243  */
245 
246  //! @}
247  //! @name Molar Thermodynamic Properties of the Species Standard State in the Solution
248  //! @{
249 
250  //! Return the molar enthalpy in units of J kmol-1
251  /*!
252  * @return the species standard state enthalpy in J kmol-1 at the current
253  * temperature and pressure.
254  */
255  virtual doublereal enthalpy_mole() const;
256 
257  //! Return the standard state molar enthalpy divided by RT
258  /*!
259  * @return The dimensionless species standard state enthalpy divided at
260  * the current temperature and pressure.
261  */
262  virtual doublereal enthalpy_RT() const;
263 
264  //! Return the molar internal Energy in units of J kmol-1
265  /*!
266  * @return The species standard state internal Energy in J kmol-1 at the
267  * current temperature and pressure.
268  */
269  virtual doublereal intEnergy_mole() const;
270 
271  //! Return the molar entropy in units of J kmol-1 K-1
272  /*!
273  * @return The species standard state entropy in J kmol-1 K-1 at the
274  * current temperature and pressure.
275  */
276  virtual doublereal entropy_mole() const;
277 
278  //! Return the standard state entropy divided by RT
279  /*!
280  * @return The species standard state entropy divided by RT at the current
281  * temperature and pressure.
282  */
283  virtual doublereal entropy_R() const;
284 
285  //! Return the molar Gibbs free energy in units of J kmol-1
286  /*!
287  * @return The species standard state Gibbs free energy in J kmol-1 at the
288  * current temperature and pressure.
289  */
290  virtual doublereal gibbs_mole() const;
291 
292  //! Return the molar Gibbs free energy divided by RT
293  /*!
294  * @return The species standard state Gibbs free energy divided by RT at
295  * the current temperature and pressure.
296  */
297  virtual doublereal gibbs_RT() const;
298 
299  //! Return the molar const pressure heat capacity in units of J kmol-1 K-1
300  /*!
301  * @return The species standard state Cp in J kmol-1 K-1 at the current
302  * temperature and pressure.
303  */
304  virtual doublereal cp_mole() const;
305 
306  //! Return the molar const pressure heat capacity divided by RT
307  /*!
308  * @return The species standard state Cp divided by RT at the current
309  * temperature and pressure.
310  */
311  virtual doublereal cp_R() const;
312 
313  //! Return the molar const volume heat capacity in units of J kmol-1 K-1
314  /*!
315  * @return The species standard state Cv in J kmol-1 K-1 at the
316  * current temperature and pressure.
317  */
318  virtual doublereal cv_mole() const;
319 
320  //! Return the molar volume at standard state
321  /*!
322  * @return The standard state molar volume at the current temperature and
323  * pressure. Units are m**3 kmol-1.
324  */
325  virtual doublereal molarVolume() const;
326 
327  //! Return the standard state density at standard state
328  /*!
329  * @return The standard state density at the current temperature and
330  * pressure. units are kg m-3
331  */
332  virtual doublereal density() const;
333 
334  //! Get the difference in the standard state enthalpy
335  //! between the current pressure and the reference pressure, p0.
336  virtual doublereal enthalpyDelp_mole() const;
337 
338  //! Get the difference in the standard state entropy between
339  //! the current pressure and the reference pressure, p0
340  virtual doublereal entropyDelp_mole() const;
341 
342  //! Get the difference in the standard state Gibbs free energy
343  //! between the current pressure and the reference pressure, p0.
344  virtual doublereal gibbsDelp_mole() const;
345 
346  //! Get the difference in standard state heat capacity
347  //! between the current pressure and the reference pressure, p0.
348  virtual doublereal cpDelp_mole() const;
349 
350  //! @}
351  //! @name Properties of the Reference State of the Species in the Solution
352  //! @{
353 
354  //! Return the reference pressure for this phase.
355  doublereal refPressure() const {
356  return m_p0;
357  }
358 
359  //! return the minimum temperature
360  doublereal minTemp() const {
361  return m_minTemp;
362  }
363 
364  //! return the minimum temperature
365  doublereal maxTemp() const {
366  return m_maxTemp;
367  }
368 
369  //! Return the molar Gibbs free energy divided by RT at reference pressure
370  /*!
371  * @return The reference state Gibbs free energy at the current
372  * temperature, divided by RT.
373  */
374  virtual doublereal gibbs_RT_ref() const;
375 
376  //! Return the molar enthalpy divided by RT at reference pressure
377  /*!
378  * @return The species reference state enthalpy at the current
379  * temperature, divided by RT.
380  */
381  virtual doublereal enthalpy_RT_ref() const;
382 
383  //! Return the molar entropy divided by R at reference pressure
384  /*!
385  * @return The species reference state entropy at the current
386  * temperature, divided by R.
387  */
388  virtual doublereal entropy_R_ref() const;
389 
390  //! Return the molar heat capacity divided by R at reference pressure
391  /*!
392  * @return The species reference state heat capacity divided by R at the
393  * current temperature.
394  */
395  virtual doublereal cp_R_ref() const;
396 
397  //! Return the molar volume at reference pressure
398  /*!
399  * @return The reference state molar volume. units are m**3 kmol-1.
400  */
401  virtual doublereal molarVolume_ref() const;
402 
403  //! @}
404  //! @name Mechanical Equation of State Properties
405  //! @{
406 
407  //! Returns the pressure (Pa)
408  virtual doublereal pressure() const;
409 
410  //! Sets the pressure in the object
411  /*!
412  * Currently, this sets the pressure in the PDSS object.
413  * It is indeterminant what happens to the owning VPStandardStateTP
414  * object and to the VPSSMgr object.
415  *
416  * @param pres Pressure to be set (Pascal)
417  */
418  virtual void setPressure(doublereal pres);
419 
420  //! Return the volumetric thermal expansion coefficient. Units: 1/K.
421  /*!
422  * The thermal expansion coefficient is defined as
423  * \f[
424  * \beta = \frac{1}{v}\left(\frac{\partial v}{\partial T}\right)_P
425  * \f]
426  */
427  virtual doublereal thermalExpansionCoeff() const;
428 
429  //@}
430  /// @name Partial Molar Properties of the Solution
431  //@{
432 
433  //! Set the internal temperature
434  /*!
435  * @param temp Temperature (Kelvin)
436  */
437  virtual void setTemperature(doublereal temp);
438 
439  //! Return the current stored temperature
440  virtual doublereal temperature() const;
441 
442  //! Set the internal temperature and pressure
443  /*!
444  * @param temp Temperature (Kelvin)
445  * @param pres pressure (Pascals)
446  */
447  virtual void setState_TP(doublereal temp, doublereal pres);
448 
449  //! Set the internal temperature and density
450  /*!
451  * @param temp Temperature (Kelvin)
452  * @param rho Density (kg m-3)
453  */
454  virtual void setState_TR(doublereal temp, doublereal rho);
455 
456  //! @}
457  //! @name Miscellaneous properties of the standard state
458  //! @{
459 
460  //! critical temperature
461  virtual doublereal critTemperature() const;
462 
463  //! critical pressure
464  virtual doublereal critPressure() const;
465 
466  //! critical density
467  virtual doublereal critDensity() const;
468 
469  //! saturation pressure
470  /*!
471  * @param T Temperature (Kelvin)
472  */
473  virtual doublereal satPressure(doublereal T);
474 
475  //! Return the molecular weight of the species
476  //! in units of kg kmol-1
477  doublereal molecularWeight() const;
478 
479  //! Set the molecular weight of the species
480  /*!
481  * @param mw Molecular Weight in kg kmol-1
482  */
483  void setMolecularWeight(doublereal mw);
484 
485  //! @}
486  //! @name Initialization of the Object
487  //! @{
488 
489  //! Initialization routine for all of the shallow pointers
490  /*!
491  * This is a cascading call, where each level should call the
492  * the parent level.
493  *
494  * The initThermo() routines get called before the initThermoXML() routines
495  * from the constructPDSSXML() routine.
496  *
497  * Calls initPtrs();
498  */
499  virtual void initThermo();
500 
501  //! Initialization routine for the PDSS object based on the phaseNode
502  /*!
503  * This is a cascading call, where each level should call the
504  * the parent level.
505  *
506  * @param phaseNode Reference to the phase Information for the phase
507  * that owns this species.
508  *
509  * @param id Optional parameter identifying the name of the
510  * phase. If none is given, the first XML
511  * phase element will be used.
512  */
513  virtual void initThermoXML(const XML_Node& phaseNode, const std::string& id);
514 
515  //! This utility function reports back the type of parameterization and
516  //! all of the parameters for the species, index.
517  /*!
518  * @param kindex Species index
519  * @param type Integer type of the standard type
520  * @param c Vector of coefficients used to set the
521  * parameters for the standard state.
522  * @param minTemp output - Minimum temperature
523  * @param maxTemp output - Maximum temperature
524  * @param refPressure output - reference pressure (Pa).
525  */
526  virtual void reportParams(size_t& kindex, int& type, doublereal* const c,
527  doublereal& minTemp, doublereal& maxTemp,
528  doublereal& refPressure) const;
529 
530 private:
531  //! Initialize all of the internal shallow pointers that can be initialized
532  /*!
533  * This routine isn't virtual. It's only applicable for the current class
534  */
535  void initPtrs();
536 
537 public:
538  //! Initialize or Reinitialize all shallow pointers in the object
539  /*!
540  * This command is called to reinitialize all shallow pointers in the
541  * object. It's needed for the duplicator capability
542  *
543  * @param vptp_ptr Pointer to the Variable pressure ThermoPhase object
544  * This object must have already been malloced.
545  *
546  * @param vpssmgr_ptr Pointer to the variable pressure standard state
547  * calculator for this phase
548  *
549  * @param spthermo_ptr Pointer to the optional SpeciesThermo object
550  * that will handle the calculation of the reference
551  * state thermodynamic coefficients.
552  */
553  virtual void initAllPtrs(VPStandardStateTP* vptp_ptr, VPSSMgr* vpssmgr_ptr,
554  SpeciesThermo* spthermo_ptr);
555  //@}
556 
557 protected:
558  //! Enumerated type describing the type of the PDSS object
560 
561  //! Current temperature used by the PDSS object
562  mutable doublereal m_temp;
563 
564  //! State of the system - pressure
565  mutable doublereal m_pres;
566 
567  //! Reference state pressure of the species.
568  doublereal m_p0;
569 
570  //! Minimum temperature
571  doublereal m_minTemp;
572 
573  //! Maximum temperature
574  doublereal m_maxTemp;
575 
576  //! ThermoPhase which this species belongs to.
577  /*!
578  * Note, in some
579  * applications (i.e., mostly testing applications, this may be a null
580  * value. Applications should test whether this is null before usage.
581  */
583 
584  //! Pointer to the VPSS manager for this object
586 
587  /**
588  * Molecular Weight of the species
589  */
590  doublereal m_mw;
591 
592  /**
593  * Species index in the ThermoPhase corresponding to this species.
594  */
595  size_t m_spindex;
596 
597  //! Pointer to the species thermodynamic property manager.
598  /*!
599  * This is a copy of the pointer in the ThermoPhase object. Note, this
600  * object doesn't own the pointer. If the SpeciesThermo ThermoPhase object
601  * doesn't know or doesn't control the calculation, this will be set to
602  * zero.
603  */
605 
606  //! Reference state enthalpy divided by RT.
607  /*!
608  * Storage for the thermo properties is provided by VPSSMgr. This object
609  * owns a shallow pointer. Calculated at the current value of T and m_p0
610  */
611  doublereal* m_h0_RT_ptr;
612 
613  //! Reference state heat capacity divided by R.
614  /*!
615  * Storage for the thermo properties is provided by VPSSMgr. Calculated
616  * at the current value of T and m_p0
617  */
618  doublereal* m_cp0_R_ptr;
619 
620  //! Reference state entropy divided by R.
621  /*!
622  * Storage for the thermo properties is provided by VPSSMgr. Calculated
623  * at the current value of T and m_p0
624  */
625  doublereal* m_s0_R_ptr;
626 
627  //! Reference state Gibbs free energy divided by RT.
628  /*!
629  * Calculated at the current value of T and m_p0
630  */
631  doublereal* m_g0_RT_ptr;
632 
633  //! Reference state molar volume (m3 kg-1)
634  /*!
635  * Storage for the thermo properties is provided by VPSSMgr. Calculated
636  * at the current value of T and m_p0
637  */
638  doublereal* m_V0_ptr;
639 
640  //! Standard state enthalpy divided by RT.
641  /*!
642  * Storage for the thermo properties is provided by VPSSMgr. Calculated
643  * at the current value of T and P.
644  */
645  doublereal* m_hss_RT_ptr;
646 
647  //! Standard state heat capacity divided by R.
648  /*!
649  * Storage for the thermo properties is provided by VPSSMgr. Calculated
650  * at the current value of T and P.
651  */
652  doublereal* m_cpss_R_ptr;
653 
654  //! Standard state entropy divided by R.
655  /*!
656  * Storage for the thermo properties is provided by VPSSMgr. Calculated
657  * at the current value of T and P.
658  */
659  doublereal* m_sss_R_ptr;
660 
661  //! Standard state Gibbs free energy divided by RT.
662  /*!
663  * Storage for the thermo properties is provided by VPSSMgr. Calculated
664  * at the current value of T and P.
665  */
666  doublereal* m_gss_RT_ptr;
667 
668  //! Standard State molar volume (m3 kg-1)
669  /*!
670  * Storage for the thermo properties is provided by VPSSMgr. Calculated
671  * at the current value of T and P.
672  */
673  doublereal* m_Vss_ptr;
674 };
675 
676 //! Base class for PDSS classes which compute molar properties directly
677 class PDSS_Molar : public virtual PDSS
678 {
679 public:
680  virtual doublereal enthalpy_RT() const;
681  virtual doublereal entropy_R() const;
682  virtual doublereal gibbs_RT() const;
683  virtual doublereal cp_R() const;
684 };
685 
686 //! Base class for PDSS classes which compute nondimensional properties directly
687 class PDSS_Nondimensional : public virtual PDSS
688 {
689 public:
690  virtual doublereal enthalpy_mole() const;
691  virtual doublereal entropy_mole() const;
692  virtual doublereal gibbs_mole() const;
693  virtual doublereal cp_mole() const;
694 };
695 
696 }
697 
698 #endif
virtual doublereal cpDelp_mole() const
Get the difference in standard state heat capacity between the current pressure and the reference pre...
Definition: PDSS.cpp:308
virtual doublereal gibbs_RT() const
Return the molar Gibbs free energy divided by RT.
Definition: PDSS.cpp:237
virtual doublereal cv_mole() const
Return the molar const volume heat capacity in units of J kmol-1 K-1.
Definition: PDSS.cpp:262
virtual doublereal entropy_mole() const
Return the molar entropy in units of J kmol-1 K-1.
Definition: PDSS.cpp:419
void initPtrs()
Initialize all of the internal shallow pointers that can be initialized.
Definition: PDSS.cpp:191
virtual doublereal critPressure() const
critical pressure
Definition: PDSS.cpp:328
SpeciesThermo * m_spthermo
Pointer to the species thermodynamic property manager.
Definition: PDSS.h:604
virtual doublereal cp_R_ref() const
Return the molar heat capacity divided by R at reference pressure.
Definition: PDSS.cpp:282
doublereal maxTemp() const
return the minimum temperature
Definition: PDSS.h:365
doublereal * m_cpss_R_ptr
Standard state heat capacity divided by R.
Definition: PDSS.h:652
Virtual base class for the classes that manage the calculation of standard state properties for all t...
Definition: VPSSMgr.h:235
virtual doublereal intEnergy_mole() const
Return the molar internal Energy in units of J kmol-1.
Definition: PDSS.cpp:217
virtual void initThermoXML(const XML_Node &phaseNode, const std::string &id)
Initialization routine for the PDSS object based on the phaseNode.
Definition: PDSS.cpp:165
virtual void setPressure(doublereal pres)
Sets the pressure in the object.
Definition: PDSS.cpp:338
doublereal * m_h0_RT_ptr
Reference state enthalpy divided by RT.
Definition: PDSS.h:611
virtual doublereal satPressure(doublereal T)
saturation pressure
Definition: PDSS.cpp:372
virtual doublereal enthalpy_RT() const
Return the standard state molar enthalpy divided by RT.
Definition: PDSS.cpp:212
doublereal m_pres
State of the system - pressure.
Definition: PDSS.h:565
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:100
This file contains definitions of terms that are used in internal routines and are unlikely to need m...
virtual doublereal thermalExpansionCoeff() const
Return the volumetric thermal expansion coefficient. Units: 1/K.
Definition: PDSS.cpp:318
VPSSMgr * m_vpssmgr_ptr
Pointer to the VPSS manager for this object.
Definition: PDSS.h:585
virtual void initAllPtrs(VPStandardStateTP *vptp_ptr, VPSSMgr *vpssmgr_ptr, SpeciesThermo *spthermo_ptr)
Initialize or Reinitialize all shallow pointers in the object.
Definition: PDSS.cpp:182
virtual doublereal gibbs_RT_ref() const
Return the molar Gibbs free energy divided by RT at reference pressure.
Definition: PDSS.cpp:267
size_t m_spindex
Species index in the ThermoPhase corresponding to this species.
Definition: PDSS.h:595
doublereal refPressure() const
Return the reference pressure for this phase.
Definition: PDSS.h:355
virtual doublereal temperature() const
Return the current stored temperature.
Definition: PDSS.cpp:343
doublereal minTemp() const
return the minimum temperature
Definition: PDSS.h:360
void setMolecularWeight(doublereal mw)
Set the molecular weight of the species.
Definition: PDSS.cpp:357
doublereal * m_gss_RT_ptr
Standard state Gibbs free energy divided by RT.
Definition: PDSS.h:666
PDSS_enumType m_pdssType
Enumerated type describing the type of the PDSS object.
Definition: PDSS.h:559
virtual doublereal enthalpyDelp_mole() const
Get the difference in the standard state enthalpy between the current pressure and the reference pres...
Definition: PDSS.cpp:292
Pure Virtual base class for the species thermo manager classes.
doublereal * m_sss_R_ptr
Standard state entropy divided by R.
Definition: PDSS.h:659
Base class for PDSS classes which compute molar properties directly.
Definition: PDSS.h:677
virtual doublereal gibbs_mole() const
Return the molar Gibbs free energy in units of J kmol-1.
Definition: PDSS.cpp:232
virtual PDSS * duplMyselfAsPDSS() const
Duplication routine for objects which inherit from PDSS.
Definition: PDSS.cpp:155
virtual doublereal entropy_R() const
Return the standard state entropy divided by RT.
Definition: PDSS.cpp:227
virtual void initThermo()
Initialization routine for all of the shallow pointers.
Definition: PDSS.cpp:173
virtual doublereal critTemperature() const
critical temperature
Definition: PDSS.cpp:323
virtual doublereal entropy_mole() const
Return the molar entropy in units of J kmol-1 K-1.
Definition: PDSS.cpp:222
virtual void setTemperature(doublereal temp)
Set the internal temperature.
Definition: PDSS.cpp:348
Base class for PDSS classes which compute nondimensional properties directly.
Definition: PDSS.h:687
PDSS_enumType
Types of PDSS's.
Definition: mix_defs.h:121
virtual doublereal pressure() const
Returns the pressure (Pa)
Definition: PDSS.cpp:313
virtual doublereal enthalpy_mole() const
Return the molar enthalpy in units of J kmol-1.
Definition: PDSS.cpp:207
virtual doublereal enthalpy_mole() const
Return the molar enthalpy in units of J kmol-1.
Definition: PDSS.cpp:414
doublereal * m_s0_R_ptr
Reference state entropy divided by R.
Definition: PDSS.h:625
virtual doublereal entropyDelp_mole() const
Get the difference in the standard state entropy between the current pressure and the reference press...
Definition: PDSS.cpp:297
virtual doublereal cp_R() const
Return the molar const pressure heat capacity divided by RT.
Definition: PDSS.cpp:407
This is a filter class for ThermoPhase that implements some prepatory steps for efficiently handling ...
virtual ~PDSS()
Destructor for the phase.
Definition: PDSS.h:225
virtual doublereal density() const
Return the standard state density at standard state.
Definition: PDSS.cpp:257
doublereal m_maxTemp
Maximum temperature.
Definition: PDSS.h:574
virtual doublereal enthalpy_RT() const
Return the standard state molar enthalpy divided by RT.
Definition: PDSS.cpp:392
doublereal m_minTemp
Minimum temperature.
Definition: PDSS.h:571
doublereal * m_hss_RT_ptr
Standard state enthalpy divided by RT.
Definition: PDSS.h:645
virtual void setState_TR(doublereal temp, doublereal rho)
Set the internal temperature and density.
Definition: PDSS.cpp:367
virtual doublereal critDensity() const
critical density
Definition: PDSS.cpp:333
virtual doublereal cp_mole() const
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
Definition: PDSS.cpp:242
virtual doublereal cp_mole() const
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
Definition: PDSS.cpp:429
virtual void reportParams(size_t &kindex, int &type, doublereal *const c, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure) const
This utility function reports back the type of parameterization and all of the parameters for the spe...
Definition: PDSS.cpp:377
virtual doublereal cp_R() const
Return the molar const pressure heat capacity divided by RT.
Definition: PDSS.cpp:247
virtual doublereal molarVolume() const
Return the molar volume at standard state.
Definition: PDSS.cpp:252
Virtual base class for a species with a pressure dependent standard state.
Definition: PDSS.h:193
PDSS()
Empty Constructor.
Definition: PDSS.cpp:18
doublereal molecularWeight() const
Return the molecular weight of the species in units of kg kmol-1.
Definition: PDSS.cpp:353
VPStandardStateTP * m_tp
ThermoPhase which this species belongs to.
Definition: PDSS.h:582
doublereal m_temp
Current temperature used by the PDSS object.
Definition: PDSS.h:562
virtual doublereal entropy_R_ref() const
Return the molar entropy divided by R at reference pressure.
Definition: PDSS.cpp:277
PDSS & operator=(const PDSS &b)
Assignment operator.
Definition: PDSS.cpp:104
doublereal * m_g0_RT_ptr
Reference state Gibbs free energy divided by RT.
Definition: PDSS.h:631
virtual doublereal gibbs_mole() const
Return the molar Gibbs free energy in units of J kmol-1.
Definition: PDSS.cpp:424
doublereal * m_cp0_R_ptr
Reference state heat capacity divided by R.
Definition: PDSS.h:618
virtual doublereal gibbsDelp_mole() const
Get the difference in the standard state Gibbs free energy between the current pressure and the refer...
Definition: PDSS.cpp:303
doublereal * m_Vss_ptr
Standard State molar volume (m3 kg-1)
Definition: PDSS.h:673
doublereal * m_V0_ptr
Reference state molar volume (m3 kg-1)
Definition: PDSS.h:638
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
Definition: PDSS.cpp:362
PDSS_enumType reportPDSSType() const
Returns the type of the standard state parameterization.
Definition: PDSS.cpp:160
doublereal m_p0
Reference state pressure of the species.
Definition: PDSS.h:568
virtual doublereal molarVolume_ref() const
Return the molar volume at reference pressure.
Definition: PDSS.cpp:287
virtual doublereal gibbs_RT() const
Return the molar Gibbs free energy divided by RT.
Definition: PDSS.cpp:402
doublereal m_mw
Molecular Weight of the species.
Definition: PDSS.h:590
virtual doublereal enthalpy_RT_ref() const
Return the molar enthalpy divided by RT at reference pressure.
Definition: PDSS.cpp:272
virtual doublereal entropy_R() const
Return the standard state entropy divided by RT.
Definition: PDSS.cpp:397