# Flux coordinates

### From FusionWiki

Flux coordinates in the context of magnetic confinement fusion (MCF) is a set of coordinate functions adapted to the shape of the flux surfaces of the confining magnetic trap. They consist of one flux label, often termed ψ and two angle-like variables θ,φ whose constant contours on the flux $(\psi({\mathbf x}) = {\textrm constant})$ surfaces close either poloidaly (φ) or toroidallly (θ).

In this coordinates, equilibrium vector fields like the magnetic field ${\mathbf B}$ or current density ${\mathbf j}$ have simplified expressions. A particular kind of flux coordinates, generally called magnetic coordinates, simplify the ${\mathbf B}$-field expression further by making field lines look straight in the (θ,φ) plane of that family of coordinates. Some popular choices of magnetic coordinate systems are Boozer coordinates and Hamada coordinates.

Sample flux surface of the TJ-II stellarator and a θ-curve (yellow) and φ-curve (red).

## General curvilinear coordinates

Here we briefly review the basic definitions of a general curvilinear coordinate system for later convenience when discussing toroidal flux coordinates and magnetic coordinates.

### Coordinates and basis vectors

Let ${\mathbf x}$ be a set of euclidean coordinates on ${\mathbb R}^3$ and let $(\psi(\mathbf{x}),\theta(\mathbf{x}),\phi(\mathbf{x}))$ define a change of coordinates, arbitrary for the time being. We can calculate the contravariant basis vectors as

$\mathbf{e}^i = \{\nabla\psi, \nabla\theta, \nabla\phi\}$

and the dual covariant basis defined as

$\mathbf{e}_i= \frac{\partial\mathbf{x}}{\partial{u^i}} \to \mathbf{e}_i\cdot\mathbf{e}^j = \delta_{i}^{j}~,$

and therefore relates to the contravariant vectors as

$\mathbf{e}_i = \frac{\mathbf{e}^j\times\mathbf{e}^k}{\mathbf{e}^i\cdot\mathbf{e}^j\times\mathbf{e}^k} = \sqrt{g}\;\mathbf{e}^j\times\mathbf{e}^k ~,$

where (i,j,k) are cyclic permutations of (1,2,3) and we have used the notation (u1,u2,u3) = (ψ,θ,φ). The Jacobian $\sqrt{g}$ is defined below. Similarly

$\mathbf{e}^i = \frac{\mathbf{e}_j\times\mathbf{e}_k}{\sqrt{g}} ~.$

Any vector field $\mathbf{B}$ can be represented as

$\mathbf{B} = (\mathbf{B}\cdot\mathbf{e}^i)\mathbf{e}_i = B^i\mathbf{e}_i$

or

$\mathbf{B} = (\mathbf{B}\cdot\mathbf{e}_i)\mathbf{e}^i = B_i\mathbf{e}^i ~.$

In particular any basis vector $\mathbf{e}_i = (\mathbf{e}_i\cdot\mathbf{e}_j)\mathbf{e}^j$. The metric tensor is defined as

$g_{ij} = \mathbf{e}_i\cdot\mathbf{e}_j \; ; \; g^{ij} = \mathbf{e}^i\cdot\mathbf{e}^j \; ; \; g^j_i = \mathbf{e}_i\cdot\mathbf{e}^j = \delta_i^j ~.$

The metric tensors can be used to raise or lower indices. Take

$\mathbf{B} = B_i\mathbf{e}^i = B_i g^{ij}\mathbf{e}_j = B^j\mathbf{e}_j~,$

so that

$B^j = g^{ij} B_i~.$

### Jacobian

The Jacobian of the coordinate transformation $\mathbf{x}(\psi, \theta, \phi)$ is defined as

$J = \det\left(\frac{\partial(x,y,z)}{\partial(\psi,\theta,\phi)}\right) = \frac{\partial\mathbf{x}}{\partial{\psi}}\cdot\frac{\partial\mathbf{x}}{\partial{\theta}} \times \frac{\partial\mathbf{x}}{\partial{\phi}}$

and that of the inverse transformation

$J^{-1} = \det\left(\frac{\partial(\psi,\theta,\phi)}{\partial(x,y,z)}\right) = \nabla{\psi}\cdot\nabla{\theta} \times \nabla{\phi}$

It can be seen that [1] $g \equiv \det(g_{ij}) = J^2 \Rightarrow J = \sqrt{g}$

### Some surface elements

Consider a surface defined by a constant value of φ. Then, the surface element is

$d{\mathbf S}_\phi = \mathbf{e}_\psi\times\mathbf{e}_\theta d\psi d\theta = \sqrt{g}\, \nabla\phi d\psi d\theta .$

As for a surface defined by a constant value of θ:

$d{\mathbf S}_\theta = \mathbf{e}_\phi\times\mathbf{e}_\psi d\psi d\phi = \sqrt{g}\, \nabla\theta d\psi d\phi ,$

or a constant ψ surface:

$d{\mathbf S}_\psi = \mathbf{e}_\theta\times\mathbf{e}_\phi d\theta d\phi = \sqrt{g}\, \nabla\psi d\theta d\phi .$

### Gradient, Divergence and Curl in curvilinear coordinates

The gradient of a function f is naturally given in the contravariant basis vectors:

$\nabla f = \frac{\partial f}{\partial u^i}\nabla u^i = \frac{\partial f}{\partial u^i}\mathbf{e}^i~.$

The divergence of a vector $\mathbf{A}$ is best expressed in terms of its contravariant components

$\nabla\cdot\mathbf{A} = \frac{1}{\sqrt{g}}\frac{\partial}{\partial u^i}(\sqrt{g}A^i)~,$

while the curl is

$\nabla\times\mathbf{A} = \frac{\varepsilon^{ijk}}{\sqrt{g}}\frac{\partial A_j}{\partial u^i}\mathbf{e}_k \Rightarrow \left(\nabla\times\mathbf{A}\right)^k = \frac{\varepsilon^{ijk}}{\sqrt{g}}\frac{\partial A_j}{\partial u^i}$

given in terms of the covariant base vectors, where $\varepsilon^{ijk}$ is the Levi-Civita symbol.

## Flux coordinates

A flux coordinate set is one that includes a flux surface label as a coordinate. A flux surface label is a function that is constant and single valued on each flux surface. In our naming of the general curvilinear coordinates we have already adopted the usual flux coordinate convention for toroidal equilibrium with nested flux surfaces, where ψ is the flux surface label and θ,φ are 2π-periodic poloidal and toroidal-like angles.

Different flux surface labels can be chosen like toroidal (Ψtor) or poloidal (Ψpol) magnetic fluxes or the volume contained within the flux surface V. By single valued we mean to ensure that any flux label ψ1 = f(ψ2) is a monotonous function of any other flux label ψ2, so that the function f is invertible at least in a volume containing the region of interest. We will denote a generic flux surface label by ψ.

To avoid ambiguity in the sign of line and surface integrals we impose dψ(V) / dV > 0, the toroidal angle increases in the clockwise direction when seen from above and the poloidal angle increases such that $\nabla\psi\cdot\nabla\theta\times\nabla\phi > 0$.

### Flux Surface Average

The Flux Surface Average (FSA) of a function Φ is defined as the limit

$\langle\Phi\rangle = \lim_{\delta \mathcal{V} \to 0}\frac{1}{\delta \mathcal{V}}\int_{\delta \mathcal{V}} \Phi\; d\mathcal{V}$

where $\delta \mathcal{V}$ is the volume confined between two flux surfaces. It is therefore a volume average over an infinitesimal spatial region rather than a surface average. To avoid confusion, we denote volume elements or domains with the calligraphic $\mathcal{V}$. Capital V is reserved for the flux label (coordinate) defined as the volume within a flux surface.

Introducing the differential volume element $d\mathcal{V} = \sqrt{g} d\psi d\theta d\phi$

$\langle\Phi\rangle = \lim_{\delta \mathcal{V} \to 0} \frac{1}{\delta \mathcal{V}}\int_{\delta \mathcal{V}} \Phi\; \sqrt{g} d\psi d\theta d\phi = \frac{d\psi}{d V}\int_0^{2\pi}\int_0^{2\pi}\Phi\; \sqrt{g} d\theta d\phi$

