diff --git a/include/cantera/kinetics/InterfaceKinetics.h b/include/cantera/kinetics/InterfaceKinetics.h index 9829c2725..98b57cc23 100644 --- a/include/cantera/kinetics/InterfaceKinetics.h +++ b/include/cantera/kinetics/InterfaceKinetics.h @@ -103,7 +103,9 @@ public: virtual void getEquilibriumConstants(doublereal* kc); - void getExchangeCurrentQuantities(); + /** values needed to convert from exchange current density to surface reaction rate. + */ + void updateExchangeCurrentQuantities(); virtual void getDeltaGibbs(doublereal* deltaG); @@ -305,8 +307,15 @@ public: void applyButlerVolmerCorrection(doublereal* const kf); //! When an electrode reaction rate is optionally specified in terms of its - //! exchange current density, extra vectors need to be precalculated - void applyExchangeCurrentDensityFormulation(doublereal* const kfwd); + //! exchange current density, adjust to standard reaction rate form. + /** + * For a reaction rate that was given in units of Amps/m2 (exchange current + * density formulation with iECDFormulation == true), convert the rate to + * kmoles/m2/s. + * RENAMED THIS METHOD from "apply" to "convert" + */ + + void convertExchangeCurrentDensityFormulation(doublereal* const kfwd); //! Set the existence of a phase in the reaction object /*! diff --git a/src/kinetics/InterfaceKinetics.cpp b/src/kinetics/InterfaceKinetics.cpp index 7e832e6e0..cbd668d06 100644 --- a/src/kinetics/InterfaceKinetics.cpp +++ b/src/kinetics/InterfaceKinetics.cpp @@ -184,7 +184,7 @@ void InterfaceKinetics::_update_rates_T() m_logtemp = log(T); m_rates.update(T, m_logtemp, DATA_PTR(m_rfn)); if (m_has_exchange_current_density_formulation) { - applyExchangeCurrentDensityFormulation(DATA_PTR(m_rfn)); + convertExchangeCurrentDensityFormulation(DATA_PTR(m_rfn)); } if (m_has_electrochem_rxns) { applyButlerVolmerCorrection(DATA_PTR(m_rfn)); @@ -348,7 +348,9 @@ void InterfaceKinetics::getEquilibriumConstants(doublereal* kc) } } -void InterfaceKinetics::getExchangeCurrentQuantities() +/** values needed to convert from exchange current density to surface reaction rate. + */ +void InterfaceKinetics::updateExchangeCurrentQuantities() { /* * First collect vectors of the standard Gibbs free energies of the @@ -451,9 +453,15 @@ void InterfaceKinetics::applyButlerVolmerCorrection(doublereal* const kf) } } -void InterfaceKinetics::applyExchangeCurrentDensityFormulation(doublereal* const kfwd) +/** + * For a reaction rate that was given in units of Amps/m2 (exchange current + * density formulation with iECDFormulation == true), convert the rate to + * kmoles/m2/s. + * RENAMED THIS METHOD from "apply" to "convert" + */ +void InterfaceKinetics::convertExchangeCurrentDensityFormulation(doublereal* const kfwd) { - getExchangeCurrentQuantities(); + updateExchangeCurrentQuantities(); doublereal rt = GasConstant*thermo(0).temperature(); doublereal rrt = 1.0/rt; for (size_t i = 0; i < m_ctrxn.size(); i++) { @@ -496,7 +504,9 @@ void InterfaceKinetics::getRevRateConstants(doublereal* krev, bool doIrreversibl void InterfaceKinetics::updateROP() { + // evaluate rate and equilibrium constants at temperature and phi (electric potential) _update_rates_T(); + // get updated activities (rates updated below) _update_rates_C(); if (m_ROP_ok) { diff --git a/src/transport/TortuosityMaxwell.h b/src/transport/TortuosityMaxwell.h index 5fd0b78ed..5966635c7 100644 --- a/src/transport/TortuosityMaxwell.h +++ b/src/transport/TortuosityMaxwell.h @@ -97,7 +97,7 @@ protected: /*! * * \f[ - * \code{relativeConductivites_} = \kappa_d / \kappa_0 + * \mathtt{relativeConductivites\_} = \kappa_d / \kappa_0 * \f] */ doublereal relativeConductivities_;