Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsulzer committed Nov 17, 2021
1 parent a203d6c commit e52a1bb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
3 changes: 3 additions & 0 deletions pybamm/models/full_battery_models/base_battery_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -848,6 +848,9 @@ def set_thermal_submodel(self):
thermal_submodel = pybamm.thermal.pouch_cell.CurrentCollector2D(
self.param
)
elif self.options["thermal"] == "x-full":
if self.options["dimensionality"] == 0:
thermal_submodel = pybamm.thermal.OneDimensionalX(self.param)

self.submodels["thermal"] = thermal_submodel

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,6 @@ def test_default_geometry(self):
self.assertEqual(model.default_geometry["current collector"][var.y]["min"], 0)

def test_incompatible_options(self):
with self.assertRaisesRegex(
pybamm.OptionError,
"Lead-acid models can only have thermal effects if dimensionality is 0.",
):
pybamm.lead_acid.BaseModel({"dimensionality": 1, "thermal": "x-full"})
with self.assertRaisesRegex(pybamm.OptionError, "SEI"):
pybamm.lead_acid.BaseModel({"SEI": "constant"})
with self.assertRaisesRegex(pybamm.OptionError, "lithium plating"):
Expand Down

0 comments on commit e52a1bb

Please sign in to comment.