ElectrochemicalKinetics.AsymptoticMarcusHushChidseyType
AsymptoticMarcusHushChidsey(A, λ)
AsymptoticMarcusHushChidsey(λ)

Computes asymptotic solution to MHC model, as described in Zeng et al.: 10.1016/j.jelechem.2014.09.038d, with a corrction prefactor of kT since there is an error in the nondimensionalization in that work.

If initialized with one argument, assumes this to be the reorganization energy λ and sets the prefactor to 1.0.

ElectrochemicalKinetics.ButlerVolmerType
ButlerVolmer(A, α)
ButlerVolmer(A)

Computes Butler-Volmer kinetics.

If initialized with one argument, assumes symmetric electron transfer (α=0.5) and sets this to be the prefactor A. Note that this prefactor implicitly contains information about equilibrium activation energies, as well as geometric information.

ElectrochemicalKinetics.IntegralModelType
IntegralModel

Abstract base class for "Marcus-like" kinetic models that require computation of an energy integral. All subtypes need to dispatch the rate_constant function directly, or dispatch the integrand function and use the default rate_constant dispatch.

ElectrochemicalKinetics.MarcusType
Marcus(A, λ)
Marcus(λ)

Computes Marcus kinetics.

If initialized with one argument, assumes this to be the reorganization energy λ and sets the prefactor A to 1.0.

ElectrochemicalKinetics.MarcusHushChidseyType
MarcusHushChidsey(A, λ, average_dos)
MarcusHushChidsey(λ, average_dos)
MarcusHushChidsey(λ)

Computes Marcus-Hush-Chidsey kinetics: 10.1126/science.251.4996.919

Note that for "typical" reorganization energy values (in the vicinity of 10*kT at typical temperatures, i.e. a few tenths of an eV), AsymptoticMarcusHushChidsey is comparably accurate to and much faster to evaluate than this model.

If either the prefactor or the average dos are omitted, their values are assumed to be 1. Note that strictly speaking, average_dos and the prefactor A are redundant. They are both included primarily to facilitate comparisons with similarly parametrized Marcus-like models such as MarcusHushChidseyDOS.

ElectrochemicalKinetics.MarcusHushChidseyDOSType
MarcusHushChidseyDOS(A=1.0, λ, dos)
MarcusHushChidseyDOS(A=1.0, λ, dos_file)

Computes Marcus-Hush-Chidsey + DOS kinetics as described in Kurchin and Viswanathan: 10.1063/5.0023611

NB: At the moment, this will allow for vector A and λ parameters, but will presume that all models correspond to the same DOS.

ElectrochemicalKinetics.NonIntegralModelType
NonIntegralModel

Abstract base class for kinetic models whose rates can be computed directly from an input voltage without requiring an energy integral. All subtypes must dispatch the rate_constant function.

ElectrochemicalKinetics.fermi_diracMethod
fermi_dirac(E, T=298)

Compute the value of the Fermi-Dirac distribution at energy E (relative to the Fermi energy) and temperature T.

ElectrochemicalKinetics.fit_modelMethod
fit_model(exp_data, model_type; kwargs...)

Arguments

  • exp_data::Matrix: two columns, first with voltage values, second with current
  • model_type::Type{<:KineticModel}

Keyword Arguments

Requirements differ by model type...

  • ButlerVolmer, AsymptoticMarcusHushChidsey, Marcus: none
  • MarcusHushChidsey: averagedos OR dos::DOSData OR dosfile::String
  • MarcusHushChidseyDOS: dos::DOSData OR dos_file

Some are always options...

  • param_bounds::Dict{Symbol,Any}: ranges of guesses for relevant model parameters. (must include all necessary keys, but defaults to some sensible ranges if not provided, see default_param_bounds...note that you should provide this for faster fitting if you know bounds)
  • Emin and Emax for integral models...defaults to +/- 100kT or in case of MarcusHushChidseyDOS, to energy bounds on DOS data
