PENTRC: restore pitch-consistent clar normalizations (omega_b /sqrt(bo), omega_D /bo) - #289
Conversation
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 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Rewp8poxoQyorK48SwxEUv
|
Ran the verification exercise recommended in the PR body: Mechanical check — pointwise ratio of
The patch multiplies by exactly the claimed factors and nothing else (the omega_b ratio squared reproduces the omega_D ratio to 5 digits, which is how Physics check — slope of
Predicted: before = 1.408 / 1.983, after = 1.0. On the most LAR-like surface (eps = 0.11) the post-fix slopes are 1.018 and 1.12 where the pre-fix code sat at 1.43 (= sqrt(bo)) and 2.22 (= bo x 1.12). The drift away from 1 at larger eps is the circular-large-aspect-ratio approximation error on a shaped, up-down-asymmetric equilibrium — it is identical before and after (the before/after ratio is sqrt(bo), bo at every surface), so it does not confound the measurement. The psi=0.25 omega_D fit is the least well conditioned (zero-crossing location differs most from GAR there). This is the analogue of #281's slope test with the same outcome pattern: slope magnitude moves from the predicted spurious factor to ~1, with the residual explained by the approximation the method is defined by. 🤖 Generated with Claude Code |
|
Correction / downgrade of the previous comment's "physics check". Red-teaming the verification exposed a flaw in it: the clar-vs-tgar slope comparison uses one in-repo method as the reference for the other, and on the DIII-D-like case I ran that discriminating case: the in-repo What still stands, and what the case for this patch actually rests on:
So the honest status is: this patch is established by construction + units + provenance, not by an independent numerical benchmark, and the empirical gate proposed in the PR body — pointing the external reference operator of #281 at the clar branch (predicted slopes 🤖 Generated with Claude Code |
|
Documentary closure: checked against the PENT paper itself (Logan, Park, Kim, Wang & Berkery, Phys. Plasmas 20, 122507 (2013) — the paper cited at
With this, the paper, the 2013 PENT code, the 2017 companion paper (Eq. (83)), the units chain, and the exact mechanical verification all agree; the 2015-onward lines are isolated as the sole outliers. 🤖 Generated with Claude Code |
Fixes #287. Companion to #281, same root cause found via the git archaeology done for that review.
What this changes
Two factors in the
clarbounce-average branch ofpentrc/torque.F90:plus a comment recording why.
Why
In PENT (
pent/profile.f, 2013-2015) the pitch variable was dimensional (vpar = 1 - lmda*b,lmdain 1/Tesla) and these formulas were consistent with it:lmda*bounder the square root was dimensionless, andwdbar*dhat = (T/chrg)*2*q*lmda*G/(ro**2*eps)was a frequency becauselmdacarried the1/bo.The PENT->PENTRC rewrite (
da0e6067, June 2015) nondimensionalized the pitch (Lambda = lmda_pent*bo,vpar = 1 - (lmda/bo)*b) but kept theclartext verbatim. Substitutinglmda_pent = Lambda/bo:kappamaps exactly (PENT'skk = (1/bo - lmda(1-eps))/(2*eps*lmda)is identical to PENTRC'skk = (1 - lmda(1-eps))/(2*eps*lmda)), so trapped-space geometry needs no change;wbbarretained a spurioussqrt(bo)andwdbara spuriousbo.So
clarhas reportedomega_binflated bysqrt(bo)(~1.4-2.3x) andomega_Dinflated bybo(~2-5.3x) since 2015. This PR restores exactly the forms PENT evaluated. This is the same failure mode as the GARroin #281 — normalization conventions changed under formulas that were not updated — and, like #281, it multiplies by positive numbers and changes no sign.Scope
clarmethod (fbncechannels 1-3:omega_b,omega_D, and thewbbar-scaled action).rlarmethod's flux-surface estimators (wbhat/wdhat, built fromwtran/wgyro) are dimensionally sound and untouched.Verification status
Analytic + historical (the PENT mapping above); compiles cleanly with gfortran. It has not been benchmarked against an independent reference operator the way #281 was — a re-run of #281's slope-vs-reference measurement on the
clarbranch should readsqrt(bo)andbobefore this patch and ~1 after, and would be a welcome check before merging.🤖 Generated with Claude Code
https://claude.ai/code/session_01Rewp8poxoQyorK48SwxEUv