Cantera
2.2.1
|
A kinetics manager for heterogeneous reaction mechanisms. More...
#include <ElectrodeKinetics.h>
Public Member Functions | |
ElectrodeKinetics (thermo_t *thermo=0) | |
Constructor. More... | |
virtual | ~ElectrodeKinetics () |
Destructor. More... | |
ElectrodeKinetics (const ElectrodeKinetics &right) | |
Copy Constructor. More... | |
ElectrodeKinetics & | operator= (const ElectrodeKinetics &right) |
Assignment operator. More... | |
virtual Kinetics * | duplMyselfAsKinetics (const std::vector< thermo_t * > &tpVector) const |
Duplication function. More... | |
virtual int | type () const |
Identifies the kinetics manager type. More... | |
void | identifyMetalPhase () |
Identify the metal phase and the electrons species. More... | |
virtual void | updateROP () |
Internal routine that updates the Rates of Progress of the reactions. More... | |
virtual void | determineFwdOrdersBV (ReactionData &rdata, std::vector< doublereal > &fwdFullorders) |
double | calcForwardROP_BV (size_t irxn, size_t iBeta, double ioc, double nStoich, double nu, doublereal ioNet) |
double | calcForwardROP_BV_NoAct (size_t irxn, size_t iBeta, double ioc, double nStoich, double nu, doublereal ioNet) |
bool | getExchangeCurrentDensityFormulation (size_t irxn, doublereal &nStoich, doublereal &OCV, doublereal &io, doublereal &overPotential, doublereal &beta, doublereal &resistance) |
double | openCircuitVoltage (size_t irxn) |
Calculate the open circuit voltage of a given reaction. More... | |
double | calcCurrentDensity (double nu, double nStoich, double io, double beta, double temp, doublereal resistivity=0.0) const |
double | solveCurrentRes (doublereal nu, doublereal nStoich, doublereal ioc, doublereal beta, doublereal temp, doublereal resistivity=0.0, int iprob=0) const |
virtual void | init () |
Prepare the class for the addition of reactions. More... | |
virtual void | finalize () |
Finish adding reactions and prepare for use. More... | |
Public Member Functions inherited from InterfaceKinetics | |
InterfaceKinetics (thermo_t *thermo=0) | |
Constructor. More... | |
virtual | ~InterfaceKinetics () |
Destructor. More... | |
InterfaceKinetics (const InterfaceKinetics &right) | |
Copy Constructor. More... | |
InterfaceKinetics & | operator= (const InterfaceKinetics &right) |
Assignment operator. More... | |
void | setElectricPotential (int n, doublereal V) |
Set the electric potential in the nth phase. 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 (ElectrochemicalReaction &r, vector_fp &fwdFullorders) |
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... | |
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... | |
virtual void | addPhase (thermo_t &thermo) |
Add a phase to the kinetics manager object. 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 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... | |
Kinetics & | operator= (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_t & | thermo (size_t n=0) |
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism. More... | |
const thermo_t & | thermo (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_t & | speciesPhase (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_t & | speciesPhase (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< Reaction > | reaction (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... | |
Public Attributes | |
std::vector< RxnMolChange * > | rmcVector |
Vector of additional information about each reaction. More... | |
Protected Attributes | |
size_t | metalPhaseIndex_ |
Index of the metal phase in the list of phases for this kinetics object. This is the electron phase. More... | |
size_t | solnPhaseIndex_ |
Index of the solution phase in the list of phases for this surface. More... | |
size_t | kElectronIndex_ |
Index of the electrons species in the list of species for this surface kinetics, if none set it to -1. More... | |
Protected Attributes inherited from InterfaceKinetics | |
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< SurfaceArrhenius > | m_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... | |
SurfPhase * | m_surf |
Pointer to the single surface phase. More... | |
ImplicitSurfChem * | m_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... | |
Additional Inherited Members | |
Protected Member Functions inherited from InterfaceKinetics | |
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... | |
A kinetics manager for heterogeneous reaction mechanisms.
The reactions are assumed to occur at a 2D interface between two 3D phases.
This class is a slight addition to the InterfaceKinetics class, adding several concepts. First we explicitly identify the electrode and solution phases. We will also assume that there is an electron phase.
Definition at line 32 of file ElectrodeKinetics.h.
ElectrodeKinetics | ( | thermo_t * | thermo = 0 | ) |
Constructor.
thermo | The 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 17 of file ElectrodeKinetics.cpp.
References Cantera::warn_deprecated().
Referenced by ElectrodeKinetics::duplMyselfAsKinetics().
|
virtual |
Destructor.
Definition at line 27 of file ElectrodeKinetics.cpp.
References ElectrodeKinetics::rmcVector.
ElectrodeKinetics | ( | const ElectrodeKinetics & | right | ) |
Copy Constructor.
Definition at line 34 of file ElectrodeKinetics.cpp.
References ElectrodeKinetics::operator=().
ElectrodeKinetics & operator= | ( | const ElectrodeKinetics & | right | ) |
Assignment operator.
Definition at line 44 of file ElectrodeKinetics.cpp.
References ElectrodeKinetics::kElectronIndex_, Kinetics::m_ii, ElectrodeKinetics::metalPhaseIndex_, InterfaceKinetics::operator=(), ElectrodeKinetics::rmcVector, and ElectrodeKinetics::solnPhaseIndex_.
Referenced by ElectrodeKinetics::ElectrodeKinetics().
Duplication function.
tpVector | Vector of ThermoPhase pointers. These are shallow pointers to the ThermoPhase objects that will comprise the phases for the new object. |
Reimplemented from InterfaceKinetics.
Definition at line 77 of file ElectrodeKinetics.cpp.
References Kinetics::assignShallowPointers(), and ElectrodeKinetics::ElectrodeKinetics().
|
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 InterfaceKinetics.
Definition at line 72 of file ElectrodeKinetics.cpp.
void identifyMetalPhase | ( | ) |
Identify the metal phase and the electrons species.
We fill in the internal variables, metalPhaseIndex_ and kElectronIndex_ here
Definition at line 85 of file ElectrodeKinetics.cpp.
References Phase::charge(), Phase::elementIndex(), ElectrodeKinetics::kElectronIndex_, Kinetics::m_start, Kinetics::m_thermo, ElectrodeKinetics::metalPhaseIndex_, Phase::name(), Phase::nAtoms(), Phase::nDim(), Phase::nElements(), Kinetics::nPhases(), Cantera::npos, Phase::nSpecies(), and ElectrodeKinetics::solnPhaseIndex_.
Referenced by ElectrodeKinetics::init().
|
virtual |
Internal routine that updates the Rates of Progress of the reactions.
This is actually the guts of the functionality of the object
Reimplemented from InterfaceKinetics.
Definition at line 175 of file ElectrodeKinetics.cpp.
References InterfaceKinetics::_update_rates_C(), InterfaceKinetics::_update_rates_T(), AssertThrow, Cantera::BUTLERVOLMER_NOACTIVITYCOEFFS_RXN, Cantera::BUTLERVOLMER_RXN, DATA_PTR, Cantera::GasConstant, InterfaceKinetics::getDeltaGibbs(), RxnOrders::kinSpeciesIDs_, RxnOrders::kinSpeciesOrders_, InterfaceKinetics::m_actConc, InterfaceKinetics::m_beta, InterfaceKinetics::m_ctrxn, InterfaceKinetics::m_ctrxn_ecdf, InterfaceKinetics::m_ctrxn_ROPOrdersList_, InterfaceKinetics::m_deltaG, Kinetics::m_ii, Kinetics::m_perturb, RxnMolChange::m_phaseChargeChange, InterfaceKinetics::m_phaseExists, InterfaceKinetics::m_phaseExistsCheck, InterfaceKinetics::m_phaseIsStable, InterfaceKinetics::m_phi, Kinetics::m_reactantStoich, Kinetics::m_revProductStoich, Kinetics::m_rfn, Kinetics::m_rkcn, Kinetics::m_ropf, Kinetics::m_ropnet, Kinetics::m_ropr, InterfaceKinetics::m_rxnPhaseIsProduct, InterfaceKinetics::m_rxnPhaseIsReactant, InterfaceKinetics::m_StandardConc, Kinetics::m_start, InterfaceKinetics::m_surf, ElectrodeKinetics::metalPhaseIndex_, Phase::moleFraction(), Cantera::multiply_each(), Kinetics::nPhases(), Cantera::npos, Kinetics::reactionType(), ElectrodeKinetics::rmcVector, ElectrodeKinetics::solnPhaseIndex_, Kinetics::speciesPhase(), Kinetics::speciesPhaseIndex(), and Phase::temperature().
double openCircuitVoltage | ( | size_t | irxn | ) |
Calculate the open circuit voltage of a given reaction.
If the reaction has no electron transport, then return 0.0
irxn | Reaction id |
Definition at line 725 of file ElectrodeKinetics.cpp.
References InterfaceKinetics::getDeltaGibbs(), InterfaceKinetics::m_deltaG, RxnMolChange::m_phaseChargeChange, ElectrodeKinetics::metalPhaseIndex_, and ElectrodeKinetics::rmcVector.
|
virtual |
Prepare the class for the addition of reactions.
(virtual from Kinetics) We determine the metal phase and solution phase here
Reimplemented from InterfaceKinetics.
Definition at line 888 of file ElectrodeKinetics.cpp.
References ElectrodeKinetics::identifyMetalPhase(), and InterfaceKinetics::init().
|
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 InterfaceKinetics.
Definition at line 894 of file ElectrodeKinetics.cpp.
References InterfaceKinetics::finalize(), Kinetics::m_ii, and ElectrodeKinetics::rmcVector.
std::vector<RxnMolChange*> rmcVector |
Vector of additional information about each reaction.
This vector contains information about the phase mole change for each reaction, for example.
Definition at line 116 of file ElectrodeKinetics.h.
Referenced by ElectrodeKinetics::finalize(), ElectrodeKinetics::openCircuitVoltage(), ElectrodeKinetics::operator=(), ElectrodeKinetics::updateROP(), and ElectrodeKinetics::~ElectrodeKinetics().
|
protected |
Index of the metal phase in the list of phases for this kinetics object. This is the electron phase.
Definition at line 120 of file ElectrodeKinetics.h.
Referenced by ElectrodeKinetics::identifyMetalPhase(), ElectrodeKinetics::openCircuitVoltage(), ElectrodeKinetics::operator=(), and ElectrodeKinetics::updateROP().
|
protected |
Index of the solution phase in the list of phases for this surface.
Definition at line 123 of file ElectrodeKinetics.h.
Referenced by ElectrodeKinetics::identifyMetalPhase(), ElectrodeKinetics::operator=(), and ElectrodeKinetics::updateROP().
|
protected |
Index of the electrons species in the list of species for this surface kinetics, if none set it to -1.
Definition at line 126 of file ElectrodeKinetics.h.
Referenced by ElectrodeKinetics::identifyMetalPhase(), and ElectrodeKinetics::operator=().