SurfPhase.h

Go to the documentation of this file.
00001 /**
00002  *  @file SurfPhase.h
00003  *  Header for a simple thermodynamics model of a surface phase
00004  *  derived from ThermoPhase, 
00005  *  assuming an ideal solution model
00006  *  (see \ref thermoprops and class \link Cantera::SurfPhase SurfPhase\endlink).
00007  */
00008 
00009 /* 
00010  *  $Date: 2010-01-16 13:57:05 -0500 (Sat, 16 Jan 2010) $
00011  *  $Revision: 384 $
00012  *
00013  *  Copyright 2002 California Institute of Technology
00014  *
00015  */
00016 
00017 #ifndef CT_SURFPHASE_H
00018 #define CT_SURFPHASE_H
00019 
00020 #include "mix_defs.h"
00021 #include "ThermoPhase.h"
00022 
00023 namespace Cantera {
00024     
00025   //!  A simple thermoydnamics model for a surface phase, 
00026   //!  assuming an ideal solution model.
00027   /*!
00028    * The surface consists of a grid of equivalent sites. 
00029    * Surface species may be defined to
00030    * occupy one or more sites. The surface species are assumed to be
00031    * independent, and thus the species form an ideal solution.
00032    *
00033    * The density of surface sites is given by the variable \f$ n_0 \f$, 
00034    * which has SI units of kmol m-2. 
00035    *
00036    * <b> Specification of Species Standard State Properties </b>
00037    * 
00038    *  It is assumed that the reference state thermodynamics may be
00039    *  obtained by a pointer to a populated species thermodynamic property
00040    *  manager class (see ThermoPhase::m_spthermo). How to relate pressure
00041    *  changes to the reference state thermodynamics is resolved at this level.
00042    *  
00043    *  Pressure is defined as an independent variable in this phase. However, it has
00044    *  no effect on any quantities, as the molar concentration is a constant.
00045    *
00046    * Therefore, The standard state internal energy for species  <I>k</I> is 
00047    * equal to the enthalpy for species <I>k</I>.
00048    *
00049    *       \f[
00050    *            u^o_k = h^o_k  
00051    *       \f]
00052    *  
00053    *   Also, the standard state chemical potentials, entropy, and heat capacities
00054    *   are independent of pressure. The standard state gibbs free energy is obtained
00055    * from the enthalpy and entropy functions.
00056    *   
00057    * <b> Specification of Solution Thermodynamic Properties </b>
00058    *
00059    * The activity of species defined in the phase is given by
00060    *       \f[
00061    *            a_k = \theta_k      
00062    *       \f]
00063    *
00064    * The chemical potential for species <I>k</I> is equal to 
00065    *       \f[
00066    *            \mu_k(T,P) = \mu^o_k(T) + R T \log(\theta_k)     
00067    *       \f]
00068    *
00069    * Pressure is defined as an independent variable in this phase. However, it has
00070    * no effect on any quantities, as the molar concentration is a constant.
00071    *
00072    * The internal energy for species k is equal to the enthalpy for species <I>k</I>
00073    *       \f[
00074    *            u_k = h_k  
00075    *       \f]
00076    *
00077    * The entropy for the phase is given by the following relation, which is
00078    * independent of the pressure:
00079    *
00080    *       \f[
00081    *            s_k(T,P) = s^o_k(T) - R \log(\theta_k)     
00082    *       \f]
00083    *
00084    * <b> Application within %Kinetics Managers </b>
00085    *
00086    * The activity concentration,\f$  C^a_k \f$, used by the kinetics manager, is equal to 
00087    * the actual concentration, \f$ C^s_k \f$, and is given by the following
00088    * expression.
00089    *       \f[
00090    *            C^a_k = C^s_k = \frac{\theta_k  n_0}{s_k}      
00091    *       \f]
00092    *
00093    * The standard concentration for species <I>k</I> is: 
00094    *        \f[
00095    *            C^0_k = \frac{n_0}{s_k}      
00096    *        \f]
00097    *
00098    * <b> Instantiation of the Class </b>
00099    *
00100    * The constructor for this phase is located in the default ThermoFactory
00101    * for Cantera. A new SurfPhase may be created by the following code snippet:
00102    *
00103    * @code
00104    *    XML_Node *xc = get_XML_File("diamond.xml"); 
00105    *    XML_Node * const xs = xc->findNameID("phase", "diamond_100");
00106    *    ThermoPhase *diamond100TP_tp = newPhase(*xs);
00107    *    SurfPhase *diamond100TP = dynamic_cast <SurfPhase *>(diamond100TP_tp);
00108    * @endcode
00109    *
00110    * or by the following constructor:
00111    *
00112    * @code
00113    *    XML_Node *xc = get_XML_File("diamond.xml"); 
00114    *    XML_Node * const xs = xc->findNameID("phase", "diamond_100");
00115    *    SurfPhase *diamond100TP = new SurfPhase(*xs);
00116    * @endcode
00117    *
00118    *   <b> XML Example </b>
00119    *
00120    *   An example of an XML Element named phase setting up a SurfPhase object named diamond_100
00121    *   is given below.
00122    *
00123    *  @verbatim
00124    * <phase dim="2" id="diamond_100">
00125    *    <elementArray datasrc="elements.xml">H C</elementArray>
00126    *    <speciesArray datasrc="#species_data">c6HH c6H* c6*H c6** c6HM c6HM* c6*M c6B </speciesArray>
00127    *    <reactionArray datasrc="#reaction_data"/>
00128    *    <state>
00129    *       <temperature units="K">1200.0</temperature>
00130    *       <coverages>c6H*:0.1, c6HH:0.9</coverages>
00131    *    </state>
00132    *    <thermo model="Surface">
00133    *       <site_density units="mol/cm2">3e-09</site_density>
00134    *    </thermo>
00135    *    <kinetics model="Interface"/>
00136    *    <transport model="None"/>
00137    *    <phaseArray> 
00138    *         gas_phase diamond_bulk 
00139    *    </phaseArray>
00140    * </phase>
00141    *
00142    *  @endverbatim
00143    *
00144    * The model attribute, "Surface", on the thermo element identifies the phase as being
00145    * a SurfPhase object.
00146    *
00147    * @ingroup thermoprops
00148    */
00149   class SurfPhase : public ThermoPhase  {
00150       
00151   public:
00152 
00153     //! Constructor.
00154     /*!
00155      *  @param n0 Site Density of the Surface Phase
00156      *            Units: kmol m-2.
00157      */
00158     SurfPhase(doublereal n0 = 0.0);
00159 
00160     //! Construct and initialize a SurfPhase ThermoPhase object 
00161     //! directly from an asci input file
00162     /*!
00163      * @param infile name of the input file
00164      * @param id     name of the phase id in the file.
00165      *               If this is blank, the first phase in the file is used.
00166      */
00167     SurfPhase(std::string infile, std::string id);
00168 
00169     //! Construct and initialize a SurfPhase ThermoPhase object 
00170     //! directly from an XML database
00171     /*!
00172      *  @param xmlphase XML node pointing to a SurfPhase description
00173      */
00174     SurfPhase(XML_Node& xmlphase);
00175     
00176     //! Copy Constructor
00177     /*!
00178      * Copy constructor for the object. Constructed
00179      * object will be a clone of this object, but will
00180      * also own all of its data.
00181      * This is a wrapper around the assignment operator
00182      *
00183      * @param right Object to be copied.
00184      */
00185     SurfPhase(const SurfPhase &right);
00186 
00187     //! Asignment operator
00188     /*!
00189      * Assignment operator for the object. Constructed
00190      * object will be a clone of this object, but will
00191      * also own all of its data.
00192      *
00193      * @param right Object to be copied.
00194      */
00195     SurfPhase& operator=(const SurfPhase &right);
00196 
00197     //! Destructor.
00198     virtual ~SurfPhase();
00199 
00200     //! Duplicator from the %ThermoPhase parent class
00201     /*
00202      * Given a pointer to a %ThermoPhase object, this function will
00203      * duplicate the %ThermoPhase object and all underlying structures.
00204      * This is basically a wrapper around the copy constructor.
00205      *
00206      * @return returns a pointer to a %ThermoPhase
00207      */
00208     ThermoPhase *duplMyselfAsThermoPhase() const;
00209 
00210     //----- reimplimented methods of class ThermoPhase ------
00211 
00212     //! Equation of state type flag.
00213     /*!
00214      *  Redefine this to return cSurf, listed in mix_defs.h.
00215      */
00216     virtual int eosType() const { return cSurf; }
00217 
00218     //! Return the Molar Enthalpy. Units: J/kmol.
00219     /*!
00220      * For an ideal solution,
00221      * \f[
00222      * \hat h(T,P) = \sum_k X_k \hat h^0_k(T),
00223      * \f]
00224      * and is a function only of temperature.
00225      * The standard-state pure-species Enthalpies 
00226      * \f$ \hat h^0_k(T) \f$ are computed by the species thermodynamic 
00227      * property manager.
00228      *
00229      * \see SpeciesThermo
00230      */
00231     virtual doublereal enthalpy_mole() const;
00232 
00233     //! Return the Molar Internal Energy. Units: J/kmol
00234     /**
00235      * For a surface phase, the pressure is not a relevant
00236      * thermodynamic variable, and so the Enthalpy is equal to the
00237      * Internal Energy.
00238      */
00239     virtual doublereal intEnergy_mole() const;
00240 
00241     //! Get the species chemical potentials. Units: J/kmol.
00242     /*!
00243      * This function returns a vector of chemical potentials of the 
00244      * species in solution at the current temperature, pressure
00245      * and mole fraction of the solution.
00246      *
00247      * @param mu  Output vector of species chemical 
00248      *            potentials. Length: m_kk. Units: J/kmol
00249      */
00250     virtual void getChemPotentials(doublereal* mu) const;
00251 
00252     //! Returns an array of partial molar enthalpies for the species
00253     //! in the mixture. Units (J/kmol)
00254     /*!
00255      * @param hbar    Output vector of species partial molar enthalpies.
00256      *                Length: m_kk. units are J/kmol.
00257      */
00258     virtual void getPartialMolarEnthalpies(doublereal* hbar) const;
00259 
00260     //! Returns an array of partial molar entropies of the species in the
00261     //! solution. Units: J/kmol/K.
00262     /*!
00263      * @param sbar    Output vector of species partial molar entropies.
00264      *                Length = m_kk. units are J/kmol/K.
00265      */
00266     virtual void getPartialMolarEntropies(doublereal* sbar) const;
00267 
00268  
00269 
00270     //! Return an array of partial molar heat capacities for the
00271     //! species in the mixture.  Units: J/kmol/K
00272     /*!
00273      * @param cpbar   Output vector of species partial molar heat
00274      *                capacities at constant pressure.
00275      *                Length = m_kk. units are J/kmol/K.
00276      */
00277     virtual void getPartialMolarCp(doublereal* cpbar) const;
00278 
00279     //! Return an array of partial molar volumes for the
00280     //! species in the mixture. Units: m^3/kmol.
00281     /*!
00282      *  @param vbar   Output vector of speciar partial molar volumes.
00283      *                Length = m_kk. units are m^3/kmol.
00284      */
00285     virtual void getPartialMolarVolumes(doublereal* vbar) const;
00286 
00287     //! Get the array of chemical potentials at unit activity for the
00288     //! standard state species at the current <I>T</I> and <I>P</I> of the solution.
00289     /*!
00290      * These are the standard state chemical potentials \f$ \mu^0_k(T,P)
00291      * \f$. The values are evaluated at the current
00292      * temperature and pressure of the solution
00293      *
00294      * @param mu0  Output vector of chemical potentials. 
00295      *             Length: m_kk.
00296      */
00297     virtual void getStandardChemPotentials(doublereal* mu0) const;
00298 
00299 
00300 
00301     //! Return a vector of activity concentrations for each species
00302     /*!
00303      *  For this phase the activity concentrations,\f$ C^a_k \f$,  are defined to be
00304      *  equal to the actual concentrations, \f$ C^s_k \f$.
00305      *  Activity concentrations are 
00306      *
00307      *      \f[
00308      *            C^a_k = C^s_k = \frac{\theta_k  n_0}{s_k}    
00309      *      \f]
00310      *
00311      *  where \f$ \theta_k \f$ is the surface site fraction for species k,
00312      *  \f$ n_0 \f$ is the surface site density for the phase, and
00313      *  \f$ s_k \f$ is the surface size of species k.
00314      *
00315      * \f$ C^a_k\f$ that are defined such that \f$ a_k = C^a_k /
00316      * C^0_k, \f$ where \f$ C^0_k \f$ is a standard concentration
00317      * defined below and \f$ a_k \f$ are activities used in
00318      * the thermodynamic functions.  These activity concentrations are used
00319      * by kinetics manager classes to compute the forward and
00320      * reverse rates of elementary reactions. Note that they may
00321      * or may not have units of concentration --- they might be
00322      * partial pressures, mole fractions, or surface coverages,
00323      *
00324      * @param c vector of activity concentration (kmol m-2).
00325      */
00326     virtual void getActivityConcentrations(doublereal* c) const;
00327 
00328     //! Return the standard concentration for the kth species
00329     /*!
00330      * The standard concentration \f$ C^0_k \f$ used to normalize
00331      * the activity (i.e., generalized) concentration.
00332      * For this phase, the standard concentration is species-
00333      * specific
00334      *
00335      *        \f[
00336      *            C^0_k = \frac{n_0}{s_k}      
00337      *        \f]
00338      *
00339      *  This definition implies that the activity is equal to \f$ \theta_k \f$.
00340      *
00341      * @param k Optional parameter indicating the species. The default
00342      *          is to assume this refers to species 0.
00343      * @return 
00344      *   Returns the standard Concentration in units of m3 kmol-1.
00345      */
00346     virtual doublereal standardConcentration(int k = 0) const;
00347   
00348     //! Return the log of the standard concentration for the kth species
00349     /*!
00350      * @param k species index (default 0)
00351      */
00352     virtual doublereal logStandardConc(int k=0) const;
00353 
00354     //! Set the equation of state parameters from the argument list
00355     /*!
00356      * @internal
00357      * Set equation of state parameters.
00358      *
00359      * @param n number of parameters. Must be one
00360      * @param c array of \a n coefficients
00361      *           c[0] = The site density (kmol m-2)
00362      */
00363     virtual void setParameters(int n, doublereal* const c);
00364 
00365     //! Set the Equation-of-State parameters by reading an XML Node Input
00366     /*!
00367      *
00368      * The Equation-of-State data consists of one item, the site density.
00369      *
00370      * @param thermoData   Reference to an XML_Node named thermo
00371      *                     containing the equation-of-state data. The
00372      *                     XML_Node is within the phase XML_Node describing
00373      *                     the %SurfPhase object.
00374      *
00375      * An example of the contents of the thermoData XML_Node is provided
00376      * below. The units attribute is used to supply the units of the
00377      * site density in any convenient form. Internally it is changed
00378      * into MKS form.
00379      *
00380      * @verbatim
00381      *    <thermo model="Surface">
00382      *       <site_density units="mol/cm2"> 3e-09 </site_density>
00383      *    </thermo>
00384      * @endverbatim
00385      */
00386     virtual void setParametersFromXML(const XML_Node& thermoData);
00387 
00388    
00389     //! Initialize the SurfPhase object after all species have been set up
00390     /*!
00391      * @internal Initialize.
00392      *
00393      * This method is provided to allow
00394      * subclasses to perform any initialization required after all
00395      * species have been added. For example, it might be used to
00396      * resize internal work arrays that must have an entry for
00397      * each species.  The base class implementation does nothing,
00398      * and subclasses that do not require initialization do not
00399      * need to overload this method.  When importing a CTML phase
00400      * description, this method is called from ThermoPhase::initThermoXML(),
00401      * which is called from importPhase(),
00402      * just prior to returning from function importPhase().
00403      *
00404      * @see importCTML.cpp
00405      */
00406     virtual void initThermo();
00407 
00408 
00409     //! Set the initial state of the Surface Phase from an XML_Node
00410     /*!
00411      *  State variables that can be set by this routine are
00412      *  the temperature and the surface site coverages.
00413      *
00414      * @param state  XML_Node containing the state information
00415      *
00416      * An example of the XML code block is given below.
00417      *
00418      * @verbatim
00419      *   <state>
00420      *      <temperature units="K">1200.0</temperature>
00421      *      <coverages>c6H*:0.1, c6HH:0.9</coverages>
00422      *   </state>
00423      * @endverbatim
00424      */
00425     virtual void setStateFromXML(const XML_Node& state);
00426 
00427     //! Returns the site density
00428     /*!
00429      * Site density kmol m-2
00430      */
00431     doublereal siteDensity(){ return m_n0; }
00432 
00433     //! Sets the potential energy of species k.
00434     /*!
00435      *
00436      * @param k    Species index
00437      * @param pe   Value of the potential energy (J kmol-1)
00438      */
00439     void setPotentialEnergy(int k, doublereal pe);
00440 
00441     //! Return the potential energy of species k.
00442     /*!
00443      * Returns the potential energy of species, k,
00444      * J kmol-1
00445      *
00446      * @param k  Species index
00447      */
00448     doublereal potentialEnergy(int k) {return m_pe[k];}
00449 
00450     //! Set the site density of the surface phase (kmol m-2)
00451     /*!
00452      *  @param n0 Site density of the surface phase (kmol m-2)
00453      */
00454     void setSiteDensity(doublereal n0);
00455 
00456     //! Get the nondimensional Gibbs functions for the species
00457     //! in their standard states at the current <I>T</I> and <I>P</I> of the solution.
00458     /*!
00459      * @param grt  Output vector of nondimensional standard state gibbs free energies
00460      *             Length: m_kk.
00461      */
00462     virtual void getGibbs_RT(doublereal* grt) const;
00463 
00464     //! Get the nondimensional Enthalpy functions for the species standard states
00465     //! at their standard states at the current <I>T</I> and <I>P</I> of the solution.
00466     /*!
00467      * @param hrt      Output vector of  nondimensional standard state enthalpies.
00468      *                 Length: m_kk.
00469      */
00470     virtual void getEnthalpy_RT(doublereal* hrt) const;
00471 
00472     //! Get the array of nondimensional Entropy functions for the
00473     //! species standard states at the current <I>T</I> and <I>P</I> of the solution.
00474     /*!
00475      * @param sr   Output vector of  nondimensional standard state entropies.
00476      *             Length: m_kk.
00477      */
00478     virtual void getEntropy_R(doublereal* sr) const;
00479 
00480     //! Get the nondimensional Heat Capacities at constant
00481     //! pressure for the species standard states
00482     //! at the current <I>T</I> and <I>P</I> of the solution
00483     /*!
00484      * @param cpr   Output vector of nondimensional standard state heat capacities
00485      *              Length: m_kk.
00486      */
00487     virtual void getCp_R(doublereal* cpr) const;
00488 
00489     //!  Get the molar volumes of the species standard states at the current
00490     //!  <I>T</I> and <I>P</I> of the solution.
00491     /*!
00492      * units = m^3 / kmol
00493      *
00494      * @param vol     Output vector containing the standard state volumes.
00495      *                Length: m_kk.
00496      */
00497     virtual void getStandardVolumes(doublereal *vol) const;
00498 
00499     //! Return the thermodynamic pressure (Pa).
00500     /*!
00501      *  This method must be overloaded in derived classes. Since the
00502      *  mass density, temperature, and mass fractions are stored,
00503      *  this method should use these values to implement the
00504      *  mechanical equation of state \f$ P(T, \rho, Y_1, \dots,
00505      *  Y_K) \f$.
00506      */
00507     virtual doublereal pressure() const {
00508       return m_press;
00509     }
00510 
00511     //! Set the internally storred pressure (Pa) at constant
00512     //! temperature and composition
00513     /*!
00514      *   This method must be reimplemented in derived classes, where it
00515      *   may involve the solution of a nonlinear equation. Within %Cantera,
00516      *   the independent variable is the density. Therefore, this function
00517      *   solves for the density that will yield the desired input pressure.
00518      *   The temperature and composition iare held constant during this process.
00519      *
00520      *  This base class function will print an error, if not overwritten.
00521      *
00522      *  @param p input Pressure (Pa)
00523      */
00524     virtual void setPressure(doublereal p) {
00525       m_press = p;
00526     }
00527 
00528     //!  Returns the vector of nondimensional
00529     //!  Gibbs Free Energies of the reference state at the current temperature
00530     //!  of the solution and the reference pressure for the species.
00531     /*!
00532      * @param grt     Output vector containing the nondimensional reference state 
00533      *                Gibbs Free energies.  Length: m_kk.
00534      */
00535     virtual void getGibbs_RT_ref(doublereal *grt) const;
00536 
00537     //!  Returns the vector of nondimensional
00538     //!  enthalpies of the reference state at the current temperature
00539     //!  of the solution and the reference pressure for the species.
00540     /*!
00541      * @param hrt      Output vector of  nondimensional standard state enthalpies.
00542      *                 Length: m_kk.
00543      */
00544     virtual void getEnthalpy_RT_ref(doublereal* hrt) const;
00545 
00546 #ifdef H298MODIFY_CAPABILITY
00547   
00548     //! Modify the value of the 298 K Heat of Formation of one species in the phase (J kmol-1)
00549     /*!
00550      *   The 298K heat of formation is defined as the enthalpy change to create the standard state
00551      *   of the species from its constituent elements in their standard states at 298 K and 1 bar.
00552      *
00553      *   @param  k           Species k
00554      *   @param  Hf298New    Specify the new value of the Heat of Formation at 298K and 1 bar                      
00555      */
00556     virtual void modifyOneHf298SS(const int k, const doublereal Hf298New) {
00557       m_spthermo->modifyOneHf298(k, Hf298New);
00558       m_tlast += 0.0001234;
00559     }
00560 #endif
00561 
00562     //!  Returns the vector of nondimensional
00563     //!  entropies of the reference state at the current temperature
00564     //!  of the solution and the reference pressure for each species.
00565     /*!
00566      * @param er      Output vector containing the nondimensional reference state 
00567      *                entropies.  Length: m_kk.
00568      */
00569     virtual void getEntropy_R_ref(doublereal *er) const;
00570 
00571     //!  Returns the vector of nondimensional
00572     //!  constant pressure heat capacities of the reference state
00573     //!  at the current temperature of the solution
00574     //!  and reference pressure for each species.
00575     /*!
00576      * @param cprt   Output vector of nondimensional reference state
00577      *               heat capacities at constant pressure for the species.
00578      *               Length: m_kk
00579      */
00580     virtual void getCp_R_ref(doublereal *cprt) const;
00581 
00582 
00583     //------- new methods defined in this class ----------
00584     
00585     //! Set the surface site fractions to a specified state. 
00586     /*!
00587      * This routine converts to concentrations
00588      * in kmol/m2, using m_n0, the surface site density,
00589      * and size(k), which is defined to be the number of
00590      * surface sites occupied by the kth molecule.
00591      * It then calls State::setConcentrations to set the
00592      * internal concentration in the object.
00593      *
00594      * @param theta    This is the surface site fraction
00595      *                 for the kth species in the surface phase.
00596      *                 This is a dimensionless quantity.
00597      * 
00598      * This routine normalizes the theta's to 1, before application
00599      */
00600     void setCoverages(const doublereal* theta);
00601     
00602     //! Set the surface site fractions to a specified state. 
00603     /*!
00604      * This routine converts to concentrations
00605      * in kmol/m2, using m_n0, the surface site density,
00606      * and size(k), which is defined to be the number of
00607      * surface sites occupied by the kth molecule.
00608      * It then calls State::setConcentrations to set the
00609      * internal concentration in the object.
00610      *
00611      * @param theta    This is the surface site fraction
00612      *                 for the kth species in the surface phase.
00613      *                 This is a dimensionless quantity.
00614      */
00615     void setCoveragesNoNorm(const doublereal* theta);
00616 
00617     
00618     //! Set the coverages from a string of colon-separated  name:value pairs.
00619     /*!
00620      *  @param cov  String containing colon-separated  name:value pairs
00621      */
00622     void setCoveragesByName(std::string cov);
00623 
00624     //! Return a vector of surface coverages
00625     /*!
00626      * Get the coverages.
00627      *
00628      * @param theta Array theta must be at least as long as
00629      *              the number of species.
00630      */
00631     void getCoverages(doublereal* theta) const;
00632 
00633   protected:
00634 
00635     //! Surface site density (kmol m-2)
00636     doublereal m_n0;
00637 
00638     //! log of the surface site density
00639     doublereal m_logn0;
00640 
00641     //! Minimum temperature for valid species standard state thermo props
00642     /*!
00643      * This is the minimum temperature at which all species have valid standard
00644      * state thermo props defined.
00645      */
00646     doublereal m_tmin;
00647 
00648     //! Maximum temperature for valid species standard state thermo props
00649     /*!
00650      * This is the maximum temperature at which all species have valid standard
00651      * state thermo props defined.
00652      */
00653     doublereal m_tmax;
00654 
00655     //! Current value of the pressure (Pa)
00656     doublereal m_press;
00657 
00658     //! Current value of the temperature (Kelvin)
00659     mutable doublereal    m_tlast;
00660 
00661     //! Temporary storage for the reference state enthalpies
00662     mutable array_fp      m_h0;
00663 
00664     //! Temporary storage for the reference state entropies
00665     mutable array_fp      m_s0;
00666 
00667     //! Temporary storage for the reference state heat capacities
00668     mutable array_fp      m_cp0;
00669 
00670     //! Temporary storage for the reference state gibbs energies
00671     mutable array_fp      m_mu0;
00672 
00673     //! Temporary work array
00674     mutable array_fp      m_work;
00675 
00676     //! Potential energy of each species in the surface phase
00677     /*!
00678      * @todo Fix potential energy
00679      * Note, the potential energy terms seem to be orphaned at the moment.
00680      * They are not connected to the Gibbs free energy calculation in
00681      * this object
00682      *
00683      * @deprecated
00684      */
00685     mutable array_fp      m_pe;
00686 
00687     //! vector storring the log of the size of each species.
00688     /*!
00689      * The size of each species is defined as the number of surface
00690      * sites each species occupies.
00691      */
00692     mutable array_fp      m_logsize;
00693 
00694   private:
00695 
00696     //! Update the species reference state thermodynamic functions
00697     /*!
00698      * The polynomials for the standard state functions are only
00699      * reevalulated if the temperature has changed.
00700      *
00701      * @param force  Boolean, which if true, forces a reevalulation
00702      *               of the thermo polynomials.
00703      *               default = false.
00704      */
00705     void _updateThermo(bool force=false) const;
00706 
00707   };
00708 }
00709         
00710 #endif
00711 
00712 
00713 
00714 
00715 
Generated by  doxygen 1.6.3