Formula reference: magnetics

This page is generated from the docstrings of vaft/formula/magnetics.py: 2 public functions. The category overview and notation come from the module docstring; every entry below is what vaft.formula.describe("magnetics.<name>") prints. Back to the formula reference index.

Overview

One home for the rule that turns a stored IMAS poloidal_angle into a sensitive axis, so the angle written into the IDS and the projection a consumer applies cannot move apart (issue #288). The Data Dictionary defines poloidal_angle as a clockwise angle from the horizontal plane, zero when the sensor normal points toward increasing major radius. Clockwise from +R turns toward -Z, so the axis is (cos(angle), -sin(angle)) in (R, Z) and a probe measuring +Bz is stored as 3*pi/2. Projecting with (cos, +sin) – the counter-clockwise reading – inverts every probe while leaving flux loops untouched, which is exactly how the mistake hides: VAFT carried it until #288, and a downstream solver carried it after #293 moved the angle.

Functions

  • probe_axis — Direction cosines (c_R, c_Z) of a poloidal-field probe’s sensitive axis.
  • project_poloidal_field — The component of (B_R, B_Z) a probe oriented at poloidal_angle reads.

probe_axis

probe_axis(poloidal_angle)

Direction cosines (c_R, c_Z) of a poloidal-field probe’s sensitive axis.

\[c_R = \cos\theta, \qquad c_Z = -\sin\theta\]

probe_axis(3*pi/2) == (0, +1): VEST’s +Bz probes.

ParameterTypeUnitDescription
poloidal_anglefloat or ndarrayrad

Probe orientation angle in the DD convention; scalar or array.

ReturnsTypeUnitDescription
tuple of ndarray-

(c_R, c_Z) direction cosines, each the shape of the input.

References.

  1. IMAS Data Dictionary, magnetics.b_field_pol_probe[:].poloidal_angle.

project_poloidal_field

project_poloidal_field(b_r, b_z, poloidal_angle)

The component of (B_R, B_Z) a probe oriented at poloidal_angle reads.

\[B_{\mathrm{probe}} = B_R \cos\theta - B_Z \sin\theta\]

b_r and b_z may carry any trailing shape (a time series, a response row); poloidal_angle must broadcast against them – pass a scalar per probe, or angles[:, None] for a stack of rows.

ParameterTypeUnitDescription
b_rfloat or ndarrayT

Radial field component.

b_zfloat or ndarrayT

Vertical field component.

poloidal_anglefloat or ndarrayrad

Probe orientation angle in the DD convention.

ReturnsTypeUnitDescription
ndarrayT

Projected field along the probe axis.

References.

  1. IMAS Data Dictionary, magnetics.b_field_pol_probe[:].poloidal_angle.

Refreshing this snapshot

From a checkout of the develop branch, run:

python -m vaft.formula.catalog --output /path/to/vaft-gh/_data/formula_catalog.yml

The snapshot records the SHA-256 of every vaft/formula/*.py source file; documentation validation compares them when VAFT_REGISTRY_SOURCE points to the corresponding source checkout. The same text is available offline as vaft.formula.describe("<name>"), vaft.formula.search("<text>") and vaft.formula.list_formulas(category="<category>").

results matching ""

    No results matching ""