Cantera  2.2.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
InterfaceKinetics Class Reference

A kinetics manager for heterogeneous reaction mechanisms. More...

#include <InterfaceKinetics.h>

Inheritance diagram for InterfaceKinetics:
[legend]
Collaboration diagram for InterfaceKinetics:
[legend]

Public Member Functions

 InterfaceKinetics (thermo_t *thermo=0)
 Constructor. More...
 
virtual ~InterfaceKinetics ()
 Destructor. More...
 
 InterfaceKinetics (const InterfaceKinetics &right)
 Copy Constructor. More...
 
InterfaceKineticsoperator= (const InterfaceKinetics &right)
 Assignment operator. More...
 
virtual KineticsduplMyselfAsKinetics (const std::vector< thermo_t * > &tpVector) const
 Duplication routine for objects which inherit from Kinetics. More...
 
virtual int type () const
 Identifies the kinetics manager type. More...
 
void setElectricPotential (int n, doublereal V)
 Set the electric potential in the nth phase. More...
 
virtual void updateROP ()
 Internal routine that updates the Rates of Progress of the reactions. More...
 
void _update_rates_T ()
 Update properties that depend on temperature. More...
 
void _update_rates_phi ()
 Update properties that depend on the electric potential. More...
 
void _update_rates_C ()
 Update properties that depend on the species mole fractions and/or concentration,. More...
 
void advanceCoverages (doublereal tstep)
 Advance the surface coverages in time. More...
 
void solvePseudoSteadyStateProblem (int ifuncOverride=-1, doublereal timeScaleOverride=1.0)
 Solve for the pseudo steady-state of the surface problem. More...
 
void setIOFlag (int ioFlag)
 
void checkPartialEquil ()
 
virtual void updateMu0 ()
 Update the standard state chemical potentials and species equilibrium constant entries. More...
 
size_t reactionNumber () const
 Number of reactions in the mechanism. More...
 
void updateKc ()
 Update the equilibrium constants and stored electrochemical potentials in molar units for all reversible reactions and for all species. More...
 
void applyVoltageKfwdCorrection (doublereal *const kfwd)
 Apply modifications for the forward reaction rate for interfacial charge transfer reactions. More...
 
void convertExchangeCurrentDensityFormulation (doublereal *const kfwd)
 When an electrode reaction rate is optionally specified in terms of its exchange current density, adjust kfwd to the standard reaction rate constant form and units. More...
 
void setPhaseExistence (const size_t iphase, const int exists)
 Set the existence of a phase in the reaction object. More...
 
void setPhaseStability (const size_t iphase, const int isStable)
 Set the stability of a phase in the reaction object. More...
 
int phaseExistence (const size_t iphase) const
 Gets the phase existence int for the ith phase. More...
 
int phaseStability (const size_t iphase) const
 Gets the phase stability int for the ith phase. More...
 
virtual void determineFwdOrdersBV (ReactionData &rdata, vector_fp &fwdFullorders)
 
virtual void determineFwdOrdersBV (ElectrochemicalReaction &r, vector_fp &fwdFullorders)
 
Reaction Rates Of Progress
virtual void getEquilibriumConstants (doublereal *kc)
 Equilibrium constant for all reactions including the voltage term. More...
 
void updateExchangeCurrentQuantities ()
 values needed to convert from exchange current density to surface reaction rate. More...
 
virtual void getDeltaGibbs (doublereal *deltaG)
 Return the vector of values for the reaction Gibbs free energy change. More...
 
virtual void getDeltaElectrochemPotentials (doublereal *deltaM)
 Return the vector of values for the reaction electrochemical free energy change. More...
 
virtual void getDeltaEnthalpy (doublereal *deltaH)
 Return the vector of values for the reactions change in enthalpy. More...
 
virtual void getDeltaEntropy (doublereal *deltaS)
 Return the vector of values for the reactions change in entropy. More...
 
virtual void getDeltaSSGibbs (doublereal *deltaG)
 Return the vector of values for the reaction standard state Gibbs free energy change. More...
 
virtual void getDeltaSSEnthalpy (doublereal *deltaH)
 Return the vector of values for the change in the standard state enthalpies of reaction. More...
 
virtual void getDeltaSSEntropy (doublereal *deltaS)
 Return the vector of values for the change in the standard state entropies for each reaction. More...
 
Reaction Mechanism Informational Query Routines
virtual void getActivityConcentrations (doublereal *const conc)
 Get the vector of activity concentrations used in the kinetics object. More...
 
doublereal electrochem_beta (size_t irxn) const
 Return the charge transfer rxn Beta parameter for the ith reaction. More...
 
virtual bool isReversible (size_t i)
 True if reaction i has been declared to be reversible. More...
 
virtual void getFwdRateConstants (doublereal *kfwd)
 Return the forward rate constants. More...
 
virtual void getRevRateConstants (doublereal *krev, bool doIrreversible=false)
 Return the reverse rate constants. More...
 
Reaction Mechanism Construction
virtual void addPhase (thermo_t &thermo)
 Add a phase to the kinetics manager object. More...
 
virtual void init ()
 Prepare the class for the addition of reactions. More...
 
virtual void addReaction (ReactionData &r)
 Add a single reaction to the mechanism. More...
 
virtual bool addReaction (shared_ptr< Reaction > r)
 Add a single reaction to the mechanism. More...
 
virtual void modifyReaction (size_t i, shared_ptr< Reaction > rNew)
 Modify the rate expression associated with a reaction. More...
 
virtual void finalize ()
 Finish adding reactions and prepare for use. More...
 
virtual bool ready () const
 Returns true if the kinetics manager has been properly initialized and finalized. More...
 
- Public Member Functions inherited from Kinetics
void incrementRxnCount ()
 Increment the number of reactions in the mechanism by one. More...
 
virtual std::pair< size_t, size_t > checkDuplicates (bool throw_err=true) const
 Check for duplicate reactions. More...
 
void selectPhase (const doublereal *data, const thermo_t *phase, doublereal *phase_data)
 
 Kinetics ()
 Default constructor. More...
 
virtual ~Kinetics ()
 Destructor. More...
 
 Kinetics (const Kinetics &)
 Copy Constructor for the Kinetics object. More...
 
Kineticsoperator= (const Kinetics &right)
 Assignment operator. More...
 
virtual void assignShallowPointers (const std::vector< thermo_t * > &tpVector)
 Reassign the pointers within the Kinetics object. More...
 
size_t nReactions () const
 Number of reactions in the reaction mechanism. More...
 
void checkReactionIndex (size_t m) const
 Check that the specified reaction index is in range Throws an exception if i is greater than nReactions() More...
 
void checkReactionArraySize (size_t ii) const
 Check that an array size is at least nReactions() Throws an exception if ii is less than nReactions(). More...
 
void checkSpeciesIndex (size_t k) const
 Check that the specified species index is in range Throws an exception if k is greater than nSpecies()-1. More...
 
void checkSpeciesArraySize (size_t mm) const
 Check that an array size is at least nSpecies() Throws an exception if kk is less than nSpecies(). More...
 
size_t nPhases () const
 The number of phases participating in the reaction mechanism. More...
 
void checkPhaseIndex (size_t m) const
 Check that the specified phase index is in range Throws an exception if m is greater than nPhases() More...
 
void checkPhaseArraySize (size_t mm) const
 Check that an array size is at least nPhases() Throws an exception if mm is less than nPhases(). More...
 
size_t phaseIndex (const std::string &ph)
 Return the phase index of a phase in the list of phases defined within the object. More...
 
size_t surfacePhaseIndex ()
 This returns the integer index of the phase which has ThermoPhase type cSurf. More...
 
size_t reactionPhaseIndex ()
 Phase where the reactions occur. More...
 
thermo_tthermo (size_t n=0)
 This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism. More...
 
const thermo_tthermo (size_t n=0) const
 
size_t nTotalSpecies () const
 The total number of species in all phases participating in the kinetics mechanism. More...
 
