Skip to content

DOCS - correct the PENTRC rotation and harmonic sign statements - #282

Open
krystophny wants to merge 1 commit into
PrincetonUniversity:developfrom
krystophny:agent/docs-sign-conventions-helicity
Open

DOCS - correct the PENTRC rotation and harmonic sign statements#282
krystophny wants to merge 1 commit into
PrincetonUniversity:developfrom
krystophny:agent/docs-sign-conventions-helicity

Conversation

@krystophny

@krystophny krystophny commented Jul 25, 2026

Copy link
Copy Markdown
Collaborator

Five corrections to docs/sign_conventions.rst, each verified against the executables rather than against the surrounding prose. Documentation only, no source changes.

Split out of #280, where they did not belong. Bundling them was worse than untidy: that text predated #269, so merging it would have reverted #269's correction that inverse_run recomputes q by flux-surface integration. This PR is written against current develop and carries only the additive parts; the safety-factor section is left exactly as #269 has it.

The corrections

1. The native chart does not fix physical handedness. The coordinate section opened by asserting GPEC "uses right-handed magnetic coordinates". DCON's chart and its exp[2 pi i(m theta - n zeta)] decomposition are defined independently of the machine embedding, which is applied separately via helicity. Readers were inferring physical handedness from an abstract chart.

2. The machine embedding is now written down. phi_CCW = -h(2*pi*zeta + dphi) with h = helicity, from coil/field.F. Without this a reader cannot map a native toroidal quantity into the laboratory frame without reading the coil module.

3. "Positive omega_E is co-current for RH plasmas" was under-specified. In the CCW frame positive native omega_E has sign -h; relative to the plasma current its sign is (-h)/ipd = -btd. So it is co-current exactly when bt_direction="negative" — a statement about the absolute field direction, which cannot be recovered from helicity alone since helicity is only the product. For (ip_direction, bt_direction) = (positive, positive), positive native omega_E is clockwise and counter-current. Filed as #276.

4. The effective bounce harmonic sign was wrong. Printed as ell_eff = ell - sigma*n*q; every executable path uses ell + sigma*n*q (pentrc/pitch.f90:244, pentrc/torque.F90:605).

5. Added the zero-rotation caveat. read_kin replaces exactly-zero omega_E knots by 1e-9 rad/s before applying wpfac, so wefac=0, wpfac=1 is not an exact zero control. Linked to #275. Plus a source reference for the native-to-machine toroidal map.

Verification

An independent review checked items 3 and 4 against the source and confirmed both: ell + n*q at the two cited lines, and phi_CCW = -h(2*pi*zeta + dphi) with h = ipd*btd at coil/field.F:190 and coil/coil.F:163, giving the stated -btd relative sign.

Five corrections to docs/sign_conventions.rst, all verified against the
executables rather than against the surrounding prose:

- The coordinate section presented the native DCON chart as though it fixed
  physical handedness. It does not: the chart and its exp[2 pi i(m theta - n zeta)]
  decomposition are defined independently of the machine embedding, which is
  applied separately via helicity.

- The machine embedding is now stated explicitly as
  phi_CCW = -h(2 pi zeta + dphi) with h = helicity, from coil/field.F, so readers
  can map a native toroidal quantity to the laboratory frame without reading the
  coil module.

- 'Positive omega_E is co-current for RH plasmas' was under-specified. In the CCW
  frame positive native omega_E has sign -h, and relative to the plasma current
  its sign is (-h)/ipd = -btd. So it is co-current exactly when
  bt_direction='negative', which is a statement about the absolute field direction
  and cannot be recovered from helicity alone. Filed as issue PrincetonUniversity#276.

- The effective bounce harmonic was printed as ell - sigma*n*q. Every executable
  path uses ell + sigma*n*q (pentrc/pitch.f90:244, pentrc/torque.F90:605).

- Added a note that read_kin replaces exactly-zero omega_E knots by 1e-9 rad/s,
  so wefac=0 with wpfac=1 is not an exact zero control (issue PrincetonUniversity#275), and a source
  reference for the native-to-machine toroidal map.

Split out of the PENTRC numerical fixes, which these were previously bundled with.
An earlier draft of this change also rewrote the safety-factor section to say that
the inverse path inherits q from the input file; that is superseded by PrincetonUniversity#268, which
established that inverse_run recomputes q by flux-surface integration, and the
current text is left as PrincetonUniversity#268 has it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant