Skip to content

Commit

Permalink
Merge pull request #1631 from pybamm-team/develop
Browse files Browse the repository at this point in the history
Release 21.08
  • Loading branch information
valentinsulzer committed Sep 1, 2021
2 parents 658ee57 + d14e38b commit c4ba93f
Show file tree
Hide file tree
Showing 735 changed files with 44,918 additions and 10,506 deletions.
51 changes: 51 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
],
"imageSize": 100,
"commit": false,
"badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg)](#-contributors)",
"contributors": [
{
"login": "tinosulzer",
Expand Down Expand Up @@ -355,6 +356,56 @@
"code",
"test"
]
},
{
"login": "alibh95",
"name": "Ali Hussain Umar Bhatti",
"avatar_url": "https://avatars.githubusercontent.com/u/65511923?v=4",
"profile": "https://github.com/alibh95",
"contributions": [
"code",
"test"
]
},
{
"login": "molel-gt",
"name": "Leshinka Molel",
"avatar_url": "https://avatars.githubusercontent.com/u/81125862?v=4",
"profile": "https://github.com/molel-gt",
"contributions": [
"code",
"ideas"
]
},
{
"login": "tobykirk",
"name": "tobykirk",
"avatar_url": "https://avatars.githubusercontent.com/u/42966045?v=4",
"profile": "https://github.com/tobykirk",
"contributions": [
"ideas",
"code",
"test"
]
},
{
"login": "chuckliu1979",
"name": "Chuck Liu",
"avatar_url": "https://avatars.githubusercontent.com/u/13491954?v=4",
"profile": "https://github.com/chuckliu1979",
"contributions": [
"bug",
"code"
]
},
{
"login": "partben",
"name": "partben",
"avatar_url": "https://avatars.githubusercontent.com/u/88316576?v=4",
"profile": "https://github.com/partben",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 3 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ignore:
- pybamm/parameters_cli.py
- pybamm/install_odes.py
9 changes: 5 additions & 4 deletions .github/release_checklist.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
- Increment version number in `version`
- Increment version number in `docs/conf.py`
- Update CHANGELOG.md with a summary of the release
- Update (and pin) jax and jaxlib to latest version and fix any bugs that arise
- Increment version number in `version`
- Increment version number in `docs/conf.py`
- Increment version number in `CITATION.cff`
- Update CHANGELOG.md with a summary of the release
- Update (and pin) jax and jaxlib to latest version and fix any bugs that arise
9 changes: 6 additions & 3 deletions .github/workflows/run_benchmarks_over_history.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,18 +60,21 @@ jobs:
- name: Checkout pybamm-bench repo
uses: actions/checkout@v2
with:
repository: tlestang/pybamm-bench
repository: pybamm-team/pybamm-bench
token: ${{ secrets.BENCH_PAT }}
- name: Download results artifact
uses: actions/download-artifact@v2
with:
name: asv_new_results
path: new_results
- name: Copy new results and push to pybamm-bench repo
env:
PUSH_BENCH_EMAIL: ${{ secrets.PUSH_BENCH_EMAIL }}
PUSH_BENCH_NAME: ${{ secrets.PUSH_BENCH_NAME }}
run: |
cp -vr new_results/* results
git config --global user.email "[email protected]"
git config --global user.name "Thibault Lestang"
git config --global user.email "$PUSH_BENCH_EMAIL"
git config --global user.name "$PUSH_BENCH_NAME"
git add results
git commit -am "Add new results"
git push
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_on_push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ jobs:
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}

- name: Install Linux system dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt install gfortran gcc libopenblas-dev graphviz
sudo apt install texlive-full
- name: Install MacOS system dependencies
if: matrix.os == 'macos-latest'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/update_parameter_sets_doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ on:
branches:
- develop
paths:
- 'pybamm/parameters/parameter_sets.py'
- 'pybamm/parameters/CITATIONS.txt'
- pybamm/parameters/parameter_sets.py
- pybamm/CITATIONS.txt

jobs:
build:
Expand Down
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ out/
config.py
matplotlibrc
*.pickle
*.sav

# ideas
ideas/
Expand Down Expand Up @@ -103,11 +104,14 @@ KLU_module_deps
# setup
setup.log

# test
test.c

# tox
.tox/

# julia
Manifest.toml

# vcpkg
vcpkg_installed/
vcpkg_installed/
72 changes: 68 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,68 @@
# [v21.08](https://github.com/pybamm-team/PyBaMM/tree/v21.08) - 2021-08-26

This release introduces:
- the switch to calendar versioning: from now on we will use year.month version number
- sensitivity analysis of solutions with respect to input parameters
- several new models, including many-particle and state-of-health models
- improvement on how CasADI solver's handle events, including a new "fast with events" mode
- several other new features, optimizations, and bug fixes, summarized below

## Features

- Added submodels and functionality for particle-size distributions in the DFN model, including an
example notebook ([#1602](https://github.com/pybamm-team/PyBaMM/pull/1602))
- Added UDDS and WLTC drive cycles ([#1601](https://github.com/pybamm-team/PyBaMM/pull/1601))
- Added LG M50 (NMC811 and graphite + SiOx) parameter set from O'Regan 2021 ([#1594](https://github.com/pybamm-team/PyBaMM/pull/1594))
- `pybamm.base_solver.solve` function can take a list of input parameters to calculate the sensitivities of the solution with respect to. Alternatively, it can be set to `True` to calculate the sensitivities for all input parameters ([#1552](https://github.com/pybamm-team/PyBaMM/pull/1552))
- Added capability for `quaternary` domains (in addition to `primary`, `secondary` and `tertiary`), increasing the maximum number of domains that a `Symbol` can have to 4. ([#1580](https://github.com/pybamm-team/PyBaMM/pull/1580))
- Tabs can now be placed at the bottom of the cell in 1+1D thermal models ([#1581](https://github.com/pybamm-team/PyBaMM/pull/1581))
- Added temperature dependence on electrode electronic conductivity ([#1570](https://github.com/pybamm-team/PyBaMM/pull/1570))
- `pybamm.base_solver.solve` function can take a list of input parameters to calculate the sensitivities of the solution with respect to. Alternatively, it can be set to `True` to calculate the sensitivities for all input parameters ([#1552](https://github.com/pybamm-team/PyBaMM/pull/1552))
- Added a new lithium-ion model `MPM` or Many-Particle Model, with a distribution of particle sizes in each electrode. ([#1529](https://github.com/pybamm-team/PyBaMM/pull/1529))
- Added 2 new submodels for lithium transport in a size distribution of electrode particles: Fickian diffusion (`FickianSingleSizeDistribution`) and uniform concentration profile (`FastSingleSizeDistribution`). ([#1529](https://github.com/pybamm-team/PyBaMM/pull/1529))
- Added a "particle size" domain to the default lithium-ion geometry, including plotting capabilities (`QuickPlot`) and processing of variables (`ProcessedVariable`). ([#1529](https://github.com/pybamm-team/PyBaMM/pull/1529))
- Added fitted expressions for OCPs for the Chen2020 parameter set ([#1526](https://github.com/pybamm-team/PyBaMM/pull/1497))
- Added `initial_soc` argument to `Simualtion.solve` for specifying the initial SOC when solving a model ([#1512](https://github.com/pybamm-team/PyBaMM/pull/1512))
- Added `print_name` to some symbols ([#1495](https://github.com/pybamm-team/PyBaMM/pull/1495), [#1497](https://github.com/pybamm-team/PyBaMM/pull/1497))
- Added Base Parameters class and SymPy in dependencies ([#1495](https://github.com/pybamm-team/PyBaMM/pull/1495))
- Added a new "reaction-driven" model for LAM from Reniers et al (2019) ([#1490](https://github.com/pybamm-team/PyBaMM/pull/1490))
- Some features ("loss of active material" and "particle mechanics") can now be specified separately for the negative electrode and positive electrode by passing a 2-tuple ([#1490](https://github.com/pybamm-team/PyBaMM/pull/1490))
- `plot` and `plot2D` now take and return a matplotlib Axis to allow for easier customization ([#1472](https://github.com/pybamm-team/PyBaMM/pull/1472))
- `ParameterValues.evaluate` can now return arrays to allow function parameters to be easily evaluated ([#1472](https://github.com/pybamm-team/PyBaMM/pull/1472))
- Added option to save only specific cycle numbers when simulating an `Experiment` ([#1459](https://github.com/pybamm-team/PyBaMM/pull/1459))
- Added capacity-based termination conditions when simulating an `Experiment` ([#1459](https://github.com/pybamm-team/PyBaMM/pull/1459))
- Added "summary variables" to track degradation over several cycles ([#1459](https://github.com/pybamm-team/PyBaMM/pull/1459))
- Added `ElectrodeSOH` model for calculating capacities and stoichiometric limits ([#1459](https://github.com/pybamm-team/PyBaMM/pull/1459))
- Added Batch Study class ([#1455](https://github.com/pybamm-team/PyBaMM/pull/1455))
- Added `ConcatenationVariable`, which is automatically created when variables are concatenated ([#1453](https://github.com/pybamm-team/PyBaMM/pull/1453))
- Added "fast with events" mode for the CasADi solver, which solves a model and finds events more efficiently than "safe" mode. As of PR #1450 this feature is still being tested and "safe" mode remains the default ([#1450](https://github.com/pybamm-team/PyBaMM/pull/1450))

## Optimizations

- Models that mostly use x-averaged quantities (SPM and SPMe) now use x-averaged degradation models ([#1490](https://github.com/pybamm-team/PyBaMM/pull/1490))
- Improved how the CasADi solver's "safe" mode finds events ([#1450](https://github.com/pybamm-team/PyBaMM/pull/1450))
- Perform more automatic simplifications of the expression tree ([#1449](https://github.com/pybamm-team/PyBaMM/pull/1449))
- Reduce time taken to hash a sparse `Matrix` object ([#1449](https://github.com/pybamm-team/PyBaMM/pull/1449))

## Bug fixes

- Updated documentation to include some previously missing functions, such as `erf` and `tanh` ([#1628](https://github.com/pybamm-team/PyBaMM/pull/1628))
- Fixed reading citation file without closing ([#1620](https://github.com/pybamm-team/PyBaMM/pull/1620))
- Porosity variation for SEI and plating models is calculated from the film thickness rather than from a separate ODE ([#1617](https://github.com/pybamm-team/PyBaMM/pull/1617))
- Fixed a bug where the order of the indexing for the entries of variables discretised using FEM was incorrect ([#1556](https://github.com/pybamm-team/PyBaMM/pull/1556))
- Fix broken module import for spyder when running a script twice ([#1555](https://github.com/pybamm-team/PyBaMM/pull/1555))
- Fixed ElectrodeSOH model for multi-dimensional simulations ([#1548](https://github.com/pybamm-team/PyBaMM/pull/1548))
- Removed the overly-restrictive check "each variable in the algebraic eqn keys must appear in the eqn" ([#1510](https://github.com/pybamm-team/PyBaMM/pull/1510))
- Made parameters importable through pybamm ([#1475](https://github.com/pybamm-team/PyBaMM/pull/1475))

## Breaking changes
- Refactored the `particle` submodel module, with the models having no size distribution now found in `particle.no_distribution`, and those with a size distribution in `particle.size_distribution`. Renamed submodels to indicate the transport model (Fickian diffusion, polynomial profile) and if they are "x-averaged". E.g., `FickianManyParticles` and `FickianSingleParticle` are now `no_distribution.FickianDiffusion` and `no_distribution.XAveragedFickianDiffusion` ([#1602](https://github.com/pybamm-team/PyBaMM/pull/1602))
- Changed sensitivity API. Removed `ProcessedSymbolicVariable`, all sensitivity now handled within the solvers and `ProcessedVariable` () ([#1552](https://github.com/pybamm-team/PyBaMM/pull/1552))
- The `Yang2017` parameter set has been removed as the complete parameter set is not publicly available in the literature ([#1577](https://github.com/pybamm-team/PyBaMM/pull/1577))
- Changed how options are specified for the "loss of active material" and "particle cracking" submodels. "loss of active material" can now be one of "none", "stress-driven", or "reaction-driven", or a 2-tuple for different options in negative and positive electrode. Similarly "particle cracking" (now called "particle mechanics") can now be "none", "swelling only", "swelling and cracking", or a 2-tuple ([#1490](https://github.com/pybamm-team/PyBaMM/pull/1490))
- Changed the variable in the full diffusion model from "Electrolyte concentration" to "Porosity times concentration" ([#1476](https://github.com/pybamm-team/PyBaMM/pull/1476))
- Renamed `lithium-ion` folder to `lithium_ion` and `lead-acid` folder to `lead_acid` in parameters ([#1464](https://github.com/pybamm-team/PyBaMM/pull/1464))

# [v0.4.0](https://github.com/pybamm-team/PyBaMM/tree/v0.4.0) - 2021-03-28

This release introduces:
Expand Down Expand Up @@ -69,11 +134,11 @@ This release introduces:

# [v0.3.0](https://github.com/pybamm-team/PyBaMM/tree/v0.3.0) - 2020-12-01

This release introduces a new aging model for particle swelling and cracking, a new reduced-order model (TSPMe), and a parameter set for A123 LFP cells. Additionally, there have been several backend optimizations to speed up model creation and solving, and other minor features and bug fixes.
This release introduces a new aging model for particle mechanics, a new reduced-order model (TSPMe), and a parameter set for A123 LFP cells. Additionally, there have been several backend optimizations to speed up model creation and solving, and other minor features and bug fixes.

## Features

- Added a submodel for particle swelling and cracking ([#1232](https://github.com/pybamm-team/PyBaMM/pull/1232))
- Added a submodel for particle mechanics ([#1232](https://github.com/pybamm-team/PyBaMM/pull/1232))
- Added a notebook on how to speed up the solver and handle instabilities ([#1223](https://github.com/pybamm-team/PyBaMM/pull/1223))
- Improve string printing of `BinaryOperator`, `Function`, and `Concatenation` objects ([#1223](https://github.com/pybamm-team/PyBaMM/pull/1223))
- Added `Solution.integration_time`, which is the time taken just by the integration subroutine, without extra setups ([#1223](https://github.com/pybamm-team/PyBaMM/pull/1223))
Expand Down Expand Up @@ -140,7 +205,6 @@ This release adds new operators for more complex models, some basic sensitivity
(e.g. `standard_parameters_lithium_ion` is now `LithiumIonParameters`) ([#1120](https://github.com/pybamm-team/PyBaMM/pull/1120))
- Renamed `quick_plot_vars` to `output_variables` in `Simulation` to be consistent with `QuickPlot`. Passing `quick_plot_vars` to `Simulation.plot()` has been deprecated and `output_variables` should be passed instead ([#1099](https://github.com/pybamm-team/PyBaMM/pull/1099))


# [v0.2.3](https://github.com/pybamm-team/PyBaMM/tree/v0.2.3) - 2020-07-01

This release enables the use of [Google Colab](https://colab.research.google.com/github/pybamm-team/PyBaMM/blob/main/) for running example notebooks, and adds some small new features and bug fixes.
Expand Down Expand Up @@ -289,7 +353,7 @@ This release introduces many new features and optimizations. All models can now

## Features

- Added LG M50 parameter set ([#854](https://github.com/pybamm-team/PyBaMM/pull/854))
- Added LG M50 parameter set from Chen 2020 ([#854](https://github.com/pybamm-team/PyBaMM/pull/854))
- Changed rootfinding algorithm to CasADi, scipy.optimize.root still accessible as an option ([#844](https://github.com/pybamm-team/PyBaMM/pull/844))
- Added capacitance effects to lithium-ion models ([#842](https://github.com/pybamm-team/PyBaMM/pull/842))
- Added NCA parameter set ([#824](https://github.com/pybamm-team/PyBaMM/pull/824))
Expand Down
29 changes: 29 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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: 21.08
repository-code: "https://github.com/pybamm-team/PyBaMM"
title: "Python Battery Mathematical Modelling (PyBaMM)"
Loading

0 comments on commit c4ba93f

Please sign in to comment.