Toroidal coordinate system#
Metric terms#
The transformations from cylindrical coordinates \(\left \{R, \Phi, Z \right \}\) to toroidal coordinates \(\left \{r, \theta, \zeta \right \}\) are
where the exact relations are defined through the flux-surface parameterisation chosen. Here \(\Phi\) is oriented anti-clockwise when viewed from above, \(\zeta\) is oriented clockwise, and \(\theta\) is oriented anti-clockwise around the flux surface, such that \(\{R, \Phi, Z \}\) and \(\{r, \theta, \zeta \}\) form right-handed coordinate systems.
The covariant metric components (\(g_{i j} = \partial \mathbf{r} / \partial \xi^i \cdot \partial \mathbf{r} / \partial \xi^ j\), for position vector \(\mathbf{r}\) and general coordinates \(\xi^i\)) are
with the Jacobian
Note that in general \(g_{r \theta} \neq 0\) and thus the toroidal coordinate system is non-orthogonal.
The contravariant metric components (\(g^{i j} = \nabla \xi^i \cdot \nabla \xi^j\)) are
Physical quantities#
The magnetic field can be written
where \(\psi^{\prime} = \mathrm{d} \psi / \mathrm{d} r\) is the radial derivative of the poloidal magnetic flux divided by \(2 \pi\), \(q(r)\) is the safety factor, \(B_{\zeta}(r)\) is the current function
where \(\left \langle f \right \rangle = \frac{1}{2 \pi} \int_{- \pi}^{\pi} f \, \mathrm{d} \theta\) denotes a poloidal average and \(G_0(r, \theta)\) is a periodic function in \(\theta\) which satisfies
The current density is
where, from the local Grad-Shafranov solution, we have
where \(P = P\left( r \right)\) is the equilibrium plasma pressure, \(q^{\prime} = \mathrm{d}q/\mathrm{d} r\) is the radial derivative of the safety factor and
The Grad-Shafranov solution also constrains the radial derivative of the Jacobian to be
where \(\psi^{\prime \prime} = \mathrm{d}^2 \psi / \mathrm{d} r^2\) is arbitrary, due to it always appearing as part of the combination \(\partial \mathcal{J}_{r \theta \zeta} / \partial r - \mathcal{J}_{r \theta \zeta} \left( \psi'' / \psi' \right)\) in quantities of interest for local equilibria.
Global field-aligned coordinates#
Metric terms#
To obtain field-aligned coordinates we transform from the toroidal system to the global field-aligned system, \(\{r, \theta, \zeta \} \rightarrow \{r, \alpha, \theta \}\), defined by
where \(\sigma_{\alpha}\) takes values of either \(1\) or \(-1\). For \(\sigma_{\alpha} = 1\), \(\{r, \alpha, \theta \}\) forms a right-handed system, such as in GENE, whereas with \(\sigma_{\alpha} = -1\) then \(\{r, \theta, \alpha\}\) forms a right-handed system, such as in CGYRO. The covariant metric components are, using \(\partial \zeta / \partial r = \sigma_{\alpha} \partial \alpha / \partial r\), \(\partial \zeta / \partial \theta = \sigma_{\alpha} \partial \alpha / \partial \theta\) and using a tilde to denote the field-aligned system,
where \(\partial \alpha / \partial r\) and \(\partial \alpha / \partial \theta\) are calculated below. Note that the Jacobian remains unchanged from the toroidal system. The contravariant metric components are
Evaluating \(\partial \alpha / \partial \theta\), we find
where we have used equation [eq:G0 deriv]. To then calculate \(\partial \alpha / \partial r\), we differentiate equation [eq:dalphadtheta] with respect to \(r\) and integrate over \(\theta\). First differentiating, we get
where the forms of \(\mathrm{d}B_{\zeta} / \mathrm{d} r\) and \(\partial \mathcal{J}_{r \theta \zeta} / \partial r\) are given by equations [eq:dBzetadr] and [eq:Radial_Deriv_Jacobian]. Now integrating over \(\theta\),
where \(\left. \partial \alpha / \partial r \right\vert_{\theta = 0} = 0\) is assumed. Note that \(\partial \alpha / \partial r\) is not periodic, but satisfies