0% found this document useful (0 votes)
93 views16 pages

Ken Fox: Celestialmechanics by D. Reidelpublishing Company

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 16

NUMERICAL

INTEGRATION

OF THE E Q U A T I O N S

OF M O T I O N OF C E L E S T I A L M E C H A N I C S

KEN

FOX

Dept.

of A p p l i e d Maths.,

Q u e e n Mary College,

Mile End Rd.,

London,

U.K.

(Received 24 October,

1983;

accepted

16 January,

1984)

ABSTRACT.

Recently

a n u m b e r of n e w t e c h n i q u e s

have been d e v e l o p e d governing the

for

the n u m e r i c a l

s o l u t i o n of the d i f f e r e n t i a l in the Solar System,

equations

m o t i o n of b o d i e s gravitational

m o v i n g u n d e r their m u t u a l are t e s t e d a g a i n s t and c o n c l u s i o n s are

forces.

Some of these n e w m e t h o d s

each o t h e r and a g a i n s t more t r a d i t i o n a l ~ m e t h o d s made as to u n d e r w h a t c i r c u m s t a n c e s o p t i m u m results.

any of these m e t h o d s

s h o u l d be

used to p r o d u c e

I. I N T R O D U C T I O N

There The

are two b a s i c

approaches

for s o l v i n g the p r o b l e m s approach, called

of c e l e s t i a l motion. where

first

is the s l e d g e h a m m e r of m o t i o n

special perturbations, algorithm; where

the e q u a t i o n s

are i n t e g r a t e d by a n u m e r i c a l called general perturbations, As is usual

the second

is the e l e g a n t approach, are solved by e n t i r e l y the e l e g a n t solutions

the e q u a t i o n s

a n a l y t i c a l means.

in a p p l i e d mathematics, for

of g e n e r a l p e r t u r b a t i o n s

are o f t e n of little use

solving practical that are n e c e s s a r y

problems

due to the m a n y r e s t r i c t i o n s of the a n a l y t i c a l

and s i m p l i f i c a t i o n s expressions. With

in the d e r i v a t i o n

the i n c r e a s i n g use of c o m p u t e r s lity and long t e r m b e h a v i o u r methods, it is e s s e n t i a l

to help

in the i n v e s t i g a t i o n systems

of the stabi-

of d y n a m i c a l

by s p e c i a l p e r t u r b a t i o n

to find e f f i c i e n t

algorithms. about w h a t is the b e s t algo-

There

is m u c h c o n f u s i o n

in the l i t e r a t u r e

r i t h m to use for s p e c i a l p e r t u r b a t i o n s . integration

It is g e n e r a l l y

a g r e e d that w h e n the integration step-

can be best c a r r i e d out u s i n g a near c o n s t a n t

length then the best m e t h o d to use is the G a u s s - J a c k s o n 1971, 1972; Merson, 1974; and B r o u w e r and C l e m e n c e ,

method

(Herrick,

1961).

However when of

variation

in this

steplength

is r e q u i r e d then there none of w h i c h

are a large n u m b e r

competing methods than the others. the r e s u l t s

that can be used, An a n a l y s i s

is o b v i o u s l y m u c h b e t t e r has been c a r r i e d out,

of nine of these m e t h o d s

of w h i c h m a k e

up the r e m a i n d e r

of this paper.

2. THE M E T H O D S (A) G a u s s - J a c k s o n (GJ) fully d e s c r i b e d by J a c k s o n 14, and A p p e n d i x A) (1924), Herrick (1971;

This m e t h o d has been Chapter Merson 9, 1972;

Chapter

and i n v e s t i g a t e d names

f u r t h e r by second

(1974).

It has b e e n given m a n y d i f f e r e n t

such as the

CelestialMechanics 33 (1984) 127-142.0008-8714[84/0332-0127 $02.40. 9 1984 by D. ReidelPublishing Company.

128

KEN FOX

sum m e t h o d tional

and has

appeared

in m a n y

different

forms, here

according is t h a t

to the n o t a in b a c k w a r d the

preferences notation

of the author 9 as d e r i v e d

The

form g i v e n (1974),

difference best which tions. of suited

by M e r s o n

as this

is p r o b a b l y

for c o m p u t e r

application 9 for

It is a f i n i t e second

difference

method equa-

is d e s i g n e d (It is v e r y order

specifically important

solving that

order

differential solution

to note

the n u m e r i c a l

of a s y s t e m a method be far m o r e

second

differential

equations purpose designed

can be c a r r i e d and for that this

out u s i n g method will

specifically efficient and

designed

for this a method order

than u s i n g the

solving two

first sets of

order first

equations order values at

splitting

second

equations

into

equations.) equally and cult ding

It r e q u i r e s intervals

the g e n e r a t i o n about the

of a n u m b e r ones

of s t a r t i n g

spaced

initial

so t h a t

a set of d i f f e r e n c e changes very diffi-

sum t a b l e s

can be c a l c u l a t e d 9 as a new have

This m a k e s

steplength with

and time c o n s u m i n g to the n e w

set of t a b l e s

an i n t e r v a l any such

corresponsteplength

steplength that

to be c a l c u l a t e d method

after

change.

This m e a n s that

the G a u s s - J a c k s o n large

is b e s t

at i n t e g r a t i n g

equations

do not r e q u i r e

changes

in the

integration'steplength

for o p t i m u m

results. method but u s u a l l y becomes then if the c o r r e c t unnecessary obviously it. step-

It is a p r e d i c t o r - c o r r e c t o r length is c h o s e n than

the c o r r e c t o r equation

equation

and can be a greater

discarded. steplength usually the

If the c o r r e c t o r can be t a k e n advantage

is i n c l u d e d

than c o u l d

be t a k e n able

without to use

using

However steplength function

gained

by b e i n g

this

larger an e x t r a that

do not o v e r c o m e evaluation variety

the d i s a d v a n t a g e step.

of h a v i n g

to p e r f o r m agree

at each

Both Herrick method to use

and M e r s o n

the b e s t form with basic

of G a u s s - J a c k s o n given by

is the e i g h t h

order

equations

xi+1

= x(ti

+ h)

h2

<

V -2"" xi

I I 19 x + VX + 12 i 12 i 240 4.. 275 V x. + l 4032 8183 ?

2.. ? x. + 1

3.. 863 V x. + 40 l 12096 33953

5.. V x. + l

7~ )
i '

518400

V X. + x 129600

xi+ 1

9 ~V-I = x(t.l + h) = h xi
251
+

I
+

2 V3~.
1

x. + V~. + - - V2~. + l 12 l 8 l 19087 V4~. + 288 l 60480 1070017 + 3628800 95

720 5257
+

V5~. + l

V6~. 17280
l

V7xil

NUMERICAL

INTEGRATION

OF THE E Q U A T I O N S

OF M O T I O N

129

in s t a n d a r d equations

backward

difference

notation 9

Which

are used to solve

the

= f(x, x, t). Note however, that if the e q u a t i o n s t) n e e d not be c a l c u l a t e d its e v a l u a t i o n . procedure s h o u l d be u s e d as M e r s o n has s h o w n this at e a c h step as the d o u b l e inteto be s o l v e d are just of the form

