PE - FEATURE - Port Fortran sing_spot / use_res_spot for the resonant jump radius (and try layer-width spots for kinetic cases)
Maintainers usually reply within 3 days
@matt-pharr is already working on this.
Since Aug 22, 2026.
Assessment
This issue has not been assessed yet.
Description
Problem
The PE singular-coupling jump is evaluated at ψ_s ± spot_psi with a hard-coded numerator (SingularCoupling.jl:378):
spot_psi = 5e-4 / (abs(nn) * abs(sing_surf.q1))
annotated "spot = 5e-4 matches Fortran default singfac_min". That annotation is wrong on both counts: the Fortran quantity is sing_spot, its own namelist knob (default 5e-4, gpec.f:123), unrelated to singfac_min. So the Julia port reproduces the Fortran default but drops the knob — and drops a second capability entirely.
What Fortran actually does
gpec.f:486-508 builds a per-surface sing_spots(ising) array:
- default:
sing_spots(ising) = sing_spot(5e-4); - with
use_res_spot = .TRUE.(requiresgal_flag):sing_spots(ising) = sing_resspot·(n·|q′|)·sfac^(−1/3) + sing_spot, i.e. the matching radius is set by the resistive resonant-layer width (the S^(−1/3) scaling fromsingtype(ising)%restype), floored atsing_spot.
Consumed as lpsi/rpsi = respsi ∓ spots(ising)/(nn·|q1|) (gpout.f:598-603, and the same in gpout_singfld:1658-1663). The netCDF output even ships them as sing_spots ("Sweet spots used for calculating resonant jump quantities").
Proposed work
- Baseline fidelity: expose
sing_spotas a control ([PerturbedEquilibrium]), replace the literal, and fix the misleading annotation. Default 5e-4 keeps current behaviour bit-identical. - Per-surface resistive spot: port the
use_res_spotbranch — matching radius from the resistive layer width per surface, floored atsing_spot. The ingredients exist on the Julia side (ForceFreeStates/Resist.jl, the Galerkin Δ′ path, the inner-layer solvers). - New work — kinetic cases: try a resonant-layer-width-based spot for kinetic runs, where the relevant layer is not the resistive one. Motivation from issue #376 (
handoff/issue376/RESULTS.md§36): on a DIII-D kinetic-calculated case, the resonant-layer surface term is ~20% of the total NTV torque and the PE-vs-NTV comparison agrees to 0.8% only once that layer window is excluded — so the choice of matching radius is not cosmetic there. Related: #375 (Riccati + kinetic) and #423 (torque cross-check).
Also worth noting: a matching-radius bias of exactly this kind was already found and fixed on the Riccati side (#412), which is precedent that the radius choice materially moves Δ′-family numbers.
- Dominant language
- Julia
- Stars
- 11
- Forks
- 7
- Avg merge
- 4d 3h
- Merged PRs (30d)
- 70
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from OpenFUSIONToolkit/GPEC
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
OpenFUSIONToolkit/GPEC#644 ·
Maintainers usually reply within 3 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
OpenFUSIONToolkit/GPEC#643 ·
Maintainers usually reply within 3 days
-
PerturbedEquilibrium - FEATURE - Complete the resistive perturbed-equilibrium workflow from Galerkin and matched resultsPossibly taken @matt-pharr claimed this 1 day ago. Openfeature
OpenFUSIONToolkit/GPEC#635 · 1 comment · 1 assignee ·
Maintainers usually reply within 3 days
-
test
Difficulty 4/5 3-5 days Newbie friendliness 25/100
OpenFUSIONToolkit/GPEC#633 · 2 comments ·
Maintainers usually reply within 3 days
-
Tearing - FEATURE - Add a general modified Rutherford equation for island evolutionPossibly taken @StuartBenjamin claimed this 1 day ago. Openfeature
OpenFUSIONToolkit/GPEC#630 · 1 assignee ·
Maintainers usually reply within 3 days
All issues in OpenFUSIONToolkit/GPEC
Similar issues
-
`ShallowWaterModel` allocates ~9 KiB per grid point per RK3 stage on the CPUPossibly taken @ali-ramadhan claimed this today. Openperformance 🏍️
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
CliMA/Oceananigans.jl#6421 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
NCAR/musica#1118 · 1 comment · 1 reaction ·
Maintainers usually reply within 1 day
-
`AMSGrad` state starts at `epsilon` instead of zero, so zero gradients move parameters and small gradients are dampedPossibly taken @parth-patel010 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
FluxML/Optimisers.jl#247 · 1 comment ·
-
README should say that row and column order must matchPossibly taken @SAUMYARSH claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100