Electromagnetic Field Simulation of Cavity Resonators
Theory: standing waves in a metal box
Overview
Microwave filters and particle accelerators use cavity resonators. Why does a plain metal box resonate?
Metal walls reflect waves almost perfectly, so waves bounce back and forth and only those satisfying zero tangential electric field at the walls survive. Like a vibrating string, it resonates strongly only at discrete frequencies (modes) set by the dimensions. Because wall losses are tiny, Q values of thousands to tens of thousands are possible — far sharper than coil-and-capacitor circuits.
Resonant frequencies of a rectangular cavity
$a$, $b$ and $d$ are the internal dimensions and $m$, $n$, $p$ the numbers of half-wavelengths in each direction. TE and TM modes allow different index combinations; with $b < a < d$ the lowest mode is TE101.
Q factor
$Q_c$ is from conductor loss in the walls, $Q_d$ from any dielectric filling ($\tan\delta$ is the loss tangent), and $Q_{ext}$ from coupling to external circuits; the smallest dominates the total. $R_s$ is the surface resistance, representing loss from current flowing within the skin depth.
The cavity behind radar and the microwave oven
In 1940 Randall and Boot in Britain built the cavity magnetron — a copper block bored with a ring of cavities — producing microwaves of unprecedented power and transforming wartime radar. The well-known story goes that after the war an engineer working with magnetrons noticed a chocolate bar melting in his pocket, which led to the microwave oven. The oven's cooking chamber is itself a large cavity resonator, and uneven heating of food can be explained by its standing-wave modes.
Worked example: a closed WR-90 cavity
Mode ordering
Close both ends of WR-90 waveguide (internal 22.86 × 10.16 mm) to form a cavity of length $d = 30$ mm; the lowest modes (air-filled) are:
| Mode | Resonant frequency |
|---|---|
| TE101 | 8.24 GHz |
| TE102 | 11.95 GHz |
| TE201 | 14.03 GHz |
| TE011 | 15.58 GHz |
| TM110 | 16.15 GHz |
Filling with PTFE (permittivity 2.1) scales every mode by $1/\sqrt{2.1}$, lowering TE101 to about 5.69 GHz — which is why dielectric filling is used to shrink cavities.
Q from copper walls
With copper walls (conductivity $5.8\times10^{7}$ S/m), the TE101 surface resistance is about 0.024 Ω and the wall-loss Q about 7,700. The resonance bandwidth $f/Q$ is only about 1.1 MHz at 8 GHz.
With a 1 MHz bandwidth, a tiny dimensional error must throw the frequency off.
Exactly. Changing $d$ by just 10 µm shifts TE101 by about 1 MHz — about the bandwidth. That's why real filters have tuning screws to trim frequency after assembly. Thermal expansion of the metal also moves the frequency, so precision applications use low-expansion materials or temperature-compensating designs.
Mesh convergence of the eigenvalue solution
TE10p modes have a field uniform along $b$, so they can be solved as a 2D finite-difference eigenvalue problem on the $a \times d$ rectangle. TE101 results for different divisions $n_x$ along $a$:
| Divisions | TE101 frequency | Error |
|---|---|---|
| 4 | 8.062 GHz | −2.21 % |
| 8 | 8.198 GHz | −0.56 % |
| 16 | 8.233 GHz | −0.14 % |
| 32 | 8.241 GHz | −0.034 % |
| 64 | 8.243 GHz | −0.008 % |
Each doubling cuts the error to about a quarter — second-order convergence. For a resonator with Q in the thousands, even 0.1% frequency error is several bandwidths, so resonator analysis needs much tighter convergence checks than typical structural work.
Analysis with FEM
Setup
- Use edge elements: nodal representations of E admit spurious solutions with non-zero divergence. Nédélec (edge) elements are standard for electromagnetic eigenproblems.
- Including loss: either solve with perfectly conducting walls and compute Q afterwards from surface resistance, or apply an impedance boundary to the walls and read Q directly from complex eigenvalues.
- Set a search target: give the eigensolver a frequency to search near. Degenerate or closely spaced modes are easy to confuse, so confirm each mode from its field plot.
- Coupling apertures and probes: including external coupling lowers the resonant frequency slightly and reduces Q. For filters, confirm S-parameters with a frequency-domain analysis including the coupling.
“Simulated Q is twice the measured” is common
It is not unusual for simulated Q to be nearly twice the measured value. Common causes are surface roughness (at high frequency the skin depth is shallow and roughness lengthens the current path), plating with lower conductivity than pure copper, and poor current flow across seams. Analyses often correct with an effective conductivity lowered to match measurement. Recording how much it was lowered sharpens estimates for the next design.
Common mistakes
Mistakes and fixes
| Mistake | Effect | Fix |
|---|---|---|
| Nodal elements for the eigenproblem | Spurious modes appear | Use edge elements |
| Judging frequency on a coarse mesh | Off by several bandwidths | Check convergence and extrapolate |
| Using pure-copper conductivity for Q | Q overestimated | Correct with an effective conductivity |
| Identifying modes by index only | Degenerate modes confused | Confirm with field plots |
| Ignoring thermal dimension changes | Frequency drifts in service | Assess sensitivity including thermal expansion |
I'd like to change dimensions and watch the modes change.
Use the waveguide modes simulator for dimensions versus modes, the skin depth calculator for skin depth, and the microwave filter simulator for resonator-based filters. The theory continues in the articles on waveguide modes, dielectric resonators and high-frequency FEM.
Related Topics
Experience the theory firsthand with the interactive simulator for this field
All Simulators