= f(x, then the v e l o c i t y gration

does not r e q u i r e starting

Herrick's

to be the m o s t e f f i c i e n t 9

(B) G a u s s - J a c k s o n - M e r s o n For h i g h l y is c l o s e where eccentric

(GJM) a small steplength fast w h i l e a much changes is r e q u i r e d w h e n further larger away the p a r t i c l e

orbits

to the Sun and m o v i n g v e r y is m o v i n g v e r y

from the Sun can be use

the p a r t i c l e To a v o i d

slowly

steplength

chosen.

the a w k w a r d method,

steplength Merson has

necessary

under normal to a new

of the G a u s s - J a c k s o n independent changes changes variable

suggested

transforming

s g i v e n by dt/ds = r 3/2. in small c h a n g e s Therefore

This m e a n s

that c o n s t a n t and large

in s w i l l in t w h e n

result

in t w h e n

r is small

r is large.

the i n t e g r a t i o n

can n o w be c a r r i e d As t h r o u g h an e x t r a the

out u s i n g the G a u s s - J a c k s o n out. There are t h r e e

method with constant

steplength

disadvantages i.e.

in u s i n g this method 9

Firstly

equation real time usually

has to be s o l v e d is at any stage 9 when

dt/ds = r 3/2 in o r d e r the e f f o r t

to find out w h a t to do this is

However

required

negligible

c o m p a r e d w i t h that r e q u i r e d Secondly,

to solve the far m o r e have to be c a l c u -

complicated l a t e d upto

equations some g i v e n

of motion. time, then

if the r e s u l t s

it is very u n l i k e l y a set of r e s u l t s

that the e q u a l l y time. of the tables

s p a c e d As's w i l l This m e a n s that

actually

produce

at this d e s i r e d

interpolation

has to be c a r r i e d

out at the e n d p o i n t difference

integration, will The

but this

is v e r y easy to do as the r e q u i r e d in o r d e r

have a l r e a d y interpolation

been calculated formulae difference + nh)

to c a r r Y out the i n t e g r a t i o n . w h i c h can be d e r i v e d (1972, p.


I

u s e d are the f o l l o w i n g , formulae given by

from the c e n t r a l .
Xl+ n

Herrick

293),
I

X (t i

= h2 (V-2.. -I.. xi_ I + n? xi-I/2

2!

<n2

) ~

I 1 3n 3! 1<5

I )n 2 Vxi+I/2 103 11 n 3 + 6 4 n

I < 4 + 4! n

I ) V2~i+1 --10

>V3~i + 1~ +

+ 5! +

i<
6!

n6

31>
+
84

V4~i+2

130

KEN

FOX

n
7!

21 n5 + 28n3 2
28 6 56 4

191 12
n

> V5
Mi+21= +

I / 8 n 8!

n
3

+
3

289> V6 90 xi+3 432n'q ) 2497+ 10 n2 -6

+ >

I ( 9 24n7 5 882 + n n 9! 5 ~i-1/2 + nxi + 2 !

V7~i+3 89

xi+ I = h

Vxi+I/2

3! n3~~2~ i+I
5 V 4n 3 x )3

n 4!

11 2n2 + V 3 x )i 3 0

