ode15s and 0de23 very slow at high frequencies
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
GCats
el 21 de Mayo de 2021
Comentada: Jan
el 21 de Mayo de 2021
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 comentarios
Respuesta aceptada
Torsten
el 21 de Mayo de 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 comentario
Jan
el 21 de Mayo de 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.
Más respuestas (1)
Jan
el 21 de Mayo de 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.
0 comentarios
Ver también
Categorías
Más información sobre Ordinary Differential Equations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!