2D FDTD pressure wave simulation � standing waves, room modes, Doppler shift, reverberation & noise cancellation.
Solves the acoustic wave equation on a 200�120 Cartesian grid. At each timestep, pressure p is updated from the two previous timesteps using finite differences.
A horizontal pipe with open ends (Dirichlet BC). Standing waves form with pressure nodes at both ends. Resonant lengths: L = n�?/2 (n = 1, 2, 3 ...). Fundamental mode: f1 = c/2L.
One end closed (rigid wall), one open. Pressure antinode at closed end, node at open end. Only odd harmonics: L = (2n-1)�?/4. Fundamental: f1 = c/4L (one octave below equal-length open pipe).
Rectangular room with rigid perimeter walls. Axial modes form along each dimension; tangential and oblique modes arise from combinations. Use the Room Size slider to alter the room dimensions and observe how the resonant mode frequencies change.
A sinusoidal point source moves at ~0.4� the wave speed (Mach 0.4). Wavefronts compress ahead of the source (higher frequency) and stretch behind it (lower frequency). The wavefront pattern traces characteristic Mach cones at this subsonic speed.
Ultra-low absorption (a � 0.00025). Pressure waves reflect repeatedly � observe energy building up to steady-state and, when source stops, the gradual exponential decay (reverberation time RT60 = time for energy to fall 60 dB).
Two sources separated by ~0.22 of the domain width driven with 180� phase difference. Their pressure fields interfere destructively, creating quiet zones visible as dark bands between and beyond the sources.
| Quantity | Formula |
|---|---|
| Speed of sound (air, 20 �C) | c = 343 m/s |
| Wavelength | ? = c / f |
| Open pipe modes | f_n = n�c / 2L, n = 1,2,3� |
| Closed pipe modes | f_n = (2n-1)�c / 4L, n = 1,2,3� |
| Room axial mode | f = c / 2L (along dimension L) |
| Schroeder frequency | f_s � 2000v(T60/V) Hz |
| RT60 (Sabine) | T60 = 0.161�V / (a�S) seconds |
| Doppler shift | f_obs = f_s�c / (c � v_s) |
| Level | Topics |
|---|---|
| GCSE Physics | Waves, reflection, longitudinal/transverse, wave equation |
| A-Level Physics | Standing waves, harmonics, Doppler effect, sound intensity |
| AP Physics | Superposition, interference, resonance, wave speed in medium |
| IB Physics | Standing waves in pipes, Doppler, diffraction and interference |
| University | Acoustic wave equation, FDTD, room acoustics, psychoacoustics |
Sabine's RT60, Schroeder frequency, concert hall design, acoustic panels & diffusers, noise control.
Harmonic series, timbre, equal temperament, critical bands, masking, digital audio theory.
Lattice Boltzmann CFD � Strouhal number, Aeolian tones, Reynolds number transitions.