7.7 Application Comets and Spacecraft

Figure 7.7.13 lists TI-Nspire CX CAS and Python versions of the two-dimensional Runge–Kutta program RK2DIM. You should note that it closely parallels the one-dimensional Runge–Kutta program listed in Fig. 2.6.11, with a single line there replaced (where appropriate) with two lines here to calculate a pair of x- and y-values or slopes. Note also that the notation used is essentially that of Eqs. (13) and (14) in this section. The first several lines define the functions and initial data needed for Example 1.

Figure 7.7.14 exhibits an n-dimensional Matlab implementation of the Runge–Kutta method. The Matlab function f defines the vector of right-hand sides of the differential equations in the system x=f(t,x) to be solved. The rkn function then takes as input the initial t-value t, the column vector x of initial x-values, the final t-value t1, and the desired number n of subintervals. As output it produces the resulting column vector T of t-values and the matrix X whose rows give the corresponding x-values. For instance, with f as indicated in the figure, the Matlab command

[T,X] = rkn(0, [0;1], 5, 50)

then generates the data shown in the table of Fig. 7.7.1 (which lists only every fifth value of each variable).

You can use Examples 1 through 3 in this section to test your own implementation of the Runge–Kutta method. Then investigate the comet and spacecraft problems described next. Additional application material at the Expanded Applications site indicated in the margin describes additional numerical ODE investigations ranging from batted baseballs to the Apollo orbits shown in Figs. 7.7.9 and 7.7.10.

Your Spacecraft Landing

Your spacecraft is traveling at constant velocity V, approaching a distant earthlike planet with mass M and radius R. When activated, your deceleration system provides a constant thrust T until impact with the surface of the planet. During the period of deceleration, your distance x(t) from the center of the planet satisfies the

FIGURE 7.7.13.

TI-Nspire CX CAS and Python two-dimensional Runge–Kutta programs.

TI-Nspire CX CAS Python Comment
Define rk2dim()=Prgm
   f(t,x,y):=y
   g(t,x,y):=-x
   n:=50
   t:=0.0
   x:=0.0
   y:=1.0
   t1:=5.0
   h:=(t1-t)/n
   For i,1,n
        t0:=t
        x0:=x
        y0:=y
        f1:=f(t,x,y)
        g1:=g(t,x,y)
        t:=t0+h/2
        x:=x0+(h*f1)/2
        y:=y0+(h*g1)/2
        f2:=f(t,x,y)
        g2:=g(t,x,y)
        x:=x0+(h*f2)/2
        y:=y0+(h*g2)/2
        f3:=f(t,x,y)
        g3:=g(t,x,y)
        t:=t0+h
        x:=x0+h*f3
        y:=y0+h*g3
        f4:=f(t,x,y)
        g4:=g(t,x,y)
        fa:=(f1+2*f2+2*f3+f4)/6
        ga:=(g1+2*g2+2*g3+g4)/6
        x:=x0+h*fa
        y:=y0+h*ga
        Disp t,x,y
   EndFor
EndPrgm
# Program RK2DIM
def F(T,X,Y): return Y
def G(T,X,Y): return -X
N = 50
T = 0.0
X = 0.0
Y = 1.0
T1 = 5
H = (T1-T)/N
for I in range(N):
T0 = T
X0 = X
Y0 = Y
F1 = F(T,X,Y)
G1 = G(T,X,Y)
T = T0 + H/2
X = X0 + H*F1/2
Y = Y0 + H*G1/2
F2 = F(T,X,Y)
G2 = G(T,X,Y)
X = X0 + H*F2/2
Y = Y0 + H*G2/2
F3 = F(T,X,Y)
G3 = G(T,X,Y)
T = T0 + H
X = X0 + H*F3
Y = Y0 + H*G3
F4 = F(T,X,Y)
G4 = G(T,X,Y)
FA = (F1+2*F2+2*F3+F4)/6
GA = (G1+2*G2+2*G3+G4)/6
X = Y0 + H*FA
Y = Y0 + H*GA
print (T,X,Y)
# END
Program title
Define function f
Define function g
No. of steps
Initial t
Initial x
Initial y
Final t
Step size
Begin loop
Save previous t
Save previous x
Save previous y
First f-slope
First g-slope
Midpoint t
Midpt x-predictor
Midpt y-predictor
Second f-slope
Second g-slope
Midpt x-predictor
Midpt y-predictor
Third f-slope
Third g-slope
New t
Endpt x-predictor
Endpt y-predictor
Fourth f-slope
Fourth g-slope
Average f-slope
Average g-slope
x-corrector
y-corrector
Display results
End loop
function xp = f(t,x)
xp = x;
xp(1) = x(2);
xp(2) = -x(1);
function [T,Y] = rkn(t,x,t1,n)
h = (t1 - t)/n;                   % step size
T = t;                            % initial t
X = x′;                           % initial x-vector
for i = 1:n                       % begin loop
   k1 = f(t,x);                   % first k-vector
   k2 = f(t+h/2,x+h*k1/2);        % second k-vector
   k3 = f(t+h/2,x+h*k2/2);        % third k-vector
   k4 = f(t+h ,x+h*k3);           % fourth k-vector
   k = (k1+2*k2+2*k3+k4)/6;       % average k-vector
   t = t + h;                     % new t
   x = x + h*k;                   % new x
   T = [T;t];                     % update t-column
   X = [X;x′];                    % update x-matrix
   end                            % end loop

