PE/EQUIL - BUGFIX! - Withhold unvalidated kinetic tearing diagnostics and free the grid they constrained - #426
Closed
logan-nc wants to merge 1 commit into
Closed
Conversation
…; free the grid they constrained Delta' and its family (resonant current, resonant area-weighted field, island widths, Chirikov) all descend from the outer-solution jump across the rational surface, read through ideal outer-region asymptotic matching at an IDEAL rational surface. Kinetic terms displace the surfaces (kinsing) and change the layer response, so that reading has no validated basis -- withhold them in kinetic runs rather than deliver numbers with no established meaning. One opt-in (unvalidated_kinetic_tearing, default false) restores them for research use with a warning. Surface metadata and the inner-layer penetrated field are unaffected, as are all ideal runs. Rational-surface bracketing exists solely to keep that ideal Delta' stencil consistent across the surface, so when the Delta' is withheld the bracketing is skipped too and the fine near-rational knots survive to resolve the kinetic matrices' layer structure. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LzbLFQKyuRE5DYZmLokKmk
Collaborator
Author
|
Closing and deleting: overstepped. The PE singular-coupling Δ′ is valid and must not be withheld — the untrusted-with-kinetics quantity is the Riccati Δ′, which is already unreachable in kinetic runs (kinetic requires the forward integrator, hard error at |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacked on #425. Two coupled changes, both driven by the same finding: GPEC has no validated kinetic Δ′.
1. Withhold the unvalidated kinetic tearing diagnostics
Delta_prime,C_Delta_prime,resonant_current,resonant_area_weighted_field,island_width_sq,island_half_widthandchirikov_parameterall descend from one quantity: the outer-solution jump in ∂b^ψ/∂ψ across the rational surface, read as a tearing index through ideal outer-region asymptotic matching at an ideal rational surface. Kinetic terms displace the surfaces (kinsing) and change the layer response, so that reading has no validated basis. In kinetic runs these datasets are now withheld with a warning naming exactly what is missing and why; surface metadata (ψ, q, m, n, area) and the inner-layer penetrated field are kept, and all ideal runs are bit-unaffected.Opt-in
[PerturbedEquilibrium] unvalidated_kinetic_tearing = truerestores them for research use, with a warning that they must not be published without independent verification.(The Riccati
Delta_prime_matrixpath was already unreachable in kinetic runs — kinetic requires the forward integrator — so PE's singular coupling was the only leak.)2. Free the grid that constraint was paying for
Rational-surface bracketing exists solely to keep the ideal Δ′ stencil's 3rd derivative consistent across the surface (
GridRefinement.jl). When that Δ′ is withheld, the bracketing is skipped and the fine near-rational knots survive for the kinetic matrices instead; opting back into the diagnostics restores the bracketing, so the grid always matches the physics being delivered.Measured effect on the torque cross-check: none (DIII-D rot=1.0, deterministic): PE 0.1322 / fgar 0.1655 before and after, grid 290 → 288 knots. The bracket's cleared zone is only ~2e-4 wide and already contained 17–18 knots, so this is a cleanup of a now-purposeless constraint, not a fix — reported as the null result it is.
What the residual actually was
Chasing it produced the more useful result. The PE-vs-NTV gap on rot=1.0 is concentrated at the resonant layers — at ψ = 0.9933 fgar collects +0.0358 within ±0.002 while the EL solution collects +0.0026 — and it is a formulation difference amplified by a numerical smoothing width:
PE is exactly
reg_spot-independent (it is the ODE's own dissipation); fgar's layer contribution collapses 0.0453 → 0.0138 as the regularization narrows. At a rational surface the resonant torque enters the outer-region description as a surface term — the jump / resonant current, i.e. precisely the quantity part 1 withholds as unvalidated, while fgar integrates a reg-broadened volume approximation of it. So the two agree wherever that term is absent (0.8%), and cannot agree on the full domain until a validated kinetic layer formulation supplies it (issue #423).Practical guidance this establishes: compare PE and NTV torque either outside the resonant layers or at small
reg_spot; treat any full-domain difference at largereg_spotas the smoothing width, not physics.Regression harness — and an honest coverage gap
regress --cases diiid_n1,solovev_kinetic_calculated,solovev_kinetic_ntv --refs bugfix/kinetic-clebsch-xi-s,local: 47 / 14 / 6 unchanged — nothing moved anywhere.That clean result is partly a coverage gap, and should be read as one: the Solovev kinetic decks run fixed
mpsi(16 and 128), so they never enter the two-pass auto grid where the bracketing lives, and they track no Δ′-family quantity, so nothing went missing. The harness therefore confirms only that ideal runs are bit-identical (47/47) and that this PR is inert on fixed-grid kinetic decks. The bracketing change and the withheld datasets are exercised only by the DIII-D kinetic-calculated auto-grid runs reported above. This is the third time this configuration has been the sole coverage for a change — a DIII-D kinetic-calculated FFS-only harness case remains the outstanding test-infrastructure item (see #398's disclosure and #423).🤖 Generated with Claude Code
https://claude.ai/code/session_01LzbLFQKyuRE5DYZmLokKmk