Skip to content

GSoC 2022 Projects

Agriya Khetarpal edited this page Feb 29, 2024 · 18 revisions

Tip

This is an obsolete version of this document. For an updated version of this page, please visit: https://pybamm.org/gsoc/

PyBaMM

Improving battery technology is criticial as we transition to a green economy. Battery modeling helps to achieve this by reducing costs and increasing reliability and safety. The PyBaMM package provides an open-source framework for physics-based battery models and simulations, with a growing focus on real-world experiments and battery degradation. While most of our development team works day-to-day on creating new models and better ways to solve them, the proposed projects (which do not require domain-specific knowledge) will be fantastic contributions to the general framework.

To find out more about PyBaMM, you can visit our website pybamm.org or read our paper.

Getting started

We mostly communicate via Slack, so you should start off by joining our Slack workspace and heading to the #gsoc-main channel.

A comprehensive set of example notebooks is available for becoming familiar with PyBaMM. Knowledge of battery physics or mathematical modeling is not required for any of the projects, but may be beneficial for the "EIS" project.

All coding will be done in Python, so contributors should have some proficiency in Python, or another object-oriented programming language. Each project will follow test-driven development, and also involve writing clear documentation (via Sphinx) and examples (mainly in the form of jupyter notebooks) alongside the code. New contributors should make themselves familiar with this workflow. Finally, new contributors should read the contributing guidelines and be familiar with the basics of Git and Github.

Projects

ExperimentalData class

While PyBaMM is a modeling package, the majority of battery research is performed through experiments, whose data (cell voltage, current, temperature, ...) can be generated in a wide variety of formats. The goal of this project is to develop functionality to better interface PyBaMM with this experimental data. In particular, the proposed ExperimentalData class should import real data and behave like the existing Solution class (generated by solving a model), so experimental data can be easily plotted and compared with simulations.

Expected outcomes

  • [Easy] New ExperimentalData class fully integrated with the PyBaMM structure
  • [Medium] Ability to import data from common sources (e.g. BatteryArchive)
  • [Hard/stretch goal] Tools for automatically fitting the parameters of a model to experimental data

Desired skills

  • Knowledge of batteries is not required and the PyBaMM team will provide representative examples of different real data formats.
  • Experience in handling large datasets, especially in Python.
  • Git version control, CI, testing

Difficulty

  • Medium. The first two outcomes should be feasible in a 175h project, while the stretch goal would be better suited for a 350h project.

Potential mentors

Electrochemical Impedance Spectroscopy (EIS) modelling

A common type of experiment in battery science is Electrochemical Impedance Spectroscopy (EIS), which is used to generate a plot known as the "Nyquist plot". While this is typically modeled using simple "equivalent-circuit" models, the physical models implemented in PyBaMM could also be used to explain such experiments. In this project, we will

a) Develop functionality to solve a PyBaMM model in the frequency domain to generate Nyquist plots

b) Integrate with existing EIS modeling packages, such as impedance.py or pyEIS, to fit experimental data

Expected outcomes

  • [Medium] Generation of a Nyquist plot from any PyBaMM model
  • [Hard/Stretch goal] Integration with existing EIS modeling packages, such as impedance.py or pyEIS, to fit experimental data

Desired skills

  • This is the hardest of the projects, and contributors will benefit from understanding of university-level mathematical concepts such as the Laplace transform

Difficulty

  • Hard. This project is better suited for a 350h project.

Potential mentors

Enhanced Visualization

PyBaMM has plotting functionality that enables you to compare different variables and different models both as a snap-shot in time and dynamically with sliders but the single plots can quickly become very crowded and complicated. Knowing the details of the models is not so important for this project but the key thing to know is there are many variables that could be plotted and they could have different dimensions. For our most basic 1+1D model which solves 1D transport between electrodes (x-direction) coupled with 1D transport inside particles (r-direction), the spatial dimensionality of a variable can be 0d for a volume-averaged variable or an x-averaged variable that does not depend on r, 1d for an x-dependent or r-averaged variable and 2d for variables that depend on both x and r such as particle concentration. All variables also vary with time and/or by cycle number. PyBaMM also allows for simulations with higher spatial dimensions where the plane of the current collector is 2D and this adds an extra y-dimension to all the above-mentioned variables. It is also possible to run ensembles of models which could number in the 100s or even thousands and so finding ways of presenting this large amount of information in a clear, concise and configurable way presents a difficult challenge. With 10s-100s of variables, 100s of time points per cycle and, 1000s of instances in an ensemble, the amount of data generated by a single simple model can grow very large very quickly and post-processing this data requires big-data analytical skills. In this project, we will:

