Acoustic Wave Field Lab

2D companion: a real finite-difference solution of the sound wave equation. Watch pressure waves spread, reflect, bend through a gap and interfere, and read the level at a microphone.

Switch to 3D

Presets

Playback

Source and air

Wavelength equals the speed of sound divided by the frequency; cold air is slower, so waves get shorter.

Room, barrier and second source

Rigid walls reflect and build standing waves. A gap narrower than a wavelength spreads sound in all directions.

Model checks

The science

Sound as a pressure wave

For small disturbances the pressure obeys the wave equation ∂2p/∂t2 = c2 ∇2p. The speed of sound in air is c ≈ 331.3 √(1 + T/273.15) m/s and the wavelength is λ = c / f. The room is solved with a second-order finite-difference scheme on a 200 x 125 grid with a time step set by the Courant condition c Δt/Δx ≤ 1/√2.

What to look for

  • Spreading. In two dimensions the amplitude falls as 1/√r, so the level drops by 3 dB for each doubling of distance (a 3D point source would lose 6 dB).
  • Reflection and standing waves. With rigid walls the waves bounce and form fixed nodes and antinodes; the room modes of a rectangle are at f = (c/2)√((nx/Lx)2 + (ny/Ly)2).
  • Diffraction. Through a gap of width a the waves spread strongly when a is not much larger than λ, and move as a beam when it is.
  • Interference. Two sources in phase reinforce along some directions and cancel along others.

Honest simplifications

  • Two dimensions only (a line source), so levels are relative to the level at 1 m, not absolute sound pressure levels.
  • Air damping is a simple linear term and absorbing walls use a sponge layer, not a real impedance model. Wind, humidity, and the human hearing weighting are not modelled.
  • The simulation runs in slow motion (about 70 times slower than real sound).
What to try
  • Load Rigid room, standing waves and wait: the pattern becomes stationary with fixed quiet lines.
  • Load Diffraction through a gap and narrow the gap below the wavelength shown in the last graph.
  • Switch on the second source and slide its phase to 180 degrees to turn constructive interference into cancellation.
  • Click the room to move the microphone and watch its level change.
Pressure at the microphone against time
Level against distance along the axis (2D spreading)
Pressure along the axis right now
Wavelength against frequency