Cantera  4.0.0a1
Loading...
Searching...
No Matches
PDSS.cpp
Go to the documentation of this file.
1/**
2 * @file PDSS.cpp
3 * Implementation of a pressure dependent standard state
4 * virtual function
5 * (see class @link Cantera::PDSS PDSS@endlink).
6 */
7
8// This file is part of Cantera. See License.txt in the top-level directory or
9// at https://cantera.org/license.txt for license and copyright information.
10
11#include "cantera/base/global.h"
12#include "cantera/thermo/PDSS.h"
14
15namespace Cantera
16{
17
18double PDSS::enthalpy_mole() const
19{
20 throw NotImplementedError("PDSS::enthalpy_mole");
21}
22
23double PDSS::enthalpy_RT() const
24{
25 throw NotImplementedError("PDSS::enthalpy_RT");
26}
27
29{
30 throw NotImplementedError("PDSS::intEnergy_mole");
31}
32
33double PDSS::entropy_mole() const
34{
35 throw NotImplementedError("PDSS::entropy_mole");
36}
37
38double PDSS::entropy_R() const
39{
40 throw NotImplementedError("PDSS::entropy_R");
41}
42
43double PDSS::gibbs_mole() const
44{
45 throw NotImplementedError("PDSS::gibbs_mole");
46}
47
48double PDSS::gibbs_RT() const
49{
50 throw NotImplementedError("PDSS::gibbs_RT");
51}
52
53double PDSS::cp_mole() const
54{
55 throw NotImplementedError("PDSS::cp_mole");
56}
57
58double PDSS::cp_R() const
59{
60 throw NotImplementedError("PDSS::cp_R");
61}
62
63double PDSS::molarVolume() const
64{
65 throw NotImplementedError("PDSS::molarVolume");
66}
67
68double PDSS::density() const
69{
70 throw NotImplementedError("PDSS::density");
71}
72
73double PDSS::dVdT() const
74{
75 throw NotImplementedError("PDSS::dVdT");
76}
77
78double PDSS::dVdP() const
79{
80 throw NotImplementedError("PDSS::dVdP");
81}
82
83double PDSS::cv_mole() const
84{
85 throw NotImplementedError("PDSS::cv_mole");
86}
87
88double PDSS::gibbs_RT_ref() const
89{
90 throw NotImplementedError("PDSS::gibbs_RT_ref");
91}
92
94{
95 throw NotImplementedError("PDSS::enthalpy_RT_ref");
96}
97
98double PDSS::entropy_R_ref() const
99{
100 throw NotImplementedError("PDSS::entropy_RT_ref");
101}
102
103double PDSS::cp_R_ref() const
104{
105 throw NotImplementedError("PDSS::entropy_RT_ref");
106}
107
109{
110 throw NotImplementedError("PDSS::molarVolume_ref");
111}
112
113double PDSS::pressure() const
114{
115 return m_pres;
116}
117
119{
120 throw NotImplementedError("PDSS::thermalExpansionCoeff");
121}
122
124{
125 throw NotImplementedError("PDSS::critTemperature");
126}
127
128double PDSS::critPressure() const
129{
130 throw NotImplementedError("PDSS::critPressure");
131}
132
133double PDSS::critDensity() const
134{
135 throw NotImplementedError("PDSS::critDensity");
136}
137
138void PDSS::setPressure(double pres)
139{
140 m_pres = pres;
141}
142
143double PDSS::temperature() const
144{
145 return m_temp;
146}
147
148void PDSS::setTemperature(double temp)
149{
150 m_temp = temp;
151}
152
154{
155 return m_mw;
156}
158{
159 m_mw = mw;
160}
161
162void PDSS::setState_TP(double temp, double pres)
163{
164 throw NotImplementedError("PDSS::setState_TP");
165}
166
167double PDSS::satPressure(double t)
168{
169 throw NotImplementedError("PDSS::satPressure");
170}
171
172// PDSS_Molar methods
173
175{
176 return enthalpy_mole() / (GasConstant * temperature());
177}
178
180{
181 return entropy_mole() / GasConstant;
182}
183
185{
186 return gibbs_mole() / (GasConstant * temperature());
187}
188
189double PDSS_Molar::cp_R() const
190{
191 return cp_mole() / GasConstant;
192}
193
194// PDSS_Nondimensional methods
195
196PDSS_Nondimensional::PDSS_Nondimensional()
197 : m_h0_RT(0.0)
198 , m_cp0_R(0.0)
199 , m_s0_R(0.0)
200 , m_g0_RT(0.0)
201 , m_V0(0.0)
202 , m_hss_RT(0.0)
203 , m_cpss_R(0.0)
204 , m_sss_R(0.0)
205 , m_gss_RT(0.0)
206 , m_Vss(0.0)
207{
208}
209
211{
212 return enthalpy_RT() * GasConstant * temperature();
213}
214
216{
217 return entropy_R() * GasConstant;
218}
219
221{
222 return gibbs_RT() * GasConstant * temperature();
223}
224
226{
227 return cp_R() * GasConstant;
228}
229
231{
232 return m_g0_RT;
233}
234
236{
237 return m_h0_RT;
238}
239
241{
242 return m_s0_R;
243}
244
246{
247 return m_cp0_R;
248}
249
251{
252 return m_V0;
253}
254
256{
257 return m_hss_RT;
258}
259
261{
262 return m_sss_R;
263}
264
266{
267 return m_gss_RT;
268}
269
271{
272 return m_cpss_R;
273}
274
276{
277 return m_Vss;
278}
279
281{
282 return m_mw / m_Vss;
283}
284
285}
Declarations for the virtual base class PDSS (pressure dependent standard state) which handles calcul...
Header file for a derived class of ThermoPhase that handles variable pressure standard state methods ...
An error indicating that an unimplemented function has been called.
double cp_R() const override
Return the molar const pressure heat capacity divided by RT.
Definition PDSS.cpp:189
double entropy_R() const override
Return the standard state entropy divided by RT.
Definition PDSS.cpp:179
double enthalpy_RT() const override
Return the standard state molar enthalpy divided by RT.
Definition PDSS.cpp:174
double gibbs_RT() const override
Return the molar Gibbs free energy divided by RT.
Definition PDSS.cpp:184
double molarVolume() const override
Return the molar volume at standard state.
Definition PDSS.cpp:275
double enthalpy_mole() const override
Return the molar enthalpy in units of J kmol-1.
Definition PDSS.cpp:210
double m_sss_R
Standard state entropy divided by R.
Definition PDSS.h:479
double gibbs_RT_ref() const override
Return the molar Gibbs free energy divided by RT at reference pressure.
Definition PDSS.cpp:230
double cp_R() const override
Return the molar const pressure heat capacity divided by RT.
Definition PDSS.cpp:270
double m_cpss_R
Standard state heat capacity divided by R.
Definition PDSS.h:478
double entropy_R_ref() const override
Return the molar entropy divided by R at reference pressure.
Definition PDSS.cpp:240
double enthalpy_RT_ref() const override
Return the molar enthalpy divided by RT at reference pressure.
Definition PDSS.cpp:235
double m_h0_RT
Reference state enthalpy divided by RT.
Definition PDSS.h:472
double m_g0_RT
Reference state Gibbs free energy divided by RT.
Definition PDSS.h:475
double m_s0_R
Reference state entropy divided by R.
Definition PDSS.h:474
double entropy_mole() const override
Return the molar entropy in units of J kmol-1 K-1.
Definition PDSS.cpp:215
double m_gss_RT
Standard state Gibbs free energy divided by RT.
Definition PDSS.h:480
double entropy_R() const override
Return the standard state entropy divided by RT.
Definition PDSS.cpp:260
double m_cp0_R
Reference state heat capacity divided by R.
Definition PDSS.h:473
double cp_mole() const override
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
Definition PDSS.cpp:225
double enthalpy_RT() const override
Return the standard state molar enthalpy divided by RT.
Definition PDSS.cpp:255
double m_Vss
Standard State molar volume (m^3/kmol)
Definition PDSS.h:481
double density() const override
Return the standard state density at standard state.
Definition PDSS.cpp:280
double gibbs_mole() const override
Return the molar Gibbs free energy in units of J kmol-1.
Definition PDSS.cpp:220
double m_hss_RT
Standard state enthalpy divided by RT.
Definition PDSS.h:477
double molarVolume_ref() const override
Return the molar volume at reference pressure.
Definition PDSS.cpp:250
double gibbs_RT() const override
Return the molar Gibbs free energy divided by RT.
Definition PDSS.cpp:265
double m_V0
Reference state molar volume (m^3/kmol)
Definition PDSS.h:476
double cp_R_ref() const override
Return the molar heat capacity divided by R at reference pressure.
Definition PDSS.cpp:245
virtual double satPressure(double T)
saturation pressure
Definition PDSS.cpp:167
double molecularWeight() const
Return the molecular weight of the species in units of kg kmol-1.
Definition PDSS.cpp:153
virtual double cv_mole() const
Return the molar const volume heat capacity in units of J kmol-1 K-1.
Definition PDSS.cpp:83
virtual void setTemperature(double temp)
Set the internal temperature.
Definition PDSS.cpp:148
virtual double entropy_mole() const
Return the molar entropy in units of J kmol-1 K-1.
Definition PDSS.cpp:33
virtual double enthalpy_mole() const
Return the molar enthalpy in units of J kmol-1.
Definition PDSS.cpp:18
virtual double gibbs_RT() const
Return the molar Gibbs free energy divided by RT.
Definition PDSS.cpp:48
virtual double cp_R_ref() const
Return the molar heat capacity divided by R at reference pressure.
Definition PDSS.cpp:103
double m_temp
Current temperature used by the PDSS object.
Definition PDSS.h:412
virtual double density() const
Return the standard state density at standard state.
Definition PDSS.cpp:68
virtual double pressure() const
Returns the pressure (Pa)
Definition PDSS.cpp:113
void setMolecularWeight(double mw)
Set the molecular weight of the species.
Definition PDSS.cpp:157
virtual double cp_mole() const
Return the molar const pressure heat capacity in units of J kmol-1 K-1.
Definition PDSS.cpp:53
virtual double gibbs_mole() const
Return the molar Gibbs free energy in units of J kmol-1.
Definition PDSS.cpp:43
virtual double temperature() const
Return the current stored temperature.
Definition PDSS.cpp:143
virtual double entropy_R_ref() const
Return the molar entropy divided by R at reference pressure.
Definition PDSS.cpp:98
virtual double dVdT() const
Return the temperature derivative of the standard state molar volume at constant pressure [m³/kmol/K]...
Definition PDSS.cpp:73
double m_pres
State of the system - pressure.
Definition PDSS.h:415
virtual double molarVolume_ref() const
Return the molar volume at reference pressure.
Definition PDSS.cpp:108
virtual double thermalExpansionCoeff() const
Return the volumetric thermal expansion coefficient. Units: 1/K.
Definition PDSS.cpp:118
virtual double enthalpy_RT() const
Return the standard state molar enthalpy divided by RT.
Definition PDSS.cpp:23
virtual double critDensity() const
critical density
Definition PDSS.cpp:133
virtual double enthalpy_RT_ref() const
Return the molar enthalpy divided by RT at reference pressure.
Definition PDSS.cpp:93
virtual double entropy_R() const
Return the standard state entropy divided by RT.
Definition PDSS.cpp:38
virtual double critTemperature() const
critical temperature
Definition PDSS.cpp:123
double m_mw
Molecular Weight of the species.
Definition PDSS.h:427
virtual double cp_R() const
Return the molar const pressure heat capacity divided by RT.
Definition PDSS.cpp:58
virtual double molarVolume() const
Return the molar volume at standard state.
Definition PDSS.cpp:63
virtual double intEnergy_mole() const
Return the molar internal Energy in units of J kmol-1.
Definition PDSS.cpp:28
virtual double critPressure() const
critical pressure
Definition PDSS.cpp:128
virtual void setPressure(double pres)
Sets the pressure in the object.
Definition PDSS.cpp:138
virtual double dVdP() const
Return the pressure derivative of the standard state molar volume at constant temperature [m³/kmol/Pa...
Definition PDSS.cpp:78
virtual double gibbs_RT_ref() const
Return the molar Gibbs free energy divided by RT at reference pressure.
Definition PDSS.cpp:88
virtual void setState_TP(double temp, double pres)
Set the internal temperature and pressure.
Definition PDSS.cpp:162
This file contains definitions for utility functions and text for modules, inputfiles and logging,...
const double GasConstant
Universal Gas Constant [J/kmol/K].
Definition ct_defs.h:123
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595