Cantera 2.6.0

Public Member Functions | Protected Attributes | Private Attributes | List of all members
InterfaceRateBase Class Reference

Base class for rate parameterizations that involve interfaces. More...

`#include <InterfaceRate.h>`

Inheritance diagram for InterfaceRateBase:
[legend]

## Public Member Functions
void | setParameters (const AnyMap &node)
| Perform object setup based on AnyMap node information. More...
void | getParameters (AnyMap &node) const
| Store parameters needed to reconstruct an identical object. More...
void | setCoverageDependencies (const AnyMap &dependencies, const UnitSystem &units=UnitSystem())
| Set coverage dependencies based on AnyMap node information. More...
void | getCoverageDependencies (AnyMap &dependencies, bool asVector=false) const
| Store parameters needed to reconstruct coverage dependencies. More...
void | addCoverageDependence (const std::string &sp, double a, double m, double e)
| Add a coverage dependency for species sp, with exponential dependence a, power-law exponent m, and activation energy dependence e, where e is in Kelvin, that is, energy divided by the molar gas constant. More...
bool | exchangeCurrentDensityFormulation ()
| Boolean indicating whether rate uses exchange current density formulation. More...
void | setContext (const Reaction &rxn, const Kinetics &kin)
| Build rate-specific parameters based on Reaction and Kinetics context. More...
void | setSpecies (const std::vector< std::string > &species)
| Set association with an ordered list of all species associated with a given `Kinetics` object. More...
void | updateFromStruct (const InterfaceData &shared_data)
| Update reaction rate parameters. More...
double | voltageCorrection () const
| Calculate modifications for the forward reaction rate for interfacial charge transfer reactions. More...
bool | usesElectrochemistry ()
| Boolean indicating whether rate uses electrochemistry. More...
double | beta () const
| Return the charge transfer beta parameter. More...
double | siteDensity () const
| Return site density [kmol/m^2]. More...
void | setSiteDensity (double siteDensity)
| Set site density [kmol/m^2]. More...

## Protected Attributes
double | m_siteDensity
| Site density [kmol/m^2]. More...
double | m_acov
| Coverage contribution to pre-exponential factor. More...
double | m_ecov
| Coverage contribution to activation energy. More...
double | m_mcov
| Coverage term in reaction rate. More...
bool | m_chargeTransfer
| Boolean indicating use of electrochemistry. More...
bool | m_exchangeCurrentDensityFormulation
double | m_beta
| Electrochemistry only. More...
double | m_deltaPotential_RT
| Normalized electric potential energy change. More...
double | m_deltaGibbs0_RT
| Normalized standard state Gibbs free energy change. More...
double | m_prodStandardConcentrations
| Products of standard concentrations. More...
std::map< size_t, size_t > | m_indices
| Map holding indices of coverage species. More...
std::vector< std::string > | m_cov
| Vector holding names of coverage species. More...
vector_fp | m_ac
| Vector holding coverage-specific exponential dependence. More...
vector_fp | m_ec
| Vector holding coverage-specific activation energy dependence. More...
vector_fp | m_mc
| Vector holding coverage-specific power-law exponents. More...

## Private Attributes
std::vector< std::pair< size_t, double > > | m_stoichCoeffs
| Pairs of species index and multiplers to calculate enthalpy change. More...
std::vector< std::pair< size_t, double > > | m_netCharges
| Pairs of phase index and net electric charges (same order as m_stoichCoeffs) More...

## Detailed Description

Base class for rate parameterizations that involve interfaces.

Rate expressions defined for interfaces may include coverage dependent terms, where an example is given by [Kee, R. J., Coltrin, M. E., & Glarborg, P.(2003). Chemically reacting flow: theory and practice. John Wiley & Sons. Eq 11.113]. Using Cantera nomenclature, this expression can be rewritten as

\[ k_f = A T^b \exp \left( - \frac{E_a}{RT} \right) \prod_k 10^{a_k \theta_k} \theta_k^{m_k} \exp \left( \frac{- E_k \theta_k}{RT} \right) \]

It is evident that this expression combines a regular modified Arrhenius rate expression \( A T^b \exp \left( - \frac{E_a}{RT} \right) \) with coverage-related terms, where the parameters \( (a_k, E_k, m_k) \) describe the dependency on the surface coverage of species \( k, \theta_k \). The InterfaceRateBase class implements terms related to coverage only, which allows for combinations with arbitrary rate parameterizations (for example Arrhenius and BlowersMaselRate).

Definition at line 91 of file InterfaceRate.h.

## Constructor & Destructor Documentation

## ◆ InterfaceRateBase()

InterfaceRateBase | ( |  | ) |

Definition at line 97 of file InterfaceRate.cpp.

## Member Function Documentation

## ◆ setParameters()

void setParameters | ( | const AnyMap & | node | ) |

