Pressure waves Mach cone Shock (oblique / bow)

Supersonic Flow (2D)

This 2D companion drives the same gas-dynamics equations as the 3D version — the Mach-angle relation, the θ-β-M bisection for the weak oblique shock, and the Rankine-Hugoniot jump conditions — through a plain canvas view instead of a GPU shader, and adds a dimensional layer the 3D version doesn't have: an altitude slider that scales ambient pressure and temperature through a standard-atmosphere approximation, so the post-shock pressure and temperature readouts are real physical values (Pa, K), not just ratios.

About this simulation

A body moving through air emits circular pressure waves that behave differently once the Mach number crosses 1. This 2D canvas view draws those waves, the Mach cone, and the oblique or bow shock directly with real gas-dynamics math — including an altitude slider that scales the ambient atmosphere so the pressure and temperature jump across the shock come out in real units, not just ratios.

What it shows

Pressure waves expanding at the speed of sound from a moving body, collapsing into a Mach cone above Mach 1, with an attached oblique shock off a wedge/cone or a detached bow shock off a blunt body.

How to use

Drag the Mach, wedge half-angle and altitude sliders, pick a body shape, or jump to a preset, and watch the shock geometry and the dimensional pressure/temperature readout update instantly.

Did you know?

The same Mach 4 shock produces a much smaller absolute pressure spike at 20 km altitude than at sea level, even though the pressure ratio p2/p1 is identical — thin air starts from a much lower baseline.

Frequently asked questions

How is this different from the 3D version?

Same gas-dynamics equations (Mach angle, θ-β-M relation, Rankine-Hugoniot), rendered on a plain 2D canvas instead of a GPU shader, plus an altitude slider that turns the pressure/density ratios into real Pascal and Kelvin readouts.

What is the Mach cone?

The cone-shaped shock front trailing a body flying faster than sound, with half-angle μ = arcsin(1/M). At M = 2 that's about 30°; it narrows as Mach number rises.

Why does the shock sometimes detach?

The θ-β-M relation only has an attached solution up to a maximum deflection angle θmax. Push past it (or use a blunt body) and the shock stands off the nose as a curved bow shock instead.

Why does altitude change the readout?

Higher altitude means lower ambient pressure and temperature (via the standard-atmosphere approximation). The shock ratios p2/p1 and ρ2/ρ1 stay the same at a given Mach number, but the absolute post-shock pressure and temperature scale down with the thinner air.