Palace Electromagnetic Field Analysis

Category: Open-Source CAE | Revised 2026-10-02
CAE visualization for palace electromagnetics theory - technical simulation diagram
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

$$ \nabla\times\left(\mu_r^{-1}\nabla\times\mathbf{E}\right) - k_0^2\,\varepsilon_r\,\mathbf{E} = 0,\qquad f_{mnp} = \frac{c}{2}\sqrt{\left(\frac{m}{a}\right)^2 + \left(\frac{n}{b}\right)^2 + \left(\frac{p}{d}\right)^2} $$

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

$$ Q_c = \frac{(k a d)^3\, b\, \eta}{2\pi^2 R_s}\,\frac{1}{2a^3 b + 2 b d^3 + a^3 d + a d^3},\qquad R_s = \sqrt{\frac{\omega \mu_0}{2\sigma}} $$

Conductor Q of the TE101 mode (k wavenumber, η free-space wave impedance, R_s surface resistance, σ wall conductivity).

Coffee Break Trivia

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)

OrderModeResonant frequency
1TE1018.244 GHz
2TE10211.952 GHz
3TE20114.034 GHz
4TE01115.577 GHz
5TM11016.145 GHz
6TE10316.361 GHz
7TE20216.488 GHz
8–9TE111 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 materialConductivityConductor Q
Copper5.8×10⁷ S/m≈ 7,700
Aluminium3.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

  1. Install Palace with Spack, a container or from source, and run one bundled example.
  2. Mesh a rectangular cavity in Gmsh and tag boundaries and domains (attributes).
  3. Set up an eigenmode analysis in the JSON input and compare frequencies with theory.
  4. Vary element order and mesh to confirm convergence; add wall surface resistance and compare Q.
  5. Move to real circuit geometry and extract capacitance matrices or S-parameters.
Coffee Break Trivia

“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

MistakeEffectFix
Overlooking degenerate modesMistaken for a spurious modeMatch by field orientation
Too few modes requestedNeeded modes missingRequest extra modes
Meshing inside the wallsHuge element countImpedance boundary
Mixed-up attribute numbersBoundary on the wrong surfaceCheck Gmsh physical groups
Unit mix-upFrequencies off by orders of magnitudeState the length unit explicitly
🙋

I'd like to learn related topics.

Related Simulators

Experience the theory firsthand with the interactive simulator for this field

All Simulators

Related fields

Structural AnalysisFluid Analysis (CFD)Thermal Analysis
Rate this article
Thank you for your feedback!
Helpful
More details
Report error
Helpful
0
More details
0
Report error
0