Soft Potato
Soft Potato is an open-source electrochemical simulation and analysis toolkit in Python.
Full documentation: https://softpotato.readthedocs.io | Roadmap: ROADMAP.md | Changelog: CHANGELOG.md
Tutorials & Examples
Interactive Jupyter notebooks are available in the examples/ directory:
| Tutorial | Description |
|---|---|
Cottrell Chronoamperometry with solve_ivp |
Simulates the Cottrell potential-step experiment using Soft Potato's adaptive solve_ivp solver and benchmarks against the Cottrell equation. |
| Cyclic Voltammetry with Nernst Kinetics | Simulates reversible cyclic voltammetry using solve_ivp, visualizes spatio-temporal concentration profiles, validates peak currents against the Randles–Ševčík equation across scan rates, and evaluates diagnostic reversibility criteria. |
| Cyclic Voltammetry with Butler–Volmer Kinetics | Simulates cyclic voltammetry under Butler–Volmer quasi-reversible kinetics with unequal diffusion coefficients ($D_{\text{Red}} \neq D_{\text{Ox}}$) using second-order ghost-node flux discretization and benchmarks against Nicholson theory. |
| Rotating Disk Electrode (RDE) Voltammetry with Levich Analysis | Simulates RDE cyclic voltammetry with Nernst kinetics using the Nernst stagnant diffusion layer approximation ($\delta = 1.61 D^{1/3} \nu^{1/6} \omega^{-1/2}$). Demonstrates the transition from transient peaks to steady-state waves across scan rates and validates limiting currents against the Levich equation. |
| RDE Voltammetry with Butler–Volmer Kinetics & Koutecký–Levich Analysis | Simulates RDE cyclic voltammetry for an oxidation under IUPAC convention with Butler–Volmer kinetics using the Nernst diffusion layer approximation ($\delta = 1.61 D^{1/3} \nu^{1/6} \omega^{-1/2}$). Demonstrates kinetic shifts via normalized voltammograms ($I/I_L$), validates limiting currents against the Levich equation, and extracts $k_0$ and $\alpha$ using Koutecký–Levich and Tafel analysis. |
Installation
Clone the repository and install in development / editable mode:
git clone https://github.com/oliverrdz/softpotato.git
cd softpotato
pip install -e ".[dev,docs]"
Quick Start: Solving 1D Diffusion with scipy_ivp
Soft Potato makes it straightforward to simulate chemical diffusion:
$$\frac{\partial c}{\partial t} = D \frac{\partial^2 c}{\partial x^2}$$
Here is a minimal example setting boundary conditions to $0$ at the left boundary ($x=0$) and $1.0$ at the right boundary ($x=1.0$):
import numpy as np
from softpotato.solver import DiffusionProblem, DirichletBC, get_solver
# 1. Define grid and diffusion problem (c = 0 at left, c = 1.0 at right)
grid = np.linspace(0.0, 1.0, 50)
problem = DiffusionProblem(
grid=grid,
diffusivity={"c": 1e-4},
boundary_conditions={"c": (DirichletBC(0.0), DirichletBC(1.0))},
initial_conditions={"c": 1.0},
)
# 2. Solve using SciPy's Method of Lines solver
solver = get_solver("scipy_ivp")
result = solver.solve(problem, t_span=(0.0, 1.0))
# 3. Save the concentration profile to a variable
c_profile = result["c"] # 2D array of shape (N_times, N_points)
print(f"Simulation success: {result.success}")
print(f"Concentration profile shape: {c_profile.shape}")
License
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
Metadata
Release files for softpotato 3.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 |
|---|---|---|---|---|
| softpotato-3.0.0.tar.gz | 20.7 kB | With provenance | Details for softpotato-3.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| softpotato-3.0.0-py3-none-any.whl | Python 3 | none | any | Details for softpotato-3.0.0-py3-none-any.whl |
Total release size: 42.7 kB
Release files / softpotato-3.0.0.tar.gz
| Download URL | softpotato-3.0.0.tar.gz |
|---|---|
| Size | 20.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
768ef75921727e8b3d2d3e62f0b7458598c303a78d66d4d67cf9c64658b9911d
|
|
BLAKE2b-256 checksum How to use checksums |
e067348ecd67b3a3b5b54c65f92b74bb0eddd30b1d023b35d955e5513e0615be
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logRelease files / softpotato-3.0.0-py3-none-any.whl
| Download URL | softpotato-3.0.0-py3-none-any.whl |
|---|---|
| Size | 22.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9cd54aa102d35075636be269c8609df04e46eb51462e9b361d1a31fa1dc98d93
|
|
BLAKE2b-256 checksum How to use checksums |
0d67067511eb6a8c2ba5ba0bbcf7bbb9cad51392e4cd70440f67dcb937e6b8c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logSecurity for softpotato 3.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for softpotato-3.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 27, 2026.
Transparency logA 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.