Creative Commons License Copyright © Michael Richmond. This work is licensed under a Creative Commons License.

Project 8: From the Earth to the Moon, part III

Monday, May 8, at noon
The finished code and analysis

Your job in this project: as before, follow the motion of a projectile as it travels vertically up away from a cannon. This time, you must follow the projectile all the way to the Moon. For extra credit, you can include (in a simplified manner) the effect of the Moon's gravity on the projectile.

The situation is similar to that of the previous week: a gigantic cannon shoots a projectile vertically at high speed. The initial conditions are

Note that the engineers, after running several tests, realized that a spherical projectile would suffer from very great air resistance; therefore, they have made the projectile into a pointy, streamlined shape which has much, much lower air resistance.

You must include the following effects:

See the previous assignment, From the Earth to the Moon II, for a formula giving the density of the atmosphere as a function of height.


Write a Scilab routine which calculates position and velocity as a function of time for this problem. It should look like this:

  function moonshot(start_velocity, timestep, output_file)

where

      start_velocity          is the starting velocity, in meters per second
      
      timestep                is the size of the INITIAL timestep (t1 - t0) 
                                  to use in calculations, in seconds
 
      output_file             is the name of a file in which you will
                                  write values of time, height, and speed

You should use Heun's method for this assignment.

As a check on the performance of your simulation, you can use the total mechanical energy of the projectile:

  total energy  =  KE  +  GPE

Now, this energy will NOT be conserved at first, because air resistance will dissipate much of the initial kinetic energy. However, once the projectile has reached a large enough altitude, air resistance becomes negligible; from that point on, total energy SHOULD be conserved. Pick as your starting point a height above the surface of H = 100,000 m. You can compare the total energy at this point to the total energy at any later point to estimate the accuracy of your calculations.

You may use a fixed timestep, given by the user, for the entire flight; however, you will receive a small deduction to your score for doing so. To receive full credit, you must use an adaptive timestep, as described in this week's lecture notes.

You may assume that the Moon has the following properties:

Use your code to answer the following questions.


Bells and Whistles

  1. Verne's adventurers don't want to smash into the lunar surface, of course. They plan to use rockets to slow their descent. Assume that the mass of the rocket fuel is m, and the mass of the rest of the projectile is 10,000 kg - m. The exhaust speed of gunpowder rockets is roughly 1,000 m/s.

    Pick one of your simulations in which the projectile reached the Moon. Write down its velocity when it reached the lunar surface. In order to bring the projectile to a stop right at the surface, with zero speed, how much mass m must be devoted to rockets?

    (Hint: it may help to read some notes on rockets and momentum, especially the section on "the final speed of a rocket")

  2. Pick one initial velocity which will cause your projectile to reach the Moon. Write down the initial velocity, time to reach the lunar surface, and final speed when it reaches the lunar surface.

    Now, add the gravitational effect of the Moon. Pretend that the Moon is stationary. Add to your simulation the Moon's gravitational force on the projectile, during the entire trip.

    Using the same initial velocity as before, run the simulation until the projectile reaches the Moon's surface. How much does the Moon's gravity change your values for the time for the journey and the final speed when the projectile reaches the surface?


This page maintained by Michael Richmond. Last modified May 1, 2007.

Creative Commons License Copyright © Michael Richmond. This work is licensed under a Creative Commons License.