Cantera 2.6.0

IdealGasPhase.h
Go to the documentation of this file.
1/**
2 * @file IdealGasPhase.h
3 * ThermoPhase object for the ideal gas equation of
4 * state - workhorse for %Cantera (see \ref thermoprops
5 * and class \link Cantera::IdealGasPhase IdealGasPhase\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_IDEALGASPHASE_H
12#define CT_IDEALGASPHASE_H
13
14#include "ThermoPhase.h"
15
16 namespace Cantera
17{
18
19//! Class IdealGasPhase represents low-density gases that obey the ideal gas
20//! equation of state.
21/*!
22 *
23 * IdealGasPhase derives from class ThermoPhase, and overloads the virtual
24 * methods defined there with ones that use expressions appropriate for ideal
25 * gas mixtures.
26 *
27 * The independent unknowns are density, mass fraction, and temperature. the
28 * #setPressure() function will calculate the density consistent with the
29 * current mass fraction vector and temperature and the desired pressure, and
30 * then set the density.
31 *
32 * ## Specification of Species Standard State Properties
33 *
34 * It is assumed that the reference state thermodynamics may be obtained by a
35 * pointer to a populated species thermodynamic property manager class in the
36 * base class, ThermoPhase::m_spthermo (see the base class \link
37 * Cantera::MultiSpeciesThermo MultiSpeciesThermo \endlink for a description of
38 * the specification of reference state species thermodynamics functions). The
39 * reference state, where the pressure is fixed at a single pressure, is a key
40 * species property calculation for the Ideal Gas Equation of state.
41 *
42 * This class is optimized for speed of execution. All calls to thermodynamic
43 * functions first call internal routines (aka #enthalpy_RT_ref()) which return
44 * references the reference state thermodynamics functions. Within these
45 * internal reference state functions, the function #updateThermo() is called,
46 * that first checks to see whether the temperature has changed. If it has, it
47 * updates the internal reference state thermo functions by calling the
48 * MultiSpeciesThermo object.
49 *
50 * Functions for the calculation of standard state properties for species at
51 * arbitrary pressure are provided in IdealGasPhase. However, they are all
52 * derived from their reference state counterparts.
53 *
54 * The standard state enthalpy is independent of pressure:
55 *
56 * \f[
57 * h^o_k(T,P) = h^{ref}_k(T)
58 * \f]
59 *
60 * The standard state constant-pressure heat capacity is independent of pressure:
61 *
62 * \f[
63 * Cp^o_k(T,P) = Cp^{ref}_k(T)
64 * \f]
65 *
66 * The standard state entropy depends in the following fashion on pressure:
67 *
68 * \f[
69 * S^o_k(T,P) = S^{ref}_k(T) - R \ln(\frac{P}{P_{ref}})
70 * \f]
71 * The standard state Gibbs free energy is obtained from the enthalpy and entropy
72 * functions:
73 *
74 * \f[
75 * \mu^o_k(T,P) = h^o_k(T,P) - S^o_k(T,P) T
76 * \f]
77 *
78 * \f[
79 * \mu^o_k(T,P) = \mu^{ref}_k(T) + R T \ln( \frac{P}{P_{ref}})
80 * \f]
81 *
82 * where
83 * \f[
84 * \mu^{ref}_k(T) = h^{ref}_k(T) - T S^{ref}_k(T)
85 * \f]
86 *
87 * The standard state internal energy is obtained from the enthalpy function also
88 *
89 * \f[
90 * u^o_k(T,P) = h^o_k(T) - R T
91 * \f]
92 *
93 * The molar volume of a species is given by the ideal gas law
94 *
95 * \f[
96 * V^o_k(T,P) = \frac{R T}{P}
97 * \f]
98 *
99 * where R is the molar gas constant. For a complete list of physical constants
100 * used within %Cantera, see \ref physConstants .
101 *
102 * ## Specification of Solution Thermodynamic Properties
103 *
104 * The activity of a species defined in the phase is given by the ideal gas law:
105 * \f[
106 * a_k = X_k
107 * \f]
108 * where \f$ X_k \f$ is the mole fraction of species *k*. The chemical potential
109 * for species *k* is equal to
110 *
111 * \f[
112 * \mu_k(T,P) = \mu^o_k(T, P) + R T \log(X_k)
113 * \f]
114 *
115 * In terms of the reference state, the above can be rewritten
116 *
117 * \f[
118 * \mu_k(T,P) = \mu^{ref}_k(T, P) + R T \log(\frac{P X_k}{P_{ref}})
119 * \f]
120 *
121 * The partial molar entropy for species *k* is given by the following relation,
122 *
123 * \f[
124 * \tilde{s}_k(T,P) = s^o_k(T,P) - R \log(X_k) = s^{ref}_k(T) - R \log(\frac{P X_k}{P_{ref}})
125 * \f]
126 *
127 * The partial molar enthalpy for species *k* is
128 *
129 * \f[
130 * \tilde{h}_k(T,P) = h^o_k(T,P) = h^{ref}_k(T)
131 * \f]
132 *
133 * The partial molar Internal Energy for species *k* is
134 *
135 * \f[
136 * \tilde{u}_k(T,P) = u^o_k(T,P) = u^{ref}_k(T)
137 * \f]
138 *
139 * The partial molar Heat Capacity for species *k* is
140 *
141 * \f[
142 * \tilde{Cp}_k(T,P) = Cp^o_k(T,P) = Cp^{ref}_k(T)
143 * \f]
144 *
145 * ## %Application within Kinetics Managers
146 *
147 * \f$ C^a_k\f$ are defined such that \f$ a_k = C^a_k / C^s_k, \f$ where \f$
148 * C^s_k \f$ is a standard concentration defined below and \f$ a_k \f$ are
149 * activities used in the thermodynamic functions. These activity (or
150 * generalized) concentrations are used by kinetics manager classes to compute
151 * the forward and reverse rates of elementary reactions. The activity
152 * concentration,\f$ C^a_k \f$,is given by the following expression.
153 *
154 * \f[
155 * C^a_k = C^s_k X_k = \frac{P}{R T} X_k
156 * \f]
157 *
158 * The standard concentration for species *k* is independent of *k* and equal to
159 *
160 * \f[
161 * C^s_k = C^s = \frac{P}{R T}
162 * \f]
163 *
164 * For example, a bulk-phase binary gas reaction between species j and k,
165 * producing a new gas species l would have the following equation for its rate
166 * of progress variable, \f$ R^1 \f$, which has units of kmol m-3 s-1.
167 *
168 * \f[
169 * R^1 = k^1 C_j^a C_k^a = k^1 (C^s a_j) (C^s a_k)
170 * \f]
171 * where
172 * \f[
173 * C_j^a = C^s a_j \quad \mbox{and} \quad C_k^a = C^s a_k
174 * \f]
175 *
176 * \f$ C_j^a \f$ is the activity concentration of species j, and
177 * \f$ C_k^a \f$ is the activity concentration of species k. \f$ C^s \f$ is the
178 * standard concentration. \f$ a_j \f$ is the activity of species j which is
179 * equal to the mole fraction of j.
180 *
181 * The reverse rate constant can then be obtained from the law of microscopic
182 * reversibility and the equilibrium expression for the system.
183 *
184 * \f[
185 * \frac{a_j a_k}{ a_l} = K_a^{o,1} = \exp(\frac{\mu^o_l - \mu^o_j - \mu^o_k}{R T} )
186 * \f]
187 *
188 * \f$ K_a^{o,1} \f$ is the dimensionless form of the equilibrium constant,
189 * associated with the pressure dependent standard states \f$ \mu^o_l(T,P) \f$
190 * and their associated activities, \f$ a_l \f$, repeated here:
191 *
192 * \f[
193 * \mu_l(T,P) = \mu^o_l(T, P) + R T \log(a_l)
194 * \f]
195 *
196 * We can switch over to expressing the equilibrium constant in terms of the
197 * reference state chemical potentials
198 *
199 * \f[
200 * K_a^{o,1} = \exp(\frac{\mu^{ref}_l - \mu^{ref}_j - \mu^{ref}_k}{R T} ) * \frac{P_{ref}}{P}
201 * \f]
202 *
203 * The concentration equilibrium constant, \f$ K_c \f$, may be obtained by
204 * changing over to activity concentrations. When this is done:
205 *
206 * \f[
207 * \frac{C^a_j C^a_k}{ C^a_l} = C^o K_a^{o,1} = K_c^1 =
208 * \exp(\frac{\mu^{ref}_l - \mu^{ref}_j - \mu^{ref}_k}{R T} ) * \frac{P_{ref}}{RT}
209 * \f]
210 *
211 * %Kinetics managers will calculate the concentration equilibrium constant,
212 * \f$ K_c \f$, using the second and third part of the above expression as a
213 * definition for the concentration equilibrium constant.
214 *
215 * For completeness, the pressure equilibrium constant may be obtained as well
216 *
217 * \f[
218 * \frac{P_j P_k}{ P_l P_{ref}} = K_p^1 =
219 * \exp\left(\frac{\mu^{ref}_l - \mu^{ref}_j - \mu^{ref}_k}{R T} \right)
220 * \f]
221 *
222 * \f$ K_p \f$ is the simplest form of the equilibrium constant for ideal gases.
223 * However, it isn't necessarily the simplest form of the equilibrium constant
224 * for other types of phases; \f$ K_c \f$ is used instead because it is
225 * completely general.
226 *
227 * The reverse rate of progress may be written down as
228 * \f[
229 * R^{-1} = k^{-1} C_l^a = k^{-1} (C^o a_l)
230 * \f]
231 *
232 * where we can use the concept of microscopic reversibility to write the
233 * reverse rate constant in terms of the forward rate constant and the
234 * concentration equilibrium constant, \f$ K_c \f$.
235 *
236 * \f[
237 * k^{-1} = k^1 K^1_c
238 * \f]
239 *
240 * \f$k^{-1} \f$ has units of s-1.
241 *
242 * ## XML Example
243 *
244 * *Note: The XML input format is deprecated and will be removed in %Cantera 3.0*
245 *
246 * An example of an XML Element named phase setting up a IdealGasPhase
247 * object named silane is given below.
248 *
249 * @code
250 * <!-- phase silane -->
251 * <phase dim="3" id="silane">
252 * <elementArray datasrc="elements.xml"> Si H He </elementArray>
253 * <speciesArray datasrc="#species_data">
254 * H2 H HE SIH4 SI SIH SIH2 SIH3 H3SISIH SI2H6
255 * H2SISIH2 SI3H8 SI2 SI3
256 * </speciesArray>
257 * <reactionArray datasrc="#reaction_data"/>
258 * <thermo model="IdealGas"/>
259 * <kinetics model="GasKinetics"/>
260 * <transport model="None"/>
261 * </phase>
262 * @endcode
263 *
264 * The model attribute "IdealGas" of the thermo XML element identifies the phase
265 * as being of the type handled by the IdealGasPhase object.
266 *
267 * @ingroup thermoprops
268 */
269 class IdealGasPhase: public ThermoPhase
270{
271 public:
272 //! Construct and initialize an IdealGasPhase ThermoPhase object
273 //! directly from an ASCII input file
274 /*!
275 * @param inputFile Name of the input file containing the phase definition
276 * to set up the object. If blank, an empty phase will be
277 * created.
278 * @param id ID of the phase in the input file. Defaults to the
279 * empty string.
280 */
281 explicit IdealGasPhase(const std::string& inputFile="",
282 const std::string& id="");
283
284 //! Construct and initialize an IdealGasPhase ThermoPhase object
285 //! directly from an XML database
286 /*!
287 * @param phaseRef XML phase node containing the description of the phase
288 * @param id id attribute containing the name of the phase.
289 * (default is the empty string)
290 *
291 * @deprecated The XML input format is deprecated and will be removed in
292 * Cantera 3.0.
293 */
294 IdealGasPhase(XML_Node& phaseRef, const std::string& id = "");
295
296 virtual std::string type() const {
297 return "IdealGas";
298 }
299
300 virtual bool isIdeal() const {
301 return true;
302 }
303
304 //! String indicating the mechanical phase of the matter in this Phase.
305 /*!
306 * For the `IdealGasPhase`, this string is always `gas`.
307 */
308 virtual std::string phaseOfMatter() const {
309 return "gas";
310 }
311
312 //! @name Molar Thermodynamic Properties of the Solution
313 //! @{
314
315 //! Return the Molar enthalpy. Units: J/kmol.
316 /*!
317 * For an ideal gas mixture,
318 * \f[
319 * \hat h(T) = \sum_k X_k \hat h^0_k(T),
320 * \f]
321 * and is a function only of temperature. The standard-state pure-species
322 * enthalpies \f$ \hat h^0_k(T) \f$ are computed by the species
323 * thermodynamic property manager.
324 *
325 * \see MultiSpeciesThermo
326 */
327 virtual doublereal enthalpy_mole() const {
328 return RT() * mean_X(enthalpy_RT_ref());
329 }
330
331 /**
332 * Molar entropy. Units: J/kmol/K.
333 * For an ideal gas mixture,
334 * \f[
335 * \hat s(T, P) = \sum_k X_k \hat s^0_k(T) - \hat R \log (P/P^0).
336 * \f]
337 * The reference-state pure-species entropies \f$ \hat s^0_k(T) \f$ are
338 * computed by the species thermodynamic property manager.
339 * @see MultiSpeciesThermo
340 */
341 virtual doublereal entropy_mole() const;
342
343 /**
344 * Molar heat capacity at constant pressure. Units: J/kmol/K.
345 * For an ideal gas mixture,
346 * \f[
347 * \hat c_p(t) = \sum_k \hat c^0_{p,k}(T).
348 * \f]
349 * The reference-state pure-species heat capacities \f$ \hat c^0_{p,k}(T) \f$
350 * are computed by the species thermodynamic property manager.
351 * @see MultiSpeciesThermo
352 */
353 virtual doublereal cp_mole() const;
354
355 /**
356 * Molar heat capacity at constant volume. Units: J/kmol/K.
357 * For an ideal gas mixture,
358 * \f[ \hat c_v = \hat c_p - \hat R. \f]
359 */
360 virtual doublereal cv_mole() const;
361
362 //! @}
363 //! @name Mechanical Equation of State
364 //! @{
365
366 /**
367 * Pressure. Units: Pa.
368 * For an ideal gas mixture,
369 * \f[ P = n \hat R T. \f]
370 */
371 virtual doublereal pressure() const {
372 return GasConstant * molarDensity() * temperature();
373 }
374
375 //! Set the pressure at constant temperature and composition.
376 /*!
377 * Units: Pa.
378 * This method is implemented by setting the mass density to
379 * \f[
380 * \rho = \frac{P \overline W}{\hat R T }.
381 * \f]
382 *
383 * @param p Pressure (Pa)
384 */
385 virtual void setPressure(doublereal p) {
386 setDensity(p * meanMolecularWeight() / RT());
387 }
388
389 //! Set the density and pressure at constant composition.
390 /*!
391 * Units: kg/m^3, Pa.
392 * This method is implemented by setting the density to the input value and
393 * setting the temperature to
394 * \f[
395 * T = \frac{P \overline W}{\hat R \rho}.
396 * \f]
397 *
398 * @param rho Density (kg/m^3)
399 * @param p Pressure (Pa)
400 */
401 virtual void setState_RP(doublereal rho, doublereal p)
402 {
403 if (p <= 0) {
404 throw CanteraError("IdealGasPhase::setState_RP",
405 "pressure must be positive");
406 }
407 setDensity(rho);
408 setTemperature(p * meanMolecularWeight() / (GasConstant * rho));
409 }
410
411 //! Returns the isothermal compressibility. Units: 1/Pa.
412 /**
413 * The isothermal compressibility is defined as
414 * \f[
415 * \kappa_T = -\frac{1}{v}\left(\frac{\partial v}{\partial P}\right)_T
416 * \f]
417 * For ideal gases it's equal to the inverse of the pressure
418 */
419 virtual doublereal isothermalCompressibility() const {
420 return 1.0 / pressure();
421 }
422
423 //! Return the volumetric thermal expansion coefficient. Units: 1/K.
424 /*!
425 * The thermal expansion coefficient is defined as
426 * \f[
427 * \beta = \frac{1}{v}\left(\frac{\partial v}{\partial T}\right)_P
428 * \f]
429 * For ideal gases, it's equal to the inverse of the temperature.
430 */
431 virtual doublereal thermalExpansionCoeff() const {
432 return 1.0 / temperature();
433 }
434
435 //! @}
436
437 /**
438 * @name Chemical Potentials and Activities
439 *
440 * The activity \f$a_k\f$ of a species in solution is
441 * related to the chemical potential by
442 * \f[
443 * \mu_k(T,P,X_k) = \mu_k^0(T,P)
444 * + \hat R T \log a_k.
445 * \f]
446 * The quantity \f$\mu_k^0(T,P)\f$ is the standard state chemical potential
447 * at unit activity. It may depend on the pressure and the temperature.
448 * However, it may not depend on the mole fractions of the species in the
449 * solution.
450 *
451 * The activities are related to the generalized concentrations, \f$\tilde
452 * C_k\f$, and standard concentrations, \f$C^0_k\f$, by the following
453 * formula:
454 *
455 * \f[
456 * a_k = \frac{\tilde C_k}{C^0_k}
457 * \f]
458 * The generalized concentrations are used in the kinetics classes to
459 * describe the rates of progress of reactions involving the species. Their
460 * formulation depends upon the specification of the rate constants for
461 * reaction, especially the units used in specifying the rate constants. The
462 * bridge between the thermodynamic equilibrium expressions that use a_k and
463 * the kinetics expressions which use the generalized concentrations is
464 * provided by the multiplicative factor of the standard concentrations.
465 * @{
466 */
467
468 //! This method returns the array of generalized concentrations.
469 /*!
470 * For an ideal gas mixture, these are simply the actual concentrations.
471 *
472 * @param c Output array of generalized concentrations. The units depend
473 * upon the implementation of the reaction rate expressions within
474 * the phase.
475 */
476 virtual void getActivityConcentrations(doublereal* c) const {
477 getConcentrations(c);
478 }
479
480 //! Returns the standard concentration \f$ C^0_k \f$, which is used to
481 //! normalize the generalized concentration.
482 /*!
483 * This is defined as the concentration by which the generalized
484 * concentration is normalized to produce the activity. In many cases, this
485 * quantity will be the same for all species in a phase. Since the activity
486 * for an ideal gas mixture is simply the mole fraction, for an ideal gas
487 * \f$ C^0_k = P/\hat R T \f$.
488 *
489 * @param k Optional parameter indicating the species. The default
490 * is to assume this refers to species 0.
491 * @return
492 * Returns the standard Concentration in units of m3 kmol-1.
493 */
494 virtual doublereal standardConcentration(size_t k = 0) const;
495
496 //! Get the array of non-dimensional activity coefficients at the current
497 //! solution temperature, pressure, and solution concentration.
498 /*!
499 * For ideal gases, the activity coefficients are all equal to one.
500 *
501 * @param ac Output vector of activity coefficients. Length: m_kk.
502 */
503 virtual void getActivityCoefficients(doublereal* ac) const;
504
505 //! @}
506 /// @name Partial Molar Properties of the Solution
507 //! @{
508
509 virtual void getChemPotentials(doublereal* mu) const;
510 virtual void getPartialMolarEnthalpies(doublereal* hbar) const;
511 virtual void getPartialMolarEntropies(doublereal* sbar) const;
512 virtual void getPartialMolarIntEnergies(doublereal* ubar) const;
513 virtual void getPartialMolarCp(doublereal* cpbar) const;
514 virtual void getPartialMolarVolumes(doublereal* vbar) const;
515
516 //! @}
517 /// @name Properties of the Standard State of the Species in the Solution
518 //! @{
519
520 virtual void getStandardChemPotentials(doublereal* mu) const;
521 virtual void getEnthalpy_RT(doublereal* hrt) const;
522 virtual void getEntropy_R(doublereal* sr) const;
523 virtual void getGibbs_RT(doublereal* grt) const;
524 virtual void getPureGibbs(doublereal* gpure) const;
525 virtual void getIntEnergy_RT(doublereal* urt) const;
526 virtual void getCp_R(doublereal* cpr) const;
527 virtual void getStandardVolumes(doublereal* vol) const;
528
529 //! @}
530 /// @name Thermodynamic Values for the Species Reference States
531 //! @{
532
533 virtual void getEnthalpy_RT_ref(doublereal* hrt) const;
534 virtual void getGibbs_RT_ref(doublereal* grt) const;
535 virtual void getGibbs_ref(doublereal* g) const;
536 virtual void getEntropy_R_ref(doublereal* er) const;
537 virtual void getIntEnergy_RT_ref(doublereal* urt) const;
538 virtual void getCp_R_ref(doublereal* cprt) const;
539 virtual void getStandardVolumes_ref(doublereal* vol) const;
540
541 //! @}
542 /// @name NonVirtual Internal methods to Return References to Reference State Thermo
543 //! @{
544
545 //! Returns a reference to the dimensionless reference state enthalpy vector.
546 /*!
547 * This function is part of the layer that checks/recalculates the reference
548 * state thermo functions.
549 */
550 const vector_fp& enthalpy_RT_ref() const {
551 updateThermo();
552 return m_h0_RT;
553 }
554
555 //! Returns a reference to the dimensionless reference state Gibbs free energy vector.
556 /*!
557 * This function is part of the layer that checks/recalculates the reference
558 * state thermo functions.
559 */
560 const vector_fp& gibbs_RT_ref() const {
561 updateThermo();
562 return m_g0_RT;
563 }
564
565 //! Returns a reference to the dimensionless reference state Entropy vector.
566 /*!
567 * This function is part of the layer that checks/recalculates the reference
568 * state thermo functions.
569 */
570 const vector_fp& entropy_R_ref() const {
571 updateThermo();
572 return m_s0_R;
573 }
574
575 //! Returns a reference to the dimensionless reference state Heat Capacity vector.
576 /*!
577 * This function is part of the layer that checks/recalculates the reference
578 * state thermo functions.
579 */
580 const vector_fp& cp_R_ref() const {
581 updateThermo();
582 return m_cp0_R;
583 }
584
585 //! @}
586
587 virtual bool addSpecies(shared_ptr<Species> spec);
588 virtual void setToEquilState(const doublereal* mu_RT);
589
590 protected:
591 //! Reference state pressure
592 /*!
593 * Value of the reference state pressure in Pascals.
594 * All species must have the same reference state pressure.
595 */
596 doublereal m_p0;
597
598 //! Temporary storage for dimensionless reference state enthalpies
599 mutable vector_fp m_h0_RT;
600
601 //! Temporary storage for dimensionless reference state heat capacities
602 mutable vector_fp m_cp0_R;
603
604 //! Temporary storage for dimensionless reference state Gibbs energies
605 mutable vector_fp m_g0_RT;
606
607 //! Temporary storage for dimensionless reference state entropies
608 mutable vector_fp m_s0_R;
609
610 mutable vector_fp m_expg0_RT;
611
612 //! Temporary array containing internally calculated partial pressures
613 mutable vector_fp m_pp;
614
615 //! @internal Update the species reference state thermodynamic functions
616 /*!
617 * This method is called each time a thermodynamic property is requested,
618 * to check whether the internal species properties within the object
619 * need to be updated. Currently, this updates the species thermo
620 * polynomial values for the current value of the temperature. A check is
621 * made to see if the temperature has changed since the last evaluation.
622 * This object does not contain any persistent data that depends on the
623 * concentration, that needs to be updated. The state object modifies its
624 * concentration dependent information at the time the setMoleFractions()
625 * (or equivalent) call is made.
626 */
627 virtual void updateThermo() const;
628};
629
630}
631
632#endif
ThermoPhase.h
Header file for class ThermoPhase, the base class for phases with thermodynamic properties,...
Cantera::CanteraError
Base class for exceptions thrown by Cantera classes.
Definition: ctexceptions.h:61
Cantera::IdealGasPhase
Class IdealGasPhase represents low-density gases that obey the ideal gas equation of state.
Definition: IdealGasPhase.h:270
Cantera::IdealGasPhase::m_g0_RT
vector_fp m_g0_RT
Temporary storage for dimensionless reference state Gibbs energies.
Definition: IdealGasPhase.h:605
Cantera::IdealGasPhase::m_cp0_R
vector_fp m_cp0_R
Temporary storage for dimensionless reference state heat capacities.
Definition: IdealGasPhase.h:602
Cantera::IdealGasPhase::addSpecies
virtual bool addSpecies(shared_ptr< Species > spec)
Definition: IdealGasPhase.cpp:229
Cantera::IdealGasPhase::getGibbs_RT_ref
virtual void getGibbs_RT_ref(doublereal *grt) const
Returns the vector of nondimensional Gibbs Free Energies of the reference state at the current temper...
Definition: IdealGasPhase.cpp:189
Cantera::IdealGasPhase::getActivityCoefficients
virtual void getActivityCoefficients(doublereal *ac) const
Get the array of non-dimensional activity coefficients at the current solution temperature,...
Definition: IdealGasPhase.cpp:54
Cantera::IdealGasPhase::isothermalCompressibility
virtual doublereal isothermalCompressibility() const
Returns the isothermal compressibility. Units: 1/Pa.
Definition: IdealGasPhase.h:419
Cantera::IdealGasPhase::getGibbs_RT
virtual void getGibbs_RT(doublereal *grt) const
Get the nondimensional Gibbs functions for the species in their standard states at the current T and ...
Definition: IdealGasPhase.cpp:139
Cantera::IdealGasPhase::getPartialMolarIntEnergies
virtual void getPartialMolarIntEnergies(doublereal *ubar) const
Return an array of partial molar internal energies for the species in the mixture.
Definition: IdealGasPhase.cpp:99
Cantera::IdealGasPhase::cp_mole
virtual doublereal cp_mole() const
Molar heat capacity at constant pressure.
Definition: IdealGasPhase.cpp:39
Cantera::IdealGasPhase::m_h0_RT
vector_fp m_h0_RT
Temporary storage for dimensionless reference state enthalpies.
Definition: IdealGasPhase.h:599
Cantera::IdealGasPhase::getPartialMolarEnthalpies
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
Definition: IdealGasPhase.cpp:82
Cantera::IdealGasPhase::getPartialMolarEntropies
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies of the species in the solution.
Definition: IdealGasPhase.cpp:88
Cantera::IdealGasPhase::setToEquilState
virtual void setToEquilState(const doublereal *mu_RT)
This method is used by the ChemEquil equilibrium solver.
Definition: IdealGasPhase.cpp:246
Cantera::IdealGasPhase::getPartialMolarVolumes
virtual void getPartialMolarVolumes(doublereal *vbar) const
Return an array of partial molar volumes for the species in the mixture.
Definition: IdealGasPhase.cpp:113
Cantera::IdealGasPhase::m_pp
vector_fp m_pp
Temporary array containing internally calculated partial pressures.
Definition: IdealGasPhase.h:613
Cantera::IdealGasPhase::getStandardVolumes
virtual void getStandardVolumes(doublereal *vol) const
Get the molar volumes of the species standard states at the current T and P of the solution.
Definition: IdealGasPhase.cpp:173
Cantera::IdealGasPhase::m_s0_R
vector_fp m_s0_R
Temporary storage for dimensionless reference state entropies.
Definition: IdealGasPhase.h:608
Cantera::IdealGasPhase::cv_mole
virtual doublereal cv_mole() const
Molar heat capacity at constant volume.
Definition: IdealGasPhase.cpp:44
Cantera::IdealGasPhase::cp_R_ref
const vector_fp & cp_R_ref() const
Returns a reference to the dimensionless reference state Heat Capacity vector.
Definition: IdealGasPhase.h:580
Cantera::IdealGasPhase::getCp_R
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
Definition: IdealGasPhase.cpp:167
Cantera::IdealGasPhase::getPartialMolarCp
virtual void getPartialMolarCp(doublereal *cpbar) const
Return an array of partial molar heat capacities for the species in the mixture.
Definition: IdealGasPhase.cpp:107
Cantera::IdealGasPhase::phaseOfMatter
virtual std::string phaseOfMatter() const
String indicating the mechanical phase of the matter in this Phase.
Definition: IdealGasPhase.h:308
Cantera::IdealGasPhase::enthalpy_RT_ref
const vector_fp & enthalpy_RT_ref() const
Returns a reference to the dimensionless reference state enthalpy vector.
Definition: IdealGasPhase.h:550
Cantera::IdealGasPhase::updateThermo
virtual void updateThermo() const
Definition: IdealGasPhase.cpp:273
Cantera::IdealGasPhase::getEntropy_R
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
Definition: IdealGasPhase.cpp:129
Cantera::IdealGasPhase::entropy_mole
virtual doublereal entropy_mole() const
Molar entropy.
Definition: IdealGasPhase.cpp:34
Cantera::IdealGasPhase::getActivityConcentrations
virtual void getActivityConcentrations(doublereal *c) const
This method returns the array of generalized concentrations.
Definition: IdealGasPhase.h:476
Cantera::IdealGasPhase::entropy_R_ref
const vector_fp & entropy_R_ref() const
Returns a reference to the dimensionless reference state Entropy vector.
Definition: IdealGasPhase.h:570
Cantera::IdealGasPhase::gibbs_RT_ref
const vector_fp & gibbs_RT_ref() const
Returns a reference to the dimensionless reference state Gibbs free energy vector.
Definition: IdealGasPhase.h:560
Cantera::IdealGasPhase::getEntropy_R_ref
virtual void getEntropy_R_ref(doublereal *er) const
Returns the vector of nondimensional entropies of the reference state at the current temperature of t...
Definition: IdealGasPhase.cpp:201
Cantera::IdealGasPhase::type
virtual std::string type() const
String indicating the thermodynamic model implemented.
Definition: IdealGasPhase.h:296
Cantera::IdealGasPhase::getIntEnergy_RT_ref
virtual void getIntEnergy_RT_ref(doublereal *urt) const
Returns the vector of nondimensional internal Energies of the reference state at the current temperat...
Definition: IdealGasPhase.cpp:207
Cantera::IdealGasPhase::setState_RP
virtual void setState_RP(doublereal rho, doublereal p)
Set the density and pressure at constant composition.
Definition: IdealGasPhase.h:401
Cantera::IdealGasPhase::getIntEnergy_RT
virtual void getIntEnergy_RT(doublereal *urt) const
Returns the vector of nondimensional Internal Energies of the standard state species at the current T...
Definition: IdealGasPhase.cpp:159
Cantera::IdealGasPhase::pressure
virtual doublereal pressure() const
Pressure.
Definition: IdealGasPhase.h:371
Cantera::IdealGasPhase::getCp_R_ref
virtual void getCp_R_ref(doublereal *cprt) const
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the ...
Definition: IdealGasPhase.cpp:215
Cantera::IdealGasPhase::m_p0
doublereal m_p0
Reference state pressure.
Definition: IdealGasPhase.h:596
Cantera::IdealGasPhase::getStandardChemPotentials
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
Definition: IdealGasPhase.cpp:61
Cantera::IdealGasPhase::getStandardVolumes_ref
virtual void getStandardVolumes_ref(doublereal *vol) const
Get the molar volumes of the species reference states at the current T and P_ref of the solution.
Definition: IdealGasPhase.cpp:221
Cantera::IdealGasPhase::isIdeal
virtual bool isIdeal() const
Boolean indicating whether phase is ideal.
Definition: IdealGasPhase.h:300
Cantera::IdealGasPhase::enthalpy_mole
virtual doublereal enthalpy_mole() const
Return the Molar enthalpy. Units: J/kmol.
Definition: IdealGasPhase.h:327
Cantera::IdealGasPhase::thermalExpansionCoeff
virtual doublereal thermalExpansionCoeff() const
Return the volumetric thermal expansion coefficient. Units: 1/K.
Definition: IdealGasPhase.h:431
Cantera::IdealGasPhase::getChemPotentials
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
Definition: IdealGasPhase.cpp:73
Cantera::IdealGasPhase::getGibbs_ref
virtual void getGibbs_ref(doublereal *g) const
Returns the vector of the Gibbs function of the reference state at the current temperature of the sol...
Definition: IdealGasPhase.cpp:195
Cantera::IdealGasPhase::getEnthalpy_RT
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
Definition: IdealGasPhase.cpp:123
Cantera::IdealGasPhase::IdealGasPhase
IdealGasPhase(const std::string &inputFile="", const std::string &id="")
Construct and initialize an IdealGasPhase ThermoPhase object directly from an ASCII input file.
Definition: IdealGasPhase.cpp:20
Cantera::IdealGasPhase::getPureGibbs
virtual void getPureGibbs(doublereal *gpure) const
Get the Gibbs functions for the standard state of the species at the current T and P of the solution.
Definition: IdealGasPhase.cpp:149
Cantera::IdealGasPhase::setPressure
virtual void setPressure(doublereal p)
Set the pressure at constant temperature and composition.
Definition: IdealGasPhase.h:385
Cantera::IdealGasPhase::getEnthalpy_RT_ref
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of ...
Definition: IdealGasPhase.cpp:183
Cantera::IdealGasPhase::standardConcentration
virtual doublereal standardConcentration(size_t k=0) const
Returns the standard concentration , which is used to normalize the generalized concentration.
Definition: IdealGasPhase.cpp:49
Cantera::Phase::getConcentrations
void getConcentrations(double *const c) const
Get the species concentrations (kmol/m^3).
Definition: Phase.cpp:596
Cantera::Phase::molarDensity
double molarDensity() const
Molar density (kmol/m^3).
Definition: Phase.cpp:671
Cantera::Phase::mean_X
doublereal mean_X(const doublereal *const Q) const
Evaluate the mole-fraction-weighted mean of an array Q.
Definition: Phase.cpp:717
Cantera::Phase::setDensity
virtual void setDensity(const double density_)
Set the internally stored density (kg/m^3) of the phase.
Definition: Phase.cpp:687
Cantera::Phase::meanMolecularWeight
doublereal meanMolecularWeight() const
The mean molecular weight. Units: (kg/kmol)
Definition: Phase.h:751
Cantera::Phase::temperature
doublereal temperature() const
Temperature (K).
Definition: Phase.h:654
Cantera::Phase::setTemperature
virtual void setTemperature(double temp)
Set the internally stored temperature of the phase (K).
Definition: Phase.h:719
Cantera::ThermoPhase
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:102
Cantera::ThermoPhase::RT
doublereal RT() const
Return the Gas Constant multiplied by the current temperature.
Definition: ThermoPhase.h:782
Cantera::XML_Node
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:103
Cantera
Namespace for the Cantera kernel.
Definition: AnyMap.cpp:557
Cantera::vector_fp
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Definition: ct_defs.h:184
Cantera::GasConstant
const double GasConstant
Universal Gas Constant [J/kmol/K].
Definition: ct_defs.h:113