Work

NAP v2 reproduction code: two-step onset law of 2/1 tearing modes and fits to DIII-D onset statistics (MATLAB/GNU Octave)

Year: 2026
Type: software
Abstract: Code for the manuscript *Noise-activated collapse of differential rotation as the first step of tearing-mode onset: a fold model tested on DIII-D*, by Oleg Agamalov (Independent Researcher, Pivdennoukrainsk, Ukraine; ORCID 0000-0002-0330-8268). Version 1.1, 9 November 2026. Changes from 1.0: the uncertainties of the two-step fits (Table C3) are profile-likelihood half-widths (Δχ² = 1) instead of Jacobian standard errors, because the mean first-passage time has a square-root cusp at F = 1 and the Jacobian is unreliable when βc falls on a data point. Central values are unchanged. Also fixed: `nap2_mfpt.m` now accumulates the inner integral of Eq. (22) from b downwards; v1.0 formed it as a difference of cumulative sums, which loses precision above the fold at small noise (T1 too small by a factor 3 at F = 1.35, ρ = 0.11). No printed central value of v1.0 changed, but the error biased the profile likelihood at low ρ. `nap2_mfpt.m` v1.1 agrees with the independent Python quadrature to 4 × 10−12 on 84 (F, ρ) points (F = 0.5–6, ρ = 0.08–0.40). ## What it reproduces | Item in the paper | Where ||---|---|| Table 3 (alternative laws; two-step fits) | `nap2_main.m` §1–2 || Table C3 (all 18 two-step fits) | `nap2_main.m` §2 || Half-rate points (0.5–12.5 % below βc; Δf+ = 1.07–2.5 √K) | `nap2_main.m` §3 || Rotation margins for a 10 s mean waiting time (section 5) | `nap2_main.m` §3 || Tables C1, C2; passage time at the fold | `nap2_main.m` §4 || Monte Carlo check of Eq. (22) | `nap2_main.m` §5 || Figures 4 and 5 | `nap2_main.m` §6 → `nap2_fig4_twostep.png`, `nap2_fig5_timescales.png` | The closure simulations of section 2 (figures 1–3) are in a separate deposit: https://doi.org/10.5281/zenodo.23491727.
Language: English
Open Access status: green
OpenAlex ID: W7225622673
Cites:
Cited by:
Related to: