Skip to content

Commit

Permalink
Merge branch 'pybamm-team:develop' into Issue-pybamm-team#2457-Make-j…
Browse files Browse the repository at this point in the history
…upyter-a-dev-only-dependency
  • Loading branch information
arjxn-py authored Apr 1, 2023
2 parents ecade1e + 08dc8f7 commit 1dec74e
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 134 deletions.
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# [Unreleased](https://github.com/pybamm-team/PyBaMM/)

# [v23.3](https://github.com/pybamm-team/PyBaMM/tree/v23.3) - 2023-03-31

## Features

- Added option to limit the number of integrators stored in CasadiSolver, which is particularly relevant when running simulations back-to-back [#2823](https://github.com/pybamm-team/PyBaMM/pull/2823)
- Added new variables, related to electrode balance, for the `ElectrodeSOH` model ([#2807](https://github.com/pybamm-team/PyBaMM/pull/2807))
- Added method to calculate maximum theoretical energy. ([#2777](https://github.com/pybamm-team/PyBaMM/pull/2777)) and add to summary variables ([#2781](https://github.com/pybamm-team/PyBaMM/pull/2781))
- Renamed "Terminal voltage [V]" to just "Voltage [V]". "Terminal voltage [V]" can still be used and will return the same value as "Voltage [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Added "Negative electrode surface potential difference at separator interface [V]", which is the value of the surface potential difference (`phi_s - phi_e`) at the anode/separator interface, commonly controlled in fast-charging algorithms to avoid plating. Also added "Positive electrode surface potential difference at separator interface [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Added "Open-circuit voltage [V]", which is the open-circuit voltage as calculated from the bulk particle concentrations. The old variable "Measured open circuit voltage [V]", which referred to the open-circuit potential as calculated from the surface particle concentrations, has been renamed to "Surface open-circuit voltage [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Added "Bulk open-circuit voltage [V]", which is the open-circuit voltage as calculated from the bulk particle concentrations. The old variable "Measured open circuit voltage [V]", which referred to the open-circuit potential as calculated from the surface particle concentrations, has been renamed to "Surface open-circuit voltage [V]". ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740)) "Bulk open-circuit voltage [V]" was briefly named "Open-circuit voltage [V]", but this was changed in ([#2845](https://github.com/pybamm-team/PyBaMM/pull/2845))
- Added an example for `plot_voltage_components`, explaining what the different voltage components are. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))

## Bug fixes
Expand All @@ -28,7 +30,7 @@
- `ElectrodeSOH.solve` now returns a `{str: float}` dict instead of a `pybamm.Solution` object (to avoid having to do `.data[0]` every time). In any code that uses `sol = ElectrodeSOH.solve()`, `sol[key].data[0]` should be replaced with `sol[key]`. ([#2779](https://github.com/pybamm-team/PyBaMM/pull/2779))
- Removed "... cation signed stoichiometry" and "... electrons in reaction" parameters, they are now hardcoded. ([#2778](https://github.com/pybamm-team/PyBaMM/pull/2778))
- When using `solver.step()`, the first time point in the step is shifted by `pybamm.settings.step_start_offset` (default 1 ns) to avoid having duplicate times in the solution steps from the end of one step and the start of the next. ([#2773](https://github.com/pybamm-team/PyBaMM/pull/2773))
- Renamed "Measured open circuit voltage [V]" to "Surface open-circuit voltage [V]". This variable was calculated from surface particle concentrations, and hence "hid" the overpotential from particle gradients. The new variable "Open-circuit voltage [V]" is calculated from bulk particle concentrations instead. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Renamed "Measured open circuit voltage [V]" to "Surface open-circuit voltage [V]". This variable was calculated from surface particle concentrations, and hence "hid" the overpotential from particle gradients. The new variable "Bulk open-circuit voltage [V]" is calculated from bulk particle concentrations instead. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Renamed all references to "open circuit" to be "open-circuit" instead. ([#2740](https://github.com/pybamm-team/PyBaMM/pull/2740))
- Renamed parameter "1 + dlnf/dlnc" to "Thermodynamic factor". ([#2727](https://github.com/pybamm-team/PyBaMM/pull/2727))
- All PyBaMM models are now dimensional. This has been benchmarked against dimensionless models and found to give around the same solve time. Implementing dimensional models greatly reduces the barrier to entry for adding new models. However, this comes with several breaking changes: (i) the `timescale` and `length_scales` attributes of a model have been removed (they are no longer needed) (ii) several dimensionless variables are no longer defined, but the corresponding dimensional variables can still be accessed by adding the units to the name (iii) some parameters used only for non-dimensionalization, such as "Typical current [A]", have been removed ([#2419](https://github.com/pybamm-team/PyBaMM/pull/2419))
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: "23.2"
version: "23.3"
repository-code: "https://github.com/pybamm-team/PyBaMM"
title: "Python Battery Mathematical Modelling (PyBaMM)"
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
author = "The PyBaMM Team"

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

Expand Down
121 changes: 1 addition & 120 deletions docs/source/_static/versions.json
Original file line number Diff line number Diff line change
@@ -1,120 +1 @@
[
{
"name": "latest",
"version": "latest",
"url": "https://pybamm.readthedocs.io/en/latest/"
},
{
"name": "stable",
"version": "stable",
"url": "https://pybamm.readthedocs.io/en/stable/"
},
{
"version": "v23.2",
"url": "https://pybamm.readthedocs.io/en/v23.2/"
},
{
"version": "v23.1",
"url": "https://pybamm.readthedocs.io/en/v23.1/"
},
{
"version": "v22.12",
"url": "https://pybamm.readthedocs.io/en/v22.12/"
},
{
"version": "v22.11.1",
"url": "https://pybamm.readthedocs.io/en/v22.11.1/"
},
{
"version": "v22.11",
"url": "https://pybamm.readthedocs.io/en/v22.11/"
},
{
"version": "v22.10",
"url": "https://pybamm.readthedocs.io/en/v22.10/"
},
{
"version": "v22.9",
"url": "https://pybamm.readthedocs.io/en/v22.9/"
},
{
"version": "v22.8",
"url": "https://pybamm.readthedocs.io/en/v22.8/"
},
{
"version": "v22.7",
"url": "https://pybamm.readthedocs.io/en/v22.7/"
},
{
"version": "v22.6",
"url": "https://pybamm.readthedocs.io/en/v22.6/"
},
{
"version": "v22.5",
"url": "https://pybamm.readthedocs.io/en/v22.5/"
},
{
"version": "v22.4",
"url": "https://pybamm.readthedocs.io/en/v22.4/"
},
{
"version": "v22.3",
"url": "https://pybamm.readthedocs.io/en/v22.3/"
},
{
"version": "v22.2",
"url": "https://pybamm.readthedocs.io/en/v22.3/"
},
{
"version": "v22.1",
"url": "https://pybamm.readthedocs.io/en/v22.1/"
},
{
"version": "v21.12",
"url": "https://pybamm.readthedocs.io/en/v21.12/"
},
{
"version": "v21.11",
"url": "https://pybamm.readthedocs.io/en/v21.11/"
},
{
"version": "v21.10",
"url": "https://pybamm.readthedocs.io/en/v21.10/"
},
{
"version": "v21.9",
"url": "https://pybamm.readthedocs.io/en/v21.9/"
},
{
"version": "v21.08",
"url": "https://pybamm.readthedocs.io/en/v21.08/"
},
{
"version": "v0.4.0",
"url": "https://pybamm.readthedocs.io/en/v0.4.0/"
},
{
"version": "v0.3.0",
"url": "https://pybamm.readthedocs.io/en/v0.3.0/"
},
{
"version": "v0.2.3",
"url": "https://pybamm.readthedocs.io/en/v0.2.3/"
},
{
"version": "v0.2.2",
"url": "https://pybamm.readthedocs.io/en/v0.2.2/"
},
{
"version": "v0.2.1",
"url": "https://pybamm.readthedocs.io/en/v0.2.1/"
},
{
"version": "v0.2.0",
"url": "https://pybamm.readthedocs.io/en/v0.2.0/"
},
{
"version": "v0.1.0",
"url": "https://pybamm.readthedocs.io/en/v0.1.0/"
}
]
[{"name": "latest", "version": "latest", "url": "https://pybamm.readthedocs.io/en/latest/"}, {"name": "stable", "version": "stable", "url": "https://pybamm.readthedocs.io/en/stable/"}, {"version": "v23.3", "url": "https://pybamm.readthedocs.io/en/v23.3/"}, {"version": "v23.2", "url": "https://pybamm.readthedocs.io/en/v23.2/"}, {"version": "v23.1", "url": "https://pybamm.readthedocs.io/en/v23.1/"}, {"version": "v22.12", "url": "https://pybamm.readthedocs.io/en/v22.12/"}, {"version": "v22.11.1", "url": "https://pybamm.readthedocs.io/en/v22.11.1/"}, {"version": "v22.11", "url": "https://pybamm.readthedocs.io/en/v22.11/"}, {"version": "v22.10", "url": "https://pybamm.readthedocs.io/en/v22.10/"}, {"version": "v22.9", "url": "https://pybamm.readthedocs.io/en/v22.9/"}, {"version": "v22.8", "url": "https://pybamm.readthedocs.io/en/v22.8/"}, {"version": "v22.7", "url": "https://pybamm.readthedocs.io/en/v22.7/"}, {"version": "v22.6", "url": "https://pybamm.readthedocs.io/en/v22.6/"}, {"version": "v22.5", "url": "https://pybamm.readthedocs.io/en/v22.5/"}, {"version": "v22.4", "url": "https://pybamm.readthedocs.io/en/v22.4/"}, {"version": "v22.3", "url": "https://pybamm.readthedocs.io/en/v22.3/"}, {"version": "v22.2", "url": "https://pybamm.readthedocs.io/en/v22.3/"}, {"version": "v22.1", "url": "https://pybamm.readthedocs.io/en/v22.1/"}, {"version": "v21.12", "url": "https://pybamm.readthedocs.io/en/v21.12/"}, {"version": "v21.11", "url": "https://pybamm.readthedocs.io/en/v21.11/"}, {"version": "v21.10", "url": "https://pybamm.readthedocs.io/en/v21.10/"}, {"version": "v21.9", "url": "https://pybamm.readthedocs.io/en/v21.9/"}, {"version": "v21.08", "url": "https://pybamm.readthedocs.io/en/v21.08/"}, {"version": "v0.4.0", "url": "https://pybamm.readthedocs.io/en/v0.4.0/"}, {"version": "v0.3.0", "url": "https://pybamm.readthedocs.io/en/v0.3.0/"}, {"version": "v0.2.3", "url": "https://pybamm.readthedocs.io/en/v0.2.3/"}, {"version": "v0.2.2", "url": "https://pybamm.readthedocs.io/en/v0.2.2/"}, {"version": "v0.2.1", "url": "https://pybamm.readthedocs.io/en/v0.2.1/"}, {"version": "v0.2.0", "url": "https://pybamm.readthedocs.io/en/v0.2.0/"}, {"version": "v0.1.0", "url": "https://pybamm.readthedocs.io/en/v0.1.0/"}]
2 changes: 1 addition & 1 deletion pybamm/models/full_battery_models/base_battery_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1149,7 +1149,7 @@ def set_voltage_variables(self):
self.variables.update(
{
"Surface open-circuit voltage [V]": ocv_surf,
"Open-circuit voltage [V]": ocv_bulk,
"Bulk open-circuit voltage [V]": ocv_bulk,
"Particle concentration overpotential [V]": eta_particle,
"X-averaged reaction overpotential [V]": eta_r_av,
"X-averaged SEI film overpotential [V]": eta_sei_av,
Expand Down
10 changes: 5 additions & 5 deletions pybamm/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ def __getitem__(self, key):
)
if "Measured open circuit voltage" in key:
raise KeyError(
"The variable for open circuit voltage is now called "
"'Open-circuit voltage [V]'. The variable that used to be called "
"The variable that used to be called "
"'Measured open circuit voltage [V]' is now called "
"'Surface open-circuit voltage [V]', but this is not the true "
"open-circuit voltage of the cell since it includes the "
"particle concentration overpotentials."
"'Surface open-circuit voltage [V]'. There is also another "
"variable called 'Bulk open-circuit voltage [V]' which is the"
"open-circuit voltage evaluated at the average particle "
"concentrations."
)
best_matches = self.get_best_matches(key)
for k in best_matches:
Expand Down
2 changes: 1 addition & 1 deletion pybamm/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "23.2"
__version__ = "23.3"
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def __init__(self, time, solutions):

def test_all(self):
# Potentials
self.compare("Open-circuit voltage [V]")
self.compare("Bulk open-circuit voltage [V]")
# Currents
self.compare(
"X-averaged negative electrode volumetric "
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/test_models/standard_output_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ def __init__(self, model, param, disc, solution, operating_condition):
self.ocp_p = solution[
f"Positive electrode {self.phase_name_p}bulk open-circuit potential [V]"
]
self.ocv = solution["Open-circuit voltage [V]"]
self.ocv = solution["Bulk open-circuit voltage [V]"]
self.voltage = solution["Voltage [V]"]

def test_each_reaction_overpotential(self):
Expand Down
2 changes: 1 addition & 1 deletion vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pybamm",
"version-string": "23.2",
"version-string": "23.3",
"dependencies": [
"casadi",
{
Expand Down

0 comments on commit 1dec74e

Please sign in to comment.