RasmahRasmah

Electromagnetic Wave Eigenmodes

Overview

A metallic cavity supports resonant electromagnetic modes — the basis of filters, accelerators and microwave devices. The electric field satisfies the curl–curl eigenproblem

\[\nabla\times(\nabla\times E) = \frac{\omega^2}{c^2}\,\varepsilon_r \mu_r\, E\]

on the Nédélec (curl-conforming) edge space, which keeps ∇·E = 0 exactly and avoids the spurious modes of a nodal discretisation. For a PEC cube of side L the resonant frequencies are the closed form f = c/(2L) √(m²+n²+p²) (Monk; Jin 2002).

using Rasmah

Resonant modes of a PEC cube

Solve for the first few cavity modes of a unit cube with ε_r = μ_r = 1 (so c = 1). The lowest mode is (1,1,0) at ω = π√2.

m = tetrahedralize_box(1.0, 1.0, 1.0, 4, 4, 4)
mat = Material(youngs_modulus = 1e3, poisson_ratio = 0.3, relative_permittivity = 1.0, relative_permeability = 1.0)

ω, modes = solve(ElectromagneticWave(), m, mat; nev = 6)
println("lowest ω = ", round(ω[1]; digits = 4), "  (analytic π√2 = ", round(π * sqrt(2); digits = 4), ")")
for k in 1:6
    println("  mode ", k, ": ω = ", round(ω[k]; digits = 3))
end
lowest ω = 4.3545  (analytic π√2 = 4.4429)
  mode 1: ω = 4.355
  mode 2: ω = 4.466
  mode 3: ω = 4.466
  mode 4: ω = 5.498
  mode 5: ω = 5.498
  mode 6: ω = 6.698

Verification — the analytic cavity formula

The lowest resonance of a PEC unit cube (with c = 1) is the (1,1,0) mode at ω = π√2. On a coarse mesh the discrete frequency approaches it from below:

println("lowest ω    = ", round(ω[1]; digits = 4))
println("analytic π√2 = ", round(π * sqrt(2); digits = 4))
println("relative error = ", round(100 * (π * sqrt(2) - ω[1]) / (π * sqrt(2)); digits = 1), " %")
lowest ω    = 4.3545
analytic π√2 = 4.4429
relative error = 2.0 %

Next steps