size_t kineticsSpeciesIndex (size_t k, size_t n) const
 The location of species k of phase n in species arrays. More...
 
std::string kineticsSpeciesName (size_t k) const
 Return the name of the kth species in the kinetics manager. More...
 
size_t kineticsSpeciesIndex (const std::string &nm) const
 This routine will look up a species number based on the input std::string nm. More...
 
size_t kineticsSpeciesIndex (const std::string &nm, const std::string &ph) const
 This routine will look up a species number based on the input std::string nm. More...
 
thermo_tspeciesPhase (const std::string &nm)
 This function looks up the name of a species and returns a reference to the ThermoPhase object of the phase where the species resides. More...
 
thermo_tspeciesPhase (size_t k)
 This function takes as an argument the kineticsSpecies index (i.e., the list index in the list of species in the kinetics manager) and returns the species' owning ThermoPhase object. More...
 
size_t speciesPhaseIndex (size_t k)
 This function takes as an argument the kineticsSpecies index (i.e., the list index in the list of species in the kinetics manager) and returns the index of the phase owning the species. More...
 
virtual void getFwdRatesOfProgress (doublereal *fwdROP)
 Return the forward rates of progress of the reactions. More...
 
virtual void getRevRatesOfProgress (doublereal *revROP)
 Return the Reverse rates of progress of the reactions. More...
 
virtual void getNetRatesOfProgress (doublereal *netROP)
 Net rates of progress. More...
 
virtual void getReactionDelta (const doublereal *property, doublereal *deltaProperty)
 Change in species properties. More...
 
virtual void getRevReactionDelta (const doublereal *g, doublereal *dg)
 Given an array of species properties 'g', return in array 'dg' the change in this quantity in the reversible reactions. More...
 
virtual void getCreationRates (doublereal *cdot)
 Species creation rates [kmol/m^3/s or kmol/m^2/s]. More...
 
virtual void getDestructionRates (doublereal *ddot)
 Species destruction rates [kmol/m^3/s or kmol/m^2/s]. More...
 
virtual void getNetProductionRates (doublereal *wdot)
 Species net production rates [kmol/m^3/s or kmol/m^2/s]. More...
 
virtual double reactantStoichCoeff (size_t k, size_t i) const
 Stoichiometric coefficient of species k as a reactant in reaction i. More...
 
virtual double productStoichCoeff (size_t k, size_t i) const
 Stoichiometric coefficient of species k as a product in reaction i. More...
 
virtual doublereal reactantOrder (size_t k, size_t i) const
 Reactant order of species k in reaction i. More...
 
virtual doublereal productOrder (int k, int i) const
 product Order of species k in reaction i. More...
 
virtual const std::vector
< size_t > & 
reactants (size_t i) const
 Returns a read-only reference to the vector of reactant index numbers for reaction i. More...
 
virtual const std::vector
< size_t > & 
products (size_t i) const
 Returns a read-only reference to the vector of product index numbers for reaction i. More...
 
virtual int reactionType (size_t i) const
 Flag specifying the type of reaction. More...
 
const std::string & reactionString (size_t i) const
 Return a string representing the reaction. More...
 
const std::string & reactantString (size_t i) const
 Returns a string containing the reactants side of the reaction equation. More...
 
const std::string & productString (size_t i) const
 Returns a string containing the products side of the reaction equation. More...
 
shared_ptr< Reactionreaction (size_t i)
 Return the Reaction object for reaction i. More...
 
void skipUndeclaredSpecies (bool skip)
 Determine behavior when adding a new reaction that contains species not defined in any of the phases associated with this kinetics manager. More...
 
void skipUndeclaredThirdBodies (bool skip)
 Determine behavior when adding a new reaction that contains third-body efficiencies for species not defined in any of the phases associated with this kinetics manager. More...
 
virtual void installReagents (const ReactionData &r)
 
virtual void installGroups (size_t irxn, const std::vector< grouplist_t > &r, const std::vector< grouplist_t > &p)
 
virtual const std::vector
< grouplist_t > & 
reactantGroups (size_t i)
 
virtual const std::vector
< grouplist_t > & 
productGroups (size_t i)
 
doublereal multiplier (size_t i) const
 The current value of the multiplier for reaction i. More...
 
virtual void setMultiplier (size_t i, doublereal f)
 Set the multiplier for reaction i to f. More...
 

Protected Member Functions

SurfaceArrhenius buildSurfaceArrhenius (size_t i, InterfaceReaction &r)
 Build a SurfaceArrhenius object from a Reaction, taking into account the possible sticking coefficient form and coverage dependencies. More...
 
void applyStickingCorrection (double *kf)
 
- Protected Member Functions inherited from Kinetics
double checkDuplicateStoich (std::map< int, double > &r1, std::map< int, double > &r2) const
 Check whether r1 and r2 represent duplicate stoichiometries This function returns a ratio if two reactions are duplicates of one another, and 0.0 otherwise. More...
 
void checkReactionBalance (const Reaction &R)
 Check that the specified reaction is balanced (same number of atoms for each element in the reactants and products). More...
 

Protected Attributes

vector_fp m_grt
 Temporary work vector of length m_kk. More...
 
std::vector< size_t > m_revindex
 List of reactions numbers which are reversible reactions. More...
 
Rate1< SurfaceArrheniusm_rates
 Templated class containing the vector of reactions for this interface. More...
 
bool m_redo_rates
 
std::vector< size_t > m_irrev
 Vector of irreversible reaction numbers. More...
 
size_t m_nirrev
 Number of irreversible reactions in the mechanism. More...
 
size_t m_nrev
 Number of reversible reactions in the mechanism. More...
 
vector_fp m_conc
 Array of concentrations for each species in the kinetics mechanism. More...
 
vector_fp m_actConc
 Array of activity concentrations for each species in the kinetics object. More...
 
vector_fp m_mu0
 Vector of standard state chemical potentials for all species. More...
 
vector_fp m_mu
 Vector of chemical potentials for all species. More...
 
vector_fp m_mu0_Kc
 Vector of standard state electrochemical potentials modified by a standard concentration term. More...
 
vector_fp m_phi
 Vector of phase electric potentials. More...
 
vector_fp m_pot
 Vector of potential energies due to Voltages. More...
 
vector_fp deltaElectricEnergy_
 Storage for the net electric energy change due to reaction. More...
 
vector_fp m_E
 Vector of raw activation energies for the reactions. More...
 
SurfPhasem_surf
 Pointer to the single surface phase. More...
 
ImplicitSurfChemm_integrator
 Pointer to the Implicit surface chemistry object. More...
 
vector_fp m_beta
 Electrochemical transfer coefficient for the forward direction. More...
 
std::vector< size_t > m_ctrxn
 Vector of reaction indexes specifying the id of the current transfer reactions in the mechanism. More...
 
std::vector< size_t > m_ctrxn_BVform
 Vector of Reactions which follow the Butler-Volmer methodology for specifying the exchange current density first. More...
 
vector_int m_ctrxn_ecdf
 Vector of booleans indicating whether the charge transfer reaction rate constant is described by an exchange current density rate constant expression. More...
 
std::vector< RxnOrders * > m_ctrxn_ROPOrdersList_
 Vector of booleans indicating whether the charge transfer reaction rate constant is described by an exchange current density rate constant expression. More...
 
std::vector< RxnOrders * > m_ctrxn_FwdOrdersList_
 Reaction Orders for the case where the forwards rate of progress is being calculated. More...
 
vector_fp m_ctrxn_resistivity_
 
vector_fp m_StandardConc
 Vector of standard concentrations. More...
 
vector_fp m_deltaG0
 Vector of delta G^0, the standard state Gibbs free energies for each reaction. More...
 
vector_fp m_deltaG
 Vector of deltaG[] of reaction, the delta Gibbs free energies for each reaction. More...
 
vector_fp m_ProdStanConcReac
 Vector of the products of the standard concentrations of the reactants. More...
 
doublereal m_logp0
 
doublereal m_logc0
 
bool m_ROP_ok
 
doublereal m_temp
 Current temperature of the data. More...
 
