Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
06.05.2016, 08:43 GMT-4
Hello Gabriel,
The Event interface can be used for this purpose. See
www.comsol.com/blogs/implementing-a-thermostat-with-the-events-interface/ for an introduction. You would use an Event to change from 0 to 1 the right hand side of the equation dti/dt=State .
I am sure there are other ways too, but the above should work for you.
Hope this helps,
Jeff
Hello Gabriel,
The Event interface can be used for this purpose. See https://www.comsol.com/blogs/implementing-a-thermostat-with-the-events-interface/ for an introduction. You would use an Event to change from 0 to 1 the right hand side of the equation dti/dt=State .
I am sure there are other ways too, but the above should work for you.
Hope this helps,
Jeff
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
10.05.2016, 11:39 GMT-4
Thanks, Jeff.
Interesting solution, but i stil have a question.
If I understand well, you suggest create a variable "ti" that is initially constant (since it has dti / dt = 0) and after the event grows with a rate of 1 (due to dti / dt = 1).
I created the event just right, however, I do not know how or where to implement the expression dti / dt.
Can you help me ?
Regards,
Thanks, Jeff.
Interesting solution, but i stil have a question.
If I understand well, you suggest create a variable "ti" that is initially constant (since it has dti / dt = 0) and after the event grows with a rate of 1 (due to dti / dt = 1).
I created the event just right, however, I do not know how or where to implement the expression dti / dt.
Can you help me ?
Regards,
Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
10.05.2016, 12:01 GMT-4
That is indeed what I suggest.
You can implement the equation for dti / dt by using a global ODE interface: in the Physics ribbon, click the "Add Physics" button and in the window that pops up choose Mathematics, ODE and DAE Interfaces, Global ODEs and DAEs.
If you've never used Global Equations before, you may want to read the section on them in the Reference Manual: it starts on page 827 of the Reference Manual for COMSOL Multiphysics, version 5.2.
Best,
Jeff
That is indeed what I suggest.
You can implement the equation for dti / dt by using a global ODE interface: in the Physics ribbon, click the "Add Physics" button and in the window that pops up choose Mathematics, ODE and DAE Interfaces, Global ODEs and DAEs.
If you've never used Global Equations before, you may want to read the section on them in the Reference Manual: it starts on page 827 of the Reference Manual for COMSOL Multiphysics, version 5.2.
Best,
Jeff
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
10.05.2016, 13:11 GMT-4
Tranks, Jeff.
I implemented what you suggested, and it seems to work well. However, the time instants at which the variable "state" changes from 0 to 1, another variable of my simulation (current density) had spikes (impulses or Dirac), probably in instants that occurs change of dti/dt (= 0 to 1).
Is there any way to avoid these spikes?
Regards,
Tranks, Jeff.
I implemented what you suggested, and it seems to work well. However, the time instants at which the variable "state" changes from 0 to 1, another variable of my simulation (current density) had spikes (impulses or Dirac), probably in instants that occurs change of dti/dt (= 0 to 1).
Is there any way to avoid these spikes?
Regards,
Jeff Hiller
COMSOL Employee
Please login with a confirmed email address before reporting spam
Posted:
9 years ago
10.05.2016, 13:40 GMT-4
Hi Gabriel,
I am afraid I do not know your system sufficiently to tell whether such a spike is physical or not. If you require further help with this, please contact COMSOL's Support Team (support@comsol.com) and include a description of what you are trying to model and the .mph file (Clear the solution before sending, if the file is too large).
Best,
Jeff
Hi Gabriel,
I am afraid I do not know your system sufficiently to tell whether such a spike is physical or not. If you require further help with this, please contact COMSOL's Support Team (support@comsol.com) and include a description of what you are trying to model and the .mph file (Clear the solution before sending, if the file is too large).
Best,
Jeff