{"id":13720358,"url":"https://github.com/pybamm-team/PyBaMM","last_synced_at":"2025-05-07T12:31:07.673Z","repository":{"id":37821226,"uuid":"155538761","full_name":"pybamm-team/PyBaMM","owner":"pybamm-team","description":"Fast and flexible physics-based battery models in Python","archived":false,"fork":false,"pushed_at":"2025-04-29T20:30:53.000Z","size":195590,"stargazers_count":1266,"open_issues_count":187,"forks_count":613,"subscribers_count":29,"default_branch":"develop","last_synced_at":"2025-05-03T18:36:15.625Z","etag":null,"topics":["batteries","battery-models","hacktoberfest","pybamm","python","simulation","solvers"],"latest_commit_sha":null,"homepage":"https://www.pybamm.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pybamm-team.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"pybamm-team","open_collective":"pybamm"}},"created_at":"2018-10-31T10:26:29.000Z","updated_at":"2025-05-03T06:42:19.000Z","dependencies_parsed_at":"2023-09-22T11:23:59.173Z","dependency_job_id":"d95572fb-a851-4e7f-b3ef-e5a792ca3143","html_url":"https://github.com/pybamm-team/PyBaMM","commit_stats":{"total_commits":11443,"total_committers":127,"mean_commits":90.10236220472441,"dds":0.6675696932622563,"last_synced_commit":"b6fa67a5ca1fcce7a3599c885a11b1479c89aa54"},"previous_names":[],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybamm-team%2FPyBaMM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybamm-team%2FPyBaMM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybamm-team%2FPyBaMM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pybamm-team%2FPyBaMM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pybamm-team","download_url":"https://codeload.github.com/pybamm-team/PyBaMM/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252306450,"owners_count":21726838,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["batteries","battery-models","hacktoberfest","pybamm","python","simulation","solvers"],"created_at":"2024-08-03T01:01:02.896Z","updated_at":"2025-05-07T12:31:07.659Z","avatar_url":"https://github.com/pybamm-team.png","language":"Python","funding_links":["https://github.com/sponsors/pybamm-team","https://opencollective.com/pybamm"],"categories":["Energy Storage"],"sub_categories":["Battery"],"readme":"![PyBaMM_logo](https://user-images.githubusercontent.com/20817509/107091287-8ad46a80-67cf-11eb-86f5-7ebef7c72a1e.png)\n\n#\n\n\u003cdiv align=\"center\"\u003e\n\n[![Powered by NumFOCUS](https://img.shields.io/badge/powered%20by-NumFOCUS-orange.svg?style=flat\u0026colorA=E1523D\u0026colorB=007D8A)](http://numfocus.org)\n[![Scheduled](https://github.com/pybamm-team/PyBaMM/actions/workflows/run_periodic_tests.yml/badge.svg?branch=develop)](https://github.com/pybamm-team/PyBaMM/actions/workflows/run_periodic_tests.yml)\n[![readthedocs](https://readthedocs.org/projects/pybamm/badge/?version=latest)](https://docs.pybamm.org/en/latest/?badge=latest)\n[![codecov](https://codecov.io/gh/pybamm-team/PyBaMM/branch/main/graph/badge.svg)](https://codecov.io/gh/pybamm-team/PyBaMM)\n[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/main/)\n[![DOI](https://zenodo.org/badge/DOI/10.5334/jors.309.svg)](https://doi.org/10.5334/jors.309)\n[![release](https://img.shields.io/github/v/release/pybamm-team/PyBaMM?color=yellow)](https://github.com/pybamm-team/PyBaMM/releases)\n[![code style](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)\n[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/pybamm-team/PyBaMM/badge)](https://scorecard.dev/viewer/?uri=github.com/pybamm-team/PyBaMM)\n\n\u003c/div\u003e\n\n# PyBaMM\n\nPyBaMM (Python Battery Mathematical Modelling) is an open-source battery simulation package\nwritten in Python. Our mission is to accelerate battery modelling research by\nproviding open-source tools for multi-institutional, interdisciplinary collaboration.\nBroadly, PyBaMM consists of\n(i) a framework for writing and solving systems\nof differential equations,\n(ii) a library of battery models and parameters, and\n(iii) specialized tools for simulating battery-specific experiments and visualizing the results.\nTogether, these enable flexible model definitions and fast battery simulations, allowing users to\nexplore the effect of different battery designs and modeling assumptions under a variety of operating scenarios.\n\n[//]: # \"numfocus-fiscal-sponsor-attribution\"\n\nPyBaMM uses an [open governance model](https://pybamm.org/governance/)\nand is fiscally sponsored by [NumFOCUS](https://numfocus.org/). Consider making\na [tax-deductible donation](https://numfocus.org/donate-for-pybamm) to help the project\npay for developer time, professional services, travel, workshops, and a variety of other needs.\n\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://numfocus.org/project/pybamm\"\u003e\n    \u003cimg height=\"60px\"\n         src=\"https://raw.githubusercontent.com/numfocus/templates/master/images/numfocus-logo.png\"\n         align=\"center\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\n## 💻 Using PyBaMM\n\nThe easiest way to use PyBaMM is to run a 1C constant-current discharge with a model of your choice with all the default settings:\n\n```python3\nimport pybamm\n\nmodel = pybamm.lithium_ion.DFN()  # Doyle-Fuller-Newman model\nsim = pybamm.Simulation(model)\nsim.solve([0, 3600])  # solve for 1 hour\nsim.plot()\n```\n\nor simulate an experiment such as a constant-current discharge followed by a constant-current-constant-voltage charge:\n\n```python3\nimport pybamm\n\nexperiment = pybamm.Experiment(\n    [\n        (\n            \"Discharge at C/10 for 10 hours or until 3.3 V\",\n            \"Rest for 1 hour\",\n            \"Charge at 1 A until 4.1 V\",\n            \"Hold at 4.1 V until 50 mA\",\n            \"Rest for 1 hour\",\n        )\n    ]\n    * 3,\n)\nmodel = pybamm.lithium_ion.DFN()\nsim = pybamm.Simulation(model, experiment=experiment, solver=pybamm.IDAKLUSolver())\nsim.solve()\nsim.plot()\n```\n\nHowever, 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](https://github.com/pybamm-team/PyBaMM/blob/develop/examples/scripts/DFN.py) or [notebook](https://github.com/pybamm-team/PyBaMM/blob/develop/docs/source/examples/notebooks/models/DFN.ipynb)).\n\nFor new users we recommend the [Getting Started](https://github.com/pybamm-team/PyBaMM/tree/develop/docs/source/examples/notebooks/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](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/main/).\n\nFurther details can be found in a number of [detailed examples](https://github.com/pybamm-team/PyBaMM/tree/develop/examples), hosted here on\ngithub. In addition, there is a [full API documentation](https://docs.pybamm.org/en/latest/source/api/index.html),\nhosted on [Read The Docs](https://readthedocs.org/).\nAdditional supporting material can be found\n[here](https://github.com/pybamm-team/pybamm-supporting-material/).\n\nNote 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.\n\n## Versioning\n\nPyBaMM makes releases every four months and we use [CalVer](https://calver.org/), which means that the version number is `YY.MM`. The releases happen, approximately, at the end of January, May and September. There is no difference between releases that increment the year and releases that increment the month; in particular, releases that increment the month may introduce breaking changes. Breaking changes for each release are communicated via the [CHANGELOG](CHANGELOG.md), and come with deprecation warnings or errors that are kept for at least one year (3 releases). If you find a breaking change that is not documented, or think it should be undone, please open an issue on [GitHub](https://github.com/pybamm-team/pybamm).\n\n## 🚀 Installing PyBaMM\n\nPyBaMM is available on GNU/Linux, MacOS and Windows.\nWe strongly recommend to install PyBaMM within a python virtual environment, in order not to alter any distribution python files.\nFor instructions on how to create a virtual environment for PyBaMM, see [the documentation](https://docs.pybamm.org/en/latest/source/user_guide/installation/gnu-linux-mac.html#user-install).\n\n### Using pip\n\n[![pypi](https://img.shields.io/pypi/v/pybamm?color=blue)](https://pypi.org/project/pybamm/)\n[![downloads](https://img.shields.io/pypi/dm/pybamm?color=blue)](https://pypi.org/project/pybamm/)\n\n```bash\npip install pybamm\n```\n\n### Using conda\n\nPyBaMM is available as a conda package through the conda-forge channel.\n\n[![conda_forge](https://img.shields.io/conda/vn/conda-forge/pybamm?color=green)](https://anaconda.org/conda-forge/pybamm)\n[![downloads](https://img.shields.io/conda/dn/conda-forge/pybamm?color=green)](https://anaconda.org/conda-forge/pybamm)\n\n```bash\nconda install -c conda-forge pybamm\n```\n\n### Optional solvers\n\nThe following solvers are optionally available:\n\n- [jax](https://jax.readthedocs.io/en/latest/notebooks/quickstart.html)-based solver, see [the documentation](https://docs.pybamm.org/en/latest/source/user_guide/installation/gnu-linux-mac.html#optional-jaxsolver).\n\n## 📖 Citing PyBaMM\n\nIf you use PyBaMM in your work, please cite our paper\n\n\u003e Sulzer, V., Marquis, S. G., Timms, R., Robinson, M., \u0026 Chapman, S. J. (2021). Python Battery Mathematical Modelling (PyBaMM). _Journal of Open Research Software, 9(1)_.\n\nYou can use the BibTeX\n\n```\n@article{Sulzer2021,\n  title = {{Python Battery Mathematical Modelling (PyBaMM)}},\n  author = {Sulzer, Valentin and Marquis, Scott G. and Timms, Robert and Robinson, Martin and Chapman, S. Jon},\n  doi = {10.5334/jors.309},\n  journal = {Journal of Open Research Software},\n  publisher = {Software Sustainability Institute},\n  volume = {9},\n  number = {1},\n  pages = {14},\n  year = {2021}\n}\n```\n\nWe 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\n\n```python3\npybamm.print_citations()\n```\n\nto 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](https://github.com/pybamm-team/PyBaMM/blob/develop/src/pybamm/CITATIONS.bib). In particular, PyBaMM relies heavily on [CasADi](https://web.casadi.org/publications/).\nSee [CONTRIBUTING.md](https://github.com/pybamm-team/PyBaMM/blob/develop/CONTRIBUTING.md#citations) for information on how to add your own citations when you contribute.\n\n## 🛠️ Contributing to PyBaMM\n\nIf 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](https://github.com/pybamm-team/PyBaMM/blob/develop/CONTRIBUTING.md) first.\n\n## 📫 Get in touch\n\nFor any questions, comments, suggestions or bug reports, please visit:\n\n- Our [Contact Page](https://www.pybamm.org/community)\n- Our [Discussion Forum](https://pybamm.discourse.group/)\n\n## 📃 License\n\nPyBaMM is fully open source. For more information about its license, see [LICENSE](https://github.com/pybamm-team/PyBaMM/blob/develop/LICENSE.txt).\n\n## ✨ Contributors\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind are welcome!\n\nClick here to see [a full list](https://github.com/pybamm-team/PyBaMM/blob/develop/all_contributors.md) of our contributors' profiles.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpybamm-team%2FPyBaMM","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpybamm-team%2FPyBaMM","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpybamm-team%2FPyBaMM/lists"}