Like EulerSolver in Sofa, RungeKuttaSolver denotes the ODE solver using the explicit integration scheme for computing of
the dynamic system. This integration scheme explicitly resolves the system in relation to time: given the mechanical state
at time T
n, compute the state at time T
n+1=T
n + dt. The difference with RungeKuttaSolver is that this
integration use a more sophisticated algorithm for the computation of the state at time T
n+1. Therefore there is more stability
and can use a higher time step than the EulerSolver one. Otherwise, RungeKuttaSolver uses a more general explicit method than EulerSolver.
Key points
As with every Explicit Integration method, RungeKutta accumulates errors for each time step. Therefore, two criteria must be
controlled when using it :
- The time step dt.
- The dynamic of the system.
However, RungeKutta4 is certainly more stable than Explicit Euler: The convergence error in RungeKutta4 is in relation to o(dt4),
but in Explicit Euler it's only o(dt). For this example, RungeKutta can resolve the system with dt=0.001, but not the ExplicitEuler (0.0001).
Users can try several solvers with different values of the dt parameter to gain an idea of the solver's differences (also test the dependence of the solver
according to the dynamics of the system by using [Shift + left mouse]).