Cantera  3.1.0a1
EdgeKinetics Class Reference

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

#include <EdgeKinetics.h>

Inheritance diagram for EdgeKinetics:
[legend]

Detailed Description

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

Definition at line 20 of file EdgeKinetics.h.

Public Member Functions

 EdgeKinetics ()
 Constructor. More...
 
string kineticsType () const override
 Identifies the Kinetics manager type. More...
 
- Public Member Functions inherited from InterfaceKinetics
 InterfaceKinetics ()=default
 Constructor. More...
 
void resizeReactions () override
 Finalize Kinetics object and associated objects. More...
 
string kineticsType () const override
 Identifies the Kinetics manager type. More...
 
void setElectricPotential (int n, double V)
 Set the electric potential in the nth phase. More...
 
void updateROP () override
 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 (double 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, double 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 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...
 
double interfaceCurrent (const size_t iphase)
 Gets the interface current for the ith phase. More...
 
void setDerivativeSettings (const AnyMap &settings) override
 Set/modify derivative settings. More...
 
void getDerivativeSettings (AnyMap &settings) const override
 Retrieve derivative settings. More...
 
Eigen::SparseMatrix< double > fwdRatesOfProgress_ddCi () override
 Calculate derivatives for forward rates-of-progress with respect to species concentration at constant temperature, pressure and remaining species concentrations. More...
 
Eigen::SparseMatrix< double > revRatesOfProgress_ddCi () override
 Calculate derivatives for forward rates-of-progress with respect to species concentration at constant temperature, pressure and remaining species concentrations. More...
 
Eigen::SparseMatrix< double > netRatesOfProgress_ddCi () override
 Calculate derivatives for net rates-of-progress with respect to species concentration at constant temperature, pressure, and remaining species concentrations. More...
 
void getEquilibriumConstants (double *kc) override
 Equilibrium constant for all reactions including the voltage term. More...
 
void getDeltaGibbs (double *deltaG) override
 Return the vector of values for the reaction Gibbs free energy change. More...
 
void getDeltaElectrochemPotentials (double *deltaM) override
 Return the vector of values for the reaction electrochemical free energy change. More...
 
void getDeltaEnthalpy (double *deltaH) override
 Return the vector of values for the reactions change in enthalpy. More...
 
void getDeltaEntropy (double *deltaS) override
 Return the vector of values for the reactions change in entropy. More...
 
void getDeltaSSGibbs (double *deltaG) override
 Return the vector of values for the reaction standard state Gibbs free energy change. More...
 
void getDeltaSSEnthalpy (double *deltaH) override
 Return the vector of values for the change in the standard state enthalpies of reaction. More...
 
void getDeltaSSEntropy (double *deltaS) override
 Return the vector of values for the change in the standard state entropies for each reaction. More...
 
void getActivityConcentrations (double *const conc) override
 Get the vector of activity concentrations used in the kinetics object. More...
 
bool isReversible (size_t i) override
 True if reaction i has been declared to be reversible. More...
 
void getFwdRateConstants (double *kfwd) override
 Return the forward rate constants. More...
 
void getRevRateConstants (double *krev, bool doIrreversible=false) override
 Return the reverse rate constants. More...
 
void addThermo (shared_ptr< ThermoPhase > thermo) override
 Add a thermo phase to the kinetics manager object. More...
 
void init () override
 Prepare the class for the addition of reactions, after all phases have been added. More...
 
void resizeSpecies () override
 Resize arrays with sizes that depend on the total number of species. More...
 
bool addReaction (shared_ptr< Reaction > r, bool resize=true) override
 Add a single reaction to the mechanism. More...
 
void modifyReaction (size_t i, shared_ptr< Reaction > rNew) override
 Modify the rate expression associated with a reaction. More...
 
void setMultiplier (size_t i, double f) override
 Set the multiplier for reaction i to f. More...
 
- Public Member Functions inherited from Kinetics
virtual pair< size_t, size_t > checkDuplicates (bool throw_err=true) const
 Check for unmarked duplicate reactions and unmatched marked duplicates. More...
 
virtual void setRoot (shared_ptr< Solution > root)
 Set root Solution holding all phase information. More...
 
shared_ptr< Solutionroot () const
 Get the Solution object containing this Kinetics object and associated ThermoPhase objects. More...
 
 Kinetics ()=default
 Default constructor. More...
 
virtual ~Kinetics ()=default
 
 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 string &ph) const
 Return the phase index of a phase in the list of phases defined within the object. More...
 
