Cantera  2.1.2
VPSSMgr.cpp
Go to the documentation of this file.
1 /**
2  * @file VPSSMgr.cpp
3  * Definition file for a virtual base class that manages
4  * the calculation of standard state properties for all of the
5  * species in a single phase, assuming a variable P and T standard state
6  * (see \ref mgrpdssthermocalc and
7  * class \link Cantera::VPSSMgr VPSSMgr\endlink).
8  */
9 /*
10  * Copyright (2005) 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 #include "cantera/thermo/VPSSMgr.h"
18 #include "cantera/thermo/PDSS.h"
20 
21 using namespace std;
22 
23 namespace Cantera
24 {
25 class SpeciesThermo;
26 
27 VPSSMgr::VPSSMgr(VPStandardStateTP* vptp_ptr, SpeciesThermo* spthermo) :
28  m_kk(0),
29  m_vptp_ptr(vptp_ptr),
30  m_spthermo(spthermo),
31  m_tlast(-1.0),
32  m_plast(-1.0),
33  m_p0(-1.0),
34  m_minTemp(-1.0),
35  m_maxTemp(1.0E8),
36  m_useTmpRefStateStorage(false),
37  m_useTmpStandardStateStorage(false)
38 {
39  if (!m_vptp_ptr) {
40  throw CanteraError("VPSSMgr",
41  "null pointer for VPStandardStateTP is not permissible");
42  }
43 }
44 
46 {
47 }
48 
49 VPSSMgr::VPSSMgr(const VPSSMgr& right) :
50  m_kk(0),
51  m_vptp_ptr(0),
52  m_spthermo(0),
53  // m_Tnow(300.),
54  // m_Pnow(OneAtm),
55  m_tlast(-1.0),
56  m_plast(-1.0),
57  m_p0(-1.0),
58  m_minTemp(-1.0),
59  m_maxTemp(1.0E8),
60  m_useTmpRefStateStorage(false),
61  m_useTmpStandardStateStorage(false)
62 {
63  *this = right;
64 }
65 
66 VPSSMgr&
68 {
69  if (&right == this) {
70  return *this;
71  }
72  m_kk = right.m_kk;
73  /*
74  * What we are doing here is to make a shallow copy of the VPStandardStateTP
75  * pointer in the "new" VPSSMgr object using the value from the "old"
76  * VPSSMgr object. This is not appropriate if we are making a copy of a ThermoPhase
77  * object and the VPSSMgr objects are owned by the ThermoPhase object.
78  *
79  * The new object will want to have a different value of m_vptp_ptr than the
80  * value this is being copied here. It will want to refer to the copy of the
81  * VPStandardStateTP object being made that will own the new VPSSMgr object.
82  * However, the assignment object is not the place to carry out this fixup.
83  *
84  * We will have to "fix" up the shallow copies later.
85  */
86  m_vptp_ptr = right.m_vptp_ptr;
87  m_spthermo = right.m_spthermo;
88  m_tlast = -1.0;
89  m_plast = -1.0;
90  m_p0 = right.m_p0;
91  m_minTemp = right.m_minTemp;
92  m_maxTemp = right.m_maxTemp;
94  m_h0_RT = right.m_h0_RT;
95  m_cp0_R = right.m_cp0_R;
96  m_g0_RT = right.m_g0_RT;
97  m_s0_R = right.m_s0_R;
98  m_V0 = right.m_V0;
100  m_hss_RT = right.m_hss_RT;
101  m_cpss_R = right.m_cpss_R;
102  m_gss_RT = right.m_gss_RT;
103  m_sss_R = right.m_sss_R;
104  m_Vss = right.m_Vss;
105 
106  mPDSS_h0_RT = right.mPDSS_h0_RT;
107  mPDSS_cp0_R = right.mPDSS_cp0_R;
108  mPDSS_g0_RT = right.mPDSS_g0_RT;
109  mPDSS_s0_R = right.mPDSS_s0_R;
110  mPDSS_V0 = right.mPDSS_V0;
111  mPDSS_hss_RT = right.mPDSS_hss_RT;
112  mPDSS_cpss_R = right.mPDSS_cpss_R;
113  mPDSS_gss_RT = right.mPDSS_gss_RT;
114  mPDSS_sss_R = right.mPDSS_sss_R;
115  mPDSS_Vss = right.mPDSS_Vss;
116 
117  return *this;
118 }
119 
121 {
122  return new VPSSMgr(*this);
123 }
124 
126  SpeciesThermo* sp_ptr)
127 {
128  m_vptp_ptr = vp_ptr;
129  m_spthermo = sp_ptr;
130 
131  // Take care of STITTbyPDSS objects
132 
133  // Go see if the SpeciesThermo type is a GeneralSpeciesThermo
134  GeneralSpeciesThermo* gst = dynamic_cast<GeneralSpeciesThermo*>(sp_ptr);
135  if (gst) {
136  for (size_t k = 0; k < m_kk; k++) {
137  SpeciesThermoInterpType* st = gst->provideSTIT(k);
138  STITbyPDSS* stpd = dynamic_cast<STITbyPDSS*>(st);
139  if (stpd) {
140  PDSS* PDSS_ptr = vp_ptr->providePDSS(k);
141  stpd->initAllPtrs(k, this, PDSS_ptr);
142  }
143  }
144  }
145 
146 }
147 
148 // Standard States
149 
150 void
152 {
154  std::copy(m_gss_RT.begin(), m_gss_RT.end(), mu);
155  doublereal _rt = GasConstant * m_tlast;
156  scale(mu, mu+m_kk, mu, _rt);
157  } else {
158  err("getStandardChemPotentials");
159  }
160 }
161 
162 void
163 VPSSMgr::getGibbs_RT(doublereal* grt) const
164 {
166  std::copy(m_gss_RT.begin(), m_gss_RT.end(), grt);
167  } else {
168  err("getGibbs_RT");
169  }
170 }
171 
172 void
173 VPSSMgr::getEnthalpy_RT(doublereal* hrt) const
174 {
176  std::copy(m_hss_RT.begin(), m_hss_RT.end(), hrt);
177  } else {
178  err("getEnthalpy_RT");
179  }
180 }
181 
182 void
183 VPSSMgr::getEntropy_R(doublereal* sr) const
184 {
186  std::copy(m_sss_R.begin(), m_sss_R.end(), sr);
187  } else {
188  err("getEntropy_RT");
189  }
190 }
191 
192 void
193 VPSSMgr::getIntEnergy_RT(doublereal* urt) const
194 {
196  std::copy(m_hss_RT.begin(), m_hss_RT.end(), urt);
197  doublereal pRT = m_plast / (GasConstant * m_tlast);
198  for (size_t k = 0; k < m_kk; k++) {
199  urt[k] -= pRT * m_Vss[k];
200  }
201  } else {
202  err("getEntropy_RT");
203  }
204 }
205 
206 void
207 VPSSMgr::getCp_R(doublereal* cpr) const
208 {
210  std::copy(m_cpss_R.begin(), m_cpss_R.end(), cpr);
211  } else {
212  err("getCp_R");
213  }
214 }
215 
216 void
217 VPSSMgr::getStandardVolumes(doublereal* vol) const
218 {
220  std::copy(m_Vss.begin(), m_Vss.end(), vol);
221  } else {
222  err("getStandardVolumes");
223  }
224 }
225 const vector_fp&
226 VPSSMgr::getStandardVolumes() const
227 {
229  return m_Vss;
230  } else {
231  err("getStandardVolumes");
232  }
233 }
234 
235 /*****************************************************************/
236 void
237 VPSSMgr::getEnthalpy_RT_ref(doublereal* hrt) const
238 {
240  std::copy(m_h0_RT.begin(), m_h0_RT.end(), hrt);
241  } else {
242  err("getEnthalpy_RT_ref");
243  }
244 }
245 
246 void
247 VPSSMgr::getGibbs_RT_ref(doublereal* grt) const
248 {
250  std::copy(m_g0_RT.begin(), m_g0_RT.end(), grt);
251  } else {
252  err("getGibbs_RT_ref");
253  }
254 }
255 
256 void
257 VPSSMgr::getGibbs_ref(doublereal* g) const
258 {
260  std::copy(m_g0_RT.begin(), m_g0_RT.end(), g);
261  doublereal _rt = GasConstant * m_tlast;
262  scale(g, g+m_kk, g, _rt);
263  } else {
264  err("getGibbs_ref");
265  }
266 }
267 
268 void
269 VPSSMgr::getEntropy_R_ref(doublereal* sr) const
270 {
272  std::copy(m_s0_R.begin(), m_s0_R.end(), sr);
273  } else {
274  err("getEntropy_R_ref");
275  }
276 }
277 
278 void
279 VPSSMgr::getCp_R_ref(doublereal* cpr) const
280 {
282  std::copy(m_cp0_R.begin(), m_cp0_R.end(), cpr);
283  } else {
284  err("getCp_R_ref");
285  }
286 }
287 
288 void
289 VPSSMgr::getStandardVolumes_ref(doublereal* vol) const
290 {
291  getStandardVolumes(vol);
292  //err("getStandardVolumes_ref");
293 }
294 
295 /*****************************************************************/
296 
297 void VPSSMgr::setState_P(doublereal pres)
298 {
299  if (m_plast != pres) {
300  m_plast = pres;
302  }
303 }
304 
305 void VPSSMgr::setState_T(doublereal temp)
306 {
307  if (m_tlast != temp) {
308  m_tlast = temp;
311  }
312 }
313 
314 void VPSSMgr::setState_TP(doublereal temp, doublereal pres)
315 {
316  if (m_tlast != temp) {
317  m_tlast = temp;
318  m_plast = pres;
321  } else if (m_plast != pres) {
322  m_plast = pres;
324  }
325 }
326 
328 {
330 }
331 
333 {
335 }
336 
338 {
339  for (size_t k = 0; k < m_kk; k++) {
340  PDSS* kPDSS = m_vptp_ptr->providePDSS(k);
341  kPDSS->setState_TP(m_tlast, m_plast);
342  }
343  err("_updateStandardStateThermo()");
344 }
345 
347 {
348  if (m_spthermo) {
349  m_spthermo->update(m_tlast, &m_cp0_R[0], &m_h0_RT[0], &m_s0_R[0]);
350  for (size_t k = 0; k < m_kk; k++) {
351  m_g0_RT[k] = m_h0_RT[k] - m_s0_R[k];
352  }
353  }
354 }
355 
356 
357 /*****************************************************************/
358 
359 void
361 {
362  initLengths();
363 }
364 
365 void
367 {
368  m_kk = m_vptp_ptr->nSpecies();
369  m_h0_RT.resize(m_kk, 0.0);
370  m_cp0_R.resize(m_kk, 0.0);
371  m_g0_RT.resize(m_kk, 0.0);
372  m_s0_R.resize(m_kk, 0.0);
373  m_V0.resize(m_kk, 0.0);
374  m_hss_RT.resize(m_kk, 0.0);
375  m_cpss_R.resize(m_kk, 0.0);
376  m_gss_RT.resize(m_kk, 0.0);
377  m_sss_R.resize(m_kk, 0.0);
378  m_Vss.resize(m_kk, 0.0);
379 
380  // Storage used by the PDSS objects to store their answers.
381  mPDSS_h0_RT.resize(m_kk, 0.0);
382  mPDSS_cp0_R.resize(m_kk, 0.0);
383  mPDSS_g0_RT.resize(m_kk, 0.0);
384  mPDSS_s0_R.resize(m_kk, 0.0);
385  mPDSS_V0.resize(m_kk, 0.0);
386  mPDSS_hss_RT.resize(m_kk, 0.0);
387  mPDSS_cpss_R.resize(m_kk, 0.0);
388  mPDSS_gss_RT.resize(m_kk, 0.0);
389  mPDSS_sss_R.resize(m_kk, 0.0);
390  mPDSS_Vss.resize(m_kk, 0.0);
391 }
392 
393 void VPSSMgr::initThermoXML(XML_Node& phaseNode, const std::string& id)
394 {
395  const PDSS* kPDSS = m_vptp_ptr->providePDSS(0);
396  m_p0 = kPDSS->refPressure();
397  for (size_t i = 0; i < m_kk; i++) {
398  const PDSS* kPDSS = m_vptp_ptr->providePDSS(i);
399  doublereal mint = kPDSS->minTemp();
400  if (mint > m_minTemp) {
401  m_minTemp = mint;
402  }
403  mint = kPDSS->maxTemp();
404  if (mint < m_maxTemp) {
405  m_maxTemp = mint;
406  }
407  }
408 #ifdef DEBUG_MODE
409  // Add a check to see that all references pressures are the same
410  double m_p0_k;
411  if (m_spthermo) {
412  for (size_t k = 0; k < m_kk; k++) {
413  m_p0_k = m_spthermo->refPressure(k);
414  if (m_p0 != m_p0_k) {
415  //throw CanteraError("VPSSMgr::initThermoXML",
416  // "inconsistent ref pressures" + fp2str(m_p0) + " "
417  // + fp2str(m_p0_k));
418  // writelog("VPSSMgr::initThermoXML:"
419  // "inconsistent ref pressures: " + fp2str(m_p0) + " "
420  // + fp2str(m_p0_k) + " for SpeciesThermo k = " + int2str(k) + "\n");
421  }
422  }
423  }
424 
425  for (size_t k = 0; k < m_kk; k++) {
426  const PDSS* kPDSS = m_vptp_ptr->providePDSS(k);
427  m_p0_k = kPDSS->refPressure();
428  if (m_p0 != m_p0_k) {
429  //throw CanteraError("VPSSMgr::initThermoXML",
430  // "inconsistent ref pressures" + fp2str(m_p0) + " "
431  // + fp2str(m_p0_k));
432  //writelog("VPSSMgr::initThermoXML"
433  // "inconsistent ref pressures: " + fp2str(m_p0) + " "
434  // + fp2str(m_p0_k) + " for PDSS k = " + int2str(k) + "\n");
435  }
436  }
437 #endif
438 }
439 
440 void VPSSMgr::installSTSpecies(size_t k, const XML_Node& s,
441  const XML_Node* phaseNode_ptr)
442 {
443 
445  f->installThermoForSpecies(k, s, m_vptp_ptr, *m_spthermo, phaseNode_ptr);
446  if (m_p0 < 0.0) {
448  }
449 }
450 
452  const XML_Node* phaseNode_ptr)
453 {
454  err("VPSSMgr::createInstallPDSS");
455  return (PDSS*) 0;
456 }
457 
458 /*****************************************************************/
459 doublereal VPSSMgr::minTemp(size_t k) const
460 {
461  if (k != npos) {
462  const PDSS* kPDSS = m_vptp_ptr->providePDSS(k);
463  return kPDSS->minTemp();
464  }
465  return m_minTemp;
466 }
467 
468 doublereal VPSSMgr::maxTemp(size_t k) const
469 {
470  if (k != npos) {
471  const PDSS* kPDSS = m_vptp_ptr->providePDSS(k);
472  return kPDSS->maxTemp();
473  }
474  return m_maxTemp;
475 }
476 
477 doublereal VPSSMgr::refPressure(size_t k) const
478 {
479  if (k != npos) {
480  const PDSS* kPDSS = m_vptp_ptr->providePDSS(k);
481  return kPDSS->refPressure();
482  }
483  return m_p0;
484 }
485 
487 {
488  err("reportPDSSType()");
489  return cPDSS_UNDEF;
490 }
491 
492 
494 {
495  err("reportVPSSType()");
496  return cVPSSMGR_UNDEF;
497 }
498 
499 /*****************************************************************/
500 
501 void VPSSMgr::err(const std::string& msg) const
502 {
503  throw CanteraError("VPSSMgr::" + msg, "unimplemented");
504 }
505 }
vector_fp m_V0
Vector containing the species reference molar volumes.
Definition: VPSSMgr.h:778
Factory to build instances of classes that manage the standard-state thermodynamic properties of a se...
void err(const std::string &msg) const
Error message to indicate an unimplemented feature.
Definition: VPSSMgr.cpp:501
vector_fp mPDSS_s0_R
species reference entropies - used by individual PDSS objects
Definition: VPSSMgr.h:842
SpeciesThermoInterpType * provideSTIT(size_t k)
Provide the SpeciesthermoInterpType object.
doublereal m_minTemp
minimum temperature for the standard state calculations
Definition: VPSSMgr.h:742
Pure Virtual Base class for the thermodynamic manager for an individual species' reference state...
bool m_useTmpRefStateStorage
Definition: VPSSMgr.h:751
void initLengths()
Initialize the lengths within the object.
Definition: VPSSMgr.cpp:366
vector_fp mPDSS_V0
species reference state molar Volumes - used by individual PDSS objects
Definition: VPSSMgr.h:849
vector_fp m_sss_R
Vector containing the species Standard State entropies at T = m_tlast and P = m_plast.
Definition: VPSSMgr.h:808
doublereal m_maxTemp
maximum temperature for the standard state calculations
Definition: VPSSMgr.h:745
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
Definition: VPSSMgr.cpp:237
doublereal maxTemp() const
return the minimum temperature
Definition: PDSS.h:375
Virtual base class for the classes that manage the calculation of standard state properties for all t...
Definition: VPSSMgr.h:238
Declaration file for a virtual base class that manages the calculation of standard state properties f...
virtual void getIntEnergy_RT(doublereal *urt) const
Returns the vector of nondimensional internal Energies of the standard state at the current temperatu...
Definition: VPSSMgr.cpp:193
VPSSMgr & operator=(const VPSSMgr &right)
Assignment operator.
Definition: VPSSMgr.cpp:67
virtual void updateRefStateThermo() const
Updates the internal reference state thermodynamic vectors at the current T of the solution and the r...
Definition: VPSSMgr.cpp:332
const size_t npos
index returned by functions to indicate "no position"
Definition: ct_defs.h:173
virtual doublereal maxTemp(size_t k=npos) const
Maximum temperature.
Definition: VPSSMgr.cpp:468
bool m_useTmpStandardStateStorage
Definition: VPSSMgr.h:784
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...
Definition: VPSSMgr.cpp:451
virtual void initThermoXML(XML_Node &phaseNode, const std::string &id)
Finalize the thermo after all species have been entered.
Definition: VPSSMgr.cpp:393
static SpeciesThermoFactory * factory()
Static method to return an instance of this class.
size_t m_kk
Number of species in the phase.
Definition: VPSSMgr.h:716
vector_fp mPDSS_cpss_R
species standard state heat capacities - used by individual PDSS objects
Definition: VPSSMgr.h:863
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:100
doublereal refPressure() const
Return the reference pressure for this phase.
Definition: PDSS.h:365
virtual void initThermo()
Definition: VPSSMgr.cpp:360
doublereal minTemp() const
return the minimum temperature
Definition: PDSS.h:370
void initAllPtrs(size_t speciesIndex, VPSSMgr *vpssmgr_ptr, PDSS *PDSS_ptr)
Initialize and/or Reinitialize all the pointers for this object.
void installThermoForSpecies(size_t k, const XML_Node &speciesNode, ThermoPhase *th_ptr, SpeciesThermo &spthermo, const XML_Node *phaseNode_ptr=0) const
Install a species thermodynamic property parameterization for the reference state for one species int...
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:133
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity.
Definition: VPSSMgr.cpp:151
virtual void _updateStandardStateThermo()
Updates the standard state thermodynamic functions at the current T and P of the solution.
Definition: VPSSMgr.cpp:337
vector_fp mPDSS_cp0_R
species reference heat capacities - used by individual PDSS objects
Definition: VPSSMgr.h:828
virtual void getCp_R_ref(doublereal *cpr) const
Definition: VPSSMgr.cpp:279
vector_fp m_cp0_R
Vector containing the species reference constant pressure heat capacities at T = m_tlast and P = p_re...
Definition: VPSSMgr.h:763
Declarations for the virtual base class PDSS (pressure dependent standard state) which handles calcul...
A species thermodynamic property manager for a phase.
VPStandardStateTP * m_vptp_ptr
Variable pressure ThermoPhase object.
Definition: VPSSMgr.h:719
virtual void initAllPtrs(VPStandardStateTP *vp_ptr, SpeciesThermo *sp_ptr)
Initialize the internal shallow pointers in this object.
Definition: VPSSMgr.cpp:125
virtual VPSSMgr_enumType reportVPSSMgrType() const
This utility function reports the type of manager for the calculation of ss properties.
Definition: VPSSMgr.cpp:493
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
Definition: VPSSMgr.cpp:173
virtual VPSSMgr * duplMyselfAsVPSSMgr() const
Duplication routine for objects which derive from VPSSMgr.
Definition: VPSSMgr.cpp:120
doublereal m_plast
The last pressure at which the Standard State thermodynamic properties were calculated at...
Definition: VPSSMgr.h:733
PDSS_enumType
Types of PDSS's.
Definition: mix_defs.h:119
vector_fp mPDSS_g0_RT
species reference gibbs free energies - used by individual PDSS objects
Definition: VPSSMgr.h:835
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...
Definition: VPSSMgr.cpp:289
virtual void setState_T(doublereal T)
Set the temperature (K)
Definition: VPSSMgr.cpp:305
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Enthalpy functions for the standard state species at the current T an...
Definition: VPSSMgr.cpp:183
Class for the thermodynamic manager for an individual species' reference state which uses the PDSS ba...
virtual doublereal refPressure(size_t k=npos) const
The reference-state pressure for the standard state.
Definition: VPSSMgr.cpp:477
virtual doublereal refPressure(size_t k=npos) const =0
The reference-state pressure for species k.
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:68
virtual void getGibbs_RT(doublereal *grt) const
Get the nondimensional Gibbs functions for the species at their standard states of solution at the cu...
Definition: VPSSMgr.cpp:163
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...
Definition: VPSSMgr.cpp:486
vector_fp mPDSS_sss_R
species standard state entropies - used by individual PDSS objects
Definition: VPSSMgr.h:877
virtual void _updateRefStateThermo() const
Updates the reference state thermodynamic functions at the current T of the solution and the referenc...
Definition: VPSSMgr.cpp:346
vector_fp mPDSS_Vss
species standard state molar Volumes - used by individual PDSS objects
Definition: VPSSMgr.h:884
virtual doublereal minTemp(size_t k=npos) const
Minimum temperature.
Definition: VPSSMgr.cpp:459
vector_fp m_Vss
Vector containing the species standard state volumes at T = m_tlast and P = m_plast.
Definition: VPSSMgr.h:814
vector_fp mPDSS_gss_RT
species standard state gibbs free energies - used by individual PDSS objects
Definition: VPSSMgr.h:870
size_t nSpecies() const
Returns the number of species in the phase.
Definition: Phase.h:252
virtual void updateStandardStateThermo()
Updates the internal standard state thermodynamic vectors at the current T and P of the solution...
Definition: VPSSMgr.cpp:327
vector_fp m_hss_RT
Vector containing the species Standard State enthalpies at T = m_tlast and P = m_plast.
Definition: VPSSMgr.h:790
vector_fp m_cpss_R
Vector containing the species Standard State constant pressure heat capacities at T = m_tlast and P =...
Definition: VPSSMgr.h:796
vector_fp m_h0_RT
Definition: VPSSMgr.h:757
Header for factory to build instances of classes that manage the standard-state thermodynamic propert...
Headers for a completely general species thermodynamic property manager for a phase (see Managers for...
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:165
Virtual base class for a species with a pressure dependent standard state.
Definition: PDSS.h:195
vector_fp mPDSS_hss_RT
species standard state enthalpies - used by individual PDSS objects
Definition: VPSSMgr.h:856
void scale(InputIter begin, InputIter end, OutputIter out, S scale_factor)
Multiply elements of an array by a scale factor.
Definition: utilities.h:154
vector_fp m_g0_RT
Vector containing the species reference Gibbs functions at T = m_tlast and P = p_ref.
Definition: VPSSMgr.h:769
doublereal m_p0
Definition: VPSSMgr.h:739
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
Definition: ct_defs.h:66
virtual void getStandardVolumes(doublereal *vol) const
Get the molar volumes of each species in their standard states at the current T and P of the solution...
Definition: VPSSMgr.cpp:217
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the standard state of the species at ...
Definition: VPSSMgr.cpp:207
virtual void getEntropy_R_ref(doublereal *er) const
Definition: VPSSMgr.cpp:269
SpeciesThermo * m_spthermo
Pointer to reference state thermo calculator.
Definition: VPSSMgr.h:725
virtual void update(doublereal T, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const =0
Compute the reference-state properties for all species.
vector_fp mPDSS_h0_RT
species reference enthalpies - used by individual PDSS objects
Definition: VPSSMgr.h:821
void installSTSpecies(size_t k, const XML_Node &speciesNode, const XML_Node *phaseNode_ptr)
Install specific content for species k in the reference-state thermodynamic SpeciesManager object...
Definition: VPSSMgr.cpp:440
doublereal m_tlast
The last temperature at which the standard state thermodynamic properties were calculated at...
Definition: VPSSMgr.h:729
virtual void setState_TP(doublereal T, doublereal P)
Set the temperature (K) and pressure (Pa)
Definition: VPSSMgr.cpp:314
vector_fp m_gss_RT
Vector containing the species Standard State Gibbs functions at T = m_tlast and P = m_plast...
Definition: VPSSMgr.h:802
VPSSMgr(VPStandardStateTP *vptp_ptr, SpeciesThermo *spth=0)
Constructor.
Definition: VPSSMgr.cpp:27
virtual ~VPSSMgr()
Destructor.
Definition: VPSSMgr.cpp:45
virtual void getGibbs_RT_ref(doublereal *grt) const
Definition: VPSSMgr.cpp:247
virtual void setState_P(doublereal P)
Set the pressure (Pa)
Definition: VPSSMgr.cpp:297
virtual void setState_TP(doublereal temp, doublereal pres)
Set the internal temperature and pressure.
Definition: PDSS.cpp:398
virtual void getGibbs_ref(doublereal *g) const
Definition: VPSSMgr.cpp:257
vector_fp m_s0_R
Vector containing the species reference entropies at T = m_tlast and P = p_ref.
Definition: VPSSMgr.h:775