doublereal m_logtemp
 Current log of the temperature. More...
 
bool m_finalized
 Boolean indicating whether mechanism has been finalized. More...
 
bool m_has_coverage_dependence
 Boolean flag indicating whether any reaction in the mechanism has a coverage dependent forward reaction rate. More...
 
bool m_has_electrochem_rxns
 Boolean flag indicating whether any reaction in the mechanism has a beta electrochemical parameter. More...
 
bool m_has_exchange_current_density_formulation
 Boolean flag indicating whether any reaction in the mechanism is described by an exchange current density expression. More...
 
int m_phaseExistsCheck
 Int flag to indicate that some phases in the kinetics mechanism are non-existent. More...
 
std::vector< bool > m_phaseExists
 Vector of booleans indicating whether phases exist or not. More...
 
std::vector< int > m_phaseIsStable
 Vector of int indicating whether phases are stable or not. More...
 
std::vector< std::vector< bool > > m_rxnPhaseIsReactant
 Vector of vector of booleans indicating whether a phase participates in a reaction as a reactant. More...
 
std::vector< std::vector< bool > > m_rxnPhaseIsProduct
 Vector of vector of booleans indicating whether a phase participates in a reaction as a product. More...
 
std::vector< std::pair< size_t,
double > > 
m_sticking_orders
 Pairs of (reaction index, total order) for sticking reactions, which are needed to compute the dependency of the rate constant on the site density. More...
 
int m_ioFlag
 
- Protected Attributes inherited from Kinetics
ValueCache m_cache
 Cache for saved calculations within each Kinetics object. More...
 
size_t m_ii
 Number of reactions in the mechanism. More...
 
size_t m_kk
 The number of species in all of the phases that participate in this kinetics mechanism. More...
 
vector_fp m_perturb
 Vector of perturbation factors for each reaction's rate of progress vector. More...
 
std::vector< shared_ptr
< Reaction > > 
m_reactions
 Vector of Reaction objects represented by this Kinetics manager. More...
 
std::vector< std::vector
< size_t > > 
m_reactants
 This is a vector of vectors containing the reactants for each reaction. More...
 
std::vector< std::vector
< size_t > > 
m_products
 This is a vector of vectors containing the products for each reaction. More...
 
std::vector< std::map< size_t,
doublereal > > 
m_rrxn
 m_rrxn is a vector of maps, containing the reactant stoichiometric coefficient information More...
 
std::vector< std::map< size_t,
doublereal > > 
m_prxn
 m_prxn is a vector of maps, containing the reactant stoichiometric coefficient information More...
 
std::vector< int > m_rxntype
 
std::vector< thermo_t * > m_thermo
 m_thermo is a vector of pointers to ThermoPhase objects that are involved with this kinetics operator More...
 
std::vector< size_t > m_start
 m_start is a vector of integers specifying the beginning position for the species vector for the n'th phase in the kinetics class. More...
 
std::map< std::string, size_t > m_phaseindex
 Mapping of the phase id, i.e., the id attribute in the XML phase element to the position of the phase within the kinetics object. More...
 
size_t m_surfphase
 Index in the list of phases of the one surface phase. More...
 
size_t m_rxnphase
 Phase Index where reactions are assumed to be taking place. More...
 
size_t m_mindim
 number of spatial dimensions of lowest-dimensional phase. More...
 
std::vector< std::string > m_rxneqn
 Representation of each reaction equation. More...
 
std::vector< std::string > m_reactantStrings
 Representation of the reactant side of each reaction equation. More...
 
std::vector< std::string > m_productStrings
 Representation of the product side of each reaction equation. More...
 
vector_fp m_rfn
 Forward rate constant for each reaction. More...
 
vector_fp m_rkcn
 Reciprocal of the equilibrium constant in concentration units. More...
 
vector_fp m_ropf
 Forward rate-of-progress for each reaction. More...
 
vector_fp m_ropr
 Reverse rate-of-progress for each reaction. More...
 
vector_fp m_ropnet
 Net rate-of-progress for each reaction. More...
 
bool m_skipUndeclaredSpecies
 
bool m_skipUndeclaredThirdBodies
 
StoichManagerN m_reactantStoich
 Stoichiometry manager for the reactants for each reaction. More...
 
StoichManagerN m_revProductStoich
 Stoichiometry manager for the products of reversible reactions. More...
 
StoichManagerN m_irrevProductStoich
 Stoichiometry manager for the products of irreversible reactions. More...
 

Detailed Description

A kinetics manager for heterogeneous reaction mechanisms.

The reactions are assumed to occur at a 2D interface between two 3D phases.

There are some important additions to the behavior of the kinetics class due to the presence of multiple phases and a heterogeneous interface. If a reactant phase doesn't exists, i.e., has a mole number of zero, a heterogeneous reaction can not proceed from reactants to products. Note it could perhaps proceed from products to reactants if all of the product phases exist.

In order to make the determination of whether a phase exists or not actually involves the specification of additional information to the kinetics object., which heretofore has only had access to intrinsic field information about the phases (i.e., temperature pressure, and mole fraction).

The extrinsic specification of whether a phase exists or not must be specified on top of the intrinsic calculation of the reaction rate. This class carries a set of booleans indicating whether a phase in the heterogeneous mechanism exists or not.

Additionally, the class carries a set of booleans around indicating whether a product phase is stable or not. If a phase is not thermodynamically stable, it may be the case that a particular reaction in a heterogeneous mechanism will create a product species in the unstable phase. However, other reactions in the mechanism will destruct that species. This may cause oscillations in the formation of the unstable phase from time step to time step within a ODE solver, in practice. In order to avoid this situation, a set of booleans is tracked which sets the stability of a phase. If a phase is deemed to be unstable, then species in that phase will not be allowed to be birthed by the kinetics operator. Nonexistent phases are deemed to be unstable by default, but this can be changed.

Definition at line 89 of file InterfaceKinetics.h.

Constructor & Destructor Documentation

InterfaceKinetics ( thermo_t thermo = 0)

Constructor.

Parameters
thermoThe optional parameter may be used to initialize the object with one ThermoPhase object. HKM Note -> Since the interface kinetics object will probably require multiple ThermoPhase objects, this is probably not a good idea to have this parameter.

Definition at line 21 of file InterfaceKinetics.cpp.

References InterfaceKinetics::addPhase().

Referenced by InterfaceKinetics::duplMyselfAsKinetics().

~InterfaceKinetics ( )
virtual

Copy Constructor.

Definition at line 56 of file InterfaceKinetics.cpp.

References InterfaceKinetics::operator=().

Member Function Documentation

InterfaceKinetics & operator= ( const InterfaceKinetics right)
Kinetics * duplMyselfAsKinetics ( const std::vector< thermo_t * > &  tpVector) const
virtual

Duplication routine for objects which inherit from Kinetics.

This function can be used to duplicate objects derived from Kinetics even if the application only has a pointer to Kinetics to work with.

These routines are basically wrappers around the derived copy constructor.

Parameters
tpVectorVector of pointers to ThermoPhase objects. this is the m_thermo vector within this object

Reimplemented from Kinetics.

Reimplemented in ElectrodeKinetics, and EdgeKinetics.

Definition at line 143 of file InterfaceKinetics.cpp.

References Kinetics::assignShallowPointers(), and InterfaceKinetics::InterfaceKinetics().

int type ( ) const
virtual

Identifies the kinetics manager type.

Each class derived from Kinetics should overload this method to return a unique integer. Standard values are defined in file mix_defs.h.

Reimplemented from Kinetics.

Reimplemented in ElectrodeKinetics, and EdgeKinetics.

Definition at line 138 of file InterfaceKinetics.cpp.

void setElectricPotential ( int  n,
doublereal  V 
)

Set the electric potential in the nth phase.

Parameters
nphase Index in this kinetics object.
VElectric potential (volts)

Definition at line 150 of file InterfaceKinetics.cpp.

References ThermoPhase::setElectricPotential(), and Kinetics::thermo().

