diff --git a/pybamm/simulation.py b/pybamm/simulation.py index 15f65a4265..94ef6aa043 100644 --- a/pybamm/simulation.py +++ b/pybamm/simulation.py @@ -86,6 +86,11 @@ def __init__( ): self.parameter_values = parameter_values or model.default_parameter_values + if isinstance(model, pybamm.lithium_ion.BasicDFNHalfCell): + raise NotImplementedError( + "BasicDFNHalfCell is not compatible with Simulations yet." + ) + if experiment is None: # Check to see if the current is provided as data (i.e. drive cycle) current = self._parameter_values.get("Current function [A]") diff --git a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_basic_models.py b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_basic_models.py index a270075129..8649993ba8 100644 --- a/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_basic_models.py +++ b/tests/unit/test_models/test_full_battery_models/test_lithium_ion/test_basic_models.py @@ -34,6 +34,14 @@ def test_dfn_half_cell_well_posed(self): copy = model.new_copy() copy.check_well_posedness() + + def test_dfn_half_cell_simulation_error(self): + model = pybamm.lithium_ion.BasicDFNHalfCell() + with self.assertRaisesRegex( + NotImplementedError, + "not compatible with Simulations yet." + ): + pybamm.Simulation(model) if __name__ == "__main__":