KineticForces.calculate_rlar (src/KineticForces/Torque.jl) is currently a @warn+return-zero stub matching calculate_clar. PR #112 stubbed it after physics review confirmed that the prior expression kappaint_val = sqrt(mean(abs.(dbob_m_f).^2)) was dimensionally and structurally unrelated to the correct bounce-averaged κ-integral.
Required port
- Fortran reference:
~/Code/gpec/pentrc/torque.F90:399-414 (RLAR driver) and ~/Code/gpec/pentrc/pitch.f90:445-530 (kappaintgrl).
- Paper reference: Eq. 14 of Park, Boozer, Menard, "Nonambipolar Transport by Trapped Particles in Tokamaks," PRL 102, 065002 (2009); Logan & Park, PoP 20, 122507 (2013), Sec. III.
- The correct κ-integral is a 50-point spline integral over κ ∈ (0,1) of
Σ_{i,j} 2κ · 0.25·(f⁺ᵢf⁺ⱼ + f⁻ᵢf⁺ⱼ + f⁺ᵢf⁻ⱼ + f⁻ᵢf⁻ⱼ) · Re(δBᵢ δB*ⱼ) / (4·K(κ²))
where f± are bicubic-spline evaluations of the precomputed F_{kmnql}(κ, m−nq±l) table.
Acceptance
calculate_rlar produces the same dT/dψ profile (within rtol=1e-3) as Fortran PENTRC for the examples/a10_kinetic_example/ reference case.
- The existing
@warn stub is removed and a regression baseline is added under regression-harness/cases/.
KineticForces.calculate_rlar(src/KineticForces/Torque.jl) is currently a@warn+return-zero stub matchingcalculate_clar. PR #112 stubbed it after physics review confirmed that the prior expressionkappaint_val = sqrt(mean(abs.(dbob_m_f).^2))was dimensionally and structurally unrelated to the correct bounce-averaged κ-integral.Required port
~/Code/gpec/pentrc/torque.F90:399-414(RLAR driver) and~/Code/gpec/pentrc/pitch.f90:445-530(kappaintgrl).Σ_{i,j} 2κ · 0.25·(f⁺ᵢf⁺ⱼ + f⁻ᵢf⁺ⱼ + f⁺ᵢf⁻ⱼ + f⁻ᵢf⁻ⱼ) · Re(δBᵢ δB*ⱼ) / (4·K(κ²))where
f±are bicubic-spline evaluations of the precomputedF_{kmnql}(κ, m−nq±l)table.Acceptance
calculate_rlarproduces the samedT/dψprofile (within rtol=1e-3) as Fortran PENTRC for theexamples/a10_kinetic_example/reference case.@warnstub is removed and a regression baseline is added underregression-harness/cases/.