Skip to content

auto mpsi under-resolves the edge, giving spurious dW and Delta-prime #302

Closed
1 of 2 issues completed

Description

@d-burg

With grid_type = log_asymptotic and automatic radial resolution (mpsi = 0), the
optimal-mpsi heuristic allocates very few edge grid points (about a dozen near the
boundary). The resulting edge under-resolution produces spurious ideal dW and
Delta-prime values, especially when a near-separatrix rational surface is captured.

Workaround: set a fixed mpsi (e.g. mpsi = 256), which resolves the edge and gives
stable dW / Delta-prime.

The fix should make the automatic mpsi selection allocate adequate edge resolution
(or warn when the edge is under-resolved). Note this is an auto-mpsi problem, not
log_asymptotic itself: log_asymptotic with a fixed mpsi is fine.

Activity

  1. self-assigned this
    on Jun 24, 2026
  2. d-burg commented on Jun 25, 2026

    @d-burg
    CollaboratorAuthor

    @logan-nc I scanned psi_accuracy with log_asymptotic + auto-mpsi and compared against ldp + fixed mpsi=256, checking the least-stable eigenvalue et[1] (the correct value, cross-checked against fortran DCON and the parallel-integration test, is ~0.80):

    grid / setting N_edge mpsi et[1]  
    ldp, mpsi=256 — 256 0.8006 correct
    log_asymptotic auto, psi_accuracy=1e-3 (default) 5 210 0.6851 wrong, −14%
    log_asymptotic auto, psi_accuracy=1e-4 8 631 0.8074 ~ok
    log_asymptotic auto, psi_accuracy=1e-5 13 1012 0.8020 converged
    log_asymptotic auto, psi_accuracy=1e-6 23 1060 0.8021 converged

    So you were right that psi_accuracy is the knob -- the default 1e-3 insufficiently populates the edge (N_edge=5) and gives a spurious δW, tightening to 1e-5 converges to the ldp value.

    Cost is the problem -- the converged auto-grid needs mpsi ≈ 1012, and that total is dominated by N_mid=950, not the edge. The edge count grows much more slowly with psi_accuracy than the mid does, so to get enough edge points you over-resolve the mid and end up ~4x the total knots for the same answer that ldp gets in 256. In other words the inefficiency here is the N_edge/N_mid imbalance in make_optimal_mpsi, not core-packing in ldp.

    Until this issue is resolved in a new PR, I'll keep ldp + fixed mpsi=256 for the baseline in our #295 merge since it's both correct and ~4x cheaper. Once auto-mpsi resolves the edge efficiently, log_asymptotic + auto-mpsi can go back to being the default and I'll re-pin the regression. Does this sound good to you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions