In InterfaceKinetics added some comments and clarified function names.
Formerly getExchangeCurrentQuantities() is now updateExchangeCurrentQuantities(). This method updates things like m_StandardConc for computing reaction rates. Formerly applyExchangeCurrentDensityFormulation() is now convertExchangeCurrentDensityFormulation(). This method converts rate expressions from A/m2 to kmol/m2/s.
This commit is contained in:
parent
f1863b103a
commit
b84f19c439
3 changed files with 27 additions and 8 deletions
|
|
@ -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
|
||||
/*!
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ protected:
|
|||
/*!
|
||||
*
|
||||
* \f[
|
||||
* \code{relativeConductivites_} = \kappa_d / \kappa_0
|
||||
* \mathtt{relativeConductivites\_} = \kappa_d / \kappa_0
|
||||
* \f]
|
||||
*/
|
||||
doublereal relativeConductivities_;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue