🍾 Helmholtz Resonator

Blow across a bottle neck and hear a pure tone: the air plug in the neck acts as a mass, the cavity as a springy air spring. Adjust neck geometry and cavity volume to see resonance shift live.

SoundInteractive
Mass-spring-damper air plug driven at resonance · P pause · R reset · Widen neck or shrink cavity to raise pitch

How it Works

A Helmholtz resonator behaves like a tiny mass on a spring. The plug of air sitting inside the neck is the moving mass; the much larger body of air trapped in the cavity behaves like a compressible spring — squeeze it and it pushes back. When the jet of air from your breath disturbs the neck's air plug, that plug bounces on the cavity's air spring at one specific natural frequency, exactly like a mass bobbing on a real spring.

Because the air plug doesn't stop exactly at the physical ends of the neck — it drags a thin collar of air along with it just outside each opening — the effective length used in the frequency formula is longer than the neck's physical length. This end correction, 1.6·√(A/π), is added to the physical neck length L to get the effective length L_eff that actually sets the pitch.

f = (c / 2π) · √( A / (V · L_eff) )
L_eff = L + 1.6 · √(A / π)  (end correction, both ends)
c ≈ 343 m/s (speed of sound in air)
mass-spring analogy: m = ρ·A·L_eff,  k = ρ·c²·A² / V,  ω₀ = √(k/m) = 2πf

Frequently Asked Questions

What determines the pitch you hear when you blow across a bottle?

The pitch is the Helmholtz resonance frequency f = (c/2π)·√(A/(V·L_eff)), set entirely by the neck's cross-sectional area A, the cavity volume V, and the effective neck length L_eff. It does not depend on how hard you blow — blowing harder only makes the tone louder, not higher or lower.

Why does blowing across the neck (not into it) produce a tone?

Blowing across the rim creates an unstable, oscillating air jet (an edge tone) that sheds turbulent puffs across a broad range of frequencies. The cavity and neck only accept and reinforce the one frequency that matches their own natural (Helmholtz) resonance, filtering the noisy jet into a single clean tone — the same feedback loop used in flutes and ocarinas.

Why do bigger cavities produce lower pitches?

Frequency scales as 1/√V, so a larger air cavity acts like a softer, weaker spring restoring the neck's air plug. A softer spring oscillates more slowly, exactly like a heavier pendulum bob or a softer suspension spring on a car — lower stiffness means lower frequency for the same mass.

Why does a longer or narrower neck also lower the pitch?

A longer neck (larger L) increases L_eff directly, and both L_eff and V sit in the denominator under the square root, so increasing either one lowers f. A narrower neck (smaller A) lowers f too, since A appears in the numerator — less cross-sectional area means less restoring push from the compressed cavity air on the plug of air in the neck.

What is the end correction, and why is it needed?

The end correction, 1.6·√(A/π), accounts for the fact that the oscillating air plug does not stop exactly at the geometric ends of the neck — it drags a little extra air just outside each opening along with it as it moves. Ignoring this correction underestimates the effective moving mass and predicts a pitch that's noticeably too high, especially for short, wide necks.

What are real-world examples of Helmholtz resonators?

Blowing across a soda bottle, a car's exhaust resonator chamber tuned to cancel specific engine drone frequencies, the ported (bass-reflex) enclosure on a loudspeaker that reinforces low bass through a tuned port, ocarinas, and even the resonant chambers of some guitars and drums all work as Helmholtz resonators — a cavity of air coupled to the outside through a narrow neck.

Why is Helmholtz resonance different from a pipe's harmonic resonance?

An open or closed pipe (like an organ pipe or a flute body) supports a whole family of standing-wave harmonics because sound waves travel back and forth along its length. A Helmholtz resonator has only one dominant resonance because it behaves as a single lumped mass-spring system — the neck's air plug bounces on the cavity's air spring as one unit rather than supporting a standing wave pattern.

