Date: 2026-08-24 Purpose: Explain what the ghost-penalty kernel maxwell::h_ghost() solves, how it works (with literature references), why its two parameters have their current defaults, and which deck block can override those defaults. Module: src/fem/maxwell
A stacked thin-shell conductor (REBCO tape, CORC cable) is modeled as several stacked PENTA6TS layers — superconductor, buffer, metal stabilizer — each carrying its own tangential-H (edge) field. Across the interface between two adjacent layers the tangential H should be continuous (Ampère: no surface current sheet sits between the modeled layers), but nothing in the per-layer edge spaces enforces this: the two layers have independent DOFs that only meet weakly.
Without a coupling term the interface is under-constrained. Two failure modes appear:
h_ghost() adds a weak interface coupling (an interior-penalty / Nitsche term) that enforces tangential-H continuity across the layer interface and stabilizes the discrete operator against the resistivity contrast. It is registered for DomainType::Ghost groups (cl_IWG_Maxwell.cpp, the DomainType::Ghost case) and runs on the "ghost" facets that sit between stacked thin-shell layers.
The kernel (h_ghost() in src/fem/maxwell/matrices/mt_maxwell_h.cpp) assembles a symmetric weighted interior-penalty (Nitsche) bilinear form on each ghost facet, coupling the master (+) and slave (−) layer DOFs through four blocks K++, K+-, K-+, K--. At each integration point, each block carries:
where E is the edge interpolation operator, D the per-layer normal-derivative operator scaled by layer thickness h, and ρ_harm the harmonic mean of the two layer resistivities. The adjoint-consistency terms mirror the consistency terms block by block, so the assembled operator is exactly symmetric: K-+ = (K+-)ᵀ term-for-term. The GhostElementContract test (tests/fem/test_InterfaceOrientation.cpp) measures max|K − Kᵀ| = 0.0 on real edge functions. The kernel began as the nonsymmetric variant (consistency terms only) and was deliberately symmetrized in April 2026 by adding the adjoint terms; the resulting symmetric-with-harmonic-weighting scheme is the SWIP method of Ern, Stephansen & Zunino (2009). Ruled intentional 2026-08-28: the symmetric form is the formulation of record.
The penalty coefficient is:
The plain harmonic mean 2·km·ks/(km+ks) is the standard heterogeneous-DG weighting (Burman & Zunino 2006), robust to the coefficient contrast. It is bounded above by 2·min(km, ks) (well-behaved for an insulating neighbor, ρ → ∞), but it collapses to zero when one layer is superconducting (ρ → 0). Adding the regularization offset k_reg to each stiffness before taking the mean keeps the coefficient bounded in both singular limits: k_reg → 0 recovers Burman–Zunino; both k tiny → α ~ 2·eta·k_reg (no collapse); one k huge → α ~ 2·eta·(other_k + k_reg) (no blow-up).
Literature.
Restriction. The kernel supports only first-order PENTA6TS facets: LINEAR interpolation is asserted in h_ghost in mt_maxwell_h.cpp, and block sizes come from number_of_nedelec_dofs. That gives 6 DOFs per TS element, 3 per facet. Higher order requires adapting the Dm/Ds assembly.
Both constants live in mPenalty (cl_IWG_Maxwell.cpp, constructor) and are user-settable since 2026-08-24 through the optional deck block nonlinear magnetic { nitsche ghost penalty { eta : … ; k_reg : … Ohm ; } } (see doc/input_file_reference.md §4.2.1). Since 2026-09-01 the ghost is opt-in: when the block is absent, or states eta : 0, the thin-shell factory creates neither the duplicate interface dofs nor the ghost facets, the layers share their interface edges, and nothing in this document is assembled. With eta > 0 the values below apply (eta must then be stated; k_reg keeps its default when omitted). The switch is read once for the factory, the controller and the mesh cache tag (src/fem/kernel/fn_FEM_ghost_switch.hpp):
| Symbol | Slot | Default | Role |
|---|---|---|---|
| eta | penalty(0) | 4.0 | dimensionless Nitsche stabilization multiplier |
| k_reg | penalty(1) | 1e-3 Ω | stiffness-regularization offset (SC-collapse floor) |
How the defaults were chosen. Both are deliberate engineering defaults, not values taken from a specific paper. An exhaustive search of curated ./literature, web results, and independent Grok/Codex scans found no published value or formula for either default. The method and the harmonic-mean weighting are literature-grounded; the specific multiplier and offset are calibrated to the HTS thin-shell problem class:
Both values are empirical and have no published derivation behind them. Two calibration routes remain open: a mesh-aware eta taken from the element trace-inequality constant à la Shahbazi 2005, and a physics-tied k_reg = ρ_floor / h. Neither is covered by a contrast-sweep regression test yet.
Why the defaults should normally stand. The deck keys are for calibration work and controlled experiments, not routine tuning:
If they ever need systematic recalibration (e.g. a new element order, or a mesh-aware eta), the clean path is to derive the values from the element's trace constant inside the kernel — the two calibration routes above — rather than relying on the raw deck knob.