From 19082baf3c09ea31b7c3bfd46ac046792dece85f Mon Sep 17 00:00:00 2001 From: logan-nc Date: Sun, 2 Aug 2026 11:07:41 -0400 Subject: [PATCH] PENTRC - BUGFIX - Restore pitch-consistent clar normalizations The clar bounce/precession formulas were carried over textually from PENT, where the pitch variable was dimensional (1/Tesla). PENTRC's pitch is the dimensionless Lambda = lmda_pent*bo, so the verbatim text inflated omega_b by sqrt(bo) and omega_D by bo. Removing the bo under the wbbar square root and adding it to the wdbar denominator restores the forms PENT evaluated (kappa maps identically and needs no change). Fixes #287 Co-Authored-By: Claude Fable 5 Claude-Session: https://claude.ai/code/session_01Rewp8poxoQyorK48SwxEUv --- pentrc/torque.F90 | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pentrc/torque.F90 b/pentrc/torque.F90 index e5b69910d..3fadbf2c8 100644 --- a/pentrc/torque.F90 +++ b/pentrc/torque.F90 @@ -443,10 +443,16 @@ subroutine tpsi(tpsi_var,psi,n,l,zi,mi,wdfac,divxfac,electron, & kappa = sqrt((1 - lmda*(1- epsr))/(2*epsr*lmda)) endif lnq = 1.0*l - ! cylindrical bounce and precessions - wbbar = pi*SQRT(2*epsr*lmda*bo)/(4*q*ro*ellipk(kappa**2)) + ! cylindrical bounce and precessions. These forms come from + ! PENT, where the pitch variable was dimensional (1/Tesla, + ! vpar = 1 - lmda*b). Here lmda is the dimensionless + ! Lambda = lmda_pent*bo, so the PENT expressions map to + ! sqrt(2*epsr*lmda) (no bo) and a bo in the wdbar + ! denominator; keeping the PENT text verbatim inflated + ! omega_b by sqrt(bo) and omega_D by bo. + wbbar = pi*SQRT(2*epsr*lmda)/(4*q*ro*ellipk(kappa**2)) wdbar = (2*q*lmda*(ellipe(kappa**2)/ellipk(kappa**2)-0.5)& - /(ro**2*epsr))*wdfac + /(bo*ro**2*epsr))*wdfac bhat = SQRT(2*kin_f(s+2)/mass) dhat = (kin_f(s+2)/chrg) ! perturbed action Eq. (12) [Park, Phys. Rev. Lett. 2009] divided by 2pi for DCON phi normalization