

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


EPS 109, fall 2008 Instructors: Burkhard Militzer & Ed Kite
In this lab, you will use Euler’s method to integrate the equation of motion of a spacecraft in an orbit around the sun. The sun is very heavy and its motion is omitted in the exercise. The sun just provides a gravity field. We use arbitrary units. (1) What is the potential energy of a spacecraft of mass m in the gravitational field of a star with mass M. Use G for the gravitational constant. Enter your answer here: V(r) = (2) Now write down the first derivative of V(r) € dV dr
(3) Now r is actually a vector, €
r , with its norm given by € r =
r = x^2 + y^2 + z^2. The resulting force on the spacecraft is also a vector, please derive all three components, € Fx = − dV dx
Fy = − dV dy
Fz = − dV dz
Now write the force in vector notation, €
dV d
r
F = ( Fx , Fy , Fz ) = (4) The initial position and velocity at time t =0 is given in the following sketch: Assume the initial distance between the sun and spacecraft is 1 (unit), and the spacecraft’s velocity is 2 (units), write down the initial position and velocity vectors: €
r = €
v =
EPS 109, fall 2008 Instructors: Burkhard Militzer & Ed Kite (5) Download the code run_kepler_ode_euler04.m from bSpace. Enter the initial spacecraft position and velocity, choose a time step dt. Replace the all other “…” in the code. Remember Euler’s method from the lecture notes: (6) If everything went well then you should have obtained an ellipse, or something close to it. Please adjust you time step until you get a reasonably accurate ellipse. It may take 10000 steps. (7) Now write down the formulae for the kinetic, the potential, and the total energy here: and compute them at every time step. Introduce another 3 arrays similar to ‘xt’ and ‘yt’ so that you can plot all three energy terms versus time. This requires also an array for time ‘tt’. By how much does the total energy drift per orbit due to inaccuracies? (8) Now write down the formula for the angular momentum € L. How many components are zero for this problem? Plot the nonzero components of € L versus time.
dv dt
m F ( x ( t )) dx dt = v € yn + 1 = yn + Δ t dyn dt tn + 1 = tn + Δ t