Science Lab · Physics

Rocket Builder

Build a rocket from engines, tanks and up to three stages, then fly it from the equator. Will it lift off? Reach space? Stay up? The rocket equation decides how much speed your propellant can buy, and gravity, air and Earth's spin decide how much of it you need.

The engines use typical values for each propellant: see the table under "The science".

Liftoff mass
Thrust ÷ weight at liftoff
Δv in vacuum (ideal)
Same parts as one stage
Payload share
Height × width

Missions

    What you're seeing

    On the pad, your rocket is drawn to scale, with each stage marked in its own color: gold for stage 1 (the bottom one, which fires first), green for stage 2 and pink for stage 3. The bar on the left adds up the Δv (say "delta-v": the change in speed) that each stage can give in empty space.

    Press Launch and the camera follows the rocket up, zooming out as it climbs. The sky darkens, the plume widens in the thinning air, and empty stages tumble away. Above 140 km the view switches to the whole Earth: the path you have flown, and a dashed curve showing where the rocket would go if the engines stopped now, with its highest point (apoapsis, Ap) and lowest point (periapsis, Pe). The bar at the bottom shows where your Δv went: green for speed you kept, gold for gravity, red for drag and blue for steering.

    The science

    Thrust must beat weight

    A rocket leaves the pad only if its engines push up harder than gravity pulls down. Engineers compare the two as the thrust-to-weight ratio:

    T/W = F ÷ (m · g₀),   with g₀ = 9.80665 m/s²

    The Two-stage orbiter weighs 135.8 t, and its two kerosene engines push with 1,806 kN at sea level, so T/W = 1,806,000 ÷ (135,800 × 9.80665) = 1.36. Big rockets usually lift off with T/W a little above 1, often around 1.2 to 1.5. Below 1 the rocket sits on the pad burning propellant. Just above 1 it climbs so slowly that gravity wastes much of its push.

    Exhaust speed and specific impulse

    A rocket moves by throwing exhaust backward very fast. The faster the exhaust, the more push each kilogram of propellant gives. Rocket engineers measure this with the specific impulse, Isp, in seconds:

    exhaust speed ve = Isp · g₀

    Hydrogen burning with oxygen gives the fastest exhaust of the common propellants, about 4.4 km/s in a vacuum. Engines also do better in a vacuum than at sea level, because outside air presses back on the exhaust leaving the nozzle. In the lab, watch the "Thrust now" readout grow as the air thins.

    Engine in the lab (typical values)Isp sea levelIsp vacuumA real engine for comparison
    Kerosene + oxygen: 1,000 kN in vacuum, 1 t280 s310 sF-1 (Saturn V first stage): 263 s / 304 s
    Hydrogen + oxygen: 500 kN in vacuum, 0.8 t360 s450 sRS-25 (Space Shuttle, SLS): 366 s / 452 s
    Solid motor: 10 t of propellant per segment, burns 100 s242 s268 sSpace Shuttle solid booster: 242 s / 268 s

    A tank holds 10 t of propellant. Kerosene tanks weigh 0.6 t each and hydrogen tanks 1 t, because liquid hydrogen is so light that it needs huge tanks; solid casings weigh 1.2 t per segment. These are close to real stages. A solid motor cannot be throttled or switched off once lit.

    The rocket equation

    In 1903 Konstantin Tsiolkovsky worked out how much speed a rocket gains by burning its propellant, with no gravity or air in the way:

    Δv = Isp · g₀ · ln(m₀ ÷ mf)

    Here m₀ is the mass with full tanks, mf the mass when they are empty, and ln is the natural logarithm. The logarithm is the hard part: doubling the propellant does not double the speed. The orbiter's second stage starts at 27.8 t and ends at 7.8 t, so it gives 450 × 9.80665 × ln(27.8 ÷ 7.8) = 5,610 m/s. Its first stage gives 4,050 m/s, for 9.66 km/s in all.

    Why rockets drop stages

    Once a tank is empty it is dead weight, and the rocket equation punishes every kilogram you keep carrying. So rockets are built as a stack of smaller rockets: when the bottom one is empty, it falls away, and the next one starts much lighter. Try the two presets built from exactly the same parts (4 kerosene engines, 18 tanks, a 1 t satellite):

    Same partsLiftoff massΔv in vacuumWhat happens
    One stage195.8 t7.65 km/sClimbs to about 250 km and falls back
    Two stages (3 engines + 14 tanks, then 1 + 4)195.8 t10.84 km/sReaches orbit with propellant to spare

    Orbit means going sideways, fast

    An orbit is not a place where gravity stops. It is a fall that never lands: you move sideways so fast that the ground curves away beneath you as quickly as you drop toward it. In a circle of radius r around Earth that takes

    v = √(GM ÷ r),   GM = 3.986 × 10¹⁴ m³/s²

    which is 7.67 km/s at 400 km up, one lap every 92.4 minutes. For any orbit, the vis-viva equation links speed v, distance r and the orbit's half-length a:

    v² = GM · (2 ÷ r − 1 ÷ a)

    The lab uses it to draw your orbit and its Ap and Pe. Fast enough, and the orbit stops closing: from the surface, the escape speed is √(2GM ÷ R) = 11.2 km/s.

    Where the Δv goes

    A rocket needs about 7.8 km/s to circle Earth low down, yet it must carry more Δv than that. While the engines burn, the lab splits the Δv used four ways:

    Δv used = speed gained + gravity loss + drag loss + steering loss

    Gravity loss is the push spent holding the rocket up while it climbs. Drag loss is the air's push back. Steering loss is push aimed away from the direction of travel. The orbiter, flown by the autopilot to a 250 km orbit, used 9.03 km/s: gravity took 1.49 km/s, drag 0.11 km/s and steering 0.08 km/s. Most of the drag comes near "max-Q", the moment of greatest air pressure on the nose, about 34 kPa for this rocket.

    Earth's spin is a free gift

    Earth turns once every 23 hours 56 minutes, so the equator moves east at about 465 m/s. A rocket launched east starts with that speed for free. With the spin switched off, the same orbiter needed 9.48 km/s instead of 9.03.

    Try this

    Too heavy. Pick "Too heavy" (T/W 0.71) and launch. The engine roars but the rocket stays put, burning propellant until it is light enough. How much did it waste before it lifted off? Now add engines until T/W is above 1.
    Straight up is not orbit. Launch the Two-stage orbiter with the steering set to Up (straight up). It climbs far higher than the space station, yet falls back. Then fly it on Auto, which turns sideways early, and it stays up.
    The free 465 m/s. Fly the orbiter on Auto, then switch off "Earth spins" and fly again. Compare the Δv used and the propellant left at the end.
    Kerosene or hydrogen? Change the orbiter's second stage from hydrogen to kerosene and watch its Δv drop, even though the tanks hold the same 20 t. Then try a hydrogen first stage: lighter, but so bulky that the rocket gets much wider.
    Fly it yourself. Choose Manual, tip the nose with ← and → (or the ↶ ↷ buttons), and try to reach orbit. Hint: start straight up, lean gently east, and be nearly level by about 60 km.
    At home: a balloon rocket. Thread a drinking straw onto a long string stretched across a room, tape a blown-up balloon under the straw, and let go of its neck. The balloon pushes air out backward and the air pushes the balloon forward. NASA's multistage balloon activity (in the sources) shows how to add a second stage with a paper cup ring and a clothespin.

    A common misconception

    "To get into orbit, a rocket has to fly high enough to escape gravity."

    At 400 km, where the space station orbits, gravity is still about 89% as strong as on the ground (8.7 m/s² instead of 9.8). Astronauts float because they and their station are falling together, all the time, while moving sideways at 7.7 km/s. Going high is the easy part. The hard part is the sideways speed, which is why real rockets turn over soon after liftoff and spend most of their propellant pushing along the horizon.

    "Rockets push against the air."

    They push against their own exhaust. That is why they work in space, and why every engine in the lab gives more thrust in a vacuum than at sea level.

    How the simulation works

    The rocket flies in the plane of the equator around a round Earth of mean radius 6,371 km, with gravity GM/r² (GM = 3.986004418 × 10¹⁴ m³/s²). Earth spins unless you switch the spin off: it turns once per sidereal day (86,164 s), and the pad and the air turn with it, so the rocket starts with Earth's 465 m/s and the drag is worked out from its speed through the moving air. The air is an exponential atmosphere, ρ = 1.217 kg/m³ × e−h/8.5 km, and drag is ½ ρ v² Cd A with Cd = 0.5 and v the speed through the air. Each engine has a fixed mass flow; its specific impulse slides in a straight line from the sea-level value to the vacuum value as the air pressure drops, which is how a real fixed nozzle behaves.

    Powered flight and flight in the air are stepped with the fourth-order Runge–Kutta method every 0.04 s, with the step cut short to land exactly on each burnout. Coasting above 200 km uses the leapfrog method, which keeps an orbit's energy steady lap after lap. The losses are counted against the speed over the ground, so that while the engines burn the four parts add up exactly to the Δv used.

    The autopilot rises straight up to 50 m/s, then follows a pitch program that lowers the nose with height, staying within a few degrees of the direction of travel while the air is thick (a gravity turn). When the apoapsis reaches the target height it cuts the engines, coasts up, and burns sideways there to round off the orbit. Before launch it flies seven quick test flights with gentler or sharper turns and keeps the one that saves the most propellant without a very long coast.

    What is simplified, and why: the flight stays in one plane; Earth is a perfect ball with no mountains; the air does not change with weather, and above about 30 km it thins a little more slowly than real air (at 50 km the model's air is about three times too dense, but drag up there is tiny either way); Cd stays fixed, while on real rockets it peaks near the speed of sound; staging is instant; and nothing in the rocket bends or breaks, however hard you fly. The engine and tank figures are typical rounded values, not those of any one rocket.

    How it was checked (automatic tests of the model):

    • A burn with no gravity and no air: the speed gained matches Δv = Isp g₀ ln(m₀/mf) (7,289.7 m/s) to 1 part in 10⁹, and a two-stage burn matches the sum of the stages (9,661.6 m/s).
    • A straight-up hop with no air: the top height predicted from the energy at burnout, 1,027.86 km, matches the flight to 2 parts in 10⁹, and the energy at the top equals the energy at burnout to 2 parts in 10¹⁰.
    • Orbits: at 400 km the lap takes 5,544.85 s against 2π√(a³/GM) = 5,544.86 s, and the energy drifts by less than 2 parts in 10¹¹ over 100 laps. For a 200 × 2,000 km ellipse, the Ap and Pe readouts match the flown orbit within 0.04 km, and the speeds at Pe and Ap match the vis-viva equation to better than 1 part in a million.
    • Constants: circular speed at 400 km 7,672.6 m/s; escape speed from the surface 11,186 m/s; the geostationary radius from the same GM, 42,164 km.
    • The Δv budget adds up during a burn to within 10⁻¹⁰ m/s, and cutting the time step from 0.04 s to 0.005 s moves a full first-and-second-stage burn's end point by 0.09 km in height and 1.1 m/s in speed.

    Sources

    @teddyrookbook GitHub