Discontinuous ODE . Why solvers dont reduce step size?
Show older comments
Ive been tryng to solve an edo, but no matter which solver I use ( ode45, ode23, ode113, ode15s, ode23s,...) i ve got a wrong solution. The equation is:
dy = (Qin - Qout) / (pi * Rt ^ 2); Qout = siphon * C * sqrt(2 * g * y(1)) * pi * r ^ 2; Siphon can be 0 or 1. I ve got a solution using a solver with a fixed small step size. My question is: why the solvers were not able to reduce the step size when the variable siphon changes his value? thanks
4 Comments
James Tursa
on 18 May 2017
Is siphon a function of time?
Torsten
on 19 May 2017
Maybe we can come to an answer if we see your code.
Best wishes
Torsten.
Shadow Blade
on 20 May 2017
Torsten
on 22 May 2017
You don't treat the case where ylo <= y(1) <= yhi.
And following Jan Simon's comment: It might be better to use MATLAB's "event"-option than to switch the variable "siphon" by the if-statement.
Best wishes
Torsten.
Accepted Answer
More Answers (0)
Categories
Find more on Programming in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!