Closed alopezrivera closed 1 year ago
Hi Antonio,
Thanks a lot for this suggestion! We've added new function to the develop branch of tudatpy:
https://github.com/tudat-team/tudatpy/commit/294b28703881f151ee9dec6be15ac6052f5cb702
which can be used to create fixed-step BS integrators, and fixed-step and/or fixed-order ABM integrators. The following changes to tudat were made:
https://github.com/tudat-team/tudat/commit/4f70741686d33964ce7fe8071a2becf4db5da6e9 https://github.com/tudat-team/tudat/commit/4329896221d951ccaced8a472e065c91fae98ae1 (fix of the fix)
Docs are not yet updated, but will be done next. Thanks for the suggestion on this, it was much needed!
Hi! First of all, thank you for all the work put into the library! It's very much appreciated.
I have run into some behavior when attempting to create fixed-step size extrapolation sequence integrators using Tudat.
Table of contents:
maximum_factor_increase
andminimum_factor_increase
Suggestions to improve the documentation
Initial step size not respected unless setting large tolerances
I first attempted to constrain the step size used by the extrapolation sequence integrators by setting the
initial_time_step
,maximum_step_size
andminimum_step_size
equal to my desired, fixed step size, as follows:Doing this causes an error however, because the integrators will not use the provided
initial_time_step
unless therelative_error_tolerance
andabsolute_error_tolerance
are set to large values (np.inf
, see the solution below).While the main Tudat library site instructs us to do this1 to force the integrators to use a constant step size, this behavior is rather unintuitive and could be changed or better documented, as currently
initial_time_step
will actually be used by the integrator,bulirsch_stoer
extrapolation sequence integrators2 does not indicate that therelative_error_tolerance
andabsolute_error_tolerance
determine whether the choseninitial_time_step
will be usedFor the sake of completeness, the desired behavior can be achieved as follows:
Effect of
maximum_factor_increase
andminimum_factor_increase
I attempted to force the extrapolation integrators to use a constant step size as well by setting the
maximum_factor_increase
andminimum_factor_increase
to 1.0, as follows.This did not have the desired effect, but it did seem to somewhat constrain the step sizes used by the integrators, as can be seen in the figures below:
While I can understand that these factors could be used for the intermediate steps instead, I could find no information in the API documentation on extrapolation integrators that could explain how the large step size changes seen in figure above come to be, and why the step size would stabilize to an almost constant value as it does.
Suggestions to improve the documentation
initial_time_step
to satisfy the default or providedrelative_error_tolerance
andabsolute_error_tolerance
maximum_factor_increase
andminimum_factor_increase
have on the chosen step size.Thank you very much for your time and have a nice day!
References