Examples#
This folder contains a collection of Jupyter notebooks that demonstrate how to use PyBaMM and reveal some of its functionalities and inner workings. The notebooks are organised into subfolders, and can be viewed in the galleries below.
Getting Started
Creating Models
Performance

Understanding the PyBaMM pipeline and performance profile of the Simulation class
Using Input Parameters to efficiently re-run simulations with different parameters

The PyBaMM Solvers
Interpolation and evaluation points

Solver tolerances
Defining output variables to reduce memory usage
Running many simulations in parallel using OpenMP
Expression Tree
Models

Comparison of PyBaMM and COMSOL Discharge Curves

Comparing with Experimental Data

Compare lithium-ion battery models

Compare particle diffusion models

A composite electrode particle model

Modelling coupled degradation mechanisms in PyBaMM

Differential Capacity Hysteresis State model

Doyle-Fuller-Newman Model with particle-size distributions
Doyle-Fuller-Newman Model (DFN)

Electrode State of Health
Simulating graded electrodes

Half-cell models in PyBaMM

Jelly roll model

Using latexify in PyBaMM

Lead-Acid Models

Modelling lithium plating in PyBaMM

Modelling lithium plating on composite electrodes in PyBaMM

Many Particle Model (MPM)

Multi-Species Multi-Reaction model

Pouch cell model

Generate rate capability plots
Saving PyBaMM models to file

Modelling SEI growth on particle cracks
Simulating a 3E cell
Run simulations with O’Regan 2022 parameter set (LG M50)

DFN model for sodium-ion batteries

Single Particle Model (SPM)
Single Particle Model with Electrolyte (SPMe)
Using crack submodels in PyBaMM
Loss of active material submodels
Thermal models
Transport efficiency and the models for tortuosity factor

Solving the heat equation in PyBaMM
Using model options in PyBaMM
Using submodels in PyBaMM

Test the parameter set of the Enertech cells
Parameterization
Simulations and Experiments
Spatial Methods





















