Acoustic Cloak Topology Optimization
Overview
An acoustic (or electromagnetic) cloak makes an object invisible: the scattered field is cancelled so the wave passes through as if the object weren’t there. AcousticCloakTopOpt minimizes ‖E − E_inc‖² — the residual between the total field E (driven by a source through the dielectric) and the target incident field E_inc — by distributing the high-index material.
using RasmahCloak an object against a plane wave
Set the incident plane wave as the target, drive the source, and let the optimizer shape the dielectric to reproduce the incident field (invisibility).
m = tetrahedralize_box(1.0, 1.0, 1.0, 3, 3, 3)
n = size(m.nodes, 2)
mat = Material(youngs_modulus = 1e9, poisson_ratio = 0.3, density = 1.0, refractive_index = 2.0)
k = 2.0 / sound_speed(mat)
incident = [cos(k * m.nodes[1, i]) for i in 1:n] # incident plane wave along x
x, hist = solve(AcousticCloakTopOpt(), m, mat;
incident = incident, ω = 2.0, volfrac = 0.5, max_iter = 20)([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0 … 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001], [13609.167981014622, 13609.167496865732, 13609.166657897034, 13609.165222333375, 13609.16253800486, 13609.157103450485, 13609.145042963404, 13609.115303475064, 13609.032611451577, 13608.769232145203, 13607.792343798666, 13603.501081834696, 13580.817072110192, 13435.351072311221, 12372.638151118763, 9037.220447625767, 5413.102249751554, 4609.771142498997, 4734.896937283347, 4762.0519305779335])
Verification — the residual shrinks
The objective (scattered-field residual) must decrease, and the density stay in [0,1]:
println("residual: ", round(hist[1]; digits = 2), " → ", round(hist[end]; digits = 2))
println("residual decreases: ", hist[end] < hist[1])
println("density in [0,1]: ", all(0 .<= x .<= 1))residual: 13609.17 → 4762.05
residual decreases: true
density in [0,1]: true
vtk(m; field = x, fieldname = "cloak density", edges = true)Next steps
- Radiation topology optimization — the antenna counterpart.
- Electromagnetic wave eigenmodes — the field model underneath.
