Cantera  4.0.0a1
Loading...
Searching...
No Matches
MargulesVPSSTP.h
Go to the documentation of this file.
1/**
2 * @file MargulesVPSSTP.h (see @ref thermoprops and class @link
3 * Cantera::MargulesVPSSTP MargulesVPSSTP@endlink).
4 */
5
6// This file is part of Cantera. See License.txt in the top-level directory or
7// at https://cantera.org/license.txt for license and copyright information.
8
9#ifndef CT_MARGULESVPSSTP_H
10#define CT_MARGULESVPSSTP_H
11
12#include "GibbsExcessVPSSTP.h"
13
14namespace Cantera
15{
16
17//! MargulesVPSSTP is a derived class of GibbsExcessVPSSTP that employs the
18//! Margules approximation for the excess Gibbs free energy
19/*!
20 * MargulesVPSSTP derives from class GibbsExcessVPSSTP which is derived from
21 * VPStandardStateTP, and overloads the virtual methods defined there with ones
22 * that use expressions appropriate for the Margules Excess Gibbs free energy
23 * approximation.
24 *
25 * The independent unknowns are pressure, temperature, and mass fraction.
26 *
27 * ## Specification of Species Standard State Properties
28 *
29 * All species are defined to have standard states that depend upon both the
30 * temperature and the pressure. The Margules approximation assumes symmetric
31 * standard states, where all of the standard state assume that the species are
32 * in pure component states at the temperature and pressure of the solution. I
33 * don't think it prevents, however, some species from being dilute in the
34 * solution.
35 *
36 * ## Specification of Solution Thermodynamic Properties
37 *
38 * The molar excess Gibbs free energy is given by the following formula which is
39 * a sum over interactions *i*. Each of the interactions are binary interactions
40 * involving two of the species in the phase, denoted, *Ai* and *Bi*. This is
41 * the generalization of the Margules formulation for a phase that has more than
42 * 2 species.
43 *
44 * @f[
45 * G^E = \sum_i \left( H_{Ei} - T S_{Ei} + (P - P_{ref}) V^E_i \right)
46 * @f]
47 * @f[
48 * H^E_i = n X_{Ai} X_{Bi} \left( h_{o,i} + h_{1,i} X_{Bi} \right)
49 * @f]
50 * @f[
51 * S^E_i = n X_{Ai} X_{Bi} \left( s_{o,i} + s_{1,i} X_{Bi} \right)
52 * @f]
53 * @f[
54 * V^E_i = n X_{Ai} X_{Bi} \left( v_{o,i} + v_{1,i} X_{Bi} \right)
55 * @f]
56 *
57 * where n is the total moles in the solution, @f$ P_{ref} @f$ is the
58 * standard-state reference pressure (1 atm), and @f$ v_{o,i} = v^{HE}_{o,i} -
59 * T \cdot v^{SE}_{o,i} @f$, @f$ v_{1,i} = v^{HE}_{1,i} - T \cdot
60 * v^{SE}_{1,i} @f$ where @f$ v^{HE} @f$ and @f$ v^{SE} @f$ are the
61 * `excess-volume-enthalpy` and `excess-volume-entropy` interaction parameters.
62 * The @f$ (P - P_{\rm ref}) V^E_i @f$ term is what makes the Maxwell relation
63 * @f$ (\partial S/\partial P)_T = -(\partial V/\partial T)_P @f$ consistent
64 * with the non-zero, temperature-dependent excess volume.
65 *
66 * The activity of a species defined in the phase is given by an excess Gibbs
67 * free energy formulation.
68 *
69 * @f[
70 * a_k = \gamma_k X_k
71 * @f]
72 *
73 * where
74 *
75 * @f[
76 * R T \ln( \gamma_k )= \frac{d(n G^E)}{d(n_k)}\Bigg|_{n_i}
77 * @f]
78 *
79 * Taking the derivatives results in the following expression
80 *
81 * @f[
82 * R T \ln( \gamma_k )= \sum_i \left( \left( \delta_{Ai,k} X_{Bi} + \delta_{Bi,k} X_{Ai} - X_{Ai} X_{Bi} \right)
83 * \left( g^E_{o,i} + g^E_{1,i} X_{Bi} \right) +
84 * \left( \delta_{Bi,k} - X_{Bi} \right) X_{Ai} X_{Bi} g^E_{1,i} \right)
85 * @f]
86 * where
87 * @f$ g^E_{o,i} = h_{o,i} - T s_{o,i} + (P - P_{\rm ref})(v^{HE}_{o,i} - T \cdot v^{SE}_{o,i}) @f$
88 * and
89 * @f$ g^E_{1,i} = h_{1,i} - T s_{1,i} + (P - P_{\rm ref})(v^{HE}_{1,i} - T \cdot v^{SE}_{1,i}) @f$
90 * and where @f$ X_k @f$ is the mole fraction of species *k*.
91 *
92 * This object inherits from the class VPStandardStateTP. Therefore, the
93 * specification and calculation of all standard state and reference state
94 * values are handled at that level. Various functional forms for the standard
95 * state are permissible. The chemical potential for species *k* is equal to
96 *
97 * @f[
98 * \mu_k(T,P) = \mu^o_k(T, P) + R T \ln(\gamma_k X_k)
99 * @f]
100 *
101 * The partial molar entropy for species *k* is given by
102 *
103 * @f[
104 * \tilde{s}_k(T,P) = s^o_k(T,P) - R \ln( \gamma_k X_k )
105 * - R T \frac{d \ln(\gamma_k) }{dT}
106 * @f]
107 *
108 * The partial molar enthalpy for species *k* is given by
109 *
110 * @f[
111 * \tilde{h}_k(T,P) = h^o_k(T,P) - R T^2 \frac{d \ln(\gamma_k)}{dT}
112 * @f]
113 *
114 * The partial molar volume for species *k* is
115 *
116 * @f[
117 * \tilde V_k(T,P) = V^o_k(T,P) + R T \frac{d \ln(\gamma_k) }{dP}
118 * @f]
119 *
120 * The partial molar Heat Capacity for species *k* is
121 *
122 * @f[
123 * \tilde{C}_{p,k}(T,P) = C^o_{p,k}(T,P) - 2 R T \frac{d \ln( \gamma_k )}{dT}
124 * - R T^2 \frac{d^2 \ln(\gamma_k) }{{dT}^2}
125 * @f]
126 *
127 * ## Application within Kinetics Managers
128 *
129 * @f$ C^a_k @f$ are defined such that @f$ a_k = C^a_k / C^s_k, @f$ where
130 * @f$ C^s_k @f$ is a standard concentration defined below and @f$ a_k @f$ are
131 * activities used in the thermodynamic functions. These activity (or
132 * generalized) concentrations are used by kinetics manager classes to compute
133 * the forward and reverse rates of elementary reactions. The activity
134 * concentration,@f$ C^a_k @f$,is given by the following expression.
135 *
136 * @f[
137 * C^a_k = C^s_k X_k = \frac{P}{R T} X_k
138 * @f]
139 *
140 * The standard concentration for species *k* is independent of *k* and equal to
141 *
142 * @f[
143 * C^s_k = C^s = \frac{P}{R T}
144 * @f]
145 *
146 * For example, a bulk-phase binary gas reaction between species j and k,
147 * producing a new gas species l would have the following equation for its rate
148 * of progress variable, @f$ R^1 @f$, which has units of kmol m-3 s-1.
149 *
150 * @f[
151 * R^1 = k^1 C_j^a C_k^a = k^1 (C^s a_j) (C^s a_k)
152 * @f]
153 * where
154 * @f[
155 * C_j^a = C^s a_j \mbox{\quad and \quad} C_k^a = C^s a_k
156 * @f]
157 *
158 * @f$ C_j^a @f$ is the activity concentration of species j, and @f$ C_k^a @f$
159 * is the activity concentration of species k. @f$ C^s @f$ is the standard
160 * concentration. @f$ a_j @f$ is the activity of species j which is equal to the
161 * mole fraction of j.
162 *
163 * The reverse rate constant can then be obtained from the law of microscopic
164 * reversibility and the equilibrium expression for the system.
165 *
166 * @f[
167 * \frac{a_j a_k}{ a_l} = K_a^{o,1} = \exp(\frac{\mu^o_l - \mu^o_j - \mu^o_k}{R T} )
168 * @f]
169 *
170 * @f$ K_a^{o,1} @f$ is the dimensionless form of the equilibrium constant,
171 * associated with the pressure dependent standard states @f$ \mu^o_l(T,P) @f$
172 * and their associated activities, @f$ a_l @f$, repeated here:
173 *
174 * @f[
175 * \mu_l(T,P) = \mu^o_l(T, P) + R T \ln a_l
176 * @f]
177 *
178 * We can switch over to expressing the equilibrium constant in terms of the
179 * reference state chemical potentials
180 *
181 * @f[
182 * K_a^{o,1} = \exp(\frac{\mu^{ref}_l - \mu^{ref}_j - \mu^{ref}_k}{R T} ) * \frac{P_{ref}}{P}
183 * @f]
184 *
185 * The concentration equilibrium constant, @f$ K_c @f$, may be obtained by
186 * changing over to activity concentrations. When this is done:
187 *
188 * @f[
189 * \frac{C^a_j C^a_k}{ C^a_l} = C^o K_a^{o,1} = K_c^1 =
190 * \exp(\frac{\mu^{ref}_l - \mu^{ref}_j - \mu^{ref}_k}{R T} ) * \frac{P_{ref}}{RT}
191 * @f]
192 *
193 * %Kinetics managers will calculate the concentration equilibrium constant, @f$
194 * K_c @f$, using the second and third part of the above expression as a
195 * definition for the concentration equilibrium constant.
196 *
197 * For completeness, the pressure equilibrium constant may be obtained as well
198 *
199 * @f[
200 * \frac{P_j P_k}{ P_l P_{ref}} = K_p^1 = \exp(\frac{\mu^{ref}_l - \mu^{ref}_j - \mu^{ref}_k}{R T} )
201 * @f]
202 *
203 * @f$ K_p @f$ is the simplest form of the equilibrium constant for ideal gases.
204 * However, it isn't necessarily the simplest form of the equilibrium constant
205 * for other types of phases; @f$ K_c @f$ is used instead because it is
206 * completely general.
207 *
208 * The reverse rate of progress may be written down as
209 * @f[
210 * R^{-1} = k^{-1} C_l^a = k^{-1} (C^o a_l)
211 * @f]
212 *
213 * where we can use the concept of microscopic reversibility to write the
214 * reverse rate constant in terms of the forward rate constant and the
215 * concentration equilibrium constant, @f$ K_c @f$.
216 *
217 * @f[
218 * k^{-1} = k^1 K^1_c
219 * @f]
220 *
221 * @f$ k^{-1} @f$ has units of s-1.
222 *
223 * @ingroup thermoprops
224 */
226{
227public:
228 //! Construct a MargulesVPSSTP object from an input file
229 /*!
230 * @param inputFile Name of the input file containing the phase definition.
231 * If blank, an empty phase will be created.
232 * @param id name (ID) of the phase in the input file. If empty, the
233 * first phase definition in the input file will be used.
234 */
235 explicit MargulesVPSSTP(const string& inputFile="", const string& id="");
236
237 string type() const override {
238 return "Margules";
239 }
240
241 //! @name Molar Thermodynamic Properties
242 //! @{
243
244 //! Molar heat capacity at constant volume.
245 //!
246 //! For a Margules phase with pressure-dependent standard state volumes, the
247 //! thermodynamic identity @f$ c_v = c_p - T v \beta^2 / \kappa_T @f$ is used.
248 //! If @f$ \kappa_T = 0 @f$ (all species have pressure-independent standard state
249 //! volumes), then @f$ c_v = c_p @f$.
250 double cv_mole() const override;
251
252 //! Isothermal compressibility of the mixture.
253 /*!
254 * Computed as
255 * @f[
256 * \kappa_T = -\frac{1}{v} \sum_k X_k \frac{\partial V^\circ_k}{\partial P}\Bigg|_T
257 * @f]
258 * The Margules excess volume has no pressure dependence, so only the standard
259 * state PDSS derivatives contribute.
260 */
261 double isothermalCompressibility() const override;
262
263 //! Thermal expansion coefficient of the mixture.
264 /*!
265 * Computed as
266 * @f[
267 * \beta = \frac{1}{v} \left(
268 * \sum_k X_k \frac{\partial V^\circ_k}{\partial T}\Bigg|_P
269 * + \frac{\partial V_\mathrm{excess}}{\partial T}\Bigg|_{P,X}
270 * \right)
271 * @f]
272 * where the excess volume T-derivative is computed analytically from the
273 * Margules excess-volume-entropy interaction parameters.
274 */
275 double thermalExpansionCoeff() const override;
276
277 //! @}
278 //! @name Activities, Standard States, and Activity Concentrations
279 //!
280 //! The activity @f$ a_k @f$ of a species in solution is related to the
281 //! chemical potential by @f[ \mu_k = \mu_k^0(T) + \hat R T \ln a_k. @f] The
282 //! quantity @f$ \mu_k^0(T,P) @f$ is the chemical potential at unit activity,
283 //! which depends only on temperature and pressure.
284 //! @{
285
286 void getLnActivityCoefficients(span<double> lnac) const override;
287
288 //! @}
289 //! @name Partial Molar Properties of the Solution
290 //! @{
291
292 void getChemPotentials(span<double> mu) const override;
293
294 //! Returns an array of partial molar enthalpies for the species in the
295 //! mixture.
296 /*!
297 * Units (J/kmol)
298 *
299 * For this phase, the partial molar enthalpies are equal to the standard
300 * state enthalpies modified by the derivative of the molality-based
301 * activity coefficient wrt temperature
302 *
303 * @f[
304 * \bar h_k(T,P) = h^o_k(T,P) - R T^2 \frac{d \ln(\gamma_k)}{dT}
305 * @f]
306 *
307 * @param hbar Vector of returned partial molar enthalpies
308 * (length m_kk, units = J/kmol)
309 */
310 void getPartialMolarEnthalpies(span<double> hbar) const override;
311
312 //! Returns an array of partial molar entropies for the species in the
313 //! mixture.
314 /*!
315 * Units (J/kmol)
316 *
317 * For this phase, the partial molar enthalpies are equal to the standard
318 * state enthalpies modified by the derivative of the activity coefficient
319 * wrt temperature
320 *
321 * @f[
322 * \bar s_k(T,P) = s^o_k(T,P) - R T^2 \frac{d \ln(\gamma_k)}{dT}
323 * - R \ln( \gamma_k X_k)
324 * - R T \frac{d \ln(\gamma_k) }{dT}
325 * @f]
326 *
327 * @param sbar Vector of returned partial molar entropies
328 * (length m_kk, units = J/kmol/K)
329 */
330 void getPartialMolarEntropies(span<double> sbar) const override;
331
332 //! Returns an array of partial molar entropies for the species in the
333 //! mixture.
334 /*!
335 * Units (J/kmol)
336 *
337 * For this phase, the partial molar enthalpies are equal to the standard
338 * state enthalpies modified by the derivative of the activity coefficient
339 * wrt temperature
340 *
341 * @f[
342 * ???????????????
343 * \bar s_k(T,P) = s^o_k(T,P) - R T^2 \frac{d \ln(\gamma_k)}{dT}
344 * - R \ln( \gamma_k X_k)
345 * - R T \frac{d \ln(\gamma_k) }{dT}
346 * ???????????????
347 * @f]
348 *
349 * @param cpbar Vector of returned partial molar heat capacities
350 * (length m_kk, units = J/kmol/K)
351 */
352 void getPartialMolarCp(span<double> cpbar) const override;
353
354 void getPartialMolarVolumes(span<double> vbar) const override;
355
356 //! Get the array of temperature second derivatives of the log activity
357 //! coefficients
358 /*!
359 * units = 1/Kelvin
360 *
361 * @param d2lnActCoeffdT2 Output vector of temperature 2nd derivatives of
362 * the log Activity Coefficients. length = m_kk
363 */
364 void getd2lnActCoeffdT2(span<double> d2lnActCoeffdT2) const;
365
366 void getdlnActCoeffdT(span<double> dlnActCoeffdT) const override;
367
368 //! @}
369 //! @name Initialization
370 //!
371 //! The following methods are used in the process of constructing the phase
372 //! and setting its parameters from a specification in an input file. They
373 //! are not normally used in application programs. To see how they are used,
374 //! see importPhase()
375 //! @{
376
377 void initThermo() override;
378 void getParameters(AnyMap& phaseNode) const override;
379
380 //! Add a binary species interaction with the specified parameters
381 /*!
382 * @param speciesA name of the first species
383 * @param speciesB name of the second species
384 * @param h0 first excess enthalpy coefficient [J/kmol]
385 * @param h1 second excess enthalpy coefficient [J/kmol]
386 * @param s0 first excess entropy coefficient [J/kmol/K]
387 * @param s1 second excess entropy coefficient [J/kmol/K]
388 * @param vh0 first enthalpy coefficient for excess volume [m^3/kmol]
389 * @param vh1 second enthalpy coefficient for excess volume [m^3/kmol]
390 * @param vs0 first entropy coefficient for excess volume [m^3/kmol/K]
391 * @param vs1 second entropy coefficient for excess volume [m^3/kmol/K]
392 */
393 void addBinaryInteraction(const string& speciesA,
394 const string& speciesB, double h0, double h1, double s0, double s1,
395 double vh0, double vh1, double vs0, double vs1);
396
397 //! @}
398 //! @name Derivatives of Thermodynamic Variables needed for Applications
399 //! @{
400
401 void getdlnActCoeffds(const double dTds, span<const double> dXds,
402 span<double> dlnActCoeffds) const override;
403 void getdlnActCoeffdlnX_diag(span<double> dlnActCoeffdlnX_diag) const override;
404 void getdlnActCoeffdlnN_diag(span<double> dlnActCoeffdlnN_diag) const override;
405 void getdlnActCoeffdlnN(const size_t ld,
406 span<double> const dlnActCoeffdlnN) override;
407
408 //! @}
409
410private:
411 //! Initialize lengths of local variables after all species have been
412 //! identified.
413 void initLengths();
414
415 //! Update the activity coefficients
416 /*!
417 * This function will be called to update the internally stored natural
418 * logarithm of the activity coefficients
419 */
420 void s_update_lnActCoeff() const;
421
422 //! Update the derivative of the log of the activity coefficients wrt T
423 /*!
424 * This function will be called to update the internally stored derivative
425 * of the natural logarithm of the activity coefficients wrt temperature.
426 */
427 void s_update_dlnActCoeff_dT() const;
428
429 //! Update the derivative of the log of the activity coefficients wrt
430 //! log(mole fraction)
431 /*!
432 * This function will be called to update the internally stored derivative
433 * of the natural logarithm of the activity coefficients wrt logarithm of
434 * the mole fractions.
435 */
437
438 //! Update the derivative of the log of the activity coefficients wrt
439 //! log(moles) - diagonal only
440 /*!
441 * This function will be called to update the internally stored diagonal
442 * entries for the derivative of the natural logarithm of the activity
443 * coefficients wrt logarithm of the moles.
444 */
446
447 //! Update the derivative of the log of the activity coefficients wrt
448 //! log(moles_m)
449 /*!
450 * This function will be called to update the internally stored derivative
451 * of the natural logarithm of the activity coefficients wrt logarithm of
452 * the mole number of species
453 */
454 void s_update_dlnActCoeff_dlnN() const;
455
456protected:
457 //! number of binary interaction expressions
459
460 //! Enthalpy term for the binary mole fraction interaction of the
461 //! excess Gibbs free energy expression
462 mutable vector<double> m_HE_b_ij;
463
464 //! Enthalpy term for the ternary mole fraction interaction of the
465 //! excess Gibbs free energy expression
466 mutable vector<double> m_HE_c_ij;
467
468 //! Entropy term for the binary mole fraction interaction of the
469 //! excess Gibbs free energy expression
470 mutable vector<double> m_SE_b_ij;
471
472 //! Entropy term for the ternary mole fraction interaction of the
473 //! excess Gibbs free energy expression
474 mutable vector<double> m_SE_c_ij;
475
476 //! Enthalpy term for the binary mole fraction interaction of the
477 //! excess Gibbs free energy expression
478 mutable vector<double> m_VHE_b_ij;
479
480 //! Enthalpy term for the ternary mole fraction interaction of the
481 //! excess Gibbs free energy expression
482 mutable vector<double> m_VHE_c_ij;
483
484 //! Entropy term for the binary mole fraction interaction of the
485 //! excess Gibbs free energy expression
486 mutable vector<double> m_VSE_b_ij;
487
488 //! Entropy term for the ternary mole fraction interaction of the
489 //! excess Gibbs free energy expression
490 mutable vector<double> m_VSE_c_ij;
491
492 //! vector of species indices representing species A in the interaction
493 /*!
494 * Each Margules excess Gibbs free energy term involves two species, A and
495 * B. This vector identifies species A.
496 */
497 vector<size_t> m_pSpecies_A_ij;
498
499 //! vector of species indices representing species B in the interaction
500 /*!
501 * Each Margules excess Gibbs free energy term involves two species, A and
502 * B. This vector identifies species B.
503 */
504 vector<size_t> m_pSpecies_B_ij;
505
506 //! form of the Margules interaction expression
507 /*!
508 * Currently there is only one form.
509 */
511
512 //! form of the temperature dependence of the Margules interaction expression
513 /*!
514 * Currently there is only one form -> constant wrt temperature.
515 */
517};
518
519}
520
521#endif
Header for intermediate ThermoPhase object for phases which employ Gibbs excess free energy based for...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:431
GibbsExcessVPSSTP is a derived class of ThermoPhase that handles variable pressure standard state met...
MargulesVPSSTP is a derived class of GibbsExcessVPSSTP that employs the Margules approximation for th...
void getLnActivityCoefficients(span< double > lnac) const override
Get the array of non-dimensional molar-based ln activity coefficients at the current solution tempera...
double thermalExpansionCoeff() const override
Thermal expansion coefficient of the mixture.
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.
int formTempModel_
form of the temperature dependence of the Margules interaction 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 ...
string type() const override
String indicating the thermodynamic model implemented.
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.
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)
int formMargules_
form of the Margules interaction expression
double isothermalCompressibility() const override
Isothermal compressibility of the mixture.
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.
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.
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595