Anda di halaman 1dari 25

The Trojan Asteroids

Abstract The circular restricted three body problem is investigated numerically near the points of stable equilibrium preceding and trailing Jupiter (L4 and L5 ). The Runge-Kutta Fehlberg (4,5) routine was implemented to solve the motion of the Trojan asteroids in the Sun-Jupiter system. We found that an asteroid initially placed at L4 will remain xed in this stable position. Asteroids were also shown to undergo libration about L4 for small radial separations from the stability position. The resulting orbits were characteristically shaped like either a tadpole or a horseshoe. The eect of varying the mass of the planet on the stability of the asteroids orbits was also examined. We discovered that a threshold mass exists ( 0.04M ) above which asteroids quickly become unstable. Furthermore, it was found that resonant behaviour occurs for planet masses near 0.0137M than Jupiter. and 0.025M . Finally, a relationship between the libration amplitude and the planet mass was derived for smaller masses

Introduction

Whilst attempting to solve the three body problem, Lagrange [1772] discovered that if two bodies move in circular, coplanar orbits around their centre of mass then there exist ve stationary points for a third body of negligible mass. Two of these stationary points, L4 and L5 , are theoretically stable [Dermott and Murray, 1999] and have been shown to be stable for the Trojan asteroids of the Sun-Jupiter system thus validating Lagranges theory. An analysis of the behaviour of Trojan asteroids around these two stationary points is presented here. We model the Sun-Jupiter-Trojan system according to the circular restricted three body problem (CRTBP) described above with the asteroid acting as the negligible mass. Also, for convenience, we work in the co-rotating frame of the Sun and Jupiter and consider only the plane of their rotation. This simplies the problem so that we now only have an asteroid moving under the inuence of the Sun, Jupiter and the centrifugals combined static potential rather than a potential that depends on time. As we shall see later this means that the Hamiltonian is a constant of motion in this frame. From the Euler-Lagrange equations (see appendix A), we nd that the equation of motion of the asteroid is,

d2 x GMs (x xs ) GMj (x xj ) dx = 2( ) ( x) 2 3 3 dt | x xs | | x xj | dt

(1)

where x is the position of the asteroid; xs and Ms are the xed position and mass of the Sun; xj and Mj 1

The Trojan Asteroids

are the xed position and mass of Jupiter; and is the angular velocity of the frame. Currently, this dierential equation is non-integrable so we computed the path of a Trojan asteroid numerically. This was done using an adaptive Runge-Kutta-Fehlberg integrator. It was then demonstrated that the asteroids stayed xed at the Lagrange point L4 to show that there were no numerical instabilities propagating during the computation. The next step was to vary the initial positions of the asteroid near Lagrange point L4 and plot the subsequent motion after a few hundred orbits of Jupiter. Lastly, the behaviour of the resulting orbits was investigated for a range of planetary masses.

2
2.1

Analysis
The Model

Although the actual motion of Jupiter and the Sun is elliptic, important results that are inherent to all restricted three body problems can be found by simplifying the situation to that of circular motion. In the circular restricted three body problem the motion of the two massive bodies (the Sun and Jupiter) is solved. Their orbits are circular and coplanar around their centre of mass with constant angular frequency, , which is given by Keplers law: 2 R3 = G(Ms + Mj ). (2)

All that is left to solve is the motion of the asteroid. Working in the co-rotating frame of the bodies about the barycentre, the motion is that of an asteroid moving in a non-centralised static potential. The positions of the Sun and Jupiter are given by,

xs =

Mj R, 0, 0 M + Mj

(3)

xj =

M R, 0, 0 M + Mj

(4)

where R is the distance between the Sun and Jupiter. Using numerical techniques, we solved the trajectory of the asteroid after initially positioning it near one of stable points (due to the symmetry of the problem it does not matter whether we place an asteroid around L4 or L5 ). The positions of these two points in Cartesian coordinates [Nelson, n.d.] are given exactly by, 3 1 M Mj R, R, 0 . 2 M + Mj 2

L4,5 =

(5)

2.2

Numerical Integration

We used an adaptive step Runge-Kutta-Fehlberg method (RKF45) in order to keep the results to a specied accuracy with minimum computational eort. This scheme is known as an excellent general 2

The Trojan Asteroids

purpose integrator as long as the integration is not over a long period of time. It was useful here because the characteristic time-scale of the asteroid varies along its path. At certain times, the asteriod may decelerate and therefore would require less steps to keep below the predetermined accuracy. If there are less steps to integrate over, the computation time is decreased.

2.3

Units

To reduce the eect of round-o errors and to get optimum accuracy in our results we used units appropriate to the scale of the system i.e. quantities were scaled so that they were of order unity. The lengths were measured in astronomical units (AU ), time was measured in years (yrs)/. and masses were measured in solar mass units (M ). In these solar system units the gravitational constant is 4 2 .

Implementation

The integrating program was implemented with c++. Output was written to a data le specied in the code. Gnuplot was then used to interpret the data le graphically. The program itself was set up to use a RKF45 routine which was provided by the Gnu Science Library (GSL). The GSL routine required that the two 2nd order equations of motion (see equation 1) were reduced to four 1st order equations. The Sun, Jupiter and the asteroid existed only in global variables and not as classes due to the small scope of the program. All non-integer variables were stored as double precision oating point numbers. This was to ensure that round-o errors did not interfere with the integration scheme and could therefore be safely discounted if/when an apparent computational error was encountered. The program has the following structure:

The global variables are rst initialized by the user within the program. These variables include the initial position and velocity components of the asteroid, the masses of Jupiter and the Sun, the integration parameters and the sample frequency. Command line arguments were not used because the initial conditions of the asteroid were in terms of the L4 position and therefore were calculated by the program. The sample frequency was typically set to one because although a higher frequency would cut the computation time, the resolution of the orbit would decrease. When the program runs, the GSL RKF45 routine solves the motion of the asteroid in steps until the maximum period of integration, tmax, is reached. The state of the asteroid i.e. its position, velocity and Hamiltonian is printed printed at every step (if the sample frequency is 1). Another program was implemented which varies the mass of the planet orbiting the Sun and prints out the time and the range of wander (a.k.a. the libration amplitude) of the asteroid. The wander is calculated as the average of the arc distance between wanderlead and L4 and between wandertrail and L4 .1 At every step, the position of the asteroid is checked; if the asteroid is further than
1 The

arc distance is the length of arc between two points on the circumference of the circle centred on the barycentre

with radius L4 .

The Trojan Asteroids

wanderlead/wandertrail then these are updated. After the integration, the value of wander is calculated to get an accurate measure of the libration amplitude. The mass and wander are then printed to le and the loop over planet mass continues.

See appendix C for a listing of all the relevant source code and gnuplot les.

4
4.1

Results and Discussion


Stability at L4 /L5

In order to test whether any there were any computational errors propagating through the program, an asteroid was placed at the L4 stability point and the trajectory was solved for a few hundred orbits of Jupiter around the Sun. It is important that the system has long term stability because the Trojan asteroids can have orbital periods about L4 that are of the order of ten times Jupiters orbital period. We found that the libration amplitude is of the order of 1012 AU conrming the analytically solved Lagrange point positions. The error can be attributed to both the integrator which is set up so that the absolute error is maintained at 1012 and round-o due to nite precision arithmetic at every step. The Hamiltonian was also calculated at every integration step and printed to a data le. We found that energy is indeed conserved with an accuracy determined by nite precision round-o error. Also, it should be noted that the asteroid must be performing extremely small orbits about the L4 stability point because the error in energy is three orders of magnitude less than the range of wander.

4.2

Truncation Error

Due to a non-zero step size in the integration scheme we cannot perfectly calculate the trajectory at each step, which leads to truncation error. This can be reduced by shortening the step size but then the number steps and therefore the computation time increases. Also, by decreasing the step size the round-o error associated with nite precision arithmetic is increased for each step. The adaptive step method we used kept the truncation error below a certain error threshold and took the number of steps necessary in order to preserve this accuracy. The error threshold was chosen to be 1012 . Error accumulation, however, persists so we checked whether this had a substantial eect on the conserved energy. Figure 1 shows that during the integration, the energy increases linearly with time. This conrmed our suspicion that error would accumulate but we can also see that over 10000 yrs the energy only deviates by an order of 1010 AU 2 yrs2 . As quantities were of the order unity, this means our program was running very accurately. Figure 1 also compares the error propagation between orbits that resulted from dierent initial conditions. We see that more error was propagating in the larger amplitude orbits. This was expected because these orbits were travelling faster and therefore required more steps in order to keep below the error threshold.

The Trojan Asteroids

8e-11 7e-11 Energy per unit Mass / (AU2)(years-2) 6e-11 5e-11 4e-11 3e-11 2e-11 1e-11 0 0 2 4 6 Time / 1000*years 8 10

Figure 1: The propagation of error in the conserved energy as time progresses in the asteroids orbit. The further from L4 an asteroid is placed initially, the more error propagates. Black: parameters are the same as those gure 3. Red: parameters are the same as those for gure 4. Blue: parameters are the same as those for gure 5. Purple: parameters are the same as those for the horseshoe orbit in gure 6.

4.3

Tadpole and Horseshoe Orbits

After establishing the long term stability of our program, we set the initial position of an asteroid to positions very close to the L4 point in order to investigate the stability. We worked in the co-rotating centre of mass frame with the Sun positioned on the x-axis on the left and Jupiter positioned on the x-axis on the right. The resulting motion of the asteroid is best shown in gure 2. For this plot the asteroid was placed away from the L4 point in the radial direction from the origin and the integration was over 300 years (enough for just over two orbits around L4 ). Starting from its initial position the centrifugal force on the asteroid is larger than the combined potential of the Sun and Jupiter. The asteroid therefore accelerates radially away from the centre of mass until the coriolis force dominates (as it has a velocity now in the rotating frame) which causes the asteroid to move in a curve back to the initial radius. As the asteroid slows down at this radius, the centrifugal term dominates again and the motion repeats. This explains the motion along the small arcs within the larger orbit around the stability point. The longer period motion that gives rise to the tadpole shape is due to the asteroids periodic approaches to Jupiter and is known as libration. We see from gure 2 that the asteroid is bound in a tadpole shaped region around the L4 point inside which it librates. This implies that the position is stable at least for small distances from the L4 position. Another plot of an asteroid starting with the same initial conditions but integrated over a longer period of 1000 years, shown in gure 3, conrms that the orbit is stable. Note that there is a smaller tadpole

The Trojan Asteroids

shaped region about the L4 point where the asteroid does not cross into. In fact, we know that it will never cross into this region because the boundary curve is a zero velocity curve [Dermott and Murray, 1999]. Motion within this region would require a complex velocity in order to conserve the Hamiltonian (see appendix B). As the asteroid is initially at rest in gures 2 and 3, the zero velocity curve must pass through its initial position.

5.5 5 4.5 4 3.5 3 0 0.5 1 1.5 2 2.5 x / AU 3 3.5 4 4.5

Figure 2: A tadpole orbit librating about the L4 equilibrium point (denoted by the red cross). The initial position is denoted by the blue box. Parameters for this plot are given in table 1.

y / AU y / AU

6 5 4 3 2 1 0 -6 -4 -2 0 x / AU 2 4 6

Figure 3: This is the same orbit as in gure 2 but zoomed out to include the Sun and Jupiter (denoted by the lled circles). All the Lagrange points are shown here except L5 as red crosses. Parameters for this plot are given in table 1.

The Trojan Asteroids

6 5 4 y / AU 3 2 1 0 -6 -4 -2 0 x / AU 2 4 6

Figure 4: A tadpole orbit around L4 . The larger initial radial separation caused the tadpole orbit to librate at a higher amplitude. The parameters are given on table 1.

To investigate the stability of orbits further we increased the radial separation of the initial position of the asteroid from L4 . It was found that the angular separation between the leading and trailing edges of the tadpole orbit and L4 increased.2 If we consider the Hamiltonian, this behaviour can be partly explained. By increasing the radial separation we have moved the zero velocity curve to the new position. This corresponds to decreasing the Hamiltonian of the system so that less of the potential hill around L4 is accessible by the asteroid. With a larger forbidden region around L4 , the asteroid is forced to librate at higher amplitudes. Again, this only partially explains the problem because we have not addressed the issue of stability. In the case of gure 4, where the radial separation was 0.01L4 the orbit was stable for 10000 yrs. Due to the equations being non-integrable, we cannot nd analytical conditions for stability. Nevertheless, we nd empirically that for small radial separations (much less than 0.01L4 ) the orbits are stable. An example of an unstable orbit resulting from a radial separation that was too large is shown in gure 5.
2 The

angular separation is dened here as the angle between lines that begin at the barycentre and end at the positions

of interest.

The Trojan Asteroids

2 y / AU

-2

-4

-6 -6 -4 -2 0 x / AU 2 4 6

Figure 5: An example of instability arising from an initial radial separation that is too large. Parameters are given on table 1.

2 y / AU

-2

-4

-6 -6 -4 -2 0 x / AU 2 4 6

Figure 6: A horseshoe orbit librating about the L4 and L5 equilibrium positions. Just over one orbit is shown here. After 550 yrs the orbit becomes unstable. Parameters for this plot are given in table 1.

By introducing an initial velocity to the asteroid, we were able to nd a horseshoe shaped orbit

The Trojan Asteroids

shown in gure 6. This was dicult because a high radial separation was required and therefore orbits were mostly unstable. We could not, in fact, nd a horseshoe orbit that was stable after 10000 yrs. After 550 yrs, the orbit shown in gure 6 became unstable. Figure Planet Mass / M 2 3 4 5 6 L4 0.001 0.001 0.001 0.001 0.001 0.001 1.005*L4 [x] 1.005*L4 [x] 1.01*L4 [x] 1.015*L4 [x] 1.01*L4 [x] 2.59 1.005*L4 [y] 1.005*L4 [y] 1.01*L4 [y] 1.015*L4 [y] 1.01*L4 [y] 4.5 0 0 0 0 -0.004*L4 [x] N/A 0 0 0 0 0.004*L4 [y] N/A x / AU y / AU x / AU yrs1 y / AU yrs1 Integration Period / yrs 300 1000 1000 771 330 N/A

Table 1: The relevant parameters and initial conditions for the gures in section 4. The Lagrange point L4 is also shown here for the Jupiter-Sun system. The program ran for 12 seconds for integrations of up to 1000 yrs.

4.4

Wander vs. Planet Mass: Initial Separation in the Azimuthal Direction

After nding initial conditions for which the asteroids orbit is stable over 10000 yrs we could investigate the eect of varying the mass of the planet on the libration amplitude (see section 3 for a denition of the amplitude). It should be noted here that if an asteroid was recognised as unstable during the integration the range of wander was set to 20 AU . This means that the peaks in gures 7 and 8 correspond to unstable orbits. We considered two types of separation from L4 ; radial and azimuthal. Firstly, the asteroid was initially placed at a small anti-clockwise arc separation from L4 at each planetary mass. The resulting plot is shown in gure 7. From the plot we see that up to 0.0236 M the libration amplitude stays constant. This is because at such small arc separations, the orbit of the asteroid will lie very close to the zero velocity curve. For a zero velocity curve the position of maximum wander from L4 occurs on the circle centred at the origin and passing through L4 . Thus if the initial position lies on the arc, the zero velocity curve will also pass through there and the position of maximum wander will lie there also. This explains the constant behaviour because the initial arc separation does not change. Surprisingly, for planetary masses around 0.025 M there is a resonance. Dermott and Murray (which is approximate for small [1999] hint at why this is the case. At a planet mass of 0.025 M

amplitude separations) the periods of the small amplitude oscillation and the large amplitude libration of the asteroid are in a simple numerical ratio of 1 : 2. Such relationships in celestial dynamics either cause stability or resonance. Another feature of the plot in gure 7 is the threshold mass at 0.0407 M . Above this planetary mass an asteroid seemed unable to sustain a stable orbit. Theoretically, the threshold mass can be determined if we linearise the Hamiltonian in terms of small quantities that oscillate [Cornish, n.d.]. In order for the frequencies to be real we nd that the planet mass must be lower than a threshold mass of 0.04 M . The threshold value we found (0.0407 M ) diered from this by 1.75% which is quite accurate. 9

The Trojan Asteroids

20

15 Range of Wander / AU

10

0 0 0.01 0.02 0.03 Mass of Planet / Solar Masses 0.04

Figure 7: The libration amplitude plotted against the planet mass for an asteroid with an azimuthal initial separation of (/64)R. The integration period was 1000 yrs for each mass. There were 400 equal steps in mass from 0.0002 M to 0.045 M . The time to compute the data for this graph was 45 s.

4.5

Wander vs. Planet Mass: Initial Separation in the Radial Direction

The second type of separation we considered was a radial separation from L4 . Two additional resonances were found around planetary masses of 0.0137 M and 0.036 M (see gure 8). Evaluating the asteroids periods of oscillation shows us that these correspond to commensurabilities of 1:3 and 2:3 respectively. Another dierence with the azimuthal case was observed at low mass ratios where the libration amplitude was not constant. Rather, as shown in gure 9, it followed the relationship,

A = a1 (Mj a2 )a3 + a4 with parameters: a1 = 0.056 0.001 AU M a3 a2 = (5.96 0.09) 105 M a3 = 0.503 0.002 a4 = 0.226 0.005

(6)

where A is the libration amplitude and a1 , a2 , a3 and a4 were found using Gnuplots fit function.3 We
3 The

t function uses an implementation of the nonlinear least-squares (NLLS) Marquardt-Levenberg algorithm.

10

The Trojan Asteroids

can compare this with the ratio of the semi-major and semi-minor axes of the associated zero velocity curve given by Dermott and Murray [1999]:

a 1 = b 3

M 1+ Mj

1 2

(7)

By noting that Mj << M and also that we are only interested in masses within one order of magnitude of Jupiters mass we see that our derived relationship is close to the analytical result. We also see that the zero velocity curves give a good indication of the motion for small amplitude librations about the equilibrium point L4 .
20

15 Range of Wander / AU

10

0 0 0.01 0.02 0.03 Mass of Planet / Solar Masses 0.04

Figure 8: The libration amplitude plotted against the planet mass for a radial initial separation of 0.005R. The mass loop parameters are the same as those in gure 7. The time to compute the data for this graph was 61 s.

11

The Trojan Asteroids

6 Data 0.0559(M-5.96e-05)-0.503+0.266 5 Range of Wander / AU

0 0 0.001 0.002 0.003 Mass of Planet / Solar Masses 0.004 0.005

Figure 9: This is the same plot as in gure 8 but zoomed in on the low planet masses. The data are represented by the black line and the curve tted by Gnuplot is represented by the red line.

Conclusions

By simplifying the two body problem to that of circular, coplanar orbits about a common centre of mass we were able to model the motion of the Trojan asteroids about the Lagrange point L4 with little diculty. Asteroids that were initially placed at the stability position in the Sun-Jupiter system remained there over a period of 10000 yrs with deviations from equilibrium of 1012 AU . The Hamiltonian was also conserved down to oating point error showing excellent stability in the program. For small initial separations from L4 we saw that the asteroid librates about the stability point in a tadpole orbit. Horseshoe orbits were also observed in which the asteroid librates about L4 and L5 . Plotting the energy against time we nd that the energy is conserved very well. Truncation error does accumulate to linearly increase the energy but after 10000 yrs the energy only rises by 1010 . For large enough separations, the motion does not remain near the stability points and escapes to become a satellite of the Sun. Varying the mass of the planet for small initial separations from L4 gave rise to a number of subtle features. Resonances were observed in both azimuthal and radial initial separations that correspond to commensurabilities in the asteroids orbital frequencies. We found that 1 : 2 resonances occur for both types of initial separation and an additional two resonances occur for the radial initial separation (1 : 3 and 2 : 3). Another feature that appears when varying the mass is the existence of a threshold mass. Above this mass, the asteroids cannot sustain a stable orbit about L4 . The two types of initial separation were found to have dierent threshold masses. For the radial separation, the threshold mass was 0.0396 M , which diered by 1.00% from the analytic result (0.04 M ). The threshold mass for an 12

The Trojan Asteroids

initial azimuthal separation was 0.0407 M , diering by 1.75%. A relationship between the libration amplitude and the planet mass for masses within one order of magnitude of Jupiters was derived. For azimuthal separations, the libration amplitude stayed constant over this range of masses. For radial separations, the relationship was approximately:

A (Mj ) 2 . This is close to the dependence of the zero velocity curves semi-major axis on the planet mass. Thus we can see that for small amplitude librations about L4 the shape of the tadpole orbit is determined largely by the shape of the zero velocity curve.

Further Work

Jupiter is thought to have initially formed as a small rock which grew into its current size via adiabatic accretion [Kumar, 1972]. In our investigation on the eect of planet mass with the libration amplitude we placed the asteroid at the same initial separation for a number of masses. To further this we could have examined the eect of mass accretion on the migration of the Trojan asteroids. We should nd a dierent relationship between the range of wander and the planet mass [Fleming and Hamilton, 2000]. In addition, it would be interesting to see the eect of varying the initial separation of the asteroid on this relationship.

Equations of Motion in Corotating Frame

To nd the equations of motion in the co-rotating frame we start with the Lagrangian:

L=

m dr +r 2 dt

U (r).

The canonical momentum is found by using the identity:

dr +r dt

dr dt

+ 2 r

dr dt

+ 2 r2 ( r)2

(8)

which then implies that the canonical momentum is:

p =

L (dr/dt) dr = m +r . dt 13

The Trojan Asteroids

Now we use the Euler Lagrange equations,

dp L =0 dt r with,

L dr = U (r) m + ( r) r dt and,

dp =m dt to get the equations of motion:

d2 r d dr + r+ dt2 dt dt

d2 r = U (r) m dt2

d dr r + 2 + ( r) . dt dt

(9)

The Hamiltonian

The Hamiltonian is dened as:

dr L dt 2 dr dr = m + ( r) dt dt p

m dr +r 2 dt

+ U (r).

We then use the equation 8 to simplify H to:

H=

m 2

dr dt

m 2 2 r + ( r)2 + U (r). 2

In our problem, the rotation axis is perpendicular to the plane in which the Sun and Jupiter both orbit. We can therefore set ( r)2 = 0 to get the conserved energy for our asteroid:

H=

m 2

dr dt

m 2 2 r + U (r). 2

(10)

The Hamiltonian is a constant of motion. If we want to nd the zero velocity curve we just set the velocity to zero in equation 10 and solve for r and . 14

The Trojan Asteroids

Source code
Listing 1: Makefile. The Makele required to compile and link the code on the PWF.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

# MAKEFILE FOR simple C++ programming CFLAGS = -g -pedantic -Wall -I/ux/physics/part_2/c++ -I/usr/include/ -I/usr/include

LIBS = /ux/physics/part_2/c++/cavlib/cavlib.a -lgsl -lgslcblas -lfftw3 CXX = g++ .PHONY: clean clean: rm *.o %: %.cc $(CXX) $(CFLAGS) -o $@ $< $(LIBS)

Listing 2: trojan.cc. The source code for the program that solves the motion of an asteroid in the CRTBP.
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

#include <stdio.h> #include <iostream> #include <fstream> #include <cmath> #include <gsl/gsl_errno.h> #include <gsl/gsl_odeiv.h> #include "cavlib/constants.hh" struct Param { double ms; double mj; double xs; double xj; double R; double omega; }; int calc_derivs (double t, const double y[], double dydt[], void *params) { Param p = *(Param*) (params); double ms = p.ms; double mj = p.mj; double xs = p.xs;

15

The Trojan Asteroids

26 27 28 29 30 31

double xj = p.xj; double omega = p.omega; dydt[0] = y[2]; dydt[1] = y[3]; dydt[2] = 2*omega*y[3] + omega*omega*y[0]-(4*C::pi*C::pi)*(((ms*(y[0]-xs))/pow(sqrt((y[0]-xs)*(y [0]-xs)+y[1]*y[1]), 3))+((mj*(y[0]-xj))/pow(sqrt((y[0]-xj)*(y[0]-xj)+y[1]*y[1]), 3)));

32 33

dydt[3] = -2*omega*y[2] + y[1]*(omega*omega-(4*C::pi*C::pi)*((ms/pow(sqrt((y[0]-xs)*(y[0]-xs)+y[1]* y[1]), 3))+(mj/pow(sqrt((y[0]-xj)*(y[0]-xj)+y[1]*y[1]), 3))));

34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70

return GSL_SUCCESS; } void print_state( double t, double x, double vx, double y, double vy, double E, std::ofstream& f ) { f << t << "\t" << x << "\t" << vx << "\t" << y << "\t" << vy << "\t" << E << "\n"; } void print_posn( double x, double y, std::ofstream& f ) { f << x << "\t" << y << "\n\n\n"; } int main (void) { std::ofstream f; f.precision(16); //DATA FILE f.open( "data_orbit" ); const int n_equations = 4; double y[n_equations]; time_t t1, t2; double dt; Param p; const gsl_odeiv_step_type * step_type = gsl_odeiv_step_rkf45; gsl_odeiv_step * gsl_step = gsl_odeiv_step_alloc (step_type, n_equations); gsl_odeiv_control * gsl_control = gsl_odeiv_control_y_new (1e-12, 0.0); gsl_odeiv_evolve * gsl_evolve = gsl_odeiv_evolve_alloc (n_equations); gsl_odeiv_system sys = {calc_derivs, NULL, n_equations, &p};

16

The Trojan Asteroids

71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117

//TWO BODY PARAMETERS (AU, Mo, years, G=4*pi^2) double R = 5.2; double ms = 1; double mj = 0.001; double xs = -mj*R/(mj+ms); double xj = ms*R/(mj+ms); double omega = sqrt(4*C::pi*C::pi * (ms+mj) / pow( R, 3 )); //LAGRANGE POINTS double L1[2] = {R*(1-cbrt(mj/(3*(ms+mj)))), 0}; double L2[2] = {R*(1+cbrt(mj/(3*(ms+mj)))), 0}; double L3[2] = {-R*(1+cbrt(5*mj/(12*(ms+mj)))), 0}; double L4[2] = {(R/2)*((ms-mj)/(ms+mj)), R*(sqrt(3))/2}; double L5[2] = {(R/2)*((ms-mj)/(ms+mj)), -R*(sqrt(3))/2}; //INITIAL CONDITIONS OF ASTEROID y[0] = 1.01*L4[0]; //sqrt(L4[0]*L4[0]+L4[1]*L4[1])*cos(atan(L4[1]/L4[0]) + C::pi/8); y[1] = 1.01*L4[1]; //sqrt(L4[0]*L4[0]+L4[1]*L4[1])*sin(atan(L4[1]/L4[0]) + C::pi/8); y[2] = 0; //-0.004*L4[0]; y[3] = 0; //0.004*L4[1]; p.R = R; p.ms = ms; p.mj = mj; p.xs = xs; p.xj = xj; p.omega = omega; //INTEGRATION PARAMETERS double t = 0; double tmax = 10000; //STEP SIZE AND SAMPLE FREQ. double h = 1e-12; int sample_every = 1; //PRINT POSITIONS OF SUN, PLANET & LAGRANGE POINTS print_posn(p.xs, 0, f ); print_posn(p.xj, 0, f ); print_posn(L1[0], L1[1], f ); print_posn(L2[0], L2[1], f ); print_posn(L3[0], L3[1], f ); print_posn(L4[0], L4[1], f ); print_posn(L5[0], L5[1], f ); //INITIALISE ENERGY double E0 = -(4*C::pi*C::pi)*((ms/(sqrt(pow(y[0]-xs, 2)+pow(y[1], 2)))) + (mj/(sqrt(pow(y[0]-xj, 2)

17

The Trojan Asteroids

+pow(y[1], 2))))) - 0.5*omega*omega*(y[0]*y[0]+y[1]*y[1]) + 0.5*(y[2]*y[2]+y[3]*y[3]);


118 119 120 121 122 123 124 125 126

int j=0; time (&t1); //THE INTEGRATOR while (t < tmax) { int status = gsl_odeiv_evolve_apply (gsl_evolve, gsl_control, gsl_step, &sys, &t, tmax, &h, y);

127 128 129

//ENERGY EVALUATED AT EVERY STEP double E = -(4*C::pi*C::pi)*((ms/(sqrt(pow(y[0]-xs, 2)+pow(y[1], 2)))) + (mj/(sqrt(pow(y [0]-xj, 2)+pow(y[1], 2))))) - 0.5*omega*omega*(y[0]*y[0]+y[1]*y[1]) + 0.5*(y[2]*y[2]+y [3]*y[3]);

130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160

if (status != GSL_SUCCESS) break; //STATE OF THE ASTEROID IS PRINTED if (j%sample_every == 0) { print_state(t, y[0], y[1], y[2], y[3], E, f); } //THE PERCENTAGE COMPLETE IS PRINTED TO CONSOLE if (j%(sample_every) == 0) { printf( "%f%% complete } j++; //THESE ENSURE UNSTABLE ORBITS STOP INTEGRATION if (sqrt(y[0]*y[0]+y[1]*y[1]) > 7.5) break; if (sqrt(y[0]*y[0]+y[1]*y[1]) < 2.5) break; } time (&t2); dt = difftime (t2, t1); std::cout << "Run-time: " << dt << " seconds f.close(); \n"; \r" , (t/tmax)*100);

18

The Trojan Asteroids

161 162 163 164 165 166 167

gsl_odeiv_evolve_free (gsl_evolve); gsl_odeiv_control_free (gsl_control); gsl_odeiv_step_free (gsl_step); return 0; }

Listing 3: orbit.gnu. The gnuplot le that plots the orbit of the asteroid.
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

set term postscript eps enhanced color "Arial" 12 solid size 8cm,6cm set output motion.eps #SUN set style line 5 lt 9 lw 0 pt 7 ps 4 lc rgb "black" #PLANET set style line 4 lt 12 lw 0 pt 7 ps 2 lc rgb "black" #LAGRANGE POINTS set style line 2 lt 2 lw 1 pt 2 ps 2 lc rgb "red" #INITIAL POINT set style line 3 lt 5 lw 2 pt 4 ps 1 lc rgb "blue" set style line 6 lt 5 lw 2 pt 1 ps 1 lc rgb "blue" #PARTICLE PATH set style line 1 lt 1 lw 1 pt 0 ps 0.5 lc rgb "black" set size ratio -1 set xlabel "x / AU" set ylabel "y / AU" set xrange [-6:6] set yrange [-6:6] set nokey plot data_orbit index 0 u 1:2 w p ls 5 , \ data_orbit index 1 u 1:2 w p ls 4 , \ data_orbit index 7 u 2:3 w l ls 1 , \ data_orbit index 7 every 1::::1 u 2:3 w p ls 3 , \ data_orbit index 7 every 1::::1 u 2:3 w p ls 6 , \ data_orbit index 2 u 1:2 w p ls 2 , \ data_orbit index 3 u 1:2 w p ls 2 , \ data_orbit index 4 u 1:2 w p ls 2 , \ data_orbit index 5 u 1:2 w p ls 2 , \ data_orbit index 6 u 1:2 w p ls 2 # data_orbit index 7 every 10 u 2:3:(2*$4):(2*$5) w vector lt 11 lw 2

19

The Trojan Asteroids

Listing 4: evt.gnu. The gnuplot le that plots the graph of energy vs. time.
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

