Skip to main content

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.

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.

Metadata

Release files for liionpack 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for liionpack 0.4.0
File Size Uploaded
liionpack-0.4.0.tar.gz 4.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for liionpack 0.4.0
File Interpreter ABI Platform
liionpack-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.4 MB

Release files / liionpack-0.4.0.tar.gz

Download URL liionpack-0.4.0.tar.gz
Size 4.4 MB
Tags Source
SHA-256 checksum
How to use checksums
593477d72c178f69876a8fb8e07d0d9b43c20b792501476342565f284b653342
BLAKE2b-256 checksum
How to use checksums
919fdba252881f5bb68238e49ae5bd7f3b714d7b0b2dd5a290143c23b9f5c14c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / liionpack-0.4.0-py3-none-any.whl

Download URL liionpack-0.4.0-py3-none-any.whl
Size 31.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
54c7311d7c9d36723a63f7515d4a8812543937cd855d29fc3ac76383dd100f16
BLAKE2b-256 checksum
How to use checksums
e5fa5a8c560777958ed83e1a8985b7124e658576f3d81166d6442109e87684d6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.9

2 release files

0.3.8

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page