Page 1 of 1

Integrator

Posted: Wed Sep 26, 2012 12:47 am
by biomechanics
Hi,

I'm performing a forward dynamics to evaluate contact forces. Hence, I need to use a small time-step and an accurate integrator. Is there any possibility to change the integrator from the GUI? Is there any integrator that works as predictor-corrector in OpenSim.

Thanks in advance.
Margarida

Re: Integrator

Posted: Wed Sep 26, 2012 8:32 am
by sherm
Hi, Margarida. All of OpenSim's integrators are variable-step, error controlled methods (provided by Simbody). You can set the accuracy you want and then the integrator adjusts the step size dynamically to obtain that level of accuracy.

Predictor-corrector is not the only way to do error estimation, and it is not necessarily the best way. OpenSim's default integrator uses an error estimation scheme in which a step is taken simultaneously with integration formulas of two different orders (4th order and 3rd order in the case of the Runge-Kutta-Merson method) and the difference used as a rigorous estimate of the error. OpenSim does include one predictor-corrector method, CPODES, but any of its integrators can achieve a given accuracy and will properly reduce the step size during contact events and the like.

Regards,
Sherm

Re: Integrator

Posted: Wed Sep 26, 2012 9:42 am
by aymanh
Thanks much for the detailed answer Sherm.

As to the question of which integrator is used by default by OpenSim and if it can be changed, the forward tool in OpenSim uses Runge-Kutta-Merson integrator by default. The integrator settings/tolerances can be changed in the GUI but the integrator itself can't be changed (to minimize options that are exposed and rarely changed), however you can write an API program that uses any of the set of integrators provided by Simbody.

Best regards,
-Ayman