Where does the damping in a Helmholtz resonator come from?

Damping arises from viscous friction as air rubs against the neck walls, thermal losses at the cavity boundary, and acoustic radiation of sound energy away from the neck openings. Higher damping widens and flattens the resonance peak (lower Q), while lower damping produces a sharper, taller, more sharply tuned peak.

Does the driving (blowing) strength change the resonant frequency?

No — in this linear mass-spring-damper model, the blow strength only scales the driving force amplitude and therefore the size of the oscillation, not its frequency. The frequency is fixed entirely by A, V, and L_eff through the Helmholtz formula, which is why the readout stays constant as you raise or lower the blow-strength slider.

About this simulation

Written by MySimulator Team · Reviewed by MySimulator Editorial Review

Last updated: 11 July 2026

This simulator solves the real mass-spring-damper equation behind Helmholtz resonance: the air plug trapped in the bottle's neck is driven at the cavity's own natural frequency, and its motion is integrated frame by frame rather than faked with a fixed sine wave. The same A, V, and L_eff you set with the sliders feed directly into the physical mass, spring stiffness, and damping used to animate the plug and to draw the resonance-response curve.

🔬 What it shows

A cross-section of the bottle with the oscillating air plug animated inside the neck using a numerically integrated mass-spring-damper model, alongside a live amplitude-vs-frequency sweep curve computed from the same physical parameters, showing exactly how sharp or broad the resonance peak is.

🎮 How to use

Set neck area A, neck length L, and cavity volume V to change the resonance frequency instantly; use the Blow strength slider to change how vigorously the plug is driven (louder, not higher-pitched). P pauses, R resets.

💡 Did you know?

The same physics that lets you tune a bottle's pitch by pouring water into it (shrinking V, raising f) is used deliberately by car engineers, who size resonator chambers in the exhaust system to cancel out one specific unwanted drone frequency from the engine.

Frequently asked questions

How exactly does the simulation compute the frequency shown in the readout?

helmholtzFreq() first calls effectiveLength(A, L) to get L_eff = L + 1.6·√(A/π), then returns (c/2π)·√(A/(V·L_eff)) using the same A and V you set on the sliders — the readout is never a separate guess, it's the literal value plugged straight into the oscillator that drives the animation.

What are the mass and spring constant used inside the oscillator, and where do they come from?

airMass() returns m = ρ·A·L_eff and springConstant() returns k = ρ·c²·A²/V, both derived directly from the neck and cavity geometry — plugging them back into ω₀ = √(k/m) reproduces exactly the same helmholtzFreq() value, which is how the code guarantees the animated oscillation and the displayed frequency always agree.

Why does the air plug's displacement build up gradually instead of snapping straight to full amplitude?

stepPhysics() integrates v += acc·dt then x += v·dt every substep, where acc includes a −2·zeta·omega0·v damping term; because the drive is applied continuously at the resonant frequency, the amplitude grows only gradually toward its steady-state value, the same way a real bottle takes a few oscillation cycles to "spin up" to full loudness after you start blowing.

What does the fixed zeta value actually control, and why is Q always shown as 1/(2·zeta)?

zeta is the damping ratio used both in stepPhysics() to slow the animated oscillation and in sweepAmplitude() to shape the analytic resonance curve, so the Q factor readout (Q = 1/(2·zeta)) is not a separate cosmetic number — raising zeta in the code would simultaneously widen the plotted peak and make the animated plug settle to steady oscillation faster with a smaller final amplitude.

How is the resonance-response curve at the bottom of the canvas actually generated?

sweepAmplitude(freq) evaluates the closed-form driven-oscillator formula X(ω) = F₀/√((ω₀²−ω²)² + (2·zeta·ω₀·ω)²) at many frequency samples around the current f0, so that curve is not decorative — it is the same equation whose one true operating point, at ω = ω₀, is what stepPhysics() is animating live in the bottle diagram above it.