Why staging is a hybrid-dynamics problem
A two-stage launch vehicle climbs through a simplified vertical atmosphere. Stage 1 consumes propellant, reaches burnout, releases its dry structure, coasts briefly, and starts Stage 2 with a finite ignition ramp. The vehicle does not teleport or gain velocity merely because mass is discarded.
Thrust and mass flow act together; the vehicle becomes lighter as fuel is burned.
Thrust shuts off; a discrete dry-mass jettison changes the mass state, not the altitude or velocity.
During delay, gravity and drag continue. Stage 2 then ramps to commanded thrust.
Continuous dynamics and discrete resets
State vector \(x=[h,v,m]^T\), with altitude \(h\), upward velocity \(v\), and instantaneous total vehicle mass \(m\).
At the stage-separation instant \(t_s\), impose the state reset:
Stage 2 ignition follows \(t_i=t_s+\Delta t_{coast}\). Its thrust ramps from zero to \(T_2\) over \(\tau_r\), while the propellant mass flow follows actual thrust.
For zero ramp duration, ignition is modeled as an instantaneous step. The ideal mass reset is a mathematical event, not a continuous high-rate mass-flow pulse.
Reference launch vehicle
| Quantity | Baseline | Interpretation |
|---|---|---|
| Initial mass | 120,000 kg | All stages, payload and propellant |
| Stage 1 thrust / Isp | 2.0 MN / 280 s | Constant nominal thrust and specific impulse |
| Stage 1 propellant | 75,000 kg | Burns before Stage 1 shutdown |
| Stage 1 dry mass | 15,000 kg | Discarded at separation |
| Stage 2 thrust / Isp | 450 kN / 320 s | Ramps up following coast |
| Stage 2 propellant | 20,000 kg | Available second-stage fuel |
| Coast / ignition ramp | 3 s / 2 s | Transients between powered phases |
At Stage 1 burnout, mass is 45,000 kg. Discarding 15,000 kg leaves 30,000 kg. A hypothetical thrust-to-mass acceleration of 44.44 m/s² immediately before shutdown would become 66.67 m/s² if the same thrust were still available after jettison. It is not the actual post-separation acceleration because Stage 1 has shut down.
Run the full two-stage mission
Modify the mission inputs and recompute altitude, velocity, total mass, thrust, acceleration, and dynamic pressure. The simulation uses a fixed-step RK4 integrator with exact event-time subdivision and explicit separation resets. A simplified fixed-step solver is used here, not MATLAB ode45.
What changes when the coast or ignition ramp grows?
Compare the baseline (3-second coast, 2-second ramp) against the current inputs. Both cases share all other parameters. Results are aligned by time since Stage 1 separation, not by absolute launch time.
Click Compare to generate matched simulations.
Checks that a staging simulation must pass
| Test | Expected behavior | Failure interpretation |
|---|---|---|
| Mass monotonicity | Mass non-increasing; separation produces a downward jump | Wrong mass-flow sign or event reset |
| Position continuity | Altitude continuous through separation | Incorrect state reset |
| Velocity continuity | No instantaneous Δv without modeled impulse | Spurious staging impulse |
| Coast thrust | Zero until ignition | Overlapping stage logic |
| Propellant bound | Neither stage consumes beyond its allocated propellant | Missing depletion event |
| Integrator refinement | Output converges as timestep decreases | Numerical error / event misalignment |
| Mass accounting | Initial mass = consumed propellant + jettisoned mass + remaining mass | Mass conservation bookkeeping error |
Passing these checks verifies selected implementation invariants, not full physical validation or flight certification.
Python and MATLAB starting points
import numpy as np
from scipy.integrate import solve_ivp
g0, Re, rho0, H = 9.80665, 6371000., 1.225, 8500.
def rhs(t, x, thrust, isp, Cd=0.4, A=8.):
h, v, m = x
rho = rho0*np.exp(-max(h, 0)/H)
drag = 0.5*rho*Cd*A*v*abs(v)
grav = g0*(Re/(Re+max(h, 0)))**2
return [v, (thrust-drag)/m-grav,
-thrust/(isp*g0) if thrust > 0 else 0.]
# Integrate each phase separately, with exact event boundaries.
# Example: first-stage burn
T1, Isp1, prop1 = 2e6, 280., 75000.
tb1 = prop1*Isp1*g0/T1
sol1 = solve_ivp(lambda t,x: rhs(t,x,T1,Isp1),
(0,tb1), [0.,0.,120000.],
rtol=1e-9, atol=1e-9, dense_output=True)
# Explicit separation reset: altitude and velocity unchanged.
x_sep = sol1.y[:,-1].copy()
x_sep[2] -= 15000.
# Coast and Stage 2 are additional integrations with
# thrust=0 and time-dependent ignition-ramp thrust.
# Check mass budget and join segments without smoothing the jump.g0 = 9.80665; Re = 6371000; rho0 = 1.225; H = 8500;
T1 = 2e6; Isp1 = 280; prop1 = 75000;
tBurn = prop1*Isp1*g0/T1;
x0 = [0; 0; 120000]; % altitude, velocity, mass
rhs = @(t,x,T,Isp) [x(2); ...
(T - 0.5*rho0*exp(-max(x(1),0)/H)*0.4*8*x(2)*abs(x(2)))/x(3) ...
- g0*(Re/(Re+max(x(1),0)))^2; ...
-T/(Isp*g0)];
opts = odeset('RelTol',1e-9,'AbsTol',1e-9);
[t1,x1] = ode45(@(t,x)rhs(t,x,T1,Isp1),[0 tBurn],x0,opts);
xSep = x1(end,:)'; xSep(3) = xSep(3) - 15000;
% Next: integrate zero-thrust coast; then stage-2 ignition ramp.
% Preserve h and v through the separation event.These snippets demonstrate phase integration and separation; the browser experiment additionally handles Stage 2 depletion and variable ramp thrust. They are starting points rather than full flight dynamics software.
A smooth trajectory does not prove correct staging logic
Staging is a state-machine problem as much as it is a differential-equation problem. A physically defensible simulation must combine continuous mass depletion, unpowered coast, explicit structural-mass resets, and well-defined ignition events. Verify event continuity and mass conservation before interpreting acceleration spikes or tuning a control system.