Types of N-body ODE Integration Methods
June 9, 1996
34
2.2.1 Modified Taylor Series Method (-m taylor3)
This method will not be found in any books, it is an ad hoc method that I created
early in the development of XStar. Before I had even really looked into the books on
solving this kind of differential equation, I knew that I could use the previous values to
help out. An early version of XStar, version 1.1.0, used the formula:
But the
term is expensive to calculate, so it was approximation by:
Simply adding this approximation made a dramatic improvement in the overstep
problem when stars passed close together. The reason for this is fairly apparent: when an
overstep occurs, the acceleration goes from being a large positive number to being a fairly
large negative number. The difference is going to be a very large negative number. This
dramatically reduces the amount of energy that is gained. The result looks like the star
`just missed' the collapsar.
One of my next thoughts was to try and approximate
even closer by using
additional terms. This is typically done by taking the derivative of the Lagrange polyno-
mial. The Lagrange polynomial,
L(t)
, is the fairly straight forward polynomial that
matches a given set of output values for a given set of values of t. Between those selected
times, however, the values of the Lagrange polynomial can fluctuate widely. The more
terms that the Lagrange polynomial has, the more it can fluctuate. Thus, when you take the
derivative of the Lagrange polynomial, the result can get worse with additional terms.
(2:157-62,4:295-8,15:97,13:313)
I tried using the Lagrange polynomial of order 2 (i.e. the above formula), 3 and 4.
The results were clearly the best for the 3rd order derivative.
2.2.2 Adam-Bashford's Method (-m ab7 and -m ab4)
The Adam-Bashford method uses any number of previous values to help calculate
the next value of
. This method has forms of any order, but they are all in the
form of:
Where
r, a
1
, a
2
..., a
n
, are constants.
x t h
+
(
)
x t
( )
hv t
( )
12
h
2
f x t
( )
(
)
16
h
3
f
'
x t
( )
(
)
+
+
+
=
f
'
x t
( )
(
)
f
'
t
( )
a
'
t
( )
=
a t
( )
a t h
-
(
)
-
f
'
t
( )
x
'
t
( )
f x t
( )
(
)
=
x t h
+
(
)
x t
( )
hr a
1
f x t
( )
(
)
a
2
f x t h
-
(
)
(
)
-
a
3
f x t
2
-
(
)
(
) ...
-
+
[
]
+
=
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.