test_integratorConvergence

Check fixed-step integrator convergence against an analytic circular orbit.

test_integratorConvergence.test_integrator_convergence(integrator_name, expected_order)[source]

Verify the global position error scales as the expected power of step size.

With unit gravitational parameter, radius, and tangential speed, the exact position is \(\mathbf{r}(t) = [\cos(t), \sin(t), 0]\) in SI units. Compare the position at one second for four successively halved steps. Each error ratio should approach \(2^p\) for a method of order \(p\).

Parameters:
  • integrator_name – Fixed-step integrator to exercise.

  • expected_order – Expected global convergence order.