diff --git a/pybamm/models/submodels/particle/base_particle.py b/pybamm/models/submodels/particle/base_particle.py index 6f966b0bcf..9183d66cb7 100644 --- a/pybamm/models/submodels/particle/base_particle.py +++ b/pybamm/models/submodels/particle/base_particle.py @@ -144,22 +144,21 @@ def _get_standard_flux_variables(self, N_s, N_s_xav): return variables - # def set_events(self, variables): - # c_s_surf = variables[self.domain + " particle surface concentration"] - # tol = 1e-4 - - # self.events.append( - # pybamm.Event( - # "Minumum " + self.domain.lower() + " particle surface concentration", - # pybamm.min(c_s_surf) - tol, - # pybamm.EventType.TERMINATION, - # ) - # ) - - # self.events.append( - # pybamm.Event( - # "Maximum " + self.domain.lower() + " particle surface concentration", - # (1 - tol) - pybamm.max(c_s_surf), - # pybamm.EventType.TERMINATION, - # ) - # ) + def set_events(self, variables): + c_s_surf = variables[self.domain + " particle surface concentration"] + + self.events.append( + pybamm.Event( + "Minumum " + self.domain.lower() + " particle surface concentration", + pybamm.min(c_s_surf), + pybamm.EventType.TERMINATION, + ) + ) + + self.events.append( + pybamm.Event( + "Maximum " + self.domain.lower() + " particle surface concentration", + pybamm.max(c_s_surf), + pybamm.EventType.TERMINATION, + ) + )