void getEquilibriumConstants ( doublereal *  kc)
virtual

Equilibrium constant for all reactions including the voltage term.

Kc = exp(deltaG/RT)

where deltaG is the electrochemical potential difference between products minus reactants.

Reimplemented from Kinetics.

Definition at line 318 of file InterfaceKinetics.cpp.

References DATA_PTR, Cantera::GasConstant, Kinetics::getReactionDelta(), Kinetics::m_ii, InterfaceKinetics::m_mu0_Kc, Phase::temperature(), Kinetics::thermo(), and InterfaceKinetics::updateMu0().

Referenced by InterfaceKinetics::getRevRateConstants().

void updateExchangeCurrentQuantities ( )
void getDeltaGibbs ( doublereal *  deltaG)
virtual

Return the vector of values for the reaction Gibbs free energy change.

(virtual from Kinetics.h) These values depend upon the concentration of the solution.

units = J kmol-1

Parameters
deltaGOutput vector of deltaG's for reactions Length: m_ii. If 0, this updates the internally stored values only.

Reimplemented from Kinetics.

Definition at line 640 of file InterfaceKinetics.cpp.

References DATA_PTR, Kinetics::getReactionDelta(), InterfaceKinetics::m_deltaG, Kinetics::m_ii, InterfaceKinetics::m_mu, Kinetics::m_start, Kinetics::m_thermo, and Kinetics::nPhases().

Referenced by ElectrodeKinetics::openCircuitVoltage(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().

void getDeltaElectrochemPotentials ( doublereal *  deltaM)
virtual

Return the vector of values for the reaction electrochemical free energy change.

These values depend upon the concentration of the solution and the voltage of the phases

units = J kmol-1

Parameters
deltaMOutput vector of deltaM's for reactions Length: m_ii.

Reimplemented from Kinetics.

Definition at line 659 of file InterfaceKinetics.cpp.

References DATA_PTR, ThermoPhase::getElectrochemPotentials(), Kinetics::getReactionDelta(), InterfaceKinetics::m_grt, Kinetics::m_start, Kinetics::nPhases(), and Kinetics::thermo().

void getDeltaEnthalpy ( doublereal *  deltaH)
virtual

Return the vector of values for the reactions change in enthalpy.

These values depend upon the concentration of the solution.

units = J kmol-1

Parameters
deltaHOutput vector of deltaH's for reactions Length: m_ii.

Reimplemented from Kinetics.

Definition at line 675 of file InterfaceKinetics.cpp.

References DATA_PTR, ThermoPhase::getPartialMolarEnthalpies(), Kinetics::getReactionDelta(), InterfaceKinetics::m_grt, Kinetics::m_start, Kinetics::nPhases(), and Kinetics::thermo().

void getDeltaEntropy ( doublereal *  deltaS)
virtual

Return the vector of values for the reactions change in entropy.

These values depend upon the concentration of the solution.

units = J kmol-1 Kelvin-1

Parameters
deltaSOutput vector of deltaS's for reactions Length: m_ii.

Reimplemented from Kinetics.

Definition at line 690 of file InterfaceKinetics.cpp.

References DATA_PTR, ThermoPhase::getPartialMolarEntropies(), Kinetics::getReactionDelta(), InterfaceKinetics::m_grt, Kinetics::m_start, Kinetics::nPhases(), and Kinetics::thermo().

void getDeltaSSGibbs ( doublereal *  deltaG)
virtual

Return the vector of values for the reaction standard state Gibbs free energy change.

These values don't depend upon the concentration of the solution.

units = J kmol-1

Parameters
deltaGOutput vector of ss deltaG's for reactions Length: m_ii.

Reimplemented from Kinetics.

Definition at line 706 of file InterfaceKinetics.cpp.

References DATA_PTR, Kinetics::getReactionDelta(), ThermoPhase::getStandardChemPotentials(), InterfaceKinetics::m_mu0, Kinetics::m_start, Kinetics::nPhases(), and Kinetics::thermo().

void getDeltaSSEnthalpy ( doublereal *  deltaH)
virtual

Return the vector of values for the change in the standard state enthalpies of reaction.

These values don't depend upon the concentration of the solution.

units = J kmol-1

Parameters
deltaHOutput vector of ss deltaH's for reactions Length: m_ii.

Reimplemented from Kinetics.

Definition at line 724 of file InterfaceKinetics.cpp.

References DATA_PTR, Cantera::GasConstant, ThermoPhase::getEnthalpy_RT(), Kinetics::getReactionDelta(), InterfaceKinetics::m_grt, Kinetics::m_kk, Kinetics::m_start, Kinetics::nPhases(), Phase::temperature(), and Kinetics::thermo().

void getDeltaSSEntropy ( doublereal *  deltaS)
virtual

Return the vector of values for the change in the standard state entropies for each reaction.

These values don't depend upon the concentration of the solution.

units = J kmol-1 Kelvin-1

Parameters
deltaSOutput vector of ss deltaS's for reactions Length: m_ii.

Reimplemented from Kinetics.

Definition at line 746 of file InterfaceKinetics.cpp.

References DATA_PTR, Cantera::GasConstant, ThermoPhase::getEntropy_R(), Kinetics::getReactionDelta(), InterfaceKinetics::m_grt, Kinetics::m_kk, Kinetics::m_start, Kinetics::nPhases(), and Kinetics::thermo().

void getActivityConcentrations ( doublereal *const  conc)
virtual

Get the vector of activity concentrations used in the kinetics object.

Parameters
[out]concVector of activity concentrations. Length is equal to the number of species in the kinetics object

Reimplemented from Kinetics.

Definition at line 223 of file InterfaceKinetics.cpp.

References InterfaceKinetics::_update_rates_C(), and InterfaceKinetics::m_actConc.

doublereal electrochem_beta ( size_t  irxn) const

Return the charge transfer rxn Beta parameter for the ith reaction.

Returns the beta parameter for a charge transfer reaction. This parameter is not important for non-charge transfer reactions. Note, the parameter defaults to zero. However, a value of 0.5 should be supplied for every charge transfer reaction if no information is known, as a value of 0.5 pertains to a symmetric transition state. The value can vary between 0 to 1.

Parameters
irxnReaction number in the kinetics mechanism
Returns
Beta parameter. This defaults to zero, even for charge transfer reactions.

Definition at line 1168 of file InterfaceKinetics.cpp.

References InterfaceKinetics::m_beta, and InterfaceKinetics::m_ctrxn.

Referenced by RxnMolChange::RxnMolChange().

virtual bool isReversible ( size_t  i)
inlinevirtual

True if reaction i has been declared to be reversible.

If isReversible(i) is false, then the reverse rate of progress for reaction i is always zero.

Parameters
ireaction index

Reimplemented from Kinetics.

Definition at line 181 of file InterfaceKinetics.h.

References InterfaceKinetics::m_revindex.

void getFwdRateConstants ( doublereal *  kfwd)
virtual

Return the forward rate constants.

length is the number of reactions. units depends on many issues.

Parameters
kfwdOutput vector containing the forward reaction rate constants. Length: m_ii.

Reimplemented from Kinetics.

Definition at line 476 of file InterfaceKinetics.cpp.

References Kinetics::m_perturb, Kinetics::m_rfn, Cantera::multiply_each(), Kinetics::nReactions(), and InterfaceKinetics::updateROP().

Referenced by InterfaceKinetics::getRevRateConstants().

void getRevRateConstants ( doublereal *  krev,
bool  doIrreversible = false 
)
virtual

Return the reverse rate constants.

length is the number of reactions. units depends on many issues. Note, this routine will return rate constants for irreversible reactions if the default for doIrreversible is overridden.

Parameters
krevOutput vector of reverse rate constants.
doIrreversibleboolean indicating whether irreversible reactions should be included.

Reimplemented from Kinetics.

Definition at line 487 of file InterfaceKinetics.cpp.

References InterfaceKinetics::getEquilibriumConstants(), InterfaceKinetics::getFwdRateConstants(), Kinetics::m_ii, Kinetics::m_rkcn, Kinetics::m_ropnet, Cantera::multiply_each(), and Kinetics::nReactions().

void addPhase ( thermo_t thermo)
virtual

Add a phase to the kinetics manager object.

This must be done before the function init() is called or before any reactions are input.

This function calls Kinetics::addPhase(). It also sets the following fields:

   m_phaseExists[]
Parameters
thermoReference to the ThermoPhase to be added.

Reimplemented from Kinetics.

Definition at line 1104 of file InterfaceKinetics.cpp.

References Kinetics::addPhase(), InterfaceKinetics::m_phaseExists, and InterfaceKinetics::m_phaseIsStable.

Referenced by InterfaceKinetics::InterfaceKinetics().

void init ( )
virtual

Prepare the class for the addition of reactions.

This method is called by importKinetics() after all phases have been added but before any reactions have been. The base class method does nothing, but derived classes may use this to perform any initialization (allocating arrays, etc.) that requires knowing the phases and species, but before any reactions are added.

Reimplemented from Kinetics.

Reimplemented in ElectrodeKinetics.

Definition at line 1111 of file InterfaceKinetics.cpp.

References InterfaceKinetics::m_actConc, InterfaceKinetics::m_conc, InterfaceKinetics::m_grt, Kinetics::m_kk, InterfaceKinetics::m_mu, InterfaceKinetics::m_mu0, InterfaceKinetics::m_mu0_Kc, InterfaceKinetics::m_phi, InterfaceKinetics::m_pot, Kinetics::m_prxn, Kinetics::m_rrxn, Kinetics::nPhases(), Phase::nSpecies(), and Kinetics::thermo().

Referenced by ElectrodeKinetics::init().

void addReaction ( ReactionData r)
virtual

Add a single reaction to the mechanism.

This routine must be called after init() and before finalize(). Derived classes should call the base class method in addition to handling their own specialized behavior.

Parameters
rReference to the ReactionData object for the reaction to be added.

Reimplemented from Kinetics.

Definition at line 767 of file InterfaceKinetics.cpp.

References Kinetics::addReaction(), ReactionData::beta, Cantera::BUTLERVOLMER_NOACTIVITYCOEFFS_RXN, Cantera::BUTLERVOLMER_RXN, ReactionData::cov, RxnOrders::fill(), ReactionData::filmResistivity, ReactionData::forwardFullOrder_, Cantera::GLOBAL_RXN, InterfaceKinetics::m_beta, InterfaceKinetics::m_ctrxn, InterfaceKinetics::m_ctrxn_BVform, InterfaceKinetics::m_ctrxn_ecdf, InterfaceKinetics::m_ctrxn_FwdOrdersList_, InterfaceKinetics::m_ctrxn_ROPOrdersList_, InterfaceKinetics::m_E, InterfaceKinetics::m_has_coverage_dependence, InterfaceKinetics::m_has_electrochem_rxns, InterfaceKinetics::m_has_exchange_current_density_formulation, Kinetics::m_ii, InterfaceKinetics::m_irrev, Kinetics::m_kk, InterfaceKinetics::m_nirrev, InterfaceKinetics::m_nrev, InterfaceKinetics::m_rates, InterfaceKinetics::m_revindex, InterfaceKinetics::m_rxnPhaseIsProduct, InterfaceKinetics::m_rxnPhaseIsReactant, Kinetics::nPhases(), Kinetics::nReactions(), ReactionData::products, ReactionData::rateCoeffParameters, ReactionData::rateCoeffType, ReactionData::reactants, ReactionData::reactionType, Kinetics::reactionType(), ReactionData::reversible, Kinetics::speciesPhaseIndex(), and Cantera::SURFACEAFFINITY_RXN.

bool addReaction ( shared_ptr< Reaction r)
virtual

Add a single reaction to the mechanism.

Derived classes should call the base class method in addition to handling their own specialized behavior.

Parameters
rPointer to the Reaction object to be added.
Returns
true if the reaction is added or false if it was skipped

Reimplemented from Kinetics.

Definition at line 884 of file InterfaceKinetics.cpp.

References Kinetics::addReaction(), ElectrochemicalReaction::beta, InterfaceKinetics::buildSurfaceArrhenius(), Cantera::BUTLERVOLMER_NOACTIVITYCOEFFS_RXN, Cantera::BUTLERVOLMER_RXN, InterfaceReaction::coverage_deps, RxnOrders::fill(), ElectrochemicalReaction::film_resistivity, Cantera::GLOBAL_RXN, Kinetics::kineticsSpeciesIndex(), InterfaceKinetics::m_beta, InterfaceKinetics::m_ctrxn, InterfaceKinetics::m_ctrxn_BVform, InterfaceKinetics::m_ctrxn_ecdf, InterfaceKinetics::m_ctrxn_FwdOrdersList_, InterfaceKinetics::m_ctrxn_ROPOrdersList_, InterfaceKinetics::m_E, InterfaceKinetics::m_has_coverage_dependence, InterfaceKinetics::m_has_electrochem_rxns, InterfaceKinetics::m_has_exchange_current_density_formulation, InterfaceKinetics::m_irrev, Kinetics::m_kk, InterfaceKinetics::m_nirrev, InterfaceKinetics::m_nrev, InterfaceKinetics::m_rates, InterfaceKinetics::m_revindex, InterfaceKinetics::m_rxnPhaseIsProduct, InterfaceKinetics::m_rxnPhaseIsReactant, Kinetics::nPhases(), Kinetics::nReactions(), Kinetics::nTotalSpecies(), Reaction::orders, Reaction::products, Reaction::reactants, Reaction::reaction_type, Reaction::reversible, Kinetics::speciesPhaseIndex(), and Cantera::SURFACEAFFINITY_RXN.

void modifyReaction ( size_t  i,
shared_ptr< Reaction rNew 
)
virtual

Modify the rate expression associated with a reaction.

The stoichiometric equation, type of the reaction, reaction orders, third body efficiencies, reversibility, etc. must be unchanged.

Parameters
iIndex of the reaction to be modified
rNewReaction with the new rate expressions

Reimplemented from Kinetics.

Definition at line 995 of file InterfaceKinetics.cpp.

References InterfaceKinetics::buildSurfaceArrhenius(), InterfaceKinetics::m_rates, InterfaceKinetics::m_temp, Kinetics::modifyReaction(), and Cantera::npos.

void finalize ( )
virtual

Finish adding reactions and prepare for use.

This method is called by importKinetics() after all reactions have been entered into the mechanism and before the mechanism is used to calculate reaction rates. The base class method does nothing, but derived classes may use this to perform any initialization (allocating arrays, etc.) that must be done after the reactions are entered.

Reimplemented from Kinetics.

Reimplemented in ElectrodeKinetics, and EdgeKinetics.

Definition at line 1129 of file InterfaceKinetics.cpp.

References InterfaceKinetics::deltaElectricEnergy_, Kinetics::finalize(), Cantera::int2str(), InterfaceKinetics::m_deltaG, InterfaceKinetics::m_deltaG0, InterfaceKinetics::m_finalized, Kinetics::m_ii, Kinetics::m_kk, Kinetics::m_perturb, InterfaceKinetics::m_phaseExists, InterfaceKinetics::m_ProdStanConcReac, Kinetics::m_rkcn, Kinetics::m_ropf, Kinetics::m_ropnet, Kinetics::m_ropr, InterfaceKinetics::m_StandardConc, InterfaceKinetics::m_surf, Kinetics::m_thermo, Phase::nDim(), Cantera::npos, Kinetics::reactionPhaseIndex(), and Kinetics::thermo().

Referenced by ElectrodeKinetics::finalize().

bool ready ( ) const
virtual

Returns true if the kinetics manager has been properly initialized and finalized.

Reimplemented from Kinetics.

Reimplemented in Interface, and Edge.

Definition at line 1178 of file InterfaceKinetics.cpp.

References InterfaceKinetics::m_finalized.

void updateROP ( )
virtual
void _update_rates_T ( )
void _update_rates_phi ( )

Update properties that depend on the electric potential.

Definition at line 191 of file InterfaceKinetics.cpp.

References ThermoPhase::electricPotential(), InterfaceKinetics::m_phi, Kinetics::nPhases(), and Kinetics::thermo().

Referenced by InterfaceKinetics::_update_rates_T(), and InterfaceKinetics::updateMu0().

void _update_rates_C ( )

Update properties that depend on the species mole fractions and/or concentration,.

This method fills out the array of generalized concentrations by calling method getActivityConcentrations for each phase, which classes representing phases should overload to return the appropriate quantities.

Definition at line 203 of file InterfaceKinetics.cpp.

References DATA_PTR, ThermoPhase::getActivityConcentrations(), Phase::getConcentrations(), InterfaceKinetics::m_actConc, InterfaceKinetics::m_conc, Kinetics::m_start, Kinetics::m_thermo, and Kinetics::nPhases().

Referenced by InterfaceKinetics::getActivityConcentrations(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().

void advanceCoverages ( doublereal  tstep)

Advance the surface coverages in time.

This method carries out a time-accurate advancement of the surface coverages for a specified amount of time.

\[ \dot {\theta}_k = \dot s_k (\sigma_k / s_0) \]

Parameters
tstepTime value to advance the surface coverages

Definition at line 1183 of file InterfaceKinetics.cpp.

References ImplicitSurfChem::initialize(), ImplicitSurfChem::integrate(), and InterfaceKinetics::m_integrator.

void solvePseudoSteadyStateProblem ( int  ifuncOverride = -1,
doublereal  timeScaleOverride = 1.0 
)

Solve for the pseudo steady-state of the surface problem.

This is the same thing as the advanceCoverages() function, but at infinite times.

Note, a direct solve is carried out under the hood here, to reduce the computational time.

Parameters
ifuncOverrideOne of the values defined in Surface Problem Solver Methods. The default is -1, which means that the program will decide.
timeScaleOverrideWhen a pseudo transient is selected this value can be used to override the default time scale for integration which is one. When SFLUX_TRANSIENT is used, this is equal to the time over which the equations are integrated. When SFLUX_INITIALIZE is used, this is equal to the time used in the initial transient algorithm, before the equation system is solved directly.

Definition at line 1196 of file InterfaceKinetics.cpp.

References ImplicitSurfChem::initialize(), InterfaceKinetics::m_integrator, and ImplicitSurfChem::solvePseudoSteadyStateProblem().

void updateMu0 ( )
virtual
size_t reactionNumber ( ) const
inline

Number of reactions in the mechanism.

Deprecated:
This is a duplicate of Kinetics::nReactions()

Definition at line 299 of file InterfaceKinetics.h.

References Kinetics::m_ii, and Cantera::warn_deprecated().

void updateKc ( )

Update the equilibrium constants and stored electrochemical potentials in molar units for all reversible reactions and for all species.

Irreversible reactions have their equilibrium constant set to zero. For reactions involving charged species the equilibrium constant is adjusted according to the electrostatic potential.

Definition at line 229 of file InterfaceKinetics.cpp.

References DATA_PTR, Cantera::GasConstant, Kinetics::getRevReactionDelta(), Cantera::int2str(), InterfaceKinetics::m_irrev, InterfaceKinetics::m_mu0_Kc, InterfaceKinetics::m_nirrev, InterfaceKinetics::m_nrev, InterfaceKinetics::m_revindex, Kinetics::m_rkcn, Cantera::npos, Kinetics::nReactions(), Phase::temperature(), Kinetics::thermo(), and InterfaceKinetics::updateMu0().

Referenced by InterfaceKinetics::_update_rates_T().

void applyVoltageKfwdCorrection ( doublereal *const  kfwd)

Apply modifications for the forward reaction rate for interfacial charge transfer reactions.

For reactions that transfer charge across a potential difference, the activation energies are modified by the potential difference. (see, for example, ...). This method applies this correction.

Parameters
kfwdVector of forward reaction rate constants on which to have the voltage correction applied

Definition at line 368 of file InterfaceKinetics.cpp.

References Phase::charge(), DATA_PTR, InterfaceKinetics::deltaElectricEnergy_, Cantera::fp2str(), Cantera::GasConstant, Kinetics::getReactionDelta(), Cantera::int2str(), InterfaceKinetics::m_beta, InterfaceKinetics::m_ctrxn, InterfaceKinetics::m_ctrxn_BVform, InterfaceKinetics::m_E, InterfaceKinetics::m_phi, InterfaceKinetics::m_pot, Kinetics::nPhases(), Phase::nSpecies(), Phase::temperature(), Kinetics::thermo(), and Cantera::writelog().

Referenced by InterfaceKinetics::_update_rates_T().

void convertExchangeCurrentDensityFormulation ( doublereal *const  kfwd)

When an electrode reaction rate is optionally specified in terms of its exchange current density, adjust kfwd to the standard reaction rate constant form and units.

When the BV reaction types are used, keep the exchange current density form.

For a reaction rate constant that was given in units of Amps/m2 (exchange current density formulation with iECDFormulation == true), convert the rate to kmoles/m2/s.

For a reaction rate constant that was given in units of kmol/m2/sec when the reaction type is a Butler-Volmer form, convert it to exchange current density form (amps/m2).

Parameters
kfwdVector of forward reaction rate constants, given in either normal form or in exchange current density form.

Definition at line 428 of file InterfaceKinetics.cpp.

References Cantera::GasConstant, InterfaceKinetics::m_beta, InterfaceKinetics::m_ctrxn, InterfaceKinetics::m_ctrxn_BVform, InterfaceKinetics::m_ctrxn_ecdf, InterfaceKinetics::m_deltaG0, InterfaceKinetics::m_ProdStanConcReac, Phase::temperature(), Kinetics::thermo(), and InterfaceKinetics::updateExchangeCurrentQuantities().

Referenced by InterfaceKinetics::_update_rates_T().

void setPhaseExistence ( const size_t  iphase,
const int  exists 
)

Set the existence of a phase in the reaction object.

Tell the kinetics object whether a phase in the object exists. This is actually an extrinsic specification that must be carried out on top of the intrinsic calculation of the reaction rate. The routine will also flip the IsStable boolean within the kinetics object as well.

Parameters
iphaseIndex of the phase. This is the order within the internal thermo vector object
existsBoolean indicating whether the phase exists or not

Definition at line 1213 of file InterfaceKinetics.cpp.

References InterfaceKinetics::m_phaseExists, InterfaceKinetics::m_phaseExistsCheck, InterfaceKinetics::m_phaseIsStable, and Kinetics::m_thermo.

void setPhaseStability ( const size_t  iphase,
const int  isStable 
)

Set the stability of a phase in the reaction object.

Tell the kinetics object whether a phase in the object is stable. Species in an unstable phase will not be allowed to have a positive rate of formation from this kinetics object. This is actually an extrinsic specification that must be carried out on top of the intrinsic calculation of the reaction rate.

While conceptually not needed since kinetics is consistent with thermo when taken as a whole, in practice it has found to be very useful to turn off the creation of phases which shouldn't be forming. Typically this can reduce the oscillations in phase formation and destruction which are observed.

Parameters
iphaseIndex of the phase. This is the order within the internal thermo vector object
isStableFlag indicating whether the phase is stable or not

Definition at line 1250 of file InterfaceKinetics.cpp.

References InterfaceKinetics::m_phaseIsStable, and Kinetics::m_thermo.

int phaseExistence ( const size_t  iphase) const

Gets the phase existence int for the ith phase.

Parameters
iphasePhase Id
Returns
The int specifying whether the kinetics object thinks the phase exists or not. If it exists, then species in that phase can be a reactant in reactions.

Definition at line 1234 of file InterfaceKinetics.cpp.

References InterfaceKinetics::m_phaseExists, and Kinetics::m_thermo.

int phaseStability ( const size_t  iphase) const

Gets the phase stability int for the ith phase.

Parameters
iphasePhase Id
Returns
The int specifying whether the kinetics object thinks the phase is stable with nonzero mole numbers. If it stable, then the kinetics object will allow for rates of production of of species in that phase that are positive.

Definition at line 1242 of file InterfaceKinetics.cpp.

References InterfaceKinetics::m_phaseIsStable, and Kinetics::m_thermo.

SurfaceArrhenius buildSurfaceArrhenius ( size_t  i,
InterfaceReaction r 
)
protected

Member Data Documentation

vector_fp m_grt
protected
std::vector<size_t> m_revindex
protected

List of reactions numbers which are reversible reactions.

This is a vector of reaction numbers. Each reaction in the list is reversible. Length = number of reversible reactions

Definition at line 413 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::isReversible(), InterfaceKinetics::operator=(), and InterfaceKinetics::updateKc().

Rate1<SurfaceArrhenius> m_rates
protected

Templated class containing the vector of reactions for this interface.

The templated class is described in RateCoeffMgr.h The class SurfaceArrhenius is described in RxnRates.h

Definition at line 420 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::_update_rates_T(), InterfaceKinetics::addReaction(), InterfaceKinetics::modifyReaction(), and InterfaceKinetics::operator=().

std::vector<size_t> m_irrev
protected

Vector of irreversible reaction numbers.

vector containing the reaction numbers of irreversible reactions.

Definition at line 428 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::operator=(), and InterfaceKinetics::updateKc().

size_t m_nirrev
protected

Number of irreversible reactions in the mechanism.

Definition at line 431 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::operator=(), and InterfaceKinetics::updateKc().

size_t m_nrev
protected

Number of reversible reactions in the mechanism.

Definition at line 434 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::operator=(), and InterfaceKinetics::updateKc().

vector_fp m_conc
protected

Array of concentrations for each species in the kinetics mechanism.

An array of generalized concentrations \( C_k \) that are defined such that \( a_k = C_k / C^0_k, \) where \( C^0_k \) is a standard concentration/ These generalized concentrations are used by this kinetics manager class to compute the forward and reverse rates of elementary reactions. The "units" for the concentrations of each phase depend upon the implementation of kinetics within that phase. The order of the species within the vector is based on the order of listed ThermoPhase objects in the class, and the order of the species within each ThermoPhase class.

Definition at line 448 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::_update_rates_C(), InterfaceKinetics::init(), and InterfaceKinetics::operator=().

vector_fp m_actConc
protected

Array of activity concentrations for each species in the kinetics object.

An array of activity concentrations \( Ca_k \) that are defined such that \( a_k = Ca_k / C^0_k, \) where \( C^0_k \) is a standard concentration. These activity concentrations are used by this kinetics manager class to compute the forward and reverse rates of elementary reactions. The "units" for the concentrations of each phase depend upon the implementation of kinetics within that phase. The order of the species within the vector is based on the order of listed ThermoPhase objects in the class, and the order of the species within each ThermoPhase class.

Definition at line 462 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::_update_rates_C(), InterfaceKinetics::_update_rates_T(), InterfaceKinetics::getActivityConcentrations(), InterfaceKinetics::init(), InterfaceKinetics::operator=(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().

vector_fp m_mu0
protected

Vector of standard state chemical potentials for all species.

This vector contains a temporary vector of standard state chemical potentials for all of the species in the kinetics object

Length = m_kk. Units = J/kmol.

Definition at line 471 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::getDeltaSSGibbs(), InterfaceKinetics::init(), InterfaceKinetics::operator=(), InterfaceKinetics::updateExchangeCurrentQuantities(), and InterfaceKinetics::updateMu0().

vector_fp m_mu
protected

Vector of chemical potentials for all species.

This vector contains a vector of chemical potentials for all of the species in the kinetics object

Length = m_kk. Units = J/kmol.

Definition at line 479 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::getDeltaGibbs(), InterfaceKinetics::init(), and InterfaceKinetics::operator=().

vector_fp m_mu0_Kc
protected

Vector of standard state electrochemical potentials modified by a standard concentration term.

This vector contains a temporary vector of standard state electrochemical potentials + RTln(Cs) for all of the species in the kinetics object

In order to get the units correct for the concentration equilibrium constant, each species needs to have an RT ln(Cs) added to its contribution to the equilibrium constant Cs is the standard concentration for the species. Frequently, for solid species, Cs is equal to 1. However, for gases Cs is P/RT.

Length = m_kk. Units = J/kmol.

Definition at line 495 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::getEquilibriumConstants(), InterfaceKinetics::init(), InterfaceKinetics::operator=(), InterfaceKinetics::updateKc(), and InterfaceKinetics::updateMu0().

vector_fp m_phi
protected

Vector of phase electric potentials.

Temporary vector containing the potential of each phase in the kinetics object.

length = number of phases. Units = Volts.

Definition at line 504 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::_update_rates_phi(), InterfaceKinetics::applyVoltageKfwdCorrection(), InterfaceKinetics::init(), InterfaceKinetics::operator=(), InterfaceKinetics::updateMu0(), and ElectrodeKinetics::updateROP().

vector_fp m_pot
protected

Vector of potential energies due to Voltages.

Length is the number of species in kinetics mech. It's used to store the potential energy due to the voltage.

Definition at line 511 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::applyVoltageKfwdCorrection(), InterfaceKinetics::init(), and InterfaceKinetics::operator=().

vector_fp deltaElectricEnergy_
protected

Storage for the net electric energy change due to reaction.

Length is number of reactions. It's used to store the net electric potential energy change due to the reaction.

deltaElectricEnergy_[jrxn] = sum_i ( F V_i z_i nu_ij)

Definition at line 520 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::applyVoltageKfwdCorrection(), EdgeKinetics::finalize(), InterfaceKinetics::finalize(), and InterfaceKinetics::operator=().

vector_fp m_E
protected

Vector of raw activation energies for the reactions.

Units are in Kelvin. Length is number of reactions.

Definition at line 527 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::applyVoltageKfwdCorrection(), and InterfaceKinetics::operator=().

SurfPhase* m_surf
protected
ImplicitSurfChem* m_integrator
protected

Pointer to the Implicit surface chemistry object.

Note this object is owned by this InterfaceKinetics object. It may only be used to solve this single InterfaceKinetics object's surface problem uncoupled from other surface phases.

Definition at line 538 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::advanceCoverages(), InterfaceKinetics::operator=(), InterfaceKinetics::solvePseudoSteadyStateProblem(), and InterfaceKinetics::~InterfaceKinetics().

vector_fp m_beta
protected

Electrochemical transfer coefficient for the forward direction.

Electrochemical transfer coefficient for all reactions that have transfer reactions the reaction is given by m_ctrxn[i]

Definition at line 545 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::applyVoltageKfwdCorrection(), InterfaceKinetics::convertExchangeCurrentDensityFormulation(), InterfaceKinetics::electrochem_beta(), InterfaceKinetics::operator=(), and ElectrodeKinetics::updateROP().

std::vector<size_t> m_ctrxn
protected

Vector of reaction indexes specifying the id of the current transfer reactions in the mechanism.

Vector of reaction indices which involve current transfers. This provides an index into the m_beta and m_ctrxn_BVform array.

  irxn = m_ctrxn[i]

Definition at line 555 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::applyVoltageKfwdCorrection(), InterfaceKinetics::convertExchangeCurrentDensityFormulation(), InterfaceKinetics::electrochem_beta(), InterfaceKinetics::operator=(), and ElectrodeKinetics::updateROP().

std::vector<size_t> m_ctrxn_BVform
protected

Vector of Reactions which follow the Butler-Volmer methodology for specifying the exchange current density first.

Then, the other forms are specified based on this form.

Length is equal to the number of reactions with charge transfer coefficients, m_ctrxn[]

m_ctrxn_BVform[i] = 0; This means that the irxn reaction is calculated via the standard forward and reverse reaction rates m_ctrxn_BVform[i] = 1; This means that the irxn reaction is calculated via the BV format directly. m_ctrxn_BVform[i] = 2; this means that the irxn reaction is calculated via the BV format directly, using concentrations instead of activity concentrations.

Definition at line 569 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::applyVoltageKfwdCorrection(), InterfaceKinetics::convertExchangeCurrentDensityFormulation(), and InterfaceKinetics::operator=().

vector_int m_ctrxn_ecdf
protected

Vector of booleans indicating whether the charge transfer reaction rate constant is described by an exchange current density rate constant expression.

Length is equal to the number of reactions with charge transfer coefficients, m_ctrxn[]

m_ctrxn_ecdf[irxn] = 0 This means that the rate coefficient calculator will calculate the rate constant as a chemical forward rate constant, a standard format. m_ctrxn_ecdf[irxn] = 1 this means that the rate coefficient calculator will calculate the rate constant as an exchange current density rate constant expression.

Definition at line 581 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::convertExchangeCurrentDensityFormulation(), InterfaceKinetics::operator=(), and ElectrodeKinetics::updateROP().

std::vector<RxnOrders*> m_ctrxn_ROPOrdersList_
protected

Vector of booleans indicating whether the charge transfer reaction rate constant is described by an exchange current density rate constant expression.

Length is equal to the number of reactions with charge transfer coefficients, m_ctrxn[]

Some reactions have zero in this list, those that don't need special treatment.

Deprecated:
To be removed after Cantera 2.2.

Definition at line 591 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::operator=(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::~InterfaceKinetics().

std::vector<RxnOrders*> m_ctrxn_FwdOrdersList_
protected

Reaction Orders for the case where the forwards rate of progress is being calculated.

Length is equal to the number of reactions with charge transfer coefficients, m_ctrxn[]

Some reactions have zero in this list, indicating that the calculation isn't necessary.

Deprecated:
To be removed after Cantera 2.2.

Definition at line 600 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::operator=(), and InterfaceKinetics::~InterfaceKinetics().

vector_fp m_StandardConc
protected

Vector of standard concentrations.

Length number of kinetic species units depend on the definition of the standard concentration within each phase

Definition at line 609 of file InterfaceKinetics.h.

Referenced by EdgeKinetics::finalize(), InterfaceKinetics::finalize(), InterfaceKinetics::operator=(), InterfaceKinetics::updateExchangeCurrentQuantities(), and ElectrodeKinetics::updateROP().

vector_fp m_deltaG0
protected

Vector of delta G^0, the standard state Gibbs free energies for each reaction.

Length is the number of reactions units are Joule kmol-1

Definition at line 616 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::convertExchangeCurrentDensityFormulation(), EdgeKinetics::finalize(), InterfaceKinetics::finalize(), InterfaceKinetics::operator=(), and InterfaceKinetics::updateExchangeCurrentQuantities().

vector_fp m_deltaG
protected

Vector of deltaG[] of reaction, the delta Gibbs free energies for each reaction.

Length is the number of reactions units are Joule kmol-1

Definition at line 623 of file InterfaceKinetics.h.

Referenced by EdgeKinetics::finalize(), InterfaceKinetics::finalize(), InterfaceKinetics::getDeltaGibbs(), ElectrodeKinetics::openCircuitVoltage(), InterfaceKinetics::operator=(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().

vector_fp m_ProdStanConcReac
protected

Vector of the products of the standard concentrations of the reactants.

Units vary wrt what the units of the standard concentrations are Length = number of reactions.

Definition at line 630 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::convertExchangeCurrentDensityFormulation(), EdgeKinetics::finalize(), InterfaceKinetics::finalize(), InterfaceKinetics::operator=(), and InterfaceKinetics::updateExchangeCurrentQuantities().

doublereal m_temp
protected

Current temperature of the data.

Definition at line 638 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::_update_rates_T(), InterfaceKinetics::modifyReaction(), and InterfaceKinetics::operator=().

doublereal m_logtemp
protected

Current log of the temperature.

Definition at line 641 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::_update_rates_T(), and InterfaceKinetics::operator=().

bool m_finalized
protected

Boolean indicating whether mechanism has been finalized.

Definition at line 644 of file InterfaceKinetics.h.

Referenced by EdgeKinetics::finalize(), InterfaceKinetics::finalize(), InterfaceKinetics::operator=(), and InterfaceKinetics::ready().

bool m_has_coverage_dependence
protected

Boolean flag indicating whether any reaction in the mechanism has a coverage dependent forward reaction rate.

If this is true, then the coverage dependence is multiplied into the forward reaction rates constant

Definition at line 652 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::_update_rates_T(), InterfaceKinetics::addReaction(), and InterfaceKinetics::operator=().

bool m_has_electrochem_rxns
protected

Boolean flag indicating whether any reaction in the mechanism has a beta electrochemical parameter.

If this is true, the Butler-Volmer correction is applied to the forward reaction rate for those reactions.

fac = exp ( - beta * (delta_phi))

Definition at line 662 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::_update_rates_T(), InterfaceKinetics::addReaction(), and InterfaceKinetics::operator=().

bool m_has_exchange_current_density_formulation
protected

Boolean flag indicating whether any reaction in the mechanism is described by an exchange current density expression.

If this is true, the standard state Gibbs free energy of the reaction and the product of the reactant standard concentrations must be precalculated in order to calculate the rate constant.

Definition at line 671 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::_update_rates_T(), InterfaceKinetics::addReaction(), and InterfaceKinetics::operator=().

int m_phaseExistsCheck
protected

Int flag to indicate that some phases in the kinetics mechanism are non-existent.

We change the ROP vectors to make sure that non-existent phases are treated correctly in the kinetics operator. The value of this is equal to the number of phases which don't exist.

Definition at line 680 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::operator=(), InterfaceKinetics::setPhaseExistence(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().

std::vector<bool> m_phaseExists
protected

Vector of booleans indicating whether phases exist or not.

Vector of booleans indicating whether a phase exists or not. We use this to set the ROP's so that unphysical things don't happen. For example, a reaction can't go in the forwards direction if a phase in which a reactant is present doesn't exist. Because InterfaceKinetics deals with intrinsic quantities only normally, nowhere else is this extrinsic concept introduced except here.

length = number of phases in the object. By default all phases exist.

Definition at line 693 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addPhase(), EdgeKinetics::finalize(), InterfaceKinetics::finalize(), InterfaceKinetics::operator=(), InterfaceKinetics::phaseExistence(), InterfaceKinetics::setPhaseExistence(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().

std::vector<int> m_phaseIsStable
protected

Vector of int indicating whether phases are stable or not.

Vector of booleans indicating whether a phase is stable or not under the current conditions. We use this to set the ROP's so that unphysical things don't happen.

length = number of phases in the object. By default all phases are stable.

Definition at line 703 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addPhase(), InterfaceKinetics::operator=(), InterfaceKinetics::phaseStability(), InterfaceKinetics::setPhaseExistence(), InterfaceKinetics::setPhaseStability(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().

std::vector<std::vector<bool> > m_rxnPhaseIsReactant
protected

Vector of vector of booleans indicating whether a phase participates in a reaction as a reactant.

m_rxnPhaseIsReactant[j][p] indicates whether a species in phase p participates in reaction j as a reactant.

Definition at line 711 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::operator=(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().

std::vector<std::vector<bool> > m_rxnPhaseIsProduct
protected

Vector of vector of booleans indicating whether a phase participates in a reaction as a product.

m_rxnPhaseIsReactant[j][p] indicates whether a species in phase p participates in reaction j as a product.

Definition at line 719 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::addReaction(), InterfaceKinetics::operator=(), ElectrodeKinetics::updateROP(), and InterfaceKinetics::updateROP().

std::vector<std::pair<size_t, double> > m_sticking_orders
protected

Pairs of (reaction index, total order) for sticking reactions, which are needed to compute the dependency of the rate constant on the site density.

Definition at line 724 of file InterfaceKinetics.h.

Referenced by InterfaceKinetics::buildSurfaceArrhenius().


The documentation for this class was generated from the following files: