Doppler Effect Simulator
Equations in this simulation
| f₀ | Source frequency f₀ (Hz) | the pitch the siren makes, and what the driver hears | |
|---|---|---|---|
| c | Speed of sound c (m/s) | 343 m/s in air at 20 °C, 331 at 0 °C; 1,480 in water | |
| v_s | Source speed v_s (m/s) | 30 m/s is 108 km/h | |
| v_o | listener speed toward the source | 0 here: the listener stands still | |
| θ | angle between the source's motion and the line to the listener | taken when the sound now arriving was sent; 0° is heading straight at the listener, 180° straight away | |
| f | frequency the listener hears | higher while the source approaches, equal to f₀ at the closest point, lower as it leaves |
With the current values:
| λ | wavelength ahead of and behind the source | the crests are squeezed together in front and stretched behind; the circles drawn are one crest in every few dozen |
|---|
With the current values:
| M | Mach number | above 1 the source outruns its own sound | |
|---|---|---|---|
| α | half-angle of the Mach cone | all the wavefronts pile up on this cone; when it sweeps past the listener they hear the sonic boom |
With the current values:
How to use the Doppler effect simulator
- A car with a siren drives along the road past a listener. Every few dozen crests of the sound are drawn as a circle spreading out from where the car was when it sent them; in front of the car the circles crowd together, behind it they spread apart.
- Read the frequency the listener hears, and the shift in semitones, as the car approaches, passes and drives away. Tick Play what the listener hears to hear the familiar drop in pitch; the chart shows the frequency against the position of the car, and the Speed Converter turns the speeds into km/h or mph.
- Raise the source speed past the speed of sound. The circles can no longer get ahead of the car and pile up on a cone, the Mach cone; the listener hears nothing until it sweeps over them, then both the approaching and the receding sound at once: the sonic boom.
Frequently asked questions
What is the Doppler effect?
The change in the frequency you hear when the source of a wave and you are moving relative to each other. As a source approaches, each crest is sent from a little closer than the one before, so they arrive bunched up and the pitch is higher; as it moves away they arrive stretched out and the pitch is lower. The source itself never changes its frequency.
What is the Doppler formula?
f = f₀ × (c + v_o) ÷ (c − v_s cos θ), where f₀ is the frequency sent, c the speed of sound, v_s the source speed, v_o the speed of the listener toward the source, and θ the angle between the source's motion and the line to the listener, when the sound was sent. Head-on, with the listener still, it is f = f₀ c ÷ (c − v_s) approaching and f₀ c ÷ (c + v_s) leaving.
Why does the pitch drop suddenly as a car goes past?
Because the angle θ swings from nearly 0° to nearly 180° in the moment the car passes closest. The closer you stand to the road, the quicker the swing and the more sudden the drop; far from the road the pitch slides down gently.
What causes a sonic boom?
A source moving faster than sound outruns its own waves. All the wavefronts it sends pile up on the surface of a cone behind it, with half-angle α where sin α = c ÷ v_s. The cone carries a sharp jump in pressure, and when it passes over you that jump is the boom; it follows the aircraft all the way, not only when it breaks the sound barrier.
It says WebGL is turned off.
The 3D view needs WebGL, which every current browser has. It can be switched off by hardware acceleration being disabled in the browser settings, or by a very old graphics driver. Turn hardware acceleration on, or try another browser.
Is anything uploaded?
No. The simulation is drawn by your own browser with WebGL; nothing is sent anywhere, and it keeps working offline once the page has loaded.