Purple Sky Profile Header

Have you ever wished you could fly to space? Space flight is getting more accessible thanks to reusable rockets that make getting to space much cheaper. Civilian astronauts can even buy tickets for a few minutes in space! But exactly how high is "space"? How do engineers predict how high a rocket will go and figure out how to make it land safely? Find out in this project as you explore the physics of suborbital space flight. 

AREAS OF SCIENCE
DIFFICULTY
- Intermediate
TIME REQUIRED
Short (2-5 days)

Simulate the trajectory of a suborbital spaceflight and compare your simulation to data from a real flight. 

Look up. Can you see space? Where does the sky end and space begin? While not everyone agrees, one common definition for the "edge of space" is the Kármán line, at an altitude of 100 kilometers (km) above mean sea level. The United States military uses a slightly different definition, an altitude of 80 km above mean sea level. Figure 1 shows where the Kármán line is relative to layers of the atmosphere and various spacecraft.
layers_of_the_atmosphere
Figure 1. Altitude for different layers of the atmosphere and the Kármán line (not to scale).

Space flights that reach space (whichever definition you use) but do not complete a full orbit around the Earth are called suborbital flights. These flights typically give passengers a view of Earth and the Sun from space and a few minutes of the sensation of weightlessness, or zero-g, at the peak of the flight before returning to Earth. Some of them also have reusable rocket boosters that land safely back on Earth to be reused again and again.

How do engineers design a rocket that can reach space? They need to understand the forces acting on the rocket. Rockets burn fuel and expel exhaust gases at a very high velocity. According to Newton's third law of motion—famously stated as "for every action, there is an equal and opposite reaction"—when the exhaust is pushed out of the rocket, it pushes back on the rocket, generating thrust, or the force that propels the rocket upward. The rocket's weight—the force that results from gravity pulling on the rocket's mass—pulls it down. Air resistance, also called aerodynamic drag, also acts on the rocket. See the NASA reference in the Bibliography to learn more about the forces acting on a rocket.

According to Newton's second law of motion, the net force acting on an object, its mass, and its acceleration (the rate of change of velocity, or how much velocity changes per unit time) are all related by an equation:


Equation 1:
𝐹=𝑚𝑎
 

where

  • F is the net force on the object in newtons (N)
  • m is the object's mass in kilograms (kg)
  • a is the object's acceleration in meters per second squared (m/s2)

So, if you know the net force on an object, and you know its mass, you can calculate its acceleration. If you know an object's acceleration, you can figure out its position at a given time using two more equations. Remember that acceleration is the rate of change of velocity. Velocity, in turn, is the rate of change of distance. We can write these out as equations:

Equation 2:
𝑎=Δ𝑣Δ𝑡
Equation 3:
𝑣=Δ𝑑Δ𝑡

where

  • a is the object's acceleration in meters per second squared (m/s2)
  • v is the object's velocity in meters per second (m/s)
  • d is the distance traveled by the object in meters (m)
  • Δ, the capital Greek letter Delta, means "change in"

There is just one problem—as a rocket burns fuel, its mass changes! This makes "rocket science" a little more complicated than what you will usually learn in your first physics class, where you apply Newton's laws to an object with constant mass, like a ball. Do not worry though—the simulator in this project does this rocket science in a way that is very easy to follow! 

How the Program Simulates the Rocket's Flight 

The simulation models a rocket’s vertical flight by stepping through time in small chunks (like frames in an animation). At each step, it updates the rocket’s velocity and altitude based on the forces acting on it. The method used to do this is called the Euler method, which is a simple way to estimate how things change over time. Here's how the simulation works, step-by-step:

  1. Starting at time t=0, the rocket is on the ground with:
    1. Altitude = 0 meters
    2. Velocity = 0 meters/second
    3. Mass = full (dry mass + all fuel)
  2. For every time step (Δt), calculate how the rocket moves:
    1. During powered ascent (engine is on and the rocket is moving up):
      1. Calculate how much fuel is left based on the fuel burn rate.
      2. Apply thrust. While the engine is on, thrust is a constant upward force.
      3. Calculate gravity. Gravity pulls downward and gets slightly weaker as altitude increases.
      4. Calculate aerodynamic drag. Drag pushes against the rocket's direction of motion and depends on air density (which decreases with altitude) and speed.
      5. Figure out the net force. Net force = thrust (up) - drag (down) - weight (down).
      6. Compute acceleration. Acceleration = net force / current mass.
      7. Update velocity. New velocity = previous velocity + acceleration × time step.
      8. Update altitude: New altitude = previous altitude + velocity × time step.
    2. After main engine cutoff (MECO) during ascent, the engine stops burning fuel and reserves some for landing. The steps above remain the same, but the mass is now constant, and the thrust is zero. 
  3. These steps loop over and over again until the rocket reaches its maximum altitude (apogee), begins to descend (at which point drag points upward instead of down), and finally reaches the ground again (altitude ≤ 0). At this point, the loop ends, and the maximum altitude, velocity, and acceleration are recorded. 

