loading...
running...
The science
An orbiter captured at Mars by a small burn ends up in a long ellipse (about 34 h here). Pushing it into the science orbit with the engine would cost over a kilometre per second of propellant. Aerobraking uses the thin upper atmosphere instead: on every periapsis pass drag removes a little orbital energy, so the apoapsis comes down while the periapsis hardly moves.
adrag = −½ ρ(h) (CdA/m) |vrel| vrel, ρ(h) = ρ100 exp(−(h−100 km)/H), vrel = v − Ω × r
The page integrates the planar two-body problem (μ = 42828 km³/s²) plus this drag with a fourth-order Runge-Kutta step that shrinks to one second near periapsis. Near periapsis the path is a shallow parabola in altitude, so the density integral along the pass has a closed form (Laplace's method):
∫ ρ ds ≈ ρp √(2π H vp² / r¨), r¨ = vp²/rp − μ/rp², ΔE = −½ (CdA/m) vp² ∫ ρ ds
The energy change per pass sets the new semi-major axis, a = −μ/2E, and so the whole campaign: the apoapsis altitude falls roughly exponentially with the pass number, and the number of passes scales with the ballistic coefficient m/(CdA).
The corridor. Too deep and the heat flux q = ½ ρ v³ (free-molecular, full accommodation) and the dynamic pressure ½ ρ v² exceed what the panels and structure tolerate; too shallow and the campaign takes years. The corridor altitude is where q equals your limit; with maintenance burns on, the spacecraft makes a small tangential burn at each apoapsis to put the periapsis back into the corridor despite density swings (the orbit-to-orbit variability slider, which is a pseudo-random factor drawn once per pass).
Simplifications. Planar orbit, no lift, constant Cd, exponential atmosphere with a single scale height and no winds, no Mars J2 or third-body perturbations, and the stylised heating law; the Mars surface texture is procedural. Real missions fly a periapsis table updated from measured drag after every pass. Numbers are of the right order for a 2 t orbiter, but this is a teaching model, not a mission design tool. In-page checks: Kepler period and energy conservation with drag off; per-pass energy loss at three periapsis altitudes against the closed form; the peak heat flux of a pass flown at the solved corridor; and eight passes of the analytic map against the integrated apoapsis.