RasmahRasmah

Vector Maxwell PML Topology Optimization

Overview

Truncating an open scattering problem needs an absorbing boundary. A perfectly matched layer (PML) is a graded lossy shell that absorbs outgoing waves without reflecting them. VectorMaxwellPMLTopOpt maximizes the power transmitted to a port on the Nédélec edge space, with a PML of thickness pml_thickness and conductivity pml_σmax around the design domain.

using Rasmah

Maximize transmitted power through a PML

Same source/port setup as the scattering driver, but wrapped in an absorbing layer:

m = tetrahedralize_box(1.0, 1.0, 1.0, 3, 3, 3)
mat = Material(youngs_modulus = 1e9, poisson_ratio = 0.3, density = 1.0, refractive_index = 2.0)

nf = NedelecFESpace(m)
source = interpolate_nedelec(nf, x -> [0.0, 0.0, sin(π * x[1]) * sin(π * x[2])])
port   = interpolate_nedelec(nf, x -> [0.0, 0.0, sin(π * x[1])])
ω = π * sound_speed(mat)

x, hist = solve(VectorMaxwellPMLTopOpt(), m, mat;
                source = source, port = port, ω = ω,
                pml_thickness = 0.25, pml_σmax = 5.0, volfrac = 0.5, max_iter = 20)
([0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 1.0, 1.0, 0.001, 0.001  …  1.0, 1.0, 1.0, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001], [-8.136541390835005, -17.220165543135625, -22.12207704361479, -22.633295815777316, -22.665277388534687, -22.672942168683843, -22.676512632115728, -22.68332165168841, -22.69116577099616])

Verification — the transmission grows

println("objective: ", round(hist[1]; digits = 2), " → ", round(hist[end]; digits = 2))
println("transmission grows: ", hist[end] < hist[1])
println("density in [0,1]:   ", all(0 .<= x .<= 1))
objective: -8.14 → -22.69
transmission grows: true
density in [0,1]:   true
vtk(m; field = x, fieldname = "dielectric density", edges = true)

Next steps