Cantera  4.0.0a1
Loading...
Searching...
No Matches
MargulesVPSSTP.cpp
Go to the documentation of this file.
1/**
2 * @file MargulesVPSSTP.cpp
3 * Definitions for ThermoPhase object for phases which
4 * employ excess Gibbs free energy formulations related to Margules
5 * expansions (see @ref thermoprops
6 * and class @link Cantera::MargulesVPSSTP MargulesVPSSTP@endlink).
7 */
8
9// This file is part of Cantera. See License.txt in the top-level directory or
10// at https://cantera.org/license.txt for license and copyright information.
11
15
16namespace Cantera
17{
18MargulesVPSSTP::MargulesVPSSTP(const string& inputFile, const string& id_)
19{
20 initThermoFile(inputFile, id_);
21}
22
23// -- Activities, Standard States, Activity Concentrations -----------
24
25void MargulesVPSSTP::getLnActivityCoefficients(span<double> lnac) const
26{
27 checkArraySize("MargulesVPSSTP::getLnActivityCoefficients", lnac.size(), m_kk);
28 // Update the activity coefficients
30
31 // take the exp of the internally stored coefficients.
32 for (size_t k = 0; k < m_kk; k++) {
33 lnac[k] = lnActCoeff_Scaled_[k];
34 }
35}
36
37// ------------ Partial Molar Properties of the Solution ------------
38
39void MargulesVPSSTP::getChemPotentials(span<double> mu) const
40{
41 // First get the standard chemical potentials in molar form. This requires
42 // updates of standard state as a function of T and P
44
45 // Update the activity coefficients
47 for (size_t k = 0; k < m_kk; k++) {
48 double xx = std::max(moleFractions_[k], SmallNumber);
49 mu[k] += RT() * (log(xx) + lnActCoeff_Scaled_[k]);
50 }
51}
52
54{
55 return cp_mole() - GasConstant;
56}
57
58void MargulesVPSSTP::getPartialMolarEnthalpies(span<double> hbar) const
59{
60 // Get the nondimensional standard state enthalpies
61 getEnthalpy_RT(hbar);
62
63 // dimensionalize it.
64 for (size_t k = 0; k < m_kk; k++) {
65 hbar[k] *= RT();
66 }
67
68 // Update the activity coefficients, This also update the internally stored
69 // molalities.
72 for (size_t k = 0; k < m_kk; k++) {
73 hbar[k] -= RT() * temperature() * dlnActCoeffdT_Scaled_[k];
74 }
75}
76
77void MargulesVPSSTP::getPartialMolarCp(span<double> cpbar) const
78{
79 // Get the nondimensional standard state entropies
80 getCp_R(cpbar);
81 double T = temperature();
82
83 // Update the activity coefficients, This also update the internally stored
84 // molalities.
87
88 for (size_t k = 0; k < m_kk; k++) {
89 cpbar[k] -= 2 * T * dlnActCoeffdT_Scaled_[k] + T * T * d2lnActCoeffdT2_Scaled_[k];
90 }
91 // dimensionalize it.
92 for (size_t k = 0; k < m_kk; k++) {
93 cpbar[k] *= GasConstant;
94 }
95}
96
97void MargulesVPSSTP::getPartialMolarEntropies(span<double> sbar) const
98{
99 // Get the nondimensional standard state entropies
100 getEntropy_R(sbar);
101 double T = temperature();
102
103 // Update the activity coefficients, This also update the internally stored
104 // molalities.
107
108 for (size_t k = 0; k < m_kk; k++) {
109 double xx = std::max(moleFractions_[k], SmallNumber);
110 sbar[k] += - lnActCoeff_Scaled_[k] -log(xx) - T * dlnActCoeffdT_Scaled_[k];
111 }
112
113 // dimensionalize it.
114 for (size_t k = 0; k < m_kk; k++) {
115 sbar[k] *= GasConstant;
116 }
117}
118
119void MargulesVPSSTP::getPartialMolarVolumes(span<double> vbar) const
120{
121 double T = temperature();
122
123 // Get the standard state values in m^3 kmol-1
124 getStandardVolumes(vbar);
125
126 for (size_t i = 0; i < numBinaryInteractions_; i++) {
127 size_t iA = m_pSpecies_A_ij[i];
128 size_t iB = m_pSpecies_B_ij[i];
129 double XA = moleFractions_[iA];
130 double XB = moleFractions_[iB];
131 double g0 = (m_VHE_b_ij[i] - T * m_VSE_b_ij[i]);
132 double g1 = (m_VHE_c_ij[i] - T * m_VSE_c_ij[i]);
133 const double temp1 = g0 + g1 * XB;
134 const double all = -1.0*XA*XB*temp1 - XA*XB*XB*g1;
135
136 for (size_t iK = 0; iK < m_kk; iK++) {
137 vbar[iK] += all;
138 }
139 vbar[iA] += XB * temp1;
140 vbar[iB] += XA * temp1 + XA*XB*g1;
141 }
142}
143
145{
146 initLengths();
147 if (m_input.hasKey("interactions")) {
148 for (auto& item : m_input["interactions"].asVector<AnyMap>()) {
149 auto& species = item["species"].asVector<string>(2);
150 vector<double> h(2), s(2), vh(2), vs(2);
151 if (item.hasKey("excess-enthalpy")) {
152 h = item.convertVector("excess-enthalpy", "J/kmol", 2);
153 }
154 if (item.hasKey("excess-entropy")) {
155 s = item.convertVector("excess-entropy", "J/kmol/K", 2);
156 }
157 if (item.hasKey("excess-volume-enthalpy")) {
158 vh = item.convertVector("excess-volume-enthalpy", "m^3/kmol", 2);
159 }
160 if (item.hasKey("excess-volume-entropy")) {
161 vs = item.convertVector("excess-volume-entropy", "m^3/kmol/K", 2);
162 }
164 h[0], h[1], s[0], s[1], vh[0], vh[1], vs[0], vs[1]);
165 }
166 }
168}
169
171{
173 vector<AnyMap> interactions;
174 for (size_t n = 0; n < m_pSpecies_A_ij.size(); n++) {
175 AnyMap interaction;
176 interaction["species"] = vector<string>{
178 if (m_HE_b_ij[n] != 0 || m_HE_c_ij[n] != 0) {
179 interaction["excess-enthalpy"].setQuantity(
180 {m_HE_b_ij[n], m_HE_c_ij[n]}, "J/kmol");
181 }
182 if (m_SE_b_ij[n] != 0 || m_SE_c_ij[n] != 0) {
183 interaction["excess-entropy"].setQuantity(
184 {m_SE_b_ij[n], m_SE_c_ij[n]}, "J/kmol/K");
185 }
186 if (m_VHE_b_ij[n] != 0 || m_VHE_c_ij[n] != 0) {
187 interaction["excess-volume-enthalpy"].setQuantity(
188 {m_VHE_b_ij[n], m_VHE_c_ij[n]}, "m^3/kmol");
189 }
190 if (m_VSE_b_ij[n] != 0 || m_VSE_c_ij[n] != 0) {
191 interaction["excess-volume-entropy"].setQuantity(
192 {m_VSE_b_ij[n], m_VSE_c_ij[n]}, "m^3/kmol/K");
193 }
194 interactions.push_back(std::move(interaction));
195 }
196 phaseNode["interactions"] = std::move(interactions);
197}
198
200{
202}
203
204void MargulesVPSSTP::addBinaryInteraction(const string& speciesA,
205 const string& speciesB, double h0, double h1, double s0, double s1,
206 double vh0, double vh1, double vs0, double vs1)
207{
208 size_t kA = speciesIndex(speciesA, false);
209 size_t kB = speciesIndex(speciesB, false);
210 // The interaction is silently ignored if either species is not defined in
211 // the current phase.
212 if (kA == npos || kB == npos) {
213 return;
214 }
215 m_pSpecies_A_ij.push_back(kA);
216 m_pSpecies_B_ij.push_back(kB);
217
218 m_HE_b_ij.push_back(h0);
219 m_HE_c_ij.push_back(h1);
220 m_SE_b_ij.push_back(s0);
221 m_SE_c_ij.push_back(s1);
222 m_VHE_b_ij.push_back(vh0);
223 m_VHE_c_ij.push_back(vh1);
224 m_VSE_b_ij.push_back(vs0);
225 m_VSE_c_ij.push_back(vs1);
227}
228
229
231{
232 double T = temperature();
233 lnActCoeff_Scaled_.assign(m_kk, 0.0);
234 for (size_t i = 0; i < numBinaryInteractions_; i++) {
235 size_t iA = m_pSpecies_A_ij[i];
236 size_t iB = m_pSpecies_B_ij[i];
237 double g0 = (m_HE_b_ij[i] - T * m_SE_b_ij[i]) / RT();
238 double g1 = (m_HE_c_ij[i] - T * m_SE_c_ij[i]) / RT();
239 double XA = moleFractions_[iA];
240 double XB = moleFractions_[iB];
241 const double XAXB = XA * XB;
242 const double g0g1XB = (g0 + g1 * XB);
243 const double all = -1.0 * XAXB * g0g1XB - XAXB * XB * g1;
244 for (size_t iK = 0; iK < m_kk; iK++) {
245 lnActCoeff_Scaled_[iK] += all;
246 }
247 lnActCoeff_Scaled_[iA] += XB * g0g1XB;
248 lnActCoeff_Scaled_[iB] += XA * g0g1XB + XAXB * g1;
249 }
250}
251
253{
254 double invT = 1.0 / temperature();
255 double invRTT = 1.0 / GasConstant*invT*invT;
256 dlnActCoeffdT_Scaled_.assign(m_kk, 0.0);
257 d2lnActCoeffdT2_Scaled_.assign(m_kk, 0.0);
258 for (size_t i = 0; i < numBinaryInteractions_; i++) {
259 size_t iA = m_pSpecies_A_ij[i];
260 size_t iB = m_pSpecies_B_ij[i];
261 double XA = moleFractions_[iA];
262 double XB = moleFractions_[iB];
263 double g0 = -m_HE_b_ij[i] * invRTT;
264 double g1 = -m_HE_c_ij[i] * invRTT;
265 const double XAXB = XA * XB;
266 const double g0g1XB = (g0 + g1 * XB);
267 const double all = -1.0 * XAXB * g0g1XB - XAXB * XB * g1;
268 const double mult = 2.0 * invT;
269 const double dT2all = mult * all;
270 for (size_t iK = 0; iK < m_kk; iK++) {
271 dlnActCoeffdT_Scaled_[iK] += all;
272 d2lnActCoeffdT2_Scaled_[iK] -= dT2all;
273 }
274 dlnActCoeffdT_Scaled_[iA] += XB * g0g1XB;
275 dlnActCoeffdT_Scaled_[iB] += XA * g0g1XB + XAXB * g1;
276 d2lnActCoeffdT2_Scaled_[iA] -= mult * XB * g0g1XB;
277 d2lnActCoeffdT2_Scaled_[iB] -= mult * (XA * g0g1XB + XAXB * g1);
278 }
279}
280
281void MargulesVPSSTP::getdlnActCoeffdT(span<double> dlnActCoeffdT) const
282{
283 checkArraySize("MargulesVPSSTP::getdlnActCoeffdT", dlnActCoeffdT.size(), m_kk);
285 for (size_t k = 0; k < m_kk; k++) {
286 dlnActCoeffdT[k] = dlnActCoeffdT_Scaled_[k];
287 }
288}
289
290void MargulesVPSSTP::getd2lnActCoeffdT2(span<double> d2lnActCoeffdT2) const
291{
292 checkArraySize("MargulesVPSSTP::getd2lnActCoeffdT2", d2lnActCoeffdT2.size(), m_kk);
294 for (size_t k = 0; k < m_kk; k++) {
295 d2lnActCoeffdT2[k] = d2lnActCoeffdT2_Scaled_[k];
296 }
297}
298
299void MargulesVPSSTP::getdlnActCoeffds(const double dTds, span<const double> const dXds,
300 span<double> dlnActCoeffds) const
301{
302 checkArraySize("MargulesVPSSTP::getdlnActCoeffds", dlnActCoeffds.size(), m_kk);
303 checkArraySize("MargulesVPSSTP::getdlnActCoeffds", dXds.size(), m_kk);
304 double T = temperature();
306 for (size_t iK = 0; iK < m_kk; iK++) {
307 dlnActCoeffds[iK] = 0.0;
308 }
309
310 for (size_t i = 0; i < numBinaryInteractions_; i++) {
311 size_t iA = m_pSpecies_A_ij[i];
312 size_t iB = m_pSpecies_B_ij[i];
313 double XA = moleFractions_[iA];
314 double XB = moleFractions_[iB];
315 double dXA = dXds[iA];
316 double dXB = dXds[iB];
317 double g0 = (m_HE_b_ij[i] - T * m_SE_b_ij[i]) / RT();
318 double g1 = (m_HE_c_ij[i] - T * m_SE_c_ij[i]) / RT();
319 const double g02g1XB = g0 + 2*g1*XB;
320 const double g2XAdXB = 2*g1*XA*dXB;
321 const double all = (-XB * dXA - XA *dXB) * g02g1XB - XB *g2XAdXB;
322 for (size_t iK = 0; iK < m_kk; iK++) {
323 dlnActCoeffds[iK] += all + dlnActCoeffdT_Scaled_[iK]*dTds;
324 }
325 dlnActCoeffds[iA] += dXB * g02g1XB;
326 dlnActCoeffds[iB] += dXA * g02g1XB + g2XAdXB;
327 }
328}
329
331{
332 double T = temperature();
333 dlnActCoeffdlnN_diag_.assign(m_kk, 0.0);
334
335 for (size_t iK = 0; iK < m_kk; iK++) {
336 double XK = moleFractions_[iK];
337
338 for (size_t i = 0; i < numBinaryInteractions_; i++) {
339 size_t iA = m_pSpecies_A_ij[i];
340 size_t iB = m_pSpecies_B_ij[i];
341 size_t delAK = 0;
342 size_t delBK = 0;
343
344 if (iA==iK) {
345 delAK = 1;
346 } else if (iB==iK) {
347 delBK = 1;
348 }
349
350 double XA = moleFractions_[iA];
351 double XB = moleFractions_[iB];
352
353 double g0 = (m_HE_b_ij[i] - T * m_SE_b_ij[i]) / RT();
354 double g1 = (m_HE_c_ij[i] - T * m_SE_c_ij[i]) / RT();
355
356 dlnActCoeffdlnN_diag_[iK] += 2*(delBK-XB)*(g0*(delAK-XA)+g1*(2*(delAK-XA)*XB+XA*(delBK-XB)));
357 }
359 }
360}
361
363{
364 double T = temperature();
366
367 // Loop over the activity coefficient gamma_k
368 for (size_t iK = 0; iK < m_kk; iK++) {
369 for (size_t iM = 0; iM < m_kk; iM++) {
370 double XM = moleFractions_[iM];
371 for (size_t i = 0; i < numBinaryInteractions_; i++) {
372 size_t iA = m_pSpecies_A_ij[i];
373 size_t iB = m_pSpecies_B_ij[i];
374 double delAK = 0.0;
375 double delBK = 0.0;
376 double delAM = 0.0;
377 double delBM = 0.0;
378 if (iA==iK) {
379 delAK = 1.0;
380 } else if (iB==iK) {
381 delBK = 1.0;
382 }
383 if (iA==iM) {
384 delAM = 1.0;
385 } else if (iB==iM) {
386 delBM = 1.0;
387 }
388
389 double XA = moleFractions_[iA];
390 double XB = moleFractions_[iB];
391 double g0 = (m_HE_b_ij[i] - T * m_SE_b_ij[i]) / RT();
392 double g1 = (m_HE_c_ij[i] - T * m_SE_c_ij[i]) / RT();
393 dlnActCoeffdlnN_(iK,iM) += g0*((delAM-XA)*(delBK-XB)+(delAK-XA)*(delBM-XB));
394 dlnActCoeffdlnN_(iK,iM) += 2*g1*((delAM-XA)*(delBK-XB)*XB+(delAK-XA)*(delBM-XB)*XB+(delBM-XB)*(delBK-XB)*XA);
395 }
396 dlnActCoeffdlnN_(iK,iM) = XM*dlnActCoeffdlnN_(iK,iM);
397 }
398 }
399}
400
402{
403 double T = temperature();
404 dlnActCoeffdlnX_diag_.assign(m_kk, 0.0);
405
406 for (size_t i = 0; i < numBinaryInteractions_; i++) {
407 size_t iA = m_pSpecies_A_ij[i];
408 size_t iB = m_pSpecies_B_ij[i];
409
410 double XA = moleFractions_[iA];
411 double XB = moleFractions_[iB];
412
413 double g0 = (m_HE_b_ij[i] - T * m_SE_b_ij[i]) / RT();
414 double g1 = (m_HE_c_ij[i] - T * m_SE_c_ij[i]) / RT();
415
416 dlnActCoeffdlnX_diag_[iA] += XA*XB*(2*g1*-2*g0-6*g1*XB);
417 dlnActCoeffdlnX_diag_[iB] += XA*XB*(2*g1*-2*g0-6*g1*XB);
418 }
419}
420
421void MargulesVPSSTP::getdlnActCoeffdlnN_diag(span<double> dlnActCoeffdlnN_diag) const
422{
424 for (size_t k = 0; k < m_kk; k++) {
425 dlnActCoeffdlnN_diag[k] = dlnActCoeffdlnN_diag_[k];
426 }
427}
428
429void MargulesVPSSTP::getdlnActCoeffdlnX_diag(span<double> dlnActCoeffdlnX_diag) const
430{
432 for (size_t k = 0; k < m_kk; k++) {
433 dlnActCoeffdlnX_diag[k] = dlnActCoeffdlnX_diag_[k];
434 }
435}
436
437void MargulesVPSSTP::getdlnActCoeffdlnN(const size_t ld, span<double> dlnActCoeffdlnN)
438{
440 double* data = & dlnActCoeffdlnN_(0,0);
441 for (size_t k = 0; k < m_kk; k++) {
442 for (size_t m = 0; m < m_kk; m++) {
443 dlnActCoeffdlnN[ld * k + m] = data[m_kk * k + m];
444 }
445 }
446}
447
448}
(see Thermodynamic Properties and class MargulesVPSSTP).
Headers for the factory class that can create known ThermoPhase objects (see Thermodynamic Properties...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:431
bool hasKey(const string &key) const
Returns true if the map contains an item named key.
Definition AnyMap.cpp:1477
void zero()
Set all of the entries to zero.
Definition Array.h:118
virtual void resize(size_t n, size_t m, double v=0.0)
Resize the array, and fill the new entries with 'v'.
Definition Array.cpp:52
vector< double > d2lnActCoeffdT2_Scaled_
Storage for the current derivative values of the gradients with respect to temperature of the log of ...
Array2D dlnActCoeffdlnN_
Storage for the current derivative values of the gradients with respect to logarithm of the species m...
vector< double > lnActCoeff_Scaled_
Storage for the current values of the activity coefficients of the species.
vector< double > dlnActCoeffdlnX_diag_
Storage for the current derivative values of the gradients with respect to logarithm of the mole frac...
vector< double > moleFractions_
Storage for the current values of the mole fractions of the species.
vector< double > dlnActCoeffdT_Scaled_
Storage for the current derivative values of the gradients with respect to temperature of the log of ...
vector< double > dlnActCoeffdlnN_diag_
Storage for the current derivative values of the gradients with respect to logarithm of the mole frac...
void getLnActivityCoefficients(span< double > lnac) const override
Get the array of non-dimensional molar-based ln activity coefficients at the current solution tempera...
void getPartialMolarEnthalpies(span< double > hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
vector< double > m_VHE_c_ij
Enthalpy term for the ternary mole fraction interaction of the excess Gibbs free energy expression.
vector< double > m_SE_b_ij
Entropy term for the binary mole fraction interaction of the excess Gibbs free energy expression.
void getdlnActCoeffdlnN_diag(span< double > dlnActCoeffdlnN_diag) const override
Get the array of log species mole number derivatives of the log activity coefficients.
void getPartialMolarCp(span< double > cpbar) const override
Returns an array of partial molar entropies for the species in the mixture.
size_t numBinaryInteractions_
number of binary interaction expressions
void getd2lnActCoeffdT2(span< double > d2lnActCoeffdT2) const
Get the array of temperature second derivatives of the log activity coefficients.
vector< double > m_SE_c_ij
Entropy term for the ternary mole fraction interaction of the excess Gibbs free energy expression.
void s_update_dlnActCoeff_dlnN_diag() const
Update the derivative of the log of the activity coefficients wrt log(moles) - diagonal only.
void getParameters(AnyMap &phaseNode) const override
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
void initThermo() override
Initialize the ThermoPhase object after all species have been set up.
void getdlnActCoeffdlnX_diag(span< double > dlnActCoeffdlnX_diag) const override
Get the array of ln mole fraction derivatives of the log activity coefficients - diagonal component o...
void getdlnActCoeffdlnN(const size_t ld, span< double > const dlnActCoeffdlnN) override
Get the array of derivatives of the log activity coefficients with respect to the log of the species ...
vector< size_t > m_pSpecies_A_ij
vector of species indices representing species A in the interaction
double cv_mole() const override
Molar heat capacity at constant volume and composition [J/kmol/K].
void s_update_dlnActCoeff_dT() const
Update the derivative of the log of the activity coefficients wrt T.
vector< size_t > m_pSpecies_B_ij
vector of species indices representing species B in the interaction
vector< double > m_VSE_c_ij
Entropy term for the ternary mole fraction interaction of the excess Gibbs free energy expression.
void s_update_dlnActCoeff_dlnN() const
Update the derivative of the log of the activity coefficients wrt log(moles_m)
vector< double > m_HE_b_ij
Enthalpy term for the binary mole fraction interaction of the excess Gibbs free energy expression.
void getdlnActCoeffds(const double dTds, span< const double > dXds, span< double > dlnActCoeffds) const override
Get the change in activity coefficients wrt changes in state (temp, mole fraction,...
vector< double > m_VSE_b_ij
Entropy term for the binary mole fraction interaction of the excess Gibbs free energy expression.
void getPartialMolarVolumes(span< double > vbar) const override
Return an array of partial molar volumes for the species in the mixture.
void initLengths()
Initialize lengths of local variables after all species have been identified.
void getPartialMolarEntropies(span< double > sbar) const override
Returns an array of partial molar entropies for the species in the mixture.
void s_update_dlnActCoeff_dlnX_diag() const
Update the derivative of the log of the activity coefficients wrt log(mole fraction)
void s_update_lnActCoeff() const
Update the activity coefficients.
void getdlnActCoeffdT(span< double > dlnActCoeffdT) const override
Get the array of temperature derivatives of the log activity coefficients.
vector< double > m_VHE_b_ij
Enthalpy term for the binary mole fraction interaction of the excess Gibbs free energy expression.
void addBinaryInteraction(const string &speciesA, const string &speciesB, double h0, double h1, double s0, double s1, double vh0, double vh1, double vs0, double vs1)
Add a binary species interaction with the specified parameters.
MargulesVPSSTP(const string &inputFile="", const string &id="")
Construct a MargulesVPSSTP object from an input file.
void getChemPotentials(span< double > mu) const override
Get the species chemical potentials. Units: J/kmol.
vector< double > m_HE_c_ij
Enthalpy term for the ternary mole fraction interaction of the excess Gibbs free energy expression.
size_t m_kk
Number of species in the phase.
Definition Phase.h:875
size_t speciesIndex(const string &name, bool raise=true) const
Returns the index of a species named 'name' within the Phase object.
Definition Phase.cpp:127
double temperature() const
Temperature (K).
Definition Phase.h:585
string speciesName(size_t k) const
Name of the species with index k.
Definition Phase.cpp:143
shared_ptr< Species > species(const string &name) const
Return the Species object for the named species.
Definition Phase.cpp:881
virtual double cp_mole() const
Molar heat capacity at constant pressure and composition [J/kmol/K].
virtual void getParameters(AnyMap &phaseNode) const
Store the parameters of a ThermoPhase object such that an identical one could be reconstructed using ...
double RT() const
Return the Gas Constant multiplied by the current temperature.
virtual void initThermo()
Initialize the ThermoPhase object after all species have been set up.
void initThermoFile(const string &inputFile, const string &id)
Initialize a ThermoPhase object using an input file.
AnyMap m_input
Data supplied via setParameters.
void getCp_R(span< double > cpr) const override
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
void getStandardChemPotentials(span< double > mu) const override
Get the array of chemical potentials at unit activity for the species at their standard states at the...
void getEnthalpy_RT(span< double > hrt) const override
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
void getEntropy_R(span< double > sr) const override
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
void getStandardVolumes(span< double > vol) const override
Get the molar volumes of the species standard states at the current T and P of the solution.
const double GasConstant
Universal Gas Constant [J/kmol/K].
Definition ct_defs.h:123
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595
const size_t npos
index returned by functions to indicate "no position"
Definition ct_defs.h:183
const double SmallNumber
smallest number to compare to zero.
Definition ct_defs.h:161
void checkArraySize(const char *procedure, size_t available, size_t required)
Wrapper for throwing ArraySizeError.
Contains declarations for string manipulation functions within Cantera.