Abstract
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.
Summary
None
Readily available
No issues
Thanks to Blue Origin for providing NS-25 flight data. Read all about Ken's flight on Blue Origin's NS-25: The Thrill of a Rocket's Launch & Ascent - An Astronaut's Perspective.
Objective
Simulate the trajectory of a suborbital spaceflight and compare your simulation to data from a real flight.
Introduction
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.

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:
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:
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:
- Starting at time t=0, the rocket is on the ground with:
- Altitude = 0 meters
- Velocity = 0 meters/second
- Mass = full (dry mass + all fuel)
- For every time step (Δt), calculate how the rocket moves:
- During powered ascent (engine is on and the rocket is moving up):
- Calculate how much fuel is left based on the fuel burn rate.
- Apply thrust. While the engine is on, thrust is a constant upward force.
- Calculate gravity. Gravity pulls downward and gets slightly weaker as altitude increases.
- Calculate aerodynamic drag. Drag pushes against the rocket's direction of motion and depends on air density (which decreases with altitude) and speed.
- Figure out the net force. Net force = thrust (up) - drag (down) - weight (down).
- Compute acceleration. Acceleration = net force / current mass.
- Update velocity. New velocity = previous velocity + acceleration × time step.
- Update altitude: New altitude = previous altitude + velocity × time step.
- 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.
- During powered ascent (engine is on and the rocket is moving up):
- 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!
Terms and Concepts
- 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
Questions
- 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?
Bibliography
Use these resources to learn more about the physics of rocket flight:
- Glenn Research Center (n.d.). Four Forces on a Rocket. NASA. Retrieved September 23, 2024
- Glenn Research Center (n.d.). Ideal Rocket Equation. NASA. Retrieved September 23, 2024.
Materials and Equipment
- Computer with internet access
Experimental Procedure

