Cantera  3.1.0b1
Loading...
Searching...
No Matches
LatticePhase.h
Go to the documentation of this file.
1/**
2 * @file LatticePhase.h Header for a simple thermodynamics model of a bulk
3 * phase derived from ThermoPhase, assuming a lattice of solid atoms (see
4 * @ref thermoprops and class @link Cantera::LatticePhase
5 * LatticePhase@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#ifndef CT_LATTICE_H
12#define CT_LATTICE_H
13
14#include "ThermoPhase.h"
15
16namespace Cantera
17{
18
19//! A simple thermodynamic model for a bulk phase, assuming a lattice of solid
20//! atoms
21/*!
22 * The bulk consists of a matrix of equivalent sites whose molar density does
23 * not vary with temperature or pressure. The thermodynamics obeys the ideal
24 * solution laws. The phase and the pure species phases which comprise the
25 * standard states of the species are assumed to have zero volume expansivity
26 * and zero isothermal compressibility.
27 *
28 * The density of matrix sites is given by the variable @f$ C_o @f$, which has
29 * SI units of kmol m-3.
30 *
31 * ## Specification of Species Standard State Properties
32 *
33 * It is assumed that the reference state thermodynamics may be obtained by a
34 * pointer to a populated species thermodynamic property manager class (see
35 * ThermoPhase::m_spthermo). However, how to relate pressure changes to the
36 * reference state thermodynamics is within this class.
37 *
38 * Pressure is defined as an independent variable in this phase. However, it has
39 * no effect on any quantities, as the molar concentration is a constant.
40 *
41 * The standard state enthalpy function is given by the following relation,
42 * which has a weak dependence on the system pressure, @f$ P @f$.
43 *
44 * @f[
45 * h^o_k(T,P) =
46 * h^{ref}_k(T) + \left( \frac{P - P_{ref}}{C_o} \right)
47 * @f]
48 *
49 * For an incompressible substance, the molar internal energy is independent of
50 * pressure. Since the thermodynamic properties are specified by giving the
51 * standard-state enthalpy, the term @f$ \frac{P_{ref}}{C_o} @f$ is subtracted
52 * from the specified reference molar enthalpy to compute the standard state
53 * molar internal energy:
54 *
55 * @f[
56 * u^o_k(T,P) = h^{ref}_k(T) - \frac{P_{ref}}{C_o}
57 * @f]
58 *
59 * The standard state heat capacity, internal energy, and entropy are
60 * independent of pressure. The standard state Gibbs free energy is obtained
61 * from the enthalpy and entropy functions.
62 *
63 * The standard state molar volume is independent of temperature, pressure, and
64 * species identity:
65 *
66 * @f[
67 * V^o_k(T,P) = \frac{1.0}{C_o}
68 * @f]
69 *
70 * ## Specification of Solution Thermodynamic Properties
71 *
72 * The activity of species @f$ k @f$ defined in the phase, @f$ a_k @f$, is given
73 * by the ideal solution law:
74 *
75 * @f[
76 * a_k = X_k ,
77 * @f]
78 *
79 * where @f$ X_k @f$ is the mole fraction of species *k*. The chemical potential
80 * for species *k* is equal to
81 *
82 * @f[
83 * \mu_k(T,P) = \mu^o_k(T, P) + R T \ln X_k
84 * @f]
85 *
86 * The partial molar entropy for species *k* is given by the following relation,
87 *
88 * @f[
89 * \tilde{s}_k(T,P) = s^o_k(T,P) - R \ln X_k = s^{ref}_k(T) - R \ln X_k
90 * @f]
91 *
92 * The partial molar enthalpy for species *k* is
93 *
94 * @f[
95 * \tilde{h}_k(T,P) = h^o_k(T,P) = h^{ref}_k(T) + \left( \frac{P - P_{ref}}{C_o} \right)
96 * @f]
97 *
98 * The partial molar Internal Energy for species *k* is
99 *
100 * @f[
101 * \tilde{u}_k(T,P) = u^o_k(T,P) = u^{ref}_k(T)
102 * @f]
103 *
104 * The partial molar Heat Capacity for species *k* is
105 *
106 * @f[
107 * \tilde{Cp}_k(T,P) = Cp^o_k(T,P) = Cp^{ref}_k(T)
108 * @f]
109 *
110 * The partial molar volume is independent of temperature, pressure, and species
111 * identity:
112 *
113 * @f[
114 * \tilde{V}_k(T,P) = V^o_k(T,P) = \frac{1.0}{C_o}
115 * @f]
116 *
117 * It is assumed that the reference state thermodynamics may be obtained by a
118 * pointer to a populated species thermodynamic property manager class (see
119 * ThermoPhase::m_spthermo). How to relate pressure changes to the reference
120 * state thermodynamics is resolved at this level.
121 *
122 * Pressure is defined as an independent variable in this phase. However, it
123 * only has a weak dependence on the enthalpy, and doesn't effect the molar
124 * concentration.
125 *
126 * ## Application within Kinetics Managers
127 *
128 * @f$ C^a_k @f$ are defined such that @f$ C^a_k = a_k = X_k @f$. @f$ C^s_k @f$,
129 * the standard concentration, is defined to be equal to one. @f$ a_k @f$ are
130 * activities used in the thermodynamic functions. These activity (or
131 * generalized) concentrations are used by kinetics manager classes to compute
132 * the forward and reverse rates of elementary reactions. The activity
133 * concentration,@f$ C^a_k @f$, is given by the following expression.
134 *
135 * @f[
136 * C^a_k = C^s_k X_k = X_k
137 * @f]
138 *
139 * The standard concentration for species *k* is identically one
140 *
141 * @f[
142 * C^s_k = C^s = 1.0
143 * @f]
144 *
145 * For example, a bulk-phase binary gas reaction between species j and k,
146 * producing a new species l would have the following equation for its rate of
147 * progress variable, @f$ R^1 @f$, which has units of kmol m-3 s-1.
148 *
149 * @f[
150 * R^1 = k^1 C_j^a C_k^a = k^1 X_j X_k
151 * @f]
152 *
153 * The reverse rate constant can then be obtained from the law of microscopic
154 * reversibility and the equilibrium expression for the system.
155 *
156 * @f[
157 * \frac{X_j X_k}{ X_l} = K_a^{o,1} = \exp(\frac{\mu^o_l - \mu^o_j - \mu^o_k}{R T} )
158 * @f]
159 *
160 * @f$ K_a^{o,1} @f$ is the dimensionless form of the equilibrium constant,
161 * associated with the pressure dependent standard states @f$ \mu^o_l(T,P) @f$
162 * and their associated activities,
163 * @f$ a_l @f$, repeated here:
164 *
165 * @f[
166 * \mu_l(T,P) = \mu^o_l(T, P) + R T \ln a_l
167 * @f]
168 *
169 * The concentration equilibrium constant, @f$ K_c @f$, may be obtained by
170 * changing over to activity concentrations. When this is done:
171 *
172 * @f[
173 * \frac{C^a_j C^a_k}{ C^a_l} = C^o K_a^{o,1} = K_c^1 =
174 * \exp(\frac{\mu^{o}_l - \mu^{o}_j - \mu^{o}_k}{R T} )
175 * @f]
176 *
177 * %Kinetics managers will calculate the concentration equilibrium constant, @f$
178 * K_c @f$, using the second and third part of the above expression as a
179 * definition for the concentration equilibrium constant.
180 *
181 * @ingroup thermoprops
182 */
184{
185public:
186 //! Full constructor for a lattice phase
187 /*!
188 * @param inputFile String name of the input file. If blank,
189 * an empty phase will be created.
190 * @param id string id of the phase name
191 */
192 explicit LatticePhase(const string& inputFile="", const string& id="");
193
194 string type() const override {
195 return "lattice";
196 }
197
198 bool isCompressible() const override {
199 return false;
200 }
201
202 map<string, size_t> nativeState() const override {
203 return { {"T", 0}, {"P", 1}, {"X", 2} };
204 }
205
206 //! @name Molar Thermodynamic Properties of the Solution
207 //! @{
208
209 //! Return the Molar Enthalpy. Units: J/kmol.
210 /*!
211 * For an ideal solution,
212 *
213 * @f[
214 * \hat h(T,P) = \sum_k X_k \hat h^0_k(T,P),
215 * @f]
216 *
217 * The standard-state pure-species Enthalpies @f$ \hat h^0_k(T,P) @f$ are
218 * computed first by the species reference state thermodynamic property
219 * manager and then a small pressure dependent term is added in.
220 *
221 * \see MultiSpeciesThermo
222 */
223 double enthalpy_mole() const override;
224
225 //! Molar entropy of the solution. Units: J/kmol/K
226 /*!
227 * For an ideal, constant partial molar volume solution mixture with
228 * pure species phases which exhibit zero volume expansivity:
229 * @f[
230 * \hat s(T, P, X_k) = \sum_k X_k \hat s^0_k(T) - \hat R \sum_k X_k \ln(X_k)
231 * @f]
232 * The reference-state pure-species entropies @f$ \hat s^0_k(T,p_{ref}) @f$
233 * are computed by the species thermodynamic property manager. The pure
234 * species entropies are independent of pressure since the volume
235 * expansivities are equal to zero.
236 *
237 * Units: J/kmol/K.
238 *
239 * @see MultiSpeciesThermo
240 */
241 double entropy_mole() const override;
242
243 //! Molar heat capacity at constant pressure of the solution.
244 //! Units: J/kmol/K.
245 /*!
246 * For an ideal, constant partial molar volume solution mixture with
247 * pure species phases which exhibit zero volume expansivity:
248 * @f[
249 * \hat c_p(T,P) = \sum_k X_k \hat c^0_{p,k}(T) .
250 * @f]
251 * The heat capacity is independent of pressure. The reference-state pure-
252 * species heat capacities @f$ \hat c^0_{p,k}(T) @f$ are computed by the
253 * species thermodynamic property manager.
254 *
255 * @see MultiSpeciesThermo
256 */
257 double cp_mole() const override;
258
259 //! Molar heat capacity at constant volume of the solution.
260 //! Units: J/kmol/K.
261 /*!
262 * For an ideal, constant partial molar volume solution mixture with
263 * pure species phases which exhibit zero volume expansivity:
264 * @f[
265 * \hat c_v(T,P) = \hat c_p(T,P)
266 * @f]
267 *
268 * The two heat capacities are equal.
269 */
270 double cv_mole() const override;
271
272 //! @}
273 //! @name Mechanical Equation of State Properties
274 //!
275 //! In this equation of state implementation, the density is a function only
276 //! of the mole fractions. Therefore, it can't be an independent variable.
277 //! Instead, the pressure is used as the independent variable. Functions
278 //! which try to set the thermodynamic state by calling setDensity() may
279 //! cause an exception to be thrown.
280 //! @{
281
282 //! Pressure. Units: Pa.
283 /*!
284 * For this incompressible system, we return the internally stored
285 * independent value of the pressure.
286 */
287 double pressure() const override {
288 return m_Pcurrent;
289 }
290
291 //! Set the internally stored pressure (Pa) at constant temperature and
292 //! composition
293 /*!
294 * This method sets the pressure within the object. The mass density is not
295 * a function of pressure.
296 *
297 * @param p Input Pressure (Pa)
298 */
299 void setPressure(double p) override;
300
301 //! Calculate the density of the mixture using the partial molar volumes and
302 //! mole fractions as input
303 /*!
304 * The formula for this is
305 *
306 * @f[
307 * \rho = \frac{\sum_k{X_k W_k}}{\sum_k{X_k V_k}}
308 * @f]
309 *
310 * where @f$ X_k @f$ are the mole fractions, @f$ W_k @f$ are the molecular
311 * weights, and @f$ V_k @f$ are the pure species molar volumes.
312 *
313 * Note, the basis behind this formula is that in an ideal solution the
314 * partial molar volumes are equal to the pure species molar volumes. We
315 * have additionally specified in this class that the pure species molar
316 * volumes are independent of temperature and pressure.
317 */
318 double calcDensity();
319
320 //! @}
321 //! @name Activities, Standard States, and Activity Concentrations
322 //!
323 //! The activity @f$ a_k @f$ of a species in solution is related to the
324 //! chemical potential by @f[ \mu_k = \mu_k^0(T) + \hat R T \ln a_k. @f] The
325 //! quantity @f$ \mu_k^0(T,P) @f$ is the chemical potential at unit activity,
326 //! which depends only on temperature and the pressure. Activity is assumed
327 //! to be molality-based here.
328 //! @{
329
330 Units standardConcentrationUnits() const override;
331 void getActivityConcentrations(double* c) const override;
332
333 //! Return the standard concentration for the kth species
334 /*!
335 * The standard concentration @f$ C^0_k @f$ used to normalize
336 * the activity (that is, generalized) concentration for use
337 *
338 * For the time being, we will use the concentration of pure solvent for the
339 * the standard concentration of all species. This has the effect of making
340 * mass-action reaction rates based on the molality of species proportional
341 * to the molality of the species.
342 *
343 * @param k Optional parameter indicating the species. The default is to
344 * assume this refers to species 0.
345 * @returns the standard Concentration in units of m^3/kmol.
346 */
347 double standardConcentration(size_t k=0) const override;
348 double logStandardConc(size_t k=0) const override;
349
350 //! Get the array of non-dimensional activity coefficients at
351 //! the current solution temperature, pressure, and solution concentration.
352 /*!
353 * For this phase, the activity coefficients are all equal to one.
354 *
355 * @param ac Output vector of activity coefficients. Length: m_kk.
356 */
357 void getActivityCoefficients(double* ac) const override;
358
359 //! @}
360 //! @name Partial Molar Properties of the Solution
361 //! @{
362
363 //! Get the species chemical potentials. Units: J/kmol.
364 /*!
365 * This function returns a vector of chemical potentials of the species in
366 * solid solution at the current temperature, pressure and mole fraction of
367 * the solid solution.
368 *
369 * @param mu Output vector of species chemical
370 * potentials. Length: m_kk. Units: J/kmol
371 */
372 void getChemPotentials(double* mu) const override;
373
374 /**
375 * Returns an array of partial molar enthalpies for the species in the
376 * mixture. Units (J/kmol). For this phase, the partial molar enthalpies are
377 * equal to the pure species enthalpies
378 * @f[
379 * \bar h_k(T,P) = \hat h^{ref}_k(T) + (P - P_{ref}) \hat V^0_k
380 * @f]
381 * The reference-state pure-species enthalpies, @f$ \hat h^{ref}_k(T) @f$,
382 * at the reference pressure,@f$ P_{ref} @f$, are computed by the species
383 * thermodynamic property manager. They are polynomial functions of
384 * temperature.
385 * @see MultiSpeciesThermo
386 *
387 * @param hbar Output vector containing partial molar enthalpies.
388 * Length: m_kk.
389 */
390 void getPartialMolarEnthalpies(double* hbar) const override;
391
392 /**
393 * Returns an array of partial molar entropies of the species in the
394 * solution. Units: J/kmol/K. For this phase, the partial molar entropies
395 * are equal to the pure species entropies plus the ideal solution
396 * contribution.
397 * @f[
398 * \bar s_k(T,P) = \hat s^0_k(T) - R \ln(X_k)
399 * @f]
400 * The reference-state pure-species entropies,@f$ \hat s^{ref}_k(T) @f$, at
401 * the reference pressure, @f$ P_{ref} @f$, are computed by the species
402 * thermodynamic property manager. They are polynomial functions of
403 * temperature.
404 * @see MultiSpeciesThermo
405 *
406 * @param sbar Output vector containing partial molar entropies.
407 * Length: m_kk.
408 */
409 void getPartialMolarEntropies(double* sbar) const override;
410
411 /**
412 * Returns an array of partial molar Heat Capacities at constant pressure of
413 * the species in the solution. Units: J/kmol/K. For this phase, the partial
414 * molar heat capacities are equal to the standard state heat capacities.
415 *
416 * @param cpbar Output vector of partial heat capacities. Length: m_kk.
417 */
418 void getPartialMolarCp(double* cpbar) const override;
419
420 void getPartialMolarVolumes(double* vbar) const override;
421 void getStandardChemPotentials(double* mu) const override;
422 void getPureGibbs(double* gpure) const override;
423
424 //! @}
425 //! @name Properties of the Standard State of the Species in the Solution
426 //! @{
427
428 //! Get the nondimensional Enthalpy functions for the species standard
429 //! states at their standard states at the current *T* and *P* of the
430 //! solution.
431 /*!
432 * A small pressure dependent term is added onto the reference state enthalpy
433 * to get the pressure dependence of this term.
434 *
435 * @f[
436 * h^o_k(T,P) = h^{ref}_k(T) + \left( \frac{P - P_{ref}}{C_o} \right)
437 * @f]
438 *
439 * The reference state thermodynamics is obtained by a pointer to a
440 * populated species thermodynamic property manager class (see
441 * ThermoPhase::m_spthermo). How to relate pressure changes to the reference
442 * state thermodynamics is resolved at this level.
443 *
444 * @param hrt Output vector of nondimensional standard state enthalpies.
445 * Length: m_kk.
446 */
447 void getEnthalpy_RT(double* hrt) const override;
448
449 //! Get the array of nondimensional Entropy functions for the species
450 //! standard states at the current *T* and *P* of the solution.
451 /*!
452 * The entropy of the standard state is defined as independent of
453 * pressure here.
454 *
455 * @f[
456 * s^o_k(T,P) = s^{ref}_k(T)
457 * @f]
458 *
459 * The reference state thermodynamics is obtained by a pointer to a
460 * populated species thermodynamic property manager class (see
461 * ThermoPhase::m_spthermo). How to relate pressure changes to the reference
462 * state thermodynamics is resolved at this level.
463 *
464 * @param sr Output vector of nondimensional standard state entropies.
465 * Length: m_kk.
466 */
467 void getEntropy_R(double* sr) const override;
468
469 //! Get the nondimensional Gibbs functions for the species standard states
470 //! at the current *T* and *P* of the solution.
471 /*!
472 * The standard Gibbs free energies are obtained from the enthalpy and
473 * entropy formulation.
474 *
475 * @f[
476 * g^o_k(T,P) = h^{o}_k(T,P) - T s^{o}_k(T,P)
477 * @f]
478 *
479 * @param grt Output vector of nondimensional standard state Gibbs free
480 * energies. Length: m_kk.
481 */
482 void getGibbs_RT(double* grt) const override;
483
484 //! Get the nondimensional Heat Capacities at constant pressure for the
485 //! species standard states at the current *T* and *P* of the solution
486 /*!
487 * The heat capacity of the standard state is independent of pressure
488 *
489 * @f[
490 * Cp^o_k(T,P) = Cp^{ref}_k(T)
491 * @f]
492 *
493 * The reference state thermodynamics is obtained by a pointer to a
494 * populated species thermodynamic property manager class (see
495 * ThermoPhase::m_spthermo). How to relate pressure changes to the reference
496 * state thermodynamics is resolved at this level.
497 *
498 * @param cpr Output vector of nondimensional standard state heat
499 * capacities. Length: m_kk.
500 */
501 void getCp_R(double* cpr) const override;
502
503 void getStandardVolumes(double* vol) const override;
504
505 //! @}
506 //! @name Thermodynamic Values for the Species Reference States
507 //! @{
508
509 const vector<double>& enthalpy_RT_ref() const;
510
511 //! Returns a reference to the dimensionless reference state Gibbs free
512 //! energy vector.
513 /*!
514 * This function is part of the layer that checks/recalculates the reference
515 * state thermo functions.
516 */
517 const vector<double>& gibbs_RT_ref() const;
518
519 void getGibbs_RT_ref(double* grt) const override;
520 void getGibbs_ref(double* g) const override;
521
522 //! Returns a reference to the dimensionless reference state Entropy vector.
523 /*!
524 * This function is part of the layer that checks/recalculates the reference
525 * state thermo functions.
526 */
527 const vector<double>& entropy_R_ref() const;
528
529 //! Returns a reference to the dimensionless reference state Heat Capacity
530 //! vector.
531 /*!
532 * This function is part of the layer that checks/recalculates the reference
533 * state thermo functions.
534 */
535 const vector<double>& cp_R_ref() const;
536
537 //! @}
538 //! @name Utilities for Initialization of the Object
539 //! @{
540
541 bool addSpecies(shared_ptr<Species> spec) override;
542
543 //! Set the density of lattice sites [kmol/m^3]
544 void setSiteDensity(double sitedens);
545
546 void initThermo() override;
547 void getParameters(AnyMap& phaseNode) const override;
548 void getSpeciesParameters(const string& name, AnyMap& speciesNode) const override;
549
550 //! @}
551
552protected:
553 void compositionChanged() override;
554
555 //! Reference state pressure
556 double m_Pref = OneAtm;
557
558 //! The current pressure
559 /*!
560 * Since the density isn't a function of pressure, but only of the mole
561 * fractions, we need to independently specify the pressure. The density
562 * variable which is inherited as part of the State class, m_dens, is always
563 * kept current whenever T, P, or X[] change.
564 */
566
567 //! Reference state enthalpies / RT
568 mutable vector<double> m_h0_RT;
569
570 //! Temporary storage for the reference state heat capacities
571 mutable vector<double> m_cp0_R;
572
573 //! Temporary storage for the reference state Gibbs energies
574 mutable vector<double> m_g0_RT;
575
576 //! Temporary storage for the reference state entropies at the current
577 //! temperature
578 mutable vector<double> m_s0_R;
579
580 //! Vector of molar volumes for each species in the solution
581 /**
582 * Species molar volumes @f$ m^3 kmol^-1 @f$
583 */
584 vector<double> m_speciesMolarVolume;
585
586 //! Site Density of the lattice solid
587 /*!
588 * Currently, this is imposed as a function of T, P or composition
589 *
590 * units are kmol m-3
591 */
592 double m_site_density = 0.0;
593
594private:
595 //! Update the species reference state thermodynamic functions
596 /*!
597 * The polynomials for the standard state functions are only reevaluated if
598 * the temperature has changed.
599 */
600 void _updateThermo() const;
601};
602}
603
604#endif
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
A map of string keys to values whose type can vary at runtime.
Definition AnyMap.h:431
A simple thermodynamic model for a bulk phase, assuming a lattice of solid atoms.
const vector< double > & entropy_R_ref() const
Returns a reference to the dimensionless reference state Entropy vector.
double enthalpy_mole() const override
Return the Molar Enthalpy. Units: J/kmol.
double logStandardConc(size_t k=0) const override
Natural logarithm of the standard concentration of the kth species.
void getPartialMolarEnthalpies(double *hbar) const override
Returns an array of partial molar enthalpies for the species in the mixture.
void getChemPotentials(double *mu) const override
Get the species chemical potentials. Units: J/kmol.
double m_site_density
Site Density of the lattice solid.
double pressure() const override
Pressure. Units: Pa.
vector< double > m_g0_RT
Temporary storage for the reference state Gibbs energies.
bool isCompressible() const override
Return whether phase represents a compressible substance.
void getSpeciesParameters(const string &name, AnyMap &speciesNode) const override
Get phase-specific parameters of a Species object such that an identical one could be reconstructed a...
map< string, size_t > nativeState() const override
Return a map of properties defining the native state of a substance.
void getEntropy_R(double *sr) const override
Get the array of nondimensional Entropy functions for the species standard states at the current T an...
vector< double > m_h0_RT
Reference state enthalpies / RT.
void getGibbs_ref(double *g) const override
Returns the vector of the Gibbs function of the reference state at the current temperature of the sol...
double m_Pref
Reference state pressure.
void getStandardChemPotentials(double *mu) const override
Get the array of chemical potentials at unit activity for the species at their standard states at the...
void getCp_R(double *cpr) const override
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
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 getActivityConcentrations(double *c) const override
This method returns an array of generalized concentrations.
void setPressure(double p) override
Set the internally stored pressure (Pa) at constant temperature and composition.
const vector< double > & gibbs_RT_ref() const
Returns a reference to the dimensionless reference state Gibbs free energy vector.
void getPartialMolarVolumes(double *vbar) const override
Return an array of partial molar volumes for the species in the mixture.
double cv_mole() const override
Molar heat capacity at constant volume of the solution.
void getPureGibbs(double *gpure) const override
Get the Gibbs functions for the standard state of the species at the current T and P of the solution.
void getEnthalpy_RT(double *hrt) const override
Get the nondimensional Enthalpy functions for the species standard states at their standard states at...
vector< double > m_s0_R
Temporary storage for the reference state entropies at the current temperature.
void getGibbs_RT(double *grt) const override
Get the nondimensional Gibbs functions for the species standard states at the current T and P of the ...
double entropy_mole() const override
Molar entropy of the solution. Units: J/kmol/K.
void setSiteDensity(double sitedens)
Set the density of lattice sites [kmol/m^3].
vector< double > m_speciesMolarVolume
Vector of molar volumes for each species in the solution.
void getStandardVolumes(double *vol) const override
Get the molar volumes of the species standard states at the current T and P of the solution.
double cp_mole() const override
Molar heat capacity at constant pressure of the solution.
Units standardConcentrationUnits() const override
Returns the units of the "standard concentration" for this phase.
void getPartialMolarCp(double *cpbar) const override
Returns an array of partial molar Heat Capacities at constant pressure of the species in the solution...
void compositionChanged() override
Apply changes to the state which are needed after the composition changes.
double standardConcentration(size_t k=0) const override
Return the standard concentration for the kth species.
vector< double > m_cp0_R
Temporary storage for the reference state heat capacities.
double calcDensity()
Calculate the density of the mixture using the partial molar volumes and mole fractions as input.
bool addSpecies(shared_ptr< Species > spec) override
Add a Species to this Phase.
void _updateThermo() const
Update the species reference state thermodynamic functions.
void getGibbs_RT_ref(double *grt) const override
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
void getActivityCoefficients(double *ac) const override
Get the array of non-dimensional activity coefficients at the current solution temperature,...
void getPartialMolarEntropies(double *sbar) const override
Returns an array of partial molar entropies of the species in the solution.
const vector< double > & cp_R_ref() const
Returns a reference to the dimensionless reference state Heat Capacity vector.
double m_Pcurrent
The current pressure.
string name() const
Return the name of the phase.
Definition Phase.cpp:20
Base class for a phase with thermodynamic properties.
A representation of the units associated with a dimensional quantity.
Definition Units.h:35
const double OneAtm
One atmosphere [Pa].
Definition ct_defs.h:96
Namespace for the Cantera kernel.
Definition AnyMap.cpp:595