This approach doesn't try to solve the physics equations all at once. Instead, it builds the flight path one step at a time—just like a video game updates each frame. It's not perfectly accurate, but it gives a good estimate, especially with small time steps. To explore a more mathematical description of the rocket equations, check out the Variations section of the project.

You can use the interactive module provided in the procedure to find out how changing a variable—like the mass of the rocket or how much fuel it carries—changes its maximum velocity or apogee. You can even compare your simulated rocket trajectory to data from a real rocket flight. Get ready to try rocket science out for yourself!


  • Kármán line
  • Altitude
  • Mean sea level
  • Orbit
  • Suborbital
  • Weightlessness
  • Zero-g
  • Velocity
  • Newton's third law of motion
  • Thrust
  • Weight
  • Gravity
  • Mass
  • Newton's second law of motion
  • Net force
  • Acceleration
  • Newtons (N)
  • Kilograms (kg)
  • Trajectory 
  • Apogee
  • What are some different definitions of where space begins?
  • What are the forces acting on a rocket?
  • Why is it so expensive to get to space?
  1. Click the "run" button in the simulation above.
    1. The animation window shows a graph with time on the x-axis and altitude in meters on the y-axis.
    2. The red line shows data for the real Blue Origin NS-25 flight crew capsule, the blue line shows a simulated trajectory, and the yellow line represents the Kármán line. The simulation assumes that the booster and crew capsule do not separate and land together without a parachute like that used by the actual crew capsule. Because the booster is more aerodynamic than the crew capsule and doesn’t use a parachute, it lands more quickly. You see this in the default simulation when the blue line reaches zero altitude in less time than the red line. See Variations below for ways to make the simulation more realistic.
    3. The text at the top of the window shows the simulated flight's apogee, maximum velocity, and maximum acceleration in both m/s2 and g's (1g = 9.81m/s2). 
  2. Now look at the code below the animation window.
    1. This code contains variables for physical parameters like the mass of the rocket's fuel, the thrust force generated by the rocket engine, and how long it takes to burn the fuel. Write down or copy the default values for the input parameters so you can refer back to them later.
    2. The code also contains a userAnimationTime variable, which controls the length of the animation in seconds. Real suborbital flights can be around 10 minutes long, so the code does not plot the flight in real time. Change this variable to speed up or slow down the animation.  
  3. See what happens if you change the value for one of the variables and re-run the simulation. Before you think about a change, think about whether the change "makes sense." The simulation will try to run no matter what you enter—it will not check whether you have entered a physically "impossible" value (like a negative number for gravity, which would make gravity point up!) or an "unrealistic" value (like a fuel mass of only 1 kilogram). For example, try increasing the value for dry_mass. This simulates a heavier vehicle, for example, one carrying more crew or cargo. How does this change the maximum altitude, velocity, and acceleration achieved by the rocket?
  4. Now try reducing the fuel mass. Note that the rocket does not use all of its fuel on ascent. It saves some fuel to slow down when landing, which is why there are separate fuel_mass_ascent and fuel_mass_landing variables. If you decrease fuel_mass_ascent, you should proportionally decrease burn_time to keep the burn_rate constant. What happens?
  5. Try increasing the thrust without changing any of the other parameters. This simulates a more powerful and efficient rocket engine that can generate more thrust with the same fuel burn rate. Again, think about what is "realistic" when you make this change. (A rocket engine that suddenly produces twice the thrust with the same amount of fuel is unlikely, but a 10% improvement might be feasible.)
  6. Now that you have played with some of the different input parameters, restore the default values that you wrote down earlier. If you cannot find them, refresh the page to reset the code.
  7. For most science projects, you should pick one independent variable (the variable you change—the input parameters) and one dependent variable (the variable you measure—the simulation results). Pick one pair of independent/dependent variables to do an experiment.
    1. Note: remember that to change the amount of fuel as your independent variable, you need to proportionally change both the fuel mass and burn time values to keep the burn rate constant.
  8. What happens to your dependent variable as you change the independent variable?
  9. How does the simulated trajectory compare to the actual NS-25 flight data as you change your input parameter(s)?
  10. There are many more things you can do with this project. Check out the Variations section for more ideas.