You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/developer_notes.md
+92Lines changed: 92 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,98 @@ Where CODE is the module name (EQUIL, ForceFreeStates, VAC, PERTURBED EQUILIBRIU
20
20
21
21
The regression harness **must be run on every pull request before merging into `develop`**. It is the project's primary safeguard for tracking how numerical results evolve across changes, so it is only useful if every PR exercises it. When you open a PR, paste the regression report into the PR thread so reviewers can see what moved (and what did not). If your change touches a quantity that is not yet tracked, add a new regression case — or extend an existing one — in the same PR.
22
22
23
+
### Open problem: pinning grid-sensitive Δ′ robustly
24
+
25
+
The ideal-MHD Δ′ values pinned in `test/runtests_parallel_integration.jl`
26
+
(`delta_prime_matrix` diagonal) and tracked by the harness are **single-point
27
+
snapshots**: one value at one `psi_accuracy` on one grid. They exist to catch
28
+
unintended changes, and are explicitly *not* converged Δ′. The extraction is
29
+
intrinsically grid-sensitive — a `psi_accuracy` scan from 2e-3 to 2.5e-4 swings
30
+
the DIII-D-like `dpm[1,1]` by roughly 50% (about 6.2 to 9.9), and switching the
31
+
grid generator moves it again. Any such pin therefore encodes an arbitrary point
32
+
on a varying curve, and re-pinning is required whenever the grid changes, which
33
+
weakens it as a regression signal.
34
+
35
+
A more defensible criterion is to pin the **plateau**: scan Δ′ across
36
+
`psi_accuracy` and the integration-truncation controls, and take the value where
37
+
the result is stationary — the mode of the resulting distribution rather than any
38
+
single sample. Where a plateau exists it is a property of the physics rather than
39
+
of the discretization, so it would survive grid changes and would be a genuine
40
+
convergence statement.
41
+
42
+
A `psi_accuracy` scan on the DIII-D-like SLAYER deck (2e-3 down to 3.125e-5, a
43
+
64x range) shows what a plateau search is up against:
populate_dense_xi = false# No PerturbedEquilibrium here; the dense EL pass has no consumer (auto-disabled under force_termination anyway). SLAYER needs only delta_prime_matrix from the parallel BVP.
63
+
truncate_at_dW_peak = false# Edge-dW scan stays diagnostic; integration domain set by qhigh / psihigh / dmlim
64
+
set_psilim_via_dmlim = true# TRUE for diverted geqdsks — q → ∞ at separatrix, so dmlim truncation avoids the δW kink instability at negligible domain cost
65
+
dmlim = 0.2# Truncate integration at (last_rational_q + dmlim) / n
66
+
67
+
[SLAYER]
68
+
# SLAYER tearing-mode growth-rate analysis on the DIII-D-like H-mode equilibrium.
69
+
# Runs in the force_termination path (PE skipped). Kinetic profiles (incl. the
70
+
# χ⊥/χ_φ heat/momentum diffusivities) are read from the standardized HDF5
71
+
# kinetic file shared with the kinetic/NTV physics. Per-surface (uncoupled)
72
+
# analysis: the headline is the unstable 2/1; the validity gate drops surfaces
73
+
# with no real root (e.g. the 5/1, whose Δ' BVP yields a huge uncancellable Δ').
74
+
enabled = true
75
+
inner_model = "slayer_fitzpatrick"
76
+
scan_mode = "amr"
77
+
coupling_mode = "uncoupled"
78
+
dc_type = "none"
79
+
mu_i = 2.0
80
+
zeff = 1.0
81
+
chi_perp = 1.0# fallback only; the kinetic file supplies χ⊥(ψ)
82
+
chi_tor = 1.0# fallback only; the kinetic file supplies χ_φ(ψ)
83
+
pole_threshold_adaptive = true# SLAYER |Δ| spans many orders; adapt to 10·median(|Δ|)
84
+
filter_above_poles = true
85
+
filter_outside_re = true
86
+
polish_roots = true# refine each root to the true zero; enables the validity gate
87
+
store_scan = false# per-surface scans omitted from HDF5 (uncoupled has one per surface)
88
+
# Standardized kinetic-profile file (GPEC HDF5 kinetic schema), shared with the
0 commit comments