Showing posts with label gravity. Show all posts
Showing posts with label gravity. Show all posts

Saturday, January 16, 2010

Simulating Gravity -- Part II: Let's go to Mars

Following up from last time (if you remember, last time -- it's been a LONG time), how would one send a rocket ship off on a trip to Mars from the Earth, with the minimum amount of energy being used in the process?

Think of the problem this way. First, as usual, one makes some "simplifying assumptions." Assume that the Earth and Mars are both in circular orbits about the Sun. Not too bad an assumption for this purpose, actually. So, what trajectory would we like our spaceship to take? We'd like for it to undergo an elliptical orbit about the Sun, an orbit which tangentially intersects both the orbit of the Earth and the orbit of Mars. For reference, let Earth's orbit have a radius of be 1 A.U. from the Sun; then Mars' orbit has a radius of 1.52 A.U.

Imagine firing the rocket's engine until it attains a velocity v_0 that is oriented tangent to the Earth's orbit. Then the engine is turned off, and the rocket will begin to orbit the Sun in an elliptical orbit. Using the spreadsheet from last time, one could adjust v_0 and plot the orbit that results; for some particular value of v_0, the new elliptical orbit will extend out to the orbit of Mars. An example of a solution is shown in the Figure below:





To arrive at this figure, I manually adjusted v_0 in the spreadsheet we used last time (PlanetOrb.xls ). Starting with the condtions
x=0, y=-1, vx=v_0, and vy=0
I varied v_0 until I got the desired result. I found that v_0 = 2*pi * 1.098 = 6.899 works pretty well.

To check, how would we calculate the required speed?

As usual, we employ the laws of conservation of energy and momentum to arrive at the formula:

v_0^2 = 2 GM / r0 / ( 1 + r0/r)

where r0 is the radius of the Earth's orbit, and r is the radius of Mars' orbit. Plugging in numbers you should find that v_0 is in very good agreement with what was found with the spreadhseet.

Now that we can compute the required speed of the rocket, the remaining question is "When do we fire the engines?" If we launch the rocket when the earth is at x=0, y=-1, as in the above graph, then we want Mars to be at x=0 and y = +1.52 when the rocket arrives at that point! So, that means there is a particular time at which the launch needs to take place. This is why rockets cannot be launched on their space missions at just any 'ole time. By looking at our spreadsheet calculation, I find that the rocket reaches the desired coordinates somewhere around time t = 0.710 and 0.725. That is, in about eight and a half months. (Remember, t is in Years in our spreadsheet.) This also tells us that there is a bit of a "launch window" of opportunity for setting off our rocket. Much outside of that time window, and the rocket and Mars will not meet up.

So, the rocket must be launched at a specific time, such that after its 8.5 month journey, Mars ends up opposite the sun from where the Earth was located at launch time. And all of this can be readily estimated using a spreadsheet program, using the definitions of velocity and acceleration, and application of Newton's Universal Law of Gravtiation.

Friday, August 21, 2009

Simulating Gravity -- Part I: Some Basics

There are many canned programs out there in the marketplace that teachers can download and use to illustrate physics problems or principles, such as projectile motion. But what do the students learn from this? They play games all day long and never realize that the reason that their "characters" move about and jump over canyons along (hopefully) parabolic trajectories is because someone programmed in that detail of the motion into the software. So, let's have the students do that themselves!

Many programming environments are freely (or easily) available in which examples can be built up using first principles learned in the classroom; let the students “see for themselves” the laws of physics in use. For example, spreadsheet programs, like Excel, Numbers, Lotus, etc. (and their variants), make it easy for values of one 'cell' to be computed based upon the numbers input into previous cells. Editing features, like copying formulas from a line of cells into the cells in the line directly below, are easy and ideal for generating iterative calculations.

Let's look at an example...

Consider the motion of a particle undergoing free fall. Make a table, such as shown here. Starting with some "initial conditions" (x,y, etc. at time t=0), compute the values at subsequent times by calculating x, vx, etc. after a time dt, as indicated.















Next, create such a table in Excel (say) and let the program do the work...

An example Excel spreadsheet can be found here ( FreeFall.xls ).

By selecting the horizontal (x) and vertical (y) position numbers you want to plot, one can typically have the program make a grap, and voila!:


Here is a picture of what one would see in Excel:



So, the students not only see the result (hopefully, a parabolic trajectory!), but they see that it's simply the application of some simple relationships that they learned in class and can easily remember -- dv = a dt, dx = v dt, and so forth. One can explain how "dt" needs to be chosen to be small enough to make it a smooth, "continuous" variable, and so forth. (In fact, make dt too large, and see what happens!)

There is so much that can be learned and discussed from this simple exercise; plus, the students will learn a basic skill -- how to use a spreadsheet program to do more than balance a checkbook (do students even do THAT anymore?); a skill that they can use in college and beyond.

Once you get this far, it's a simple matter to extend the concept to a more complicated situation, but one which is still easily performed by the student -- let's try a planetary orbit around the sun! We're actually most of the way to being able to do this calculation using the spreadsheet we developed above. All we need to do is to modify the cells that contain the acceleration -- that is, modify our description of the force acting on the particle (planet, or satellite in this case).

The figure below provides a way of seeing the relationships, and the x and y accelerations can be easily computed from Newton's Universal Law of Gravitation:

Rather than using MKS units (meters, kilograms, seconds), it might be easiest to use units of "astronomical units" (average distance from earth to the sun), solar mass, and years (AU, Msol, yr). In this case, Newton's constant becomes:

G = (2 pi)^2 (AU^3)/(yr^2 Msol) = 39.4784 (AU^3)/(yr^2 Msol)

[It's easiest to see this if you consider purely circular motion of a planet around the sun.]

So, we input these relations into our "cells" that describe particle acceleration, and -- instantly -- the spreadsheet gives a plot of the result (see the file: PlanetOrb.xls ):

To start with, have the particle begin on a circular path. (This is the default condition in the spreadsheet.) How did we guess our initial conditions? By our choice of units they're simply:
  • x0 = 1 AU, y0 = 0 AU; vx0 = 0 AU/yr, vy0 = 2 pi AU/yr -- try it out!
Next, try the following:
  • x0 = 2 AU, y0 = 0 AU; vx0 = 0 AU/yr, vy0 = 1 pi AU/yr -- did you get an ellipse?
How about:
  • x0 = -25 AU, y0 = 3 AU; vx0 = 5 AU/yr, vy0 = 0 pi AU/yr -- did you get a hyperbola?

Lastly (for today), can you use the spreadsheet to estimate the escape velocity from the earth's orbit?

ANS: "Launch" a particle from a distance of 1 AU. Start out with a speed of 2 AU/yr, and plot x vs. t. Do you see the particle "turn around"? Gradually try increasing initial speeds until the particle appears to fly off "forever" (always increase x with time). What minimum speed is required to "escape"?
Try:
  • x0 = 1 AU, y0 = 0 AU; vx0 = 2 AU/yr, vy0 = 0 AU/yr
  • how far does the particle get before it "turns around"?
  • next, increase vx0 to 3 AU/yr, 4 AU/yr, etc.; how far now?
  • what should the answer be?
  • ... compare with v_esc = sqrt( 2GM/R)!
The above exercises could easily be broken up into about 2 class periods or more, depending upon how far the teacher wants to take this, what questions are answered, etc. But next time we'll take what we've learned and try to analyze a more specific problem.

Coming up: Let's program our computer to calculate a "trip to Mars"!
We can do this!

[Speaking of Mars: what's up with these emails about Mars' closest approach, and being "as big as a full moon," and not happening again for "5000, maybe 17,000 years"?? I see these posts every year (since the real "closest approach" that happened in 2003, and won't happen again until 2020). And the latest one says that Mars will appear as big "as the full moon"! What bunk!]