Types of N-body ODE Integration Methods
June 9, 1996
33
the correct slope because it is so far off the true path. Next,
k
3
is used to get a trial evalua-
tion at the end point of the interval. Finally, all four slopes are combined to get the final
location.
Remember, it is not important for the Runge-Kutta method to have
k
3
be more
accurate than
k
2
, or for
k
4
to end up the most accurate. Nor can you just take the trial
points at random spots or increase the number of trials and have the results improve. The
purpose of using these particular spots is so that when all four evaluations of
f()
are added
together (with the right weightings), parts of the error terms of each step cancel each other
out and the final result has an error term of a higher order than the individual Euler steps.
The problem with Runge-Kutta methods is that they require several evaluations of
f()
, which in our case is very expensive. To offset this expense the Runge-Kutta method
must be at least four times as accurate. For XStar, this turns out to not be the case when
compared to the Multistep methods.
Sources: (15:202-3,4:362-6,14:569-72,1:366-80,12:59-60)
2.2 Multistep Methods
Multi-step methods use the previous values of
x
to help determine the future
values. For XStar in particular, it seems a waste to just ignore the incredibly long history
of star locations.
The down side to all of the multi-step methods is that they require some sort of
one-step method to get them started. Worse, the "getting started" phase is not limited to
just the first time that the stars are created, but also when stars collide or bounce. So,
bouncing star systems that use multi-step methods are often using the one-step "starting"
method for a significant percentage of the time.
t
true path
t
t+h
FIGURE 19. Graph of Runge-Kutta's method
t+h/2
k
1
k
2
k
3
k
4
final location
x
x(t)
Previous page    Home    Table of Contents    Next page
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
This document is best viewed as n-body.pdf because the translation to html was buggy.