or, noting that $\langle 1\rangle = 1$, we have $\frac{dV}{d\psi} = \int_0^{2\pi}\int_0^{2\pi} \sqrt{g} d\theta d\phi$ and we get to a more practical form of the Flux Surface Average

$\langle\Phi\rangle = \frac{\int_0^{2\pi}\int_0^{2\pi}\Phi\; \sqrt{g} d\theta d\phi} {\int_0^{2\pi}\int_0^{2\pi} \sqrt{g} d\theta d\phi}$

Note that $dS = |\nabla\psi|\sqrt{g}d\theta d\phi$, so the FSA is a surface integral weighted by $|\nabla V|^{-1}$ :

$\langle\Phi\rangle = \frac{d\psi}{d V}\int_0^{2\pi}\int_0^{2\pi}\Phi\; \sqrt{g} d\theta d\phi = \frac{d\psi}{d V}\int_{S(\psi)}\frac{\Phi}{|\nabla\psi|}\; dS = \int_{S(\psi)}\frac{\Phi}{|\nabla V|}\; dS$

Applying Gauss' theorem to the definition of FSA we get to the identity

$\langle\nabla\cdot\Gamma\rangle = \lim_{\delta \mathcal{V} \to 0}\frac{1}{\delta \mathcal{V}}\int_{\delta \mathcal{V}} \nabla\cdot\Gamma\; d\mathcal{V} = \lim_{\delta \mathcal{V} \to 0}\frac{1}{\delta \mathcal{V}}\int_{S(\delta \mathcal{V})} \Gamma\cdot \frac{\nabla V}{|\nabla V|}dS = \lim_{\delta \mathcal{V} \to 0}\frac{1}{\delta \mathcal{V}}\left(\langle\Gamma\cdot\nabla V\rangle_{S(V+\delta \mathcal{V})} - \langle\Gamma\cdot\nabla V\rangle_{S(V)} \right) = \frac{d}{dV}\langle\Gamma\cdot\nabla V\rangle~.$

#### Useful properties of FSA

Some useful properties of the FSA are