set term postscript eps enhanced color "Arial" 12 solid size 8cm,6cm set output plot_evt.eps set xlabel Time / 1000*years set ylabel Energy per unit Mass / (AU^{2})(years^{-2}) set size ratio -1 set xrange [0:10] set yrange [-0.5e-15:8e-11] set nokey set style line 1 lt 1 lw 1 pt 1 ps 0.5 lc rgb "black" set style line 2 lt 1 lw 1 pt 1 ps 0.5 lc rgb "red" set style line 3 lt 1 lw 1 pt 1 ps 0.5 lc rgb "blue" set style line 4 lt 1 lw 1 pt 1 ps 0.5 lc rgb "purple" set style line 5 lt 1 lw 1 pt 1 ps 0.5 lc rgb "green"

plot data_orbit_m0-001_p0-005_t10000 u ($1/1000):6 w l ls 1 ,\ data_orbit_m0-001_p0-01_t10000 u ($1/1000):6 w l ls 2 ,\ data_orbit u ($1/1000):6 w l ls 3 ,\ data_orbit_m0-001_p0-005_v0-008az_t10000 u ($1/1000):6 w l ls 4 # data_orbit u 1:6 w l ls 3

set term wxt

Listing 5: wander.cc. The source code for the program that varies the planet mass and nds the libration amplitude.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17

#include <stdio.h> #include <iostream> #include <fstream> #include <cmath> #include <ctime> #include <gsl/gsl_errno.h> #include <gsl/gsl_odeiv.h> #include "cavlib/constants.hh" struct Param { double ms; double mj; double xs; double xj; double R; double omega;

20

The Trojan Asteroids

18 19 20 21 22 23 24 25 26 27 28 29 30 31

}; int calc_derivs (double t, const double y[], double dydt[], void *params) { Param p = *(Param*) (params); double ms = p.ms; double mj = p.mj; double xs = p.xs; double xj = p.xj; double omega = p.omega; dydt[0] = y[2]; dydt[1] = y[3]; dydt[2] = 2*omega*y[3] + omega*omega*y[0] - (4*C::pi*C::pi)*(((ms*(y[0]-xs))/pow(sqrt((y[0]-xs)*(y [0]-xs)+y[1]*y[1]), 3)) + ((mj*(y[0]-xj))/pow(sqrt((y[0]-xj)*(y[0]xj)+y[1]*y[1]), 3)));

32

33 34

dydt[3] = -2*omega*y[2] + y[1]*(omega*omega - (4*C::pi*C::pi)*((ms/pow(sqrt((y[0]-xs)*(y[0]-xs)+y [1]*y[1]), 3)) + (mj/pow(sqrt((y[0]-xj)*(y[0]-xj)+y[1]*y [1]), 3)))); return GSL_SUCCESS; }

35

36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

void print_wander( double M, double wander, std::ofstream& f ) { f << M << "\t" << wander << "\n"; }

int main (void) { std::ofstream f; f.precision(22); //DATA FILE f.open( "data_w" ); time_t t1, t2; double dt; const int n_equations = 4; double y[n_equations]; Param p;

21

The Trojan Asteroids

61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105

const gsl_odeiv_step_type * step_type = gsl_odeiv_step_rkf45; gsl_odeiv_step * gsl_step = gsl_odeiv_step_alloc (step_type, n_equations); gsl_odeiv_control * gsl_control = gsl_odeiv_control_y_new (1e-12, 0.0); gsl_odeiv_evolve * gsl_evolve = gsl_odeiv_evolve_alloc (n_equations); gsl_odeiv_system sys = {calc_derivs, NULL, n_equations, &p}; //SUN & JUPITER SYSTEM (AU, Mo, years, G=4*pi^2) p.R = 5.2; p.ms = 1; //MASS LOOP PARAMETERS double nsteps = 200; double initialmj = 0.0002; double finalmj = 0.045; double step = (finalmj - initialmj) / (nsteps); int j = 0; time (&t1); //LAGRANGE POINTS double L4[2] = {(p.R/2)*((p.ms-p.mj)/(p.ms+p.mj)), p.R*(sqrt(3))/2}; for ( double mj = initialmj; mj <= finalmj; mj += step ) { //SUN & JUPITER SYSTEM p.mj = mj; p.xs = -p.mj*p.R/(p.mj+p.ms); p.xj = p.ms*p.R/(p.mj+p.ms); p.omega = sqrt(4*C::pi*C::pi * (p.ms+p.mj) / pow( p.R, 3 )); //INITIAL CONDITIONS y[0] = 0.5025*p.R + p.xs; //p.R*cos(C::pi/3 + C::pi/64) + p.xs; y[1] = 1.005*L4[1]; //p.R*sin(C::pi/3 + C::pi/64); y[2] = 0; y[3] = 0; //INTEGRATION PARAMETERS double t = 0; double tmax = 1000; double h = 1e-12; //CREATE WANDER VARIABLES double wanderlead = acos((L4[0]*y[0]+L4[1]*y[1])/(sqrt(pow(L4[0], 2) + pow(L4[1], 2))*sqrt( pow(y[0], 2) + pow(y[1], 2))))*sqrt(pow(L4[0], 2) + pow(L4[1], 2)); double wandertrail = acos((L4[0]*y[0]+L4[1]*y[1])/(sqrt(pow(L4[0], 2) + pow(L4[1], 2))*sqrt

106

22

The Trojan Asteroids

(pow(y[0], 2) + pow(y[1], 2))))*sqrt(pow(L4[0], 2) + pow(L4[1], 2));


