21 InterfaceKinetics::InterfaceKinetics(
thermo_t* thermo) :
33 m_has_coverage_dependence(false),
34 m_has_electrochem_rxns(false),
35 m_has_exchange_current_density_formulation(false),
36 m_phaseExistsCheck(false),
78 m_redo_rates = right.m_redo_rates;
101 m_logp0 = right.m_logp0;
102 m_logc0 = right.m_logc0;
103 m_ROP_ok = right.m_ROP_ok;
115 m_ioFlag = right.m_ioFlag;
140 return cInterfaceKinetics;
169 if (T !=
m_temp || m_redo_rates) {
174 applyStickingCorrection(&
m_rfn[0]);
187 m_redo_rates =
false;
194 for (
size_t n = 0; n <
nPhases(); n++) {
205 for (
size_t n = 0; n <
nPhases(); n++) {
244 for (
size_t i = 0; i <
m_nrev; i++) {
252 for (
size_t i = 0; i !=
m_nirrev; ++i) {
271 for (
size_t n = 0; n < np; n++) {
274 for (
size_t k = 0; k < nsp; k++) {
282 void InterfaceKinetics::checkPartialEquil()
294 for (
size_t n = 0; n <
nPhases(); n++) {
297 for (
size_t k = 0; k < nsp; k++) {
307 for (
size_t i = 0; i <
m_nrev; i++) {
310 <<
" " << rmu[irxn]/rt << endl;
311 printf(
"%12.6e %12.6e %12.6e %12.6e \n",
323 std::fill(kc, kc +
m_ii, 0.0);
327 for (
size_t i = 0; i <
m_ii; i++) {
328 kc[i] = exp(-kc[i]*rrt);
350 for (
size_t n = 0; n <
nPhases(); n++) {
353 for (
size_t k = 0; k < nsp; k++) {
362 for (
size_t i = 0; i <
m_ii; i++) {
372 for (
size_t n = 0; n <
nPhases(); n++) {
374 for (
size_t k = 0; k < nsp; k++) {
396 #ifdef DEBUG_KIN_MODE
399 for (
size_t i = 0; i <
m_beta.size(); i++) {
407 #ifdef DEBUG_KIN_MODE
409 if (eamod + ea < 0.0) {
410 writelog(
"Warning: act energy mod too large!\n");
411 writelog(
" Delta phi = "+
fp2str(deltaElectricEnergy_[irxn]/Faraday)+
"\n");
414 for (n = 0; n < np; n++) {
421 doublereal rrt = 1.0/rt;
422 kf[irxn] *= exp(-eamod*rrt);
432 doublereal rrt = 1.0/rt;
436 for (
size_t i = 0; i <
m_ctrxn.size(); i++) {
441 if (iECDFormulation) {
452 tmp *= 1.0 / tmp2 / Faraday;
469 tmp *= Faraday * tmp2;
490 if (doIrreversible) {
492 for (
size_t i = 0; i <
m_ii; i++) {
535 for (
size_t jrxn = 0; jrxn !=
m_ii; ++jrxn) {
546 double nStoichElectrons=1;
553 if (nStoichElectrons != 0.0) {
554 OCV =
m_deltaG[jrxn]/Faraday/ nStoichElectrons;
572 for (
size_t j = 0; j !=
m_ii; ++j) {
582 for (
size_t j = 0; j !=
m_ii; ++j) {
584 for (
size_t p = 0; p <
nPhases(); p++) {
590 for (
size_t rp = 0; rp <
nPhases(); rp++) {
609 for (
size_t p = 0; p <
nPhases(); p++) {
615 for (
size_t rp = 0; rp <
nPhases(); rp++) {
646 for (
size_t n = 0; n <
nPhases(); n++) {
653 for (
size_t j = 0; j <
m_ii; ++j) {
665 for (
size_t n = 0; n < np; n++) {
680 for (
size_t n = 0; n <
nPhases(); n++) {
696 for (
size_t n = 0; n <
nPhases(); n++) {
714 for (
size_t n = 0; n <
nPhases(); n++) {
732 for (
size_t n = 0; n <
nPhases(); n++) {
736 for (
size_t k = 0; k <
m_kk; k++) {
753 for (
size_t n = 0; n <
nPhases(); n++) {
757 for (
size_t k = 0; k <
m_kk; k++) {
772 if (r.
cov.size() > 3) {
775 for (
size_t m = 0; m < r.
cov.size(); m++) {
784 if (r.
rateCoeffType == EXCHANGE_CURRENT_REACTION_RATECOEFF_TYPE) {
807 if (r.
rateCoeffType == EXCHANGE_CURRENT_REACTION_RATECOEFF_TYPE) {
838 determineFwdOrdersBV(r, fwdFullorders);
840 ro->
fill(fwdFullorders);
854 "film resistivity set for elementary reaction");
872 for (
size_t ik = 0; ik < r.
reactants.size(); ik++) {
877 for (
size_t ik = 0; ik < r.
products.size(); ik++) {
902 m_E.push_back(rate.activationEnergy_R());
909 if (re->exchange_current_density_formulation) {
932 for (Composition::const_iterator iter = r.
orders.begin();
946 determineFwdOrdersBV(*re, fwdFullorders);
948 ro->
fill(fwdFullorders);
962 "film resistivity set for elementary reaction");
978 for (Composition::const_iterator iter = r.
reactants.begin();
985 for (Composition::const_iterator iter = r.
products.begin();
1003 m_redo_rates =
true;
1015 size_t iInterface =
npos;
1017 for (
size_t n = 0; n <
nPhases(); n++) {
1026 if (sticking_species ==
"") {
1028 bool foundStick =
false;
1029 for (Composition::const_iterator iter = r.
reactants.begin();
1033 if (iPhase != iInterface) {
1037 "Multiple non-interface species found"
1038 "in sticking reaction: '" + r.
equation() +
"'");
1041 sticking_species = iter->first;
1046 "No non-interface species found"
1047 "in sticking reaction: '" + r.
equation() +
"'");
1051 double surface_order = 0.0;
1053 for (Composition::const_iterator iter = r.
reactants.begin();
1060 if (iter->first == sticking_species) {
1071 A_rate *= pow(p.
size(k), order);
1072 surface_order += order;
1086 for (map<string, CoverageDependency>::const_iterator iter = r.
coverage_deps.begin();
1090 rate.addCoverageDependence(k, iter->second.a, iter->second.m, iter->second.E);
1096 void InterfaceKinetics::setIOFlag(
int ioFlag)
1114 for (
size_t n = 0; n <
nPhases(); n++) {
1132 size_t safe_reaction_size = std::max<size_t>(
m_ii, 1);
1136 "no surface phase is present.");
1142 "expected interface dimension = 2, but got dimension = "
1146 m_deltaG0.resize(safe_reaction_size, 0.0);
1147 m_deltaG.resize(safe_reaction_size, 0.0);
1152 throw CanteraError(
"InterfaceKinetics::finalize",
"internal error");
1170 for (
size_t i = 0; i <
m_ctrxn.size(); i++) {
1186 vector<InterfaceKinetics*> k;
1197 int ifuncOverride, doublereal timeScaleOverride)
1201 vector<InterfaceKinetics*> k;
1216 throw CanteraError(
"InterfaceKinetics:setPhaseExistence",
"out of bounds");
1237 throw CanteraError(
"InterfaceKinetics:phaseExistence()",
"out of bounds");
1245 throw CanteraError(
"InterfaceKinetics:phaseStability()",
"out of bounds");
1253 throw CanteraError(
"InterfaceKinetics:setPhaseStability",
"out of bounds");
1262 void InterfaceKinetics::determineFwdOrdersBV(
ReactionData& rdata, std::vector<doublereal>& fwdFullorders)
1269 double betaf = rdata.
beta;
1273 for (
size_t j = 0; j < rdata.
reactants.size(); j++) {
1276 fwdFullorders[kkin] += betaf * oo;
1278 if (abs(fwdFullorders[kkin]) < 0.00001) {
1279 fwdFullorders[kkin] = 0.0;
1285 for (
size_t j = 0; j < rdata.
products.size(); j++) {
1288 fwdFullorders[kkin] -= betaf * oo;
1289 if (abs(fwdFullorders[kkin]) < 0.00001) {
1290 fwdFullorders[kkin] = 0.0;
1295 void InterfaceKinetics::determineFwdOrdersBV(ElectrochemicalReaction& r, std::vector<doublereal>& fwdFullOrders)
1300 for (Composition::const_iterator iter = r.orders.begin();
1301 iter != r.orders.end();
1307 double betaf = r.beta;
1311 for (Composition::const_iterator iter = r.reactants.begin();
1312 iter != r.reactants.end();
1315 fwdFullOrders[k] += betaf * iter->second;
1317 if (abs(fwdFullOrders[k]) < 0.00001) {
1318 fwdFullOrders[k] = 0.0;
1324 for (Composition::const_iterator iter = r.products.begin();
1325 iter != r.products.end();
1328 fwdFullOrders[k] -= betaf * iter->second;
1330 if (abs(fwdFullOrders[k]) < 0.00001) {
1331 fwdFullOrders[k] = 0.0;
1336 void InterfaceKinetics::applyStickingCorrection(
double* kf)
1347 double n0 = surf.siteDensity();
1348 if (!cached.validate(n0)) {
1368 size_t safe_reaction_size = std::max<size_t>(
m_ii, 1);
1372 "no surface phase is present.");
1378 "expected interface dimension = 1, but got dimension = "
1382 m_deltaG0.resize(safe_reaction_size, 0.0);
1383 m_deltaG.resize(safe_reaction_size, 0.0);
1388 throw CanteraError(
"InterfaceKinetics::finalize",
"internal error");
1405 kinSpeciesIDs_(right.kinSpeciesIDs_),
1406 kinSpeciesOrders_(right.kinSpeciesOrders_)
1410 RxnOrders& RxnOrders::operator=(
const RxnOrders& right)
1412 if (
this == &right) {
1425 for (
size_t k = 0; k < fullForwardOrders.size(); ++k) {
1426 if (fullForwardOrders[k] != 0.0) {
virtual void modifyReaction(size_t i, shared_ptr< Reaction > rNew)
Modify the rate expression associated with a reaction.
const std::string & reactionString(size_t i) const
Return a string representing the reaction.
doublereal molecularWeight(size_t k) const
Molecular weight of species k.
std::string sticking_species
For reactions with multiple non-surface species, the sticking species needs to be explicitly identifi...
void applyVoltageKfwdCorrection(doublereal *const kfwd)
Apply modifications for the forward reaction rate for interfacial charge transfer reactions...
StoichManagerN m_revProductStoich
Stoichiometry manager for the products of reversible 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.
std::string int2str(const int n, const std::string &fmt)
Convert an int to a string using a format converter.
vector_fp m_ropr
Reverse rate-of-progress for each reaction.
std::vector< thermo_t * > m_thermo
m_thermo is a vector of pointers to ThermoPhase objects that are involved with this kinetics operator...
doublereal electricPotential() const
Returns the electric potential of this phase (V).
bool is_sticking_coefficient
Set to true if rate is a parameterization of the sticking coefficient rather than the forward rate co...
int getId()
Get a unique id for a cached value.
int reaction_type
Type of the reaction.
virtual bool ready() const
Returns true if the kinetics manager has been properly initialized and finalized. ...
Header for a simple thermodynamics model of a surface phase derived from ThermoPhase, assuming an ideal solution model (see Thermodynamic Properties and class SurfPhase).
doublereal m_logtemp
Current log of the temperature.
virtual void getDeltaEnthalpy(doublereal *deltaH)
Return the vector of values for the reactions change in enthalpy.
int reactionType
Type of the reaction.
virtual void assignShallowPointers(const std::vector< thermo_t * > &tpVector)
Reassign the pointers within the Kinetics object.
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...
virtual void getEnthalpy_RT(doublereal *hrt) const
Get the nondimensional Enthalpy functions for the species at their standard states at the current T a...
thermo_t & thermo(size_t n=0)
This method returns a reference to the nth ThermoPhase object defined in this kinetics mechanism...
vector_fp forwardFullOrder_
Reaction order for the forward direction of the reaction.
void setElectricPotential(doublereal v)
Set the electric potential of this phase (V).
void solvePseudoSteadyStateProblem(int ifuncOverride=-1, doublereal timeScaleOverride=1.0)
Solve for the pseudo steady-state of the surface problem.
size_t m_kk
The number of species in all of the phases that participate 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.
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...
const size_t npos
index returned by functions to indicate "no position"
vector_fp m_phi
Vector of phase electric potentials.
void advanceCoverages(doublereal tstep)
Advance the surface coverages in time.
vector_fp cov
Adjustments to the Arrhenius rate expression dependent on surface species coverages.
doublereal beta
Forward value of the apparent Electrochemical transfer coefficient.
vector_fp pstoich
Product stoichiometric coefficients, in the order given by products.
vector_fp m_deltaG
Vector of deltaG[] of reaction, the delta Gibbs free energies for each reaction.
const int SURFACEAFFINITY_RXN
This is a surface reaction that is formulated using the affinity representation, common in the geoche...
Composition orders
Forward reaction order with respect to specific species.
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.
doublereal size(size_t k) const
This routine returns the size of species k.
virtual void getDeltaSSEntropy(doublereal *deltaS)
Return the vector of values for the change in the standard state entropies for each reaction...
size_t nTotalSpecies() const
The total number of species in all phases participating in the kinetics mechanism.
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.
doublereal activationEnergy_R() const
Return the activation energy divided by the gas constant (i.e.
virtual void getStandardChemPotentials(doublereal *mu) const
Get the array of chemical potentials at unit activity for the species at their standard states at the...
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 rev...
vector_fp m_ropnet
Net rate-of-progress for each reaction.
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
size_t reactionPhaseIndex()
Phase where the reactions occur.
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.
void getConcentrations(doublereal *const c) const
Get the species concentrations (kmol/m^3).
bool m_has_electrochem_rxns
Boolean flag indicating whether any reaction in the mechanism has a beta electrochemical parameter...
void getCoverages(doublereal *theta) const
Return a vector of surface coverages.
void multiply_each(OutputIter x_begin, OutputIter x_end, InputIter y_begin)
Multiply each entry in x by the corresponding entry in y.
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 rateCoeffParameters
Vector of rate coefficient parameters.
vector_fp m_mu0_Kc
Vector of standard state electrochemical potentials modified by a standard concentration term...
virtual doublereal standardConcentration(size_t k=0) const
Return the standard concentration for the kth species.
vector_fp deltaElectricEnergy_
Storage for the net electric energy change due to reaction.
vector_fp m_ropf
Forward rate-of-progress for each 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< size_t > products
Indices of product species.
doublereal m_temp
Current temperature of the data.
std::map< std::string, CoverageDependency > coverage_deps
Adjustments to the Arrhenius rate expression dependent on surface species coverages.
A simple thermodynamic model for a surface phase, assuming an ideal solution model.
size_t speciesIndex(const std::string &name) const
Returns the index of a species named 'name' within the Phase object.
size_t surfacePhaseIndex()
This returns the integer index of the phase which has ThermoPhase type cSurf.
bool m_has_coverage_dependence
Boolean flag indicating whether any reaction in the mechanism has a coverage dependent forward reacti...
ValueCache m_cache
Cache for saved calculations within each Kinetics object.
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...
bool reversible
True if the current reaction is reversible. False otherwise.
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.
size_t nPhases() const
The number of phases participating in the reaction mechanism.
A kinetics manager for heterogeneous reaction mechanisms.
doublereal filmResistivity
Film Resistivity value.
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.
std::string fp2str(const double x, const std::string &fmt)
Convert a double into a c++ string.
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::map< size_t, doublereal > > m_prxn
m_prxn is a vector of maps, containing the reactant stoichiometric coefficient information ...
vector_fp m_rfn
Forward rate constant for each reaction.
virtual void getChemPotentials(doublereal *mu) const
Get the species chemical potentials. Units: J/kmol.
StoichManagerN m_reactantStoich
Stoichiometry manager for the reactants for each reaction.
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.
vector_fp m_perturb
Vector of perturbation factors for each reaction's rate of progress vector.
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.
virtual void getPartialMolarEntropies(doublereal *sbar) const
Returns an array of partial molar entropies of the species in the solution.
double temperatureExponent() const
Return the temperature exponent b
Base class for exceptions thrown by Cantera classes.
Composition reactants
Reactant species and stoichiometric coefficients.
bool m_has_exchange_current_density_formulation
Boolean flag indicating whether any reaction in the mechanism is described by an exchange current den...
const U & getValue(const std::map< T, U > &m, const T &key)
Const accessor for a value in a std::map.
double preExponentialFactor() const
Return the pre-exponential factor A (in m, kmol, s to powers depending on the reaction order) ...
std::vector< std::map< size_t, doublereal > > m_rrxn
m_rrxn is a vector of maps, containing the reactant stoichiometric coefficient information ...
Declarations for the implicit integration of surface site density equations (see Kinetics Managers an...
std::vector< std::vector< bool > > m_rxnPhaseIsReactant
Vector of vector of booleans indicating whether a phase participates in a reaction as a reactant...
Kinetics & operator=(const Kinetics &right)
Assignment operator.
virtual void modifyReaction(size_t i, shared_ptr< Reaction > rNew)
Modify the rate expression associated with a reaction.
size_t kineticsSpeciesIndex(size_t k, size_t n) const
The location of species k of phase n in species arrays.
std::vector< size_t > m_revindex
List of reactions numbers which are reversible reactions.
vector_fp m_rkcn
Reciprocal of the equilibrium constant in concentration units.
std::vector< size_t > reactants
Indices of reactant species.
vector_fp rstoich
Reactant stoichiometric coefficients, in the order given by reactants.
virtual void getRevRateConstants(doublereal *krev, bool doIrreversible=false)
Return the reverse rate constants.
size_t nSpecies() const
Returns the number of species in the phase.
const int GLOBAL_RXN
A global reaction.
bool reversible
True if the current reaction is reversible. False otherwise.
int rateCoeffType
Type of the rate coefficient for the forward rate constant.
void _update_rates_phi()
Update properties that depend on the electric potential.
doublereal film_resistivity
Film Resistivity value.
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.
virtual void getEntropy_R(doublereal *sr) const
Get the array of nondimensional Entropy functions for the standard state species at the current T and...
doublereal temperature() const
Temperature (K).
size_t nDim() const
Returns the number of spatial dimensions (1, 2, or 3)
InterfaceKinetics(thermo_t *thermo=0)
Constructor.
virtual Kinetics * duplMyselfAsKinetics(const std::vector< thermo_t * > &tpVector) const
Duplication routine for objects which inherit from Kinetics.
virtual void getActivityConcentrations(doublereal *c) const
This method returns an array of generalized concentrations.
std::string equation() const
The chemical equation for this reaction.
virtual void initialize(doublereal t0=0.0)
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.
size_t speciesPhaseIndex(size_t k)
This function takes as an argument the kineticsSpecies index (i.e., the list index in the list of spe...
doublereal beta
Forward value of the apparent Electrochemical transfer coefficient.
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.
const doublereal GasConstant
Universal Gas Constant. [J/kmol/K].
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...
size_t nReactions() const
Number of reactions in the reaction mechanism.
vector_fp m_ProdStanConcReac
Vector of the products of the standard concentrations of the reactants.
#define DATA_PTR(vec)
Creates a pointer to the start of the raw data for a vector.
const int BUTLERVOLMER_NOACTIVITYCOEFFS_RXN
This is a surface reaction that is formulated using the Butler-Volmer formulation and using concentra...
void setPhaseExistence(const size_t iphase, const int exists)
Set the existence of a phase in the reaction object.
virtual void getPartialMolarEnthalpies(doublereal *hbar) const
Returns an array of partial molar enthalpies for the species in the mixture.
virtual doublereal logStandardConc(size_t k=0) const
Natural logarithm of the standard concentration of the kth species.
CachedArray getArray(int id)
Get a reference to a CachedValue object representing an array (vector_fp) with the given id...
const int BUTLERVOLMER_RXN
This is a surface reaction that is formulated using the Butler-Volmer formulation.
void writelog(const std::string &msg)
Write a message to the screen.
Composition products
Product species and stoichiometric coefficients.
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.
virtual int reactionType(size_t i) const
Flag specifying the type of reaction.
virtual void finalize()
Finish adding reactions and prepare for use.
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 addPhase(thermo_t &thermo)
Add a phase to the kinetics manager object.
virtual void getDeltaSSEnthalpy(doublereal *deltaH)
Return the vector of values for the change in the standard state enthalpies of reaction.
void getElectrochemPotentials(doublereal *mu) const
Get the species electrochemical potentials.
ImplicitSurfChem * m_integrator
Pointer to the Implicit surface chemistry object.
An Arrhenius rate with coverage-dependent terms.
virtual void getReactionDelta(const doublereal *property, doublereal *deltaProperty)
Change in species properties.
An interface reaction which involves charged species.
void integrate(doublereal t0, doublereal t1)
Integrate from t0 to t1. The integrator is reinitialized first.
InterfaceKinetics & operator=(const InterfaceKinetics &right)
Assignment operator.
virtual void addReaction(ReactionData &r)
Add a single reaction to the mechanism.
bool m_finalized
Boolean indicating whether mechanism has been finalized.
virtual void finalize()
Finish adding reactions and prepare for use.
int fill(const vector_fp &fullForwardOrders)
Fill in the structure with the array.
doublereal charge(size_t k) const
Dimensionless electrical charge of a single molecule of species k The charge is normalized by the the...
std::vector< RxnOrders * > m_ctrxn_FwdOrdersList_
Reaction Orders for the case where the forwards rate of progress is being calculated.