Perform object setup based on AnyMap node information.

Parameters

  node | AnyMap object containing reaction rate specification

Definition at line 111 of file InterfaceRate.cpp.

References AnyMap::getBool(), AnyMap::hasKey(), InterfaceRateBase::m_beta, InterfaceRateBase::setCoverageDependencies(), and AnyMap::units().

## ◆ getParameters()

void getParameters | ( | AnyMap & | node | ) | const

Store parameters needed to reconstruct an identical object.

Parameters

  node | AnyMap object receiving reaction rate specification

Definition at line 124 of file InterfaceRate.cpp.

References InterfaceRateBase::getCoverageDependencies(), InterfaceRateBase::m_beta, InterfaceRateBase::m_chargeTransfer, and InterfaceRateBase::m_cov.

## ◆ setCoverageDependencies()

void setCoverageDependencies | ( | const AnyMap & | dependencies,
|  | const UnitSystem & | units = `UnitSystem()`
| ) |  |

Set coverage dependencies based on AnyMap node information.

Parameters

  dependencies | Coverage dependencies
  units | Unit system

Definition at line 141 of file InterfaceRate.cpp.

References InterfaceRateBase::m_ac, InterfaceRateBase::m_cov, InterfaceRateBase::m_ec, and InterfaceRateBase::m_mc.

Referenced by InterfaceRateBase::setParameters().

## ◆ getCoverageDependencies()

void getCoverageDependencies | ( | AnyMap & | dependencies,
|  | bool | asVector = `false`
| ) |  | const

Store parameters needed to reconstruct coverage dependencies.

Parameters

  dependencies | AnyMap receiving coverage information
  asVector | Optional boolean flag to override map output

Todo:
  Remove vector version (which currently only serves testing purposes)

Definition at line 165 of file InterfaceRate.cpp.

References InterfaceRateBase::m_ac, InterfaceRateBase::m_cov, InterfaceRateBase::m_ec, and InterfaceRateBase::m_mc.

Referenced by InterfaceRateBase::getParameters().

## ◆ addCoverageDependence()

void addCoverageDependence | ( | const std::string & | sp,
|  | double | a,
|  | double | m,
|  | double | e
| ) |  |

Add a coverage dependency for species sp, with exponential dependence a, power-law exponent m, and activation energy dependence e, where e is in Kelvin, that is, energy divided by the molar gas constant.

Definition at line 186 of file InterfaceRate.cpp.

References InterfaceRateBase::m_ac, InterfaceRateBase::m_cov, InterfaceRateBase::m_ec, InterfaceRateBase::m_indices, and InterfaceRateBase::m_mc.

## ◆ exchangeCurrentDensityFormulation()

bool exchangeCurrentDensityFormulation | ( |  | ) |
| inline

Boolean indicating whether rate uses exchange current density formulation.

Definition at line 122 of file InterfaceRate.h.

## ◆ setContext()

void setContext | ( | const Reaction & | rxn,
|  | const Kinetics & | kin
| ) |  |

Build rate-specific parameters based on Reaction and Kinetics context.

Parameters

  rxn | Reaction associated with rate parameterization
  kin | Kinetics object associated with rate parameterization

Definition at line 262 of file InterfaceRate.cpp.

References Phase::charge(), Cantera::Faraday, Kinetics::kineticsSpeciesIndex(), InterfaceRateBase::m_chargeTransfer, InterfaceRateBase::m_netCharges, InterfaceRateBase::m_stoichCoeffs, Reaction::products, Reaction::reactants, InterfaceRateBase::setSpecies(), Phase::speciesNames(), Kinetics::speciesPhaseIndex(), Kinetics::thermo(), and Reaction::usesElectrochemistry().

## ◆ setSpecies()

void setSpecies | ( | const std::vector< std::string > & | species | ) |

Set association with an ordered list of all species associated with a given `Kinetics` object.

Definition at line 201 of file InterfaceRate.cpp.

References InterfaceRateBase::m_cov, and InterfaceRateBase::m_indices.

Referenced by InterfaceRateBase::setContext().

## ◆ updateFromStruct()

void updateFromStruct | ( | const InterfaceData & | shared_data | ) |

Update reaction rate parameters.

Parameters

  shared_data | data shared by all reactions of a given type

Definition at line 215 of file InterfaceRate.cpp.

References InterfaceData::coverages, BlowersMaselData::density, InterfaceData::electricPotentials, Cantera::GasConstant, InterfaceData::logCoverages, InterfaceRateBase::m_ac, InterfaceRateBase::m_acov, InterfaceRateBase::m_chargeTransfer, InterfaceRateBase::m_cov, InterfaceRateBase::m_deltaGibbs0_RT, InterfaceRateBase::m_deltaPotential_RT, InterfaceRateBase::m_ec, InterfaceRateBase::m_ecov, InterfaceRateBase::m_indices, InterfaceRateBase::m_mc, InterfaceRateBase::m_mcov, InterfaceRateBase::m_netCharges, InterfaceRateBase::m_prodStandardConcentrations, InterfaceRateBase::m_siteDensity, InterfaceRateBase::m_stoichCoeffs, BlowersMaselData::ready, InterfaceData::standardChemPotentials, InterfaceData::standardConcentrations, and ReactionData::temperature.

