Skip to content

Commit 22f6281

Browse files
logan-ncclaude
andcommitted
PerturbedEquilibrium - DOCS - Shorten the toroidal torque docstring annotation
The eight-line bullet added to PerturbedEquilibriumState read as session notes rather than a field description, against the concise-comment standard in CLAUDE.md. Cut it to three lines carrying the three facts a reader needs: it is the boundary-response torque, it matches the volume-integrated Euler-Lagrange kinetic torque only for converged self-consistent solutions, and it is a distinct construction from the KineticForces NTV torque. The δW surface-term derivation and the grid-quality-diagnostic commentary belong in the docs, not the struct docstring. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CV1jBWtEgxA1aQvjB9SBhs
1 parent b211020 commit 22f6281

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

src/PerturbedEquilibrium/PerturbedEquilibriumStructs.jl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -145,14 +145,9 @@ well-conditioned flux-space inductances L, Λ:
145145
- `vacuum_energy` - Re( ⟨Φ_x, L⁻¹·Φ_x⟩ ) / 4 (energy to perturb the vacuum)
146146
- `surface_energy` - Re( ⟨Φ_tot, L⁻¹·Φ_tot⟩ ) / 4 (energy at the control surface)
147147
- `plasma_energy` - Re( ⟨Φ_tot, Λ⁻¹·Φ_tot⟩ ) / 4 (energy to perturb the plasma; Fortran's "total energy") # Response fields in mode space [npsi, mpert]
148-
- `toroidal_torque` - -2·n·Im( ⟨Φ_tot, Λ⁻¹·Φ_tot⟩ / 4 ) — the **boundary-response torque**:
149-
the net toroidal torque implied by the anti-Hermitian part of the plasma inductance at the
150-
control surface. For exact self-consistent solutions this equals the volume-integrated
151-
kinetic torque of the same Euler-Lagrange model (the δW surface-term identity), so any
152-
numerical difference from a ψ-resolved torque profile is a solution/grid-quality diagnostic,
153-
not physics. It is a *distinct construction* from the NTV torque under `KineticForces/`
154-
(independent energy-space bounce-average evaluation); agreement between the two tests whether
155-
the EL matrices faithfully discretize the drift-kinetic operator. Zero for ideal (Hermitian) runs.
148+
- `toroidal_torque` - -2·n·Im( ⟨Φ_tot, Λ⁻¹·Φ_tot⟩ / 4 ) — the boundary-response torque, zero for ideal
149+
(Hermitian) runs. Equals the volume-integrated Euler-Lagrange kinetic torque only for converged
150+
self-consistent solutions, and is a distinct construction from the KineticForces NTV torque.
156151
"""
157152
@kwdef mutable struct PerturbedEquilibriumState
158153
# Radial grid (FFS ODE integration ψ_n values) [npsi]

0 commit comments

Comments
 (0)