• $\langle \mathbf{B}\cdot\nabla f \rangle = \langle \nabla\cdot(\mathbf{B} f) \rangle = 0~,\qquad \forall~ \mathrm{single~valued~} f(\mathbf{x}), ~ \mathrm{if}~ \nabla\cdot\mathbf{B} = 0 ~\mathrm{and}~ \nabla \psi\cdot\mathbf{B} = 0$
• $\langle\nabla\cdot\Gamma\rangle = \frac{d}{dV}\langle\Gamma\cdot\nabla V\rangle = \frac{1}{V'}\frac{d}{d\psi}V'\langle\Gamma\cdot\nabla \psi\rangle$

The two identities above are the basic simplifying properties of the FSA: The first cancels the contribution of 'conservative forces' like the pressure gradient or electrostatic electric fields. The second reduces the number of spatial variables to only the radial one. Further, it is possible to show that, if $\nabla\cdot\Gamma = 0$ then $\langle\Gamma\cdot\nabla V\rangle = 0$ and not simply constant as the above suggests. This can be seen by simply using Gauss' theorem

• $\int_{\mathcal{V}}\nabla\cdot\Gamma\; d\mathcal{V} = \langle\Gamma\cdot\nabla V\rangle \qquad \mathrm{where~} \mathcal{V} \mathrm{~is~the~volume~enclosed~by~a~flux~surface.}$

The FSA relates to the conventional volume integral between two surfaces labelled by their volumes V1 and V2 as

• $\int_{\mathcal{V}(V_1<V<V_2)} f\; d\mathcal{V} = \int_{V_1}^{V_2} \langle f \rangle\; dV$

whereas the conventional surface integral over a ψ = constant is

• $\int_{S(\psi)} f\; dS = \langle f |\nabla V| \rangle$

Other useful properties are

• $\langle \nabla \psi\cdot\nabla\times \mathbf{A} \rangle = -\langle \nabla\cdot( \nabla\psi\times\mathbf{A}) \rangle = 0~.$
• $\langle \mathbf{B}\cdot\nabla \theta\rangle =2\pi\frac{d\Psi_{pol}}{dV} \qquad \mathrm{for~any~poloidal~ angle~} \theta ~ (\mathrm{Note:}~ \theta(\mathbf{x})~\mathrm{is~not~single~valued})$
• $\langle \mathbf{B}\cdot\nabla \phi\rangle =2\pi\frac{d\Psi_{tor}}{dV} \qquad \mathrm{for~any~toroidal~ angle~} \phi ~ (\mathrm{Note:}~ \phi(\mathbf{x})~\mathrm{is~not~single~valued})$
• $\langle \sqrt{g}^{-1}\rangle = \frac{4\pi^2}{V'}$

In the above $V' = \frac{dV}{d\psi}$. Some vector identities are useful to derive the above identities.

### Magnetic field representation in flux coordinates

#### Contravariant Form

Any solenoidal vector field $\mathbf{B}$ can be written as $\mathbf{B} = \nabla\alpha\times\nabla\nu$ called its Clebsch representation. For a magnetic field with flux surfaces $(\psi = \mathrm{const}\; , \; \nabla\psi\cdot\mathbf{B} = 0)$ we can choose, say, α to be the flux surface label ψ

$\mathbf{B} = \nabla\psi\times\nabla\nu$

Field lines are then given as the intersection of the constant-ψ and constant-ν surfaces. This form provides a general expression for $\mathbf{B}$ in terms of the covariant basis vectors of a flux coordinate system

$\mathbf{B} = \frac{\partial\nu}{\partial\theta}\nabla\psi\times\nabla\theta + \frac{\partial\nu}{\partial\phi}\nabla\psi\times\nabla\phi = \frac{1}{\sqrt{g}}\frac{\partial\nu}{\partial\theta}\mathbf{e}_\phi -\frac{1}{\sqrt{g}}\frac{\partial\nu}{\partial\phi}\mathbf{e}_\theta = B^\phi\mathbf{e}_\phi + B^\theta\mathbf{e}_\theta~.$

in terms of the function ν, sometimes referred to as the magnetic field's stream function.

It is worthwhile to note that the Clebsch form of $\mathbf{B}$ corresponds to a magnetic vector potential $\mathbf{A} = \nu\nabla\psi$ (or $\mathbf{A} = \psi\nabla\nu$ as they differ only by the Gauge transformation $\mathbf{A} \to \mathbf{A} - \nabla (\psi\nu)$).

The general form of the stream function is

$\nu(\psi,\theta,\phi) = \frac{1}{2\pi}(\Psi_{tor}'\theta - \Psi_{pol}'\phi) + \tilde{\nu}(\psi,\theta,\phi)$

where $\tilde{\nu}$ is a differentiable function periodic in the two angles. This general form can be derived by using the fact that $\mathbf{B}$ is a physical function (hence singe-valued). The specific form for the coefficients in front of the secular terms (i.e. the non-periodic terms) can be obtained from the FSA properties .

#### Covariant Form

If we consider an equilibrium magnetic field such that $\mathbf{j}\times\mathbf{B} \propto \nabla\psi$, where $\mathbf{j}$ is the current density , then both $\mathbf{B}\cdot\nabla\psi = 0$ and $\nabla\times\mathbf{B}\cdot\nabla\psi = 0$ and the magnetic field can be written as

$\mathbf{B} = \nabla\chi -\eta\nabla\psi$

where χ is identified as the magnetic scalar potential. Its general form is

$\chi(\psi, \theta, \phi) = \frac{I_{tor}}{2\pi}\theta + \frac{I_{pol}^d}{2\pi}\phi + \tilde\chi(\psi, \theta, \phi)$
Sample integration circuits for the current definitions.
Sample surface for the definition of the current though a disc. Note that only the current of more external surfaces (those enclosing the one drawn here) contribute to the flux of charge through the surface.

Note that I is not the current but μ0 times the current. The functional dependence on the angular variables is again motivated by the single-valuedness of the magnetic field. The particular form of the coefficients can be obtained noting that

$\int_S \mu_0\mathbf{j}\cdot d\mathbf{S} = \int_{\partial S}\mathbf{B}\cdot d\mathbf{l} = \oint(\nabla\chi-\eta\nabla\psi)\cdot d\mathbf{l} = \oint(d\chi-\eta d\psi )$

and choosing an integration circuit contained within a flux surface (dψ = 0). Then we get

$\int_S \mu_0\mathbf{j}\cdot d\mathbf{S} = \Delta \chi = \frac{I_{tor}}{2\pi}\Delta\theta + \frac{I_{pol}^d}{2\pi}\Delta\phi~.$

If we now choose a toroidal circuit (Δθ = 0,Δφ = 2π) we get

$I_{pol}^d = \int_S \mu_0\mathbf{j}\cdot d\mathbf{S}\; ; ~\mathrm{with}~ \partial S ~\mathrm{such~that}~ (\Delta\theta = 0, \Delta\phi = 2\pi)~.$

here the superscript d is meant to indicate the flux is computed through a disc limited by the integration line, as opposed to the ribbon limited by the integration line on one side and the magnetic axis on the other that was used for the definition of poloidal magnetic flux Ψpol above these lines. Similarly

$I_{tor} = \int_S \mu_0\mathbf{j}\cdot d\mathbf{S}\; ; ~\mathrm{with}~ \partial S ~\mathrm{such~that}~ (\Delta\theta = 2\pi, \Delta\phi = 0)~.$
##### Contravariant Form of the current density

Taking the curl of the covariant form of $\mathbf{B}$ the equilibrium current density $\mathbf{j}$ can be written as

$\mu_0\mathbf{j} = \nabla\psi\times\nabla\eta~.$

By very similar arguments as those used for $\mathbf{B}$ (note that both $\mathbf{B}$ and $\mathbf{j}$ are solenoidal fields tangent to the flux surfaces) it can be shown that the general expression for η is

$\eta(\psi,\theta,\phi) = \frac{1}{2\pi}({I}_{tor}'\theta - {I}_{pol}'\phi) + \tilde{\eta}(\psi,\theta,\phi)~.$

Note that the poloidal current is now defined through a ribbon and not a disc. The two currents are related as $\nabla\cdot\mathbf{j} = 0$ implies

$I_{pol} + I_{pol}^d = \oint_{\psi=0}\mathbf{B}\cdot d\mathbf{l} \Rightarrow I_{pol}' + (I_{pol}^d)' = 0 ~,$

where the integral is performed along the magnetic axis and therefore does not depend on ψ. This can be used to show that a expanded version of $\mathbf{B}$ is given as

$\mathbf{B} = -\tilde\eta\nabla\psi + \frac{I_{tor}}{2\pi}\nabla\theta + \frac{I_{pol}^d}{2\pi}\nabla\phi + \nabla\tilde\chi~.$

## Magnetic coordinates

Magnetic coordinates are a particular type of flux coordinates in which the magnetic field lines are straight lines. In mathematical terms this implies that the periodic part of the magnetic field's stream function is zero in these coordinates so the magnetic field reads

$\mathbf{B} = \nabla\psi\times \nabla\left( \frac{\Psi_{tor}'}{2\pi}\theta_f - \frac{\Psi_{pol}'}{2\pi}\phi_f \right) = \frac{\Psi_{pol}'}{2\pi\sqrt{g}}\mathbf{e}_\theta + \frac{\Psi_{tor}'}{2\pi\sqrt{g}}\mathbf{e}_\phi~.$

Now a field line is given by ψ = ψ0 and Ψtor'θf − Ψpol'φf = 2πν0.

Note that, in general, the contravariant components of the magnetic field in a magnetic coordinate system

$B^{\theta_f} = \frac{\Psi_{pol}'}{2\pi\sqrt{g}}\; ;\quad B^{\phi_f} = \frac{\Psi_{tor}'}{2\pi\sqrt{g}}$

are not flux functions, but their quotient is

$\frac{B^{\theta_f}}{B^{\phi_f}} = \frac{\Psi_{pol}'}{\Psi_{tor}'} \equiv \frac{\iota}{2\pi}~,$

ι being the rotational transform. In a magnetic coordinate system the poloidal $\mathbf{B}_P = B^\theta\mathbf{e}_\theta$ and toroidal $\mathbf{B}_T = B^\phi\mathbf{e}_\phi$ components of the magnetic field are individually divergence-less.

From the above general form of $\mathbf{B}$ in magnetic coordinates it is easy to obtain the following identities valid for any magnetic coordinate system

$\mathbf{e}_\theta\times\mathbf{B} =\frac{1}{2\pi}\nabla\Psi_{tor}~,$
$\mathbf{e}_\phi\times\mathbf{B} = -\frac{1}{2\pi}\nabla\Psi_{pol} ~.$

### Transforming between Magnetic coordinates systems

There are infinitely many systems of magnetic coordinates. Any transformation of the angles of the from

$\theta_F = \theta_f +\Psi_{pol}' G(\psi, \theta_f, \phi_f)\; ;\quad \phi_F = \phi_f +\Psi_{tor}' G(\psi, \theta_f, \phi_f)$

where G is periodic in the angles, preserves the straightness of the field lines (as can be easily checked by direct substitution). The spatial function G(ψ,θf,φf), is called the generating function. It can be obtained from a magnetic differential equation if we know the Jacobians of the two magnetic coordinate systems $\sqrt{g_f}$ and $\sqrt{g_F}$. In fact taking $\mathbf{B}\cdot\nabla$ on any of the transformation of the angles and using the known expressions for the contravariant components of $\mathbf{B}$ in magnetic coordinates we get

$2\pi\mathbf{B}\cdot\nabla G = \frac{1}{\sqrt{g_F}} - \frac{1}{\sqrt{g_f}}~.$

The LHS of this equation has a particularly simple form when one uses a magnetic coordinate system. For instance, if we write $\mathbf{B}$ in terms of the original magnetic coordinate system we get

$(\Psi_{pol}'\partial_{\theta_f} + \Psi_{tor}'\partial_{\phi_f}) G = \frac{\sqrt{g_f}}{\sqrt{g_F}} - 1~.$

which can be turned into an algebraic equation on the Fourier components of G

$G_{mn} = \frac{-i}{\Psi_{pol}'m + \Psi_{tor}'n}\left(\frac{\sqrt{g_f}}{\sqrt{g_F}}\right)_{mn}~.$

where

$G(\psi, \theta_f, \phi_f) = \sum_{m,n} G_{mn}(\psi) e^{i(m\theta_f + n\phi_f)}$

and G00 = 0 guarantees periodicity is preserved.

Particular choices of G can be made so as to simplify the description of other fields. The most commonly used magnetic coordinate systems are: [1]

• Hamada coordinates. [2][3] In these coordinates, both the magnetic field lines and current lines corresponding to the MHD equilibrium are straight. Referring to the definitions above, both $\tilde\nu$ and $\tilde\eta$ are zero in Hamada coordinates.
• Boozer coordinates. [4][5] In these coordinates, the magnetic field lines corresponding to the MHD equilibrium are straight and so are the diamagnetic lines , i.e. the integral lines of $\nabla\psi\times\mathbf{B}$. Referring to the definitions above, both $\tilde\nu$ and $\tilde\chi$ are zero in Boozer coordinates.

## References

1. ↑ 1.0 1.1 W.D. D'haeseleer, Flux coordinates and magnetic field structure: a guide to a fundamental tool of plasma theory, Springer series in computational physics, Springer-Verlag (1991) ISBN 3540524193
2. ↑ S. Hamada, Nucl. Fusion 2 (1962) 23
3. ↑ J.M. Greene and J.L Johnson, Stability Criterion for Arbitrary Hydromagnetic Equilibria, Phys. Fluids 5 (1962) 510
4. ↑ A.H. Boozer, Plasma equilibrium with rational magnetic surfaces, Phys. Fluids 24 (1981) 1999
5. ↑ A.H. Boozer, Establishment of magnetic coordinates for a given magnetic field, Phys. Fluids 25 (1982) 520
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 113, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.8518873453140259, "perplexity_flag": "middle"}