4
Journal of Sound and < ibration (2001) 244(1), 169 } 172 doi:10.1006/jsvi.2000.3467, available online at http://www.idealibrary.com on KIRA IS ENERGY CONSUMING I. FRIED Department of Mathematics, Boston ;niversity, Boston, MA 02215, ;.S.A AND L. S. WALDROP Department of Astronomy, Boston ;niversity, Boston, MA 02215, ;.S.A (Received 3 October 2000) 1. INTRODUCTION KIRA is the numerical integration engine of STARLAB's N-body simulation program for predicting the evolution of star clusters moving under the action of gravity. It is a predictor}corrector scheme [1] that projects position, velocity, acceleration, and its rate of change, as it steps in time. KIRA is a general, explicit scheme for the numerical integration of the second order initial value problem and should be useful in tracking the state of vibrating mechanical systems. Being intended for astronomical computations over extended periods of time it must be highly accurate and e$cient. We show herein that this simple integration scheme is indeed highly accurate yet is energy consuming, invariably numerically predicting the eventual collapse of the traced system of stars or the standstill of the computed moving mechanical system. 2. PREDICT}CORRECT Let x 0 and y 0 be the computed position and velocity at time t. Position x p and velocity y p are predicted at time t#q by the Taylor expansions x p "x 0 #qx@ 0 #1 2 q 2 xA 0 #1 6 q3x@@@ 0 , y p "y 0 #qy@ 0 #1 2 q2yA 0 , (1) where ( ) @ means di!erentiation with respect to time. Both position and velocity are corrected with a 3 "2(xA 0 !xA p )#q (x@@@ 0 #x@@@ p ), a 2 "!3(xA 0 !xA p )!q (2x@@@ 0 #x@@@ p ) (2) to provide x 1 "x p #q2 (a 3 /20#a 2 /12), y 1 "y p #q (a 3 /4#a 2 /3) (3) at time t#q. 0022-460X/01/260169#04 $35.00/0 ( 2001 Academic Press

KIRA IS ENERGY CONSUMING

  • Upload
    i-fried

  • View
    220

  • Download
    5

Embed Size (px)

Citation preview

Page 1: KIRA IS ENERGY CONSUMING

Journal of Sound and <ibration (2001) 244(1), 169}172doi:10.1006/jsvi.2000.3467, available online at http://www.idealibrary.com on

0022-4

KIRA IS ENERGY CONSUMING

I. FRIED

Department of Mathematics, Boston ;niversity, Boston, MA 02215, ;.S.A

AND

L. S. WALDROP

Department of Astronomy, Boston ;niversity, Boston, MA 02215, ;.S.A

(Received 3 October 2000)

1. INTRODUCTION

KIRA is the numerical integration engine of STARLAB's N-body simulation program forpredicting the evolution of star clusters moving under the action of gravity. It isa predictor}corrector scheme [1] that projects position, velocity, acceleration, and its rateof change, as it steps in time. KIRA is a general, explicit scheme for the numericalintegration of the second order initial value problem and should be useful in tracking thestate of vibrating mechanical systems. Being intended for astronomical computations overextended periods of time it must be highly accurate and e$cient.

We show herein that this simple integration scheme is indeed highly accurate yet is energyconsuming, invariably numerically predicting the eventual collapse of the traced system ofstars or the standstill of the computed moving mechanical system.

2. PREDICT}CORRECT

Let x0

and y0be the computed position and velocity at time t. Position x

pand velocity y

pare predicted at time t#q by the Taylor expansions

xp"x

0#qx@

0#1

2q2xA

0#1

6q3x@@@

0, y

p"y

0#qy@

0#1

2q2yA

0, (1)

where ( )@ means di!erentiation with respect to time. Both position and velocity arecorrected with

a3"2(xA

0!xA

p)#q(x@@@

0#x@@@

p), a

2"!3(xA

0!xA

p)!q (2x@@@

0#x@@@

p) (2)

to provide

x1"x

p#q2(a

3/20#a

2/12), y

1"y

p#q(a

3/4#a

2/3) (3)

at time t#q.

60X/01/260169#04 $35.00/0 ( 2001 Academic Press

Page 2: KIRA IS ENERGY CONSUMING

170 LETTERS TO THE EDITOR

3. ACCURACY

We shall observe the accuracy and stability of this predictor}corrector scheme as it solvesthe pair of initial value problems x@"y, y@"!x, x(0)"x

0, y (0)"y

0. In this system

xA"!x, y@@"!y, x@@@"!y, and it is analytically solved by

x (t)"x0

cos t#y0

sin t, y (t)"!x0

sin t#y0

cos t, (4)