Referenced by InterfaceRate< RateType, DataType >::updateFromStruct(), and StickingRate< RateType, DataType >::updateFromStruct().

## ◆ voltageCorrection()

double voltageCorrection | ( |  | ) | const
| inline

Calculate modifications for the forward reaction rate for interfacial charge transfer reactions.

For reactions that transfer charge across a potential difference, the activation energies are modified by the potential difference. The correction factor is based on the net electric potential energy change

\[ \Delta E_{p,j} = \sum_i E_{p,i} \nu_{i,j} \]

where potential energies are calculated as \( E_{p,i} = F \phi_i z_i \). Here, \( F \) is Faraday's constant, \( \phi_i \) is the electric potential of the species phase and \( z_i \) is the charge of the species.

When an electrode reaction rate is specified in terms of its exchange current density, the correction factor is adjusted to the standard reaction rate constant form and units. Specifically, this converts a reaction rate constant that was specified in units of A/m2 to kmol/m2/s.

Warning
  The updated calculation of voltage corrections is an experimental part of the Cantera API and may be changed or removed without notice.

Definition at line 160 of file InterfaceRate.h.

References Cantera::Faraday, InterfaceRateBase::m_beta, InterfaceRateBase::m_deltaGibbs0_RT, InterfaceRateBase::m_deltaPotential_RT, and InterfaceRateBase::m_prodStandardConcentrations.

Referenced by InterfaceRate< RateType, DataType >::evalFromStruct(), and StickingRate< RateType, DataType >::evalFromStruct().

## ◆ usesElectrochemistry()

bool usesElectrochemistry | ( |  | ) |
| inline

Boolean indicating whether rate uses electrochemistry.

If this is true, the Butler-Volmer correction

\[ f_{BV} = \exp ( - \beta * Delta E_{p,j} / R T ) \]

is applied to the forward reaction rate,

See also
  voltageCorrection.

Definition at line 193 of file InterfaceRate.h.

References InterfaceRateBase::m_chargeTransfer.

## ◆ beta()

double beta | ( |  | ) | const
| inline

Return the charge transfer beta parameter.

Definition at line 198 of file InterfaceRate.h.

References InterfaceRateBase::m_beta, and InterfaceRateBase::m_chargeTransfer.

## ◆ siteDensity()

double siteDensity | ( |  | ) | const
| inline

Return site density [kmol/m^2].

Warning
  This method is an experimental part of the Cantera API and may be changed or removed without notice.

Definition at line 210 of file InterfaceRate.h.

References InterfaceRateBase::m_siteDensity.

Referenced by InterfaceRateBase::setSiteDensity().

## ◆ setSiteDensity()

void setSiteDensity | ( | double | siteDensity | ) |
| inline

Set site density [kmol/m^2].

This method is used for testing purposes only as the site density is a property of InterfaceKinetics and will be overwritten during an update of the thermodynamic state.

Warning
  This method is an experimental part of the Cantera API and may be changed or removed without notice.

Definition at line 223 of file InterfaceRate.h.

References InterfaceRateBase::m_siteDensity, and InterfaceRateBase::siteDensity().

## Member Data Documentation

## ◆ m_siteDensity

double m_siteDensity
| protected

Site density [kmol/m^2].

Definition at line 228 of file InterfaceRate.h.

Referenced by StickingCoverage::setContext(), InterfaceRateBase::setSiteDensity(), InterfaceRateBase::siteDensity(), StickingRate< RateType, DataType >::updateFromStruct(), and InterfaceRateBase::updateFromStruct().

## ◆ m_acov

double m_acov
| protected

Coverage contribution to pre-exponential factor.

Definition at line 229 of file InterfaceRate.h.

Referenced by InterfaceRate< RateType, DataType >::evalFromStruct(), StickingRate< RateType, DataType >::evalFromStruct(), and InterfaceRateBase::updateFromStruct().

## ◆ m_ecov

double m_ecov
| protected

Coverage contribution to activation energy.

Definition at line 230 of file InterfaceRate.h.

Referenced by InterfaceRate< RateType, DataType >::evalFromStruct(), StickingRate< RateType, DataType >::evalFromStruct(), and InterfaceRateBase::updateFromStruct().

## ◆ m_mcov

double m_mcov
| protected

Coverage term in reaction rate.

Definition at line 231 of file InterfaceRate.h.

