Metadata-Version: 2.5
Name: PyBaMM-GEM
Version: 0.2.0
Summary: Spatially resolved (2D and 3D) battery models for PyBaMM
Author: Mohammed Asheruddin N
License-Expression: BSD-3-Clause
License-File: LICENSE.txt
License-File: LICENSES-bundled.txt
Keywords: battery,electrochemistry,lithium-ion,modelling,pybamm,simulation
Requires-Python: >=3.10
Requires-Dist: pybamm[cite]>=26.9
Requires-Dist: tomli>=2.0.1; python_version < '3.11'
Provides-Extra: dev
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Description-Content-Type: text/markdown

# PyBaMM-GEM

Spatially resolved (2D and 3D) battery models built on [PyBaMM](https://pybamm.org), 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

```python
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`.
