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

Ampere

Advanced Model Package for ElectRochemical Experiments.
https://github.com/nealde/Ampere

Category: Energy Storage
Sub Category: Battery

Last synced: about 21 hours ago
JSON representation

Repository metadata

A python package for battery models

README.md

Ampere - Advanced Model Package for ElectRochemical Experiments

Ampere is a Python module for working with battery models.

Using a scikit-learn-like API, we hope to make visualizing, fitting, and analyzing impedance spectra more intuitive and reproducible.

Ampere is currently in the alpha phase and new features are rapidly being added.
If you have a feature request or find a bug, please feel free to file an issue or, better yet, make the code improvements and submit a pull request! The goal is to build an open-source tool that the entire electrochemical community can use and improve

Ampere currently provides:

  • A simple API for fitting, predicting, and plotting discharge curves
  • A simple API for generating data, or fitting with arbitrary charge / discharge patterns.

Installation

Dependencies

Ampere requires:

  • Python (>=3.5)
  • SciPy (>=1.0)
  • NumPy (>=1.14)
  • Matplotlib (>=2.0)
  • Cython (>=0.29)

Several example notebooks are provided in the examples/ directory. Opening these will require Jupyter notebook or Jupyter lab.

User Installation

The easiest way to install Ampere is using pip:

pip install ampere

However, it depends on Cython and Microsoft c++ libraries in order to install (on windows). Those should be added as follows:

pip install --upgrade cython setuptools

follow these instructions to install the proper c++ libraries using Microsoft tools.

That may or may not work, depending upon your system. An alternative method of installation that works is:

git clone https://github.com/nealde/ampere

I've recently added the Cython-generated c files back to the repo, so it may be as simple as:

cd ampere
python setup.py install

However, if that doesn't work, the following will rebuild the files:

cd ampere/models/P2D

python setup.py build_ext --inplace

cd ../SPM

python setup.py build_ext --inplace

This will build the local C code that is needed by the main compiler. Then, you can cd back up to the main folder and

python setup.py install

That will typically work. I'm still working on getting pip installation working, and it will likely require some package modifications,
following SKLearn as a guide.

Examples and Documentation

Examples and documentation will be provided after my Defense, which is set for the end of May.

On the Horizon

  • Currently, all models are solved with Finite Difference discretization. I would love to use some higher order spatial discretizations.

  • Currently, the results have not been verified with external models. That is still on the to-do list, and to incorporate those values into the test suite would be excellent.

  • Some of my published work regarding surrogate models for solving and fitting will be implemented once they are fully fleshed out.

  • Add ability to serialize / deserialize models from disk, to save the result of an optimization

  • add ability to have custom Up / Un functions for different battery chemistries

  • add documentation / fix docstrings to be accurate

  • add Latex equations and node spacings


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 7 days ago

Total Commits: 30
Total Committers: 1
Avg Commits per committer: 30.0
Development Distribution Score (DDS): 0.0

Commits in past year: 0
Committers in past year: 0
Avg Commits per committer in past year: 0.0
Development Distribution Score (DDS) in past year: 0.0

Name Email Commits
Neal n****e@u****u 30

Committer domains:


Issue and Pull Request metadata

Last synced: 2 days ago

Total issues: 9
Total pull requests: 2
Average time to close issues: 4 months
Average time to close pull requests: N/A
Total issue authors: 3
Total pull request authors: 1
Average comments per issue: 0.78
Average comments per pull request: 0.0
Merged pull request: 0
Bot issues: 0
Bot pull requests: 2

Past year issues: 0
Past year pull requests: 0
Past year average time to close issues: N/A
Past year average time to close pull requests: N/A
Past year issue authors: 0
Past year pull request authors: 0
Past year average comments per issue: 0
Past year average comments per pull request: 0
Past year merged pull request: 0
Past year bot issues: 0
Past year bot pull requests: 0

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/nealde/Ampere

Top Issue Authors

  • nealde (7)
  • kepeng (1)
  • tvanyo (1)

Top Pull Request Authors

  • dependabot[bot] (2)

Top Issue Labels

Top Pull Request Labels

  • dependencies (2)

Package metadata

pypi.org: ampere

A Python package for working with battery discharge data and physics-based battery models

  • Homepage: https://github.com/nealde/Ampere
  • Documentation: https://ampere.readthedocs.io/
  • Licenses: MIT License
  • Latest release: 0.5.9 (published almost 4 years ago)
  • Last Synced: 2025-04-26T12:02:26.953Z (2 days ago)
  • Versions: 25
  • Dependent Packages: 0
  • Dependent Repositories: 1
  • Downloads: 525 Last month
  • Rankings:
    • Dependent packages count: 7.373%
    • Forks count: 12.605%
    • Stargazers count: 13.615%
    • Average: 14.794%
    • Downloads: 18.146%
    • Dependent repos count: 22.233%
  • Maintainers (1)

Dependencies

requirements.txt pypi
  • matplotlib ==2.2.2
  • nbsphinx *
  • nose ==1.3.7
  • numpy ==1.14.2
  • numpydoc ==0.8.0
  • scipy ==1.0.1
setup.py pypi
  • cython *
  • matplotlib *
  • numpy *
  • scipy *

Score: 9.668397930203518