Referenced by InterfaceRate< RateType, DataType >::evalFromStruct(), StickingRate< RateType, DataType >::evalFromStruct(), and InterfaceRateBase::updateFromStruct().

## ◆ m_chargeTransfer

bool m_chargeTransfer
| protected

Boolean indicating use of electrochemistry.

Definition at line 232 of file InterfaceRate.h.

Referenced by InterfaceRateBase::beta(), InterfaceRate< RateType, DataType >::evalFromStruct(), StickingRate< RateType, DataType >::evalFromStruct(), InterfaceRateBase::getParameters(), InterfaceRateBase::setContext(), InterfaceRateBase::updateFromStruct(), and InterfaceRateBase::usesElectrochemistry().

## ◆ m_exchangeCurrentDensityFormulation

bool m_exchangeCurrentDensityFormulation
| protected

Definition at line 233 of file InterfaceRate.h.

## ◆ m_beta

double m_beta
| protected

Electrochemistry only.

Forward value of apparent electrochemical transfer coefficient

Definition at line 234 of file InterfaceRate.h.

Referenced by InterfaceRateBase::beta(), InterfaceRateBase::getParameters(), InterfaceRateBase::setParameters(), and InterfaceRateBase::voltageCorrection().

## ◆ m_deltaPotential_RT

double m_deltaPotential_RT
| protected

Normalized electric potential energy change.

Definition at line 235 of file InterfaceRate.h.

Referenced by InterfaceRateBase::updateFromStruct(), and InterfaceRateBase::voltageCorrection().

## ◆ m_deltaGibbs0_RT

double m_deltaGibbs0_RT
| protected

Normalized standard state Gibbs free energy change.

Definition at line 236 of file InterfaceRate.h.

Referenced by InterfaceRateBase::updateFromStruct(), and InterfaceRateBase::voltageCorrection().

## ◆ m_prodStandardConcentrations

double m_prodStandardConcentrations
| protected

Products of standard concentrations.

Definition at line 237 of file InterfaceRate.h.

Referenced by InterfaceRateBase::updateFromStruct(), and InterfaceRateBase::voltageCorrection().

## ◆ m_indices

std::map<size_t, size_t> m_indices
| protected

Map holding indices of coverage species.

Definition at line 238 of file InterfaceRate.h.

Referenced by InterfaceRateBase::addCoverageDependence(), InterfaceRateBase::setSpecies(), and InterfaceRateBase::updateFromStruct().

## ◆ m_cov

std::vector<std::string> m_cov
| protected

Vector holding names of coverage species.

Definition at line 239 of file InterfaceRate.h.

Referenced by InterfaceRateBase::addCoverageDependence(), InterfaceRateBase::getCoverageDependencies(), InterfaceRateBase::getParameters(), InterfaceRateBase::setCoverageDependencies(), InterfaceRateBase::setSpecies(), and InterfaceRateBase::updateFromStruct().

## ◆ m_ac

vector_fp m_ac
| protected

Vector holding coverage-specific exponential dependence.

Definition at line 240 of file InterfaceRate.h.

Referenced by InterfaceRateBase::addCoverageDependence(), InterfaceRateBase::getCoverageDependencies(), InterfaceRateBase::setCoverageDependencies(), and InterfaceRateBase::updateFromStruct().

## ◆ m_ec

vector_fp m_ec
| protected

Vector holding coverage-specific activation energy dependence.

Definition at line 241 of file InterfaceRate.h.

Referenced by InterfaceRateBase::addCoverageDependence(), InterfaceRateBase::getCoverageDependencies(), InterfaceRateBase::setCoverageDependencies(), and InterfaceRateBase::updateFromStruct().

## ◆ m_mc

vector_fp m_mc
| protected

Vector holding coverage-specific power-law exponents.

Definition at line 242 of file InterfaceRate.h.

Referenced by InterfaceRateBase::addCoverageDependence(), InterfaceRateBase::getCoverageDependencies(), InterfaceRateBase::setCoverageDependencies(), and InterfaceRateBase::updateFromStruct().

## ◆ m_stoichCoeffs

std::vector<std::pair<size_t, double> > m_stoichCoeffs
| private

Pairs of species index and multiplers to calculate enthalpy change.

Definition at line 246 of file InterfaceRate.h.

Referenced by InterfaceRateBase::setContext(), and InterfaceRateBase::updateFromStruct().

## ◆ m_netCharges

std::vector<std::pair<size_t, double> > m_netCharges
| private

Pairs of phase index and net electric charges (same order as m_stoichCoeffs)

Definition at line 249 of file InterfaceRate.h.

Referenced by InterfaceRateBase::setContext(), and InterfaceRateBase::updateFromStruct().

The documentation for this class was generated from the following files:

- InterfaceRate.h
- InterfaceRate.cpp