PyBaMM-GEM
Spatially resolved (2D and 3D) battery models built on PyBaMM, laid out
like the PyBaMM model zoo: one folder per model, each with a model.toml manifest, a
CITATION.bib, a README, tests and an example.
Models
| Slug | Class | What it is |
|---|---|---|
spm_2d |
BasicSPM2D |
Single Particle Model with a pair of particles at every height z |
spm_3d |
BasicSPM3D |
The same, over a y-z grid of points |
dfn_2d |
DFN2D |
Doyle-Fuller-Newman model resolved in x and z |
dfn_3d |
DFN3D |
The same, resolved in x, y and z |
Installation
pip install git+https://github.com/ImperialCollegeLondon/PyBaMM-GEM
PyBaMM 26.9 or newer is needed.
Usage
import pybamm
import pybamm_gem as gem
print(gem.list_models())
model = gem.load("spm_2d")()
simulation = pybamm.Simulation(model)
solution = simulation.solve([0, 3000])
print(solution["Voltage [V]"](1500))
The classes are also available directly, for example gem.lithium_ion.BasicSPM2D or
gem.lithium_ion.DFN2D.
The notebook examples/higher_dimensional_models.ipynb runs all four models, compares them with
the stock PyBaMM models and shows a temperature that changes with height.
Licence
BSD 3-Clause, see LICENSE.txt. Copyright (c) 2026, Imperial College London.
Some of the model code is adapted from PyBaMM; see LICENSES-bundled.txt.
Metadata
Release files for PyBaMM-GEM 0.2.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 |
|---|---|---|---|---|
| pybamm_gem-0.2.0.tar.gz | 142.2 kB | Without provenance | Details for pybamm_gem-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pybamm_gem-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for pybamm_gem-0.2.0-py3-none-any.whl |
Total release size: 171.6 kB
Release files / pybamm_gem-0.2.0.tar.gz
| Download URL | pybamm_gem-0.2.0.tar.gz |
|---|---|
| Size | 142.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7251986bbff19d00b25fdec7087d3ce964240bd299ea1471835e7a20c8e6ba41
|
|
BLAKE2b-256 checksum How to use checksums |
75b419538df6fd03e4ef97d41cf8e0791bd60af9203a5afb6a63340977553b19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Release files / pybamm_gem-0.2.0-py3-none-any.whl
| Download URL | pybamm_gem-0.2.0-py3-none-any.whl |
|---|---|
| Size | 29.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e8f8acd03c2539fc64c3d48e8e690597c26f583b4b686d057bc74c9db8b82219
|
|
BLAKE2b-256 checksum How to use checksums |
4e828e768b6a10bfd4fe0a8edbff997ac0a32cc0e9703ef98dddef66ef9941c7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.12
|
Security for PyBaMM-GEM 0.2.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.