Cantera  2.0
LatticeSolidPhase.h
Go to the documentation of this file.
1 /**
2  * @file LatticeSolidPhase.h
3  * Header for a simple thermodynamics model of a bulk solid phase
4  * derived from ThermoPhase,
5  * assuming an ideal solution model based on a lattice of solid atoms
6  * (see \ref thermoprops and class \link Cantera::LatticeSolidPhase LatticeSolidPhase\endlink).
7  */
8 
9 // Copyright 2005 California Institute of Technology
10 
11 #ifndef CT_LATTICESOLID_H
12 #define CT_LATTICESOLID_H
13 
14 #include "cantera/base/config.h"
15 #include "cantera/base/ct_defs.h"
16 #include "mix_defs.h"
17 #include "ThermoPhase.h"
18 #include "SpeciesThermo.h"
19 #include "LatticePhase.h"
20 #include "cantera/base/utilities.h"
21 
22 namespace Cantera
23 {
24 
25 //! A phase that is comprised of a fixed additive combination of other lattice phases
26 /*!
27  * This is the main way %Cantera describes semiconductors and other solid phases.
28  * This %ThermoPhase object calculates its properties as a sum over other %LatticePhase objects. Each of the %LatticePhase
29  * objects is a %ThermoPhase object by itself.
30  *
31  * The results from this LatticeSolidPhase model reduces to the LatticePhase model when there is one
32  * lattice phase and the molar densities of the sublattice and the molar density within the LatticeSolidPhase
33  * have the same values.
34  *
35  *
36  * The mole fraction vector is redefined witin the the LatticeSolidPhase object. Each of the mole
37  * fractions sum to one on each of the sublattices. The routine getMoleFraction() and setMoleFraction()
38  * have been redefined to use this convention.
39  *
40  * <HR>
41  * <H2> Specification of Species Standard %State Properties </H2>
42  * <HR>
43  *
44  * The standard state properties are calculated in the normal way for each of the sublattices. The normal way
45  * here means that a thermodynamic polynomial in temperature is developed. Also, a constant volume approximation
46  * for the pressure dependence is assumed. All of these properties are on a Joules per kmol of sublattice
47  * constituent basis.
48  *
49  * <HR>
50  * <H2> Specification of Solution Thermodynamic Properties </H2>
51  * <HR>
52 
53  * The sum over the %LatticePhase objects is carried out by weighting each %LatticePhase object
54  * value with the molar density (kmol m-3) of its %LatticePhase. Then the resulting quantity is divided by
55  * the molar density of the total compound. The LatticeSolidPhase object therefore only contains a
56  * listing of the number of %LatticePhase object
57  * that comprises the solid, and it contains a value for the molar density of the entire mixture.
58  * This is the same thing as saying that
59  *
60  * \f[
61  * L_i = L^{solid} \theta_i
62  * \f]
63  *
64  * \f$ L_i \f$ is the molar volume of the ith lattice. \f$ L^{solid} \f$ is the molar volume of the entire
65  * solid. \f$ \theta_i \f$ is a fixed weighting factor for the ith lattice representing the lattice
66  * stoichiometric coefficient. For this object the \f$ \theta_i \f$ values are fixed.
67  *
68  *
69  * Let's take FeS2 as an example, which may be thought of as a combination of two lattices: Fe and S lattice.
70  * The Fe sublattice has a molar density of 1 gmol cm-3. The S sublattice has a molar density of 2 gmol cm-3.
71  * We then define the LatticeSolidPhase object as having a nominal composition of FeS2, and having a
72  * molar density of 1 gmol cm-3. All quantities pertaining to the FeS2 compound will be have weights
73  * associated with the sublattices. The Fe sublattice will have a weight of 1.0 associated with it. The
74  * S sublattice will have a weight of 2.0 associated with it.
75  *
76  *
77  * <HR>
78  * <H3> Specification of Solution Density Properties </H3>
79  * <HR>
80  *
81  * Currently, molar density is not a constant within the object, even though the species molar volumes are a
82  * constant. The basic idea is that a swelling of one of the sublattices will result in a swelling of
83  * of all of the lattices. Therefore, the molar volumes of the individual lattices are not independent of
84  * one another.
85  *
86  * The molar volume of the Lattice solid is calculated from the following formula
87  *
88  * \f[
89  * V = \sum_i{ \theta_i V_i^{lattice}}
90  * \f]
91  *
92  * where \f$ V_i^{lattice} \f$ is the molar volume of the ith sublattice. This is calculated from the
93  * following standard formula.
94  *
95  *
96  * \f[
97  * V_i = \sum_k{ X_k V_k}
98  * \f]
99  *
100  * where k is a species in the ith sublattice.
101  *
102  * The mole fraction vector is redefined witin the the LatticeSolidPhase object. Each of the mole
103  * fractions sum to one on each of the sublattices. The routine getMoleFraction() and setMoleFraction()
104  * have been redefined to use this convention.
105  *
106  * (This object is still under construction)
107  *
108  */
110 {
111 
112 public:
113 
114  //! Base empty constructor
116 
117  //! Copy Constructor
118  /*!
119  * @param right Object to be copied
120  */
121  LatticeSolidPhase(const LatticeSolidPhase& right);
122 
123  //! Assignment operator
124  /*!
125  * @param right Object to be copied
126  */
128 
129  //! Destructor
130  virtual ~LatticeSolidPhase();
131 
132  //! Duplication function
133  /*!
134  * This virtual function is used to create a duplicate of the
135  * current phase. It's used to duplicate the phase when given
136  * a ThermoPhase pointer to the phase.
137  *
138  * @return It returns a ThermoPhase pointer.
139  */
141 
142  //! Equation of state type flag.
143  /*!
144  * Redefine this to return cLatticeSolid, listed in mix_defs.h.
145  */
146  virtual int eosType() const {
147  return cLatticeSolid;
148  }
149 
150  //! Minimum temperature for which the thermodynamic data for the species
151  //! or phase are valid.
152  /*!
153  * If no argument is supplied, the
154  * value returned will be the lowest temperature at which the
155  * data for \e all species are valid. Otherwise, the value
156  * will be only for species \a k. This function is a wrapper
157  * that calls the species thermo minTemp function.
158  *
159  * @param k index of the species. Default is -1, which will return the max of the min value
160  * over all species.
161  */
162  virtual doublereal minTemp(size_t k = npos) const;
163 
164  //! Maximum temperature for which the thermodynamic data for the species
165  //! are valid.
166  /*!
167  * If no argument is supplied, the
168  * value returned will be the highest temperature at which the
169  * data for \e all species are valid. Otherwise, the value
170  * will be only for species \a k. This function is a wrapper
171  * that calls the species thermo maxTemp function.
172  *
173  * @param k index of the species. Default is -1, which will return the min of the max value
174  * over all species.
175  */
176  virtual doublereal maxTemp(size_t k = npos) const;
177 
178 
179  //! Returns the reference pressure in Pa. This function is a wrapper
180  //! that calls the species thermo refPressure function.
181  virtual doublereal refPressure() const ;
182 
183  //! This method returns the convention used in specification
184  //! of the standard state, of which there are currently two,
185  //! temperature based, and variable pressure based.
186  /*!
187  * All of the thermo is determined by slave %ThermoPhase routines.
188  */
189  virtual int standardStateConvention() const {
190  return cSS_CONVENTION_SLAVE;
191  }
192 
193  //! Return the Molar Enthalpy. Units: J/kmol.
194  /*!
195  * The molar enthalpy is determined by the following formula, where \f$ \theta_n \f$ is the
196  * lattice stoichiometric coefficient of the nth lattice
197  *
198  * \f[
199  * \tilde h(T,P) = {\sum_n \theta_n \tilde h_n(T,P) }
200  * \f]
201  *
202  * \f$ \tilde h_n(T,P) \f$ is the enthalpy of the n<SUP>th</SUP> lattice.
203  *
204  * units J/kmol
205  */
206  virtual doublereal enthalpy_mole() const;
207 
208 
209  //! Return the Molar Internal Energy. Units: J/kmol.
210  /*!
211  * The molar enthalpy is determined by the following formula, where \f$ \theta_n \f$ is the
212  * lattice stoichiometric coefficient of the nth lattice
213  *
214  * \f[
215  * \tilde u(T,P) = {\sum_n \theta_n \tilde u_n(T,P) }
216  * \f]
217  *
218  * \f$ \tilde u_n(T,P) \f$ is the internal energy of the n<SUP>th</SUP> lattice.
219  *
220  * units J/kmol
221  */
222  virtual doublereal intEnergy_mole() const;
223 
224  //! Return the Molar Entropy. Units: J/kmol/K.
225  /*!
226  * The molar enthalpy is determined by the following formula, where \f$ \theta_n \f$ is the
227  * lattice stoichiometric coefficient of the nth lattice
228  *
229  * \f[
230  * \tilde s(T,P) = \sum_n \theta_n \tilde s_n(T,P)
231  * \f]
232  *
233  * \f$ \tilde s_n(T,P) \f$ is the molar entropy of the n<SUP>th</SUP> lattice.
234  *
235  * units J/kmol/K
236  */
237  virtual doublereal entropy_mole() const;
238 
239  //! Return the Molar Gibbs energy. Units: J/kmol.
240  /*!
241  * The molar gibbs free energy is determined by the following formula, where \f$ \theta_n \f$ is the
242  * lattice stoichiometric coefficient of the nth lattice
243  *
244  * \f[
245  * \tilde h(T,P) = {\sum_n \theta_n \tilde h_n(T,P) }
246  * \f]
247  *
248  * \f$ \tilde h_n(T,P) \f$ is the enthalpy of the n<SUP>th</SUP> lattice.
249  *
250  * units J/kmol
251  */
252  virtual doublereal gibbs_mole() const;
253 
254  //! Return the constant pressure heat capacity. Units: J/kmol/K
255  /*!
256  * The molar constant pressure heat capacity is determined by the following formula, where \f$ C_n \f$ is the
257  * lattice molar density of the nth lattice, and \f$ C_T \f$ is the molar density
258  * of the solid compound.
259  *
260  * \f[
261  * \tilde c_{p,n}(T,P) = \frac{\sum_n C_n \tilde c_{p,n}(T,P) }{C_T},
262  * \f]
263  *
264  * \f$ \tilde c_{p,n}(T,P) \f$ is the heat capacity of the n<SUP>th</SUP> lattice.
265  *
266  * units J/kmol/K
267  */
268  virtual doublereal cp_mole() const;
269 
270  //! Return the constant volume heat capacity. Units: J/kmol/K
271  /*!
272  * The molar constant volume heat capacity is determined by the following formula, where \f$ C_n \f$ is the
273  * lattice molar density of the nth lattice, and \f$ C_T \f$ is the molar density
274  * of the solid compound.
275  *
276  * \f[
277  * \tilde c_{v,n}(T,P) = \frac{\sum_n C_n \tilde c_{v,n}(T,P) }{C_T},
278  * \f]
279  *
280  * \f$ \tilde c_{v,n}(T,P) \f$ is the heat capacity of the n<SUP>th</SUP> lattice.
281  *
282  * units J/kmol/K
283  */
284  virtual doublereal cv_mole() const {
285  return cp_mole();
286  }
287 
288  //! Report the Pressure. Units: Pa.
289  /*!
290  * This method simply returns the stored pressure value.
291  */
292  virtual doublereal pressure() const {
293  return m_press;
294  }
295 
296  //! Set the pressure at constant temperature. Units: Pa.
297  /*!
298  *
299  * @param p Pressure (units - Pa)
300  */
301  virtual void setPressure(doublereal p);
302 
303  //! Calculate the density of the solid mixture
304  /*!
305  * The formula for this is
306  *
307  * \f[
308  * \rho = \sum_n{ \rho_n \theta_n }
309  * \f]
310  *
311  * where \f$ \rho_n \f$ is the density of the nth sublattice
312  *
313  * Note this is a nonvirtual function.
314  */
315  doublereal calcDensity();
316 
317  //! Set the mole fractions to the specified values, and then
318  //! normalize them so that they sum to 1.0 for each of the subphases
319  /*!
320  * On input, the mole fraction vector is assumed to sum to one for each of the sublattices. The sublattices
321  * are updated with this mole fraction vector. The mole fractions are also stored within this object, after
322  * they are normalized to one by dividing by the number of sublattices.
323  *
324  * @param x Input vector of mole fractions. There is no restriction
325  * on the sum of the mole fraction vector. Internally,
326  * this object will pass portions of this vector to the sublattices which assume that the portions
327  * individually sum to one.
328  * Length is m_kk.
329  */
330  virtual void setMoleFractions(const doublereal* const x);
331 
332  //! Get the species mole fraction vector.
333  /*!
334  * On output the mole fraction vector will sum to one for each of the subphases which make up this phase.
335  *
336  * @param x On return, x contains the mole fractions. Must have a
337  * length greater than or equal to the number of species.
338  */
339  virtual void getMoleFractions(doublereal* const x) const;
340 
341  //! The mole fraction of species k.
342  /*!
343  * If k is outside the valid
344  * range, an exception will be thrown. Note that it is
345  * somewhat more efficient to call getMoleFractions if the
346  * mole fractions of all species are desired.
347  * @param k species index
348  */
349  doublereal moleFraction(const int k) const {
350  return err("not implemented");
351  }
352 
353  //! Get the species mass fractions.
354  /*!
355  * @param y On return, y contains the mass fractions. Array \a y must have a length
356  * greater than or equal to the number of species.
357  */
358  void getMassFractions(doublereal* const y) const {
359  err("not implemented");
360  }
361 
362  //! Mass fraction of species k.
363  /*!
364  * If k is outside the valid range, an exception will be thrown. Note that it is
365  * somewhat more efficient to call getMassFractions if the mass fractions of all species are desired.
366  *
367  * @param k species index
368  */
369  doublereal massFraction(const int k) const {
370  return err("not implemented");
371  }
372 
373 
374  //! Set the mass fractions to the specified values, and then
375  //! normalize them so that they sum to 1.0.
376  /*!
377  * @param y Array of unnormalized mass fraction values (input).
378  * Must have a length greater than or equal to the number of species.
379  * Input vector of mass fractions. There is no restriction
380  * on the sum of the mass fraction vector. Internally,
381  * the State object will normalize this vector before
382  * storing its contents.
383  * Length is m_kk.
384  */
385  virtual void setMassFractions(const doublereal* const y) {
386  err("not implemented");
387  }
388 
389 
390  //! Set the mass fractions to the specified values without normalizing.
391  /*!
392  * This is useful when the normalization
393  * condition is being handled by some other means, for example
394  * by a constraint equation as part of a larger set of equations.
395  *
396  * @param y Input vector of mass fractions.
397  * Length is m_kk.
398  */
399  virtual void setMassFractions_NoNorm(const doublereal* const y) {
400  err("not implemented");
401  }
402 
403  void getConcentrations(doublereal* const c) const {
404  err("not implemented");
405  }
406 
407  doublereal concentration(int k) const {
408  return err("not implemented");
409  }
410 
411  virtual void setConcentrations(const doublereal* const conc) {
412  err("not implemented");
413  }
414 
415  //! This method returns an array of generalized activity concentrations
416  /*!
417  * The generalized activity concentrations,
418  * \f$ C^a_k \f$, are defined such that \f$ a_k = C^a_k /
419  * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration
420  * defined below and \f$ a_k \f$ are activities used in the
421  * thermodynamic functions. These activity (or generalized)
422  * concentrations are used by kinetics manager classes to compute the forward and
423  * reverse rates of elementary reactions. Note that they may
424  * or may not have units of concentration --- they might be
425  * partial pressures, mole fractions, or surface coverages,
426  * for example.
427  *
428  * @param c Output array of generalized concentrations. The
429  * units depend upon the implementation of the
430  * reaction rate expressions within the phase.
431  */
432  virtual void getActivityConcentrations(doublereal* c) const;
433 
434  //! Get the array of non-dimensional molar-based activity coefficients at
435  //! the current solution temperature, pressure, and solution concentration.
436  /*!
437  * @param ac Output vector of activity coefficients. Length: m_kk.
438  */
439  virtual void getActivityCoefficients(doublereal* ac) const;
440 
441  //! Get the species chemical potentials. Units: J/kmol.
442  /*!
443  * This function returns a vector of chemical potentials of the
444  * species in solution at the current temperature, pressure
445  * and mole fraction of the solution.
446  *
447  * This returns the underlying lattice chemical potentials, as the units are kmol-1 of
448  * the sublattice species.
449  *
450  * @param mu Output vector of species chemical
451  * potentials. Length: m_kk. Units: J/kmol
452  */
453  virtual void getChemPotentials(doublereal* mu) const;
454 
455 
456  //! Returns an array of partial molar enthalpies for the species in the mixture.
457  /*!
458  * Units (J/kmol)
459  * For this phase, the partial molar enthalpies are equal to the
460  * pure species enthalpies
461  * \f[
462  * \bar h_k(T,P) = \hat h^{ref}_k(T) + (P - P_{ref}) \hat V^0_k
463  * \f]
464  * The reference-state pure-species enthalpies, \f$ \hat h^{ref}_k(T) \f$,
465  * at the reference pressure,\f$ P_{ref} \f$,
466  * are computed by the species thermodynamic
467  * property manager. They are polynomial functions of temperature.
468  * @see SpeciesThermo
469  *
470  * @param hbar Output vector containing partial molar enthalpies.
471  * Length: m_kk.
472  */
473  virtual void getPartialMolarEnthalpies(doublereal* hbar) const;
474 
475  /**
476  * Returns an array of partial molar entropies of the species in the
477  * solution. Units: J/kmol/K.
478  * For this phase, the partial molar entropies are equal to the
479  * pure species entropies plus the ideal solution contribution.
480  * \f[
481  * \bar s_k(T,P) = \hat s^0_k(T) - R log(X_k)
482  * \f]
483  * The reference-state pure-species entropies,\f$ \hat s^{ref}_k(T) \f$,
484  * at the reference pressure, \f$ P_{ref} \f$, are computed by the
485  * species thermodynamic
486  * property manager. They are polynomial functions of temperature.
487  * @see SpeciesThermo
488  *
489  * @param sbar Output vector containing partial molar entropies.
490  * Length: m_kk.
491  */
492  virtual void getPartialMolarEntropies(doublereal* sbar) const;
493 
494  /**
495  * Returns an array of partial molar Heat Capacities at constant
496  * pressure of the species in the
497  * solution. Units: J/kmol/K.
498  * For this phase, the partial molar heat capacities are equal
499  * to the standard state heat capacities.
500  *
501  * @param cpbar Output vector of partial heat capacities. Length: m_kk.
502  */
503  virtual void getPartialMolarCp(doublereal* cpbar) const;
504 
505  /**
506  * returns an array of partial molar volumes of the species
507  * in the solution. Units: m^3 kmol-1.
508  *
509  * For this solution, thepartial molar volumes are equal to the
510  * constant species molar volumes.
511  *
512  * @param vbar Output vector of partial molar volumes. Length: m_kk.
513  */
514  virtual void getPartialMolarVolumes(doublereal* vbar) const;
515 
516  //! Get the array of standard state chemical potentials at unit activity for the species
517  //! at their standard states at the current <I>T</I> and <I>P</I> of the solution.
518  /*!
519  * These are the standard state chemical potentials \f$ \mu^0_k(T,P)
520  * \f$. The values are evaluated at the current
521  * temperature and pressure of the solution.
522  *
523  *
524  * This returns the underlying lattice standard chemical potentials, as the units are kmol-1 of
525  * the sublattice species.
526  *
527  * @param mu0 Output vector of chemical potentials.
528  * Length: m_kk. Units: J/kmol
529  */
530  virtual void getStandardChemPotentials(doublereal* mu0) const;
531 
532  //! Return the standard concentration for the kth species
533  /*!
534  * The standard concentration \f$ C^0_k \f$ used to normalize
535  * the activity (i.e., generalized) concentration. In many cases, this quantity
536  * will be the same for all species in a phase - for example,
537  * for an ideal gas \f$ C^0_k = P/\hat R T \f$. For this
538  * reason, this method returns a single value, instead of an
539  * array. However, for phases in which the standard
540  * concentration is species-specific (e.g. surface species of
541  * different sizes), this method may be called with an
542  * optional parameter indicating the species.
543  *
544  * @param k Optional parameter indicating the species. The default
545  * is to assume this refers to species 0.
546  * @return
547  * Returns the standard concentration. The units are by definition
548  * dependent on the ThermoPhase and kinetics manager representation.
549  */
550  virtual doublereal standardConcentration(size_t k=0) const;
551 
552  //! Natural logarithm of the standard concentration of the kth species.
553  /*!
554  * @param k index of the species (defaults to zero)
555  */
556  virtual doublereal logStandardConc(size_t k=0) const;
557  //@}
558  /// @name Thermodynamic Values for the Species Reference States --------------------
559  //@{
560 
561  //! Returns the vector of nondimensional enthalpies of the reference state at the current
562  //! temperature of the solution and the reference pressure for the species.
563  /*!
564  * This function fills in its one entry in hrt[] by calling
565  * the underlying species thermo function for the
566  * dimensionless gibbs free energy, calculated from the
567  * dimensionless enthalpy and entropy.
568  *
569  * @param grt Vector of dimensionless Gibbs free energies of the reference state
570  * length = m_kk
571  */
572  virtual void getGibbs_RT_ref(doublereal* grt) const;
573 
574 
575  //! Returns the vector of the gibbs function of the reference state at the current
576  //! temperatureof the solution and the reference pressure for the species.
577  /*!
578  * units = J/kmol
579  *
580  * This function fills in its one entry in g[] by calling the underlying species thermo
581  * functions for the gibbs free energy, calculated from enthalpy and the
582  * entropy, and the multiplying by RT.
583  *
584  * @param g Vector of Gibbs free energies of the reference state.
585  * length = m_kk
586  */
587  virtual void getGibbs_ref(doublereal* g) const;
588 
589 
590  //! Initialize the ThermoPhase object after all species have been set up
591  /*!
592  * @internal Initialize.
593  *
594  * This method is provided to allow
595  * subclasses to perform any initialization required after all
596  * species have been added. For example, it might be used to
597  * resize internal work arrays that must have an entry for
598  * each species. The base class implementation does nothing,
599  * and subclasses that do not require initialization do not
600  * need to overload this method. When importing a CTML phase
601  * description, this method is called from ThermoPhase::initThermoXML(),
602  * which is called from importPhase(),
603  * just prior to returning from function importPhase().
604  *
605  * @see importCTML.cpp
606  */
607  virtual void initThermo();
608 
609  //! Initialize vectors that depend on the number of species and sublattices
610  void initLengths();
611 
612  //! Add in species from Slave phases
613  /*!
614  * This hook is used for cSS_CONVENTION_SLAVE phases
615  *
616  * @param phaseNode XML_Node for the current phase
617  */
618  virtual void installSlavePhases(Cantera::XML_Node* phaseNode);
619 
620 
621  //! Set equation of state parameter values from XML entries.
622  /*!
623  *
624  * This method is called by function importPhase() in
625  * file importCTML.cpp when processing a phase definition in
626  * an input file. It should be overloaded in subclasses to set
627  * any parameters that are specific to that particular phase
628  * model. Note, this method is called before the phase is
629  * initialized with elements and/or species.
630  *
631  * @param eosdata An XML_Node object corresponding to
632  * the "thermo" entry for this phase in the input file.
633  */
634  virtual void setParametersFromXML(const XML_Node& eosdata);
635 
636 
637  //! Set the Lattice mole fractions using a string
638  /*!
639  *
640  * @param n Integer value of the lattice whose mole fractions are being set
641  * @param x string comtaining Name:value pairs that will specify the mole fractions
642  * of species on a particular lattice
643  */
644  void setLatticeMoleFractionsByName(int n, std::string x);
645 
646  //! Return a changeable reference to the calculation manager
647  //! for species reference-state thermodynamic properties
648  /*!
649  * This routine returns the calculation manager for the sublattice
650  *
651  * @param k Speices id. The default is -1, meaning return the default
652  *
653  * @internal
654  */
655  virtual SpeciesThermo& speciesThermo(int k = -1);
656 
657 #ifdef H298MODIFY_CAPABILITY
658 
659  //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1)
660  /*!
661  * The 298K heat of formation is defined as the enthalpy change to create the standard state
662  * of the species from its constituent elements in their standard states at 298 K and 1 bar.
663  *
664  * @param k Species k
665  * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar
666  */
667  virtual void modifyOneHf298SS(const int k, const doublereal Hf298New);
668 #endif
669 
670 private:
671  //! error routine
672  /*!
673  * @param msg Message
674  *
675  * @return nothing
676  */
677  doublereal err(std::string msg) const;
678 
679 protected:
680 
681  //! Number of elements
682  size_t m_mm;
683 
684  //! Last temperature at which the reference thermo was calculated
685  mutable doublereal m_tlast;
686 
687  //! Current value of the pressure
688  doublereal m_press;
689 
690  //! Current value of the molar density
691  doublereal m_molar_density;
692 
693  //! Number of sublattice phases
694  size_t m_nlattice;
695 
696  //! Vector of sublattic ThermoPhase objects
697  std::vector<LatticePhase*> m_lattice;
698 
699  //! Vector of mole fractions
700  /*!
701  * Note these mole fractions sum to one when summed over all phases.
702  * However, this is not what's passed down to the lower m_lattice objects.
703  */
704  mutable vector_fp m_x;
705 
706  //! Lattice stoichiometric coefficients
707  std::vector<doublereal> theta_;
708 
709  //! Temporary vector
710  mutable vector_fp tmpV_;
711 
712  std::vector<size_t> lkstart_;
713 
714 private:
715 
716  //! Update the reference thermodynamic functions
717  void _updateThermo() const;
718 };
719 }
720 
721 #endif