size_t reactionPhaseIndex () const
 Phase where the reactions occur. More...
 
shared_ptr< ThermoPhasereactionPhase () const
 Return pointer to phase where the reactions occur. More...
 
ThermoPhasethermo (size_t n=0)
 This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism. More...
 
const ThermoPhasethermo (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...
 
string kineticsSpeciesName (size_t k) const
 Return the name of the kth species in the kinetics manager. More...
 
size_t kineticsSpeciesIndex (const string &nm) const
 This routine will look up a species number based on the input string nm. More...
 
ThermoPhasespeciesPhase (const 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 ThermoPhasespeciesPhase (const string &nm) const
 
ThermoPhasespeciesPhase (size_t k)
 This function takes as an argument the kineticsSpecies index (that is, 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 (that is, 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 (double *fwdROP)
 Return the forward rates of progress of the reactions. More...
 
virtual void getRevRatesOfProgress (double *revROP)
 Return the Reverse rates of progress of the reactions. More...
 
virtual void getNetRatesOfProgress (double *netROP)
 Net rates of progress. More...
 
virtual void getReactionDelta (const double *property, double *deltaProperty) const
 Change in species properties. More...
 
virtual void getRevReactionDelta (const double *g, double *dg) const
 Given an array of species properties 'g', return in array 'dg' the change in this quantity in the reversible reactions. More...
 
virtual void getThirdBodyConcentrations (double *concm)
 Return a vector of values of effective concentrations of third-body collision partners of any reaction. More...
 
virtual const vector< double > & thirdBodyConcentrations () const
 Provide direct access to current third-body concentration values. More...
 
virtual void getCreationRates (double *cdot)
 Species creation rates [kmol/m^3/s or kmol/m^2/s]. More...
 
virtual void getDestructionRates (double *ddot)
 Species destruction rates [kmol/m^3/s or kmol/m^2/s]. More...
 
virtual void getNetProductionRates (double *wdot)
 Species net production rates [kmol/m^3/s or kmol/m^2/s]. More...
 
virtual void getFwdRateConstants_ddT (double *dkfwd)
 Calculate derivatives for forward rate constants with respect to temperature at constant pressure, molar concentration and mole fractions. More...
 
virtual void getFwdRateConstants_ddP (double *dkfwd)
 Calculate derivatives for forward rate constants with respect to pressure at constant temperature, molar concentration and mole fractions. More...
 
virtual void getFwdRateConstants_ddC (double *dkfwd)
 Calculate derivatives for forward rate constants with respect to molar concentration at constant temperature, pressure and mole fractions. More...
 
virtual void getFwdRatesOfProgress_ddT (double *drop)
 Calculate derivatives for forward rates-of-progress with respect to temperature at constant pressure, molar concentration and mole fractions. More...
 
virtual void getFwdRatesOfProgress_ddP (double *drop)
 Calculate derivatives for forward rates-of-progress with respect to pressure at constant temperature, molar concentration and mole fractions. More...
 
virtual void getFwdRatesOfProgress_ddC (double *drop)
 Calculate derivatives for forward rates-of-progress with respect to molar concentration at constant temperature, pressure and mole fractions. More...
 
virtual Eigen::SparseMatrix< double > fwdRatesOfProgress_ddX ()
 Calculate derivatives for forward rates-of-progress with respect to species mole fractions at constant temperature, pressure and molar concentration. More...
 
virtual void getRevRatesOfProgress_ddT (double *drop)
 Calculate derivatives for reverse rates-of-progress with respect to temperature at constant pressure, molar concentration and mole fractions. More...
 
virtual void getRevRatesOfProgress_ddP (double *drop)
 Calculate derivatives for reverse rates-of-progress with respect to pressure at constant temperature, molar concentration and mole fractions. More...
 
virtual void getRevRatesOfProgress_ddC (double *drop)
 Calculate derivatives for reverse rates-of-progress with respect to molar concentration at constant temperature, pressure and mole fractions. More...
 
virtual Eigen::SparseMatrix< double > revRatesOfProgress_ddX ()
 Calculate derivatives for reverse rates-of-progress with respect to species mole fractions at constant temperature, pressure and molar concentration. More...
 
virtual void getNetRatesOfProgress_ddT (double *drop)
 Calculate derivatives for net rates-of-progress with respect to temperature at constant pressure, molar concentration and mole fractions. More...
 
virtual void getNetRatesOfProgress_ddP (double *drop)
 Calculate derivatives for net rates-of-progress with respect to pressure at constant temperature, molar concentration and mole fractions. More...
 
virtual void getNetRatesOfProgress_ddC (double *drop)
 Calculate derivatives for net rates-of-progress with respect to molar concentration at constant temperature, pressure and mole fractions. More...
 
virtual Eigen::SparseMatrix< double > netRatesOfProgress_ddX ()
 Calculate derivatives for net rates-of-progress with respect to species mole fractions at constant temperature, pressure and molar concentration. More...
 
void getCreationRates_ddT (double *dwdot)
 Calculate derivatives for species creation rates with respect to temperature at constant pressure, molar concentration and mole fractions. More...
 
void getCreationRates_ddP (double *dwdot)
 Calculate derivatives for species creation rates with respect to pressure at constant temperature, molar concentration and mole fractions. More...
 
void getCreationRates_ddC (double *dwdot)
 Calculate derivatives for species creation rates with respect to molar concentration at constant temperature, pressure and mole fractions. More...
 
Eigen::SparseMatrix< double > creationRates_ddX ()
 Calculate derivatives for species creation rates with respect to species mole fractions at constant temperature, pressure and molar concentration. More...
 
Eigen::SparseMatrix< double > creationRates_ddCi ()
 Calculate derivatives for species creation rates with respect to species concentration at constant temperature, pressure, and concentration of all other species. More...
 
void getDestructionRates_ddT (double *dwdot)
 Calculate derivatives for species destruction rates with respect to temperature at constant pressure, molar concentration and mole fractions. More...
 
void getDestructionRates_ddP (double *dwdot)
 Calculate derivatives for species destruction rates with respect to pressure at constant temperature, molar concentration and mole fractions. More...
 
void getDestructionRates_ddC (double *dwdot)
 Calculate derivatives for species destruction rates with respect to molar concentration at constant temperature, pressure and mole fractions. More...
 
Eigen::SparseMatrix< double > destructionRates_ddX ()
 Calculate derivatives for species destruction rates with respect to species mole fractions at constant temperature, pressure and molar concentration. More...
 
Eigen::SparseMatrix< double > destructionRates_ddCi ()
 Calculate derivatives for species destruction rates with respect to species concentration at constant temperature, pressure, and concentration of all other species. More...
 
void getNetProductionRates_ddT (double *dwdot)
 Calculate derivatives for species net production rates with respect to temperature at constant pressure, molar concentration and mole fractions. More...
 
void getNetProductionRates_ddP (double *dwdot)
 Calculate derivatives for species net production rates with respect to pressure at constant temperature, molar concentration and mole fractions. More...
 
void getNetProductionRates_ddC (double *dwdot)
 Calculate derivatives for species net production rates with respect to molar concentration at constant temperature, pressure and mole fractions. More...
 
Eigen::SparseMatrix< double > netProductionRates_ddX ()
 Calculate derivatives for species net production rates with respect to species mole fractions at constant temperature, pressure and molar concentration. More...
 
Eigen::SparseMatrix< double > netProductionRates_ddCi ()
 Calculate derivatives for species net production rates with respect to species concentration at constant temperature, pressure, and concentration of all other species. More...
 
virtual double reactantStoichCoeff (size_t k, size_t i) const
 Stoichiometric coefficient of species k as a reactant in reaction i. More...
 
Eigen::SparseMatrix< double > reactantStoichCoeffs () const
 Stoichiometric coefficient matrix for reactants. More...
 
virtual double productStoichCoeff (size_t k, size_t i) const
 Stoichiometric coefficient of species k as a product in reaction i. More...
 
Eigen::SparseMatrix< double > productStoichCoeffs () const
 Stoichiometric coefficient matrix for products. More...
 
Eigen::SparseMatrix< double > revProductStoichCoeffs () const
 Stoichiometric coefficient matrix for products of reversible reactions. More...
 
virtual double reactantOrder (size_t k, size_t i) const
 Reactant order of species k in reaction i. More...
 
virtual double productOrder (int k, int i) const
 product Order of species k in reaction i. More...
 
AnyMap parameters ()
 Return the parameters for a phase definition which are needed to reconstruct an identical object using the newKinetics function. 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
 
double multiplier (size_t i) const
 The current value of the multiplier for reaction i. More...
 
virtual void invalidateCache ()
 

Additional Inherited Members

- Protected Member Functions inherited from InterfaceKinetics
void applyEquilibriumConstants (double *rop)
 Multiply rate with inverse equilibrium constant. More...
 
Eigen::SparseMatrix< double > calculateCompositionDerivatives (StoichManagerN &stoich, const vector< double > &in)
 Process mole fraction derivative. More...
 
void assertDerivativesValid (const string &name)
 Helper function ensuring that all rate derivatives can be calculated. More...
 
- Protected Member Functions inherited from Kinetics
double checkDuplicateStoich (map< int, double > &r1, 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...
 
- Protected Attributes inherited from InterfaceKinetics
vector< double > m_grt
 Temporary work vector of length m_kk. More...
 
vector< size_t > m_revindex
 List of reactions numbers which are reversible reactions. More...
 
bool m_redo_rates = false
 
vector< unique_ptr< MultiRateBase > > m_interfaceRates
 Vector of rate handlers for interface reactions. More...
 
map< string, size_t > m_interfaceTypes
 Rate handler mapping. More...
 
vector< size_t > m_irrev
 Vector of irreversible reaction numbers. More...
 
vector< double > m_conc
 Array of concentrations for each species in the kinetics mechanism. More...
 
vector< double > m_actConc
 Array of activity concentrations for each species in the kinetics object. More...
 
vector< double > m_mu0
 Vector of standard state chemical potentials for all species. More...
 
vector< double > m_mu
 Vector of chemical potentials for all species. More...
 
vector< double > m_mu0_Kc
 Vector of standard state electrochemical potentials modified by a standard concentration term. More...
 
vector< double > m_phi
 Vector of phase electric potentials. More...
 
SurfPhasem_surf = nullptr
 Pointer to the single surface phase. More...
 
ImplicitSurfChemm_integrator = nullptr
 Pointer to the Implicit surface chemistry object. More...
 
bool m_ROP_ok = false
 
double m_temp = 0.0
 Current temperature of the data. More...
 
int m_phaseExistsCheck = false
 Int flag to indicate that some phases in the kinetics mechanism are non-existent. More...
 
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...
 
vector< vector< bool > > m_rxnPhaseIsReactant
 Vector of vector of booleans indicating whether a phase participates in a reaction as a reactant. More...
 
vector< vector< bool > > m_rxnPhaseIsProduct
 Vector of vector of booleans indicating whether a phase participates in a reaction as a product. More...
 
int m_ioFlag = 0
 
size_t m_nDim = 2
 Number of dimensions of reacting phase (2 for InterfaceKinetics, 1 for EdgeKinetics) More...
 
vector< double > m_rbuf0
 Buffers for partial rop results with length nReactions() More...
 
vector< double > m_rbuf1
 
bool m_jac_skip_coverage_dependence = false
 A flag used to neglect rate coefficient coverage dependence in derivative formation. More...
 
bool m_jac_skip_electrochemistry = false
 A flag used to neglect electrochemical contributions in derivative formation. More...
 
double m_jac_rtol_delta = 1e-8
 Relative tolerance used in developing numerical portions of specific derivatives. More...
 
bool m_has_electrochemistry = false
 A flag stating if the object uses electrochemistry. More...
 
bool m_has_coverage_dependence = false
 A flag stating if the object has coverage dependent rates. More...
 
- Protected Attributes inherited from Kinetics
ValueCache m_cache
 Cache for saved calculations within each Kinetics object. More...
 
bool m_ready = false
 Boolean indicating whether Kinetics object is fully configured. More...
 
size_t m_kk = 0
 The number of species in all of the phases that participate in this kinetics mechanism. More...
 
vector< double > m_perturb
 Vector of perturbation factors for each reaction's rate of progress vector. More...
 
vector< shared_ptr< Reaction > > m_reactions
 Vector of Reaction objects represented by this Kinetics manager. More...
 
vector< shared_ptr< ThermoPhase > > m_thermo
 m_thermo is a vector of pointers to ThermoPhase objects that are involved with this kinetics operator More...
 
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...
 
map< string, size_t > m_phaseindex
 Mapping of the phase name to the position of the phase within the kinetics object. More...
 
size_t m_mindim = 4
 number of spatial dimensions of lowest-dimensional phase. More...
 
vector< double > m_rfn
 Forward rate constant for each reaction. More...
 
vector< double > m_delta_gibbs0
 Delta G^0 for all reactions. More...
 
vector< double > m_rkcn
 Reciprocal of the equilibrium constant in concentration units. More...
 
vector< double > m_ropf
 Forward rate-of-progress for each reaction. More...
 
vector< double > m_ropr
 Reverse rate-of-progress for each reaction. More...
 
vector< double > m_ropnet
 Net rate-of-progress for each reaction. More...
 
vector< double > m_dH
 The enthalpy change for each reaction to calculate Blowers-Masel rates. More...
 
vector< double > m_rbuf
 Buffer used for storage of intermediate reaction-specific results. More...
 
bool m_skipUndeclaredSpecies = false
 See skipUndeclaredSpecies() More...
 
bool m_skipUndeclaredThirdBodies = false
 See skipUndeclaredThirdBodies() More...
 
bool m_hasUndeclaredThirdBodies = false
 Flag indicating whether reactions include undeclared third bodies. More...
 
std::weak_ptr< Solutionm_root
 reference to Solution More...
 
StoichManagerN m_reactantStoich
 Stoichiometry manager for the reactants for each reaction. More...
 
StoichManagerN m_productStoich
 Stoichiometry manager for the products for each reaction. More...
 
StoichManagerN m_revProductStoich
 Stoichiometry manager for the products of reversible reactions. More...
 
Eigen::SparseMatrix< double > m_stoichMatrix
 Net stoichiometry (products - reactants) More...
 

Constructor & Destructor Documentation

◆ EdgeKinetics()

EdgeKinetics ( )
inline

Constructor.

Definition at line 24 of file EdgeKinetics.h.

Member Function Documentation

◆ kineticsType()

string kineticsType ( ) const
inlineoverridevirtual

Identifies the Kinetics manager type.

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

Since
Starting in Cantera 3.0, the name returned by this method corresponds to the canonical name used in the YAML input format.

Reimplemented from Kinetics.

Definition at line 28 of file EdgeKinetics.h.


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