a) Develop functionality to enhance visualisation of large simulation datasets. This could be in the form of a streamlit or dash app or perhaps a more configurable matplotlib window.

b) Presentation of informative statistics for ensemble simulations

c) Your work could even form the basis for an additional package in its own right with enhanced capability to analyse not only simulation data but also upload and compare experimental data for example.

d) If time allows the project could extend to include visualization for PyBaMM extensions that cover pack simulations and highly resolved 3D battery models.

Expected outcomes

  • [Medium] Improve current visualization capability
  • [Hard/Stretch goal] Make a fully functional app or package

Desired skills

  • Knowledge of batteries is not required and all the set up of simulations and generation of data will be very easy to pick up with the PyBaMM-team's guidance.
  • Experience of handling large datasets and presenting statistics in an informative and visually appealing way.
  • App development
  • Git version control, CI, testing
  • Some knowledge of VTK may be desirable for 3D simulations

Difficulty

  • Hard. This project is better suited for a 350h project.

Potential mentors

Documentation

Improve documentation infrastructure by borrowing ideas from successful Python packages. Some ideas are:

  • Self hosting (scipy)
  • Better design
  • Dependency trees
  • Link to examples where various functionality is used (scikit-learn)
  • Show output and runtime of examples (notebooks and scripts) (scikit-learn)

Note that the focus of this project is not on writing documentation but on improving the infrastructure around it.

Expected outcomes

  • Self-hosted documentation taking in the best ideas from other open-source projects

Desired skills

  • Hosting documentation on Sphinx
  • Git version control, CI, testing

Difficulty

  • Medium. This project could be suitable for a 175h project, but can also be extended to a 350h project.

Potential mentors

Reformat parameters

The aim of this project is to reorganize the parameter set structure in PyBaMM and add functionality to read parameter sets directly from LiionDB. PyBaMM has a few parameter sets from the literature, but these were added piece-meal with no overarching logic. We would like to reorganize this so that there are only a few representative parameter sets, for getting started, but the full parameter library is separate in LiionDB. Users will be encouraged to define their own parameter sets locally from LiionDB, rather than relying on the inbuilt PyBaMM libraries.

Expected outcomes

  • Reduce number of PyBaMM parameter sets to a key few
  • Add functionality to PyBaMM and LiionDB so that PyBaMM can import parameter sets from LiionDB
  • Create workflows for using parameters in PyBaMM models

Desired skills

  • Some knowledge of batteries would be helpful, but not strictly required
  • Basic SQL skills
  • Git version control, CI, testing

Difficulty

  • Hard. This project is better suited for a 350h project.

Potential mentors

Benchmarks

PyBaMM currently has a very basic benchmark framework. The aim of this project is to improve the benchmark suite, the website displaying the results and the analysis tools.

Expected outcomes

  • [Easy] Improve the benchmark website and populate it with new tests
  • [Hard/stretch goal] Develop tools to analyse the data stored in the repository

Desired skills

  • Knowledge of batteries is not required.
  • Experience on asv is not required but will be useful.
  • Git version control, CI, testing

Difficulty

  • Medium. The first outcome should be feasible in a 175h project, while the stretch goal would be better suited for a 350h project.

Potential mentors

Reformat discretisations

Currently, the spatial domains are defined to have arbitrary endpoints, and for the battery models it means that the electrode thicknesses are hard-coded in the domain and cannot be defined as an input parameter. The goal of this project is to reformat the discretisations (and models) so all the domains are defined between 0 and 1.

Expected outcomes

  • A new spatial discretization method with domains defined between 0 and 1, enabling faster optimization of geometric parameters.

Desired skills

  • Some experience with numerical solutions of partial differential equations
  • Git version control, CI, testing

Difficulty

  • Hard. This project is better suited for a 350h project.

Potential mentors