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