FIGURE 7.7.14.

Matlab implementation of the Runge–Kutta method.

differential equation

d2xdt2=TGx2,
(1)

where G6.6726×1011N(m/kg)2 as in Example 3. Your question is this: At what altitude above the surface should your deceleration systembe activated in order to achieve a soft touchdown? For a reasonable problem, you can take

M=5.97×1024(kg),R=6.38×106(m),V=p×104(km/h),T=g+q(m/s2)

where g=GM/R2 is the surface gravitational acceleration of the planet. Choose p to be the smallest nonzero digit and q the next-to-smallest nonzero digit in your ID number. Find the “ignition altitude” accurate to the nearest meter and the resulting “descent time” accurate to the nearest tenth of a second.

Kepler’s Law of Planetary (or Satellite) Motion

Consider a satellite in elliptical orbit around a planet of mass M, and suppose that physical units are so chosen that GM=1 (where G is the gravitational constant). If the planet is located at the origin in the xy-plane, then the equations of motion of the satellite are

d2xdt2=x(x2+y2)3/2, d2ydt2=y(x2+y2)3/2.
(2)

Let T denote the period of revolution of the satellite. Kepler’s third law says that the square of T is proportional to the cube of the major semiaxis a of its elliptical orbit. In particular, if GM=1, then

T2=4π2a3.
(3)

(For details, see Section 11.6 of Edwards and Penney, Calculus: Early Transcendentals, 7th ed., Hoboken, NJ: Pearson, 2008).) If the satellite’s x- and y-components of velocity, x3=x=x1 and x4=y=x2, are introduced, then the system in (2) translates into a system of four first-order differential equations having the form of those in Eq. (22) of this section.

  1. Solve this 4×4 system numerically with the initial conditions

    x(0)=1,y(0)=0,x(0)=0,y(0)=1

    that correspond theoretically to a circular orbit of radius a=1, so Eq. (3) gives T=2π. Is this what you get?

  2. Now solve the system numerically with the initial conditions

    x(0)=1,y(0)=0,x(0)=0,y(0)=126

    that correspond theoretically to an elliptical orbit with major semiaxis a a=2, so Eq. (3) gives T=4π2. Is this what you get?

Halley’s Comet

Halley’s comet last reached perihelion (its point of closest approach to the sun at the origin) on February 9, 1986. Its position and velocity components at that time were

p0=(0.325514,0.459460,0.166229)andv0=(9.096111,6.916686,1.305721)

(respectively), with position in AU (astronomical units, in which the unit of distance is the major semiaxis of the earth’s orbit) and time in years. In this system, the threedimensional equations of motion of the comet are

d2xdt2=μxr3, d2ydt2=μyr3, d2zdt2=μzr3
(4)

where

μ=4π2andr=x2+y2+z2.

Solve the equations in (4) numerically to verify the appearance of the yz-projection of the orbit of Halley’s comet shown in Fig. 7.7.15. Plot the xy- and xz-projections as well.

FIGURE 7.7.15.

yz-projection of the orbit of Halley’s comet.

Figure 7.7.16 shows the graph of the distance r(t) of Halley’s comet from the sun. Inspection of this graph indicates that Halley’s comet reaches a maximum distance (at aphelion) of about 35 AU in a bit less than 40 years and returns to perihelion after about three-quarters of a century. The closer look in Fig. 7.7.17 indicates that the period of revolution of Halley’s comet is about 76 years. Use your numerical solution to refine these observations. What is your best estimate of the calendar date of the comet’s next perihelion passage?

FIGURE 7.7.16.

200-year plot of the distance r(t) of Halley’s comet from the sun. Is there a cusp near t=75?

FIGURE 7.7.17.

A closer look at Halley’s perihelion passage after about 76 years.

Your Own Comet

The night before your birthday in 2007 you set up your telescope on a nearby mountaintop. It was a clear night, and you had a stroke of luck: At 12:30 A.M. you spotted a new comet. After repeating the observation on successive nights, you were able to calculate its solar system coordinates p0=(x0, y0, z0) and its velocity vector v0=(vx0, vy0, vz0) on that first night. Using this information, determine the following:

  • the comet’s perihelion (point nearest the sun) and aphelion (point farthest from the sun),

  • the comet’s velocity at perihelion and at aphelion,

  • the comet’s period of revolution around the sun, and

  • the comet’s next two dates of perihelion passage.

Using units of length in AU and time in earth years, the equations of motion of your comet are given in (4). For your personal comet, begin with random initial position and velocity vectors with the same order of magnitude as those of Halley’s comet. Repeat the random selection of initial position and velocity vectors, if necessary, until you get a plausible eccentric orbit that ranges well outside the earth’s orbit (as most real comets do).

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.186.147