model.solverEvent().create(<tag>,evtype) creates a new event of type
evtype, either
Explicit and
Implicit.
model.solverEvent(<tag>).start(expr) sets the start time for an explicit event.
model.solverEvent(<tag>).period(expr) sets the period for an explicit event. After the start time, the event then triggers after each period.
model.solverEvent(<tag>).condition(expr) sets the condition for an implicit event.
model.solverEvent(<tag>).reinit().create(<tag>) adds a new reinit feature to the event. In most cases you only need one, but you need more when you have reinitialization conditions on several geometric entity levels, for example on a global selection and a domain selection.
model.ode().create(<tag>).type(<ode type>) creates a new global equation that contains event state variables if you set the ode type to
discrete for discrete states and
quadrature for indicator states.
model.ode(<tag>).state(<states>) adds a new discrete states to the global equation.
model.ode(<tag>).ode(<state>,"
sin(2*pi*t)") adds a new indicator state and its right-hand side to the global equation. The left-hand side of the equation is the state variable, so the full equation for the indicator state becomes
nojac(sin(2*pi*t))-<state>.
model.solverEvent(<tag>).useConsistentInit(isConsistent) controls how consistency is enforced after reinitialization. If
isConsistent = 0 for all of the triggered events, then consistency will not be enforced after reinitialization. If
isConsistent = 1 for at least one of the triggered events and
Time.consistent =
bweuler (see
TableĀ 6-70), then consistency is enforced using an artificial step with the backward Euler method. See
About the Reinitialization Process in the
COMSOL Reference Manual for additional details. The solver log indicates whether and how consistency has been enforced after each reinitialization.