Cantera  2.4.0
SpeciesThermoInterpType.cpp
Go to the documentation of this file.
1 /**
2  * @file SpeciesThermoInterpType.cpp
3  */
4 
5 // This file is part of Cantera. See License.txt in the top-level directory or
6 // at http://www.cantera.org/license.txt for license and copyright information.
7 
9 #include "cantera/thermo/PDSS.h"
10 
11 namespace Cantera
12 {
13 
14 SpeciesThermoInterpType::SpeciesThermoInterpType() :
15  m_lowT(0.0),
16  m_highT(0.0),
17  m_Pref(0.0)
18 {
19 }
20 
21 SpeciesThermoInterpType::SpeciesThermoInterpType(double tlow,
22  double thigh,
23  double pref) :
24  m_lowT(tlow),
25  m_highT(thigh),
26  m_Pref(pref)
27 {
28 }
29 
30 void SpeciesThermoInterpType::updateProperties(const doublereal* tempPoly,
31  doublereal* cp_R, doublereal* h_RT, doublereal* s_R) const
32 {
33  double T = tempPoly[0];
34  updatePropertiesTemp(T, cp_R, h_RT, s_R);
35 }
36 
37 doublereal SpeciesThermoInterpType::reportHf298(doublereal* const h298) const
38 {
39  throw CanteraError("SpeciesThermoInterpType::reportHf298",
40  "Not implemented");
41 }
42 
43 void SpeciesThermoInterpType::modifyOneHf298(const size_t k,
44  const doublereal Hf298New)
45 {
46  throw CanteraError("SpeciesThermoInterpType::modifyOneHf298",
47  "Not implemented");
48 }
49 
50 //=============================================================================
51 
52 STITbyPDSS::STITbyPDSS(PDSS* PDSS_ptr) :
53  m_PDSS_ptr(PDSS_ptr)
54 {
55 }
56 
57 doublereal STITbyPDSS::minTemp() const
58 {
59  return m_PDSS_ptr->minTemp();
60 }
61 
62 doublereal STITbyPDSS::maxTemp() const
63 {
64  return m_PDSS_ptr->maxTemp();
65 }
66 
67 doublereal STITbyPDSS::refPressure() const
68 {
69  return m_PDSS_ptr->refPressure();
70 }
71 
73 {
74  return PDSS_TYPE;
75 }
76 
77 void STITbyPDSS::updateProperties(const doublereal* tempPoly,
78  doublereal* cp_R, doublereal* h_RT,
79  doublereal* s_R) const
80 {
81  doublereal T = tempPoly[0];
82  updatePropertiesTemp(T, cp_R, h_RT, s_R);
83 }
84 
85 void STITbyPDSS::updatePropertiesTemp(const doublereal temp,
86  doublereal* cp_R,
87  doublereal* h_RT,
88  doublereal* s_R) const
89 {
91  *h_RT = m_PDSS_ptr->enthalpy_RT_ref();
92  *cp_R = m_PDSS_ptr->cp_R_ref();
93  *s_R = m_PDSS_ptr->entropy_R_ref();
94 }
95 
96 void STITbyPDSS::reportParameters(size_t& index, int& type,
97  doublereal& minTemp, doublereal& maxTemp,
98  doublereal& refPressure,
99  doublereal* const coeffs) const
100 {
101  index = 0;
102  type = PDSS_TYPE;
106 }
107 
108 }
#define PDSS_TYPE
Type of reference state thermo which is a wrapper around a pressure dependent standard state object...
virtual doublereal entropy_R_ref() const
Return the molar entropy divided by R at reference pressure.
Definition: PDSS.cpp:97
doublereal refPressure() const
Return the reference pressure for this phase.
Definition: PDSS.h:293
doublereal maxTemp() const
return the minimum temperature
Definition: PDSS.h:303
PDSS * m_PDSS_ptr
Pointer to the PDSS object that handles calls for this object.
Pure Virtual Base class for individual species reference state thermodynamic managers and text for th...
virtual void reportParameters(size_t &index, int &type, doublereal &minTemp, doublereal &maxTemp, doublereal &refPressure, doublereal *const coeffs) const
This utility function reports back the type of parameterization and all of the parameters for the spe...
virtual void updateProperties(const doublereal *tempPoly, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Update the properties for this species, given a temperature polynomial.
Declarations for the virtual base class PDSS (pressure dependent standard state) which handles calcul...
virtual void setTemperature(doublereal temp)
Set the internal temperature.
Definition: PDSS.cpp:167
virtual doublereal cp_R_ref() const
Return the molar heat capacity divided by R at reference pressure.
Definition: PDSS.cpp:102
virtual void updatePropertiesTemp(const doublereal temp, doublereal *cp_R, doublereal *h_RT, doublereal *s_R) const
Compute the reference-state property of one species.
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:65
virtual doublereal maxTemp() const
Returns the maximum temperature that the thermo parameterization is valid.
virtual int reportType() const
Returns an integer representing the type of parameterization.
virtual doublereal minTemp() const
Returns the minimum temperature that the thermo parameterization is valid.
virtual doublereal refPressure() const
Returns the reference pressure (Pa)
Virtual base class for a species with a pressure dependent standard state.
Definition: PDSS.h:165
doublereal minTemp() const
return the minimum temperature
Definition: PDSS.h:298
virtual doublereal enthalpy_RT_ref() const
Return the molar enthalpy divided by RT at reference pressure.
Definition: PDSS.cpp:92
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:8