GSoC’22 —Community Bonding and the first week of the coding period

Vaibhav Chopra
2 min readJun 30, 2022

The community bonding period and the first week of the coding period are officially over! This blog is a bit late but it summarises the work that I have been doing under my amazing mentors! Here it is —

Benchmarking the parameter sets

The first benchmark that I and my mentors decided to work on was to run, simulate, and solve battery models (Single Particle Model, Doyle Fuller Neuman, and Single Particle Model with electrolyte) by varying parameter sets. Initially, I wrote all the benchmarks individually, generating a lot of repetitive code. With the help of my mentors, I was able to simplify these benchmarks using the params feature provided by asv, which allowed me to change parameter sets without repeating the code. In the end, it all worked out and the PR was merged in!

PR — https://github.com/pybamm-team/PyBaMM/pull/2086

Benchmarks running on PyBaMM’s benchmarks website

Unit Benchmarks

The next thing that we decided to benchmark was a battery problem (PyBaMM example) by dividing it into different parts or units. The different units created -

  • creating a PyBaMM expression
  • parameterizing the model
  • discretizing the model
  • solving the model

I accomplished this by dividing these pieces into different classes to make the code reusable. Additionally, the setup feature provided by asv was used to execute the code units which were not supposed to be timed but were required by the timed code unit.

PR — https://github.com/pybamm-team/PyBaMM/pull/2092

Unit benchmarks running in PyBaMM’s benchmarks website

Benchmarking experiments

The last benchmark created by me over the course of community bonding and week 1 was related to battery experiments. I benchmarked the CCCV and GITT experiments by simulating them with the Single Particle Model and Doyle Fuller Neuman model. Furthermore, the parameter sets provided to the model were also varied between Marquis2019 and Chen2020.

PR — https://github.com/pybamm-team/PyBaMM/pull/2106

Last but not the least, I was also invited to weekly meetings with my mentors which I think were incredibly helpful and productive! In summary, the last few weeks were very productive and I hope to carry on the same momentum in the following weeks as well. Currently, I am working on memory and degradation benchmarks, but they will be covered in the next blog!

--

--