Acoustic Resonance Simulator Back
Acoustics Simulator

Acoustic Resonance & Wind Instrument Simulator

Explore standing wave resonance in open pipes, closed pipes, and Helmholtz resonators. Adjust pipe length, temperature, and harmonic number to see how flutes, clarinets, and bottles produce their characteristic tones.

Parameters
Pipe Type
Pipe Length L
m
Temperature T
°C
Harmonic n
Volume V
L
Neck Area A
cm²
Neck Length Ln
cm
Presets
Resonant Frequencies
Results
343 m/s
Speed of sound c
Fundamental f₁
Standing Wave Animation (color = pressure amplitude, white = displacement)
Red = high pressure / Blue = low pressure / white line = displacement amplitude
Corresponding musical notes
Theory & Key Formulas
Open pipe: $f_n = \dfrac{n \cdot c}{2L}$
Closed pipe: $f_n = \dfrac{(2n-1) \cdot c}{4L}$
Helmholtz: $f = \dfrac{c}{2\pi}\sqrt{\dfrac{A}{V \cdot L_\mathrm{eff}}}$
Sound speed: $c = 331.3\sqrt{T/273.15}$ m/s

What is Acoustic Resonance in Pipes?

🙋
What exactly is a "standing wave" inside a pipe, and why does it create a musical note?
🎓
Basically, it's a sound wave that gets trapped and bounces back and forth between the ends of the pipe. When the wave perfectly fits the pipe length, it reinforces itself, creating a loud, clear tone—that's resonance. Try switching the "Pipe Type" control above between "Open" and "Closed" to see how the wave pattern changes at the boundaries.
🙋
Wait, really? So the formulas are different for open and closed pipes. Why does a closed pipe only have odd harmonics?
🎓
In practice, it's all about the boundary condition. At a closed end, the air can't move, so that point is always a "node" of motion. For the wave to fit, a node must be at the closed end. This restriction only allows wave patterns that are odd multiples of a quarter-wavelength to fit. Slide the "Harmonic n" control and watch the wave—you'll see every pattern has a node at the closed end.
🙋
What about the "Temperature" parameter? Why does warmer air change the pitch?
🎓
Great observation! The speed of sound $c$ isn't constant—it increases with temperature. Since the resonant frequency depends directly on $c$, a warmer instrument plays sharper. For instance, a flute player warms their instrument before a concert for this reason. Adjust the temperature slider and you'll see the frequency readout change, even though the pipe length and wave pattern stay the same.

Physical Model & Key Equations

The fundamental relationship governing resonance in pipes is the condition that the pipe length must equal an integer or half-integer multiple of the sound wavelength. The frequency is determined by the speed of sound divided by the wavelength.

$$f_n = \dfrac{n \cdot c}{2L}\quad \text{(Open Pipe)}$$

Where $f_n$ is the frequency of the nth harmonic, $n = 1, 2, 3,...$, $c$ is the speed of sound in air, and $L$ is the pipe length. For a closed pipe, the condition changes to odd multiples of a quarter-wavelength.

$$f_n = \dfrac{(2n-1) \cdot c}{4L}\quad \text{(Closed Pipe)}$$

Here, $n = 1, 2, 3,...$, but only yields the 1st, 3rd, 5th... harmonics. The speed of sound is temperature-dependent: $c \approx 331 \sqrt{1 + \frac{T}{273.15}}$ m/s, where $T$ is in °C.

A Helmholtz resonator works on a different principle: it's the oscillation of a plug of air in a neck, acting like a mass on a spring, where the cavity volume provides the springiness.

$$f = \dfrac{c}{2\pi}\sqrt{\dfrac{A}{V \cdot L_\mathrm{eff}}}$$

Here, $f$ is the resonant frequency, $A$ is the cross-sectional area of the neck, $V$ is the volume of the cavity, and $L_\mathrm{eff}$ is the effective length of the neck (slightly longer than the physical length due to end effects). This is why in the simulator, changing the volume or neck area has a dramatic effect on the pitch.

Frequently Asked Questions

In an open pipe (open at both ends), the pressure variation is minimal at both ends, so all integer multiples of the fundamental frequency are generated. In contrast, in a closed pipe (closed at one end), the pressure variation is maximal at the closed end, so only odd multiples of the fundamental frequency are produced. This is the reason for the difference in timbre between a flute (open pipe) and a clarinet (closed pipe).
The speed of sound c depends on temperature and is calculated as c ≈ 331.3 + 0.606 × T(°C). As temperature rises, the speed of sound increases, causing the resonance frequency to rise even for the same pipe length. For example, raising the temperature from 20°C to 40°C raises the pitch of a flute by about a semitone.
The resonance frequency is determined by f = (c/2π)√(S/(V·L')), where S is the neck cross-sectional area, V is the volume, and L' is the effective neck length. Lengthening the neck lowers the frequency, while increasing the cross-sectional area raises it. This explains why a bottle with a narrow neck produces a lower pitch and a wider neck produces a higher pitch.
The vertical axis represents the amplitude of air pressure variation inside the pipe, and the horizontal axis represents the position along the length of the pipe. In an open pipe, both ends are nodes (zero amplitude), while in a closed pipe, the closed end is an antinode (maximum amplitude). By observing this waveform, you can intuitively understand where the sound is strongest (antinodes) and how the vibration modes differ for each harmonic.

Real-World Applications

Musical Instrument Design: This is the direct application. The length of a trombone slide or the keys on a flute are precisely calculated to change the effective pipe length and select specific harmonics. Designers use these equations to ensure instruments are in tune across their entire range.

Architectural Acoustics: Helmholtz resonators are built into the walls of concert halls as sound absorbers. They are tuned to specific problematic low-frequency resonances (like room modes) to "trap" and dissipate that energy, reducing muddy bass and improving sound clarity.

Automotive & HVAC Engineering: Unwanted acoustic resonance in intake manifolds, exhaust systems, or air ducts can create loud, annoying whistles or booms. CAE simulation software uses these exact models to predict and eliminate such resonances during the design phase, before a physical prototype is built.

Consumer Product Design: The pleasing "click" of a car door closing or the sound of a bottle when you blow across its top are Helmholtz resonance effects. Engineers can tune these sounds to be satisfying and indicative of quality by carefully designing the cavity and neck dimensions.

Common Misunderstandings and Points to Note

There are a few key points you should be especially mindful of when starting to use this simulator. First, the "Tube Length L" refers to the effective vibrating length. If you look at a real flute or clarinet, you'll see they are curved or have open finger holes. Think of the simulator's "tube length" as the "effective length of the air column when sounding," which incorporates all those effects. For example, the state with all finger holes closed on a clarinet corresponds to the "total length L of a closed tube" in the simulator.

Next, don't take the explanation that "closed tubes only produce odd-numbered harmonics" at face value. This is true only under the ideal conditions of a perfectly cylindrical tube with a completely rigid closed end. The interior of an actual clarinet mouthpiece has a complex shape, so strictly speaking, the "closed end" condition is not perfectly met. Consequently, very weak even-numbered harmonics are also generated, influencing the instrument's timbre (harmonic structure). It's important to be aware of the differences between the simulator's ideal model and real-world instruments.

Finally, consider the "effective neck length Leff" for a Helmholtz resonator. This is a corrected value longer than the physical neck length, approximated by formulas like $L_{\text{eff}}\approx L_n + 0.85 \sqrt{A}$. The "0.85√A" part represents the "end effect," where the vibration spreads outward at the neck's opening. For instance, when you blow across a bottle's mouth to produce a "popping" sound, using this correction brings the calculated pitch closer to the actual sound than using just the physical neck length. When adjusting parameters, remember this concept of "effective length."

How to Use

  1. Enter pipe length (valL) in millimeters; select open or closed boundary condition via slL
  2. Set temperature (valT) in Celsius using slT to adjust sound velocity; standard air is 343 m/s at 20°C
  3. Choose harmonic number (valN) with slN to view overtone frequencies; harmonic n produces f = n·f₁
  4. For Helmholtz resonators, input cavity volume (valV) in cubic centimeters and observe resonant peak frequency
  5. Read fundamental frequency f₁ and sound speed c in the output stats panel

Worked Example

A wooden flute pipe: length 300 mm, open at both ends, air temperature 22°C (c = 344 m/s). Fundamental f₁ = c/(2L) = 344/(2×0.3) = 573 Hz. Selecting harmonic 3 displays f₃ = 3×573 = 1719 Hz (second overtone, one octave plus a fifth). Closing the pipe end shifts f₁ to 287 Hz and changes the harmonic series to odd multiples only (f₁, f₃, f₅...). A Helmholtz resonator cavity of 150 cm³ with 25 mm neck opening produces resonance around 95 Hz.

Practical Notes

  1. Temperature correction: each 10°C increase raises c by ~18 m/s; high-altitude performance (low pressure) reduces f₁ significantly
  2. Closed-end pipes (clarinets, oboes) radiate only odd harmonics; open pipes (flutes, recorders) include all harmonics—use slL to toggle boundary effects
  3. Helmholtz resonators model percussion instrument air chambers; cavity volume dominates tuning more than neck diameter for frequencies below 500 Hz
  4. Real instruments show frequency shifts due to end corrections (~0.3× bore diameter); add 15–20 mm to effective length for accuracy