Cantera  2.5.1
Public Member Functions | List of all members
EdgeKinetics Class Reference

Heterogeneous reactions at one-dimensional interfaces between multiple adjacent two-dimensional surfaces. More...

#include <EdgeKinetics.h>

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

Public Member Functions

 EdgeKinetics ()
 Constructor. More...
 
virtual std::string kineticsType () const
 Identifies the Kinetics manager type. More...
 
- Public Member Functions inherited from InterfaceKinetics
 InterfaceKinetics (thermo_t *thermo=0)
 Constructor. 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, double rtol=1.e-7, double atol=1.e-14, double maxStepSize=0, size_t maxSteps=20000, size_t maxErrTestFails=7)
 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)
 
virtual void updateMu0 ()
 Update the standard state chemical potentials and species equilibrium constant entries. 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...
 
double effectivePreExponentialFactor (size_t irxn)
 Return effective preexponent for the specified reaction. More...
 
double effectiveActivationEnergy_R (size_t irxn)
 Return effective activation energy for the specified reaction. More...
 
double effectiveTemperatureExponent (size_t irxn)
 Return effective temperature exponent for the specified reaction. More...
 
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, after all phases have been added. More...
 
virtual void resizeSpecies ()
 Resize arrays with sizes that depend on the total number of species. 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...
 
- Public Member Functions inherited from Kinetics
 Kinetics ()
 Default constructor. More...
 
virtual ~Kinetics ()
 
 Kinetics (const Kinetics &)=delete
 Kinetics objects are not copyable or assignable. More...
 
Kineticsoperator= (const Kinetics &)=delete
 
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) const
 Return the phase index of a phase in the list of phases defined within the object. More...
 
size_t surfacePhaseIndex () const
 This returns the integer index of the phase which has ThermoPhase type cSurf. More...
 
size_t reactionPhaseIndex () const
 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...
 
const thermo_tspeciesPhase (const std::string &nm) const
 
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) const
 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 int reactionType (size_t i) const
 Flag specifying the type of reaction. More...
 
std::string reactionString (size_t i) const
 Return a string representing the reaction. More...
 
std::string reactantString (size_t i) const
 Returns a string containing the reactants side of the reaction equation. More...
 
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...
 
shared_ptr< const Reactionreaction (size_t i) const
 
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...
 
bool skipUndeclaredSpecies () const
 
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...
 
bool skipUndeclaredThirdBodies () const
 
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...
 
virtual void invalidateCache ()
 
virtual std::pair< size_t, size_t > checkDuplicates (bool throw_err=true) const
 Check for unmarked duplicate reactions and unmatched marked duplicates. More...
 
void selectPhase (const doublereal *data, const thermo_t *phase, doublereal *phase_data)
 
virtual void setRoot (std::shared_ptr< Solution > root)
 Set root Solution holding all phase information. More...
 

Additional Inherited Members

- Protected Member Functions inherited from InterfaceKinetics
SurfaceArrhenius buildSurfaceArrhenius (size_t i, InterfaceReaction &r, bool replace)
 Build a SurfaceArrhenius object from a Reaction, taking into account the possible sticking coefficient form and coverage dependencies. More...
 
void applyStickingCorrection (double T, 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 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< 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...
 
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...
 
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 charge 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...
 
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...
 
bool m_ROP_ok
 
doublereal m_temp
 Current temperature of the data. More...
 
doublereal m_logtemp
 Current log of the temperature. 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...
 
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< StickDatam_stickingData
 Data for sticking reactions. More...
 
int m_ioFlag
 
size_t m_nDim
 Number of dimensions of reacting phase (2 for InterfaceKinetics, 1 for EdgeKinetics) More...
 
- Protected Attributes inherited from Kinetics
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...
 
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< 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 name 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...
 
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
 
std::weak_ptr< Solutionm_root
 reference to Solution More...
 
ValueCache m_cache
 Cache for saved calculations within each Kinetics object. More...
 

Detailed Description

Heterogeneous reactions at one-dimensional interfaces between multiple adjacent two-dimensional surfaces.

Definition at line 22 of file EdgeKinetics.h.

Constructor & Destructor Documentation

◆ EdgeKinetics()

EdgeKinetics ( )
inline

Constructor.

Definition at line 26 of file EdgeKinetics.h.

References InterfaceKinetics::m_nDim.

Member Function Documentation

◆ kineticsType()

virtual std::string kineticsType ( ) const
inlinevirtual

Identifies the Kinetics manager type.

Each class derived from Kinetics should override this method to return a meaningful identifier.

Reimplemented from InterfaceKinetics.

Definition at line 30 of file EdgeKinetics.h.


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