Cantera  2.1.2
SurfPhase.h
Go to the documentation of this file.
1 /**
2  * @file SurfPhase.h
3  * Header for a simple thermodynamics model of a surface phase
4  * derived from ThermoPhase,
5  * assuming an ideal solution model
6  * (see \ref thermoprops and class \link Cantera::SurfPhase SurfPhase\endlink).
7  */
8 
9 // Copyright 2002 California Institute of Technology
10 
11 #ifndef CT_SURFPHASE_H
12 #define CT_SURFPHASE_H
13 
14 #include "mix_defs.h"
15 #include "ThermoPhase.h"
16 
17 namespace Cantera
18 {
19 
20 //! A simple thermodynamic model for a surface phase,
21 //! assuming an ideal solution model.
22 /*!
23  * The surface consists of a grid of equivalent sites.
24  * Surface species may be defined to
25  * occupy one or more sites. The surface species are assumed to be
26  * independent, and thus the species form an ideal solution.
27  *
28  * The density of surface sites is given by the variable \f$ n_0 \f$,
29  * which has SI units of kmol m-2.
30  *
31  * <b> Specification of Species Standard State Properties </b>
32  *
33  * It is assumed that the reference state thermodynamics may be
34  * obtained by a pointer to a populated species thermodynamic property
35  * manager class (see ThermoPhase::m_spthermo). How to relate pressure
36  * changes to the reference state thermodynamics is resolved at this level.
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  * Therefore, The standard state internal energy for species <I>k</I> is
42  * equal to the enthalpy for species <I>k</I>.
43  *
44  * \f[
45  * u^o_k = h^o_k
46  * \f]
47  *
48  * Also, the standard state chemical potentials, entropy, and heat capacities
49  * are independent of pressure. The standard state gibbs free energy is obtained
50  * from the enthalpy and entropy functions.
51  *
52  * <b> Specification of Solution Thermodynamic Properties </b>
53  *
54  * The activity of species defined in the phase is given by
55  * \f[
56  * a_k = \theta_k
57  * \f]
58  *
59  * The chemical potential for species <I>k</I> is equal to
60  * \f[
61  * \mu_k(T,P) = \mu^o_k(T) + R T \log(\theta_k)
62  * \f]
63  *
64  * Pressure is defined as an independent variable in this phase. However, it has
65  * no effect on any quantities, as the molar concentration is a constant.
66  *
67  * The internal energy for species k is equal to the enthalpy for species <I>k</I>
68  * \f[
69  * u_k = h_k
70  * \f]
71  *
72  * The entropy for the phase is given by the following relation, which is
73  * independent of the pressure:
74  *
75  * \f[
76  * s_k(T,P) = s^o_k(T) - R \log(\theta_k)
77  * \f]
78  *
79  * <b> %Application within %Kinetics Managers </b>
80  *
81  * The activity concentration,\f$ C^a_k \f$, used by the kinetics manager, is equal to
82  * the actual concentration, \f$ C^s_k \f$, and is given by the following
83  * expression.
84  * \f[
85  * C^a_k = C^s_k = \frac{\theta_k n_0}{s_k}
86  * \f]
87  *
88  * The standard concentration for species <I>k</I> is:
89  * \f[
90  * C^0_k = \frac{n_0}{s_k}
91  * \f]
92  *
93  * <b> Instantiation of the Class </b>
94  *
95  * The constructor for this phase is located in the default ThermoFactory
96  * for %Cantera. A new SurfPhase may be created by the following code snippet:
97  *
98  * @code
99  * XML_Node *xc = get_XML_File("diamond.xml");
100  * XML_Node * const xs = xc->findNameID("phase", "diamond_100");
101  * ThermoPhase *diamond100TP_tp = newPhase(*xs);
102  * SurfPhase *diamond100TP = dynamic_cast <SurfPhase *>(diamond100TP_tp);
103  * @endcode
104  *
105  * or by the following constructor:
106  *
107  * @code
108  * XML_Node *xc = get_XML_File("diamond.xml");
109  * XML_Node * const xs = xc->findNameID("phase", "diamond_100");
110  * SurfPhase *diamond100TP = new SurfPhase(*xs);
111  * @endcode
112  *
113  * <b> XML Example </b>
114  *
115  * An example of an XML Element named phase setting up a SurfPhase object named diamond_100
116  * is given below.
117  *
118  * @code
119  * <phase dim="2" id="diamond_100">
120  * <elementArray datasrc="elements.xml">H C</elementArray>
121  * <speciesArray datasrc="#species_data">c6HH c6H* c6*H c6** c6HM c6HM* c6*M c6B </speciesArray>
122  * <reactionArray datasrc="#reaction_data"/>
123  * <state>
124  * <temperature units="K">1200.0</temperature>
125  * <coverages>c6H*:0.1, c6HH:0.9</coverages>
126  * </state>
127  * <thermo model="Surface">
128  * <site_density units="mol/cm2">3e-09</site_density>
129  * </thermo>
130  * <kinetics model="Interface"/>
131  * <transport model="None"/>
132  * <phaseArray>
133  * gas_phase diamond_bulk
134  * </phaseArray>
135  * </phase>
136  * @endcode
137  *
138  * The model attribute, "Surface", on the thermo element identifies the phase as being
139  * a SurfPhase object.
140  *
141  * @ingroup thermoprops
142  */
143 class SurfPhase : public ThermoPhase
144 {
145 public:
146  //! Constructor.
147  /*!
148  * @param n0 Site Density of the Surface Phase
149  * Units: kmol m-2.
150  */
151  SurfPhase(doublereal n0 = 0.0);
152 
153  //! Construct and initialize a SurfPhase ThermoPhase object
154  //! directly from an ASCII input file
155  /*!
156  * @param infile name of the input file
157  * @param id name of the phase id in the file.
158  * If this is blank, the first phase in the file is used.
159  */
160  SurfPhase(const std::string& infile, std::string id);
161 
162  //! Construct and initialize a SurfPhase ThermoPhase object
163  //! directly from an XML database
164  /*!
165  * @param xmlphase XML node pointing to a SurfPhase description
166  */
167  SurfPhase(XML_Node& xmlphase);
168 
169  //! Copy Constructor
170  /*!
171  * Copy constructor for the object. Constructed
172  * object will be a clone of this object, but will
173  * also own all of its data.
174  * This is a wrapper around the assignment operator
175  *
176  * @param right Object to be copied.
177  */
178  SurfPhase(const SurfPhase& right);
179 
180  //! Assignment operator
181  /*!
182  * Assignment operator for the object. Constructed
183  * object will be a clone of this object, but will
184  * also own all of its data.
185  *
186  * @param right Object to be copied.
187  */
188  SurfPhase& operator=(const SurfPhase& right);
189 
190  //! Duplicator from the %ThermoPhase parent class
191  /*
192  * Given a pointer to a %ThermoPhase object, this function will
193  * duplicate the %ThermoPhase object and all underlying structures.
194  * This is basically a wrapper around the copy constructor.
195  *
196  * @return returns a pointer to a %ThermoPhase
197  */
199 
200  //! Equation of state type flag.
201  /*!
202  * Redefine this to return cSurf, listed in mix_defs.h.
203  */
204  virtual int eosType() const {
205  return cSurf;
206  }
207 
208  //! Return the Molar Enthalpy. Units: J/kmol.
209  /*!
210  * For an ideal solution,
211  * \f[
212  * \hat h(T,P) = \sum_k X_k \hat h^0_k(T),
213  * \f]
214  * and is a function only of temperature.
215  * The standard-state pure-species Enthalpies
216  * \f$ \hat h^0_k(T) \f$ are computed by the species thermodynamic
217  * property manager.
218  *
219  * \see SpeciesThermo
220  */
221  virtual doublereal enthalpy_mole() const;
222 
223  //! Return the Molar Internal Energy. Units: J/kmol
224  /**
225  * For a surface phase, the pressure is not a relevant
226  * thermodynamic variable, and so the Enthalpy is equal to the
227  * Internal Energy.
228  */
229  virtual doublereal intEnergy_mole() const;
230 
231  //! Get the species chemical potentials. Units: J/kmol.
232  /*!
233  * This function returns a vector of chemical potentials of the
234  * species in solution at the current temperature, pressure
235  * and mole fraction of the solution.
236  *
237  * @param mu Output vector of species chemical
238  * potentials. Length: m_kk. Units: J/kmol
239  */
240  virtual void getChemPotentials(doublereal* mu) const;
241 
242  //! Returns an array of partial molar enthalpies for the species
243  //! in the mixture. Units (J/kmol)
244  /*!
245  * @param hbar Output vector of species partial molar enthalpies.
246  * Length: m_kk. units are J/kmol.
247  */
248  virtual void getPartialMolarEnthalpies(doublereal* hbar) const;
249 
250  //! Returns an array of partial molar entropies of the species in the
251  //! solution. Units: J/kmol/K.
252  /*!
253  * @param sbar Output vector of species partial molar entropies.
254  * Length = m_kk. units are J/kmol/K.
255  */
256  virtual void getPartialMolarEntropies(doublereal* sbar) const;
257 
258  //! Return an array of partial molar heat capacities for the
259  //! species in the mixture. Units: J/kmol/K
260  /*!
261  * @param cpbar Output vector of species partial molar heat
262  * capacities at constant pressure.
263  * Length = m_kk. units are J/kmol/K.
264  */
265  virtual void getPartialMolarCp(doublereal* cpbar) const;
266 
267  //! Return an array of partial molar volumes for the
268  //! species in the mixture. Units: m^3/kmol.
269  /*!
270  * @param vbar Output vector of species partial molar volumes.
271  * Length = m_kk. units are m^3/kmol.
272  */
273  virtual void getPartialMolarVolumes(doublereal* vbar) const;
274 
275  //! Get the array of chemical potentials at unit activity for the
276  //! standard state species at the current <I>T</I> and <I>P</I> of the solution.
277  /*!
278  * These are the standard state chemical potentials \f$ \mu^0_k(T,P)
279  * \f$. The values are evaluated at the current
280  * temperature and pressure of the solution
281  *
282  * @param mu0 Output vector of chemical potentials.
283  * Length: m_kk.
284  */
285  virtual void getStandardChemPotentials(doublereal* mu0) const;
286 
287  //! Return a vector of activity concentrations for each species
288  /*!
289  * For this phase the activity concentrations,\f$ C^a_k \f$, are defined to be
290  * equal to the actual concentrations, \f$ C^s_k \f$.
291  * Activity concentrations are
292  *
293  * \f[
294  * C^a_k = C^s_k = \frac{\theta_k n_0}{s_k}
295  * \f]
296  *
297  * where \f$ \theta_k \f$ is the surface site fraction for species k,
298  * \f$ n_0 \f$ is the surface site density for the phase, and
299  * \f$ s_k \f$ is the surface size of species k.
300  *
301  * \f$ C^a_k\f$ that are defined such that \f$ a_k = C^a_k /
302  * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration
303  * defined below and \f$ a_k \f$ are activities used in
304  * the thermodynamic functions. These activity concentrations are used
305  * by kinetics manager classes to compute the forward and
306  * reverse rates of elementary reactions. Note that they may
307  * or may not have units of concentration --- they might be
308  * partial pressures, mole fractions, or surface coverages,
309  *
310  * @param c vector of activity concentration (kmol m-2).
311  */
312  virtual void getActivityConcentrations(doublereal* c) const;
313 
314  //! Return the standard concentration for the kth species
315  /*!
316  * The standard concentration \f$ C^0_k \f$ used to normalize
317  * the activity (i.e., generalized) concentration.
318  * For this phase, the standard concentration is species-
319  * specific
320  *
321  * \f[
322  * C^0_k = \frac{n_0}{s_k}
323  * \f]
324  *
325  * This definition implies that the activity is equal to \f$ \theta_k \f$.
326  *
327  * @param k Optional parameter indicating the species. The default
328  * is to assume this refers to species 0.
329  * @return
330  * Returns the standard Concentration in units of m3 kmol-1.
331  */
332  virtual doublereal standardConcentration(size_t k = 0) const;
333 
334  //! Return the log of the standard concentration for the kth species
335  /*!
336  * @param k species index (default 0)
337  */
338  virtual doublereal logStandardConc(size_t k=0) const;
339 
340  //! Set the equation of state parameters from the argument list
341  /*!
342  * @internal
343  * Set equation of state parameters.
344  *
345  * @param n number of parameters. Must be one
346  * @param c array of \a n coefficients
347  * c[0] = The site density (kmol m-2)
348  * @deprecated use setSiteDensity()
349  */
350  virtual void setParameters(int n, doublereal* const c);
351 
352  //! Set the Equation-of-State parameters by reading an XML Node Input
353  /*!
354  * The Equation-of-State data consists of one item, the site density.
355  *
356  * @param thermoData Reference to an XML_Node named thermo
357  * containing the equation-of-state data. The
358  * XML_Node is within the phase XML_Node describing
359  * the %SurfPhase object.
360  *
361  * An example of the contents of the thermoData XML_Node is provided
362  * below. The units attribute is used to supply the units of the
363  * site density in any convenient form. Internally it is changed
364  * into MKS form.
365  *
366  * @code
367  * <thermo model="Surface">
368  * <site_density units="mol/cm2"> 3e-09 </site_density>
369  * </thermo>
370  * @endcode
371  */
372  virtual void setParametersFromXML(const XML_Node& thermoData);
373 
374  //! Initialize the SurfPhase object after all species have been set up
375  /*!
376  * @internal Initialize.
377  *
378  * This method is provided to allow
379  * subclasses to perform any initialization required after all
380  * species have been added. For example, it might be used to
381  * resize internal work arrays that must have an entry for
382  * each species. The base class implementation does nothing,
383  * and subclasses that do not require initialization do not
384  * need to overload this method. When importing a CTML phase
385  * description, this method is called from ThermoPhase::initThermoXML(),
386  * which is called from importPhase(),
387  * just prior to returning from function importPhase().
388  *
389  * @see importCTML.cpp
390  */
391  virtual void initThermo();
392 
393  //! Set the initial state of the Surface Phase from an XML_Node
394  /*!
395  * State variables that can be set by this routine are
396  * the temperature and the surface site coverages.
397  *
398  * @param state XML_Node containing the state information
399  *
400  * An example of the XML code block is given below.
401  *
402  * @code
403  * <state>
404  * <temperature units="K">1200.0</temperature>
405  * <coverages>c6H*:0.1, c6HH:0.9</coverages>
406  * </state>
407  * @endcode
408  */
409  virtual void setStateFromXML(const XML_Node& state);
410 
411  //! Returns the site density
412  /*!
413  * Site density kmol m-2
414  */
415  doublereal siteDensity() {
416  return m_n0;
417  }
418 
419  //! Set the site density of the surface phase (kmol m-2)
420  /*!
421  * @param n0 Site density of the surface phase (kmol m-2)
422  */
423  void setSiteDensity(doublereal n0);
424 
425  //! Get the nondimensional Gibbs functions for the species
426  //! in their standard states at the current <I>T</I> and <I>P</I> of the solution.
427  /*!
428  * @param grt Output vector of nondimensional standard state gibbs free energies
429  * Length: m_kk.
430  */
431  virtual void getGibbs_RT(doublereal* grt) const;
432 
433  //! Get the nondimensional Enthalpy functions for the species standard states
434  //! at their standard states at the current <I>T</I> and <I>P</I> of the solution.
435  /*!
436  * @param hrt Output vector of nondimensional standard state enthalpies.
437  * Length: m_kk.
438  */
439  virtual void getEnthalpy_RT(doublereal* hrt) const;
440 
441  //! Get the array of nondimensional Entropy functions for the
442  //! species standard states at the current <I>T</I> and <I>P</I> of the solution.
443  /*!
444  * @param sr Output vector of nondimensional standard state entropies.
445  * Length: m_kk.
446  */
447  virtual void getEntropy_R(doublereal* sr) const;
448 
449  //! Get the nondimensional Heat Capacities at constant
450  //! pressure for the species standard states
451  //! at the current <I>T</I> and <I>P</I> of the solution
452  /*!
453  * @param cpr Output vector of nondimensional standard state heat capacities
454  * Length: m_kk.
455  */
456  virtual void getCp_R(doublereal* cpr) const;
457 
458  //! Get the molar volumes of the species standard states at the current
459  //! <I>T</I> and <I>P</I> of the solution.
460  /*!
461  * units = m^3 / kmol
462  *
463  * @param vol Output vector containing the standard state volumes.
464  * Length: m_kk.
465  */
466  virtual void getStandardVolumes(doublereal* vol) const;
467 
468  //! Return the thermodynamic pressure (Pa).
469  /*!
470  * This method must be overloaded in derived classes. Since the
471  * mass density, temperature, and mass fractions are stored,
472  * this method should use these values to implement the
473  * mechanical equation of state \f$ P(T, \rho, Y_1, \dots,
474  * Y_K) \f$.
475  */
476  virtual doublereal pressure() const {
477  return m_press;
478  }
479 
480  //! Set the internally stored pressure (Pa) at constant
481  //! temperature and composition
482  /*!
483  * This method must be reimplemented in derived classes, where it
484  * may involve the solution of a nonlinear equation. Within %Cantera,
485  * the independent variable is the density. Therefore, this function
486  * solves for the density that will yield the desired input pressure.
487  * The temperature and composition iare held constant during this process.
488  *
489  * This base class function will print an error, if not overwritten.
490  *
491  * @param p input Pressure (Pa)
492  */
493  virtual void setPressure(doublereal p) {
494  m_press = p;
495  }
496 
497  //! Returns the vector of nondimensional
498  //! Gibbs Free Energies of the reference state at the current temperature
499  //! of the solution and the reference pressure for the species.
500  /*!
501  * @param grt Output vector containing the nondimensional reference state
502  * Gibbs Free energies. Length: m_kk.
503  */
504  virtual void getGibbs_RT_ref(doublereal* grt) const;
505 
506  //! Returns the vector of nondimensional
507  //! enthalpies of the reference state at the current temperature
508  //! of the solution and the reference pressure for the species.
509  /*!
510  * @param hrt Output vector of nondimensional standard state enthalpies.
511  * Length: m_kk.
512  */
513  virtual void getEnthalpy_RT_ref(doublereal* hrt) const;
514 
515 #ifdef H298MODIFY_CAPABILITY
516 
517  //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1)
518  /*!
519  * The 298K heat of formation is defined as the enthalpy change to create the standard state
520  * of the species from its constituent elements in their standard states at 298 K and 1 bar.
521  *
522  * @param k Species k
523  * @param Hf298New Specify the new value of the Heat of Formation at 298K and 1 bar
524  */
525  virtual void modifyOneHf298SS(const size_t& k, const doublereal Hf298New) {
526  m_spthermo->modifyOneHf298(k, Hf298New);
527  m_tlast += 0.0001234;
528  }
529 #endif
530 
531  //! Returns the vector of nondimensional
532  //! entropies of the reference state at the current temperature
533  //! of the solution and the reference pressure for each species.
534  /*!
535  * @param er Output vector containing the nondimensional reference state
536  * entropies. Length: m_kk.
537  */
538  virtual void getEntropy_R_ref(doublereal* er) const;
539 
540  //! Returns the vector of nondimensional constant pressure heat capacities
541  //! of the reference state at the current temperature of the solution and
542  //! reference pressure for each species.
543  /*!
544  * @param cprt Output vector of nondimensional reference state
545  * heat capacities at constant pressure for the species.
546  * Length: m_kk
547  */
548  virtual void getCp_R_ref(doublereal* cprt) const;
549 
550  //! Set the surface site fractions to a specified state.
551  /*!
552  * This routine converts to concentrations
553  * in kmol/m2, using m_n0, the surface site density,
554  * and size(k), which is defined to be the number of
555  * surface sites occupied by the kth molecule.
556  * It then calls Phase::setConcentrations to set the
557  * internal concentration in the object.
558  *
559  * @param theta This is the surface site fraction
560  * for the kth species in the surface phase.
561  * This is a dimensionless quantity.
562  *
563  * This routine normalizes the theta's to 1, before application
564  */
565  void setCoverages(const doublereal* theta);
566 
567  //! Set the surface site fractions to a specified state.
568  /*!
569  * This routine converts to concentrations
570  * in kmol/m2, using m_n0, the surface site density,
571  * and size(k), which is defined to be the number of
572  * surface sites occupied by the kth molecule.
573  * It then calls Phase::setConcentrations to set the
574  * internal concentration in the object.
575  *
576  * @param theta This is the surface site fraction
577  * for the kth species in the surface phase.
578  * This is a dimensionless quantity.
579  */
580  void setCoveragesNoNorm(const doublereal* theta);
581 
582  //! Set the coverages from a string of colon-separated name:value pairs.
583  /*!
584  * @param cov String containing colon-separated name:value pairs
585  */
586  void setCoveragesByName(const std::string& cov);
587 
588  //! Return a vector of surface coverages
589  /*!
590  * Get the coverages.
591  *
592  * @param theta Array theta must be at least as long as
593  * the number of species.
594  */
595  void getCoverages(doublereal* theta) const;
596 
597 protected:
598  //! Surface site density (kmol m-2)
599  doublereal m_n0;
600 
601  //! log of the surface site density
602  doublereal m_logn0;
603 
604  //! Current value of the pressure (Pa)
605  doublereal m_press;
606 
607  //! Current value of the temperature (Kelvin)
608  mutable doublereal m_tlast;
609 
610  //! Temporary storage for the reference state enthalpies
611  mutable vector_fp m_h0;
612 
613  //! Temporary storage for the reference state entropies
614  mutable vector_fp m_s0;
615 
616  //! Temporary storage for the reference state heat capacities
617  mutable vector_fp m_cp0;
618 
619  //! Temporary storage for the reference state gibbs energies
620  mutable vector_fp m_mu0;
621 
622  //! Temporary work array
623  mutable vector_fp m_work;
624 
625  //! vector storing the log of the size of each species.
626  /*!
627  * The size of each species is defined as the number of surface
628  * sites each species occupies.
629  */
631 
632 private:
633  //! Update the species reference state thermodynamic functions
634  /*!
635  * The polynomials for the standard state functions are only
636  * reevaluated if the temperature has changed.
637  *
638  * @param force Boolean, which if true, forces a reevaluation
639  * of the thermo polynomials.
640  * default = false.
641  */
642  void _updateThermo(bool force=false) const;
643 };
644 }
645 
646 #endif
void setCoveragesNoNorm(const doublereal *theta)
Set the surface site fractions to a specified state.
Definition: SurfPhase.cpp:306
virtual void getCp_R_ref(doublereal *cprt) const
Returns the vector of nondimensional constant pressure heat capacities of the reference state at the ...
Definition: SurfPhase.cpp:248
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: SurfPhase.cpp:196
SurfPhase(doublereal n0=0.0)
Constructor.
Definition: SurfPhase.cpp:20
void setCoveragesByName(const std::string &cov)
Set the coverages from a string of colon-separated name:value pairs.
Definition: SurfPhase.cpp:326
virtual void modifyOneHf298SS(const int k, const doublereal Hf298New)
Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1) ...
Definition: ThermoPhase.h:227
doublereal m_press
Current value of the pressure (Pa)
Definition: SurfPhase.h:605
void setCoverages(const doublereal *theta)
Set the surface site fractions to a specified state.
Definition: SurfPhase.cpp:283
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: SurfPhase.cpp:243
virtual doublereal logStandardConc(size_t k=0) const
Return the log of the standard concentration for the kth species.
Definition: SurfPhase.cpp:181
doublereal m_tlast
Current value of the temperature (Kelvin)
Definition: SurfPhase.h:608
Class XML_Node is a tree-based representation of the contents of an XML file.
Definition: xml.h:100
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: SurfPhase.cpp:225
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: SurfPhase.cpp:233
vector_fp m_work
Temporary work array.
Definition: SurfPhase.h:623
void getCoverages(doublereal *theta) const
Return a vector of surface coverages.
Definition: SurfPhase.cpp:318
virtual void getActivityConcentrations(doublereal *c) const
Return a vector of activity concentrations for each species.
Definition: SurfPhase.cpp:171
Base class for a phase with thermodynamic properties.
Definition: ThermoPhase.h:101
const int cSurf
A surface phase. Used by class SurfPhase.
Definition: mix_defs.h:40
doublereal m_n0
Surface site density (kmol m-2)
Definition: SurfPhase.h:599
A simple thermodynamic model for a surface phase, assuming an ideal solution model.
Definition: SurfPhase.h:143
SurfPhase & operator=(const SurfPhase &right)
Assignment operator.
Definition: SurfPhase.cpp:85
doublereal m_logn0
log of the surface site density
Definition: SurfPhase.h:602
virtual int eosType() const
Equation of state type flag.
Definition: SurfPhase.h:204
virtual void initThermo()
Initialize the SurfPhase object after all species have been set up.
Definition: SurfPhase.cpp:253
virtual void setStateFromXML(const XML_Node &state)
Set the initial state of the Surface Phase from an XML_Node.
Definition: SurfPhase.cpp:376
virtual void getCp_R(doublereal *cpr) const
Get the nondimensional Heat Capacities at constant pressure for the species standard states at the cu...
Definition: SurfPhase.cpp:218
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
Definition: SurfPhase.cpp:122
virtual doublereal pressure() const
Return the thermodynamic pressure (Pa).
Definition: SurfPhase.h:476
vector_fp m_logsize
vector storing the log of the size of each species.
Definition: SurfPhase.h:630
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species standard states at their standard states at...
Definition: SurfPhase.cpp:204
virtual void getEnthalpy_RT_ref(doublereal *hrt) const
Returns the vector of nondimensional enthalpies of the reference state at the current temperature of ...
Definition: SurfPhase.cpp:238
ThermoPhase * duplMyselfAsThermoPhase() const
Duplicator from the ThermoPhase parent class.
Definition: SurfPhase.cpp:103
virtual doublereal intEnergy_mole() const
Return the Molar Internal Energy. Units: J/kmol.
Definition: SurfPhase.cpp:117
void _updateThermo(bool force=false) const
Update the species reference state thermodynamic functions.
Definition: SurfPhase.cpp:347
vector_fp m_s0
Temporary storage for the reference state entropies.
Definition: SurfPhase.h:614
virtual void getPartialMolarVolumes(doublereal *vbar) const
Return an array of partial molar volumes for the species in the mixture.
Definition: SurfPhase.cpp:149
virtual void setPressure(doublereal p)
Set the internally stored pressure (Pa) at constant temperature and composition.
Definition: SurfPhase.h:493
vector_fp m_h0
Temporary storage for the reference state enthalpies.
Definition: SurfPhase.h:611
void setSiteDensity(doublereal n0)
Set the site density of the surface phase (kmol m-2)
Definition: SurfPhase.cpp:273
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:165
vector_fp m_mu0
Temporary storage for the reference state gibbs energies.
Definition: SurfPhase.h:620
virtual doublereal standardConcentration(size_t k=0) const
Return the standard concentration for the kth species.
Definition: SurfPhase.cpp:176
virtual void setParametersFromXML(const XML_Node &thermoData)
Set the Equation-of-State parameters by reading an XML Node Input.
Definition: SurfPhase.cpp:365
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Entropy functions for the species standard states at the current T an...
Definition: SurfPhase.cpp:211
virtual doublereal enthalpy_mole() const
Return the Molar Enthalpy. Units: J/kmol.
Definition: SurfPhase.cpp:108
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies of the species in the solution.
Definition: SurfPhase.cpp:131
Header file for class ThermoPhase, the base class for phases with thermodynamic properties, and the text for the Module thermoprops (see Thermodynamic Properties and class ThermoPhase).
virtual void getPartialMolarCp(doublereal *cpbar) const
Return an array of partial molar heat capacities for the species in the mixture.
Definition: SurfPhase.cpp:139
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
Definition: SurfPhase.cpp:160
SpeciesThermo * m_spthermo
Pointer to the calculation manager for species reference-state thermodynamic properties.
Definition: ThermoPhase.h:1625
vector_fp m_cp0
Temporary storage for the reference state heat capacities.
Definition: SurfPhase.h:617
doublereal siteDensity()
Returns the site density.
Definition: SurfPhase.h:415
virtual void getStandardChemPotentials(doublereal *mu0) const
Get the array of chemical potentials at unit activity for the standard state species at the current T...
Definition: SurfPhase.cpp:154
virtual void setParameters(int n, doublereal *const c)
Set the equation of state parameters from the argument list.
Definition: SurfPhase.cpp:186