/ concept-collection / acoustic-scattering-2d
Sign in
concept-collection / acoustic-scattering-2d
acoustic-scattering-2d / scenes / lens.m
18 lines · 859 BBlameHistoryRaw
1% A gradient-index lens: no interface at all, just a region where sound
2% travels more slowly.
3%
4% The speed dips smoothly to c0*(1 - dn) at the centre of a Gaussian of width
5% `w` metres, so a plane wave crossing it is retarded most in the middle and
6% the wavefront curves. The focus lands a little way past the lens and is
7% much brighter than anything else on the grid, which is worth remembering
8% when reading the colour scale.
9%
10% This is the case where a sharp-interface scatterer has nothing to say: there
11% is no reflection to speak of, only refraction, and the field is smooth
12% everywhere. It is also the easiest scene for the solver, since nothing on
13% the grid is under-resolved.
14function [c, sig] = medium(x, y, L, h, c0, dn, w, x0)
15 r2 = ((x - x0).^2 + y.^2) / (w*w);
16 c = c0 * (1 - dn * exp(-r2));
17 sig = sponge(x, y, L, 0.2*L, 1700);
18end
moveopenescclose