pybamm
Python Battery Mathematical Modelling
Decision gist · record as of 2026-08-14
Yes. PyBaMM is a mature, actively maintained framework (Production/Stable status, recent release) with low installation friction, permissive licensing, and no known vulnerabilities. Install it if you need to simulate battery electrochemistry, validate battery designs computationally, or conduct battery modeling research. The large dependency tree (13 runtime packages) is standard for scientific Python and poses no unusual risk.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Low friction installation via pip or conda-forge.
- Active maintenance with a recent release (23 days ago) and ongoing repository activity.
- Supports modern Python versions (3.10–3.14) and has 13 runtime dependencies including standard scientific libraries.
License · maintenance · safety
permissive license (permissive) — BSD license (permissive). You may use, modify, and distribute PyBaMM freely in proprietary or open-source projects, provided you retain the copyright notice and disclaimer.
last release 2026-07-22 (23 days) · last repo commit 2026-08-14 · 1,642 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 106,144 downloads/mo, #12,667 on PyPI
Alternatives
Verify before relying
pip install pybamm
import pybamm
model = pybamm.lithium_ion.DFN()
sim = pybamm.Simulation(model)
sim.solve([0, 3600])
sim.plot()- Whether the package requires external solvers (e.g., CasADi) to be installed separately for full functionality.
- Performance characteristics and scalability limits for large-scale battery simulations.
- Availability and maturity of optional JAX-based solver on Python 3.11+.
What it is and what it does
PyBaMM (Python Battery Mathematical Modelling) is an open-source framework for simulating battery electrochemistry by solving differential equations. It combines a general-purpose solver framework with a library of pre-built battery models (such as the Doyle-Fuller-Newman model), parameter sets, and experiment definitions. Users can run simple constant-current discharge simulations with default settings or define complex multi-step experiments (discharge, rest, charge cycles) with custom physics, geometry, discretization methods, and solver parameters.
The package is designed for battery research and development, enabling exploration of how design choices and modeling assumptions affect performance under different operating scenarios. It depends on scientific Python libraries (numpy, scipy, sympy, pandas, xarray) for computation and visualization, and includes optional support for JAX-based solvers. The project is actively maintained, fiscally sponsored by NumFOCUS, and follows a CalVer versioning scheme with documented breaking-change policies.
Use it for
- Simulate constant-current discharge profiles for lithium-ion cells to predict capacity and voltage curves.
- Model complex multi-step charge/discharge experiments (e.g., CCCV charging) to validate battery management strategies.
- Explore the effect of parameter changes (electrode thickness, porosity, conductivity) on battery performance without physical prototyping.
- Develop and test custom battery models by writing differential equations within the PyBaMM framework.
- Generate publication-ready plots and data exports for battery performance analysis and research papers.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
PyBaMM is a mature, actively maintained framework (Production/Stable status, recent release) with low installation friction, permissive licensing, and no known vulnerabilities. Install it if you need to simulate battery electrochemistry, validate battery designs computationally, or conduct battery modeling research. The large dependency tree (13 runtime packages) is standard for scientific Python and poses no unusual risk.
Install
pybamm on PyPI
Before you install
Low friction installation via pip or conda-forge. Active maintenance with a recent release (23 days ago) and ongoing repository activity. Supports modern Python versions (3.10–3.14) and has 13 runtime dependencies including standard scientific libraries.
License in practice
BSD license (permissive). You may use, modify, and distribute PyBaMM freely in proprietary or open-source projects, provided you retain the copyright notice and disclaimer.
Quickstart
pip install pybamm
import pybamm
model = pybamm.lithium_ion.DFN()
sim = pybamm.Simulation(model)
sim.solve([0, 3600])
sim.plot()
Verify before relying
- Whether the package requires external solvers (e.g., CasADi) to be installed separately for full functionality.
- Performance characteristics and scalability limits for large-scale battery simulations.
- Availability and maturity of optional JAX-based solver on Python 3.11+.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release <3.15,>=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 13 packagesanytreeblacknumpypandasplatformdirspoochposthogpybammsolverspyyamlscipysympytyping-extensionsxarray |
| Maintenance | Actively maintained 23 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 106,144 / month, #12,667 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: Science/ResearchLicense :: OSI Approved :: BSD LicenseProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Scientific/Engineering |
Evidence: pybamm-26.7.1.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “battery simulation python”
- pybammPyBaMM is a Python framework for simulating battery behavior by…
- NREL-PySAMPySAM wraps NREL's System Advisor Model (SAM) simulation engine,…
- aiobmsbleAsynchronous Python library for querying battery management systems…
Give your agent the search over MCP, or paste the wish link into any chat.
More Scientific/Engineering packages
NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.
pandas provides fast, flexible data structures (Series and DataFrame) for loading, cleaning, transforming, and analyzing labeled or relational data in Python.
scipy provides numerical algorithms for mathematics, science, and engineering—including optimization, integration, linear algebra, Fourier transforms, signal and image processing, and ODE solvers—built on numpy arrays.
scikit-learn provides a comprehensive Python library for supervised and unsupervised machine learning, including classification, regression, clustering, dimensionality reduction, and model evaluation tools built on NumPy and SciPy.
Install it if you need to train, evaluate, or deploy supervised or unsupervised learning models.
dill extends Python's pickle module to serialize and deserialize a much wider range of Python objects, including functions, lambdas, classes, and interpreter sessions, to byte streams for storage or network transmission.
Multiprocess is an enhanced fork of Python's standard multiprocessing library that uses dill for better serialization, allowing you to spawn processes with a threading-like API and share complex objects between them.
Install it if you use multiprocessing and encounter pickle serialization limits with lambdas or complex objects.
See also pybammsolvers · pyomo · pyamg · simpy · OpenMM · pvlib · pandapower · NREL-PySAM · aiobmsble · salabim