Python Battery Mathematical Modelling solves continuum models for batteries, using both numerical methods and asymptotic analysis.
The easiest way to use PyBaMM is to run a 1C constant-current discharge with a model of your choice with all the default settings:
import pybamm
model = pybamm.lithium_ion.DFN() # Doyle-Fuller-Newman model
sim = pybamm.Simulation(model)
sim.solve()
sim.plot()
However, much greater customisation is available. It is possible to change the physics, parameter values, geometry, submesh type, number of submesh points, methods for spatial discretisation and solver for integration (see DFN script or notebook).
Further details can be found in a number of detailed examples, hosted here on github. In addition, there is a full API documentation, hosted on Read The Docs. A set of slides giving an overview of PyBaMM can be found here.
For instructions on installing PyBaMM on Debian-based distributions, please see here
We recommend using Windows Subsystem for Linux to install PyBaMM on a Windows OS, for instructions please see here
If you'd like to help us develop PyBaMM by adding new methods, writing documentation, or fixing embarrassing bugs, please have a look at these guidelines first.
PyBaMM is fully open source. For more information about its license, see LICENSE.