Palace Electromagnetic Field Analysis
Theory: what Palace solves
Overview
How does Palace differ from commercial EM solvers such as HFSS?
The problem types are similar, but the purpose differs. AWS built Palace for its quantum computing work and released it as open source in 2023. Superconducting qubit circuits put lines tens of µm wide on chips a few mm across, and losses in very thin dielectric layers must be evaluated. To solve such multiscale problems accurately, Palace is built on the MFEM finite element library and assumes high-order Nédélec elements and large parallel runs on supercomputers or the cloud. It offers five analyses: eigenmodes (resonant frequency and Q), frequency response (S-parameters), time domain, electrostatics (capacitance matrices) and magnetostatics (inductance matrices). Settings go in a JSON input file; there is no GUI, so meshes are made separately, for example in Gmsh.
Eigenmode equation and analytical solution
E is the electric field, μ_r and ε_r relative permeability and permittivity, k₀ the free-space wavenumber. A rectangular cavity (width a, height b, length d) resonates at the frequencies on the right; TE modes need m or n nonzero and p ≥ 1, TM modes need m, n ≥ 1.
Q from wall loss
Conductor Q of the TE101 mode (k wavenumber, η free-space wave impedance, R_s surface resistance, σ wall conductivity).
A solver made for quantum computers
A superconducting qubit is a circuit of Josephson junctions, capacitors and resonators whose frequency, coupling strength and energy loss rate are set by the electromagnetic field distribution. Fabricating and measuring at cryogenic temperature for every design change is slow, so accurate EM simulation is essential. AWS developed Palace for this purpose and released it under the Apache 2.0 licence; one advantage cited is running hundreds of cases at once on many cloud CPUs, unconstrained by commercial licence counts.
Worked examples
Example 1: rectangular cavity resonances (22.86 × 10.16 × 30 mm, air)
| Order | Mode | Resonant frequency |
|---|---|---|
| 1 | TE101 | 8.244 GHz |
| 2 | TE102 | 11.952 GHz |
| 3 | TE201 | 14.034 GHz |
| 4 | TE011 | 15.577 GHz |
| 5 | TM110 | 16.145 GHz |
| 6 | TE103 | 16.361 GHz |
| 7 | TE202 | 16.488 GHz |
| 8–9 | TE111 and TM111 (degenerate) | 16.901 GHz |
The 22.86 mm × 10.16 mm section is that of WR-90 waveguide. Compute about ten eigenmodes in Palace and check that frequencies match theory within 0.1% and do not change as element order or mesh density increases.
Near 16.9 GHz theory gives TE111, but Palace returned two almost equal frequencies. Which is right?
Both are right. In a rectangular cavity TE111 and TM111 share exactly the same frequency, 16.901 GHz (degeneracy). Slight mesh asymmetry makes the computed values differ marginally, so comparing only one with theory can make it look like an extra mode. Eigenvectors of degenerate modes may come out as arbitrary combinations of the two, so match them by field orientation (TE has zero electric field along the propagation axis, TM zero magnetic field). When setting how many modes the eigensolver should find, degeneracy can put a boundary mode in or out, so ask for a few more than you need.
Example 2: wall material and Q (TE101, 8.244 GHz)
| Wall material | Conductivity | Conductor Q |
|---|---|---|
| Copper | 5.8×10⁷ S/m | ≈ 7,700 |
| Aluminium | 3.5×10⁷ S/m | ≈ 6,000 |
| Brass (approx.) | 1.0×10⁷ S/m | ≈ 3,200 |
Copper's surface resistance is 0.0237 Ω and skin depth 0.73 µm; Q scales with the square root of conductivity. In Palace an impedance (surface resistance) boundary on the walls captures loss without meshing the wall interior. With superconducting walls conductor loss nearly vanishes, so losses in dielectrics and thin surface layers set Q.
Getting started
- Install Palace with Spack, a container or from source, and run one bundled example.
- Mesh a rectangular cavity in Gmsh and tag boundaries and domains (attributes).
- Set up an eigenmode analysis in the JSON input and compare frequencies with theory.
- Vary element order and mesh to confirm convergence; add wall surface resistance and compare Q.
- Move to real circuit geometry and extract capacitance matrices or S-parameters.
“Raise the order rather than refine the mesh”
High-frequency EM accuracy depends on how many nodes there are per wavelength; linear elements need about 10–20 divisions per wavelength. In high-order solvers such as Palace, for the same number of unknowns, raising the order often reduces error faster than refining the mesh. Near corners and thin lines, however, the field is singularly strong and elements must be small there. Checking that results stay put when both order and mesh change is the basis of verification.
Common mistakes
Mistakes and fixes
| Mistake | Effect | Fix |
|---|---|---|
| Overlooking degenerate modes | Mistaken for a spurious mode | Match by field orientation |
| Too few modes requested | Needed modes missing | Request extra modes |
| Meshing inside the walls | Huge element count | Impedance boundary |
| Mixed-up attribute numbers | Boundary on the wrong surface | Check Gmsh physical groups |
| Unit mix-up | Frequencies off by orders of magnitude | State the length unit explicitly |
I'd like to learn related topics.
Related pages include cavity resonator simulation, high-frequency FEM, S-parameter analysis, Elmer Multiphysics and the MOOSE framework.
Related Topics
Experience the theory firsthand with the interactive simulator for this field
All Simulators