🔊 Acoustic Lens
Interactive 2D acoustic wave simulation: watch a lens-shaped region of different sound speed refract and focus wavefronts, with ray overlay and focal-point readout.
About Acoustic Lenses
An acoustic lens focuses or defocuses sound waves by exploiting the fact that sound travels at different speeds in different materials — just as optical lenses refract light at glass–air interfaces. A converging acoustic lens is shaped so that waves passing through its centre traverse the slower medium for the longest distance, retarding those central wavefronts relative to the edges and causing the wavefront to curve inwards towards a focal point. Applications span medical ultrasound (focusing intensity on a kidney stone for lithotripsy), sonar arrays, industrial non-destructive testing, and the emerging field of acoustic tweezers for cell manipulation.
This simulation integrates the 2D scalar wave equation on a 240 × 144 finite-difference grid using a leapfrog (Verlet) scheme with first-order Mur absorbing boundary conditions to prevent reflections from the edges. You can switch between convex, concave, Fresnel (zone plate), and GRIN (gradient-index) lens designs; set the speed ratio c_lens/c₀ for slower or faster lens materials; adjust the source frequency and position; and overlay geometric ray-tracing lines to verify Snell's law at the lens interface.
Frequently Asked Questions
How does an acoustic lens focus sound?
An acoustic lens works by the same principle as an optical lens: Snell's law. When a sound wave crosses an interface between two media at angle θ₁, it refracts to angle θ₂ according to sin θ₁ / c₁ = sin θ₂ / c₂, where c₁ and c₂ are the sound speeds in each medium. A convex lens made of a slower material (c_lens < c₀) bends rays inwards — rays hitting the curved surface obliquely are refracted towards the axis. By the thin-lens formula 1/f = (n – 1)(1/R₁ – 1/R₂), a convex slower-material lens has a positive focal length and converges waves.
What is the speed ratio n = c₀/c_lens?
The refractive index n in acoustics is defined as the ratio of the reference (background) sound speed c₀ to the lens sound speed c_lens: n = c₀/c_lens. A material with n > 1 (c_lens < c₀) is acoustically denser and slows waves down inside the lens, causing convergence for a convex shape — analogous to glass (n ≈ 1.5) in optics. A material with n < 1 (c_lens > c₀) is acoustically less dense and causes divergence for a convex shape, just as a convex air bubble in water acts as a diverging acoustic lens.
What are Mur absorbing boundary conditions?
When simulating waves in a finite computational domain, waves reaching the edges reflect back and contaminate the solution. Mur boundary conditions (1981) approximate the one-way wave equation at each boundary face, absorbing outgoing waves with very low reflection. For the simple first-order Mur condition, the reflection coefficient for a normally incident wave is theoretically zero; at oblique incidence a small reflection remains. More advanced perfectly matched layers (PML) reduce reflections to near-zero for all angles but are more expensive to compute.
What is a Fresnel zone plate for sound?
A Fresnel zone plate is a flat structure with concentric annular rings alternately transparent and opaque (or phase-reversing). Waves passing through the open rings arrive at the focal point with the same phase and interfere constructively. The radius of the m-th ring is r_m = √(mλf), where λ is the wavelength and f is the focal length. Zone plates can focus sound without curved geometry — useful when manufacturing a curved lens is impractical — but they are inefficient because they block (or absorb) half the incident wave. They are used in acoustic imaging, lithotripsy, and ultrasonic manipulation.
What is a GRIN (gradient-index) acoustic lens?
A GRIN lens has a continuously varying sound speed across its cross-section — fastest at the edges, slowest at the centre (for convergence) — rather than relying on interface refraction. Rays bend gradually rather than abruptly, eliminating interface reflections and allowing very wide aperture. GRIN acoustic lenses can be realised using structured metamaterials — periodic arrays of sub-wavelength inclusions (rods, plates) — where the effective sound speed is controlled by the fill fraction. Phononic crystal GRIN lenses have been demonstrated for ultrasonic imaging at frequencies from kHz to MHz.
How is the focal length calculated for this simulation?
For a plano-convex lens of radius of curvature R and refractive index n, the thin-lens formula gives f = R/(n – 1). The simulation estimates the focal length from the lens geometry and displays both the theoretical and observed focal distance. The observed focal length is measured by finding the position of peak pressure amplitude on the axis after the lens, which may differ from the theoretical value due to diffraction effects, finite aperture, and the fact that the thin-lens approximation breaks down when the lens diameter is comparable to f.
What is the "focal gain" and how large can it be?
Focal gain is the ratio of acoustic pressure amplitude at the focal point to the incident pressure amplitude. For a circular lens of diameter D and focal length f operating at wavelength λ, the diffraction-limited gain is approximately G ≈ (πD²)/(4λf) — the "f-number" ratio determines the limit. In medical high-intensity focused ultrasound (HIFU), focused transducers achieve gains of 100–1,000, concentrating enough energy to ablate tumour tissue at the focal point while leaving surrounding tissue unharmed.
Why does changing the source frequency affect the focus?
The wavelength λ = c₀/f changes with frequency, affecting diffraction. At higher frequencies the wavelength is shorter relative to the lens aperture, so geometric (ray) optics becomes a better approximation and the focal spot is sharper. At lower frequencies, diffraction spreads the beam more significantly and the focal spot broadens. Very low frequencies may not produce a visible focus at all if the wavelength exceeds the lens diameter. This frequency-dependence (chromatic aberration in acoustics) is important in wideband pulse imaging systems.
How does a concave lens differ from a convex lens here?
A concave lens (thinner at the centre than the edges) made of slower material causes the central wavefronts to travel through less slow medium than edge wavefronts, so the centre arrives ahead and the wavefront bows outwards — a diverging effect. Rays appear to originate from a virtual focal point on the source side of the lens. Concave acoustic lenses are used to spread sound over a wide area (e.g. in underwater sonar to achieve broad-beam coverage) or to collimate diverging waves from a point source into a planar wavefront.
What are phononic crystals and how do they relate to acoustic lenses?
A phononic crystal is a periodic arrangement of two (or more) materials with contrasting acoustic impedances, typically with periodicity on the order of the acoustic wavelength. Like photonic crystals for light, phononic crystals can create band gaps (frequency ranges that cannot propagate), produce negative effective density or bulk modulus, and achieve refractive indices not found in natural materials — including n < 0. Negative-index phononic crystals can act as "acoustic superlenses" that overcome the diffraction limit, allowing sub-wavelength imaging, an active area of research.
What real-world applications use focused acoustic beams?
Medical HIFU (High-Intensity Focused Ultrasound) uses focused transducer arrays to ablate prostate, uterine fibroid, and brain tumour tissue without incisions, with FDA approvals since 2004. Lithotripsy shatters kidney stones using focused shockwaves. Acoustic tweezers use focused standing waves to trap and sort cells, bacteria, and micro-particles by size in lab-on-chip devices. Sonar arrays use phased-array beam-forming (electronic equivalent of a lens) for underwater mapping. Industrial ultrasonic testing focuses beams on welds and castings to detect internal cracks at sub-millimetre resolution.
Solve the 2D wave PDE on a grid where the lens region has a different sound speed. Watch wavefronts bend and focus exactly where Snell's-law rays predict — the basis of ultrasound imaging.
3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install