Skip to content

Commit

Permalink
Merge pull request #2497 from pybamm-team/develop
Browse files Browse the repository at this point in the history
Make release v22.11
  • Loading branch information
valentinsulzer authored Dec 4, 2022
2 parents c544b6d + c17756f commit efd426c
Show file tree
Hide file tree
Showing 238 changed files with 20,990 additions and 4,963 deletions.
3 changes: 2 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,8 @@
"avatar_url": "https://avatars.githubusercontent.com/u/74401230?v=4",
"profile": "https://github.com/agriyakhetarpal",
"contributions": [
"infra"
"infra",
"code"
]
},
{
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
!CMakeLists.txt
!pybamm/CITATIONS.txt
!pybamm/input/**/*.csv
!tests/unit/test_parameters/*.csv
!benchmarks/benchmark_images/*.png

# running files
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0-alpha.3
rev: v3.0.0-alpha.4
hooks:
- id: prettier
exclude: assets/js/webapp\.js
Expand All @@ -15,6 +15,6 @@ repos:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: 5.0.4
rev: 6.0.0
hooks:
- id: flake8
33 changes: 32 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,45 @@
# [Unreleased](https://github.com/pybamm-team/PyBaMM/)

# [v22.11](https://github.com/pybamm-team/PyBaMM/tree/v22.11) - 2022-11-30

## Features

- Updated parameter sets so that interpolants are created explicitly in the parameter set python file. This does not change functionality but allows finer control, e.g. specifying a "cubic" interpolator instead of the default "linear" ([#2510](https://github.com/pybamm-team/PyBaMM/pull/2510))
- Equivalent circuit models ([#2478](https://github.com/pybamm-team/PyBaMM/pull/2478))
- New Idaklu solver options for jacobian type and linear solver, support Sundials v6 ([#2444](https://github.com/pybamm-team/PyBaMM/pull/2444))
- Added `scale` and `reference` attributes to `Variable` objects, which can be use to make the ODE/DAE solver better conditioned ([#2440](https://github.com/pybamm-team/PyBaMM/pull/2440))
- SEI reactions can now be asymmetric ([#2425](https://github.com/pybamm-team/PyBaMM/pull/2425))

## Bug fixes

- Switched from `pkg_resources` to `importlib_metadata` for handling entry points ([#2500](https://github.com/pybamm-team/PyBaMM/pull/2500))
- Fixed some bugs related to processing `FunctionParameter` to `Interpolant` ([#2494](https://github.com/pybamm-team/PyBaMM/pull/2494))

## Optimizations

- `ParameterValues` now avoids trying to process children if a function parameter is an object that doesn't depend on its children ([#2477](https://github.com/pybamm-team/PyBaMM/pull/2477))
- Implemented memoization via `cache` and `cached_property` from functools ([#2465](https://github.com/pybamm-team/PyBaMM/pull/2465))
- Added more rules for simplifying expressions, especially around Concatenations. Also, meshes constructed from multiple domains are now cached ([#2443](https://github.com/pybamm-team/PyBaMM/pull/2443))
- Added more rules for simplifying expressions. Constants in binary operators are now moved to the left by default (e.g. `x*2` returns `2*x`) ([#2424](https://github.com/pybamm-team/PyBaMM/pull/2424))

## Breaking changes

- Interpolants created from parameter data are now "linear" by default (was "cubic") ([#2494](https://github.com/pybamm-team/PyBaMM/pull/2494))
- Renamed entry point for parameter sets to `pybamm_parameter_sets` ([#2475](https://github.com/pybamm-team/PyBaMM/pull/2475))
- Removed code for generating `ModelingToolkit` problems ([#2432](https://github.com/pybamm-team/PyBaMM/pull/2432))
- Removed `FirstOrder` and `Composite` lead-acid models, and some submodels specific to those models ([#2431](https://github.com/pybamm-team/PyBaMM/pull/2431))

# [v22.10.post1](https://github.com/pybamm-team/PyBaMM/tree/v22.10.post1) - 2022-10-31

## Breaking changes

- Removed all julia generation code ([#2453](https://github.com/pybamm-team/PyBaMM/pull/2453)). Julia code will be hosted at [PyBaMM.jl](https://github.com/tinosulzer/PyBaMM.jl) from now on.

# [v22.10](https://github.com/pybamm-team/PyBaMM/tree/v22.10) - 2022-10-31

## Features

- Third-party parameter sets can be added by registering entry points to `pybamm_parameter_set` ([#2396](https://github.com/pybamm-team/PyBaMM/pull/2396))
- Third-party parameter sets can be added by registering entry points to ~~`pybamm_parameter_set`~~`pybamm_parameter_sets` ([#2396](https://github.com/pybamm-team/PyBaMM/pull/2396), changed in [#2475](https://github.com/pybamm-team/PyBaMM/pull/2475))
- Added three-dimensional interpolation ([#2380](https://github.com/pybamm-team/PyBaMM/pull/2380))

## Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ keywords:
- "expression tree"
- "python"
- "symbolic differentiation"
version: "22.10"
version: "22.11"
repository-code: "https://github.com/pybamm-team/PyBaMM"
title: "Python Battery Mathematical Modelling (PyBaMM)"
3 changes: 3 additions & 0 deletions CMakeBuild.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ def run(self):
use_python_casadi = False
else:
use_python_casadi = True

build_type = os.getenv("PYBAMM_CPP_BUILD_TYPE", "RELEASE")
cmake_args = [
"-DCMAKE_BUILD_TYPE={}".format(build_type),
"-DPYTHON_EXECUTABLE={}".format(sys.executable),
"-DUSE_PYTHON_CASADI={}".format("TRUE" if use_python_casadi else "FALSE"),
]
Expand Down
20 changes: 13 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,20 @@ endif()

add_subdirectory(${PYBIND11_DIR})
pybind11_add_module(idaklu
pybamm/solvers/c_solvers/idaklu_python.cpp
pybamm/solvers/c_solvers/idaklu_python.hpp
pybamm/solvers/c_solvers/idaklu/casadi_functions.cpp
pybamm/solvers/c_solvers/idaklu/casadi_functions.hpp
pybamm/solvers/c_solvers/idaklu/casadi_solver.cpp
pybamm/solvers/c_solvers/idaklu/casadi_solver.hpp
pybamm/solvers/c_solvers/idaklu/casadi_sundials_functions.hpp
pybamm/solvers/c_solvers/idaklu/casadi_sundials_functions.cpp
pybamm/solvers/c_solvers/idaklu/common.hpp
pybamm/solvers/c_solvers/idaklu/python.hpp
pybamm/solvers/c_solvers/idaklu/python.cpp
pybamm/solvers/c_solvers/idaklu/solution.cpp
pybamm/solvers/c_solvers/idaklu/solution.hpp
pybamm/solvers/c_solvers/idaklu/options.hpp
pybamm/solvers/c_solvers/idaklu/options.cpp
pybamm/solvers/c_solvers/idaklu.cpp
pybamm/solvers/c_solvers/idaklu.hpp
pybamm/solvers/c_solvers/idaklu_casadi.cpp
pybamm/solvers/c_solvers/idaklu_casadi.hpp
pybamm/solvers/c_solvers/solution.cpp
pybamm/solvers/c_solvers/solution.hpp
)

if (NOT DEFINED USE_PYTHON_CASADI)
Expand Down
8 changes: 8 additions & 0 deletions FindSUNDIALS.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#
# * sundials_ida
# * sundials_sunlinsolklu
# * sundials_sunlinsoldense
# * sundials_sunlinsollapackdense
# * sundials_sunmatrix_sparse
# * sundials_nvecserial
#
Expand All @@ -31,6 +33,9 @@ find_path(SUNDIALS_INCLUDE_DIR
sundials/sundials_math.h
sundials/sundials_types.h
sunlinsol/sunlinsol_klu.h
sunlinsol/sunlinsol_dense.h
sunlinsol/sunlinsol_spbcgs.h
sunlinsol/sunlinsol_lapackdense.h
sunmatrix/sunmatrix_sparse.h
PATH_SUFFIXES
include
Expand All @@ -41,6 +46,9 @@ find_path(SUNDIALS_INCLUDE_DIR
set(SUNDIALS_WANT_COMPONENTS
sundials_idas
sundials_sunlinsolklu
sundials_sunlinsoldense
sundials_sunlinsolspbcgs
sundials_sunlinsollapackdense
sundials_sunmatrixsparse
sundials_nvecserial
)
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,9 @@ Additional supporting material can be found

Note 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.

<!-- For further examples, see the list of repositories that use PyBaMM [here](https://github.com/pybamm-team/pybamm-example-results). -->
## Versioning

PyBaMM uses [CalVer](https://calver.org/), which means that we make new releases every month with the version number `YY.MM`. 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 (12 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).

## 🚀 Installing PyBaMM

Expand Down Expand Up @@ -214,7 +216,7 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
<td align="center"><a href="https://github.com/ndrewwang"><img src="https://avatars.githubusercontent.com/u/56122552?v=4?s=100" width="100px;" alt="ndrewwang"/><br /><sub><b>ndrewwang</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/issues?q=author%3Andrewwang" title="Bug reports">🐛</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=ndrewwang" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/MichaPhilipp"><img src="https://avatars.githubusercontent.com/u/58085966?v=4?s=100" width="100px;" alt="MichaPhilipp"/><br /><sub><b>MichaPhilipp</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/issues?q=author%3AMichaPhilipp" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/abillscmu"><img src="https://avatars.githubusercontent.com/u/48105066?v=4?s=100" width="100px;" alt="Alec Bills"/><br /><sub><b>Alec Bills</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/commits?author=abillscmu" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/agriyakhetarpal"><img src="https://avatars.githubusercontent.com/u/74401230?v=4?s=100" width="100px;" alt="Agriya Khetarpal"/><br /><sub><b>Agriya Khetarpal</b></sub></a><br /><a href="#infra-agriyakhetarpal" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a></td>
<td align="center"><a href="https://github.com/agriyakhetarpal"><img src="https://avatars.githubusercontent.com/u/74401230?v=4?s=100" width="100px;" alt="Agriya Khetarpal"/><br /><sub><b>Agriya Khetarpal</b></sub></a><br /><a href="#infra-agriyakhetarpal" title="Infrastructure (Hosting, Build-Tools, etc)">🚇</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=agriyakhetarpal" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/awadell1"><img src="https://avatars.githubusercontent.com/u/5857298?v=4?s=100" width="100px;" alt="Alex Wadell"/><br /><sub><b>Alex Wadell</b></sub></a><br /><a href="https://github.com/pybamm-team/PyBaMM/commits?author=awadell1" title="Code">💻</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=awadell1" title="Tests">⚠️</a> <a href="https://github.com/pybamm-team/PyBaMM/commits?author=awadell1" title="Documentation">📖</a></td>
</tr>
</tbody>
Expand Down
4 changes: 4 additions & 0 deletions benchmarks/different_model_options.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,10 +124,12 @@ class TimeBuildModelSEI:
"none",
"constant",
"reaction limited",
"reaction limited (asymmetric)",
"solvent-diffusion limited",
"electron-migration limited",
"interstitial-diffusion limited",
"ec reaction limited",
"ec reaction limited (asymmetric)",
],
)

Expand All @@ -143,10 +145,12 @@ class TimeSolveSEI:
"none",
"constant",
"reaction limited",
"reaction limited (asymmetric)",
"solvent-diffusion limited",
"electron-migration limited",
"interstitial-diffusion limited",
"ec reaction limited",
"ec reaction limited (asymmetric)",
],
)

Expand Down
23 changes: 0 additions & 23 deletions build-pure-wheel.sh

This file was deleted.

50 changes: 0 additions & 50 deletions build-wheel.sh

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
author = "The PyBaMM Team"

# The short X.Y version
version = "22.10"
version = "22.11"
# The full version, including alpha/beta/rc tags
release = version

Expand Down
7 changes: 7 additions & 0 deletions docs/source/models/equivalent_circuit/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Equivalent Circuit Models
=========================

.. toctree::
:maxdepth: 1

thevenin
5 changes: 5 additions & 0 deletions docs/source/models/equivalent_circuit/thevenin.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Thevenin Model
==============

.. autoclass:: pybamm.equivalent_circuit.Thevenin
:members:
1 change: 1 addition & 0 deletions docs/source/models/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ to see how these models can be solved, and compared, using PyBaMM.
base_models/index
lithium_ion/index
lead_acid/index
equivalent_circuit/index
submodels/index
14 changes: 0 additions & 14 deletions docs/source/models/lead_acid/higher_order.rst

This file was deleted.

1 change: 0 additions & 1 deletion docs/source/models/lead_acid/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ Lead Acid Models

base_lead_acid_model
loqs
higher_order
full

This file was deleted.

2 changes: 0 additions & 2 deletions docs/source/models/submodels/current_collector/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ Current Collector
:maxdepth: 1

base_current_collector
composite_potential_pair
effective_resistance_current_collector
homogeneous_current_collector
potential_pair
quite_conductive_potential_pair

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ Electrolyte Diffusion
base_electrolyte_diffusion
constant_concentration
leading_order_diffusion
composite_diffusion
full_diffusion
10 changes: 10 additions & 0 deletions docs/source/models/submodels/equivalent_circuit_elements/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Equivalent Circuit Elements
===========================

.. toctree::

ocv_element
resistor_element
rc_element
thermal
voltage_model
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
OCV Element
===========

.. autoclass:: pybamm.equivalent_circuit_elements.OCVElement
:members:

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
RC Element
==========

.. autoclass:: pybamm.equivalent_circuit_elements.RCElement
:members:

Loading

0 comments on commit efd426c

Please sign in to comment.