Skip to content

Drift-kinetic island/layer solver - #318

Draft
logan-nc wants to merge 123 commits into
developfrom
feature/islands
Draft

Drift-kinetic island/layer solver#318
logan-nc wants to merge 123 commits into
developfrom
feature/islands

Conversation

@logan-nc

@logan-nc logan-nc commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

Design plan (docs only) for Islands, a new GPEC submodule (src/Islands/): a steady-state, multi-species drift-kinetic solver for the resonant island/layer region that returns the growth moment Δ_cos(w, ω; p) and torque moment Δ_sin(w, ω; p) for arbitrary parameters — replacing the sum of regime-specific Modified Rutherford Equation terms with a single calculation, and in its small-amplitude limit reducing to the linear layer response so that error-field shielding, penetration, seeded-NTM onset, and island saturation become faces of one solution manifold.

Draft: this PR lands the design docs (docs/src/islands/, module conventions in src/Islands/CLAUDE.md) and the drift-kinetic reference library, revised against the Imada / Dudkovskaia / Leigh source set. No solver code yet.

🤖 Generated with Claude Code

logan-nc and others added 4 commits July 7, 2026 15:31
…an under src/islands

Design bundle for ISLET (Integrated SoLver for Evolving Tearing), a planned
steady-state multi-species drift-kinetic solver for the resonant island/layer
region, generalizing the Modified Rutherford Equation the way SLAYER generalized
linear layer theory. Revised against the full Imada/Dudkovskaia/Leigh reference
set in docs/resources/Drift_Kinetic_Island_References (see REVISION-2026-07-07).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…uthor-title convention

