Under certain circumstances, the equations for the magnetic field lines can be recast in a canonical form after defining a suitable field line Hamiltonian. This analogy is extremely useful for dealing with a variety of problems involving magnetically confined plasmas, like in tokamaks and other toroidal devices, where there is usually one symmetric coordinate that plays the role of time in the canonical equations. In this tutorial paper, we review the basics of the Hamiltonian description for magnetic field lines, emphasizing the role of a variational principle and gauge invariance. We present representative applications of the formalism using cylindrical and magnetic flux coordinates in tokamak plasmas.
I. INTRODUCTION
Creating and confining hot plasmas are the foundation of fusion studies.1,2 As the increase in the temperature helps to create the plasma, magnetic fields are able to confine it in suitable containers. The spatial structure of magnetic field lines is an important ingredient in many theoretical analyses of magnetically confined plasmas in toroidal devices like tokamaks, stellarators, reversed field pinches, etc.3 In tokamaks, the magnetic field responsible for the confinement results from the superposition of the toroidal field, generated by external coils wound around the entire torus, and the poloidal field, due to plasma current itself.4 However, the equilibrium magnetic field can be modified by plasma oscillations or by external coils used to control instabilities.5
An interesting situation is where the magnetic field is time-independent, as the case in MHD equilibrium configurations.1 Starting from a symmetric plasma equilibrium configuration with an ignorable coordinate (e.g., the toroidal angle in tokamaks), the magnetic field line equations can be cast in the form of canonical equations, if the ignorable coordinate plays the role usually assigned to physical time in classical mechanics.6 Furthermore, as the magnetic field is divergence free, we can describe the field lines using a two dimensional area-preserving map, with respect to a surface of section of the torus at a fixed toroidal angle.7 The resulting phase space of the field lines is identical to a Hamiltonian phase space, indicating that the field lines act, at least locally, as trajectories.7 Hence, the dynamics described by the corresponding Hamiltonian represents not a true motion but instead a magnetostatic structure parameterized by the time-like coordinate.8 The main advantage of making this analogy is to use the powerful toolbox of Hamiltonian theory to investigate the magnetic field line structure, in particular, if nonsymmetrical perturbations are considered.9
The analogy between magnetic field lines and a Hamiltonian system has been first pointed out by Kruskal, in 1952.7,10,11 Kruskal proposed and iterated an area-preserving map, similar to the standard map, in order to describe the magnetic field lines of stellarators.7,11 This connection between field lines and Hamiltonian formalism was also recognized simultaneously but independently in the United States by Donald Kerst (the inventor of betatron)12 and in Soviet Union.13 Nevertheless, an explicit and generalized Hamiltonian description was only proposed later, by Whiteman14 and Boozer.15
Even though magnetic field lines can be described by low-dimensional Hamiltonian systems, the numerical integration of the motion equations can be computationally costly.16 For this reason, explicit area-preserving maps, derived from the Poincaré map of the magnetic field line, are often used. These Hamiltonian maps inform us about the global and fine scale structure of the edge magnetic topology in toroidal systems. They serve as an important tool for studying the kinetic and fluid transport process as plasma turbulence and MHD stability.5 In addition, these maps permit long-time examination of individual trajectories for the statistical analysis of the field lines and the investigation of transport with a reasonable computational time.2
The theory of magnetic field lines in confined plasma devices could not guarantee the regularity of the field lines.11 An example is the study of magnetostatic perturbations produced by coils placed outside the plasma: the resulting magnetic field lines may present unexpected and complicated behaviors like periodic, quasi-periodic, and even chaotic orbits.7,17 The latter, in particular, represent a local destruction of the magnetic surfaces that confine the plasma.18,19
The main motion of the plasma particles is along the field lines while slowly drifting across the equilibrium fields due to the lines curvature, the particle rotation around the lines, and electric drift.20–22 Thus, as the fastest motion is along the field lines, the particle escape to the wall can be predicted by the field line configuration.23 Observing magnetic field lines in a surface section of a tokamak, they can be closed lines within the trace of a toroidal magnetic surface or they can fill a two dimensional domain. For the first case, the field line is regular, while the second case indicate chaos.11 Chaotic behavior is related to the topology of the magnetic field lines and the dynamics of the particles gyrating along these lines, as well as the turbulent transport, ray dynamics, and radio frequency heating.11,15 Furthermore, the non-uniform particle transport at the tokamak plasma edge can be roughly estimated from the field lines escaping to the wall.23,24 Broader reviews between Hamiltonian chaos and fusion plasmas can be found in Refs. 5, 11, and 16.
From a classic mechanics framework, a general description in curvilinear coordinate system was proposed by Whiteman14 and extended later by Boozer,15 Cary and Littlejohn,8 and Elsässer.25 The general formalism described by Whiteman has been applied to a variety of coordinate systems: cylindrical,26 helical,27 spherical,28 and pseudotoroidal.29 Various applications of the magnetic field line Hamiltonian have been made by Freis et al.30 and Hamzeh31 for a toroidal machine called Levitron and by Lichtenberg32,33 in an investigation of the m = 1 island on sawtooth oscillations in tokamaks.
In addition to its applications in fusion plasmas, the Hamiltonian description of magnetic field lines provides a nice non-mechanical example of the usefulness of the Hamiltonian formalism to intermediate and advanced students. Moreover, the magnetic field line problem has the unique feature that the corresponding phase space actually coincides with the configuration space, which facilitates the visualization of complex dynamical concepts like Kolmogorov-Arnold-Moser (KAM) tori, homoclinic tangles, and so on. On the other hand, the basic material on the Hamiltonian description of magnetic field lines is often available only in publications targeted to the plasma physics experts, which creates an additional difficulty for an interested novice reader.
In order to overcome the latter problem, we wrote this tutorial as an aid to students and researchers interested to master the basic ideas of the Hamiltonian description for the magnetic field lines. Moreover, we present some representative applications of this formulation so as to illustrate its usefulness in plasma physics problems. We emphasize that this paper is not a review of this subject. While we focused on fusion plasmas, the methods can also be used in plasmas of astrophysical and geophysical interest, provided we have situations of MHD equilibrium with adequate stability properties.
This paper is organized as follows: in Sec. II, we show the derivation of a variational principle for magnetic field lines and the role played by gauge invariance. The Hamiltonian description, in general, curvilinear coordinates is presented in Sec. III. In Sec. IV, we describe in some detail an application of the description in cylindrical coordinates to a large aspect-ratio tokamak with an ergodic magnetic limiter (EML), using canonical perturbation theory to derive an analytical formula for the width of magnetic islands, which is an expression of practical interest for stability and transport theoretical studies of tokamak plasmas.1 In Sec. V, we present an application of the general formulation for magnetic flux coordinates, which are widely in numerical codes for computer simulation of plasmas,15 displaying an application to a magnetic field line map (tokamap) proposed by Balescu and co-workers.34 The last section is devoted to our Conclusions.
II. VARIATIONAL PRINCIPLE
III. HAMILTONIAN DESCRIPTION
When using the above formulas, one must have in mind that quite often the contravariant components of the magnetic field have not the same dimensions as the field itself due to the metric coefficients. In the forthcoming section, our aim is to present representative applications of this description, using different coordinates systems, as the cylindrical and magnetic flux coordinates.
IV. CYLINDRICAL COORDINATES
Let us consider a toroidal plasma with major radius R0 and minor radius a. In the local (or pseudotoroidal) system of coordinates , θ and are the poloidal and toroidal angles, respectively, and r is the radial distance to the magnetic axis, which is a circle of radius R0 centered at the torus major axis.
The torus aspect ratio is . In the large aspect ratio approximation ( ), we can neglect the toroidal curvature and consider the torus as a periodic cylinder of radius a and length . In this case, it is possible to use cylindrical coordinates , where is the rectified toroidal circumference. Due to the periodicity, we identify all points for which z is an integer multiple of .
A. Ergodic magnetic limiter
Divertors are devices used in tokamak experiments with the purpose to displace the interactions between the plasma particles and the tokamak wall, thereby avoiding direct contact between them and improving plasma confinement.4,38 Initially, the divertors were designed to act directly over the toroidal or the poloidal field of the plasma and they required additional coil currents of the magnitude of plasma currents or even larger.39 This led to experimental limitations and technological problems for the tokamak operation.39 As an alternative, Karger and Lackner proposed the helical divertor, which requires smaller currents and possesses helical symmetry, which generates a magnetic field that resonates with the field at a surface in the plasma boundary, which is diverted.39
The resonance created by the divertor can also lead to a chaotic motion in the plasma edge, a process called “ergodization.”40,41 The term “ergodic,” however, has been later replaced by “chaotic,” which is a more adequate description of the area-filling orbit created when the invariant manifolds stemming from unstable periodic orbits intercept in a complicated way forming the homoclinic tangle.42 The chaotic field lines increase the diffusion coefficient at the boundary of the plasma, reducing the plasma contamination,40 controlling the MHD oscillations,41 reducing thermal flux density,43 and controlling plasma–wall interaction.44 For more information about the theoretical and experimental development of helical divertors, confer Refs. 39, 40, 43, 45, and 46.
The external magnetic fields generated by the helical divertor create magnetic islands that can overlap and, consequently, form a stochastic layer in the plasma edge. Therefore, such a divertor is also called ergodic magnetic limiter (EML).43 The EML is a filamentary current ring with length , wound around the torus (with radius a). There are two types of current segments in a EML (Fig. 1): straight segments parallel to the magnetic axis and curved segments along the poloidal direction. There are m pairs of segments, such that two adjacent segments carry a current IL in opposite directions,47 which produces a resonant helical field.41
In order to verify whether or not these conditions are satisfied, we will take parameters from the TCABR (Tokamak à Chauffage Alfvén Brésilien at Instituto de Física, Universidade de São Paulo, Brazil) presented in Ref. 49, where m and a = 0.18 m. The plasma current is about , and the toroidal field at the magnetic axis is . The safety factor is at the plasma edge, and at the magnetic axis. An EML has been installed in TCABR with m = 3 pairs of wires with length , carrying a current about .50 These values imply that and are small enough to justify treating the EML field as a Hamiltonian perturbation upon the equilibrium magnetic surfaces. Ergodic limiters have also been used in other tokamaks as in Textor,2 Tore-Supra,46 and Text.43
B. Resonances and the pendulum approximation
The pendulum Hamiltonian describing the resonance is integrable because we have averaged out the non-resonant terms in (55). If we include these terms again, the system will become quasi-integrable and the pendulum separatrices will no longer join smoothly, but rather will present an infinite number of homoclinic and heteroclinic points. The dynamics near such points is known to be chaotic, and, as a result, instead of separatrices, the islands will have a thin stochastic layer of chaotic motion.51 As long as the intensity of perturbation is small enough, these locally chaotic layers do not connect themselves, preventing large-scale chaotic transport of field lines. If the limiter current, however, is larger than a critical value, the locally chaotic layers merge together forming a globally chaotic region, and allowing large-scale chaotic transport. Pendulum approximation have been used to estimate the islands' width and to apply Chirikov criterion to find the critical perturbation amplitudes to create a chaotic layer in the plasma.52,53 We remark that Escande and Momo have derived a similar formula for the island half-width without using Fourier components like , but rather using the magnetic flux through a ribbon, the edges of which are lines passing by the elliptic and hyperbolic points in a given magnetic island.36
C. Poincaré map of field lines
The EML Hamiltonian (55) exhibits an explicit dependency on the ignorable variable . For non-autonomous systems, the trajectories belong to an extended phase space, where the time is treated as a coordinate.51 For the quasi-integrable Hamiltonian system in (58), the solutions are in a three dimensional phase space and the flow is parameterized by the variable . In this way, a state is determined by three variables: J, θ, and .
Instead of studying the solution of the system in a three dimensional geometric space, we can reduce the dimensionality of the problem by the construction of a Poincaré surface. The Poincaré map is formed by the intersection of the solutions in the surface defined at a constant value of . In this way, we have the values of J and θ for when the magnetic field lines cross the surface, i.e., for each complete turn in the toroidal direction.
Integrating Eqs. (73), for initial conditions [ ], using a symplectic Euler54 method and defining the Poincaré section at , we construct the Poincaré sections in Figs. 3(a) and 3(b), for a scenario of small ( ) and large ( ) limiter currents, respectively.
For the Poincaré section in Fig. 3(a), the limiter current corresponds to 2.5% of the total plasma current IL. In this scenario, we observe regular solutions in most part of the space, represented by the rotational circles and the three islands (oscillatory circles). We observe a thin chaotic layer acting as a “separatrix” of the island. Since ε is too small, the width of this chaotic layer is so tiny it resembles a separatrix curve, as the one presented in the pendulum phase space in Fig. 2. If the limiter current is increased until it corresponds to 15% of the total plasma current [six times the current in Fig. 3(a)], we have the Poincaré section shown in Fig. 3(b). The second Poincaré section also shows three islands, and the separatrix between them is replaced by a thick chaotic layer. The chaotic behavior emerges with the increase in the perturbation parameter ε, i.e., with the increase in the current in the ergodic limiter.
Finally, we would like to estimate until what value of ε Eq. (70) is a good approximation for the half-width of the islands in the phase space. We numerically solve the system (73), construct the Poincaré section, and compare the half-width of the islands for each ε with the value predicted by Eq. (70). The results are presented in Fig. 4, and we observe that the pendulum approximation is valid for the half-width of the islands in the phase space until . For higher values of ε, the value of Imax does not increase at the same rate proportional to . For , we observe small increases and decreases in Imax, which represents the enlargement and the following destruction of the island.
V. MAGNETIC FLUX COORDINATES
A. Clebsch representation
B. Exploitation of the variational principle
C. Tokamap Hamiltonian
In order to put these equations into the form (116) and (117), it is necessary to solve them first for . Although this can be done analytically in some cases, it is always possible to use root-finding methods to do so numerically. Another important point, emphasized by Balescu and co-authors, is that the field line map must have two properties: (i) if , then , for all values of n; (ii) if , then for all n.34 The former property comes from the definition of the coordinate ψ, which must be a definite positive number, whereas the latter is related to the fact that ψ = 0 stands for the magnetic axis (which is a degenerate magnetic surface).
We observe that the tokamap exhibits mainly periodic and quasi-periodic solutions for K = 1, indicated by the existence of only islands and rotational circles in the Poincaré section of Fig. 5(a). Like in Sec. IV C, if the perturbation strength is too small, the size of a chaotic layer in the neighborhood of an island is so tiny that it can be revealed only by magnifications of the Poincaré section. From the winding number profile calculated in [Fig. 5(b)], we observe a defined ωn for almost every value of ψ, and the profile monotonically decreases. The possible exceptions consist of tiny intervals for which the orbit is chaotic.
In Fig. 5(b), we choose three different plateaus and highlight them with the colored rectangles. The correspondent island of the plateau is shown with the same color in the Poincaré section of Fig. 5(a). From the values of ωn, we identified a direct relation with the period of the islands. The winding number is related to the period τ of the island by . For example, the red island of period 1 presents a winding number equal to . The green and pink islands present winding numbers equal to and , respectively. These periodic islands are on rational tori, since we can write their frequencies as a ratio between two integer numbers.
Increasing the perturbation parameter to K = 3.5, we have the Poincaré section and the winding number profile showed in Fig. 6, where we observe that some regular solutions are replaced by stochastic layers, represented by the chaotic seas around the green and the orange lines. The chaotic behavior is restricted, and the chaotic regions are not connected. If we increase K, these chaotic regions will eventually enlarge and merge together into a single area-filling chaotic orbit. Following the same methodology as for Fig. 5, we computed the winding number profile, at , and highlight the plateaus of constant ωn values. Again, we observed the directed relation between the winding number value and the period τ of the islands. The red, green, and pink islands of Fig. 5 are also seen here, with , and , respectively. We also highlight two other chains of islands, orange and blue, with and , respectively. For these last two islands, we have that the trajectory always “jumps” one island during the time evolution, i.e., if we choose an initial condition in the blue island close to (the third island counting from left to right), the next point will be in the fifth island, the second iteration will be in the second island, and so on. The chaotic regions are represented by the “gaps” in the winding number profile, since the limit (135) does not converge.
The Tokamap has been used to interpret the particle escape to the wall in Textor Tokamak. In particular, the theoretically obtained fractal distribution of field lines at the plasma edge is similar to the one measured in this tokamak.2,23
D. Analysis of the revtokamap
The violation of the twist property in the Poincaré section brings consequences to the solutions of the map. First, the extremum point in the shear corresponds to the extremum point in the winding number profile. This extremum point belongs to the shearless curve in the phase space. Second, since the map is non-twist, two solutions can be isochronous, i.e., two distinct solutions present the same period and winding number.
Following the same procedure applied to the tokamap in the last section, we construct the phase space and compute the winding number profile for two values of K. In Fig. 7, we have the results for K = 0.5.
For the results shown in Fig. 7, we conclude that the revtokamap only presents regular solutions, for K = 0.5. The phase space exhibits only islands and rotational curves, and the winding number is defined for every . The winding number profile in Fig. 7(b) presents a nonmonotonic behavior, and a maximum value, indicated by the red symbol, around . This point corresponds to the shearless point mentioned before, and it belongs to the shearless curve, also indicated in red in Fig. 7(a). The winding number plateaus highlighted by the orange and blue rectangles correspond to the twin islands (isochronous solutions) of the same color in Fig. 7(a). The twin islands present the same winding number, same period, and each chain is located at one side of the shearless curve. We also observe the islands of period 3 (pink islands) with winding number As identified in Figs. 5 and 6, the winding number of each island satisfies the relation , where τ is the period of the island.
Keeping the values for q0, q1, and qm, in Fig. 8, we have the Poincaré section and the winding number profile for K = 2.0. From Fig. 8(a), we observe that when the perturbation parameter K is increased to K = 2.0, some regular solutions at the upper region of the phase space are replaced by chaotic trajectories, indicated by the chaotic sea. The isochronous solutions of period 2, the blue and orange islands, remain and other two chains of islands are identified, the green and pink islands emerge. The latter islands correspond to the plateaus in the winding number profile in Fig. 8(b), highlighted by the same color. The isochronous solutions present . The maximum value of ωn, highlighted by the red point in Fig. 8(b), corresponds to the shearless curve, the red rational circle in Fig. 8(a).
VI. CONCLUSIONS
The Hamiltonian description of magnetic field lines is widely used for magnetic confined plasmas, allowing the use of the powerful methods of Hamiltonian theory to interpret the results and characterize the dynamic regimes observed in experiments and computational simulations. The contributions of the Hamiltonian approach in plasma physics range from the application of area-preserving maps, like the standard map, for the study of chaos,59 to the Greene residue60 and the Chirikov resonance overlap criterion,61 the non-twist systems, the renormalization group approach,62–64 and chaotic transport, just to name a few.5,11,15 Despite the importance and wide range of application, there are a few elementary expositions on the subject. This paper attempts to fill this gap, presenting a tutorial of how the magnetic field lines are related to Hamiltonian systems with some representative application in toroidal plasmas.
Magnetic field lines are a non-mechanical example of a system that can be described by the Hamiltonian formalism. From the variational principle, we were able to present the description of field lines in confined plasmas for different coordinates and with the inclusion of an external perturbation. We also present applications of the description with the tokamap and revtokamap analysis. The examples presented here are simple, but they are paradigmatic for the study of confined plasmas and are adequate to demonstrate the Hamiltonian approach in a pedagogical form.
ACKNOWLEDGMENTS
We wish to acknowledge the support of the following Brazilian research agencies: Coordination for the Improvement of Higher Education Personnel (CAPES) under Grant Nos. 88887.320059/2019-00 and 88881.143103/2017-01, the National Council for Scientific and Technological Development (CNPq - Grant Nos. 403120/2021-7 and 301019/2019-3), and Fundação de Amparo à Pesquisa do Estado de São Paulo (FAPESP) under Grant Nos. 2022/12736-0 and 2018/03211-6.
AUTHOR DECLARATIONS
Conflict of Interest
The authors have no conflicts to disclose.
Author Contributions
Ricardo Luiz Viana: Conceptualization (equal); Data curation (equal); Formal analysis (equal); Investigation (equal); Methodology (equal); Validation (equal); Visualization (equal); Writing – original draft (equal); Writing – review & editing (equal). Michele Mugnaine: Conceptualization (equal); Data curation (equal); Formal analysis (equal); Investigation (equal); Methodology (equal); Validation (equal); Visualization (equal); Writing – original draft (equal); Writing – review & editing (equal). Ibere Luiz Caldas: Conceptualization (equal); Data curation (equal); Formal analysis (equal); Investigation (equal); Methodology (equal); Validation (equal); Visualization (equal); Writing – original draft (equal).
DATA AVAILABILITY
The data that support the findings of this study are openly available at http://henon.if.usp.br/OscilControlData/HamiltonianDescriptionTutorial/, Ref. 65.