Skip to content

Commit

Permalink
#1082 add particle events, should never be triggered?
Browse files Browse the repository at this point in the history
  • Loading branch information
valentinsulzer committed Mar 27, 2021
1 parent ddc9cb3 commit 05c091d
Showing 1 changed file with 18 additions and 19 deletions.
37 changes: 18 additions & 19 deletions pybamm/models/submodels/particle/base_particle.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)
)

0 comments on commit 05c091d

Please sign in to comment.