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