ode15s and 0de23 very slow at high frequencies

5 views (last 30 days)
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!

Accepted Answer

Torsten
Torsten on 21 May 2021
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 Comment
Jan
Jan on 21 May 2021
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.

Sign in to comment.

More Answers (1)

Jan
Jan on 21 May 2021
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.

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!