https://github.com/battmoteam/pybamm

Fast and flexible physics-based battery models in Python

https://github.com/battmoteam/pybamm

Science Score: 51.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 4 DOI reference(s) in README
  • Academic publication links
    Links to: zenodo.org
  • Committers with academic emails
    15 of 49 committers (30.6%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.4%) to scientific vocabulary

Keywords from Contributors

batteries battery-models pybamm solvers python-template benchmarking automl jax astronomy transformer
Last synced: 6 months ago · JSON representation ·

Repository

Fast and flexible physics-based battery models in Python

Basic Info
  • Host: GitHub
  • Owner: BattMoTeam
  • License: bsd-3-clause
  • Language: Python
  • Default Branch: develop
  • Homepage: https://www.pybamm.org/
  • Size: 164 MB
Statistics
  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Fork of pybamm-team/PyBaMM
Created over 4 years ago · Last pushed almost 4 years ago
Metadata Files
Readme Changelog Contributing License Code of conduct Citation

README.md

PyBaMM_logo

[![Build](https://github.com/pybamm-team/PyBaMM/workflows/PyBaMM/badge.svg)](https://github.com/pybamm-team/PyBaMM/actions?query=workflow%3APyBaMM+branch%3Adevelop) [![readthedocs](https://readthedocs.org/projects/pybamm/badge/?version=latest)](https://pybamm.readthedocs.io/en/latest/?badge=latest) [![codecov](https://codecov.io/gh/pybamm-team/PyBaMM/branch/main/graph/badge.svg)](https://codecov.io/gh/pybamm-team/PyBaMM) [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/develop/) [![DOI](https://zenodo.org/badge/DOI/10.5334/jors.309.svg)](https://doi.org/10.5334/jors.309) [![release](https://img.shields.io/github/v/release/pybamm-team/PyBaMM?color=yellow)](https://github.com/pybamm-team/PyBaMM/releases) [![black code style](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black) [![All Contributors](https://img.shields.io/badge/all_contributors-41-orange.svg)](#-contributors)

PyBaMM

PyBaMM (Python Battery Mathematical Modelling) solves physics-based electrochemical DAE models by using state-of-the-art automatic differentiation and numerical solvers. The Doyle-Fuller-Newman model can be solved in under 0.1 seconds, while the reduced-order Single Particle Model and Single Particle Model with electrolyte can be solved in just a few milliseconds. Additional physics can easily be included such as thermal effects, fast particle diffusion, 3D effects, and more. All models are implemented in a flexible manner, and a wide range of models and parameter sets (NCA, NMC, LiCoO2, ...) are available. There is also functionality to simulate any set of experimental instructions, such as CCCV or GITT, or specify drive cycles.

💻 Using PyBaMM

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: python3 import pybamm model = pybamm.lithium_ion.DFN() # Doyle-Fuller-Newman model sim = pybamm.Simulation(model) sim.solve([0, 3600]) # solve for 1 hour sim.plot() or simulate an experiment such as CCCV: python3 import pybamm experiment = pybamm.Experiment( [ ("Discharge at C/10 for 10 hours or until 3.3 V", "Rest for 1 hour", "Charge at 1 A until 4.1 V", "Hold at 4.1 V until 50 mA", "Rest for 1 hour") ] * 3, ) model = pybamm.lithium_ion.DFN() sim = pybamm.Simulation(model, experiment=experiment, solver=pybamm.CasadiSolver()) 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).

For new users we recommend the Getting Started guides. These are intended to be very simple step-by-step guides to show the basic functionality of PyBaMM, and can either be downloaded and used locally, or used online through Google Colab.

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. Additional supporting material can be found here.

Note that the examples on the default develop branch are tested on the latest develop commit. This may sometimes cause errors when running the examples on the pybamm pip package, which is synced to the main branch. You can switch to the main branch on github to see the version of the examples that is compatible with the latest pip release.

🚀 Installing PyBaMM

PyBaMM is available on GNU/Linux, MacOS and Windows. We strongly recommend to install PyBaMM within a python virtual environment, in order not to alter any distribution python files. For instructions on how to create a virtual environment for PyBaMM, see the documentation.

Using pip

pypi downloads

bash pip install pybamm

Using conda

PyBaMM is available as a conda package through the conda-forge channel.

conda_forge downloads

bash conda install -c conda-forge pybamm

Optional solvers

Following GNU/Linux and macOS solvers are optionally available: - scikits.odes-based solver, see the documentation. - jax-based solver, see the documentation.

📖 Citing PyBaMM

If you use PyBaMM in your work, please cite our paper

Sulzer, V., Marquis, S. G., Timms, R., Robinson, M., & Chapman, S. J. (2021). Python Battery Mathematical Modelling (PyBaMM). Journal of Open Research Software, 9(1).

You can use the bibtex

@article{Sulzer2021, title = {{Python Battery Mathematical Modelling (PyBaMM)}}, author = {Sulzer, Valentin and Marquis, Scott G. and Timms, Robert and Robinson, Martin and Chapman, S. Jon}, doi = {10.5334/jors.309}, journal = {Journal of Open Research Software}, publisher = {Software Sustainability Institute}, volume = {9}, number = {1}, pages = {14}, year = {2021} }

We would be grateful if you could also cite the relevant papers. These will change depending on what models and solvers you use. To find out which papers you should cite, add the line

python3 pybamm.print_citations()

to the end of your script. This will print bibtex information to the terminal; passing a filename to print_citations will print the bibtex information to the specified file instead. A list of all citations can also be found in the citations file. In particular, PyBaMM relies heavily on CasADi. See CONTRIBUTING.md for information on how to add your own citations when you contribute.

🛠️ Contributing to PyBaMM

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.

📫 Get in touch

For any questions, comments, suggestions or bug reports, please see the contact page.

📃 License

PyBaMM is fully open source. For more information about its license, see LICENSE.

✨ Contributors

Thanks goes to these wonderful people (emoji key):


Valentin Sulzer

🐛 💻 📖 💡 🤔 🚧 👀 ⚠️ 📝

Robert Timms

🐛 💻 📖 💡 🤔 🚧 👀 ⚠️

Scott Marquis

🐛 💻 📖 💡 🤔 🚧 👀 ⚠️

Martin Robinson

🐛 💻 📖 💡 🤔 👀 ⚠️

Ferran Brosa Planella

👀 🐛 💻 📖 💡 🤔 🚧 ⚠️ 📝

Tom Tranter

🐛 💻 📖 💡 🤔 👀 ⚠️

Thibault Lestang

🐛 💻 📖 💡 🤔 👀 ⚠️ 🚇

Diego

🐛 👀 💻 🚇

felipe-salinas

💻 ⚠️

suhaklee

💻 ⚠️

viviantran27

💻 ⚠️

gyouhoc

🐛 💻 ⚠️

Yannick Kuhn

💻 ⚠️

Jacqueline Edge

🤔 📋 🔍

Fergus Cooper

💻 ⚠️

jonchapman1

🤔 🔍

Colin Please

🤔 🔍

cwmonroe

🤔 🔍

Greg

🤔 🔍

Faraday Institution

💵

Alexander Bessman

🐛 💡

dalbamont

💻

Anand Mohan Yadav

📖

WEILONG AI

💻 💡 ⚠️

lonnbornj

💻 ⚠️ 💡

Priyanshu Agarwal

⚠️ 💻 🐛 👀 🚧

DrSOKane

💻 💡 📖 ⚠️

Saransh Chopra

💻 ⚠️ 📖 👀 🚧

David Straub

🐛 💻

maurosgroi

🤔

Amarjit Singh Gaba

💻

KennethNwanoro

💻 ⚠️

Ali Hussain Umar Bhatti

💻 ⚠️

Leshinka Molel

💻 🤔

tobykirk

🤔 💻 ⚠️

Chuck Liu

🐛 💻

partben

📖

Gavin Wiggins

🐛 💻

Dion Wilde

🐛 💻

Elias Hohl

💻

KAschad

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

Owner

  • Name: BatteryModel.com
  • Login: BattMoTeam
  • Kind: organization
  • Email: simon.clark@sintef.no
  • Location: Norway

Models for batteries and electrochemical devices.

Citation (CITATION.cff)

cff-version: 1.1.0
message: "If you use PyBaMM, please cite it as below."
authors: 
- family-names: Sulzer
  given-names: Valentin
  orcid: "https://orcid.org/0000-0002-8687-327X"
- family-names: Marquis
  given-names: Scott G.
  orcid: "https://orcid.org/0000-0002-6895-990X"
- family-names: Timms
  given-names: Robert
  orcid: "https://orcid.org/0000-0002-8858-4818"
- family-names: Robinson
  given-names: Martin
  orcid: "https://orcid.org/0000-0002-1572-6782"
- family-names: Chapman
  given-names: S. Jon
  orcid: "https://orcid.org/0000-0003-3347-6024"
journal: "Journal of Open Research Software"
date-released: 2021-06-08
doi: 10.5334/jors.309
keywords: 
  - "battery modelling"
  - "expression tree"
  - "python"
  - "symbolic differentiation"
version: "22.1"
repository-code: "https://github.com/pybamm-team/PyBaMM"
title: "Python Battery Mathematical Modelling (PyBaMM)"

GitHub Events

Total
  • Watch event: 1
Last Year
  • Watch event: 1

Committers

Last synced: about 2 years ago

All Time
  • Total Commits: 7,257
  • Total Committers: 49
  • Avg Commits per committer: 148.102
  • Development Distribution Score (DDS): 0.591
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Valentin Sulzer v****r@h****m 2,970
Scottmar93 m****s@m****k 764
Robert Timms t****s@m****k 652
Ferran Brosa Planella F****a@w****k 636
Martin Robinson m****s@g****m 581
Thibault Lestang t****g@c****k 434
Priyanshu Agarwal p****6@g****m 195
Elias Hohl e****l@a****m 137
Saransh s****1@g****m 121
tobykirk t****k@m****k 92
Valentin Sulzer s****r@m****k 81
allcontributors[bot] 4****] 76
tomtranter t****r@g****m 74
Weilong w****i@i****k 56
Diego d****z@i****k 49
felipe-salinas 6****s 49
Nwanoro n****o@l****k 46
Amarjit a****a@g****m 27
Suhak Lee s****e@u****u 20
Ali Hussain Umar Bhatti 6****5 20
Simon O'Kane s****e@i****k 18
jack j****n@g****m 18
Thibault Lestang T****g 15
Leshinka Molel e****3@g****u 13
Fergus Cooper f****2@g****m 12
Vivian v****7@g****m 11
Robert t****s@m****k 9
Dalbamont d****e@h****m 8
gyouhoc 6****c 8
Yannick Kuhn 6****n 8
and 19 more...

Issues and Pull Requests

Last synced: about 2 years ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels