<<

Kirkwood Gaps Physics 305 2017

University of Arizona Project Paper in Physics Kirkwood Gaps Numerical Simulation Shuai Liu, University of Arizona, [email protected] Zikun Lin, University of Arizona, [email protected] Shuaizhou Wang, University of Arizona, [email protected] Physics Department, the University of Arizona, Tucson, Arizona, Nov. 25 2017

The distribution of semi-major axes of main-belt shows significant gaps (or dips) in locations that correspond to orbital resonances with . We treat it as an n-body problem and do the numerical simulations of the evolution of orbits of the -Jupiter- system are used to explore the stability of the orbits.

1. Introduction Kirkwood gaps are the gaps which distribute in the semi-major axes of the orbits of main-belt asteroids, which observed and discovered by Kirkwood in 1857. The reason of the formation of the Kirkwood gap is because of the orbit resonances, which intuitively the most obvious type of resonance in a planetary system; it occurs when the orbital periods of two bodies are close to a ratio of small integers. All of these are of course self-excited resonances, as they involve commensurate abilities of the frequencies associated with internal degrees of freedom determined by gravitational forces internal [1]. For Kirkwood gap, it formed by the asteroids resonances with Jupiter. In observation, at 2.06AU, 2.5AU, 2.82AU, 2.95AU, and 3.3AU, there are very few asteroids in the solar orbit, and its correspond to a simple fraction with Jupiter’s. Theoretically, for long time evolution, there should be only few asteroids in those gaps. Also, for some asteroids which has a very high eccentricity could be found in the Kirkwood gaps. Since the Kirkwood gaps are formed by the Jupiter, so in our simulation, we set the system in two-dimensional and only include the sun, Jupiter, and asteroids. At first, we set 10000 massless asteroids at different orbit between 2AU to 3.5AU, and give them an initial velocity randomly. Also, we choose to use uniform distribution to set the orbit of the asteroids instead of giving it randomly, and then it was easy to see the

University of Arizona 1 Kirkwood Gaps Physics 305 2017

gaps in the histogram. The number of asteroids found in Kirkwood gaps are fewer than the other orbit radius distance. We set an asteroid at one unstable orbit and test how the orbit change in 5000 years, and compared it with other asteroids in stable orbit (which is not in the Kirkwood gaps). We found the amplitude changed larger at the unstable orbit distance than the stable orbit distance. The main source of instabilities are resonances. One of the most natural kind of resonances in the three-body problem is mean motion orbital resonances. Along such a resonance, Jupiter and the asteroid will regularly be in the same relative position. Over a long time interval, Jupiter’s perturbative effect could thus pile up and (despite its small amplitude due to the small mass of Jupiter) could modify the eccentricity of the asteroid, instead of averaging out. [2] Finally, we could find that at 2.06AU, 2.5AU, 2.82AU, 2.95AU, and 3.3AU, it has obviously gap at those orbit distance, which show that there are few asteroids moving in those. And in our simulation, we found out the reason of this phenomenon is because the asteroids oscillate in a relatively larger range than the asteroids at other orbit distance.

2. Theoretical method 2.1 Assumption This is an n-body problem involves Jupiter, asteroids, and the Sun. Newton’s Second Law equation of n-body problem is

= 𝑛𝑛 2 (1) 𝑑𝑑 𝑟𝑟��⃗𝚤𝚤 𝐺𝐺𝑚𝑚𝑖𝑖𝑚𝑚𝑗𝑗�𝑟𝑟��𝚥𝚥⃗ − 𝑟𝑟��⃗𝚤𝚤� 𝑚𝑚𝑖𝑖 2 � 3 𝑑𝑑𝑡𝑡 𝑗𝑗=1 ��𝑟𝑟�⃗𝚥𝚥 − 𝑟𝑟��⃗𝚤𝚤� But the mass of the Sun is much larger than𝑗𝑗≠𝑖𝑖 the other objects. So, we can assume that the Sun does not move in our simulation. Then, we set the position of the Sun to be the origin, which means = (0,0).

For Jupiter, since compare𝑟𝑟���⊙�� ⃗to the Solar mass, the masses of asteroids are negligible. So, the only force applied on Jupiter is from the Sun. So, the Newton’s Second Law equation of Jupiter is

( ) ( ) = = 2 (2) 𝑑𝑑 𝑟𝑟��𝐽𝐽⃗ 𝐺𝐺𝑀𝑀⊙𝑀𝑀𝐽𝐽𝐽𝐽𝐽𝐽 𝑟𝑟���⊙��⃗ − 𝑟𝑟��𝐽𝐽⃗ 𝐺𝐺𝑀𝑀⊙𝑀𝑀𝐽𝐽𝐽𝐽𝐽𝐽 −𝑟𝑟��𝐽𝐽⃗ 𝑀𝑀𝐽𝐽𝐽𝐽𝐽𝐽 2 3 3 Resolving in to x and y 𝑑𝑑direction,𝑡𝑡 �𝑟𝑟���⊙��⃗ − 𝑟𝑟��𝐽𝐽⃗� �𝑟𝑟��𝐽𝐽⃗�

= 2 (3) 𝑑𝑑 𝑥𝑥𝐽𝐽 ( 𝐺𝐺𝑀𝑀+⊙�𝑥𝑥𝐽𝐽� ) 2 − 2 2 3 𝑑𝑑𝑡𝑡 2 �𝑥𝑥𝐽𝐽� �𝑦𝑦𝐽𝐽�

University of Arizona 2 Kirkwood Gaps Physics 305 2017

( ) = 2 (4) 𝑑𝑑 𝑦𝑦𝐽𝐽 ( 𝐺𝐺𝑀𝑀+⊙ 𝑦𝑦𝐽𝐽 ) 2 − 2 2 3 𝑑𝑑𝑡𝑡 2 For asteroids, we can also ignore the effects�𝑥𝑥 𝐽𝐽of� other�𝑦𝑦 𝐽𝐽asteroids.� So, we can assume that each of the asteroids is applied only two forces, gravity from the Sun and gravity from Jupiter. So, the Newton’s Second Law equation of asteroids is ( ) ( ) = + 2 | | (5) 𝑑𝑑 𝑟𝑟���𝑎𝑎⃗ 𝐺𝐺𝑀𝑀⊙𝑚𝑚𝑎𝑎 −𝑟𝑟���𝑎𝑎⃗ 𝐺𝐺𝑀𝑀⊙𝑚𝑚𝑎𝑎 𝑟𝑟��𝐽𝐽⃗ − 𝑟𝑟���𝑎𝑎⃗ 𝑎𝑎 2 3 3 𝑚𝑚 𝑎𝑎 Resolving in to x and y direction,𝑑𝑑𝑡𝑡 𝑟𝑟���⃗ �𝑟𝑟��𝐽𝐽⃗ − 𝑟𝑟���𝑎𝑎⃗� ( ) ( ) = 2 (6) 𝑑𝑑 𝑥𝑥𝑎𝑎 ( 𝐺𝐺𝑀𝑀⊙ +𝑥𝑥𝐽𝐽 − 𝑥𝑥𝑎𝑎 ) (( 𝐺𝐺)𝑀𝑀+⊙ (𝑥𝑥𝑎𝑎 ) ) 2 2 2 3 − 3 𝑑𝑑𝑡𝑡 2 2 2 2 �𝑥𝑥𝐽𝐽 − 𝑥𝑥𝑎𝑎� ( �𝑦𝑦𝐽𝐽 −)𝑦𝑦𝑎𝑎� 𝑥𝑥𝑎𝑎 (𝑦𝑦𝑎𝑎) = 2 (7) 𝑑𝑑 𝑦𝑦𝑎𝑎 ( 𝐺𝐺𝑀𝑀⊙ +𝑦𝑦𝐽𝐽 − 𝑦𝑦𝑎𝑎 ) (( 𝐺𝐺)𝑀𝑀+⊙ (𝑦𝑦𝑎𝑎 ) ) 2 2 2 3 − 3 𝑑𝑑𝑡𝑡 2 2 2 2 So, the n-body problem is� 𝑥𝑥reduced𝐽𝐽 − 𝑥𝑥𝑎𝑎� to a �2𝑦𝑦-𝐽𝐽body− 𝑦𝑦𝑎𝑎 problem� and𝑥𝑥𝑎𝑎 a 3-body𝑦𝑦𝑎𝑎 problem with one fixed object. Then, we choose to use Runge-Kutta methods to solve the equation numerically. First, we rewrite each of the second order equation into two first order equations. For Jupiter,

= (8) 𝑑𝑑𝑥𝑥𝐽𝐽 𝑢𝑢𝑥𝑥𝑥𝑥 ( ) 𝑑𝑑𝑑𝑑 = (9) 𝑑𝑑𝑢𝑢𝑥𝑥𝑥𝑥 ( 𝐺𝐺𝑀𝑀+⊙ 𝑥𝑥𝐽𝐽 ) − 2 2 3 𝑑𝑑𝑑𝑑 2 �𝑥𝑥𝐽𝐽� �𝑦𝑦𝐽𝐽� = (10) 𝑑𝑑𝑦𝑦𝐽𝐽 𝑢𝑢𝑦𝑦𝑦𝑦 ( ) 𝑑𝑑𝑑𝑑 = (11) 𝑑𝑑𝑢𝑢𝑦𝑦𝑦𝑦 ( 𝐺𝐺𝑀𝑀+⊙ 𝑦𝑦𝐽𝐽 ) − 2 2 3 𝑑𝑑𝑑𝑑 2 For asteroids, �𝑥𝑥𝐽𝐽� �𝑦𝑦𝐽𝐽�

= (12) 𝑎𝑎 𝑑𝑑𝑥𝑥 𝑥𝑥𝑥𝑥 ( ) 𝑢𝑢 ( ) 𝑑𝑑𝑑𝑑 = (13) 𝑑𝑑𝑢𝑢𝑥𝑥𝑥𝑥 ( 𝐺𝐺𝑀𝑀⊙ +𝑥𝑥𝐽𝐽 − 𝑥𝑥𝑎𝑎 ) (( 𝐺𝐺)𝑀𝑀+⊙ (𝑥𝑥𝑎𝑎 ) ) 2 2 3 − 3 𝑑𝑑𝑑𝑑 2 2 2 2 �𝑥𝑥𝐽𝐽 − 𝑥𝑥𝑎𝑎� �𝑦𝑦𝐽𝐽 − 𝑦𝑦𝑎𝑎� 𝑥𝑥𝑎𝑎 𝑦𝑦𝑎𝑎 University of Arizona 3 Kirkwood Gaps Physics 305 2017

= (14) 𝑎𝑎 𝑑𝑑𝑦𝑦 𝑦𝑦𝑦𝑦 ( ) 𝑢𝑢 ( ) 𝑑𝑑𝑑𝑑 = (15) 𝑑𝑑𝑢𝑢𝑦𝑦𝑦𝑦 ( 𝐺𝐺𝑀𝑀⊙ +𝑦𝑦𝐽𝐽 − 𝑦𝑦𝑎𝑎 ) (( 𝐺𝐺)𝑀𝑀+⊙ (𝑦𝑦𝑎𝑎 ) ) 2 2 3 − 3 𝑑𝑑𝑑𝑑 2 2 2 2 So, equation (a)-(b) are the�𝑥𝑥 𝐽𝐽equations− 𝑥𝑥𝑎𝑎� we�𝑦𝑦 𝐽𝐽need− 𝑦𝑦 𝑎𝑎to� solve numerically𝑥𝑥𝑎𝑎 𝑦𝑦 𝑎𝑎to obtain the motions of asteroids. And the parameters of two main object, Jupiter and the Sun is given in Table 1.

Detail data of Sun and Jupiter

( ) ( )

1𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀.99 × 10𝑘𝑘𝑘𝑘 𝐴𝐴𝐴𝐴ℎ𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒𝑒/ 𝐴𝐴𝐴𝐴 𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸/ 𝐸𝐸𝐸𝐸𝐸𝐸𝐸𝐸 30 𝑆𝑆𝑆𝑆𝑆𝑆 1.89 × 10 5𝑁𝑁.4588𝐴𝐴 0𝑁𝑁.0489𝐴𝐴 27 Table𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽 1. Mass, aphelion and eccentricity of Sun and Jupiter. The sun doesn’t have aphelion and eccentricity because we set it fixed.

2.2 Numerical method To solve the equation system numerically, we need first to write the equations into dimensionless form.

Let ’, ’, ’, and ’ be dimensionless variables, and

𝑚𝑚 𝑥𝑥 𝑦𝑦 𝑢𝑢 = ; = ; = ; = (16) ′ ′ ′ ′ Plugging these in to the𝑚𝑚 first𝑚𝑚 two𝑚𝑚 0equations,𝑥𝑥 𝑥𝑥 𝑑𝑑 0 𝑦𝑦 𝑦𝑦 𝑑𝑑0 𝑢𝑢 𝑢𝑢 𝑢𝑢0

= ′ (17) 𝑑𝑑𝑥𝑥𝐽𝐽 𝑡𝑡0𝑢𝑢0 ′ 𝑢𝑢𝑥𝑥𝑥𝑥 And, 𝑑𝑑𝑑𝑑′ 𝑑𝑑0 ( ) = ′ ′ ′ (18) 𝑑𝑑𝑢𝑢𝑥𝑥𝑥𝑥 𝐺𝐺𝑚𝑚0𝑡𝑡0 ( 𝑀𝑀⊙+ 𝑥𝑥𝐽𝐽 ) − 2 2 2 3 𝑑𝑑𝑑𝑑′ 𝑑𝑑0𝑢𝑢0 ′ ′ 2 Let �𝑥𝑥𝐽𝐽� �𝑦𝑦𝐽𝐽�

= = 1 = (19) 𝑡𝑡0𝑢𝑢0 𝐺𝐺𝑚𝑚0𝑡𝑡0 𝑑𝑑0 2 → 𝑢𝑢0 And, 𝑑𝑑0 𝑑𝑑0𝑢𝑢0 𝑡𝑡0 = 1 ; = 1 ; (20)

𝑡𝑡0 𝑦𝑦𝑦𝑦 𝑑𝑑0 𝐴𝐴𝐴𝐴

University of Arizona 4 Kirkwood Gaps Physics 305 2017

So, 4 4 = = = 3 2 3 2 3 (21) 𝑑𝑑0 𝜋𝜋 𝐴𝐴𝑈𝑈 𝜋𝜋 𝑑𝑑0 𝐺𝐺 2 2 2 𝑚𝑚0𝑡𝑡0 𝑀𝑀⊙𝑦𝑦𝑟𝑟 𝑀𝑀⊙𝑡𝑡0 4 = 4 = 4 = 2 (22) 2 ′ 2 𝜋𝜋 𝑀𝑀⊙ 𝜋𝜋 𝑚𝑚0 → 𝑀𝑀⊙ 𝜋𝜋 𝑎𝑎𝑎𝑎𝑎𝑎 𝑚𝑚0 Then, the systems of first order equations becomes 𝑀𝑀⊙

= (23) ′ 𝐽𝐽 ′ 𝑑𝑑𝑥𝑥 𝑥𝑥𝑥𝑥 𝑢𝑢 ( ) = 𝑑𝑑𝑑𝑑′ ′ ′ ′ (24) 𝑑𝑑𝑢𝑢𝑥𝑥𝑥𝑥 ( 𝑀𝑀⊙+ 𝑥𝑥𝐽𝐽 ) − 2 2 3 𝑑𝑑𝑑𝑑′ ′ ′ 2 �𝑥𝑥𝐽𝐽� �𝑦𝑦𝐽𝐽� = (25) ′ 𝐽𝐽 ′ 𝑑𝑑𝑦𝑦 𝑦𝑦𝑦𝑦 𝑢𝑢 ( ) = 𝑑𝑑𝑑𝑑′ ′ ′ ′ (26) 𝑑𝑑𝑢𝑢𝑦𝑦𝑦𝑦 ( 𝑀𝑀⊙+ 𝑦𝑦𝐽𝐽 ) − 2 2 3 𝑑𝑑𝑑𝑑′ ′ ′ 2 �𝑥𝑥𝐽𝐽� �𝑦𝑦𝐽𝐽� = (27) ′ 𝑎𝑎 ′ 𝑑𝑑𝑥𝑥 𝑥𝑥𝑥𝑥 ( ) 𝑢𝑢 ( ) = 𝑑𝑑𝑑𝑑′ ′ ′ ′ ′ ′ ′ (28) 𝑑𝑑𝑢𝑢𝑥𝑥𝑥𝑥 ( 𝑀𝑀𝐽𝐽 𝑥𝑥+𝐽𝐽 − 𝑥𝑥𝑎𝑎 ) (( )𝑀𝑀⊙+ 𝑥𝑥(𝑎𝑎 ) ) 2 2 3 − 3 𝑑𝑑𝑑𝑑′ ′ ′ ′ ′ 2 ′ 2 ′ 2 2 �𝑥𝑥𝐽𝐽 − 𝑥𝑥𝑎𝑎� �𝑦𝑦𝐽𝐽 − 𝑦𝑦𝑎𝑎� 𝑥𝑥𝑎𝑎 𝑦𝑦𝑎𝑎 = (29) ′ 𝑎𝑎 ′ 𝑑𝑑𝑦𝑦 𝑦𝑦𝑦𝑦 ( ) 𝑢𝑢 ( ) = 𝑑𝑑𝑑𝑑′ ′ ′ ′ ′ ′ ′ (30) 𝑑𝑑𝑢𝑢𝑦𝑦𝑦𝑦 ( 𝑀𝑀𝐽𝐽 𝑦𝑦+𝐽𝐽 − 𝑦𝑦𝑎𝑎 ) (( )𝑀𝑀⊙+ (𝑦𝑦𝑎𝑎 ) ) 2 2 3 − 3 𝑑𝑑𝑑𝑑′ ′ ′ ′ ′ 2 ′ 2 ′ 2 2 2.3 Initial state �𝑥𝑥𝐽𝐽 − 𝑥𝑥𝑎𝑎� �𝑦𝑦𝐽𝐽 − 𝑦𝑦𝑎𝑎� 𝑥𝑥𝑎𝑎 𝑦𝑦𝑎𝑎 2.3.1 Sun Since we set the Sun at the origin, and assume it does not move in the simulation,

= = 0; = = 0 (31)

Then in dimensionless form,𝑥𝑥 ⊙ 𝑦𝑦⊙ 𝑢𝑢𝑥𝑥⊙ 𝑢𝑢𝑦𝑦⊙ = = 0; = = 0 (32) ′ ′ ′ ′ The dimensionless solar mass𝑥𝑥⊙ is calculated𝑦𝑦⊙ in𝑢𝑢𝑥𝑥 the⊙ 2.3𝑢𝑢,𝑦𝑦 which⊙ is = 4 (33) ′ 2 ⊙ 𝑀𝑀 𝜋𝜋 University of Arizona 5 Kirkwood Gaps Physics 305 2017

2.3.2 Jupiter The dimensionless aphelion is 5.4588 = = = 5.4588 (34) 1 ′ 𝑟𝑟𝑎𝑎𝑎𝑎 𝐴𝐴𝐴𝐴 𝑟𝑟𝑎𝑎𝑎𝑎 To simplify in initial condition, we𝑑𝑑 0launch Jupiter𝐴𝐴𝐴𝐴 at its aphelion on x axis and let go upward. So, the initial position of Jupiter is

= 5.4588; = 0; (35) ′ ′ And, the dimensionless mass of Jupiter𝑥𝑥𝑖𝑖𝑖𝑖 is 𝑦𝑦𝑖𝑖𝑖𝑖 1 4 = = 1047 = = 0.0376807 2 (36) ⊙ 1047 ′ 𝐽𝐽 𝑀𝑀 𝐽𝐽 𝑀𝑀 4 𝜋𝜋 𝑀𝑀 0 ⊙ 𝑚𝑚 𝑀𝑀 2 The velocity of Jupiter at its aphelion is𝜋𝜋

4 3 4 = (1 ) = 2 𝑑𝑑0 (1 ) = (1 ) 𝜋𝜋 2 2 𝐺𝐺𝑀𝑀⊙ � 𝑡𝑡0 𝑑𝑑0 𝜋𝜋 (37) 𝑣𝑣𝑎𝑎𝑎𝑎 � − 𝑒𝑒 ′ − 𝑒𝑒 � ′ − 𝑒𝑒 𝑟𝑟𝑎𝑎𝑎𝑎 4 𝑟𝑟𝑎𝑎𝑎𝑎𝑑𝑑0 𝑡𝑡0 𝑟𝑟𝑎𝑎𝑎𝑎 = (1 ) 2 𝜋𝜋 0 ′ 𝑢𝑢 � 𝑎𝑎𝑎𝑎 − 𝑒𝑒 So, the dimensionless velocity 𝑟𝑟is

4 = = = (1 ) = (1 0.0489) 5.45882 (38) ′ 𝑣𝑣𝑎𝑎𝑎𝑎 𝐺𝐺𝑀𝑀⊙ 𝜋𝜋 𝑣𝑣𝑎𝑎𝑎𝑎 𝑣𝑣𝑎𝑎=𝑎𝑎 2.62267� − 𝑒𝑒 � − 𝑢𝑢0 𝑟𝑟𝑎𝑎𝑎𝑎 Since Jupiter start on x-axis, x component of initial velocity is 0, and = | |. So,

= 0; = 2.62267 �𝑣𝑣𝑎𝑎𝑎𝑎� 𝑣𝑣𝑦𝑦 (39) ′ ′ 2.3.3 Asteroids 𝑣𝑣𝑥𝑥𝑥𝑥𝑥𝑥 𝑣𝑣𝑦𝑦𝑦𝑦𝑦𝑦 The semi-major axes of asteroids in the main mostly distribute from 2AU to 3.5AU. So, we generate initial radial distances of asteroids from 2AU to 3.5AU, and initial angular positions from 0 to2 . In the dimensionless form above

2 𝜋𝜋 3.5 2 = < = < = 3.5; 0 < < 2 (40) 1 1 𝐴𝐴𝐴𝐴 ′ 𝑟𝑟𝑖𝑖𝑖𝑖 𝐴𝐴𝐴𝐴 𝑟𝑟𝑖𝑖𝑖𝑖 𝜙𝜙 𝜋𝜋 To see a better pattern of𝐴𝐴 the𝑈𝑈 orbits after𝑑𝑑0 evolving,𝐴𝐴𝐴𝐴 we uniformly pick the initial radial distances of asteroids. So, the initial radial distance of the nth asteroid that we generated is University of Arizona 6 Kirkwood Gaps Physics 305 2017

1 = 2 + × 1.5 (41) 1 ′ 𝑛𝑛 − 𝑟𝑟𝑖𝑖𝑖𝑖𝑖𝑖 Then we use the equations above to calculate𝑁𝑁 the− components of initial positions and velocities. The initial position is

= ; = (42) ′ ′ ′ ′ Since the gaps does not work𝑥𝑥 for𝑖𝑖𝑖𝑖 orbits𝑟𝑟𝑖𝑖𝑖𝑖𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 with large𝑦𝑦𝑖𝑖𝑖𝑖 eccentricities,𝑟𝑟𝑖𝑖𝑖𝑖𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 we set the initial eccentricities of the asteroids to be 0. Then, the initial velocity of asteroids is

= (43) ⊙ 𝑖𝑖𝑖𝑖 𝐺𝐺𝑀𝑀 𝑣𝑣 � 𝑎𝑎𝑎𝑎 From equation (38), the dimensionless initial velocity𝑟𝑟 of asteroids is,

4 = (44) 2 ′ 𝑖𝑖𝑖𝑖 𝜋𝜋′ 𝑣𝑣 � 𝑖𝑖𝑖𝑖 Then, the x and y components of is 𝑟𝑟 ′ 𝑖𝑖 𝑣𝑣 4 4 = = ; = = (45) 2 2 ′ ′ ′ ′ 𝑥𝑥𝑥𝑥𝑥𝑥 𝑖𝑖𝑖𝑖 𝜋𝜋′ 𝑦𝑦𝑦𝑦𝑦𝑦 𝑖𝑖𝑖𝑖 𝜋𝜋′ 𝑣𝑣 −𝑣𝑣 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 −� 𝑖𝑖𝑖𝑖 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 𝑣𝑣 𝑣𝑣 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 � 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 Since in the simulation we ignored the𝑟𝑟 gravity of asteroids, the masses𝑟𝑟 of asteroids are not used in the computation. So, we do not need masses of asteroids in initial values.

Table of dimensionless initial values

 𝑀𝑀𝑀𝑀𝑀𝑀𝑀𝑀4 𝑥𝑥0𝑖𝑖 𝑦𝑦0𝑖𝑖 𝑢𝑢0𝑥𝑥 𝑖𝑖 𝑢𝑢0𝑦𝑦 𝑖𝑖 2 𝑆𝑆𝑆𝑆𝑆𝑆 0.0376807𝜋𝜋 5.4588 0 0 2.62267

𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽 4 4  / 2 2 ′ ′ 𝑖𝑖𝑖𝑖 𝑖𝑖𝑖𝑖 𝜋𝜋′ 𝜋𝜋′ 𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴𝐴 𝑁𝑁 𝐴𝐴 𝑟𝑟 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 𝑟𝑟 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 −� 𝑖𝑖𝑖𝑖 𝑠𝑠𝑠𝑠𝑠𝑠𝑠𝑠 � 𝑖𝑖𝑖𝑖 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 Table 2. Constant after dimensionless. 𝑟𝑟 𝑟𝑟  The position and velocity of the Sun remain 0 in the simulation, which means the initial position and velocity of the Sun are also the position and velocity of the Sun at any time in the simulation.

 and for each asteroid are generated by program IV, and 2 < < 3.5; 0 < <′2 ′ 𝑟𝑟𝑖𝑖𝑖𝑖 𝜙𝜙 𝑟𝑟𝑖𝑖𝑖𝑖 𝜙𝜙 𝜋𝜋 University of Arizona 7 Kirkwood Gaps Physics 305 2017

3. Numerical Verification

Percentage Error of Energy vs. dt

Fig.1 convergence plot with error% vs. dt. From the graph we could see that, before some dt the error% keep going decreasing with dt decreasing. By using the forth order Runge-Kutta method to calculate the motion of asteroids, and the result cannot provide a real value for the orbit, but it still provide a true relationship of the Sun-Jupiter-Asteroids system. Also, the energy would lose in calculation by using Runge-Kutta method, and it depend which “∆t” we choose to use in calculation. And we compared the original energy with the energy which after one time step change. In Figure 1, we found the error was extreme large when “∆t” is large, and when we set “∆t” smaller than 0.1 years, the error decreasing quickly and tend to be stable when “∆t” smaller than 0.01 years. Also, we could see that at “∆t” near 0.029 years, the error reach to an extreme small number, but it is not stable at all. So, it is clear that the error is minimized when “∆t” exceeds 0.01 years. Since, there is no big difference when time step reach 0.01years, and the program would run slower when we set a really small time step. So, 0.01years is the best time step.

University of Arizona 8 Kirkwood Gaps Physics 305 2017

4. Result and Discussion

Number of Asteroid vs. Semi major i

# of asteroids # of

semi-major axis(AU) Fig 2. Histogram of semi-major axes of the 10000 asteroids after evolving in particular time (1000 years). From figure 2, we notice that there are two gaps at semi-major 2.5AU and 3.3AU. So we choose to plot the time evolution of semi-major axes of asteroids near them. Semi-major axis vs. time

major axis axis (AU) major - Semi

time (year) Fig. 3 Semi-major axis of one asteroid orbit around 2.2-2.8(AU) in 5000 year. The asteroids start moving with 90 degree with Jupiter.

University of Arizona 9 Kirkwood Gaps Physics 305 2017

Semi-major axis vs. time

major axis axis (AU) major - Semi

time (year) Fig. 4 Same as the Fig. 3. The asteroids start moving with 180 degree with Jupiter. From Figure 3 and 4. We can see that, with the different angle, the change of the amplitudes of semi-major axis between two graphs is obviously. In the same time period, the asteroid stars from 90 degree has more amplitude with 180 degree. So we decide using the 90 degree for the starting point of each asteroids.

Semi-major axis vs. time

major axis axis (AU) major - Semi

time (year) Fig. 5 Semi-major axis of one asteroid orbit around 3.1-3.5(AU) in 5000 year. The asteroids start moving with 90 degree with Jupiter. University of Arizona 10 Kirkwood Gaps Physics 305 2017

The semi-major axes vs. t plot shows that the semi-major axes of the asteroids with the initial radial distance in the gap is oscillating with a very large amplitude, and they can still be found in the gap periodically. From fig.3, we can see the amplitudes of the semi-major axis around 2.5AU is specific larger than the others. Which means, in most of the time, they are at somewhere else around the gap. Therefore the probability of finding the asteroids in the gap is much less than the probability of finding them outside the gap. The same situation happens in the figure 5. In figure 5 the amplitude around 3.3AU semi-major is much larger than the others. That explains why after evolving several years, there are some gaps of semi-major of asteroids occur. Also, the plot shows that the pattern of oscillation of the semi-major axes barely evolves in time (fig 100k). So, the time average of the semi-major axes can present the influence of Jupiter better than the final semi-major axes. Therefore, instead of using final semi-major axes, we choose to use the expectation of the semi-major axes of asteroids to make another histogram. And we also make a vs. plot, where is initial radial distance (the initial semi-major axes), and is the difference between and ( ) which is the 𝑖𝑖 𝑖𝑖 expectation (time average) of the𝛥𝛥 semi𝛥𝛥 -major𝑎𝑎 axes. 𝑎𝑎 𝛥𝛥𝛥𝛥 𝑎𝑎𝑖𝑖 𝐸𝐸 𝑎𝑎 Δa vs. Initial Radial Distance

2.06 2.5

3.075 2.71 2.82 2.95 3.03 Δa (AU)

3.3

Initial Radial Distance(AU) Fig. 6 Expectation of each semi-major after 2000 years with 10000 asteroids.

University of Arizona 11 Kirkwood Gaps Physics 305 2017

Number of Asteroids vs. Semi-major Axis

# of asteroids # of 2.5 2.82 2.06 2.95 3.3

semi-major axis(AU) Fig. 7 Histogram of numbers of expectation positions of the 10000 asteroids after 2000 years moving around. If there is no influence of Jupiter, the vs. plot is supposed to be a horizontal line at = 0, because the semi-major axes of asteroids will remain the same. The vs. 𝑖𝑖 plot shows some shape spikes at 2.06AU,𝛥𝛥𝛥𝛥 𝑎𝑎2.5AU, 2.71AU, 2.82AU, 2.95AU, 3.03au,𝛥𝛥𝛥𝛥 3.075AU, 3.3AU. These spikes are caused by the orbit resonance with Jupiter,𝛥𝛥𝛥𝛥 𝑖𝑖 𝑎𝑎which means the gaps will occur at the position of these spikes. The expectation histogram (Fig.7) does not show all 7 spikes in Fig.5 but it shows the 5 strongest gaps. And the rapid drop of in Fig.5 at 3.3AU explains the very high bin on the left of the 3.3AU gap in Fig.6. Because is negative on the left of 3.3AU gap, many of the asteroids in that region𝛥𝛥 is𝛥𝛥 pushed inward and the expectation of semi-major axes become smaller than the initial radial𝛥𝛥𝛥𝛥 distance.

5. Conclusion In this simulation, we did the test of asteroids gaps between 2AU and 3.5AU in (which is called Kirkwood gaps), and from the results in section 4, it is clear that there are 5 obvious gaps in asteroids belt (which is 2.06AU 2.5AU, 2.8AU, 2.95AU, and 3.3AU). Also, those result is approximately equal to the past observation by Kirkwood. By analyzing the result, the main reason for the resonance happen on the asteroids belt is due to the gravitational of the Jupiter, and it makes the semi-major axis of asteroids (in gaps) oscillate in a relatively larger range than other asteroids. Therefore in each time observation, it has a relative small probability that the asteroids could find in gaps.

University of Arizona 12 Kirkwood Gaps Physics 305 2017

6. Reference [1]: Renu Malhotra,(1998) Solar system Formation and Evolution ASP Conference Series, Vol. 149, 1998 D. Lazzaro et al., eds. https://www.lpl.arizona.edu/~renu/malhotra_preprints/rio97.pdf [2]: Jacques Fejoz (2013), Kirkwood gaps and diffusion along mean motion resonances in the restricted planar three-body problem, page 9 https://www.math.umd.edu/~vkaloshi/papers/Elliptic-Diffusion.pdf

7. Appendix Table of Programs

# Name Description

1 IV Generates the initial values of asteroids.

2 ode Uses Runge-Kutta method to solve the differential equation of motion.

3 con Calculates the percentage error of energy during the simulation.

4 exp.py Plots the difference between initial radial distances and expectation of semi-major axes vs. initial radial distance.

5 hist.py Plots the histogram of semi-major axes.

6 con.py Plots the convergence plot for one asteroids.

//IV.c #include #include #include #define n 10000 int main(void) { int i; double R[n],theta[n],v[n],e[n]={0},m[n],x[n],y[n],ux[n],uy[n]; srand(time(NULL)); for(i=0;i<=n-1;i++) { m[i]=1.8648*1e-8*(rand()/(RAND_MAX+1.0))+2.7794*1e-18; //random mass of asteroid

R[i]=2+i*(1.5/(n-1)); //random initial radial distance

theta[i]=2*M_PI*(rand()/(RAND_MAX+1.0)); University of Arizona 13 Kirkwood Gaps Physics 305 2017

//random initial angular position

theta[i]=0*M_PI; //set an identical initial angular position (if possible) } //R[0]=3.1;R[1]=3.2;R[2]=3.3;R[3]=3.4;R[4]=3.5; for(i=0;i<=n-1;i++) { v[i]=sqrt((4*pow(M_PI,2))*(1-e[i])/R[i]); } //calculate initial velocity for aphelion

for(i=0;i<=n-1;i++) { x[i]=R[i]*cos(theta[i]); //initial x position

y[i]=R[i]*sin(theta[i]); //initial y position

ux[i]=-v[i]*sin(theta[i]); //initial velocity in x direction

uy[i]=v[i]*cos(theta[i]); //initial velocity in y direction } for(i=0;i<=n-1;i++) { printf("%g %g %g %g %g\n",m[i],x[i],y[i],ux[i],uy[i]); } //print mass, initial x,y position, and initial velocity in x,y direction return 0; }

//ode.c #include #include #define num 1000 //Number of asteroids double RHS_J(int n, //Dimensionless Newton's 2st Law equation for Jupiter double m3, double x1, double y1, double ux1, double uy1) { if(n==1) return ux1; if(n==2)

University of Arizona 14 Kirkwood Gaps Physics 305 2017

return -m3*x1/(pow(x1*x1+y1*y1,1.5)); if(n==3) return uy1; if(n==4) return -m3*y1/(pow(x1*x1+y1*y1,1.5)); return 0.0; }

double RHS_a(int n, //Dimensionless Newton's 2st Law equation for asteroids double m1, double m3, double x1, double x2, double y1, double y2, double ux2, double uy2) { if(n==1) return ux2; if(n==2) return m1*(x1-x2)/(pow((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1),1.5))- m3*x2/(pow(x2*x2+y2*y2,1.5)); if(n==3) return uy2; if(n==4) return m1*(y1-y2)/(pow((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1),1.5))- m3*y2/(pow(x2*x2+y2*y2,1.5)); //asteriod return 0.0; } double R(double x,double y) //Radial distance of asteroids { return sqrt(x*x+y*y); }

double Energy(double x,double y,double x_J,double y_J,double ux,double uy) { return 0.5*(ux*ux+uy*uy)-4*pow(M_PI,2)/sqrt(x*x+y*y)-0.0376807/sqrt(pow(x- x_J,2)+pow(y-y_J,2)); } //Total energy of int main(void) { double m_Sun=4*pow(M_PI,2); //Dimensionless mass of the Sun double m_J=0.0376807; //Dimensionless mass of Jupiter double t=0; int i,a,k,T; double x,y,ux,uy; double dt=1./128.; double N=2000/dt; double k1[8],k2[8],k3[8],k4[8]; double m_a[num],x_a[num],y_a[num],ux_a[num],uy_a[num]; University of Arizona 15 Kirkwood Gaps Physics 305 2017

double x_0[num],y_0[num]; double x_J=5.4588,y_J=0,ux_J=0,uy_J=2.62267; double R_a[num],R_p[num],R_m[num],R_0[num],R_1[num],R_2[num]; double R_i[num]; double E_0[num],E[num]; double E_R[num]={0};

FILE *file; file=fopen("IV.out","r"); if(file == NULL) { printf("Unable to open file\n"); return -1; } double temp; for(i=0;i<=num-1;i++) { fscanf(file,"%lg %lg %lg %lg %lg",&m_a[i],&x_a[i],&y_a[i],&ux_a[i],&uy_a[i]); /*printf("%g %g %g %g %g\n",m_a[i],x_a[i],y_a[i],ux_a[i],uy_a[i]);*/ } fclose(file); //reading initial values from the outcome of IV

for(k=0;k<=num-1;k++) { R_i[k]=R(x_a[k],y_a[k]); R_a[k]=R(x_a[k],y_a[k]); R_p[k]=R(x_a[k],y_a[k]); E_0[k]=Energy(x_a[k],y_a[k],x_J,y_J,ux_a[k],uy_a[k]); }

for(i=1;i<=N;i++) { for (a=0;a<=3;a++) { k1[a]=dt*RHS_J(a+1,m_Sun, x_J, y_J, ux_J, uy_J); }

for (a=0;a<=3;a++) { k2[a]=dt*RHS_J(a+1,m_Sun, x_J+0.5*k1[0], y_J+0.5*k1[2], ux_J+0.5*k1[1], uy_J+0.5*k1[3]); }

for (a=0;a<=3;a++) { University of Arizona 16 Kirkwood Gaps Physics 305 2017

k3[a]=dt*RHS_J(a+1,m_Sun, x_J+0.5*k2[0], y_J+0.5*k2[2], ux_J+0.5*k2[1], uy_J+0.5*k2[3]); }

for (a=0;a<=3;a++) { k4[a]=dt*RHS_J(a+1,m_Sun, x_J+k3[0], y_J+k3[2], ux_J+k3[1], uy_J+k3[3]); }

x_J=x_J+(1./6.)*k1[0]+(1./3.)*k2[0]+(1./3.)*k3[0]+(1./6.)*k4[0]; ux_J=ux_J+(1./6.)*k1[1]+(1./3.)*k2[1]+(1./3.)*k3[1]+(1./6.)*k4[1]; y_J=y_J+(1./6.)*k1[2]+(1./3.)*k2[2]+(1./3.)*k3[2]+(1./6.)*k4[2]; uy_J=uy_J+(1./6.)*k1[3]+(1./3.)*k2[3]+(1./3.)*k3[3]+(1./6.)*k4[3]; //Runge-Kutta method solving Jupiter's motion

for (k=0;k<=num-1;k++) { x=x_a[k];y=y_a[k];ux=ux_a[k];uy=uy_a[k]; for (a=0;a<=3;a++) { k1[a+4]=dt*RHS_a(a+1,m_J,m_Sun, x_J,x, y_J,y, ux, uy); }

for (a=0;a<=3;a++) { k2[a+4]=dt*RHS_a(a+1,m_J,m_Sun, x_J+0.5*k1[0],x+0.5*k1[4], y_J+0.5*k1[2],y+0.5*k1[6], ux+0.5*k1[5], uy+0.5*k1[7]); }

for (a=0;a<=3;a++) { k3[a+4]=dt*RHS_a(a+1,m_J,m_Sun, x_J+0.5*k2[0],x+0.5*k2[4], y_J+0.5*k2[2],y+0.5*k2[6], ux+0.5*k2[5], uy+0.5*k2[7]); }

University of Arizona 17 Kirkwood Gaps Physics 305 2017

for (a=0;a<=3;a++) { k4[a+4]=dt*RHS_a(a+1,m_J,m_Sun, x_J+k3[0],x+k3[4], y_J+k3[2],y+k3[6], ux+k3[5], uy+k3[7]); } R_0[k]=R(x_0[k],y_0[k]); R_1[k]=R(x,y); x_0[k]=x;y_0[k]=y; x=x+(1./6.)*k1[4]+(1./3.)*k2[4]+(1./3.)*k3[4]+(1./6.)*k4[4]; ux=ux+(1./6.)*k1[5]+(1./3.)*k2[5]+(1./3.)*k3[5]+(1./6.)*k4[5]; y=y+(1./6.)*k1[6]+(1./3.)*k2[6]+(1./3.)*k3[6]+(1./6.)*k4[6]; uy=uy+(1./6.)*k1[7]+(1./3.)*k2[7]+(1./3.)*k3[7]+(1./6.)*k4[7]; //Runge-Kutta method solving for asteroids' motion

x_a[k]=x;y_a[k]=y;ux_a[k]=ux;uy_a[k]=uy; R_2[k]=R(x,y); if(R_0[k]

else if(R_0[k]>R_1[k]&&R_2[k]>R_1[k]) R_p[k]=R_1[k]; //finding perihelion } if(t == (int)t && (int)t % 10 == 0) { printf("%g ",t); for(k=0;k<=num-1;k++) { E_R[k]+=0.5*(R_a[k]+R_p[k])/200; //calulate the expection of semi-major axes

printf("%g ",0.5*(R_a[k]+R_p[k])); //print the semi-major axes in every step } printf("\n"); } t+=dt; } for(k=0;k<=num-1;k++) { printf("%g\n",0.5*(R_a[k]+R_p[k])); //print final semi-major axes

printf("%g %g\n",R_i[k],E_R[k]-R_i[k]); //print initial radius distance and it's difference between the expection

printf("%g\n",E_R[k]); //print the expection of semi-major axes } University of Arizona 18 Kirkwood Gaps Physics 305 2017

return 0; }

//con.c #include #include #define num 1

double RHS_J(int n, double m3, double x1, double y1, double ux1, double uy1) { if(n==1) return ux1; if(n==2) return -m3*x1/(pow(x1*x1+y1*y1,1.5)); if(n==3) return uy1; if(n==4) return -m3*y1/(pow(x1*x1+y1*y1,1.5)); //Jupiter return 0.0; }

double RHS_a(int n, double m1, double m3, double x1, double x2, double y1, double y2, double ux2, double uy2) { if(n==1) return ux2; if(n==2) return m1*(x1-x2)/(pow((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1),1.5))- m3*x2/(pow(x2*x2+y2*y2,1.5)); if(n==3) return uy2; if(n==4) return m1*(y1-y2)/(pow((x2-x1)*(x2-x1)+(y2-y1)*(y2-y1),1.5))- m3*y2/(pow(x2*x2+y2*y2,1.5)); //asteriod return 0.0; } double R(double x,double y) { return sqrt(x*x+y*y);

University of Arizona 19 Kirkwood Gaps Physics 305 2017

}

double Energy(double x,double y,double x_J,double y_J,double ux,double uy) { return 0.5*(ux*ux+uy*uy)-4*pow(M_PI,2)/sqrt(x*x+y*y)-0.0376807/sqrt(pow(x- x_J,2)+pow(y-y_J,2)); } int main(void) { double m_Sun=4*pow(M_PI,2); double m_J=0.0376807; double t=0; int i,a,k,T; double x,y,ux,uy; double dt; double N; double k1[8],k2[8],k3[8],k4[8]; double m_a[num],x_a[num],y_a[num],ux_a[num],uy_a[num]; double x_0[num],y_0[num]; double x_J,y_J,ux_J,uy_J; double R_a[num],R_p[num],R_m[num],R_0[num],R_1[num],R_2[num]; double R_i[num]; double E_0[num],E[num]; double E_R[num]={0}; double x_input[num],y_input[num],ux_input[num],uy_input[num]; double E_J,E_J0;

FILE *file; file=fopen("IV.out","r"); if(file == NULL) { printf("Unable to open file\n"); return -1; } double temp; for(i=0;i<=num-1;i++) { fscanf(file,"%lg %lg %lg %lg %lg",&m_a[i],&x_a[i],&y_a[i],&ux_a[i],&uy_a[i]); x_input[i]=x_a[i];y_input[i]=y_a[i];ux_input[i]=ux_a[i];uy_input[i]=uy_a[i]; } fclose(file);

for(k=0;k<=num-1;k++) { E_0[k]=Energy(x_a[k],y_a[k],x_J,y_J,ux_a[k],uy_a[k]); } //initial energy of asteroids

for(dt=1./2.;dt>=1./512.;dt/=1.1) { for(i=0;i<=num-1;i++) { University of Arizona 20 Kirkwood Gaps Physics 305 2017

x_a[i]=x_input[i];y_a[i]=y_input[i];ux_a[i]=ux_input[i];uy_a[i]=uy_input[i]; } double N=10000/dt; x_J=5.4588,y_J=0,ux_J=0,uy_J=2.62267; for(i=1;i<=N;i++) { for (a=0;a<=3;a++) { k1[a]=dt*RHS_J(a+1,m_Sun, x_J, y_J, ux_J, uy_J); }

for (a=0;a<=3;a++) { k2[a]=dt*RHS_J(a+1,m_Sun, x_J+0.5*k1[0], y_J+0.5*k1[2], ux_J+0.5*k1[1], uy_J+0.5*k1[3]); }

for (a=0;a<=3;a++) { k3[a]=dt*RHS_J(a+1,m_Sun, x_J+0.5*k2[0], y_J+0.5*k2[2], ux_J+0.5*k2[1], uy_J+0.5*k2[3]); }

for (a=0;a<=3;a++) { k4[a]=dt*RHS_J(a+1,m_Sun, x_J+k3[0], y_J+k3[2], ux_J+k3[1], uy_J+k3[3]); }

x_J=x_J+(1./6.)*k1[0]+(1./3.)*k2[0]+(1./3.)*k3[0]+(1./6.)*k4[0]; ux_J=ux_J+(1./6.)*k1[1]+(1./3.)*k2[1]+(1./3.)*k3[1]+(1./6.)*k4[1]; y_J=y_J+(1./6.)*k1[2]+(1./3.)*k2[2]+(1./3.)*k3[2]+(1./6.)*k4[2]; uy_J=uy_J+(1./6.)*k1[3]+(1./3.)*k2[3]+(1./3.)*k3[3]+(1./6.)*k4[3];

for (k=0;k<=num-1;k++) { x=x_a[k];y=y_a[k];ux=ux_a[k];uy=uy_a[k]; for (a=0;a<=3;a++) University of Arizona 21 Kirkwood Gaps Physics 305 2017

{ k1[a+4]=dt*RHS_a(a+1,m_J,m_Sun, x_J,x, y_J,y, ux, uy); }

for (a=0;a<=3;a++) { k2[a+4]=dt*RHS_a(a+1,m_J,m_Sun, x_J+0.5+k1[0],x+0.5*k1[4], y_J+0.5*k1[2],y+0.5*k1[6], ux+0.5*k1[5], uy+0.5*k1[7]); }

for (a=0;a<=3;a++) { k3[a+4]=dt*RHS_a(a+1,m_J,m_Sun, x_J+0.5*k2[0],x+0.5*k2[4], y_J+0.5*k2[2],y+0.5*k2[6], ux+0.5*k2[5], uy+0.5*k2[7]); }

for (a=0;a<=3;a++) { k4[a+4]=dt*RHS_a(a+1,m_J,m_Sun, x_J+k3[0],x+k3[4], y_J+k3[2],y+k3[6], ux+k3[5], uy+k3[7]); } x=x+(1./6.)*k1[4]+(1./3.)*k2[4]+(1./3.)*k3[4]+(1./6.)*k4[4]; ux=ux+(1./6.)*k1[5]+(1./3.)*k2[5]+(1./3.)*k3[5]+(1./6.)*k4[5]; y=y+(1./6.)*k1[6]+(1./3.)*k2[6]+(1./3.)*k3[6]+(1./6.)*k4[6]; uy=uy+(1./6.)*k1[7]+(1./3.)*k2[7]+(1./3.)*k3[7]+(1./6.)*k4[7]; x_a[k]=x;y_a[k]=y;ux_a[k]=ux;uy_a[k]=uy; } t+=dt; } for(k=0;k<=num-1;k++) { E[k]=Energy(x_a[k],y_a[k],x_J,y_J,ux_a[k],uy_a[k]); //final energy of asteroids printf("%g %g\n",dt,fabs((E[k]-E_0[k])/E_0[k])); //print dt and percentage error of energy } } return 0; }

University of Arizona 22 Kirkwood Gaps Physics 305 2017

//exp.py import numpy as np import matplotlib.pyplot as plt

alldata=np.genfromtxt("ode.out") xarray=alldata[:,0] yarray=alldata[:,1]

plt.plot(xarray,yarray,'-') plt.xlabel('x-axis label') plt.ylabel('y-axis label') ax=plt.axes() plt.show()

//hist.py import numpy as np import matplotlib.pyplot as plt

alldata=np.genfromtxt("ode.out") plt.hist(alldata,200,histtype='step') plt.xlabel('semi-major axis') plt.ylabel('# of asteroids') plt.show()

//con.py import numpy as np import matplotlib.pyplot as plt

alldata=np.genfromtxt("con.out") xarray=alldata[:,0] yarray=alldata[:,1] plt.plot(xarray,yarray,'r') plt.xlabel('dt') plt.ylabel('err') plt.xscale('log') plt.yscale('log') plt.show()

University of Arizona 23