1 +189 + 5! (n5

i+2 +

n
6.'

15
2

+ 12n 2

191> --- V5~ + 84 i+2 89

I(7
+ 7.' + n

28
- 7n 5 +,3 n n

3) 6
xi+3 + 2497 90 i+3 89

I ( 8
8! \

s6
3

+ 98n 4

144n

given here in backward ~i+1/2

difference +

notation etc.

where

= 89 Xi+l

x')l

Note that before

interpolation

in the range

(xi, xi+ I) can be carried

out, the integration has to be extended to xi+ 4. Thirdly Merson has found that the corrector mode of the Gauss-Jackson method is needed to ensure stability of the solution. This results in a small increase in the time required to advance the solution by a step. The Gauss-Jackson corrector
= h2 <

formulae
I

are
1 V2
oQ

xi+ 1

V-2xi

xi+ I 19

xi+ I

12 221 60480 407 172800 \


V4~

240
V5~

240 9829

V xi+ I

V6~

i+I

6048

i+I

3628800

i+I

7 .. V X. i+I
1
19
V~

i+I

= h

V- Ixi + 2
3

~i+I
863

12
V5~

i+1

V2xi+1
24

720 V6~ i+1

V3~. i+I

275
i+1

V4~ i+I

160 33953 3628800

60480

24192

v7Xi+l )"

N U M E R I C A L I N T E G R A T I O N OF T H E E Q U A T I O N S OF M O T I O N

131

(C) F o u r t h There

o r d e r R u n g e ~-Kutta -K

(RK4) methods but the one w h i c h fourth order


1 f2 + I f

are m a n y d i f f e r e n t applied to

Runge-Kutta

the t e r m is

usually

(e.g. K h a b a z a ,

1965)
I

is the
1

f o r m g i v e n by

Xi+l where

= x(t.

l + h)

xi

fl

f4'

fl = h f ( x i, t i) f2 - hf (x i + f 1 /2 ' t i + h / 2 ) f3 - hf (x i + f2/2, f4 = h f ( x i which + f3' the t i + h/2)

ti + h) first o r d e r e q u a t i o n

is u s e d to s o l v e dx - f(x, dt To solve t),

g i v e n x 0 at time t O .

sets of s e c o n d o r d e r e q u a t i o n s

these equations

must

be s p l i t so a

to f o r m two sets of f i r s t o r d e r e q u a t i o n s . new optimum difficult steplength

It is a s i n g l e step however

step m e t h o d

can be c h o s e n at e a c h what this o p t i m u m

it is u s u a l l y

to d e t e r m i n e

steplength

s h o u l d be. selection

Abrines technique, problem

and P e r c i v a l

(1966)

have p r o d u c e d single

a step!ength

that can be u s e d w i t h

step m e t h o d s .

For the one b o d y

the s t e p ! e n g t h
E

h is g i v e n by

h =
v

2
c

I/2' r

<7 +
where respectively and be h a l v e d u n t i l expression particle

)
acceleration, error velocity and p o s i t i o n should tolerance factor which accuracy is r e a c h e d . For m o r e t h a n one b o d y the for e a c h two

v, v, and r are the p a r t i c l e ' s

e is a s m a l l p o s i t i v e the d e s i r e d

for h is o b t a i n e d

by c o m b i n i n g

the e x p r e s s i o n s

interaction.

(D) R u n g e - K u t t a - B u t c h e r This is a s i x t h o r d e r by M e r s o n storage formulae

(RKB) seven stage R u n g e - K u t t a in s t a r t i n g technique and it is reprocedure if in-

commended sufficient The b a s i c

for use space are 11

the G a u s s - J a c k s o n

is a v a i l a b l e

to use H e r r i c k ' s

starting

procedure.

27

27

11

X=-

:+I

X.

120

fl +

40

f3 +

40

f4 -

15

f5

15

f6 +

120

f7'

where

132

KEN

FOX

fl = hf(x i, t i) , h f2 = hf <x i +
3

f1' t. + l

3
2h

>

f3 = hf (xi + 3
I

f2, ti + 3
I

), h 3 )' h f 4' t. + l 2
h

f4 = hf (x. + fl + l 12 f5 = hf (x i I fl + 16
9

3 9 8
3

f3 ' ti +
12

3 f2
16
3

3 f3 8
I

>

f6 = hf / f7 = h f This

' + xI

8 9

f2 -

8 9

f3
4

f4 + 63

" f5 t + 2 ' i 18 16

>,

|x i \

+ 44

f I 11

f2

+
44

f3

+
11

f
4

11

f
6'

t
i

+ h)
"

is also used with the Abrines (RKD)

and Percival

steplength

selector.

(E) R u n ~ e - K u t t a - D o r m a n d Dormand and Prince Nystrom tested (1968, (1978)

have recently for numerical other and have method

developed

an e m b e d d e d methods,

seventh

order of

Runge-Kutta They have Fehlberg

method 1972)

simulation

in d y n a m i c a l

astronomy. those

it out against 1969,

Runge-Kutta found

notably

it to be superior inside

for most order

applications. A sixth order method. position Denoting obtained order method, Runge-Kutta is e m b e d d e d a seventh with R to be the value of the p o s i t i o n then 7 (7 - V21 )
f6 +

obtained

the seventh of the

with c o r r e s p o n d i n g

velocity

9, and x as the value

with the sixth order m e t h o d + hv + h2 ( I " i 2 '0


I 16

8
f

Ri+1

xl"

45
49

7(7 + 2V~) 360


49

360
I )

9i+ 1 = v. + h l

20

45

+-f6 + - f7 + - - f8 180 180 20 7 ! 7 - 2V~) f6 + 360

xl+ 9 I = x . +hv . +h2 i i


I I

( I f + 8 f5 + 7(7 + 2V~) 20 I 45 360

f8 + 20 where fl = f(xi' f2 = f ti) ' h xi + 10 vi + 20

f ) 9 '

I 200

2 h fI
'
t. l +

NUMERICAL

INTEGRATION

OF

THE

EQUATIONS

OF

MOTION

133

h f3 = f xi + 5 3h f4 = f x. + " 8 v. + l v. + h i

2 ( I
f

h
I
+

150 ( 171

f ), t. + 2 l 75 45
+

), 5

h2

315 f
2

8192

4096 25

8192

3h 8

f5 = f

(x.
i

h
2

v.
1

h2 (2s
88
i

f2 + 528

25 + 672 f 3 +

16 693
7 - %/21

f~ t 4/' i
. h2

h 2

),
fl
12348
- 137%/21)

1 0 0 3 - 205%/21

f6 = f

x. + l

hv

14

l
25(624

25(751 - 173%/21) f 90552


128(361 - 79V21)
+

f3

43218 3411 - 745%/21 \


f5

f4 + 237699 7 + %/21 + -hvi 14 + 113%/21) f2 90552 128(14885


+
+

24696 h2 (793 + 187%/21 + 12348


25(1044
+

),

7 - %/21 t.
+ 1

h),

14

f7 = f

xi

fl 247V21)

25(331

f3 43218 3327 f4
+

3779V21)

797V21 f5

9745659 581 + 127V21 1722


1

24696 7 + V21
14

157 - 3%/21 f8 : f (xi + hvi + h2 (378 25 (876 + 55V21) f3 3969 1353 + 26V21 f5 2268 7 (5 - q21 )
+ + + f

25(143 - I0V21)
I
+

f2 2772

1280(913

18V21)

f4 596673
+

7(1777

377V21)

f6 + 4428

t+1 h)
8

36
I / + h 2 [ f Ix. + hv. \ 1 i k20

7(7 f
+

V21) f6 +

f I

+ 45

360

7 (7 - V21 )
+

f 360

. + h), 7 , tI

134

KEN FOX

where d2x dt
2

f (x, t) ,

g i v e n x 0 and v 0 at time t 0. The a b s o l u t e h2 error in xi+ 1 m a y be e s t i m a t e d by

T2O

If 8 - f91
from xi+ 1 and h e n c e the s t e p l e n g t h is given

s i m p l y by s u b t r a c t i o n of Ri+1

by h i = 0 " 9h i-I (e/Tmax) 1/7 , w h e r e factor, which

e is a small p o s i t i v e

error tolerance

is the m a x i m u m p e r m i t t e d v a l u e

for T and should be d e c r e a s e d accuracy is reached.

by p o w e r s

of ten on each run until the d e s i r e d

(F) R u n g e - K u t t a N A G

(RKN) i m p l e m e n t e d on m a n y c o m p u t e r systems. It is a problems.

The N A G l i b r a r y has been l i b r a r y of s u b p r o g r a m s For f u r t h e r information

for the s o l u t i o n of n u m e r i c a l about this

and s t a t i s t i c a l

l i b r a r y c o n t a c t The N u m e r i c a l A l g o r i t h m s Oxford, U.S.A. OX2 7DE, U.K. or at

G r o u p at M a y f i e l d House, 1250 G r a c e Court, one basic method,

256 B a n b u r y Road, IL 60516,

D o w n e r s Grove, routine,

The NAG l i b r a r y p r o v i d e s as a R u n g e - K u t t a - M e r s o n on the computer.

Runge-Kutta

which

it d e s c r i b e s

for s o l v i n g

first order d i f f e r e n t i a l

equations

(G) A d a m s N A G Similarly equations variable

(AN) is one other r o u t i n e which for s o l v i n g is d e s c r i b e d first o r d e r d i f f e r e n t i a l as a v a r i a b l e order,

there

in the N A G library,

s t e p l e n g t h A d a m s method.

There

are no r o u t i n e s

in the NAG l i b r a r y

for s p e c i f i c a l l y

solving higher order differential

equations.

(H) T a y l o r The T a y l o r University

Series

(TS) t e s t e d here is the c u l m i n a t i o n of w o r k done at the (1973),

series m e t h o d

of G l a s g o w and is d e s c r i b e d by Roy et al. (1973), Black (1973), M o r a n et al. (1982). They have

(1972), Moran

Roy and M o r a n (1979),

(1973), E m s l i e

and W a l k e r

and S c h w a r z

and W a l k e r

found t h e i r p r o g r a m to be and both the N A G to calcuseries rather than

generally routines.

f a s t e r than the fourth o r d e r R u n g e - K u t t a m e t h o d It has been found (Roy (1978, p. necessary 106))

that is q u i c k e r

late the v a l u e of the d e r i v a t i v e s expansion

for use in a T a y l o r

s o l u t i o n of the N - b o d y p r o b l e m by a r e c u r s i v e m e t h o d the values of t h e s e d e r i v a t i v e s procedure used

to a c t u a l l y c a l c u l a t e expressions.

from their a n a l y t i c a l is an a d a p t i o n

The r e c u r s i v e by Emslie

in this a n a l y s i s

of that d e s c r i b e d their method

and Walker. Define

For s o l v i n g the two body p r o b l e m a by

is as follows.

an a u x i l i a r y v a r i a b l e

N U M E R I C A L I N T E G R A T I O N OF THE E Q U A T I O N S OF M O T I O N

135

Therefore

the two b o d y
= -a~r.

equations

of m o t i o n

become

Differentiating derivative

n times

using

of a f u n c t i o n (n+2) r n+1 = -~ ~

Leibnitz's theorem, (n) a by s , one gets ~ n h (j-l) \/9-1 a variable (n-j+1) r

and d e n o t i n g

the n t h time

j=1

Defining

another b = r-r

auxiliary

b by

(I)

it is p o s s i b l e a (i)

to s h o w that ~21 j=1~[3 <i-l>j_1 + 2 <i~I>] a(i-J) b(J-1)

while

of c o u r s e b(i) Given = i+1~ < >j_l i r(J) j=1 r(i-j+2)"

the b o u n d a r y c o n d i t i o n s r and r at time t = 0 one can c a l c u l a t e 2) (1) (I) a (0) , b (0) , r ( . U s i n g t h e s e it is then p o s s i b l e to c a l c u l a t e a , b , ) (2) , r (4) , etc. u n t i l the r e q u i r e d d e r l v a t i v e s are c a l c u r (3) 8 then a 7 -2 , b lated. These derivatives can then be s u b s t i t u t e d t +h
h2 h3

(I)

into the T a y l o r

series

expansion

for r at time

r(t + h) = r(t) + hr (I) (t) + 2! By l o o k i n g truncation This a tenth TSIO. ) error Taylor at the r e m a i n d e r by c h o i c e series term

r (2) (t) + 3!

r (3) (t)

+ ---

it is p o s s i b l e

to b o u n d

the

local 1983) (e .g.

of an a p p r o p r i a t e was tested will

steplength

(Papadakos,

method

for v a r i o u s

different

orders

order

Taylor

series

method

be r e f e r r e d

to by the n o t a t i o n

(I) B u l i r s c h The B u l i r s c h ALGOL order tested method program

and S t o e r and Stoer was

Extrapolation extrapolation

(BSl and BS2) method has h a d a chequered to s o l v e history. first soon An

produced

by B u l i r s c h using

and S t o e r

(1966)

differential out a g a i n s t (see Stoer,

equations, other 1974).

an e x t r a p o l a t i o n and it a p p e a r e d Merson (1974)

method. that

This was a good

algorithms However,

it w a s

used

the A L G O L

program

and

compared method times

the r e s u l t s

it p r o d u c e d three-body

with

those

produced

by the G a u s s - J a c k s o n that it was five

on a r e s t r i c t e d slower than

problem. method

He c o n c l u d e d and thus was

the G a u s s - J a c k s o n work.

totally

unsuitable programs (BSl) of

for c e l e s t i a l

mechanics

In the m e a n t i m e one

two i m p r o v e d first that order are

FORTRAN

have been produced and the o t h e r first order

by B u l i r s c h , second These

for s o l v i n g equations versions

equations

for s o l v i n g (BS2).

order

independent here.

terms

improved

are t e s t e d

136

KEN FOX

3.

GENERAL

POINTS

There these

are t h r e e m a i n are speed,

criteria

to

judge h o w g o o d of use.

a particular

method

is;

accuracy

and e a s e

(A)

Speed time is v e r y expensive it is e s s e n t i a l economical. to try The and use way a method to t e s t uses when

As c o m p u t e r that the is the speed

fastest

and h e n c e

the m o s t

easiest

of a m e t h o d the p r o g r a m that a method as

is to find out h o w m u c h m i l l t i m e of the m e t h o d . evaluates that the An alternative function is u s u a l l y makes

a computer

executing of t i m e s equations

is to c o u n t

the n u m b e r

defining the m o s t the

the d i f f e r e n t i a l time consuming part

it is a r g u e d and that there

this

of the p r o b l e m dent. However

such

an a p p r o a c h problems

results

machine where

indepenthe

are m a n y are

in c e l e s t i a l easy

mechanics e.g.

differential body problem,

equations and

relatively

to c a l c u l a t e , involved

the t h r e e will

in such c a s e s by c a l c u l a t i n g milltime some

the o v e r h e a d s these to

in e a c ~ m e t h o d in this

n o t be d o m i n a t e d overall order computer

equations. judge the

Therefore

paper In been

is u s e d

s p e e d of e a c h m e t h o d . all the p r o g r a m s at QMC. have

to a c h i e v e

sort of

standardization ICL and 2980 full

written taken

in F O R T R A N

and run on the programs

computer

Great

c a r e was

to w r i t e

efficient

use was m a d e

of an o p t i m i s i n g the c a l c u l a t i o n s .

compiler.

Double

precision

arithmetic

was u s e d

throughout

(B) A c c u r a c y It is n e c e s s a r y of the p r o b l e m . method have been to h a v e The a method which can cope with the accuracy the demands

rounding

errors

resulting

from using (1961) of

Gauss-Jackson been found

s t u d i e d by B r o u w e r and C l e m e n c e 3/2 to be p r o p o r t i o n a l to n w h e r e n is the n u m b e r integration.

and h a v e taken

steps

to p e r f o r m

the

(C) E a s e Finally takes

of Use human time and e f f o r t to p r o g r a m this have to be taken into account. adapted to If a m e t h o d small changes to

a l o n g time

or c a n n o t puts

be e a s i l y

in the p r o b l e m other more

then

obviously

it at a d i s a d v a n t a g e

compared

convenient

methods.

4.

THE

TEST

PROBLEM

The

obvious

choice

for the t e s t p r o b l e m By v a r y i n g

which

all

the m e t h o d s this

should simple

tackle problem in

is the two b o d y can simulate

problem.

boundary orbits problem at a n y

conditions

a variety

of d i f f e r e n t The two b o d y

similar

to t h o s e

encountered

solar

system dynamics. errors

a l s o has stage

an a n a l y t i c a l

solution An Real

so the e x a c t obvious

c a n be d e t e r m i n e d is the v e r y

of the

integration. involved.

disadvantage

simple

nature

of the

forces

NUMERICAL

I N T E G R A T I O N OF T H E E Q U A T I O N S

OF M O T I O N

137

problems amount of

involve program

forces

of

a more

complex this

nature 9

However can all

with be

a small

manipulation following
, x(0) =

even

disadvantage solved
= = 0, ((I +

overcome. methods.

Therefore
=

the
-x/r

equations
a(1 -e),

were
9

by

nine

x(0)

= -y/r 3 , 2 2 2

y(0) a is axis 0.0

= 0, semi-major taken 0.9.

y(0) axis 1.0

e)/a(l

e)) I12,

where orbit.

= x

+ y

and

the was

and and

e the the were

eccentricity eccentricity integrated

of was over

the

The

semi-major

to be The

allowed

to v a r y one

between

and

equations

precisely

hundred

orbits.

5.

THE

RESULTS

Figure

I shows

a graph The

of m i l l t i m e global

against error

log10 being

maximum the

global

error

for

circular final

orbits 9

maximum and

greatest A number

error of

in the

calculated

position

velocity Firstly

coordinates 9 RKD, the GJ and

points are are far usually

immediately faster than

become the for

apparent 9

the

TS m e t h o d s that

other the

methods.

Secondly of

three

methods

recommended i.e. the both

computer

solution the RK4

ordinary are is

differential in fact the when

equations slowest used of

the

NAG

routines As

and

method

methods

tested.

predicted

the

GJ m e t h o d

fastest

without

LOG18 -2

-3
9_ 0 ~.. LU

-4

\
-5 -6

RKN

O J3 O (D E E X O 7-

RK4

-7 GJM
-8
RKB BS1

TS24
_C

TSI B GJ GJ+C

-18 90

2.8

4.8

6.8

8.8

18.8

12.8

I 4.8

16.8

18.8

20.0

M 1 L L t 1 me
Fig. I. A comparison of the m e t h o d s

( Seconds
for circular

)
o~bits (e = 0).

138

KEN FOX

a corrector

and the G J M m e t h o d The BS2 m e t h o d

is slower

t h a n the GJ m e t h o d than the BSl

with

or w i t h o u t proThe

the c o r r e c t o r . ducing Taylor results series error Higher

is m o r e e f f i c i e n t two-thirds

method,

in a p p r o x i m a t e l y method shows

the time of the BSl

method.

promise

Rounding methods.

prevents

errors

e s p e c i a l l y w h e n in a h i g h order mode. -9 lower than 10 b e i n g a c h i e v e d by the GJ could alleviate this problem. The u n a d a p t e d by this
-5

precision

computation

Figure GJ m e t h o d method

2 shows

the same plot

for an o r b i t w i t h

e = 0.9.

does not a p p e a r

on the g r a p h with

as the m i l l t i m e

required

is c o l o s s a l s).

compared

the o t h e r m e t h o d s methods

(e.g.

E r r o r = 10

: come

M i l l t i m e = 777 off m u c h w o r s e between

Of the r e m a i n i n g slower BSl,

yet again There

the N A G

routines

being much RK4, RKB,

than

the rest.

is not m u c h

to c h o o s e
-5

the GJM,

and BS2 m e t h o d s

as r e g a r d s

speed but only of 10 . The

the G J M m e t h o d high order

will

cope w i t h

accuracy that

requirements promise

in e x c e s s

Taylor

series at this

method

showed

for c i r c u l a r

orbits is not time

becomes

unstable

high eccentricity greater

in that h i g h e r The fastest

accuracy method

consistently is c l e a r l y

achieved

with

milltime.

this

the RKD method. been m e n t i o n e d the two b o d y in real force is too This simple w h e n can m a k e a big the

As has a l r e a d y compared with the

forces speed

encountered of d i f f e r e n t

problems. methods force

difference GJ m e t h o d

to the requires

numerical of the

as for example,

just one e v a l u a t i o n eight. methods

at each that

step w h e r e a s the R u n g e as the c o m -

the RKD m e t h o d Kutta

requires

This w o u l d will

seem to imply

and e x t r a p o l a t i o n
LOGIO
-I
l I

get c o m p a r a t i v e l y

slower

-2 O III -3

O
]3
0 -4

RKN

(_9

E D E

-5

X O y-G

~ J M TS24 8S2
8S1

RK4 RK8

TS8 AN

RKD
-7
.0
I I

,!

100.0

M i L L t i me
Fig.
.

( Seconds
for h i g h l y

)
elliptical orbits

A comparison (e=0.9).

of the m e t h o d s

LOGIO -3

-4
L.

0 t t LU O n O
---2

-5

RKB

-S

LD E D E X O -8
AN

-7

1
GJ

RKD

GJM
BSI

BS2 GJ+C
I I I I ! I I I

--C

.0

5.0

10.0

15.0

20.0

25.0

30.0

35.0

40.0

45,0

50.0

M i L L t i me
Fig.
.

( Seconds
for circular

)
orbits when an in-

A comparison efficient roots each

of

the m e t h o d s that

subroutine, time the

calculates

twenty are

extra

square is used.

equations

of m o t i o n

evaluated,

LOGIO
-I
! I
i I I I I I I

-2

t 0 t t LU
__J

-3

0 /3 0 L9 E D E X 0

-4

AN

"~..~KB

-5

BS2
-G RKD

BSI

-7
.0

15.0

30.0

45.0

G0.0

75.0

90.0

105.0

l2 0 . 0

l 35.0

158.0

M1 L L t 1 me
Fig.
.

( Seconds
for highly

)
elliptical orbits when an e x t r a are twenty evaluated,

A comparison an

of the m e t h o d s subroutine, time the

inefficient roots

that

calculates

square

each

equations

of m o t i o n

is u s e d .

140

KEN FOX

complexity

of the

forces

increases.

It is still p o s s i b l e

to m o d e l

complex

forces w i t h o u t p r o b l e m can irrelevant These

solving

complex

sets of e q u a t i o n s , is solved. time

in fact the This

two b o d y

still be the p r o b l e m that calculations

is done by a d d i n g the force. and

to the p r o g r a m each

it e v a l u a t e s

calculations

are not u s e d at any s u b s e q u e n t the same. The r e s u l t s

stage of the p r o g r a m orbits are

so the p r o b l e m r e m a i n s in F i g u r e roots pected 3 and those

for c i r c u l a r

shown

for e = 0.9 in F i g u r e in the force

4, an a d d i t i o n a l subroutine

twenty

square As ex-

having been calculated the R u n g e - K u t t a

at each call. sharply

and e x t r a p o l a t i o n cannot

methods

move

to the right.

The T a y l o r overheads

series m e t h o d s

r e a l l y be t r e a t e d the

this way force b u t w e r e not than

as their m a j o r in the c a l c u included in this

do not u s u a l l y o c c u r w h e n e v a l u a t i n g Therefore

l a t i o n of the d e r i v a t i v e s . analysis, but they are

these methods to be q u i c k e r

still e x p e c t e d especially

the R u n g e - K u t t a of motion.

and e x t r a p o l a t i o n

methods

for c o m p l i c a t e d

equations

6. C O N C L U S I O N

(A)

For p r o b l e m s

w h i c h can use a near c o n s t a n t is c l e a r l y

steplength

throughout

the

integration (B)

the GJ m e t h o d

the b e s t method. c a n n o t be u s e d t h r o u g h o u t according then there

If a near c o n s t a n t methods

steplength that are

are three c o m p e t i n g solved. less

suitable

to the p r o b l e m b e i n g are simple i.e. then

If the forces

involved

in the e q u a t i o n s interacting

of m o t i o n bodies

than a b o u t

six g r a v i t a t i o n a l l y to use

being

involved,

the b e s t m e t h o d

is the RKD method, faster

although

a high order

TS m e t h o d

m i g h t be f r a c t i o n a l l y If the forces force e v a l u a t i o n s and the G J M m e t h o d required.

if it is stable. then the make large n u m b e r of

i n v o l v e d are more c o m p l i c a t e d required

in the RKD and BS2 m e t h o d s the b e s t m e t h o d

them unsuitable is not

now b e c o m e s

if high a c c u r a c y

If h i g h a c c u r a c y it. A g a i n

is r e q u i r e d

the the RKD m e t h o d

is the only m e t h o d if stable. of RKB,

that can give (C) celestial

the h i g h o r d e r TS m e t h o d m i g h t be s u i t a b l e are e n t i r e l y is. These unsuitable whatever the p r o b l e m and the RK4, that

Some m e t h o d s motion solved

are the N A G r o u t i n e s can a l w a y s than these.

and BSI methods. siderably (D) to p r o g r a m FORTRAN BASIC. writing faster A small

A far b e t t e r m e t h o d at p r o b l e m solving

be c h o s e n

is con-

investigation

into w h i c h

is the b e s t h i g h

level

language that or

in, as r e g a r d s run m u c h

milltime faster

used by the c o m p u t e r ,

indicates

programs This

than those w r i t t e n large

in ALGOL,

PASCAL, put

is not

surprising FORTRAN

due to the compilers

amount

of e f f o r t

into This

very efficient obviously

by c o m p u t e r m a n u f a c t u r e r s . from m a c h i n e to m a c h i n e

r e s u l t will

vary considerably for each

depending However it

upon how well is e x p e c t e d

the c o m p i l e r s

language still

have b e e n w r i t t e n . run a b o u t when twice

that F O R T R A N

programs

should

as fast as

those w r i t t e n mechanics programs

in the o t h e r high

level

languages

solving

celestial to w r i t e numerical

problems. in but

Standard PASCAL

is a b e a u t i f u l drawbacks

language

it does have

some s e v e r e

for t a c k l i n g

NUMERICAL

INTEGRATION

OF

THE

EQUATIONS

OF MOTION

141

work;

it has no d o u b l e arrays. Writing used. The

precision,

no s e p a r a t e

module

compilation

and no

dynamic (E) milltime (F) easy

efficient

programs

can m a k e

substantial

savings

on the

RKD and GJ m e t h o d s The same cannot

are v e r y

easy

to p r o g r a m

and h e n c e

are The ins

to utilise. has

be said of the G J M and TS m e t h o d s . as r e g a r d s ease of use. Firstly

GJM method dependent in o r d e r means

two m a i n has

drawbacks

the

variable to h a v e

to be c h a n g e d

f r o m real

time

t to the n e w v a r i a b l e As m e n t i o n e d variables before need

a constant

integration

steplength.

this to

interpolation

is r e q u i r e d time. then

if any of the d e p e n d e n t

be k n o w n not

at any g i v e n very

If the v a l u e s this

of the d e p e n d e n t

variables quite

are

required

often

can u s u a l l y many

be a c c o m p l i s h e d times during

efficiently. then the this simple

However

if they are r e q u i r e d becomes time

the

integration important

interpolation

consuming. is o f t e n close

Secondly not

and m o r e

transformation causes

dt/ds = r 3/2 it to pass steps making M

sufficient. as well

If the as the Sun

motion then

of the b o d y

to a p l a n e t

shorter

integration suggests where

are r e q u i r e d

in the v i c i n i t y

of b o t h

these

objects.

Merson

the t r a n s f o r m a t i o n

+ (GMp/rpm) I / 3 ) - 3 / 2 is the d i s t a n c e complicates program The motion the TS m e t h o d s

is the mass

P f r o m the body

dt/ds = ((GM | /r3) I/3" + of the p e r t u r b i n g p l a n e t and rpm This transformation seriously to

to the planet. and m a k e s

the e q u a t i o n s

of m o t i o n

this m e t h o d

difficult

can

get v e r y then extra

difficult auxiliary

to program. variables all h a v e

If the have

equations

of

are c o m p l i c a t e d equations can

to be u s e d

and

resulting

for the d e r i v a t i v e s place. Slightly

to be w o r k e d

out b e f o r e solved

any p r o g r a m m i n g can m e a n might having

take

changing

the p r o b l e m

being

to v i r t u a l l y which

rewrite means

the p r o g r a m

as new a u x i l i a r y all the e q u a t i o n s

variables (e.g.

become

necessary

reformulating

a change

from b a r y c e n t r i c

coordinates

to h e l i o c e n t r i c

coordinates).

ACKNOWLEDGEMENTS

I would Stoer

like

to t h a n k

S. J. A a r s e t h

for p r o v i d i n g for h e l p i n g

me w i t h with

the B u l i r s c h

and

subroutines

and a l s o

Ian W a l k e r

the T a y l o r

series

methods.

REFERENCES

Abrines, Black,

R. and P e r c i v a l , 1973, Celest.

I. C.: Mech. 8,

1966, 357. 1961,

Proc.. Phys.

Soc.

88,

861 .

W.:

Brouwer,

D. and C l e m e n c e , Press,

G. M.:

Methods

of c e l e s t i a l

mechanics,

Academic Bulirsch, Dormand,

London. J.: 1966, P. J.: Num. 1978, Math. 8, I. Mech. 18, 223.

R. and Stoer,

J. R. and Prince,

Celest.

142

KEN FOX

Emslie,

A. G. and Walker, E.: E.: E.: S.: S.: J.:

I. W.:

1979,

Celest.

Mech.

19,

147.

Fehlberg, Fehlberg, Fehlberg, Herrick, Herrick, Jackson, Khabaza, Merson, Moran, Moran,

1968, NASA TR R287. 1969, NASA TR R315. 1972, NASA TR R381. 1971, Astrodynamics, 1972, Astrodynamics, 1924, Monthly Notices 1965, Numerical 1974, Vol. Vol. 1, Van Nostrand 2, Van Nostrand Soc. Reinhold, Reinhold, London. London.

Roy. Astron.

84, 602. London.

I. M.: R. H.:

Analysis, Report 7, 122. W.:

Pergamon, 74184.

RAE Technical Mech.

P. E.:

1973, Celest.

P. E., Roy, A. E., and Black, D. M.: 1983, Celest. Mech. 1978, Orbital

1973,

Celest. Bristol.

Mech.

8, 405.

Papadakos, Roy, A. E.:

30, 275.

Motion, Adam Hilger, 1973, Celest. W.:

Roy, A. E. and Moran, Roy, A. E., Moran, Schwarz, Stoer,

P. E.:

Mech.

7, 236. Mech. 27, 6,


.

P. E., and Black, I. W.:

1972, Celest. Mech. Vol.

H. E. and Walker, 1974, Lecture

1982, Celest.

191. Springer-Verlag,

J.:

Notes

in Mathematics,

362,

Berlin.

You might also like