8 #ifndef CT_IFACEKINETICS_H
9 #define CT_IFACEKINETICS_H
13 #include "cantera/kinetics/RxnMolChange.h"
23 class ImplicitSurfChem;
114 virtual int type()
const;
192 bool doIrreversible =
false);
217 virtual bool ready()
const;
283 doublereal timeScaleOverride = 1.0);
285 void setIOFlag(
int ioFlag);
287 void checkPartialEquil();
301 "To be removed after Cantera 2.2. Duplicate of nReactions().");
726 void applyStickingCorrection(
double* kf);
void applyVoltageKfwdCorrection(doublereal *const kfwd)
Apply modifications for the forward reaction rate for interfacial charge transfer reactions...
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.
vector_fp m_deltaG0
Vector of delta G^0, the standard state Gibbs free energies for each reaction.
virtual bool ready() const
Returns true if the kinetics manager has been properly initialized and finalized. ...
doublereal m_logtemp
Current log of the temperature.
virtual void getDeltaEnthalpy(doublereal *deltaH)
Return the vector of values for the reactions change in enthalpy.
doublereal electrochem_beta(size_t irxn) const
Return the charge transfer rxn Beta parameter for the ith reaction.
SurfaceArrhenius buildSurfaceArrhenius(size_t i, InterfaceReaction &r)
Build a SurfaceArrhenius object from a Reaction, taking into account the possible sticking coefficien...
Various templated functions that carry out common vector operations (see Templated Utility Functions)...
thermo_t & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism...
SurfPhase * m_surf
Pointer to the single surface phase.
int phaseExistence(const size_t iphase) const
Gets the phase existence int for the ith phase.
size_t reactionNumber() const
Number of reactions in the mechanism.
vector_fp m_phi
Vector of phase electric potentials.
void advanceCoverages(doublereal tstep)
Advance the surface coverages in time.
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.
virtual ~InterfaceKinetics()
Destructor.
vector_fp m_beta
Electrochemical transfer coefficient for the forward direction.
std::vector< size_t > kinSpeciesIDs_
ID's of the kinetic species.
virtual void updateMu0()
Update the standard state chemical potentials and species equilibrium constant entries.
This rate coefficient manager supports one parameterization of the rate constant of any type...
virtual void getDeltaSSEntropy(doublereal *deltaS)
Return the vector of values for the change in the standard state entropies for each reaction...
void warn_deprecated(const std::string &method, const std::string &extra)
Print a warning indicating that method is deprecated.
virtual void getEquilibriumConstants(doublereal *kc)
Equilibrium constant for all reactions including the voltage term.
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_StandardConc
Vector of standard concentrations.
virtual void addPhase(thermo_t &thermo)
Add a phase to the kinetics manager object.
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
void convertExchangeCurrentDensityFormulation(doublereal *const kfwd)
When an electrode reaction rate is optionally specified in terms of its exchange current density...
size_t m_nrev
Number of reversible reactions in the mechanism.
bool m_has_electrochem_rxns
Boolean flag indicating whether any reaction in the mechanism has a beta electrochemical parameter...
int m_phaseExistsCheck
Int flag to indicate that some phases in the kinetics mechanism are non-existent. ...
virtual void finalize()
Finish adding reactions and prepare for use.
vector_fp m_mu0_Kc
Vector of standard state electrochemical potentials modified by a standard concentration term...
vector_fp deltaElectricEnergy_
Storage for the net electric energy change due to reaction.
Base class for a phase with thermodynamic properties.
void updateKc()
Update the equilibrium constants and stored electrochemical potentials in molar units for all reversi...
std::vector< int > vector_int
Vector of ints.
doublereal m_temp
Current temperature of the data.
A simple thermodynamic model for a surface phase, assuming an ideal solution model.
bool m_has_coverage_dependence
Boolean flag indicating whether any reaction in the mechanism has a coverage dependent forward reacti...
vector_int m_ctrxn_ecdf
Vector of booleans indicating whether the charge transfer reaction rate constant is described by an e...
virtual void getDeltaGibbs(doublereal *deltaG)
Return the vector of values for the reaction Gibbs free energy change.
std::vector< RxnOrders * > m_ctrxn_ROPOrdersList_
Vector of booleans indicating whether the charge transfer reaction rate constant is described by an e...
std::vector< size_t > m_ctrxn_BVform
Vector of Reactions which follow the Butler-Volmer methodology for specifying the exchange current de...
virtual void getFwdRateConstants(doublereal *kfwd)
Return the forward rate constants.
vector_fp kinSpeciesOrders_
Orders of the kinetic species.
vector_fp m_E
Vector of raw activation energies for the reactions.
A kinetics manager for heterogeneous reaction mechanisms.
vector_fp m_conc
Array of concentrations for each species in the kinetics mechanism.
void solvePseudoSteadyStateProblem(int ifuncOverride=-1, doublereal timeScaleOverride=1.0)
Solve for the pseudo steady-state of the surface problem.
virtual int type() const
Identifies the kinetics manager type.
std::vector< bool > m_phaseExists
Vector of booleans indicating whether phases exist or not.
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 depend...
void _update_rates_T()
Update properties that depend on temperature.
A reaction occurring on an interface (i.e. a SurfPhase or an EdgePhase)
vector_fp m_actConc
Array of activity concentrations for each species in the kinetics object.
Public interface for kinetics managers.
virtual void getActivityConcentrations(doublereal *const conc)
Get the vector of activity concentrations used in the kinetics object.
void _update_rates_C()
Update properties that depend on the species mole fractions and/or concentration,.
vector_fp m_pot
Vector of potential energies due to Voltages.
Intermediate class which stores data about a reaction and its rate parameterization before adding the...
size_t m_nirrev
Number of irreversible reactions in the mechanism.
void setPhaseStability(const size_t iphase, const int isStable)
Set the stability of a phase in the reaction object.
Base class for kinetics managers and also contains the kineticsmgr module documentation (see Kinetics...
bool m_has_exchange_current_density_formulation
Boolean flag indicating whether any reaction in the mechanism is described by an exchange current den...
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 modifyReaction(size_t i, shared_ptr< Reaction > rNew)
Modify the rate expression associated with a reaction.
std::vector< size_t > m_revindex
List of reactions numbers which are reversible reactions.
virtual void getRevRateConstants(doublereal *krev, bool doIrreversible=false)
Return the reverse rate constants.
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.
virtual void init()
Prepare the class for the addition of reactions.
std::vector< size_t > m_irrev
Vector of irreversible reaction numbers.
Advances the surface coverages of the associated set of SurfacePhase objects in time.
InterfaceKinetics(thermo_t *thermo=0)
Constructor.
virtual Kinetics * duplMyselfAsKinetics(const std::vector< thermo_t * > &tpVector) const
Duplication routine for objects which inherit from Kinetics.
vector_fp m_mu
Vector of chemical potentials for all species.
void updateExchangeCurrentQuantities()
values needed to convert from exchange current density to surface reaction rate.
std::vector< double > vector_fp
Turn on the use of stl vectors for the basic array type within cantera Vector of doubles.
virtual void updateROP()
Internal routine that updates the Rates of Progress of the reactions.
std::vector< int > m_phaseIsStable
Vector of int indicating whether phases are stable or not.
Rate1< SurfaceArrhenius > m_rates
Templated class containing the vector of reactions for this interface.
size_t m_ii
Number of reactions in the mechanism.
std::vector< size_t > m_ctrxn
Vector of reaction indexes specifying the id of the current transfer reactions in the mechanism...
vector_fp m_ProdStanConcReac
Vector of the products of the standard concentrations of the reactants.
void setPhaseExistence(const size_t iphase, const int exists)
Set the existence of a phase in the reaction object.
virtual void getDeltaSSGibbs(doublereal *deltaG)
Return the vector of values for the reaction standard state Gibbs free energy change.
virtual void getDeltaElectrochemPotentials(doublereal *deltaM)
Return the vector of values for the reaction electrochemical free energy change.
vector_fp m_mu0
Vector of standard state chemical potentials for all species.
vector_fp m_grt
Temporary work vector of length m_kk.
virtual void getDeltaSSEnthalpy(doublereal *deltaH)
Return the vector of values for the change in the standard state enthalpies of reaction.
ImplicitSurfChem * m_integrator
Pointer to the Implicit surface chemistry object.
An Arrhenius rate with coverage-dependent terms.
An interface reaction which involves charged species.
InterfaceKinetics & operator=(const InterfaceKinetics &right)
Assignment operator.
bool m_finalized
Boolean indicating whether mechanism has been finalized.
int fill(const vector_fp &fullForwardOrders)
Fill in the structure with the array.
std::vector< RxnOrders * > m_ctrxn_FwdOrdersList_
Reaction Orders for the case where the forwards rate of progress is being calculated.