Renames the nine PDFs under docs/resources/Drift_Kinetic_Island_References to the
YEAR-Author-Title convention used by the rest of docs/resources, and extends the
.gitignore resources-PDF negation to subdirectories (!docs/resources/**/*.pdf) so
these tracked references match the existing docs/resources/*.pdf policy. Syncs the
filename references in the ISLET reference-library doc (docs/08).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…e convention)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…n into in-repo layout

Drop the working acronym ISLET in favour of the plain module name Islands, and
record the module-naming convention (simple intuitive names, not standalone-code
acronyms) in the repo-root CLAUDE.md.

Reconcile the design bundle from its standalone-package assumptions into the
in-repo layout:
- module conventions   -> src/Islands/CLAUDE.md
- overview             -> docs/src/islands/index.md
- design docs 00-08    -> docs/src/islands/design/
- Physics Book / state / derivations / papers / notes / LOG / QUESTIONS
                       -> docs/src/islands/{,state,derivations,papers,notes}
- benchmarks + figures -> benchmarks/islands/{,figures}
- verify harness       -> src/Islands/verify/
- tests                -> test/runtests_islands_*.jl (top-level test/)
- regression cases     -> integrated under regression-harness/ (islands_*)

Islands is a submodule of the GeneralizedPerturbedEquilibrium package (no separate
Project.toml), not a standalone subpackage; docs/03/06 updated accordingly.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@logan-nc logan-nc changed the title Islands: drift-kinetic island/layer solver — design plan Drift-kinetic island/layer solver Jul 8, 2026
@logan-nc logan-nc self-assigned this Jul 8, 2026
@logan-nc logan-nc added enhancement New feature or request WIP Work in progress labels Jul 8, 2026
logan-nc and others added 22 commits July 8, 2026 00:11
… infrastructure

Stand up the Islands submodule and the infrastructure the autonomous-run
protocol (design doc 06) assumes:
- src/Islands/Islands.jl (module Islands, skeleton) wired into the package
- docs/src/islands/LOG.md + QUESTIONS.md (session memory + blocker queue; Q1
  records that julia is not on the automation shell PATH)
- .claude/settings.json + hooks (guard-bash PreToolUse, stop-check Stop) for
  unattended dontAsk runs; physics-verifier subagent as the [VERIFY] backstop
- docs/src/islands/design/M1-launch-prompt.md (the milestone contract fed to
  the overnight loop)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…docs

The exported Islands module carries a docstring, which checkdocs=:exports
requires be covered in the manual. Add docs/src/islands.md with an @autodocs
block and wire it into make.jl (API Reference), matching the other submodule
pages. Fixes the missing_docs docs-build failure introduced by the module stub.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…tings.json

/doctor flagged two deny rules as skipped: the :* prefix wildcard is only valid
at the end of a pattern. Rewrite them with a mid-pattern wildcard so the rules
load and again restrict the protected-branch pushes for any remote or flags.
A loaded OMFIT module leaks the conda env lib dir onto LD_LIBRARY_PATH, shadowing
Julia's bundled artifacts (CHOLMOD, glib/Cairo/GR) and producing false 'broken
build' blocks in the Stop hook. Strip the var for the julia smoke check via
env -u; this is a no-op on a clean shell and in CI.
M1 needs forward-mode AD for the JVP/AD-compatibility checks (design
docs/src/islands/design/04-numerics.md §9). Adds ForwardDiff to Project.toml
(already present transitively in the manifest); removes nothing.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ck + verify harness

Land the milestone-M1 numerical skeleton (design 03 §1-2, 04; ladder A1/A2),
structure only — no [VERIFY] physics coefficients assigned in src/.

- phasespace/PhaseSpace.jl: the (x, ξ, y, E, σ) grids with layer-clustered maps.
  Fourier spectral ∂ξ; Fornberg high-order finite differences for ∂x/∂y on
  sinh-stretched grids (per-derivative window widths so D1 and D2 are both
  4th-order including boundaries); composite-Simpson quadrature weights;
  Gauss-Laguerre energy nodes. Pure numerics.
- operators/Operators.jl: AbstractTerm + apply! + residual! and the term structs
  of 03 §2 (ParallelStreaming, MagneticDrift with the :original/:improved toggle,
  ExBDrift as the (x,ξ) Poisson bracket, Collisions, GradientDrive, PerpTransport
  and RadiationSink L4 stubs, Quasineutrality field residual). Every physics
  coefficient is a supplied data field, never a literal; allocation-free and
  generic over eltype so ForwardDiff duals flow through.
- verify/Verify.jl: manufactured-solution (MMS) + AD-vs-finite-difference JVP
  harness, plus allocation probes. Manufactured coefficients are arbitrary
  order-unity test values (not physics), exercising the discretization only.
- Islands.jl: wire the three submodules.

physics-verifier: PASS (no [VERIFY]-policy violation).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…to runtests

test/runtests_islands_grids.jl and test/runtests_islands_operators.jl, included
in test/runtests.jl:

- A1 per-operator MMS: 4th-order convergence for the ∂x/∂y differential terms,
  machine precision for the Fourier ∂ξ (drift) term; assembled kinetic residual
  converges at 4th order.
- A2: forward-mode-AD JVP of the (nonlinear) assembled residual matches the
  central finite-difference directional derivative to ~1e-9.
- Allocation regression: every apply! and residual! hot path allocates 0 bytes.
- Grid unit tests: Fourier exactness, mapped-FD order, Simpson/Gauss quadrature,
  layer-clustered packing, IslandGrid assembly and input validation.

All 53 Islands tests pass.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…path)

- docs/src/islands.md: document the M1 skeleton (PhaseSpace/Operators/Verify),
  restating the structure-only [VERIFY] discipline.
- LOG.md: M1 session entry (what moved / blocked / next).
- QUESTIONS.md: Q1 RESOLVED — julia is at the ncl2128 software dir and must be
  invoked with a clean LD_LIBRARY_PATH (OMFIT contamination); used here to run
  the suite locally.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Set up the next milestone (M2 — L0 solve machinery) for the autonomous loop,
mirroring the M1 launch-prompt bootstrap.

- docs/src/islands/design/M2-launch-prompt.md: the M2 milestone contract. Scope
  = full L0 solve machinery (solvers/, moments/, frames/, fields/, species/,
  neoclassical-matching BCs) as AD-compatible allocation-free structure with every
  physics coefficient a [VERIFY]-gated parameter. DoD = the physics-free structural
  gates (A5 null, assembled solve-MMS, A8 y_c conditioning, A4 conservation, A3
  parity, A7 ⟨∂²h/∂x²⟩=0) + suite + PR + Paper-I OUTLINE + the clearance queue.
  The York gates (B5a/b/c, B2, B4) are explicitly OUT — they need human-cleared
  physics; reaching one by hardcoding is a policy violation, not completion.
- QUESTIONS.md: seed the parallel-human clearance queue — Q2 (ratify D7/D8),
  Q3 (clear the L0 [CHECKED] coefficient set with exact cites), Q4 (open [VERIFY]s:
  the psi-tilde q_s'/q_s typo, B5a collisionality, acquire WCHH96 + Park 2022).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Drop the overnight-loop framing (dontAsk/--continue header, unattended language,
Stop-hook exit-criteria) — M2 is driven interactively via /goal in auto mode.
Blocked coefficients are surfaced to the user to clear live rather than only
parked in QUESTIONS.md. The contract (scope, DoD, [VERIFY] hard rule, gated York
gates) is unchanged.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ylov solver

Matrix-free GMRES backend for the L0 solve (design docs/src/islands/design/04-numerics.md $5, $9).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…es, fields, moments

Land the Level-0 solve structure (design 03 §1-3, 04 §3-5; M2 contract), every
physics coefficient a supplied [VERIFY]-gated parameter — no literal in src/:

- solvers/Solvers.jl: matrix-free Newton-Krylov (Krylov.jl GMRES on a
  preallocated ForwardDiff JVP operator; Eisenstat-Walker forcing; backtracking
  line search; convergence on both norm and max-norm per 04 §5), YBlockJacobi
  physics-block preconditioner skeleton with TSVD-regularized pencil solves
  (the explicit y_c treatment of 04 §3), dense tiny-grid debug Jacobian, and a
  pseudo-arclength continuation scaffold with fold detection from day one.
- species/Species.jl: Species{AbstractBackground}, Maxwellian/SlowingDown,
  Bulk/Trace roles, validation + trace-criteria check (warn, never degrade) —
  the D3 first-class species plumbing (02 §1).
- frames/Frames.jl: Level0Parameters input vector (01 §5) and the frame
  conversion FORMS with every sign/normalization a NaN-defaulted gated
  FrameConvention field — an un-cleared convention poisons results instead of
  guessing (QUESTIONS Q3).
- fields/Fields.jl: Q(Ω)/h(Ω) flattened-electron closure structure (prefactor
  supplied), the coefficient-free A7 identity ⟨∂²h/∂x²⟩_Ω = 0, and the
  NaN-gated ElectronClosure constant set.
- moments/Moments.jl: J̄_∥ assembly from charge-scaled weighted moments,
  Δ_cos/Δ_sin projections with REQUIRED gated prefactors (ψ̃ open [VERIFY],
  sin normalization unpinned — QUESTIONS Q4), Ω label + ⟨·⟩_Ω average +
  channel-split diagnostics (pinned half-width convention).
- operators/: PitchAngleDiffusion in mimetic divergence form (exact discrete
  particle conservation + entropy sign, ladder A4), FarFieldConditions
  matching BCs (never bare Neumann, 01 §3), weighted_moment!, flat-index
  helpers; IslandGrid now records y_c for the A8 monitor.
- verify/: solve-level MMS + zero-drive configurations (A5/A1-solve) and the
  yc_block_sigma_min conditioning monitor (A8, the L23 §4.2 silent-noise
  regression tripwire).

All new kernels pass a --check-bounds=yes run (M1 lesson).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…/A8 + solve-MMS)

test/runtests_islands_solve.jl (67 tests, wired into runtests.jl):
- A5 zero-drive null: residual exactly machine zero at g ≡ 0; Newton falls back
  to the zero state from a perturbation.
- A1-solve: assembled Newton-Krylov solve recovers the manufactured state at
  design order (observed 3.98 on the nx = 17→33 pair).
- A4: exact discrete particle conservation (≲1e-11) + entropy sign of the
  mimetic pitch-angle operator; allocation-free apply!.
- A3: Δ_cos even / Δ_sin odd under ξ-reflection, spectrally exact projections.
- A7: ⟨∂²h/∂x²⟩_Ω = 0 to 1e-10 across Ω and prefactors (coefficient-free).
- A8: y_c-block σ_min monitor is finite/positive and detects an artificially
  singularized pencil.
- Preconditioner gate: YBlockJacobi cuts GMRES iterations >2× at identical
  solutions; far-field BC rows; pseudo-arclength fold detection; species +
  gated-frames plumbing.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…ctural regression case

- benchmarks/islands/ (+ figures/): the docs/05 B-ladder scripts B2 (large-w
  limits), B4 (polarization ω_E structure), B5a/b/c (York threshold triangle) —
  all SKIPPED, each naming the QUESTIONS.md entries (Q2-Q4) whose human
  clearance un-gates it. Un-skipping by filling in a coefficient is the
  forbidden action; the scripts say so.
- regression-harness: new computed case islands_l0_structural tracking the
  structural numbers that silently move if the discretization/solver/quadratures
  drift — solve-MMS error + Newton/GMRES iteration counts (nx=17), the A7
  closure identity, and the A8 y_c-block sigma_min. Verified locally:
  err=5.254e-2, 6 Newton / 1210 GMRES, A7=8.0e-17, sigma_min=0.1139.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
- docs/src/islands/papers/paper-1/OUTLINE.md: the Level-0 figure contract
  (docs/07 §3), claims → figures → ladder IDs. C1-C3 (discretization order,
  solver conditioning, conservation structure) are green as CI artifacts;
  C4-C8 (neoclassics, large-w limits, the York triangle, the Δ_pol(ω_E)
  reversal, the L23 electron-Δ_pol question) are gated on QUESTIONS Q2-Q4.
- docs/src/islands.md: M2 status (all seven submodules, gating summary).
- LOG.md: M2 session entry, including the solve-well-posedness lesson (generic
  y-diffusion without BCs is unstable; the mimetic degenerate form + far-field
  x-BCs are the correct structure).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…docs missing_docs)

Documenter's checkdocs=:exports requires every exported docstring in the
package (including submodules) to appear in a page; the islands.md @autodocs
block only listed the top-level Islands module, so the PhaseSpace/Operators/
Verify exports failed the docs build. Add per-submodule @autodocs sections.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
logan-nc and others added 30 commits July 22, 2026 16:57
…(exact no-op); the volume moment is ill-conditioned on physical domains — Q7 narrows to (b) decaying BC / (c) matched-asymptotic jump

User flagged Lx=20w=1.0 reaches the magnetic axis (unphysical; the huge-domain
"convergence" masked the non-localization). Physics target confirmed: Δ_neo finite as
w→0 (ρ̂_θi-regularized, threshold w_c~O(ρ̂_θi), recover ∝1/w at large w). Read-only
extraction diagnostic (modest fixed domains 3-8 ρ̂_θi × dirichlet/analytic):
(1) subtracting g_far is an EXACT no-op for Δ_neo — g_far is σ-even + ξ-independent so
it contributes 0 to the σ-odd J̄_∥ (Δ-Δpert=3.6e-14) → Q7 option (a) is OUT; (2) neither
far-field BC gives a converged, domain-independent, well-conditioned Δ_neo on physical
domains — all non-converged, Δ_neo domain/mode-dependent + sign-flipping, and the volume
moment is a tiny residual of large cancelling ± regions (ill-conditioned). So Q7 narrows
to (b) a decaying far-field BC with the null-mode anchor and/or (c) a matched-asymptotic
Δ'-jump extraction insensitive to the domain cut. Signed-off-physics decision, human
sign-off required. LOG + QUESTIONS only; diagnostics scratch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
… does NOT localize — falsifies the "match the decaying tail" BC premise; Q7 reframed to a physics fork

Read-only measurement on the converged Lx=20w solve: the ξ-varying perturbation
amplitude gpert_rms(x) is constant ~0.091 across the whole domain (island → x/w=16,
ratios 1.00-1.04), even slightly growing, snapping to 0 only at the pinned boundary —
NO decaying tail. The moment integrand m1(x) is small + sign-oscillatory in the island
region plus a growing boundary spike (12× the island value at x/w=16) — the g_far∝x
Dirichlet boundary layer. So the ill-conditioned domain-dependent moment is driven by a
NON-LOCALIZING response AND a BC artifact, not a matchable decay — falsifying my (b)
"match the decaying far field" recommendation. Stopped implementing (any BC now would
guess against the data). Q7 reframed to a physics fork: BC artifact vs physical
passing-particle tail (volume moment can't converge → reformulate) vs missing collision
damping (York localizes at comparable ν_★ — do we lack a term?) vs a spurious near-null
mode. Needs a York-formulation comparison / physics judgment, not autonomous impl.
LOG only; diagnostics scratch.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…gime, but domains are unphysical everywhere and there is no physical-input grounding

Systematic audit of every physics-parameter and grid-domain setting in src/Islands,
test/, benchmarks/islands. Findings: (1) the physics knobs (ε=0.1, q=2, m/n=2/1, τ=1,
ν_★=0.01 low-collisionality/banana, ρ̂_θi=0.05 ⇒ ρ_i≈2.5e-3 r_s) are physically
reasonable and match York's regime; (2) the DOMAINS are unphysical everywhere —
halfwidth_x=6-8 in x=(ψ-ψ_s)/ψ_s units is 6-8× the whole plasma (axis is at x=-1);
harmless in structural/MMS tests but a real error in the B5 physics benchmark and the
scratch Δ_neo runs (Lx up to 20w=1.0, the whole inner plasma); (3) NO physical-input
layer — ρ̂_θi/ν_★/inv_Ln0/η_i etc. are independent hand-set knobs, not derived from
T_i/B/R/a (which are absent); Species T/n/gradients are inert; (4) York replication is
NOT demonstrated — benchmark_B5 is a gated stub (its physics config is sound but domain
unphysical). Recommendations: physically-bounded domains |x|≲0.3, a pinned physical
scenario deriving the normalized vector, reconcile the ŵ-normalization docs, and
demonstrate B5 as a validation gate. Full tables in notes/physical-parameter-audit.md.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…; clarify eta_i is the temp-gradient ratio, not resistivity

Cleanups toward physical soundness (per the parameter audit): B5 benchmark domain
fixed halfwidth_x=8 (8× the plasma) → a physical local resolved grid (Lx=5w=0.25,
y_max=4.0), its config annotated PROVISIONAL pending the derived scenario; added
physical-domain cautions to resolved_island_grid / drift_island_resolved_grid
docstrings (Lx must stay a local matching radius |x|≲0.3, x=(ψ-ψ_s)/ψ_s with the axis
at x=-1, never plasma-scale). Structural/MMS unit tests keep abstract boxes by design
(they verify discretization/wiring, not physics).

Pinned-scenario plan (design/10-physical-scenario.md): reuse examples/a10_kinetic_example
(large aspect, q=2; EFIT g-file + kinetic profile) via setup_equilibrium; derive the
self-consistent normalized vector (ε, ρ̂_θi=ρ_i q/(ε r_s), ν_★, inv_Ln0, η_i, inv_Lq)
from the same T_i/n_i/B at the q=2 surface; a physical_domain fixed independent of w;
un-gate B5 as the York-replication gate. Registered in docs/make.jl.

Clarified (audit + LOG): Level0Physics.eta_i is η_i = L_n/L_Ti (ion temperature-gradient
ratio, dimensionless, O(1)), NOT resistivity — there is zero resistivity in the Islands
Level-0 drift-kinetic model (it lives in the outer resistive-MHD/Δ' path). grids 63/63.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…ent the one MMS box as an abstract discretization coordinate (proven irreducible)

Per the directive to leave no boxes larger than the plasma in src. The only literal
box >1 in src/Islands is the discretization-test solve_mms (Verify.jl, halfwidth_x=6);
the grid-builder Lx_over_w defaults are w-relative ratios with physical cautions
already. Verified (5 solver/box combinations, ~90 min) that solve_mms CANNOT use a
physical box: a manufactured solve-level MMS mathematically needs the box several
feature-widths wide; a physical |x|<1 steepens the feature and the assembled linear
system becomes ill-conditioned/unsolvable (naive GMRES 69min non-conv order→1.8;
PlaneJacobi order 2.4 non-conv; newton_direct err=4.05 non-conv). Resolution: document
the MMS radial x as an ABSTRACT discretization-test coordinate (module docstring +
inline comment), not the physical x=(ψ-ψ_s)/ψ_s, so it cannot be mistaken for a 6×-
plasma grid. All physics grids are physical (B5 Lx=0.25; grid-builder cautions;
design-10 scenario). Comment/docstring only.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…ference errors from the band-grid docstrings

The band-grid docstrings broke the Documentation workflow (red for several commits)
with three Documenter :cross_references errors on the islands.md autodocs page:
(1) [`_fd_matrix`](@ref) — @ref to an internal undocumented symbol; (2)
[`PlaneJacobi`](@ref) — cross-module @ref that doesn't resolve from PhaseSpace
autodocs; (3) [`drift_coefficient_table`] (…) — a code-span shortcut ref immediately
followed by a parenthetical, parsed as [text](dest) with the parenthetical as an
invalid local file link. Fixes: the two @refs → plain code spans (`_fd_matrix`,
`Solvers.PlaneJacobi`); the two drift_coefficient_table links → plain code spans
(an explicit (@ref) also failed to resolve for this symbol). Verified with a local
docs/make.jl build (EXIT=0, no errors). Docstring-only; no behavior change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…iles → self-consistent normalized Level-0 vector (design 10)

Configure.physical_scenario + physical_domain, with derivations/physical-scenario.md
([DERIVED]). Turns SI quantities at the rational surface (R0, r_s, B, T_i, n_i, q,
dq/dψ, ψ_s, log-gradients) into a normalized Level0Physics with every input derived
from the SAME T_i/n_i/B/geometry — closing the audit gap where ρ̂_θi/ν_★/inv_Ln0/η_i
were independent hand-set knobs. Standard textbook formulas (Larmor radius, banana
ν_★), NOT the disputed island coefficients: ε=r_s/R0, v_th=√(2T/m), ρ_i=m_i v/(ZeB),
ρ_θi=ρ_i q/ε, ν_ii (NRL) + ν_★=ν_ii R0 q/(ε^{3/2}v_th) (docs/01 §2.3), ψ-ratio
normalizations exact per docs/01 §5. physical_domain = fixed local matching radius
(|x|≲0.2, independent of w). Validated: a10-like inputs → ε=0.100, ρ̂_θi=0.045,
ν_★=0.34 (the real physical value for 0.48 keV/2e18). physics-verifier PASS (NRL ν_ii
to 0.08%, ν_★ matches L23 Eq. 2.3.40, constants correct, two convention items flagged
under [DERIVED], no tag cleared). configure 1563/1563 + new physical_scenario testset
green. Next: real a10 equilibrium ingest + un-gate B5 (York replication).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…face); reveals the a10 q=2 is edge-cold; add cold-surface guard

Validated the full a10 ingest (setup_equilibrium + load_kinetic_profiles + root-find
q=2 + r_s from the flux-surface geometry r_s=⟨√(rzphi_rsquared(ψ_s,θ))⟩_θ). Result:
R0=2.005 m, B0=1.0 T, q=2 at ψ_s=0.788, r_s=0.167 m, ε=0.083; gradients inv_Lq=1.07,
inv_Ln0=-3.19, η_i=2.29, lnΛ=15.96 — geometry/gradient extraction correct and physical.
BUT the a10 q=2 surface is near the edge (ψ=0.79) where T_i has dropped to ≲1e-3 eV
(profile→0 at edge; spline undershoots negative), so ρ̂_θi→0 and ν_★→-∞ — the a10
rational surface is edge-cold, not a usable NTM scenario as-is. Added a cold-surface
degeneracy guard in physical_scenario (throws on non-finite/≤0 ν_★/ρ̂_θi) + a test.
configure 1563/1563 + the physical_scenario testset (incl. guard) green. Next (needs a
steer): a warm-q=2 equilibrium/profile for the actual scenario, then wire
scenario_from_equilibrium + un-gate B5.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
… scenario (scenario_from_equilibrium)

Adds Configure.scenario_from_equilibrium(equil, kp; m, n, w_psi, ...): reads
only fields off a solved PlasmaEquilibrium + KineticProfileSplines (q_spline,
rzphi_rsquared, eqfun_B, ro, Ti_spline, ni_spline) — no Islands->Equilibrium
module dependency — finds the q=m/n surface, extracts r_s = <sqrt(rzphi_rsquared)>_theta,
flux-surface-averaged |B|, and Ti/ni with psi-log-gradients (Ti_spline is in
Joules, converted to eV), then forwards to the already-physics-verified
physical_scenario (which guards the cold-surface degeneracy).

Validated end-to-end on examples/DIIID-like_ideal_example: the mid-radius q=2
H-mode surface yields a fully physical, self-consistent Level-0 vector —
eps=0.265, rho_hat_theta_i=0.075, nu_star=0.0124 (low-collisionality banana,
York's regime), eta_i=2.16 — every quantity from the same equilibrium + Ti(psi)/ni(psi).

Fast mock-based unit test added (no equilibrium solver in the unit suite; the
real ingest is a benchmark). Configure suite green (1563/1563).

LOG: records the DIII-D banana scenario and corrects the earlier a10 "edge-cold"
entry — that was a Ti-in-Joules unit bug on my side, not physics.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…); benchmark still gated on Q5+Q7

benchmark_B5_york_thresholds.jl: _b5_phys no longer hand-sets York-regime numbers.
It calls Configure.scenario_from_equilibrium on examples/DIIID-like_ideal_example
(cached load) at the q=2 surface, so B5 uses the same DERIVED, self-consistent
physical vector (eps=0.265, rho_hat_theta_i=0.075, nu_star=0.012, eta_i=2.16) as the
rest of design 10. _assemble_b5 takes the matching radius from physical_domain(phys)
(a fixed physical fraction of the surface, not scaled with w) and y_max from (1+eps)/(1-eps).

Verified end-to-end (clean LD_LIBRARY_PATH): both :original and :improved assemble
via configure_level0. Benchmark stays SKIPPED (const UNGATED=false) — it remains
gated on Q5 (uncleared coefficient families -> structural-only assembly) AND Q7
(far-field extraction does not localize). So the config is now physical but the York
threshold NUMBER is still blocked on the Q7 non-localization.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…7 fork collapses to (b), (c) ruled out

Read L23 (§2.3.6/§2.4/§2.5-2.6/§7.1) and Diss19 (§4.2) from the in-repo PDFs and
wrote a cited side-by-side vs. our implementation:
docs/src/islands/notes/york-farfield-extraction-ground-truth.md.

Outcome (the strategic Q7 decision the user asked to ground):
- Option (c) [matched-asymptotic jump extraction] is RULED OUT. York's Delta_loc
  (L23 Eq. 2.5.10->2.5.13) is a VOLUME MOMENT identical to our Moments.delta_moments;
  the tearing jump Delta' is the OUTER parameter York neglects. Our extraction is
  correct as-is (L23 footnote 8 confirms the cos-xi projection kills the
  xi-independent far field -- the cancellation we verified).
- The non-localization is option (b): far-field BC + coordinate + globalization,
  with a cited recipe: (1) :neumann d g-hat/d p = 0 PLUS an analytic large-p anchor
  to remove the winged null-mode (L23 Eq. 2.3.51 + Sec 7.1 -- physics sign-off);
  (2) carry the drift-island shift in the radial coordinate p_phi-hat (Diss19 Sec 4.2
  / L23 Eq. 7.1.1) -- this is Q8, a prerequisite; (3) warm-start/continuation
  globalization -- L23 Sec 7.1 says kokuchou itself does NOT converge from Phi-hat=0
  and warm-starts from a stable run, the same "crawls from any init" symptom we see.

QUESTIONS Q7 and LOG updated with the same finding. Read-only ground-truth: no src/
change, no coefficient cleared.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…rt solve; extends the basin but the physical target stays blocked on (1)/(b)

Implements the York-ground-truth item (3): Configure.globalized_level0_solve
(grid, phys, species; farfield_mode=:analytic, nu_boost, nsteps, ...) -- a
collisionality-homotopy warm-start driven through the existing
Solvers.natural_continuation. Ramps nu_star geometrically from a collisional,
well-conditioned start down to the physical value, warm-starting each solve; only
nu_star varies (every intermediate point is a valid, more-collisional physical
config -- no coefficient guessed). This is L23 Sec 7.1's remedy (kokuchou warm-starts
Phi-hat from a stable run because it will not converge from Phi-hat=0 at low nu_star).

Empirical result on the DIII-D physical scenario (eps=0.265, rho_hat_theta_i=0.075,
nu_star=0.0124, :analytic BC, bounded box Lx=4w):
- COLD :analytic: not converged, resmax=2.8e-3 (the known stall).
- GLOBALIZED: converges the collisional end and warm-steps down to nu_hat ~= 0.078
  (~16x basin extension) then hits a wall -- cannot cross nu_hat ~= 0.07 to reach
  nu_hat = 0.0124.
So (3) helps but does NOT solve the physical target. The low-collisionality
obstruction is genuine (even the drift-shifted :analytic BC stalls), confirming the
ground-truth: the remaining blocker is the analytic large-p far-field null-mode
anchor (1)/(b) -- the finite-nu term only partially regularizes the winged mode.
(3) is a reusable tool but not sufficient alone.

Tests: solve suite gains a fast globalization integration test (small
known-converging config reaches the target nu_star warm-started from collisional;
arg guards; _with_nu_star) -- green. Configure suite 1563/1563 + physical-scenario
testset green with the new import ..Solvers (no regression). LOG + QUESTIONS Q7
updated with the empirical finding.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…ield form

analytic-far-field.md status [DERIVED: 2026-07-17] -> [CLEARED: 2026-07-24]:
human sign-off given on the analytic large-p far-field anchor value (the restored
O(rho_hat_theta_i) orbit shift and <x_D>_theta = rho_hat_theta_i (sigma sqrt(E)/(1+eps)) A(y)).
Adds a note distinguishing the signed-off PHYSICS (the anchor value) from the
NUMERICS choice of how to impose it (Dirichlet value-pin vs the L23-faithful
slope+constant-anchor form) -- the value-pin was observed to stall the low-nu solve
(LOG cont. 8); both use the same signed-off <x_D> value.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…ner robustness, not the far-field

Cold-solve diagnostics (node freed up) isolate the persistent "crawls to resmax~1e-3
from any init": it is BC-independent (:analytic and :dirichlet both stall),
grid-independent (band and plain both), collisionality-independent (stalls even at the
easy nu_star=0.5), and NOT a clean w axis (w=0.5..0.05 stall, w=0.03 converges to
1.06e-11 -- non-monotonic, config-sensitive). The system is solvable (1e-11 when it
works), so this is a matrix-free Newton-Krylov + PlaneJacobi preconditioner robustness
problem, upstream of localization.

Consequence: the far-field anchor (item 1, signed off this session) and the drift
coordinate (item 2 = Q8) are the correct localization physics but are NEEDED, NOT
SUFFICIENT -- they cannot make the solve converge because the wall is in the nonlinear
solver. LOG cont. 9 + QUESTIONS Q7 record the reframe; recommended next work is solver
robustness (strengthen PlaneJacobi / measure cond(M^-1 J) across stalling configs, or
newton_direct where affordable), not more far-field work.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…R Newton-convergence wall, not the preconditioner

Conditioning + solver diagnostics (node free) refine the cont.-9 reframe:
- cond(J) at the stalling config is only ~1e5 (sigma_min~2e-4, NOT near-singular),
  and is the SAME for stall (w=0.05) and converge (w=0.03) -- raw conditioning does
  not explain the stall.
- PlaneJacobi is nearly inert on physical resolved grids: cond(M^-1 J) reduction is
  <=2.3x (sometimes <1x), vs the >1000x it gives only in the special high-rho/w=0.5
  regime it was tuned on. cond(J) grows ~4x per energy node; cold convergence flips
  at nE=3 (cond crosses ~1e5).
- DECISIVE: newton_direct (exact ForwardDiff Jacobian + exact dense LU;
  dense_jacobian uses exact duals, not FD) ALSO fails, and worse -- it fails even at
  nE=2 where inexact newton_krylov converges to 1e-12. An exact linear solve does no
  better, so the blocker is NOT the linear preconditioner/conditioning; it is the
  nonlinear Newton iteration, stalling at resmax~1e-2..1e-3 and worsening with
  resolution. (This contradicts the newton_direct docstring's "robust regardless of
  conditioning" claim -- true only at cond~1e9, false on physical resolved grids.)
- Likely cause: y_c-layer residual non-smoothness (the graceful-miss coeff
  discontinuities) that intensifies with more (y,E) nodes.

Recommended next: resolution/parameter continuation (warm-start nE=3 from nE=2),
audit y_c coefficient smoothness (C0/C1 blend vs hard nothing->0 drop), trust-region
globalization -- NOT more preconditioner or far-field work. LOG cont. 9 + QUESTIONS
Q7 updated. Diagnostics under /tmp (not committed).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…rgence wall (3 options, gated)

Adds docs/src/islands/notes/solver-convergence-goal-plan.md: an autonomously-executable
plan to get the physical Level-0 solve converging (resmax <= 1e-9) on physically-resolved
grids (nE>=3), working through option A (resolution/coefficient-homotopy continuation),
B (y_c-layer residual smoothness fix, physics-verifier-gated), then C (trust-region
globalization) with explicit gates, done criteria, guardrails (no tolerance weakening,
no guessed physics, physics-verifier before physics commits), and the environment
gotchas (env -u LD_LIBRARY_PATH, foreground/nohup, right-sizing). Encodes the 2026-07-24
diagnostic conclusions so the loop starts from the correct target (the nonlinear solve,
not the far-field/preconditioner).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…nE>=3 stall is init-independent

A2 grid-prolongation diagnostic: solve nE=2 (converges, 2.3e-12), interpolate onto the
nE=3 energy grid, warm-start nE=3. The prolonged nE=3 solve still fails (resmax 1.8e-3),
no better than cold (1.0e-4). A near-optimal init does not cross the wall => the stall
is initialization-independent => not a basin problem => no continuation path (A1
included) crosses it. Gate A: advance to Option B (y_c-layer residual smoothness). This
reinforces the nonlinear-iteration / non-smooth-residual picture: Newton cannot descend
below the ~1e-3 plateau even from a good start. LOG cont. 10 + plan checklist updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…on orbit-average brackets are non-smooth

B1 diagnostic: orbit_average_drift_brackets / orbit_average_pitch_brackets are smooth in
the passing region (y<1) but in the trapped region (y>1) they MISS->0 erratically
(y=1.08,1.16,1.20,1.22) and T(y) spikes non-monotonically. The graceful-miss then zeros
scattered trapped-region nodes -> a non-smooth coefficient field where the physics is
stiffest; more (y,E) nodes -> worse Newton convergence, which precisely explains the
resolution-dependent stall (cont. 9/10). Two mechanisms: (1) a quadrature-robustness bug
-- the trapped 1/sqrt(1-yb) integrands (G,T) have an integrable turning-point singularity
at +-theta_b that QuadGK fails to converge for some y (fixable by the standard half-angle
substitution sin(th/2)=sin(thb/2) sin(phi), pure numerics); (2) a genuine y_c=1 log
divergence of T(y) (near-separatrix layer; York treats via matching/TSVD). Plan: B2a
implement the substitution quadrature (physics-verifier before commit), B2b the genuine
y_c divergence only if needed. LOG cont. 11 + plan checklist updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…titution) fixes erratic orbit-average bracket misses

Goal loop Option B2a. The trapped-branch orbit-average brackets
(orbit_average_drift_brackets G, orbit_average_pitch_brackets T) integrated
1/sqrt(1-yb) directly over [-theta_b, theta_b] via QuadGK, which fails erratically on
the integrable turning-point singularity and returned nothing->0 at scattered trapped-
region y (the graceful-miss cliff), producing a non-smooth coefficient field that broke
Newton convergence on physically-resolved grids (nE>=3) -- the diagnosed resmax~1e-3
stall (LOG cont. 9-11).

Fix: a shared _bounce_primitives(y,eps) helper applies the half-angle substitution
sin(theta/2)=sin(theta_b/2) sin(phi), which removes the 1/sqrt(1-yb) singularity
analytically (sqjac=sqrt(1-yb)*dtheta/dphi and josv=(dtheta/dphi)/sqrt(1-yb) are both
bounded, the cos phi cancelling). Both trapped branches now integrate the smooth phi-form
over [-pi/2, pi/2].

Validated: matches the old quadgk to ~1e-11 where quadgk converged (physics-verifier
independent check); trapped-region misses 6->1 (only the genuine y_c=1 log-divergence
remains); configure suite 1563/1563 green. physics-verifier PASS (numerics-only change
of variables, no physics coefficient/sign/normalization altered).

NOTE: this is necessary but NOT sufficient -- it improves nE=3 ~10x (1e-4->1e-5) but
nE>=3 still stalls; the remaining non-smoothness is the genuine y_c=1 divergence (B2b)
and/or conditioning growth with nE. Committed on its own correctness merit; convergence
work continues.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
… residual stall is Newton-globalization fragility -> Option C

Post-B2a verification: the nE=3 stalled residual localizes at y=0 (deeply-passing
endpoint), not y_c (y-nodes straddle y_c with none on it), so B2b (genuine y_c
divergence treatment) is NOT the remaining problem. Convergence is fragile and
config/resolution-dependent even with B2a: hand-set nE=3 converges (2.2e-9) but nE=4,6
fail; DIII-D nE=3 fails but nE=4 converges (2.5e-11). Converges to machine precision for
some (nE,config) pairs, stalls at ~1e-3 for others -- no clean axis. This is Newton
globalization robustness ("sometimes in the basin, sometimes not"), consistent with the
whole cont.9-12 chain. Gate B: advance to Option C (trust-region / LM damping) -- a new
numerics-only solver option in Solvers.jl. LOG cont. 13 + plan checklist updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…plateau at ~1e-3 (likely discretization inconsistency)

Ran the full solver-convergence plan. Goal NOT met (3 of 5 physical nE>=3,ny=9 configs
still stall); loop stopped per Gate C.

- Option C (trust-region) tried in two forms, both dropped as inferior to newton_krylov:
  newton_psitc (pseudo-transient) fails (-F is not a ||F|| descent direction -> diverges
  or exhausts damping); newton_lm (dense Levenberg-Marquardt, proper ||F||^2 descent)
  stalls at 1.5e-4, worse than krylov. Numerics-only; not committed.
- Well-resourced krylov (max_iter=120, memory=400) is best but does NOT meet the goal:
  hand-set nE=3 converges (2.2e-9) but nE=4/6 stall (1.4e-3/3.6e-3, hit 120 iters);
  DIII-D nE=3 stalls (2.6e-4) but nE=4 converges (2.5e-11). Failing configs plateau at
  ~1e-3 -- NOT iteration-limited -- and convergence flips between configs with no clean
  predictor.
- NEW leading hypothesis: the same ~1e-3 floor is hit by krylov + newton_direct (exact
  Jacobian+LU) + newton_lm alike, so the discretized system is likely slightly
  INCONSISTENT for the hard configs (formulation/BC issue -- over-determined far-field
  row replacement + forbidden-y pinning + operator), not a solver-convergence problem.
  Next investigator: measure min||F|| for a stalling config to confirm/localize.

Kept gains: B2a bounce-substitution (committed, physics-verifier PASS); thorough
elimination of far-field/collisionality/preconditioner/y_c/continuation as the cause.
LOG cont. 14 + QUESTIONS Q7 + plan checklist closed.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…stalling physical config

Adds docs/src/islands/notes/a1-a5-structural-diagnostic-plan.md: a focused, executable
diagnostic to decide whether the ~1e-3 physical-solve floor (LOG cont. 9-14) is a
structural discretization/BC inconsistency or a genuine solver issue -- the step-back to
the bottom of the docs/05 ladder (A-rungs green on the PHYSICAL config before B-physics).
Three probes on a pinned stalling config (+ converging control): A5 zero-drive null
(inv_Ln0=0 homogeneous system -> residual(0) machine-zero + homogeneous solve -> 0), A1
MMS with PHYSICAL coefficients on the physical grid (the existing A1 only runs manufactured
coeffs on an abstract box -- the gap), and a coker(J) projection at the floor (is F in
range(J)?). Reuses the Verify harness (manufactured_state, mms_assembled_error,
estimate_order, solve_mms, zero_drive_setup, yc_block_sigma_min). Decision tree + env/launch
gotchas + progress checklist included.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…fig: the ~1e-3 floor is drive-specific, not a homogeneous-operator bug

Executed the A1/A5 plan. A5 (zero-drive null) on the pinned stalling config (ny=9, nE=4,
N=6570): setting inv_Ln0=0 zeros the far field (g_far ~ inv_Ln0) and the quasineutrality
source (S_Phi ~ inv_Ln0), giving a homogeneous system with exact solution U=0. Result:
zero-drive residual(0) = 0.00e+00 (machine zero, no spurious source), and the homogeneous
solve converges to resmax 1.85e-11 / ||u||=1.6e-8 in 6 iters. Same on the nE=3 control. So
the operator+BC assembly is consistent and non-singular for the homogeneous problem even
where the driven solve stalls -- the ~1e-3 floor is introduced ONLY by the physical drive.
Since the kinetic operators are ~linear in g (F = A u - b), the question narrows to whether
the drive b is in range(A); the coker(J) least-squares probe (Step 3) is running to settle
it. LOG updated (2026-07-25 entry).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…ull-rank, drive in range); the floor is genuine nonlinearity -> drive continuation is the justified fix

Step 3 (coker/consistency) on the stall config: J is full rank (nkept 6570/6570 to
sigma/sigmamax>1e-12; sigmamin=3.7e-4, cond=5.3e5) and the drive b is entirely in range(J)
(||b_out||/||b||=4e-15). So A u = b is CONSISTENT -- the cont.14 inconsistency hypothesis
is wrong. But the linearity check (||(F(2u)-F0)-2(F(u)-F0)||/||F(u)-F0||=2.0e-3) shows a
weakly-nonlinear system (O(1) quadratic E*B coupling: Phi-from-g advecting g), matching the
~1e-3 floor. VERDICT N: the floor is a genuine nonlinear-convergence problem at the O(1)
driven scale, not a discretization inconsistency; the discretization is sound (A5 clean,
full-rank, consistent). Surfaced lead: continuation in the DRIVE amplitude inv_Ln0 (0->1),
warm-started from the trivial homogeneous u=0 -- untried (Option A tried nu and grid, not
drive strength). Testing now.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…ransition at inv_Ln0~0.3 (warm-start-independent)

Continuing the drive amplitude inv_Ln0 0.1->1.0 warm-started on the stall config:
inv_Ln0=0.1,0.2 converge to machine precision (3e-12); inv_Ln0>=0.3 stalls at ~1e-3 even
warm-started from the previous converged solution. So the stall is a critical drive
amplitude (inv_Ln0 ~ 0.25-0.3), not a basin issue. Two implications: (1) the hand-set test
uses inv_Ln0=1.0 but the PHYSICAL value (DIII-D scenario) is ~0.34, right at the threshold
-- we've partly been over-driving ~3x; (2) a sharp warm-start-independent threshold means
either a fold/bifurcation (no steady solution above critical drive) or under-resolution (a
sharp feature above threshold). Discriminator running: refine the grid at fixed inv_Ln0=0.4
-- floor drops => under-resolution, floor stays => fold. The A1/A5 step-back worked: it
turned "the solve mysteriously stalls" into a sharp physical statement.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…ER-RESOLUTION, not a fold/inconsistency/solver wall

Fold-vs-resolution discriminator at fixed super-threshold drive inv_Ln0=0.4 (warm-started
from 0.2): baseline nx=15,K=4 fails (2.3e-4); nx=25,K=4 converges (1.4e-12); nx=15,K=8
converges (1.6e-9); nx=25,ny=15,nE=6,K=6 converges (1.8e-12). The ~1e-3 floor drops to
machine precision when the RADIAL grid (nx or island clustering K) is refined -- so above
the critical drive (inv_Ln0~0.3) the driven solution develops a sharp radial feature
(boundary layer near the island/separatrix) that the baseline grid under-resolved.
Refining pitch (ny) alone made it worse -- the culprit is specifically radial.

VERDICT (A1/A5 diagnostic complete): the physical solve IS convergible -- the entire
multi-session stall = B2a bracket bug (fixed) + radial under-resolution of a drive-induced
sharp feature. NOT a fold, NOT inconsistency, NOT a solver limit. The earlier "goal not met"
was a coarse-grid artifact. The A1/A5 step-back worked. Next: confirm the goal configs
converge at adequate radial resolution; set resolved_island_grid defaults / a resolution
guide; add a regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…sical DIII-D case; A1/A5 verdict = solution EXISTS but the driven solve is fragile

Confirmation on the DIII-D scenario_from_equilibrium (inv_Ln0=-0.337) at higher resolution
nx=27/K=8: nE=3,4,6 all FAIL (7.4e-4, 5e-3, 5e-3); and DIII-D nE=4 had CONVERGED at coarse
nx=15/K=4 (2.5e-11) -- so refinement HURT the physical case, opposite the hand-set
discriminator. Convergence is non-monotonic in resolution; "just refine radially" is not a
general fix. Correcting the previous overclaim.

Honest A1/A5 verdict: SOLID -- homogeneous clean (A5); driven system consistent + full-rank,
so a SOLUTION EXISTS (Step 3, inconsistency hypothesis refuted); sharp critical-drive
threshold. UNRESOLVED -- the physical solve is a fragile nonlinear solve whose basin shifts
non-monotonically with (config, resolution). Since it is consistent+full-rank, Gauss-Newton/
LM should reach the solution (revisit newton_lm now that inconsistency is ruled out);
PlaneJacobi's config-dependent weakness likely drives the non-monotonicity. The step-back
delivered its core value (refuted inconsistency, proved a solution exists) but did NOT hand
us a working physical solve -- goal NOT met. Next: A1 physical-MMS; revisit robust solver;
B1 no-island reproduction (likely sidesteps the driven-solve fragility).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…vs Sauter/NEO)

Adds docs/src/islands/notes/b1-bootstrap-plan.md: the first physics-ladder reproduction
(docs/05 B1) and the "reproduce basics before new physics" step-back. Goal: Islands
reproduces the standard neoclassical bootstrap J_bs / Sauter L31,L32,L34 in the no-island
limit across nu_star, single- and multi-species, validating the neoclassical core
independently of the fragile driven-island solve.

Key scoping (from a repo inventory): no in-repo bootstrap/Sauter/NCLASS anywhere -> Sauter
analytic is the reference and must be ACQUIRED (not in docs/08 yet); the Q3 coefficient set
(electron closure k=-1.173, f_p, collision kernel, nu_star norm) is largely cleared; and the
bootstrap is dominantly the ELECTRON flow, which Islands treats analytically (L23 2.5.5-2.5.8)
-> a large part of B1 needs NO solve. Phased plan: 0 references+nu_star convention (critical),
1 analytic constants, 2 analytic electron L31 vs Sauter (cheap win, no solve), 3 no-island ion
neoclassical solve (linear, should sidestep the island fragility), 4 full J_bs(nu_star) vs
Sauter, 5 multi-species, 6 closeout (regression case + Physics Book + figure). Risks flagged:
Sauter acquisition (user must provide), nu_star convention alignment, no-island solve
realization. Recommended minimal first deliverable: Phase 0-2 (analytic electron L31, no solve).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…ootstrap formulas transcribed (Phase 0.1)

User (2026-07-31): no NEO/NCLASS; use the open-source OpenFUSIONToolkit TokaMaker bootstrap
(Sauter + a Redl update). Updated b1-bootstrap-plan.md: reference = TokaMaker/Redl (same
GitHub org), acquisition blocker RESOLVED (formulas from source, not a PDF), NEO dropped,
Redl (2021) is the primary ground truth.

Phase 0.1 done: transcribed the complete Redl bootstrap/neoclassical coefficient set from
TokaMaker src/python/OpenFUSIONToolkit/TokaMaker/bootstrap.py:576-795 (redl_bootstrap,
citing Redl PoP 28 022502 (2021) Eqs. 10-21) into
docs/src/islands/derivations/redl-sauter-bootstrap-reference.md [CHECKED]: the nu_e*/nu_i*
definitions, L31 (F31 poly + X31), L32 (F32_ee+F32_ei), L34, alpha, and the j_bs assembly.
Flagged the nu_star convention alignment (Redl vs Islands L23 Eq 2.3.40) as the key risk to
pin in Phase 0.2. Executable reference (port to Julia, diff vs TokaMaker) noted.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
…star map confirmed; Phase 2 needs the York->L31 normalization map

Executed B1 Phases 0-1 against the TokaMaker/Redl reference. Phase 0.1: full Redl coefficient
set transcribed from bootstrap.py:576-795 into the reference doc + Julia port. Phase 1.1:
Islands f_T=1.4624*sqrt(eps) matches Sauter circular 1.46*sqrt(eps) to 3-4 digits. Phase 0.2:
nu_star convention map pinned -- Islands ion nu_star ~= 0.77 * Redl nu_i_star (clean O(1)
convention factor), nu_e_star/nu_i_star ~= 1.41. Phase 2 target curve computed (Redl banana
L31 = F31(f_T) = 0.42->0.83 over eps 0.05->0.3). Phase 2 (analytic electron L31 vs Redl) needs
the York-flow -> dimensionless-L31 normalization derivation (reference doc section 10) -- a raw
comparison shows a spurious ~1.5x offset that is the normalization; to be done as [DERIVED] +
physics-verifier, not guessed. LOG + plan checklist updated.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016pUwoFRo9a5AjF8HuwcZMr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request WIP Work in progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant