Skip to content

Commit bd0b460

Browse files
attempting to fix ci
1 parent 923b5c3 commit bd0b460

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

docs/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@
9292
"https://doi.org/10.1137/20M1336898", # DOI link to ignore
9393
"https://en.wikipedia.org/wiki/", # Wikipedia link to ignore
9494
"https://books.google.co.uk/books",
95+
"https://docs.scipy.org/doc/scipy", # SciPy docs timeout intermittently
9596
]
9697

9798

src/pybamm/models/full_battery_models/lithium_ion/basic_spm_with_3d_thermal.py

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,14 @@ def __init__(self, options=None, name="SPM with Separate Cell Domain"):
4848
T = pybamm.Variable("Cell temperature [K]", domain="cell")
4949

5050
if self.options.get("cell geometry") == "pouch":
51-
x = pybamm.SpatialVariable("x", domain="cell")
52-
y = pybamm.SpatialVariable("y", domain="cell")
53-
z = pybamm.SpatialVariable("z", domain="cell")
54-
integration_vars = [x, y, z]
51+
self.x_cell = pybamm.SpatialVariable("x", domain="cell")
52+
self.y_cell = pybamm.SpatialVariable("y", domain="cell")
53+
self.z_cell = pybamm.SpatialVariable("z", domain="cell")
54+
integration_vars = [self.x_cell, self.y_cell, self.z_cell]
5555
elif self.options.get("cell geometry") == "cylindrical":
56-
r = pybamm.SpatialVariable("r_macro", domain="cell")
57-
z = pybamm.SpatialVariable("z", domain="cell")
58-
integration_vars = [r, z]
56+
self.r_cell = pybamm.SpatialVariable("r_macro", domain="cell")
57+
self.z_cell = pybamm.SpatialVariable("z", domain="cell")
58+
integration_vars = [self.r_cell, self.z_cell]
5959
else:
6060
raise ValueError(
6161
f"Geometry type '{self.options.get('cell geometry')}' is not supported. "
@@ -261,9 +261,8 @@ def __init__(self, options=None, name="SPM with Separate Cell Domain"):
261261
def set_thermal_bcs(self, T):
262262
geometry_type = self.options.get("cell geometry", "pouch")
263263
if geometry_type == "pouch":
264-
y = pybamm.SpatialVariable("y", "cell")
265-
z = pybamm.SpatialVariable("z", "cell")
266-
T_amb = self.param.T_amb(y, z, pybamm.t)
264+
# Reuse the spatial variables created in __init__
265+
T_amb = self.param.T_amb(self.y_cell, self.z_cell, pybamm.t)
267266
face_params = {
268267
"x_min": self.param.h_edge_x_min,
269268
"x_max": self.param.h_edge_x_max,
@@ -273,9 +272,8 @@ def set_thermal_bcs(self, T):
273272
"z_max": self.param.h_edge_z_max,
274273
}
275274
elif geometry_type == "cylindrical":
276-
r = pybamm.SpatialVariable("r_macro", "cell")
277-
z = pybamm.SpatialVariable("z", "cell")
278-
T_amb = self.param.T_amb(r, z, pybamm.t)
275+
# Reuse the spatial variables created in __init__
276+
T_amb = self.param.T_amb(self.r_cell, self.z_cell, pybamm.t)
279277
face_params = {
280278
"r_min": self.param.h_edge_radial_min,
281279
"r_max": self.param.h_edge_radial_max,

0 commit comments

Comments
 (0)