Measure the EFIT domain and grid: neither recovers a slice (#459) - #688
Open
HongSik-Yun-Fusion wants to merge 1 commit into
Open
Measure the EFIT domain and grid: neither recovers a slice (#459)#688HongSik-Yun-Fusion wants to merge 1 commit into
HongSik-Yun-Fusion wants to merge 1 commit into
Conversation
The #171 baseline loses most of its plasma slices to two failures that read as grid statements: `bound` cannot close a contour, and `findax` refuses a separatrix point within two cells of the box edge. This runs #459's 2x2 over the three reference discharges -- the routine box against a reduced one, at 129x129 against 129x257 -- to measure how much of that loss the domain and the grid account for. What EFIT's grid contract is, from the source: - nw and nh are argv(1) and argv(2) (efit.F90:93-104); a rectangular grid needs no rebuild. - The Green table name encodes the grid and only the grid (tables.F90:34). - EFIT has no notion of the box of its own: it reads rgrid/zgrid out of the table (tables.F90:158). So two tables for the same grid and different boxes are named identically and a wrong one is undetectable from EFIT's output. `verify_table` reads the EFUND manifest and refuses a mismatch before any case runs. Over 82 plasma slices: case box grid produced accepted collapsed findax A R .05-1.2, Z +-1.5 129x129 46 30 29 2 B R .05-1.0, Z +-1.35 129x129 36 23 29 13 C R .05-1.2, Z +-1.5 129x257 44 28 29 4 D R .05-1.0, Z +-1.35 129x257 36 23 29 13 Neither lever recovers a slice. The reduced box costs ten equilibria, and it fails exactly as the box predicts: bringing the edge in takes findax's off-grid rejections from 2 to 13. B and D agree on every count on every shot. The 29-slice collapse block is untouched in all four cases; with #588 having ruled out the seed, it is not a discretisation problem either. Halving the vertical cell moves every global quantity by under 0.3%, chi-square not at all; the axis height moves by exactly half the coarse Z cell, which is quantisation rather than a different equilibrium. All four cases are judged against one acceptance envelope (case A's), since aminor_min is a resolution floor and would otherwise move with the grid. Also fixed here, because it changed these numbers: parse_slices delimited slices on the iteration counter alone, so a slice that `bound` rejects before its first iteration was dropped and its error handed to the previous slice. It now opens a slice when a solver error names a new time. The reference set has 82 plasma slices, not the 77 the earlier studies reported; their relative comparisons stand, their absolute counts predate this. Open: case A produces 46 equilibria where the merged baseline produced 31. The runs differ in both the Green table and the mhdin.dat geometry (fresh vs packaged), so which one matters is not established; it needs its own A/B. regenerate_legacy_table.py gains --rleft/--rright/--zbotto/--ztop; EFUNDConfig already carried them. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
40 tasks
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.
Runs #459's EFIT 2×2 over the three reference discharges: the routine box against a reduced one, at 129×129 against 129×257. Phase 1A's capability questions are answered from the EFIT source, and the Phase 2 matrix is measured. CHEASE and TES are not touched.
What EFIT's grid contract actually is
nwandnhare runtime arguments,argv(1)andargv(2)(efit.F90:93-104), andnhdefaults tonw. A rectangular grid needs no rebuild.table_name_ch,tables.F90:34).rgrid/zgridout of the table (tables.F90:158) and derives the cell size from them. The box is whatever EFUND's&in5baked in.verify_tablereads the EFUND manifest and refuses a mismatch before any case runs; that refusal is tested.EFUNDConfigalready carried the box.regenerate_legacy_table.pyexposed only the grid and now takes--rleft/--rright/--zbotto/--ztop.The result, over 82 plasma slices
findaxfindaxrejects separatrix points within two cells of the edge (find_axis.F90:308-311); bringing the edge in takes those rejections from 2 to 13. The vacuum volume the proposal wanted to trim is not unused.All four cases use one acceptance envelope, case A's.
aminor_minis a resolution floor and would otherwise move with the grid, leaving four cases judged against four bars.A log-reading defect, fixed because it changed these numbers
boundcan reject a slice before its first Picard iteration, which prints only the error line.parse_slicesdelimited slices on the iteration counter alone, so it dropped that slice and handed its error to the previous one. On 39915 a converged slice was carrying two failures that were not its own. The parser now opens a slice when a solver error names a new time, and a test pins the real log tail that exposed it.This changes the earlier denominators: the reference set has 82 plasma slices, not 77. The baseline and seed studies' relative comparisons stand, since every row went through the same parser; their absolute counts predate the fix.
Open, and not resolved here
Case A is the routine box and grid, yet it produces 46 equilibria against the merged baseline's 31. The two runs differ in both the Green table and the
mhdin.datgeometry (freshly generated vs packaged), so which one matters is not established. #194's A/B changed the table alone on four slices and found nothing; this is the first evidence that something in that pair matters on the marginal slices. The effect is larger than either lever this issue set out to test, and it needs its own controlled A/B.Verification
test_plasma_features.py::test_a_spike_on_the_window_edge_does_not_move_the_peak, is the known parallel-only flake and passes in isolation.rv129257.dddis 260 MB), each verified against its manifest, EFIT run over every plasma slice of 39915, 41524 and 41672.Refs #459 (the umbrella stays open for CHEASE, TES and the multi-discharge stage).
🤖 Generated with Claude Code