Skip to content

Commit 737a4f8

Browse files
authored
Merge pull request #415 from pybop-team/patch-pybammv24.5
Release v24.6.1
2 parents 97aba6f + a318207 commit 737a4f8

File tree

20 files changed

+77
-42
lines changed

20 files changed

+77
-42
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,3 +314,6 @@ $RECYCLE.BIN/
314314
# Airspeed Velocity
315315
*.asv/
316316
results/
317+
318+
# Pycharm
319+
*.idea/

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
## Features
44

5+
## Bug Fixes
6+
7+
## Breaking Changes
8+
9+
# [v24.6.1](https://github.com/pybop-team/PyBOP/tree/v24.6.1) - 2024-07-31
10+
11+
## Features
12+
- [#313](https://github.com/pybop-team/PyBOP/pull/313/) - Fixes for PyBaMM v24.5, drops support for PyBaMM v23.9, v24.1
513

614
## Bug Fixes
715

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ authors:
1111
family-names: Courtier
1212
- given-names: David
1313
family-names: Howey
14-
version: "24.6" # Update this when you release a new version
14+
version: "24.6.1" # Update this when you release a new version
1515
repository-code: 'https://www.github.com/pybop-team/pybop'

docs/_static/switcher.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{
77
"name": "v24.6 (stable)",
88
"version": "v24.6",
9-
"url": "https://pybop-docs.readthedocs.io/en/v24.6/",
9+
"url": "https://pybop-docs.readthedocs.io/en/v24.6.1/",
1010
"preferred": true
1111
},
1212
{

examples/scripts/gitt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
model = pybop.lithium_ion.WeppnerHuggins(parameter_set=parameter_set)
3737

3838
parameters = pybop.Parameter(
39-
"Positive electrode diffusivity [m2.s-1]",
39+
"Positive particle diffusivity [m2.s-1]",
4040
prior=pybop.Gaussian(5e-14, 1e-13),
4141
bounds=[1e-16, 1e-11],
42-
true_value=parameter_set["Positive electrode diffusivity [m2.s-1]"],
42+
true_value=parameter_set["Positive particle diffusivity [m2.s-1]"],
4343
)
4444

4545
problem = pybop.FittingProblem(

examples/scripts/parameters/example_BPX.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"Header": {
3-
"BPX": 0.1,
4-
"Title": "Parameterisation example of an LFP|graphite 2 Ah cylindrical 18650 cell.",
3+
"BPX": 0.4,
4+
"Title": "Parameterisation example of an LFP|graphite 2 Ah cylindrical 18650 cell. File downloaded on 19/3/24 from https://github.com/FaradayInstitution/BPX/blob/main/examples/lfp_18650_cell_BPX.json",
55
"Description": "LFP|graphite 2 Ah cylindrical 18650 cell. Parameterisation by About:Energy Limited (aboutenergy.io), December 2022, based on cell cycling data, and electrode data gathered after cell teardown. Electrolyte properties from Nyman et al. 2008 (doi:10.1016/j.electacta.2008.04.023). Negative electrode entropic coefficient data are from O'Regan et al. 2022 (doi:10.1016/j.electacta.2022.140700). Positive electrode entropic coefficient data are from Gerver and Meyers 2011 (doi:10.1149/1.3591799). Other thermal properties are estimated.",
66
"Model": "DFN"
77
},
@@ -70,9 +70,6 @@
7070
"Thickness [m]": 2e-05,
7171
"Porosity": 0.47,
7272
"Transport efficiency": 0.3222
73-
},
74-
"User-defined": {
75-
"Source:": "An example BPX json file downloaded on 19/3/24 from https://github.com/FaradayInstitution/BPX/blob/main/examples/lfp_18650_cell_BPX.json"
7673
}
7774
}
7875
}

examples/scripts/spm_UKF.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
# Make a prediction with measurement noise
2424
sigma = 0.001
25-
t_eval = np.arange(0, 300, 2)
25+
t_eval = np.arange(0, 900, 0.5)
2626
values = model.predict(t_eval=t_eval)
2727
corrupt_values = values["Voltage [V]"].data + np.random.normal(0, sigma, len(t_eval))
2828

@@ -42,8 +42,8 @@
4242
signal = ["Voltage [V]"]
4343
n_states = model.n_states
4444
n_signals = len(signal)
45-
covariance = np.diag([0] * 19 + [sigma**2] + [0] * 19 + [sigma**2])
46-
process_noise = np.diag([0] * 19 + [1e-6] + [0] * 19 + [1e-6])
45+
covariance = np.diag([0] * 20 + [sigma**2] + [0] * 20 + [sigma**2])
46+
process_noise = np.diag([0] * 20 + [1e-6] + [0] * 20 + [1e-6])
4747
measurement_noise = np.diag([sigma**2])
4848
observer = pybop.UnscentedKalmanFilterObserver(
4949
parameters,

pybop/_experiment.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,4 @@ def __init__(
4949
period,
5050
temperature,
5151
termination,
52-
drive_cycles,
53-
cccv_handling,
5452
)

pybop/costs/fitting_costs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def _evaluate(self, inputs: Inputs, grad=None):
161161

162162
e = np.asarray(
163163
[
164-
np.sum(((prediction[signal] - self._target[signal]) ** 2))
164+
np.sum((prediction[signal] - self._target[signal]) ** 2)
165165
for signal in self.signal
166166
]
167167
)

pybop/models/base_model.py

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212

1313
@dataclass
14-
class TimeSeriesState(object):
14+
class TimeSeriesState:
1515
"""
1616
The current state of a time series model that is a pybamm model.
1717
"""
@@ -119,9 +119,13 @@ def build(
119119
self.set_params()
120120

121121
self._mesh = pybamm.Mesh(self.geometry, self.submesh_types, self.var_pts)
122-
self._disc = pybamm.Discretisation(self.mesh, self.spatial_methods)
122+
self._disc = pybamm.Discretisation(
123+
mesh=self.mesh,
124+
spatial_methods=self.spatial_methods,
125+
check_model=check_model,
126+
)
123127
self._built_model = self._disc.process_model(
124-
self._model_with_set_params, inplace=False, check_model=check_model
128+
self._model_with_set_params, inplace=False
125129
)
126130

127131
# Clear solver and setup model
@@ -230,9 +234,13 @@ def rebuild(
230234

231235
self.set_params(rebuild=True)
232236
self._mesh = pybamm.Mesh(self.geometry, self.submesh_types, self.var_pts)
233-
self._disc = pybamm.Discretisation(self.mesh, self.spatial_methods)
237+
self._disc = pybamm.Discretisation(
238+
mesh=self.mesh,
239+
spatial_methods=self.spatial_methods,
240+
check_model=check_model,
241+
)
234242
self._built_model = self._disc.process_model(
235-
self._model_with_set_params, inplace=False, check_model=check_model
243+
self._model_with_set_params, inplace=False
236244
)
237245

238246
# Clear solver and setup model

0 commit comments

Comments
 (0)