Skip to content

Commit 3480ecf

Browse files
committed
Merge branch 'develop' into bugfix/kf-periodic-vpar-spline
2 parents 228a8e9 + 4e430f1 commit 3480ecf

3 files changed

Lines changed: 10 additions & 3 deletions

File tree

src/PerturbedEquilibrium/PerturbedEquilibriumStructs.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,10 @@ well-conditioned flux-space inductances L, Λ:
144144
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)
147-
- `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 )
147+
- `plasma_energy` - Re( ⟨Φ_tot, Λ⁻¹·Φ_tot⟩ ) / 4 (energy to perturb the plasma; Fortran's "total energy")
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.
149151
"""
150152
@kwdef mutable struct PerturbedEquilibriumState
151153
# Radial grid (FFS ODE integration ψ_n values) [npsi]

src/PerturbedEquilibrium/Response.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ function compute_plasma_response!(
9595
state.vacuum_energy = real(vy)
9696
state.surface_energy = real(sy)
9797
state.plasma_energy = real(py) # Fortran's "total energy" is this pengy
98+
# Boundary-response torque: distinct construction from the KineticForces NTV torque —
99+
# see the PerturbedEquilibriumState docstring for the delineation of GPEC torque outputs.
98100
state.toroidal_torque = -2 * nn * imag(py)
99101

100102
xi_modes, b_modes = reconstruct_physical_fields(

src/PerturbedEquilibrium/Utils.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,10 @@ const PE_H5_ANNOTATIONS = [
345345
"Energies/vacuum_energy" => (; long_name="perturbed vacuum energy", units="J"),
346346
"Energies/surface_energy" => (; long_name="perturbed surface energy", units="J"),
347347
"Energies/plasma_energy" => (; long_name="perturbed plasma energy", units="J"),
348-
"Energies/toroidal_torque" => (; long_name="net toroidal torque on the plasma", units="N*m")
348+
"Energies/toroidal_torque" => (;
349+
long_name="boundary-response toroidal torque −2n·Im⟨Φ_tot,Λ⁻¹Φ_tot⟩/4: equals the volume-integrated Euler-Lagrange kinetic torque for converged self-consistent solutions; distinct construction from the KineticForces NTV torque",
350+
units="N*m"
351+
)
349352
]
350353

351354
# Attach long_name/units/dims + dimension scales (declared in-table) to the

0 commit comments

Comments
 (0)