Rocket Equation Simulator
1. Physical phenomenon
Launching a rocket involves more than raw thrust; it is a delicate trade between burning propellant and accelerating the remaining vehicle. Traditional calculators return a single value for the change in velocity derived from the Tsiolkovsky rocket equation. While that number is indispensable for mission planning, it hides the evolving interplay of mass, momentum, and energy as fuel burns. This simulator exposes that hidden dynamic. It integrates the coupled differential equations for mass, velocity, and altitude in real time and animates the rocket’s climb on a canvas. A striped yellow bar represents the chemical energy stored in the propellant, while a blue bar tracks kinetic energy gained. Watching these quantities change demystifies why achieving orbit requires so much fuel and why every kilogram of structural mass matters.
Real rockets ignite engines for a limited burn time while facing gravitational pull and, near Earth’s surface, atmospheric drag. For clarity the simulation models an idealized vertical launch in a vacuum but includes constant gravitational acceleration to show how thrust must overcome weight. Inputs for initial mass, final mass, exhaust velocity, burn duration, time step, and total simulation time grant full control. The model keeps units strictly in the International System: kilograms for mass, meters per second for velocity, and seconds for time. If you enter inconsistent or non‑finite values, the interface responds with an error rather than attempting nonsensical math. Because all computation occurs locally in the browser, no data ever leaves your machine.
2. Variables and assumptions
The rocket starts with mass , including structure, payload, and propellant. After the engines shut down, only remains. The effective exhaust velocity is the speed of propellant relative to the vehicle, assumed constant. Burn time sets how long the engines fire, which implies a constant mass-flow rate:
During the burn the rocket experiences thrust , and gravity acts downward with acceleration m/s². After the propellant is spent, mass and thrust remain constant and the rocket coasts under gravity alone. Atmospheric drag, staging events, and thrust-vector changes are ignored, matching the assumptions of the classical rocket equation while still allowing an engaging visualization.
The time step Δt controls numerical accuracy: a smaller step increases computational load but better resolves the rapid changes near burnout. The interface limits Δt between 0.01 and 10 seconds for stability, and the total simulation time T must exceed the burn time to capture the coast phase. Input validation keeps mass values positive and requires to exceed .
3. Governing equations and the rocket formula
With the assumptions above, the system obeys a set of coupled first-order ordinary differential equations. Mass decreases linearly while the engines fire:
Velocity changes according to thrust and gravity during the burn, and to gravity alone after burnout:
Altitude follows the kinematic relation . Integrating the thrust term over the burn (ignoring gravity) recovers the analytic Tsiolkovsky rocket equation, which the simulation uses to monitor numerical error:
Kinetic energy is , and the chemical energy available in the propellant is approximated as . Displaying both as bars emphasizes how little of the propellant's energy converts to motion.
4. Numerical scheme
The simulator advances the state using a classic fourth-order Runge–Kutta (RK4) method. Let the state vector be . During the burn the derivative function is , and after burnout it is . Each step evaluates the derivatives at four points and forms the weighted average:
where , , and so on. RK4 stays stable for the relatively smooth dynamics of a rocket burn provided the step satisfies Δt < tb/20, a guideline enforced by clamping the user-selected step. After generating the time series, the code compares the final burnout velocity against the analytic value and reports the fractional error as "Δv drift," giving users a sense of numerical accuracy.
5. Worked example
Take the default vehicle: it starts at kg and ends at kg, burning for s with an exhaust velocity of m/s. The mass-flow rate is therefore kg/s, meaning the engine burns kg of propellant every second.
The ideal (gravity-free) rocket equation gives the mission budget:
Because the launch is vertical, gravity subtracts a steady loss over the burn equal to m/s. The simulated burnout velocity is thus about m/s — noticeably below the ideal budget of m/s, which is exactly the “gravity loss” that makes vertical ascent so costly. After burnout the vehicle coasts upward, trading that kinetic energy for altitude (a further climb on the order of , roughly a thousand kilometers in a vacuum) before gravity pulls it back. Only a small fraction of the propellant's chemical energy ends up as vehicle kinetic energy, which the yellow and blue energy bars in the animation make visible.
6. Comparison table
The table compares the baseline design with two variations: one using higher exhaust velocity and another carrying less propellant. The ideal Δv values are computed directly from the rocket equation, , and gravity losses would reduce the actual burnout velocity below these figures. The baseline mass ratio is .
| Scenario | v_e (m/s) | m₀ (kg) | m_f (kg) | Mass ratio m₀/m_f | Ideal Δv (m/s) |
|---|---|---|---|---|---|
| Baseline | 4500 | 500000 | 150000 | 3.33 | 5418 |
| Higher v_e | 5200 | 500000 | 150000 | 3.33 | 6261 |
| Lighter payload | 4500 | 400000 | 100000 | 4.00 | 6238 |
Increasing exhaust velocity or reducing final mass both raise the achievable Δv, but the animation shows their different impacts: higher steepens the velocity curve without changing burn duration, whereas lowering payload shortens the yellow fuel bar and produces a lighter vehicle that accelerates faster.
7. How to read the animation
The canvas plots altitude versus time. The horizontal axis stretches from zero to the chosen total time. The vertical axis rescales automatically to fit the highest altitude. A thin black rocket icon climbs as the simulation advances, leaving a faint trail of its trajectory. A red circle marks the current state. The yellow bar beneath the canvas indicates remaining propellant energy, shrinking as fuel burns; the blue bar shows kinetic energy gained. These patterned bars allow viewers with color‑vision deficiencies to distinguish them. Captions and a hidden text block describe the same numbers for screen readers. Keyboard users can focus the canvas and press the space bar to toggle play and pause.
8. Limitations
The model omits atmospheric drag, engine throttling, structural flex, staging, and relativity. Gravity remains constant even as altitude increases, which is reasonable only for short flights near Earth. Chemical energy is approximated rather than calculated from realistic propellant thermodynamics. Numerical integration assumes a rigid body and ignores rotational dynamics. These simplifications render the simulator a pedagogical tool rather than a mission design suite. Large time steps may introduce noticeable Δv drift, especially with extreme mass ratios; the reported error helps diagnose such issues.
9. Extensions
Future improvements could include variable thrust profiles, atmospheric drag models, staging events, or three‑dimensional trajectories. Implementing a symplectic integrator would conserve energy more faithfully during coast phases. Coupling the rocket to a planetary gravity field or adding an orbital display would transform the tool into a basic mission sandbox. Because the code uses only vanilla JavaScript and the HTML5 canvas, enthusiasts can experiment freely by editing the source.
Frequently asked rocket equation questions
What is the Tsiolkovsky rocket equation?
It gives the ideal change in velocity a rocket can achieve: delta-v equals the effective exhaust velocity multiplied by the natural logarithm of the mass ratio, the starting mass divided by the burnout mass. It assumes no gravity or drag, so it represents the velocity budget available to the vehicle rather than the speed actually reached during a launch.
Why is the actual burnout velocity lower than the rocket-equation delta-v?
Gravity and drag steal velocity during ascent. On a vertical launch, gravity subtracts roughly g times the burn time from the ideal delta-v. For the default vehicle that gravity loss is about 981 meters per second over a 100-second burn, so the simulated burnout velocity is near 4437 meters per second rather than the ideal 5418. Real launches also lose speed to atmospheric drag and steering.
Why does exhaust velocity matter so much?
Delta-v scales linearly with exhaust velocity but only logarithmically with the mass ratio. Doubling the exhaust velocity doubles the delta-v, while doubling the mass ratio adds far less. That is why engineers work hard on higher-efficiency engines, measured as specific impulse, since a small gain in exhaust velocity beats hauling ever more propellant.
What units does the calculator use?
Everything is in SI units: kilograms for mass, meters per second for velocity and exhaust velocity, and seconds for time. Keep all inputs consistent, ensure the initial mass exceeds the final mass, and set the total simulation time longer than the burn time so the coast phase is captured.
10. References and related tools
The Tsiolkovsky rocket equation and gravity-loss framework are standard results in astronautics; see, for example, NASA Glenn on the ideal rocket equation. Classical derivations of the rocket equation appear in standard texts such as J. R. Wertz, Spacecraft Attitude Determination and Control, and D. Vallado, Fundamentals of Astrodynamics and Applications. For additional practice explore the Rocket Engine Thrust Calculator, analyze free‑fall trajectories with the Ballistic Trajectory Calculator, or place satellites using the Orbital Period Calculator.
Delta-V Dispatch Mini-Game
Practice balancing propellant and mission demands. Drag the throttle slider (or use arrow keys) to match required Δv before each stage times out while accounting for efficiency hits, gravity losses, and drifting mass ratios drawn from the rocket equation.