ElectrochemicalKinetics.overpotentialMethod
overpotential(k, model; kwargs...)

Given values for current/rate constant and specified model parameters, find the overpotential that would have resulted in it. (This is the inverse of the rate_constant function.)

NOTE that this currently only solves for net reaction rates.

ElectrochemicalKinetics.phase_diagramMethod
phase_diagram(km; I_start=0, I_step=1, I_max=Inf, verbose=false, intercalate=true, start_guess=[0.05, 0.95], kwargs...)

Construct electrochemical phase diagram for the model km as a function of composition and current, from I_start to I_max, in steps of I_step. To aid in convergence, you may also provide start_guess for the phase boundaries at I_start.

NOTE 1: appropriate values of I_step depend strongly on the prefactor of your model. For example, for ButlerVolmer with a prefactor of 1, the phase diagram at T=330K closes at I=5, but with a prefactor of 10, it reaches up to I=44.

NOTE 2: at lower temperatures (<=320K or so), ButlerVolmer models with the default thermodynamic parameters have a two-phase region at every current, so setting a finite value of I_max is necessary for this function to finish running.

ElectrochemicalKinetics.plot_exp_and_modelsMethod
plot_exp_and_models(exp_data::Matrix, models::Vector{<:KineticModel}; kwargs...)

Plot predicted rate constants for each model in the provided list.

Keyword Arguments

  • Vmin and Vmax: bounds of voltage, defaults to +/- 1.0
  • plot_title
  • kwargs for rate_constant function
ElectrochemicalKinetics.plot_modelsMethod
plot_models(models::Vector{<:KineticModel}; kwargs...)

Plot predicted rate constants for each model in the provided list.

Keyword Arguments

  • Vmin and Vmax: bounds of voltage, defaults to +/- 1.0
  • plot_title
  • kwargs for rate_constant function
ElectrochemicalKinetics.rate_constantMethod
rate_constant(V_app, model::KineticModel, ox::Bool; kwargs...)
rate_constant(V_app, model::KineticModel; a_r=1.0, a_o=1.0, kwargs...)
rate_constant(E_min, E_max, V_app, model::MarcusHushChidseyDOS, calc_cq::Bool=false; C_dl = 10.0, Vq_min = -0.5, Vq_max = 0.5, kwargs...)

Compute the rate constant k predicted by a given kinetic model at a applied voltage V_app. If a flag for reaction direction ox is supplied, true gives the oxidative and false the reductive direction, while omitting this flag will yield net reaction rate. In the net rate case, activities of reduced and oxidized species (a_r and a_o, respectively) may also be supplied (default values are unity).

If the model is an IntegralModel, integration bounds E_min and E_max may be supplied as kwargs. Integration is done via GK quadrature.

If calc_cq flag is passed, optionally compute voltage shifts due to quantum capacitance (only applicable to MarcusHushChidseyDOS models).

ElectrochemicalKinetics.rate_constant_cqMethod
rate_constant_cq(E_min, E_max, V_app, model::MarcusHushChidseyDOS, ox::Bool; C_dl=10.0, Vq_min=-0.5, Vq_max=0.5, kwargs...)
rate_constant_cq(E_min, E_max, V_app, model::MarcusHushChidseyDOS; C_dl=10.0, Vq_min=-0.5, Vq_max=0.5, kwargs...)

Compute the rate constant k predicted by a MarcusHushChidseyDOS model at a applied voltage V_app, including the effects of quantum capacitance. If a flag for reaction direction ox is supplied, true gives the oxidative and false the reductive direction, while omitting this flag will yield net reaction rate.

ElectrochemicalKinetics.μ_kineticMethod

µ and g with kinetic constributions, can be modeled using any <:KineticModel object

These functions return single-argument functions (to easily use common-tangent function below while still being able to swap out model parameters by calling "function-builders" with different arguments).

Notably, expressions for computing activity as a function of composition x for the oxidized and reduced states can be supplied via the activityfunctiono and activityfunctionr.