InnerLayer.SLAYER - BUGFIX - Fail clearly when the minor-radius derivative at a rational surface is unusable
Maintainers usually reply within 3 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
Research direction
Start with src/InnerLayer/SLAYER/LayerInputs.jl and LayerParameters.jl, where the issue says build_slayer_inputs computes the surface values; trace how each surface’s r_s and da/dψ are obtained. Check both values for finite positivity across every dc_type, and consider the requested migration note for this behavior change. Done means invalid values produce one error naming the surface index and ψ, with tests covering the listed cases.
Written by the indexing model from the issue text.
Description
Summary
build_slayer_inputs converts the outer Δ′ to the r_s reference with K = r_s / (da/dψ). When da/dψ at a rational surface is not a usable positive number, what happens depends on how it is unusable, and none of the outcomes names the real problem.
What happens today
From reading src/InnerLayer/SLAYER/LayerInputs.jl and LayerParameters.jl on develop; not reproduced with a run.
| da/dψ at the surface | outcome |
|---|---|
| zero | r_based_shear throws "da/dψ must be non-zero" |
| NaN or Inf, with a critical-Δ model on and D_R ≠ 0 | the W_d loop never converges and throws "Wd iteration failed to converge" |
NaN, dc_type = "none" |
NaN layer parameters pass through with only the warning below |
| finite and negative | a warning (at most three per session), K = 1, Δ′ left unconverted, and the run returns a plausible-looking root from mismatched references |
For nested flux surfaces da/dψ is positive, so any of these means something upstream is wrong (spline noise at the extreme edge, or an unsuitable radial label). The last row is the one that can produce a wrong number without stopping.
A related gap: under rs_method = :volume the minor radius itself can come out as zero while da/dψ stays positive. Then K = 0, the derived toroidal factor is zero, and the toroidal critical Δ is switched off without a message.
Proposal
Check the pair (r_s, da/dψ) once, right where they are computed for each surface, and raise an error that names the surface index and ψ when either is not a finite positive number, for every dc_type. That replaces three different symptoms with one message.
The cost is that one bad surface stops a SLAYER run that today finishes with a warning, so this is a behaviour change and needs a migration note.
- 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 today. 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 78/100
Maintainers usually reply within 1 day