A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

liionpack

A battery pack simulation tool that uses the PyBaMM framework.
https://github.com/pybamm-team/liionpack

Category: Energy Storage
Sub Category: Battery

Keywords from Contributors

batteries battery-models pybamm solvers pde plasma finite-difference-method spatial-models energy-system-model energy-system

Last synced: 32 minutes ago
JSON representation

Repository metadata

A battery pack simulation tool that uses the PyBaMM framework

README.md

logo

liionpack
Documentation Status
codecov
Open In Colab
DOI

Overview of liionpack

liionpack takes a 1D PyBaMM model and makes it into a pack. You can either specify
the configuration e.g. 16 cells in parallel and 2 in series (16p2s) or load a
netlist.

[!IMPORTANT]
This repository is currently in "maintenance mode" and is no longer actively developed. Updates will be made to fix critical bugs and keep the package working with new versions of PyBaMM, but no new features will be added.

Installation

Follow the steps given below to install liionpack. The package must be installed to run the included examples. It is recommended to create a virtual environment for the installation, see the documentation.

To install liionpack using pip, run the following command:

pip install liionpack

Conda

The following terminal commands are for setting up a conda development environment for liionpack. This requires the Anaconda or Miniconda Python distribution. This environment installs liionpack in editable mode which is useful for development of the liionpack source code. General users should install liionpack with pip.

# Create a conda environment named lipack
cd liionpack
conda env create --file environment.yml

# Activate the environment
conda activate lipack

# Exit the environment
conda deactivate

# Delete the environment
conda env remove --name lipack

LaTeX

In order to use the draw_circuit functionality a version of Latex must be installed on your machine. We use an underlying Python package Lcapy for making the drawing and direct you to its installation instructions here for operating system specifics.

Example Usage

The following code block illustrates how to use liionpack to perform a simulation:

import liionpack as lp
import numpy as np
import pybamm

# Generate the netlist
netlist = lp.setup_circuit(Np=16, Ns=2, Rb=1e-4, Rc=1e-2, Ri=5e-2, V=3.2, I=80.0)

output_variables = [
    'X-averaged total heating [W.m-3]',
    'Volume-averaged cell temperature [K]',
    'X-averaged negative particle surface concentration [mol.m-3]',
    'X-averaged positive particle surface concentration [mol.m-3]',
]

# Heat transfer coefficients
htc = np.ones(32) * 10

# Cycling experiment, using PyBaMM
experiment = pybamm.Experiment([
    "Charge at 20 A for 30 minutes",
    "Rest for 15 minutes",
    "Discharge at 20 A for 30 minutes",
    "Rest for 30 minutes"],
    period="10 seconds")

# PyBaMM parameters
parameter_values = pybamm.ParameterValues("Chen2020")

# Solve pack
output = lp.solve(netlist=netlist,
                  parameter_values=parameter_values,
                  experiment=experiment,
                  output_variables=output_variables,
                  htc=htc)

Documentation

There is a full API documentation, hosted on Read The Docs that can be found here.

Contributing to liionpack

If you'd like to help us develop liionpack 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.

Acknowledgments

PyBaMM-team acknowledges the funding and support of the Faraday Institution's multi-scale modelling project and Innovate UK.

The development work carried out by members at Oak Ridge National Laboratory was partially sponsored by the Office of Electricity under the United States Department of Energy (DOE).

License

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


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 4 days ago

Total Commits: 730
Total Committers: 14
Avg Commits per committer: 52.143
Development Distribution Score (DDS): 0.367

Commits in past year: 74
Committers in past year: 4
Avg Commits per committer in past year: 18.5
Development Distribution Score (DDS) in past year: 0.378

