Radiation-Pattern Topology Optimization
Overview
An antenna’s radiation pattern describes how much power it beams in each direction. RadiationPatternTopOpt maximizes the far-field power |r̂ × F(r̂)|² radiated toward a chosen direction, solving the full vector curl–curl Maxwell equation on Nédélec edge elements with a Silver–Müller absorbing boundary.
using RasmahBeam power toward +x
Interpolate a source field onto the edge degrees of freedom, pick a target direction, and let the optimizer shape the dielectric into a directive radiator.
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])])
target_dir = [1.0, 0.0, 0.0]
ω = π * sound_speed(mat) # k = π
x, hist = solve(RadiationPatternTopOpt(), m, mat;
source = source, target_dir = target_dir, ω = ω, volfrac = 0.5, max_iter = 20)([0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001 … 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001], [18.196524402715927, 7.715119228570808, 6.303289113648305, 6.221137092165762])
Verification — the directed power grows
The objective is the negative radiated power toward the target direction:
println("objective: ", round(hist[1]; digits = 3), " → ", round(hist[end]; digits = 3))
println("directed power grows: ", hist[end] < hist[1])
println("density in [0,1]: ", all(0 .<= x .<= 1))objective: 18.197 → 6.221
directed power grows: true
density in [0,1]: true
vtk(m; field = x, fieldname = "dielectric density", edges = true)Next steps
- Radiation topology optimization — the scalar counterpart.
- Electromagnetic wave eigenmodes — the resonance underneath.
