9#ifndef CT_IFACEKINETICS_H
10#define CT_IFACEKINETICS_H
20class ImplicitSurfChem;
21class InterfaceReaction2;
150 bool doIrreversible =
false);
165 "InterfaceKinetics::effectivePreExponentialFactor",
166 "Only implemented for legacy CTI/XML framework.");
168 return m_rates.effectivePreExponentialFactor(irxn);
184 "InterfaceKinetics::effectiveActivationEnergy_R",
185 "Only implemented for legacy CTI/XML framework.");
187 return m_rates.effectiveActivationEnergy_R(irxn);
204 "InterfaceKinetics::effectiveTemperatureExponent",
205 "Only implemented for legacy CTI/XML framework.");
207 return m_rates.effectiveTemperatureExponent(irxn);
230 virtual bool addReaction(shared_ptr<Reaction> r,
bool resize=
true);
282 double atol=1.e-14,
double maxStepSize=0,
283 size_t maxSteps=20000,
size_t maxErrTestFails=7);
304 doublereal timeScaleOverride = 1.0);
306 void setIOFlag(
int ioFlag);
715 void applyStickingCorrection(
double T,
double* kf);
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
Advances the surface coverages of the associated set of SurfacePhase objects in time.
A kinetics manager for heterogeneous reaction mechanisms.
virtual void resizeReactions()
Finalize Kinetics object and associated objects.
virtual void init()
Prepare the class for the addition of reactions, after all phases have been added.
virtual void getDeltaSSGibbs(doublereal *deltaG)
Return the vector of values for the reaction standard state Gibbs free energy change.
std::vector< size_t > m_revindex
List of reactions numbers which are reversible reactions.
int phaseExistence(const size_t iphase) const
Gets the phase existence int for the ith phase.
SurfPhase * m_surf
Pointer to the single surface phase.
vector_fp m_beta
Electrochemical transfer coefficient for the forward direction.
virtual void getRevRateConstants(doublereal *krev, bool doIrreversible=false)
Return the reverse rate constants.
double effectiveTemperatureExponent(size_t irxn)
Return effective temperature exponent for the specified reaction.
void applyVoltageKfwdCorrection(doublereal *const kfwd)
Apply modifications for the forward reaction rate for interfacial charge transfer reactions.
size_t m_nDim
Number of dimensions of reacting phase (2 for InterfaceKinetics, 1 for EdgeKinetics)
virtual bool isReversible(size_t i)
True if reaction i has been declared to be reversible.
vector_fp m_deltaG0
Vector of delta G^0, the standard state Gibbs free energies for each reaction.
void setPhaseStability(const size_t iphase, const int isStable)
Set the stability of a phase in the reaction object.
vector_fp m_StandardConc
Vector of standard concentrations.
SurfaceArrhenius buildSurfaceArrhenius(size_t i, InterfaceReaction2 &r, bool replace)
Build a SurfaceArrhenius object from a Reaction, taking into account the possible sticking coefficien...
vector_fp m_deltaG
Vector of deltaG[] of reaction, the delta Gibbs free energies for each reaction.
vector_fp m_phi
Vector of phase electric potentials.
virtual void getDeltaElectrochemPotentials(doublereal *deltaM)
Return the vector of values for the reaction electrochemical free energy change.
void convertExchangeCurrentDensityFormulation(doublereal *const kfwd)
When an electrode reaction rate is optionally specified in terms of its exchange current density,...
void _update_rates_phi()
Update properties that depend on the electric potential.
doublereal m_temp
Current temperature of the data.
std::vector< std::vector< bool > > m_rxnPhaseIsReactant
Vector of vector of booleans indicating whether a phase participates in a reaction as a reactant.
virtual void getDeltaEnthalpy(doublereal *deltaH)
Return the vector of values for the reactions change in enthalpy.
bool m_has_electrochem_rxns
Boolean flag indicating whether any reaction in the mechanism has a beta electrochemical parameter.
virtual void getFwdRateConstants(doublereal *kfwd)
Return the forward rate constants.
std::vector< unique_ptr< MultiRateBase > > m_interfaceRates
Vector of rate handlers for interface reactions.
virtual void addPhase(ThermoPhase &thermo)
Add a phase to the kinetics manager object.
std::vector< size_t > m_ctrxn
Vector of reaction indexes specifying the id of the charge transfer reactions in the mechanism.
std::vector< StickData > m_stickingData
Data for sticking reactions.
virtual bool addReaction(shared_ptr< Reaction > r, bool resize=true)
Add a single reaction to the mechanism.
vector_fp m_actConc
Array of activity concentrations for each species in the kinetics object.
void setElectricPotential(int n, doublereal V)
Set the electric potential in the nth phase.
vector_int m_ctrxn_ecdf
Vector of booleans indicating whether the charge transfer reaction rate constant is described by an e...
vector_fp m_conc
Array of concentrations for each species in the kinetics mechanism.
void updateKc()
Update the equilibrium constants and stored electrochemical potentials in molar units for all reversi...
void setPhaseExistence(const size_t iphase, const int exists)
Set the existence of a phase in the reaction object.
std::vector< size_t > m_irrev
Vector of irreversible reaction numbers.
vector_fp m_mu0
Vector of standard state chemical potentials for all species.
virtual void getActivityConcentrations(doublereal *const conc)
Get the vector of activity concentrations used in the kinetics object.
vector_fp m_pot
Vector of potential energies due to Voltages.
void _update_rates_C()
Update properties that depend on the species mole fractions and/or concentration,.
virtual void modifyReaction(size_t i, shared_ptr< Reaction > rNew)
Modify the rate expression associated with a reaction.
vector_fp m_mu
Vector of chemical potentials for all species.
vector_fp m_grt
Temporary work vector of length m_kk.
double effectiveActivationEnergy_R(size_t irxn)
Return effective activation energy for the specified reaction.
vector_fp deltaElectricEnergy_
Storage for the net electric energy change due to reaction.
doublereal m_logtemp
Current log of the temperature.
int phaseStability(const size_t iphase) const
Gets the phase stability int for the ith phase.
ImplicitSurfChem * m_integrator
Pointer to the Implicit surface chemistry object.
virtual void getEquilibriumConstants(doublereal *kc)
Equilibrium constant for all reactions including the voltage term.
virtual void getDeltaSSEntropy(doublereal *deltaS)
Return the vector of values for the change in the standard state entropies for each reaction.
virtual void getDeltaEntropy(doublereal *deltaS)
Return the vector of values for the reactions change in entropy.
void solvePseudoSteadyStateProblem(int ifuncOverride=-1, doublereal timeScaleOverride=1.0)
Solve for the pseudo steady-state of the surface problem.
void _update_rates_T()
Update properties that depend on temperature.
double effectivePreExponentialFactor(size_t irxn)
Return effective preexponent for the specified reaction.
virtual void updateROP()
Internal routine that updates the Rates of Progress of the reactions.
virtual void getDeltaSSEnthalpy(doublereal *deltaH)
Return the vector of values for the change in the standard state enthalpies of reaction.
bool m_has_coverage_dependence
Boolean flag indicating whether any reaction in the mechanism has a coverage dependent forward reacti...
virtual void updateMu0()
Update the standard state chemical potentials and species equilibrium constant entries.
InterfaceKinetics(ThermoPhase *thermo=0)
Constructor.
std::vector< std::vector< bool > > m_rxnPhaseIsProduct
Vector of vector of booleans indicating whether a phase participates in a reaction as a product.
vector_fp m_mu0_Kc
Vector of standard state electrochemical potentials modified by a standard concentration term.
vector_int m_phaseIsStable
Vector of int indicating whether phases are stable or not.
void updateExchangeCurrentQuantities()
values needed to convert from exchange current density to surface reaction rate.
std::vector< bool > m_phaseExists
Vector of booleans indicating whether phases exist or not.
virtual void getDeltaGibbs(doublereal *deltaG)
Return the vector of values for the reaction Gibbs free energy change.
virtual std::string kineticsType() const
Identifies the Kinetics manager type.
int m_phaseExistsCheck
Int flag to indicate that some phases in the kinetics mechanism are non-existent.
std::map< std::string, size_t > m_interfaceTypes
Rate handler mapping.
vector_fp m_ProdStanConcReac
Vector of the products of the standard concentrations of the reactants.
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.
doublereal electrochem_beta(size_t irxn) const
Return the charge transfer rxn Beta parameter for the ith reaction.
bool m_has_exchange_current_density_formulation
Boolean flag indicating whether any reaction in the mechanism is described by an exchange current den...
virtual void resizeSpecies()
Resize arrays with sizes that depend on the total number of species.
Rate1< SurfaceArrhenius > m_rates
Templated class containing the vector of reactions for this interface.
A reaction occurring on an interface (for example, a SurfPhase or an EdgePhase)
Public interface for kinetics managers.
ThermoPhase & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism.
An error indicating that an unimplemented function has been called.
This rate coefficient manager supports one parameterization of the rate constant of any type.
A simple thermodynamic model for a surface phase, assuming an ideal solution model.
An Arrhenius rate with coverage-dependent terms.
Base class for a phase with thermodynamic properties.
Namespace for the Cantera kernel.
std::vector< int > vector_int
Vector of ints.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
Values used for converting sticking coefficients into rate constants.
size_t index
index of the sticking reaction in the full reaction list
bool use_motz_wise
'true' if Motz & Wise correction is being used
double order
exponent applied to site density term
double multiplier
multiplicative factor in rate expression