Electromagnetic waves
Overview
The electrostatic and magnetostatic chapters solved for scalar potentials — the electric potential $\varphi$ and the magnetic scalar potential $\psi$ — one value per node. Full-wave electromagnetics needs a vector field, because Maxwell's equations relate the curl of one field to another. This chapter covers the vector-field solvers: the electric field $E$ and the magnetic vector potential $A$.
The extra machinery is the Nédélec edge element — a finite element whose degrees of freedom live on mesh edges (their tangential component), the natural home for fields whose curl matters. The same solve(Physics(), …) marker pattern still applies; only the field type changes.
Cavity modes
A perfectly-conducting (PEC) enclosure traps electromagnetic standing waves. Their frequencies are the eigenvalues of the curl–curl problem
\[\nabla \times \nabla \times E = \omega^2 E ,\]
the vector analogue of the acoustic cavity problem. Each $\omega$ is a resonant frequency and each $E$ a cavity mode.
Rasmah.ElectromagneticWave — Type
ElectromagneticWave <: AbstractPhysicsPhysics driver for full-wave vector Maxwell resonance: solves the curl–curl eigenproblem for the cavity modes of a PEC enclosure.
A worked example: a resonant cavity
m = tetrahedralize_box(1.0, 1.0, 1.0, 4, 4, 4)
mat = Material(youngs_modulus=200e9, poisson_ratio=0.3,
relative_permittivity=1.0, relative_permeability=1.0)
ω, modes = solve(ElectromagneticWave(), m, mat; nev=3)
round.(ω; digits=4)3-element Vector{Float64}:
4.3545
4.4658
4.4658The first three resonant frequencies of a unit PEC cavity are $4.35$, $4.47$, and $4.47$ (the last two are the two degenerate transverse modes).
Magnetostatics with the vector potential
In three dimensions it is convenient to solve magnetostatics for the magnetic vector potential $A$, with $B = \nabla \times A$. Ampère's law becomes the vector Poisson problem
\[\nabla \times (\nu\, \nabla \times A) = J ,\]
where $\nu = 1/\mu$ is the magnetic reluctivity and $J$ the current density. The result is the potential $A$ on the edge elements and the reconstructed flux density $B$.
Rasmah.MagnetostaticsVectorPotential — Type
MagnetostaticsVectorPotentialPhysics type for magnetostatics in the magnetic vector potential (A-formulation). Solving it returns the vector potential A and flux density B = ∇ × A.
r = solve(MagnetostaticsVectorPotential(), m, mat)
keys(r)(:A, :B)Time-domain Maxwell
To follow how a field evolves — a pulse bouncing around a cavity — Maxwell's equations are marched in time with the finite-element time-domain (FETD) method and the Newmark scheme:
Rasmah.TransientMaxwell — Type
TransientMaxwell <: AbstractPhysicsTime-domain (transient) full-wave Maxwell — the finite-element time-domain (FETD) solver for the electric field, marched with the Newmark scheme.
r = solve(TransientMaxwell(), m, mat; nsteps=20, dt=1e-3)
length(r.times)21Magneto-elastic and thermo-electro-mechanical coupling
Two markers couple the electromagnetic field to the solid. Magnetostriction couples the displacement $u$ to the magnetic scalar potential $\psi$ (a magnetized material strains); pyroelectricity couples displacement, potential, and temperature together — the full $u$–$\varphi$–$T$ block:
Rasmah.Magnetostriction — Type
Magnetostriction <: AbstractPhysicsMagneto-elastic (magnetostrictive) coupling. The linearized constitutive law ε = S σ + d_m H, B = d_mᵀ σ + μ H couples the displacement u to the magnetic scalar potential ψ (field H = −∇ψ).
r = solve(Magnetostriction(), m, mat)
keys(r)(:u, :ψ)Rasmah.Pyroelectricity — Type
PyroelectricityPyroelectric (thermo-electro-mechanical) coupling physics: solves the coupled block system for displacement u, potential φ, and temperature T with the constitutive law σ = C ε − eᵀ E − β ΔT, D = e ε + ϵ E + p ΔT. See solve.
r = solve(Pyroelectricity(), m, pzt)
keys(r)(:u, :φ, :T)Next steps
The edge elements and the curl–curl operators assemble onto the same sparse linear algebra as every other physics — Sparse linear algebra — and the electromagnetic resonance, like the structural one, is an eigenproblem, covered alongside its siblings in Eigenproblems.
