From 2380bc6622488a767c42f17ada8883065b0987cb Mon Sep 17 00:00:00 2001 From: Christopher Albert Date: Wed, 21 Oct 2026 15:15:27 +0200 Subject: [PATCH] PENTRC - BUG FIX - Recover full CGL curvature from perpendicular field strength --- pentrc/torque.F90 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pentrc/torque.F90 b/pentrc/torque.F90 index 2002c0d2..7e594bd7 100644 --- a/pentrc/torque.F90 +++ b/pentrc/torque.F90 @@ -376,7 +376,7 @@ subroutine tpsi(tpsi_var,psi,n,l,zi,mi,wdfac,divxfac,electron, & jbb = (rzphi_f(4) * eqfun_f(1)**2) dbob = sum( dbob_m_f(:)*expm ) ! dB/B divx = sum( divx_m_f(:)*expm ) ! nabla.xi_perp - kapx = -0.5*(dbob+divx) + kapx = -(dbob+divx) cglspl%xs(i) = theta ! include 0.5 correction for quadratic calculations in complex analysis cglspl%fs(i,1) = rzphi_f(4)*0.5*abs(divx)**2 @@ -386,8 +386,8 @@ subroutine tpsi(tpsi_var,psi,n,l,zi,mi,wdfac,divxfac,electron, & call spline_int(cglspl) ! torque tpsi_var = 2.0*n*xj*kin_f(s)*kin_f(s+2) & ! T = 2nidW - *(0.5*(5.0/3.0)*cglspl%fsi(cglspl%mx,1)& - + 0.5*(1.0/3.0)*cglspl%fsi(cglspl%mx,2)) + *(0.5_r8*(5.0_r8/3.0_r8)*cglspl%fsi(cglspl%mx,1)& + + 0.5_r8*(1.0_r8/3.0_r8)*cglspl%fsi(cglspl%mx,2)) call spline_dealloc(cglspl) else tpsi_var=0