ode15s and 0de23 very slow at high frequencies
1 次查看(过去 30 天)
显示 更早的评论
Hi all!
I have a SDOF mass + non-linear spring system excited by a sine wave. I am solving for the displacement of the system by using ode15s for a range of excitation frequency between 200:0.1:300. ode15s runs very slowly, and when I try using ode23 is goes even slower.
Is this always the case for higher frequencies or should I pay attention to the setting of some parameters to speed up the process?
Thank you!
0 个评论
采纳的回答
Torsten
2021-5-21
I have no experience with the physical background, but if for low frequencies, the solution somehow looks like sin(0.001*x) and for high frequencies somehow like sin(1000*x), you can easily see from the graphs that for high frequencies, much smaller time steps are needed to resolve the solution than for low frequencies. In other words: there are no solver options that can speed up the calculations for high frequencies if you want to keep accuracy constant.
1 个评论
Jan
2021-5-21
The simulation of fast vibrations can be accelerated, if the model does not use the cartesian x and y coordinates, but e.g. the angle. E.g. integrating wheel rotating with a static speed is expensive with cartesian coordinates, while the integration of the rotational angle is very cheap: alpha * t.
更多回答(1 个)
Jan
2021-5-21
Are you sure that the problem is stiff? If not, use ODE45 instead of the stiff solvers.
The relative and absolute tolerances influence the processing speed significantly.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Ordinary Differential Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!