Process reference: mode_frequency
Generated from the docstrings of vaft.process.mode_frequency:
1 public functions. Each entry is what
vaft.process.describe("mode_frequency.<name>") prints.
All process categories
Overview
A magnetic perturbation with toroidal mode number n that is carried by the
plasma at its resonant surface |q| = |m/n| is seen in the laboratory frame
at f = n f_phi, where f_phi is the toroidal rotation frequency of that
surface (issue #460). The functions here turn an equilibrium (which locates
the surface) and a toroidal-rotation profile (which says how fast it turns)
into that prediction, as a time track that any fluctuation view – a Mirnov,
soft X-ray, ECE or reflectometry spectrogram – can draw over its own map.
The prediction is a hypothesis to compare with, never an identification: a
spectrogram ridge that follows the (2, 1) track is consistent with a
2/1 mode convected by the toroidal flow, nothing more. Poloidal flow, the
E x B and diamagnetic drifts, a mode’s own frame frequency, and the
difference between the impurity rotation a CES measures and the bulk flow all
move a real mode off the track; none of them is modelled. Mode-number
identification from the phase across a probe array is a separate analysis
(vaft.process.magnetics.toroidal_mode_analysis).
The model is named in every result (model="toroidal_rotation"), so a
figure or a record built from a track says which physical approximation drew
it.
| Symbol | Meaning | Unit |
|---|---|---|
| q | safety factor; resonance is |q| = |m/n| | - |
| m, n | poloidal and toroidal mode numbers of the hypothesis | - |
| rho_s | flux coordinate of the rational surface | - |
| v_phi | toroidal ion velocity on the outboard midplane | m/s |
| R_out | outboard-midplane major radius of the rational surface | m |
| omega_phi | toroidal angular rotation frequency, v_phi / R_out | rad/s |
| f_phi | toroidal rotation frequency, omega_phi / (2 pi) | Hz |
| f_pred | predicted lab-frame frequency, n f_phi | Hz |
Rigid rotation of a flux surface. omega_phi is constant on a flux
surface to lowest order, so it is the quantity interpolated; a velocity is
turned into it at the major radius where it was taken. VAFT’s profile
reconstruction maps CES channels on the outboard midplane, so a stored
velocity.toroidal is an outboard-midplane velocity and is divided by
R_out of the surface (equilibrium.profiles_1d.r_outboard), not by the
axis radius: on VEST, with R_axis ~ 0.4 m and R_out up to 0.7 m,
the axis radius would overstate the edge rotation frequency by up to ~75 %.
A stored rotation_frequency_tor already is omega_phi and is used as is.
Signs. f_phi keeps the sign of the stored rotation (positive along
the toroidal direction of the source’s COCOS) and f_pred = n f_phi keeps
the sign of n as requested; resonance itself is |q| = |m/n|, so the
COCOS sign of q never decides whether a surface exists. A single probe’s
spectrogram cannot tell the propagation direction, so a view draws
|f_pred|.
Gaps, never extrapolation. A sample is valid only where the surface exists, the rotation grid covers it radially and the rotation profiles cover its time; elsewhere the track holds NaN and states why.
Functions
mode_frequency_tracks | Predicted lab-frame frequency of each (m, n) from the rotation at |q| = m/n.
Convention |
No function matches.
mode_frequency_tracks
Machine-independentConvention-sensitive
source
mode_frequency_tracks(ods, modes, *, model='toroidal_rotation', ion_index=0, time_tolerance=0.0)
Predicted lab-frame frequency of each (m, n) from the rotation at |q| = m/n.
For every equilibrium slice the rational surfaces are located by
vaft.process.equilibrium.rational_surfaces (the one resolver; modes
that share m/n share it), the toroidal rotation is evaluated there and
f_pred = n f_phi follows. Each root of each mode is its own track, so a
reversed-shear q = 2 gives two tracks and is never reduced to one.
The result is renderer-independent: any fluctuation view can draw it.
| Name | Type | Unit | Description |
|---|---|---|---|
ods | ODS or IMAS entry | - | Holds |
modes | sequence of (int, int) | - | The |
model | str, optional | - | The prediction model; only |
ion_index | int, optional | - | Position of the ion in |
time_tolerance | float, optional | s | How far outside the rotation profiles’ time span an equilibrium slice may lie and still take the nearest profile; 0 pairs only slices the profiles bracket. |
| Returns | |||
| — | ModeFrequencyTracks | - |
|
Convention
Resonance is |q| = |m/n|. f_phi carries the sign of the stored
rotation (positive along the toroidal direction of the source COCOS) and
f_pred that of n as given; a single-probe spectrogram shows
|f_pred|. A velocity is converted at the outboard-midplane radius of
the surface, R_out, because the stored velocity is an outboard-midplane
(CES) value; R_axis is never substituted.
Raises
ValueErrormodelis not one ofMODE_FREQUENCY_MODELS, a mode is not a whole non-zero(m, n),time_toleranceis negative, the input has no equilibrium slice with a time, or no core profile carries a toroidal rotation of ionion_indexon a flux grid.
Processing steps · Applicability · Limitations · Provenance
Processing steps
- Read every timed equilibrium slice:
psi_normfrom the globalpsi_axis/psi_boundary(else the profile’s ends), the authenticrho_tor_norm(stored, else integrated fromq) andr_outboard(stored, else derived from the 2-D flux map at the axis height without writing the input). - Read every timed rotation profile, preferring
rotation_frequency_torovervelocity.toroidal, onrho_tor_normoverrho_pol_norm; agrid.rho_tor_normthat is thesqrt(psi_N)proxy of the profile’s owngrid.psiis read as therho_pol_normit is. - Per slice, locate
|q| = |m/n|once per distinct ratio withvaft.process.equilibrium.rational_surfaces. - Per root, evaluate
omega_phion the two rotation profiles that bracket the slice time (linear in the profile’s coordinate, a velocity divided byR_outof the root), then linearly in time. f_phi = omega_phi / 2 piandf_pred = n f_phiper mode; any failed step leaves NaN and its status.
Applicability
Machine-independent. Any equilibrium with a q profile and any toroidal
rotation profile on a normalised flux grid; on VEST the rotation is CES
data reconstructed into core_profiles.
Limitations
Toroidal rotation only: poloidal flow, E x B and diamagnetic drifts and
the mode’s own frame frequency are not modelled, and the measured impurity
rotation stands in for the bulk flow, so agreement with a track is
consistency with the (m, n) hypothesis, not identification. The
rotation profile’s flux coordinate is taken as the equilibrium’s: a
profile mapped through a different reconstruction is not re-mapped.
Branches are associated across time by root order outward, not by
continuity. Nothing is extrapolated, radially or in time.
Provenance
- R. J. La Haye, “Neoclassical tearing modes and their control”, Phys. Plasmas 13, 055501 (2006): the lab-frame frequency of a mode convected by toroidal rotation,
omega = n Omega_phi; issue #460 for the interpolation policy and the result contract.