cvsim is a Python package for cyclic voltammogram (CV) simulation via a semi-analytical method developed by Oldham and Myland1. It is valid for CV experiments performed on disk macroelectrodes, and uses a semi-integration algorithm. In the limit of infinitely small potential steps, this algorithm is an exact solution.
Due to the precision of standard potentiostats, simulations that use a potential step of 1-5 mV typically provide a reasonable accuracy-computing time trade-off, where accuracy sanity checks (e.g. Randles-Sevcik relationship for Er and Eq mechanisms) have been performed.
Currently available mechanisms:
- One-electron process: Er , Eq , and EqC
- Two-electron process: EqEq and Square scheme
cvsim can be installed from PyPI using pip:
pip install cvsimSee Getting started with cvsim.py for instructions on simulating CVs.
cvsim requires:
- Python (>=3.10)
- SciPy
mechanisms.py: Specifies one-/two-electron process mechanisms to be simulated.fit_curve.py: Performs fitting of experimental CV data according to a desired mechanism.
To simulate a reversible (Nernstian) CV:
from cvsim.mechanisms import E_rev
potential, current = E_rev(
start_potential=0.3, # V vs. reference
switch_potential=-0.5, # V vs. reference
reduction_potential=-0.1, # V vs. reference
scan_rate=0.1, # V/s
c_bulk=1.0, # mM (mol/m^3)
diffusion_reactant=1e-6, # cm^2/s
diffusion_product=2e-6, # cm^2/s
).simulate()Input Parameters
- Estart/Eswitch/Eo' = V vs ref.
- Scanrate = V/s
- Active species concentration = mM (mol/m3)
- Diffusion coefficients = cm2/s
Optional Parameters
- Potential step size = mV
- Disk radius = mm
- Temperature = K
and if needed
- Standard rate constant, ko = cm/s
- 1st order chemical rate constants (kforward, kbackward) = s-1
*The schemes for CEr , catalytic C'Eq , and ErCEr need development, PRs welcome!