Discontinuous ODE . Why solvers dont reduce step size?
显示 更早的评论
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 个评论
James Tursa
2017-5-18
Is siphon a function of time?
Torsten
2017-5-19
Maybe we can come to an answer if we see your code.
Best wishes
Torsten.
Shadow Blade
2017-5-20
Torsten
2017-5-22
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.
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Programming 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!