where y(t)"x@(t).With x@"y and y@"!x, equations (1)}(3) become

xp"x

0#qy

0!1

2q2x

0!1

6q3y

0, y

p"y

0!qx

0!1

2q2y

0(5)

and

a3"2(!x

0#x

p)#q (!y

0!y

p), a

2"!3(!x

0#x

p)#q (2y

0#y

p) (6)

so that

a3"(1/6)q3y

0, a

2"(1/2)q2x

0(7)

with which the corrections become

x1"(1!1

2q2# 1

24q4) x

0#(q!1

6q3# 1

120q5) y

0,

(8)y1"(!q#1

6q3) x

0#(1!1

2q2# 1

24q4) y

0

at t#q.We recall that

sin q"q!16q3# 1

120q5! 1

5040q7#2,

(9)

cos q"1!12q2# 1

24q4! 1

720q6#2,

with which the corrected values x1

and y1

in equation (8) become

x1"x

0cos q#y

0sin q#x

01

720q6#y

01

5040q7,

(10)y1"!x

0sin q#y

0cos q#x

01

120q5#y

01

720q6

as compared to the exact periodic solution of equation (4).

4. STABILITY

System (8) is solved [2] by x1"zx

0, y

1"zy

0. For z that assures satisfaction of the linear

system,

(z!1#12q2! 1

24q4)x

0#(!q#1

6q3! 1

120q5)y

0"0,

(11)(q!1

6q3)x

0#(z!1#1

2q2! 1

24q4)y

0"0

Page 3: KIRA IS ENERGY CONSUMING

LETTERS TO THE EDITOR 171

for any given initial conditions x0, y

0. To shorten the writing we put equation (11) in the

concise form

(z#a)x0#by

0"0, cx

0#(z#a)y

0"0. (12)

The system possesses non-trivial solutions only if its determinant vanishes leading to thecharacteristic equation

z2#2az#a2!bc"0, z"!a$Jbc. (13)

The condition that the numerical integration scheme produce an oscillatory solution givenin terms of circular functions is that the magni"cation factor z be complex. This happens, inview of equation (13), if bc(0. Since here

bc"!q2#13q4! 13

360q6# 1

720q8 , (14)

time step q need to be restricted to q(1)53 to ensure periodicity.Our initial value problem is conserving. Indeed, from equation (4) we have that

x2(t)#y2 (t)"x2 (0)#y2 (0). The computed solution is xn"x

0zn, y

n"y

0zn, with nq"t.

Hence for the approximate position and velocity it happens that x2n#y2

n"(x2

0#y2

0)z2n

and the integration scheme is energy producing if Dz D'1, and is energy consuming ifDz D(1. From characteristic equation (13) we have that Dz D2"a2!bc, and

Dz D2"1! 1180

q6! 12880

q8 (15)

or

Dz D"1! 1360

q6 (16)

if q@1. Clearly, Dz D(1 for any q'0 and the scheme is energy consuming.

5. NUMERICAL EXAMPLES

Let x0"1, y

0"0, then according to equation (4) x"cos t, y"!sin t and the motion is

harmonic with period ¹"2n. Also x2(t)#y2 (t)"1 which is the equation of a unit circlein the xy plane. After n steps the computed radius of this circle is r

n"Dz Dn.

Let n be now the number of time steps per period and m the number of periods. Withq"2n/n we have from equation (16) that

Dz Dmn"A1!171

n6 Bmn

(17)

or

Dz Dmn"[(1!e)1@e]171m@n5, (18)

where e"171/n6. For a su$ciently small e we may replace (1!e)1@e by e~1 to have

Dz Dmn"e~171m@n5. (19)

Say n"36. Then after some 37 600 periods the computed radius drops to 90% of itsoriginal value.

Page 4: KIRA IS ENERGY CONSUMING

Figure 1. Positions of a planet as computed with the scheme of equations (1)}(3).

172 LETTERS TO THE EDITOR

Figure 1 shows the positions of a planet as computed with the scheme of equations (1)}(3).Under the initial conditions of x

0"1, y

0"0 the planet is theoretically moving clockwise in

a perfectly circular orbit in a periodic motion completing a revolution in 2n units of time.Computations were done with n"12 steps per revolution and were extended over m"360revolutions. The computational errors in both amplitude and period are clearly manifestedin the apparent spiral trajectory of the planet as it heads to the center.

REFERENCES

1. J. MAKINO and S. J. AARSETH 1992 Publications of the Astronautical Society of Japan 44, 141}151.On the Hermite integrator with Ahmad}Cohen scheme for gravitational many-body problems.

2. I. FRIED 1979 Numerical solution of Di+erential Equations. New York, NY: Academic Press.