From 53ae808102d7312187c65f0dc7c930b225611639 Mon Sep 17 00:00:00 2001 From: logan-nc Date: Sat, 15 Aug 2026 14:01:44 -0400 Subject: [PATCH] KineticForces - BUG FIX - drop the spurious major radius from the omega_D prefactor The general-aspect-ratio precession prefactor carried ro^2 where it should carry ro. wbbar = ro*2pi/((2-sigma)*I1) already contains one factor of ro that its own normalization bhat = sqrt(2T/m)/ro cancels; reusing wbbar inside wdbar imports that ro a third time, while dhat = (T/q)/(bo*ro^2) removes only the two written explicitly. Dimensionally, both bounce integrals carry the J*b*dtheta = dl length, so I1 is a length and I2/I1 is 1/Wb. With T/q in volts and V/Wb = 1/s, the prefactor 4*pi*wdfac*(I2/I1)*(T/q) is already a frequency, and the surviving ro left omega_D in m/s. Verified by holding the physics fixed and varying only the machine size: the old form scales as ro (ratio 2.0 when ro is doubled), the corrected form is ro-invariant (ratio 1.0). omega_b, built from the same I1, is untouched and keeps its correct v_th/L scaling. Julia analog of Fortran GPEC PR #281, which measured the same correction against an independently validated guiding-centre precession operator: the least-squares slope of omega_D against the reference moves from -6.49 (= -ro on that ITER equilibrium) to -1.02, with omega_b agreeing to within [0.9964, 1.0011] both before and after as the control. This changes omega_D by a factor of ro on every machine, so it moves the resonance denominator and all NTV torque. Only the magnitude is addressed here; the overall sign convention is a separate question and is not touched. Co-Authored-By: Claude Fable 5 --- src/KineticForces/BounceAveraging.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/KineticForces/BounceAveraging.jl b/src/KineticForces/BounceAveraging.jl index 63a59aedc..372bcdaa8 100644 --- a/src/KineticForces/BounceAveraging.jl +++ b/src/KineticForces/BounceAveraging.jl @@ -632,9 +632,13 @@ function _bounce_integrate( return 0.0, 0.0, 0.0, nothing end - # Bounce-averaged frequencies + # Bounce-averaged frequencies. wbbar already carries one factor of ro that its own + # normalization bhat = sqrt(2T/m)/ro cancels; reusing it inside wdbar imports that ro + # a third time while dhat = (T/q)/(bo·ro²) removes only the two written explicitly, so + # the drift prefactor takes ro, not ro². (Otherwise ω_D = wdbar·dhat carries a surplus + # length: 4π·(I₂/I₁)·(T/q) is already V/Wb = 1/s, so the extra ro leaves m/s.) wbbar = ro * twopi / ((2 - sigma) * total_wb) - wdbar = ro^2 * bo * wdfac * wbbar * 2 * (2 - sigma) * total_wd + wdbar = ro * bo * wdfac * wbbar * 2 * (2 - sigma) * total_wd # Phase factor pl_i = exp(-2πi·lnq·fsi_wb(θ_i)/((2-σ)·total_wb)), using the # cumulative spline integral of the bounce action.