Name Email Commits
Tom Tranter t****r@g****m 462
Saransh s****1@g****m 76
pre-commit-ci[bot] 6****] 61
Gavin Wiggins 6****g 52
Valentin Sulzer v****r@h****m 20
Priyanshu Agarwal p****6@g****m 16
Ferran Brosa Planella F****a@w****k 12
Tom Tranter t****r@n****k 10
Robert Timms t****s@m****k 6
Eric G. Kratz k****n 6
Alexander Bills a****s@a****u 4
ksnvikrant 9****t 2
Daniel S. Katz d****z@i****g 2
Allu, Srikanth a****s@o****v 1

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 132
Total pull requests: 198
Average time to close issues: about 1 month
Average time to close pull requests: 12 days
Total issue authors: 40
Total pull request authors: 14
Average comments per issue: 3.67
Average comments per pull request: 1.31
Merged pull request: 184
Bot issues: 0
Bot pull requests: 46

Past year issues: 7
Past year pull requests: 53
Past year average time to close issues: N/A
Past year average time to close pull requests: 2 days
Past year issue authors: 6
Past year pull request authors: 5
Past year average comments per issue: 1.0
Past year average comments per pull request: 0.08
Past year merged pull request: 52
Past year bot issues: 0
Past year bot pull requests: 40

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/pybamm-team/liionpack

Top Issue Authors

  • TomTranter (51)
  • wigging (11)
  • tinosulzer (11)
  • brosaplanella (6)
  • Saransh-cpp (4)
  • Jadhav-Sourabh (4)
  • skywo1f (4)
  • mefuller (3)
  • ksnvikrant (3)
  • SyarifulAzis1018 (2)
  • JayYDG (2)
  • lappemic (2)
  • kratman (2)
  • MustafaDragonborne (1)
  • krishnakantsingh14 (1)

Top Pull Request Authors

  • TomTranter (81)
  • pre-commit-ci[bot] (46)
  • Saransh-cpp (19)
  • wigging (14)
  • kratman (8)
  • tinosulzer (8)
  • priyanshuone6 (7)
  • mleot (5)
  • brosaplanella (3)
  • rtimms (2)
  • valentinsulzer (2)
  • abillscmu (1)
  • srikanthallu (1)
  • danielskatz (1)

Top Issue Labels

  • bug (46)
  • enhancement (25)
  • good first issue (5)
  • documentation (4)
  • wontfix (1)

Top Pull Request Labels


Package metadata

pypi.org: liionpack

A battery pack simulator for PyBaMM

  • Homepage: https://github.com/pybamm-team/liionpack
  • Documentation: https://liionpack.readthedocs.io/en/latest/
  • Licenses: MIT License
  • Latest release: 0.4.0 (published 3 months ago)
  • Last Synced: 2025-04-26T13:36:18.044Z (1 day ago)
  • Versions: 14
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 713 Last month
  • Rankings:
    • Dependent packages count: 7.31%
    • Forks count: 8.576%
    • Stargazers count: 8.585%
    • Average: 14.319%
    • Dependent repos count: 22.088%
    • Downloads: 25.036%
  • Maintainers (1)

Dependencies

docs/requirements.txt pypi
  • mkdocs-jupyter *
  • mkdocs-material *
  • mkdocstrings-python-legacy *
.github/workflows/periodic_benchmarks.yml actions
  • actions/checkout v2 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
.github/workflows/publish_pypi.yml actions
  • actions/checkout v3 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v2 composite
  • pypa/gh-action-pypi-publish release/v1 composite
.github/workflows/run_benchmarks_over_history.yml actions
  • actions/checkout v2 composite
  • actions/download-artifact v2 composite
  • actions/setup-python v2 composite
  • actions/upload-artifact v2 composite
.github/workflows/test_on_push.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v1 composite
pyproject.toml pypi
  • Ipython *
  • lcapy *
  • matplotlib *
  • nbconvert *
  • networkx *
  • numpy *
  • openpyxl *
  • pandas *
  • plotly *
  • pybamm >=23.5
  • ray *
  • redis *
  • scikit-spatial *
  • scipy *
  • textwrapper *
  • tqdm *
environment.yml conda
  • ipython
  • jupyter
  • matplotlib
  • numpy
  • pandas
  • pip
  • python 3.9.*
  • scipy
  • sympy

Score: 13.990463365420796