Local safety factor

Local safety factor $ \hat{q}$ is defined by

$\displaystyle \hat{q} = \frac{\mathbf{B} \cdot \nabla \phi}{\mathbf{B} \cdot \nabla \theta},$ (178)

which characterizes the local pitch angle of a magnetic field line on a magnetic surface (i.e. on $ (\theta, \phi)$ plane). Substituting the contravariant representation of the magnetic field, Eq. (176), into the above equation, the local safety factor is written

$\displaystyle \hat{q} (\psi, \theta) = - \frac{g}{R^2} \frac{\mathcal{J}}{\Psi'} .$ (179)

Note the expression $ \hat{q}$ in Eq. (179) depends on the Jacobian $ \mathcal{J}$. This is because the definition of $ \hat{q}$ depends on the definition of $ \theta $, which in turn depends on the the Jacobian $ \mathcal{J}$. [In passing, note that in terms of $ \hat{q}$, the contravariant form of the magnetic field, Eq. (176), is written

$\displaystyle \mathbf{B}= - \Psi' (\nabla \phi \times \nabla \psi + \hat{q} \nabla \psi \times \nabla \theta) .$ (180)

] The global safety factor is defined as the poloidal average of the local safety factor,
$\displaystyle q (\psi)$ $\displaystyle \equiv$ $\displaystyle \frac{1}{2 \pi} \int_0^{2 \pi} \hat{q} d \theta$ (181)
  $\displaystyle =$ $\displaystyle - \frac{1}{2 \pi} \frac{g}{\Psi'} \int_0^{2 \pi}
\frac{\mathcal{J}}{R^2} d \theta .$ (182)

The physical meaning of $ \hat{q}$ is obvious: it represents the number of toroidal circles a magnetic field line travels when the line travels a complete poloidal circle. Note that $ \hat{q}$ and $ \hat{q}$ defined this way can be negative, which depends on the choice of the positive direction of $ \phi $ and $ \theta $ coordinates (note that the safety factor given in G-eqdsk file is always positive, i.e. it is the absolute value of the safety factor defined here).

(In passing, let us consider the numerical calculation of $ q$. Using the relation $ d \ell_p$ and $ d \theta$ [Eq. (188)], equation (182) is further written

$\displaystyle q (\psi)$ $\displaystyle =$ $\displaystyle - \frac{1}{2 \pi} \frac{g}{\Psi'} \oint \ensuremath{\operatorname{sign}}
(\mathcal{J}) \frac{d \ell_p}{R \vert \nabla \psi \vert}$  
  $\displaystyle =$ $\displaystyle - \frac{1}{2 \pi} g \frac{\ensuremath{\operatorname{sign}} (\math...
...operatorname{sign}}
(\Psi')} \oint \frac{d \ell_p}{R \vert \nabla \Psi \vert} .$ (183)

Equation (183) is used in the GTAW code to numerically calculate the value of $ q$ on magnetic surfaces, which agrees with the value specified in the G-eqdsk file. Using $ B_p = \vert \nabla \Psi \vert / R$ and $ B_{\phi } = g / R$, the absolute value of $ q$ is written

$\displaystyle \vert q\vert = \frac{1}{2 \pi} \oint \frac{1}{R} \frac{\vert B_{\phi} \vert}{B_p} d \ell_p,$ (184)

which is the familiar formula we see in textbooks.)

yj 2018-03-09