CVsim
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
Installation
cvsim can be installed from PyPI using pip:
pip install cvsim
See Getting started with cvsim.py for instructions on simulating CVs.
Dependencies
cvsim requires:
- Python (>=3.10)
- SciPy
Package Structure
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.
Example
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!
License
Metadata
Release files for cvsim 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| cvsim-1.0.0.tar.gz | 262.2 kB | Without provenance | Details for cvsim-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cvsim-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for cvsim-1.0.0-py3-none-any.whl |
Total release size: 275.4 kB
Release files / cvsim-1.0.0.tar.gz
| Download URL | cvsim-1.0.0.tar.gz |
|---|---|
| Size | 262.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8597ea604ea69943116746c749f53246ecac15a347032a23ed5fe99afc633efd
|
|
BLAKE2b-256 checksum How to use checksums |
340be424bc7c0c9de574c62fac7dae04930b38ed5a7a209c16ed12791221b7e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.4
|
Release files / cvsim-1.0.0-py3-none-any.whl
| Download URL | cvsim-1.0.0-py3-none-any.whl |
|---|---|
| Size | 13.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f39295a76361a50aa02bc24d92940db79b710395b51116d7f5c5618301f64b5
|
|
BLAKE2b-256 checksum How to use checksums |
11fe9cceb606e746a4a1a4b0cb0d608972b5b8c7ffdf9b48e8e3ca911e529df9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.4
|
Security for cvsim 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.