Discussion Closed This discussion was created more than 6 months ago and has been closed. To start a new discussion with a link back to this one, click here.

Step function that switches at derivative value

Please login with a confirmed email address before reporting spam

Hi,

I am trying to define a step function for a parameter that changes when the time derivative of a variable changes (rather than at time = 0 or the usual use of step function). It only changes for one domain of the geometry. All other regions have a constant value of the parameter, e.

Here is the step function for the region:

e = { 0.06 if Vm' >= 0; 0.3 if Vm' <0}

So it will act like an On/Off switch basically as the value of Vm changes with the course of time.


1 Reply Last Post 2022年9月13日 GMT-4 19:36

Please login with a confirmed email address before reporting spam

Posted: 2 years ago 2022年9月13日 GMT-4 19:36

First define a step function that changes from 0.3 to 0.06 at 0. Let's say the name was Step1.

Then use Step1(Vm').

First define a step function that changes from 0.3 to 0.06 at 0. Let's say the name was Step1. Then use Step1(Vm').

Note that while COMSOL employees may participate in the discussion forum, COMSOL® software users who are on-subscription should submit their questions via the Support Center for a more comprehensive response from the Technical Support team.