107 108 109

//THIS IS REQUIRED BECAUSE 0 WANDER IS PRONE TO FLOATING POINT ERROR if ((L4[0]*y[0]+L4[1]*y[1])/(sqrt(pow(L4[0], 2) + pow(L4[1], 2))*sqrt(pow(y[0], 2) + pow(y [1], 2))) >= 1) { wanderlead = 0; wandertrail = 0; } //THE INTEGRATOR while (t < tmax) { if (acos((L4[0]*y[0]+L4[1]*y[1])/(sqrt(pow(L4[0], 2) + pow(L4[1], 2))*sqrt(pow(y [0], 2) + pow(y[1], 2))))*sqrt(pow(L4[0], 2) + pow(L4[1], 2)) > wandertrail && y[0]-L4[0]>0) { wandertrail = acos((L4[0]*y[0]+L4[1]*y[1])/(sqrt(pow(L4[0], 2) + pow(L4[1], 2))*sqrt(pow(y[0], 2) + pow(y[1], 2))))*sqrt(pow(L4[0], 2) + pow(L4 [1], 2)); } if (acos((L4[0]*y[0]+L4[1]*y[1])/(sqrt(pow(L4[0], 2) + pow(L4[1], 2))*sqrt(pow(y [0], 2) + pow(y[1], 2))))*sqrt(pow(L4[0], 2) + pow(L4[1], 2)) > wanderlead && y[0]-L4[0]<0) { wanderlead = acos((L4[0]*y[0]+L4[1]*y[1])/(sqrt(pow(L4[0], 2) + pow(L4[1], 2))*sqrt(pow(y[0], 2) + pow(y[1], 2))))*sqrt(pow(L4[0], 2) + pow(L4 [1], 2)); } int status = gsl_odeiv_evolve_apply (gsl_evolve, gsl_control, gsl_step, &sys, &t, tmax, &h, y);

110 111 112 113 114 115 116 117 118 119

120 121

122 123 124

125 126

127 128 129

130 131 132 133 134 135 136 137 138 139 140 141 142

if (status != GSL_SUCCESS) break; //THESE ENSURE UNSTABLE ORBITS STOP INTEGRATION if ((wanderlead+wandertrail)/2 > C::pi*sqrt(L4[0]*L4[0]+L4[1]*L4[1])) { wanderlead = 20; wandertrail = 20; break; } if (sqrt(y[0]*y[0]+y[1]*y[1]) < 2.5) {

23

The Trojan Asteroids

143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171

wanderlead = 20; wandertrail = 20; break; } } j++; time (&t2); dt = difftime (t2, t1); double i = 100.0*j/nsteps; double k = (nsteps*dt/j)-dt; //SECOND REMAINING PRINTED TO CONSOLE printf( "%f%% %f seconds remaining //PLANET MASS AND WANDER IS PRINTED print_wander(mj, (wanderlead+wandertrail)/2, f); } std::cout << "total time " << dt << " seconds gsl_odeiv_evolve_free (gsl_evolve); gsl_odeiv_control_free (gsl_control); gsl_odeiv_step_free (gsl_step); f.close(); return 0; } \n"; \r" , i , k );

Listing 6: wander.gnu. The gnuplot le that plots the libration amplitude against the planetary mass.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

set term postscript eps enhanced color "Arial" 12 solid size 8cm,6cm set output plot_w.eps set xlabel Mass of Planet / Solar Masses set ylabel Range of Wander / AU set size ratio 1 set xrange [0:0.01] set yrange [0:*] set key

set style line 1 lt 1 lw 2 pt 1 ps 1 lc rgb "black" set style line 2 lt 1 lw 1 pt 1 ps 1 lc rgb "red" set style line 3 lt 1 lw 1 pt 1 ps 1 lc rgb "blue" set style line 4 lt 1 lw 1 pt 1 ps 1 lc rgb "green"

24

The Trojan Asteroids

16 17 18 19 20 21 22 23 24 25

f(x) = a*(x+b)**c + d a = 1; b = 1; c = -1; d = 1 fit f(x) data_w using 1:2 via a, b, c, d plot data_w u 1:2 title Data w l ls 1 ,\ f(x) title 0.0559(M-5.96e-05)^{-0.503}+0.266 w l ls 2 set term wxt

References
Lagrange, J.L. (1772). Essai sur le probl`me des trois corps (Essay on the problem of three bodies), e Academie Royale des Sciences de Paris, 9. Murray, C.D. and Dermott, S.F. (1999). Solar System Dynamics. Cambridge: Cambridge University Press. Nelson, E.R. (n.d.). Full Derivation of All the Lagrange Points. [online] Available at: http://www.harker.org/uploaded/faculty/ericn/pdf/LagrangePoints.pdf. [Accessed 10 April 2011]. Cornish, N.J. (n.d.). The Lagrange Points. http://map.gsfc.nasa.gov/ContentMedia/lagrange.pdf. [Accessed 29 Mar 2011]. Kumar, S.S. (1972). On the Formation of Jupiter, Astrophysics and Space Science, 16, 52-54. Fleming, H. J. and Hamilton, D. P. (2000). On the origin of the Trojan asteroids: Eects of Jupiters mass accretion and radial migration. Icarus 148, 479493.

25

Anda mungkin juga menyukai