This repository shows an example of how to define your own model and parameter set to use in PyBaMM simulations. This kind of repository may be useful for sharing results from a particular paper, or hosting standalone PyBaMM models. The file model.py
defines the DFN in a single script (this is equivalent to pybamm.lithium_ion.BasicDFN
). The file parameters.py
defines a set of parameter values for an LG M50 cell taken from the paper
Chang-Hui Chen, Ferran Brosa Planella, Kieran O’Regan, Dominika Gastol, W. Dhammika Widanage, and Emma Kendrick. "Development of Experimental Techniques for Parameterization of Multi-scale Lithium-ion Battery Models." Journal of the Electrochemical Society 167 (2020): 080534
In order to run the models and load in any data you will need to install pybamm
. The example script example.py
has been tested on PyBaMM Version 22.2. To install the required python packages on Linux/Mac OS use the following terminal commands:
- Clone the repository
https://github.com/rtimms/dfn-example
- Change into the
dfn-example
directory
cd dfn-example
- Create a virtual environment (optional)
virtualenv env
- Activate the virtual environment (optional)
source env/bin/activate
- Install the required packages
pip install -r requirements.txt
PyBaMM is available on GNU/Linux, MacOS and Windows. For more detailed instructions on how to install PyBaMM, see the PyBaMM documentation.