Standard calculations

Double layer capacitance

LiquidElectrolytes.dlcapsweepFunction
function dlcapsweep(
        sys;
        electrolyte = electrolytedata(sys),
        inival = nothing,
        voltages = (-1:0.1:1) * ufac"V",
        δ = 1.0e-4,
        store_solutions = false,
        solver_kwargs...
    )

Calculate double layer capacitances for voltages given in voltages. Returns a DLCapSweepResult.

Assumptions:

  • Only one double layer in the system - close to working electrode.
source

Steady state voltammetry

LiquidElectrolytes.ivsweepFunction
 ivsweep(
      sys;
      voltages = (-0.5:0.1:0.5) * ufac"V",
      store_solutions = false,
      solver_kwargs...,
      )

Steady state voltammetry.

Calculate molar reaction rates and bulk flux rates for each voltage in voltages. Returns a IVSweepResult.

source

Cyclic voltammetry

LiquidElectrolytes.cvsweepFunction
 cvsweep(
      sys;
      voltages=SawTooth(),
      periods=1,
      solver_kwargs...,
      )

Cyclic voltammetry sweep. By default, voltages given as a SawTooth function.

Calculate molar reaction rates and working electrode flux rates. Returns a CVSweepResult.

source
LiquidElectrolytes.CVSweepResultType
mutable struct CVSweepResult <: AbstractSimulationResult

Result type for cvsweep.

Fields:

  • voltages::Any: Vector of voltages
  • times::Any: Vector of times
  • j_reaction::Any: Working electrode molar reaction rates
  • j_bulk::Any: Bulk molar fluxes
  • j_we::Any: Working electrode molar fluxes
  • tsol::Any: Transient solution

Access methods: voltages, currents voltages_currents

source
LiquidElectrolytes.SawToothType
struct SawTooth

Callable (functor) struct defining sawtooth function for cyclic voltammetry.

(::SawTooth)(t) returns the voltage to be applied at moment t.

  • vmin::Float64: Minimum voltage. Default: -1V.

  • vmax::Float64: Maximum voltage. Default: 1V.

  • scanrate::Float64: Scan rate. Default: 0.1V/s.

  • vstart::Float64: Start voltage. Default: 0V

  • tstart::Float64: Start time. Default: 0s

  • scanup::Bool: Initial scan direction. Default: true

source

Supporting methods

LiquidElectrolytes.currentsFunction
currents(result,ispec; electrode)

Vector of electrode currents for species ispec. Electrode can be:

  • :bulk: calculate current at bulk boundary conditions
  • :we: calculate current electrode interface
  • :reaction: calculate current from reaction term
source
LiquidElectrolytes.bulkbconditionFunction
bulkbcondition(f,u,bnode,electrolyte; region = data.Γ_bulk)

Bulk boundary condition for electrolyte: set potential, pressure and concentrations to bulk values.

source