ENGINEERING NOTE

Two-Sided Energy Bounds in Electrostatics

Why a single finite-element capacitance solve always overestimates stored energy, how local Raviart–Thomas equilibration brackets the true value from below, and where singular metal edges draw the boundary.

Published 2026-11-22 5 min read 1081 words All Engineering Notes

Compute the capacitance matrix of a planar superconducting circuit with standard finite elements and you immediately run into an awkward epistemological gap: the number looks plausible, the matrix is symmetric and positive definite, and yet you have no idea how far away the true continuum value still sits.

Because a standard electrostatic solver searches over conforming scalar potentials $V_h \in H^1(\Omega)$ that satisfy the terminal voltages exactly, Thomson’s minimum-energy theorem pushes the computed energy strictly above the exact electrostatic energy. Every self-capacitance entry on the diagonal is an overestimate. Refining the mesh lowers the numbers towards the truth, but unless you build a second, qualitatively different solver, you never know whether your last refinement brought you within 1% or left you 10% high.1.In multi-conductor layouts, cross-capacitance entries need a Loewner matrix bound rather than just a scalar interval, because cancellation between large electrode capacitances can amplify small field errors.

To close that gap inside every run, femcore::rt pairs each primal Lagrange solve with an equilibrated $H(\mathrm{div}; \Omega)$ flux field $\tilde{\mathbf{D}}^{(j)} \in \mathrm{RT}_{p-1}$, sandwiching the true Maxwell capacitance matrix from both sides:

$$ C^{\mathrm{low}} \preceq C^{\mathrm{exact}} \preceq C^{\mathrm{up}} $$

Solving Local Half-Stars Around Metal Sheets

A complementary energy principle works in the opposite direction from Thomson’s theorem: any divergence-free vector field $\tilde{\mathbf{D}}^{(j)}$ matching the exterior far-field boundary law $\tilde{\mathbf{D}}^{(j)} \cdot \mathbf{n} = \alpha V_h^{(j)}$ gives a lower bound on electrostatic energy. Rather than assembling a second saddle-point problem across the whole mesh, equilibrate_electro_flux_bounds visits each vertex patch one by one and solves a tiny local problem following the Braess–Schöberl construction.

Zero-thickness metallic sheets complicate that story slightly. Along a coplanar trace or ground plane, tangential potential derivatives stay continuous across the sheet only along its plane, while the normal displacement field $\mathbf{D} \cdot \mathbf{n}$ jumps sharply between top and bottom faces. Trying to enforce normal flux continuity across a metal conductor would destroy the bound. Whenever a mesh vertex lands on an interior conductive sheet, the equilibration code splits its neighbourhood into separate half-stars and solves each side independently. Normal flux jumps remain exact while the bulk divergence stays cleanly near machine zero.

Turning Two Energies Into an Entrywise Bracket

Once each terminal $j$ has both a primal potential $V_h^{(j)}$ and an equilibrated flux $\tilde{\mathbf{D}}^{(j)}$, two small $M \times M$ conductor matrices carry all the global error information:

$$ W^{\mathrm{flux}}_{ij} = \int_\Omega \tilde{\mathbf{D}}^{(i)} \cdot \varepsilon^{-1} \tilde{\mathbf{D}}^{(j)}, d\Omega + \int_{\Gamma_\infty} \alpha^{-1} \left(\tilde{\mathbf{D}}^{(i)} \cdot \mathbf{n}\right)\left(\tilde{\mathbf{D}}^{(j)} \cdot \mathbf{n}\right) dS $$

$$ Q_{ij} = -\int_\Omega \nabla V_h^{(i)} \cdot \tilde{\mathbf{D}}^{(j)}, d\Omega + \int_{\Gamma_\infty} V_h^{(i)} \left(\tilde{\mathbf{D}}^{(j)} \cdot \mathbf{n}\right) dS $$

From Cauchy–Schwarz on the pairing $Q$, $C^{\mathrm{low}} = Q (W^{\mathrm{flux}})^+ Q^T$ defines the rigorous lower matrix bound. Reporting the midpoint $C^{\mathrm{mid}} = \frac{1}{2}(C^{\mathrm{up}} + C^{\mathrm{low}})$ yields an explicit worst-case bound on every matrix entry:

$$ \left| C^{\mathrm{mid}}_{ij} - C^{\mathrm{exact}}_{ij} \right| \le \frac{1}{2}\sqrt{\left(C^{\mathrm{up}}_{ii} - C^{\mathrm{low}}_{ii}\right)\left(C^{\mathrm{up}}_{jj} - C^{\mathrm{low}}_{jj}\right)} $$

Just as importantly, the triangle-by-triangle Prager–Synge mismatch $\left| \varepsilon^{-1/2}(\tilde{\mathbf{D}} - \mathbf{D}_h) \right|_{L^2(T)}^2$ tells adaptive mesh refinement exactly where energy accuracy is being lost—almost always at sharp trace corners and tight coupler gaps.2.Because this interval measures numerical discretisation spread rather than random laboratory noise, validation checks keep its half-width separate from aleatoric uncertainties like thickness variation.

Why Quarter-Point Singular Cells Live in a Separate Lane

At the knife-edge of a zero-thickness trace, the real electric field blows up like $r^{-1/2}$. One classic way to capture that singularity on a coarse mesh is Barsoum quarter-point grading: sliding quadratic mid-edge nodes towards the conductor rim so the element Jacobian itself embeds the $r^{-1/2}$ decay without flooding the mesh with tiny triangles.

The catch is subtle: at that collapsed corner, $\det J$ goes to zero. Evaluating the contravariant Piola transform divides by $|\det J|$, which blows up on the very elements introduced to capture the corner field. Rather than letting both features silently corrupt each other, the engine isolates them cleanly—quarter-point meshes stay out of dual equilibration and integrate safely through interior collapsed quadrature instead.

What Happened Against Ansys Q3D

Tested across the SQuADDS cQED benchmark suite, both approaches pulled their weight in complementary regimes:

  • Goal-oriented amr_ps with flux_bounds bracketed 68 of 69 Ansys Q3D capacitance matrix entries (100% across interdigital capacitors NCap, CapNInterdigitalTee, and GenIDC).
  • Quarter-point P2 meshes with spherical-harmonic far-field boundaries matched Q3D to 1.11% unweighted median self-capacitance error (1.04% Horvitz–Thompson weighted, 1.369 fF MAE) across all 60 S1.1–S1.3 devices, with bitwise-identical (0.000e+00) results between 1 and 8 threads.
SOLVER STDOUT
$ cargo test --release -p nyx-engine --test validation_cqed_cross_code
coax_cylinder_electrostatic (a=10 um, b=30 um, L=100 um, eps_r=11.7):
  exact C_coax = 5.924750e-14 F
  Prager-Synge [C_low, C_up] brackets exact value with deterministic delta_ep
  dfs::electro NYX_THREADS=1 vs NYX_THREADS=8 max rel drift: 0.000e+00 (bitwise exact)

The main boundary we ran into was narrow-gap volumetric locking on dense 200–300 nm GDS fillet chords inside 2–3 µm gaps (S1.4 GenIDC): standard Ruppert refinement hits its Steiner ceiling near short arc chords, inflating volumetric FEM error. Switching layered chips onto the 3-layer Green-function solver planar_bem removes the airbox mesh altogether and solves S1.4 76× faster (1.03 s median) at 4.04% self-capacitance median error.