- Click the "run" button in the simulation above.
- The animation window shows a graph with time on the x-axis and altitude in meters on the y-axis.
- 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.
- 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).
- Now look at the code below the animation window.
- 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.
- The code also contains a
userAnimationTimevariable, 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.
- 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? - 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_ascentandfuel_mass_landingvariables. If you decreasefuel_mass_ascent, you should proportionally decreaseburn_timeto keep theburn_rateconstant. What happens? - 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.)
- 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.
- 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.
- 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.
- What happens to your dependent variable as you change the independent variable?
- How does the simulated trajectory compare to the actual NS-25 flight data as you change your input parameter(s)?
- There are many more things you can do with this project. Check out the Variations section for more ideas.
Download the Suborbital Flight Mechanics Simulation Code
Ask an Expert
Global Goals
The United Nations Sustainable Development Goals (UNSDGs) are a blueprint to achieve a better and more sustainable future for all.
Variations
- Try using mass (both fuel and dry mass), thrust, burn time, and aerodynamic parameters for a different launch vehicle, like Mercury-Redstone 3, the first United States human spaceflight by astronaut Alan Shepard in 1961. Even though it had substantially lower thrust, Mercury-Redstone went higher than New Shepherd. Why? Try to model other suborbital rockets (often called sounding rockets).
- Add velocity and acceleration plots to the output. Where is the maximum g-force? Is it on ascent or descent? Why?
- How much higher will the rocket go if it doesn't need to reserve fuel for the landing burn?
- Try using parameters for a model rocket. If you have access to a model rocket with an altimeter, collect your own trajectory data and compare it to the simulation. Note: you may need to decrease the simulation time step (default 1 second) for shorter model rocket flights.
- While suborbital flights are not concerned with reaching escape velocity to escape Earth's orbit, you can still use your simulation to find out if a particular flight can reach escape velocity. Do research about the "rocket equation." What happens if you keep adding more and more fuel mass to your rocket (remember to increase the burn time as well)? How does the maximum velocity change? Why do orbital rockets normally have multiple stages?
- Try changing the value of gravity. How does the amount of fuel required to reach escape velocity change for the Moon or Mars instead of Earth?
- How does the rocket behave if there is no aerodynamic drag (
dragCoefficient = 0), like on a moon or planet with no atmosphere? - How would you model drag on a planet with a thin atmosphere like Mars? Can you find a model for how Mars' atmospheric density varies with altitude? Is it different than the model for Earth?
- Can you change the model to be two-dimensional and account for horizontal motion? What happens if you change the rocket's launch angle? See the equations in the Introduction and Rocket Equations of Motion section below. You will also need to apply Newton's laws of motion in the horizontal (x) direction.
- Plot the x, y, and z velocity and acceleration data from the NS-25 Flight Data spreadsheet. The x-axis points up through the top of the crew capsule, with the y and z axes pointing out through the sides following the right-hand rule. Can you identify key events in the flight (e.g., main engine cutoff, capsule and booster separation, parachute deployment) from these graphs? How do these graphs compare if you plot the velocity and acceleration from your simulation?
- The basic model uses a simple on/off thrust profile. The actual NS-25 flight had a more complicated thrust profile, including about seven seconds of reduced thrust (not enough for the rocket to lift off) to run diagnostics while still on the launch pad before liftoff, throttling back at the max Q period and again before main engine cutoff (MECO). The default values in the simulation allow for these periods of reduced thrust by using a value that represents an average thrust that is 90% of maximum. Can you include a more realistic thrust profile in your simulation? How does it affect the results? Note that the fuel burn rate will also change proportionally as you throttle the thrust (lower fuel burn rate is what will give you lower thrust in a real rocket).
- The basic model treats the rocket as a single vehicle without a detachable booster and crew capsule. Can you change the model to include separation of these two components after main engine cutoff? In other words, at the moment of separation, subtract the mass of the booster from the mass of the vehicle, and then continue to track the trajectory using only the mass of the crew capsule. For re-entry, the capsule will have a very different drag coefficient after separation from the booster. Can you also model the parachutes?
Appendix: Rocket Equations of Motion
Simplified Model
For purely vertical flight in the y-direction, ignoring air resistance, the net vertical force Fy on a rocket is the thrust T minus the weight W:
where Fy is the net vertical force, T is the thrust, and W is the weight (all in newtons).
The rocket's weight is equal to its mass in kilograms times the acceleration due to gravity:
where g has a value of 9.81 m/s2 at the surface of the Earth. Gravity at the Kármán line is only about 3% lower than at sea level, so we can treat g as constant.
As mentioned in the Introduction, the rocket's mass changes as it burns fuel. Assume the vehicle itself has a "dry" mass mdry, carries ascent fuel mass mfuel, ascent, and reserves fuel mass mfuel, descent for landing. It burns all of the ascent fuel during the burn time with duration tburn, during which time we assume the rocket generates constant thrust T. The fuel burn rate is:
And the total mass m as a function of time is:
After t > tburn, the thrust drops to zero, and the mass remains constant. This means that the rocket's flight has two phases: the initial powered flight while the engine generates thrust and the mass decreases, and a second purely ballistic phase where (ignoring air resistance) it will act like a constant-mass unpowered projectile.
Now, how do we calculate the rocket's position as a function of time using all the equations we have so far (1-7)? To more easily account for the variable mass, we can do this using the finite difference method (specifically the forward Euler method). For an index i = 0, 1, 2, 3...and a time interval Δt, the time at i is:
Converting Equation 7 from continuous to discrete form, the mass at index i is:
and the weight at i is
The net force at i is
and the acceleration at i is therefore
Now, applying the finite difference method to Equations 2 and 3 from the Introduction, we can first solve for the velocity at i+1:
and then the vertical position y at i+1:
Solving for yi+1 requires knowing the initial conditions yi and vi, but we know that the rocket starts from rest on the ground, so yi = vi = 0.
Adding Aerodynamic Drag
The aerodynamic drag force on an object acts opposite its direction of motion through a fluid and is given by the equation:
where
- FD is the drag force in newtons (N)
- ρ is the fluid density in kilograms per cubic meter (kg/m3)
- v is the object's velocity relative to the fluid in meters per second (m/s)
- CD is the object's drag coefficient (dimensionless)
- A is the object's cross-sectional area (perpendicular to the flow direction) in square meters (m2)
Including drag force FD in the equation for the net force on the rocket changes Equation 4 to:
For objects moving near the surface of the Earth, air density is constant. However, atmospheric density is not constant for a rocket flight—it decreases significantly with altitude. You can look up equations that give density as a function of altitude or tables that contain the information. Similarly, for objects moving at relatively low speeds, the drag coefficient will be constant. However, drag coefficient can change dramatically with Mach number. An object's Mach number is the ratio of its velocity to the local speed of sound. Since the speed of sound depends on air density, it will also change with altitude, meaning that a rocket's drag coefficient changes with altitude as well. However, we can implement a reasonably accurate model of atmospheric drag by assuming a constant drag coefficient and using a simplified model of atmospheric density (the isothermal-barotropic model).
The code for the project includes this simplified model. Can you implement a more accurate model that accounts for variable drag coefficient and/or uses a more accurate model of atmospheric density (like the U.S. Standard Atmosphere 1976)? How does this affect the simulation results? The default values in the model have been tuned to give results that are a close match with the actual flight. Because the drag coefficient and atmospheric model are closely intertwined, if you enhance the model to incorporate a drag coefficient that varies with velocity or improve the model of the atmosphere, you may need to also re-tune the settings from their default values.
Gravity Variation with Altitude
The following equation approximates the variation of Earth's gravity with altitude:
where
- gh is the gravitational acceleration at height h above sea level (m/s2)
- Re is the Earth's mean radius (m)
- g0 is the standard gravitational acceleration (9.81m/s2)
The code for this project uses this formula. How much do the simulation results change if you just use a constant value for gravity?
Runge-Kutta vs. Euler Methods
The Runge-Kutta method is another approach for calculating the rocket's trajectory that can, in some cases, give more accurate results than the Euler method. The code for this project can optionally use a fourth-order Runge-Kutta method, commonly referred to as "RK4." To enable RK4, change the line let useRK4 = false to let useRK4 = true. RK4 works like this:
- Start with the current velocity and altitude.
- Calculate acceleration at the beginning of the time step (k1):
- Compute forces (thrust, weight, drag)
- Calculate acceleration = net force/mass
- Estimate how much velocity and altitude would change using this acceleration
- Estimate again halfway through the time step (k2):
- Assume the rocket moved partway using the results from k1
- Recalculate forces and acceleration at this new "midpoint" state
- Get a second estimate for velocity and altitude changes
- Do a third estimate, still at the midpoint (k3):
- Use the midpoint velocity and altitude from k2
- Recalculate forces, acceleration, and estimated velocity/altitude changes again
- Final estimate at the end of the time step (k4):
- Use results from k3 to predict velocity and altitude at the end
- Calculate forces and acceleration one last time
- Combine all four estimates:
- The simulation takes a weighted average of the four results:
- New velocity = initial velocity + (k1 + 2*k2 + 2*k3 +k4)/6
- New altitude = initial altitude + (same pattern for altitude)
- This can give a more accurate result than just using the beginning of the time step like the Euler method does.
- The simulation takes a weighted average of the four results:
How do the simulation results change if you change the timeStep variable? Does the Runge-Kutta method truly give better results than the Euler method in this case?
Careers
If you like this project, you might enjoy exploring these related careers:








