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.
Changing/resetting dependent variables while solving differential equations
Posted Jan 6, 2016, 2:51 p.m. EST Studies & Solvers Version 5.1 0 Replies
Please login with a confirmed email address before reporting spam
I have a system of two differential equations in the form,
x' = a*x^2 + b*x + c*y
and
y'=c*x + d*y
a, b, c and d are parameters.
Depending variables has to change to different values depending on the following condition,
if x > A, then x = B and y = C
A,B and C are another set of parameters (constants).
Currently I'm solving the equations for a 1D system, where I've used Boundary ODEs and DAEs to setup the two equations. However I'm confused on how to introduce the reset equations to the system when the condition is satisfied. If I do this in MATLAB using euler method, I can easily add an if statement and change the values of x and y used for the next step. But I'm struggling to set this up in COMSOL. Any advice would be greatly appreciated.
Thank You
Saliya
Hello Saliya Kumara
Your Discussion has gone 30 days without a reply. If you still need help with COMSOL and have an on-subscription license, please visit our Support Center for help.
If you do not hold an on-subscription license, you may find an answer in another Discussion or in the Knowledge Base.