This paper was converted on www.awesomepapers.org from LaTeX by an anonymous user.
Want to know more? Visit the Converter page.

Magnetic Fluctuations in Gyrokinetic Simulations of Tokamak Scrape-Off Layer Turbulence

Noah Roth Mandell
Abstract

Understanding turbulent transport physics in the tokamak edge and scrape-off layer (SOL) is critical to developing a successful fusion reactor. The dynamics in these regions plays a key role in achieving high fusion performance by determining the edge pedestal that suppresses turbulence in the high-confinement mode (H-mode). Additionally, the survivability of a reactor is set by the heat load to the vessel walls, making it important to understand turbulent spreading of heat as it flows along open magnetic field lines in the SOL. Large-amplitude fluctuations, magnetic X-point geometry, and plasma interactions with material walls make simulating turbulence in the edge/SOL more challenging than in the core region, necessitating specialized gyrokinetic codes. Further, the inclusion of electromagnetic effects in gyrokinetic simulations that can handle the unique challenges of the boundary plasma is critical to the understanding of phenomena such as the pedestal and edge-localized modes, for which electromagnetic dynamics are expected to be important.

In this thesis, we develop the first capability to simulate electromagnetic gyrokinetic turbulence on open magnetic field lines. This is an important step towards comprehensive electromagnetic gyrokinetic simulations of the coupled edge/SOL system. By using a continuum full-ff approach via an energy-conserving discontinuous Galerkin (DG) discretization scheme that avoids the Ampère cancellation problem, we show that electromagnetic fluctuations can be handled in a robust, stable, and efficient manner in the gyrokinetic module of the Gkeyll code. We then present results which roughly model the scrape-off layer of the National Spherical Torus Experiment (NSTX), and show that electromagnetic effects can affect blob dynamics and transport. We also formulate the gyrokinetic system in field-aligned coordinates for modeling realistic edge and scrape-off layer geometries in experiments. A novel DG algorithm for maintaining positivity of the distribution function while preserving conservation laws is also presented.

\adviser

Gregory W. Hammett

Acknowledgements.
I have been extremely fortunate to have been supported by an incredible group of family, friends, mentors, teachers, and collaborators over my academic career. First I would like to thank my thesis adviser, Greg Hammett. His physical intuition and insight has been a tremendous resource and inspiration throughout my time at Princeton. “Physics is about thinking slowly,” Greg told me on numerous occasions as we puzzled over a problem in his office.111Greg attributes this quote to Fred Skiff, a very deep thinker. He is masterful at slowly and carefully thinking through every part of a calculation, model, or result. This attention to detail, taking the little steps that are needed to realize big ideas, is among the most important things that I have learned from Greg. I look forward to many more years of collaboration and friendship. I would also not be the scientist I am today without the mentorship and friendship of Bill Dorland. Bill introduced me to the world of fusion, computational plasma physics, and turbulence when I was a young undergraduate at the University of Maryland. I was immediately drawn to his passion and his big, exciting ideas. Thank you for patiently teaching me so much, believing in me enough to give me such an ambitious project as an undergraduate, and for the continued mentorship and collaborations while I was at Princeton. (Remember when he almost stole me for good in year 3, Greg? Haha.) More importantly, thank you for all the support, guidance, advice, and inspiration over the years. Thank you to Ammar Hakim for fearlessly leading the development of the Gkeyll code. Ammar’s computational insights have been invaluable throughout my thesis work, and there is no question that I have become a better software developer and physicist because of Ammar’s help. Working on the Gkeyll code has been incredibly stimulating and rewarding, mostly thanks to the amazing people in the Gkeyll group. All of this would not have been possible without all of your hard work. Thank you to Jimmy Juno, Mana Francisquez, Petr Cagas, Tess Bernard, Rupak Mukherjee, Liang Wang, and many others for your constant support, often involving late-night Slack chats and code commits. I also thank Eric Shi, whose thesis paved the path for much of my work. Thank you to my thesis readers, Matt Kunz and Walter Guttenfelder. Their careful reading and insightful feedback have greatly improved the text. Greg Hammett also provided valuable comments. Also, thank you to my thesis committee members: Matt, Walter, Greg, Ammar, and Sir Steve Cowley. I thank Stewart Zweben for mentoring me for my first-year project on NSTX gas-puff imaging, taking a student who had already made up his mind that he wanted to be a theorist and having the patience to show him the nuances of tokamak experiments. To all my fellow grad students and post-docs at the lab, thank you for making my time at Princeton so enjoyable. I especially enjoyed APS gallivanting with Denis St. Onge and Brian Kraus and others; Denis’ brisket parties; watching Packers football games with Peter Bolgert, Daniel Ruiz, Jeff Lestz and others; playing softball with the Tokabats; and of course, playing ping pong. Some of my fondest memories are from that little room tucked away behind Science Ed, playing for hours with Peter B. (original commissioner of the PPPL Ping Pong League, or PPPLPPL), Daniel R., Jonathan Ng, Jeff L., Vasily Geyko, Brian K., Lee Ellison, Jack Matteucci, Hongxuan Zhu, Joaquim Loizu, Vinicius Duarte, David Pfefferle, Jacob Schwartz, Charles Swanson, Ian Ochs, Alex Glasser, Elijah Kolmes, Andy Alt, Nick McGreivy, and many others/left-handed-alter-egos. The Bolgert Open tournament was an annual summer tradition (could never get past Hongxuan in the finals…), and Brian even developed a computerized ratings system. We probably spent way too much time playing ping pong when we should’ve been working, but we all got pretty good and it was a lot of fun. I am also honored to have been a member of the party office, which has a rich history of housing outstanding Princeton graduates. Thank you to Dara Lewis and Beth Leman for all their help with navigating the administrative details of being a graduate student at PPPL. There are many more teachers and professors to thank for helping me along the way, including the outstanding professors and lecturers in the Princeton Program in Plasma Physics, but I would like to say a special thank you to my high school physics teacher, Pieter Kreunen. My love of physics started back in Mr. Kreunen’s classroom, getting shocked by Van der Graff generators and building robots. Thank you for inspiring me and encouraging me to pursue physics those many years ago. I have been blessed with an amazingly loving and supportive family. Mom and Dad, I am forever grateful for every opportunity you gave me growing up, and the sacrifices you made to give them to me. Madison, you mean more to me than you know, and I am so proud to have you as my sister. Thank you for supporting me unconditionally every step of the way. I am also so grateful for the invaluable months I have been able to spend over the past year222I do not want to say this without solemnly acknowledging the COVID-19 pandemic that has devastated the country and the world for over a year. We have been fortunate to keep our health, but millions have not been so lucky. In these strange times, the Stoppard quote at the beginning, originally included as a quip about mathematical consistency, has truly taken on a new meaning… back home in Gurnee with Mom, Dad, and Madison, and in Maine with Calla, Arthur, Mariah, Stephen and Jack. Lastly, most importantly: Haley, we made it! You’ve been with me every step of this journey, and I wouldn’t have gotten here without you. This is yours as much as it is mine. I am inspired by you every day. Thank you for always lovingly supporting me and believing in me. I wouldn’t trade a single day with you for the world. **************************************************************************

I was very fortunate to be funded for four years by the Department of Energy Computational Science Graduate Fellowship, provided under DOE grant DE-FG02-97ER25308. Thank you for the generous support, and for all the friends I made as part of the fellowship program. Additional funding came from DOE contract DE-AC02-09CH11466. Simulations were performed on the Perseus and Eddy clusters at Princeton University/PPPL, and the Cori system at the National Energy Research Scientific Computing Center. \dedicationto Haley, with love \makefrontmatter

Chapter 1 Introduction

1.1 Motivation: the promise of fusion energy

After Einstein first discovered the relationship between energy and mass, governed by the iconic equation E=mc2E=mc^{2}, it was soon realized that this relationship was the key to the process that produces the energy of the Sun and stars: nuclear fusion. Fifteen years after Einstein’s discovery, British astrophysicist Arthur Eddington was the first to describe how the Sun and similarly-sized stars create their energy by fusing hydrogen atoms into helium. Eddington realized that the tiny difference in mass between a helium atom and its constituent hydrogen parts, as had been recently shown by Aston, meant that the ‘missing’ mass is converted into energy via Einstein’s equation. “The store is well nigh inexhaustible, if only it could be tapped,” Eddington said in a lecture at the annual meeting of the British Association for the Advancement of Science in Cardiff (Eddington, 1920). Thus began the promise of man-made fusion as a terrestrial energy source.

One of the main allures of fusion power is the abundance of the fuel. Unlike fossils fuels, which at current energy-consumption rates would be burned through in less than 1,000 years (causing catastrophic global warming in the process), the fuel for fusion is virtually limitless because it can be extracted from seawater. The most promising fusion reaction for use on Earth is not the proton-proton reaction that powers the Sun, but an easier-to-initiate reaction between deuterium (2H) and tritium (3H):

H2+H3He4(3.5MeV)+n(14.1MeV).{}^{2}\mathrm{H}+{}^{3}\mathrm{H}\rightarrow{}^{4}\mathrm{He}\ (3.5\ \mathrm{MeV})+\mathrm{n}\ (14.1\ \mathrm{MeV}). (1.1)

Deuterium is a naturally abundant isotope of hydrogen that can be readily extracted from seawater at minimum cost, with each liter of seawater containing 0.02\sim 0.02 g of deuterium. Tritium is not naturally abundant due to its relatively short half-life of 12.3 years. However, fusion reactors can use the energetic neutron from the D-T reaction to breed their own tritium via lithium (6Li) blankets via the reaction

n+Li6He4(2.1MeV)+H3(2.7MeV).\mathrm{n}+{}^{6}\mathrm{Li}\rightarrow{}^{4}\mathrm{He}\ (2.1\ \mathrm{MeV})+{}^{3}\mathrm{H}\ (2.7\ \mathrm{MeV}). (1.2)

Current world lithium supplies are approximately 13.5 million tons, but lithium is also contained in seawater at a concentration of 0.2 mg per liter. Thus there is enough fusion fuel readily available in the oceans to power the Earth for millions of years, several orders of magnitude longer than other terrestrial fuel sources other than solar energy (Cowley, 2016).

Other major benefits of fusion are its minimal environmental impact and operational safety. Fusion would be clean and virtually carbon-neutral, emitting no greenhouse gases and not contributing to climate change. While this benefit is also shared by nuclear fission (where energy is produced by splitting the nuclei of heavy elements like uranium), fusion has the additional advantage that it has no long-lived radioactive byproducts. Helium is an inert gas, and while the energetic neutron from the D-T reaction can transmute the materials in the walls of a reactor and make them radioactive over time, the use of low-activation wall materials would make the waste substantially safer than fission waste. Further, a fusion power plant would be safer to operate than a fission power plant, as there is no runaway meltdown scenario. Unlike fission reactions, fusion reactions immediately shut down when the fuel is removed or cooled.

Unfortunately, a fusion reaction is very difficult to get started. To produce fusion, the positively-charged fuel nuclei must have enough energy to overcome the repulsive Coulomb force between them; only then can they get close enough to fuse together via the nuclear strong force and release energy. Unlike in the Sun, where immense gravitational pressure creates conditions necessary for fusion, terrestrial fusion must achieve fusion conditions via other methods. The most promising approach is to heat a gas of deuterium and tritium to very high temperature, so that particles have enough energy that random collisions can overcome the Coulomb repulsion. The energies required, of order 1010 keV, are well above the electron binding energy, resulting in the fuel gases ionizing fully and becoming a plasma.

At these extreme temperatures, the fuel cannot simply be contained by material walls. Instead, we can take advantage of the fact that a plasma is composed of charged particles. In the presence of magnetic fields, charged particles spiral helically around the field lines, providing a way to control the particle motion. Particles are still free to move parallel to the magnetic field lines, so one way to confine them is to wrap the field lines into a torus shape, creating a ‘magnetic bottle’. However, a simple ring configuration leads to vertical particle drifts, making the configuration intrinsically unstable. This problem can be overcome by twisting the field lines into a helical shape wrapping around the torus. The twisting magnetic field guides the particles up or down, counteracting the drift motion and enhancing confinement. This configuration is the basis of both the tokamak and stellarator concepts. In a tokamak, the twist in the field is produced by a current driven toroidally through the plasma, whereas in a stellarator the twist is produced by shaped helical field coils. These two configurations are shown schematically in Fig. 1.1. We will focus on tokamaks in this work.

Refer to caption
Figure 1.1: Schematic diagrams for a tokamak (left) and a stellarator (right). In a tokamak, the poloidal component of the magnetic field that gives the helical twist is produced by current driven toroidally through the plasma. In a stellarator, specially-shaped helical field coils produce the poloidal component of the magnetic field. (Source: CEA)

1.2 Turbulent transport in fusion plasmas

With the plasma confined (to lowest order), the plasma can be heated without direct contact with the vessel walls. The goal is then to keep the plasma hot enough and dense enough for long enough for fusion to occur. This is the idea behind the fusion triple product, nTτEnT\tau_{E}, where nn is the plasma density, TT is the mean temperature, and τE\tau_{E} is the energy confinement time. Lawson’s criterion gives the condition for ‘break-even’, at which point the plasma’s self-heating from fusion exceeds its losses (Wesson, 2005),

nTτE1021keVs/m3.nT\tau_{E}\geq 10^{21}\ \mathrm{keV\boldsymbol{\cdot}s/m^{3}}. (1.3)

In practice, the energy confinement time has proved to be the most challenging component to maximize. It is defined as

τE=WPloss,\tau_{E}=\frac{W}{P_{\mathrm{loss}}}, (1.4)

where WW is the energy content of the plasma and PlossP_{\mathrm{loss}} is the energy loss rate. While the particles are well-confined along the magnetic field lines so that the parallel (with respect to the field lines) confinement time is very large, particles can also diffuse radially outward, perpendicular to the magnetic field. As a result, the perpendicular diffusion rate is the limiting factor on the energy confinement time. The transport was originally thought to be dominated by collisional processes (yielding “classical” and geometry-modified “neoclassical” transport), but these processes were found to greatly under-predict the transport seen in tokamaks, with most of the measured transport denoted “anomalous”. It is now recognized that plasma turbulence is responsible for this anomalous component, so that tokamak plasma confinement is dominated by turbulent transport.

In the tokamak core, turbulence is driven by small-scale, low-frequency “micro-instabilities”. These instabilities feed off the density and temperature gradients that inherently result from the requirement that the temperature must be low (103\sim 10^{3} K) near the walls of the device but very hot in the core (108\sim 10^{8} K). Despite fluctuation levels of only order 1%1\%, core turbulence leads to significant transport of particles, momentum, and heat. The fluctuations typically have length scales perpendicular to the background magnetic field on the order of the ion gyroradius ρi=vti/Ωi\rho_{i}=v_{ti}/\Omega_{i} and frequencies (and growth rates) on the order of the diamagnetic drift frequency, ω=kθρivti/Ln\omega_{\ast}=k_{\theta}\rho_{i}v_{ti}/L_{n}, where kθk_{\theta} is a typical poloidal wavenumber, vti=Ti/miv_{ti}=\sqrt{T_{i}/m_{i}} is the ion thermal speed, Ωi=ZeB/mi\Omega_{i}=ZeB/m_{i} is the ion cyclotron frequency, and Ln=(dlnn/dr)1L_{n}=-(\textnormal{d}\ln n/\textnormal{d}r)^{-1} is the density scale length. Given these length and time scales, we can make a simple mixing-length estimate of the diffusivity,

D(Δx)2Δtρi2ωρi2kθρivtiLn.D\sim\frac{(\Delta x)^{2}}{\Delta t}\sim\rho_{i}^{2}\omega_{\ast}\sim\rho_{i}^{2}k_{\theta}\rho_{i}\frac{v_{ti}}{L_{n}}. (1.5)

Taking kθρi1k_{\theta}\rho_{i}\sim 1 yields the so-called gyro-Bohm diffusivity, DgBρi2vti/LnD_{\mathrm{gB}}\sim\rho_{i}^{2}v_{ti}/L_{n}. While this gives a rough scaling of the transport, additional theory and numerical simulation are required for meaningful understanding and quantitative prediction of turbulent transport in tokamaks.

1.3 The boundary plasma

Refer to caption
Figure 1.2: Diagram of plasma profiles in L- and H-mode regimes. In H-mode profiles are elevated by the pedestal, which is the result of a transport barrier that forms near the last closed flux surface. Figure from (Lang et al., 2013).

While the core attracted much of the focus in the early days of fusion research, it was soon realized that the edge and scrape-off layer (SOL), which we together refer to as the boundary plasma, greatly affect the device performance and dynamics. Performance is strongly determined by the edge profiles because core profiles of density and temperature are relatively stiff (Doyle et al., 2007; Kinsey et al., 2011). A primary example of this is the high-confinement mode (H-mode), first discovered by Wagner et al. (1982), where a steep-gradient transport barrier region called the pedestal forms in the edge and raises the core profiles (as if they were standing on a pedestal), as shown in Fig. 1.2. Strong sheared poloidal flows are observed in this region, correlated with a reduction in turbulent fluctuation levels and fluxes. Understanding pedestal formation and predicting the pedestal height are of great current interest (Snyder et al., 2011), and a major motivator for first-principles modeling of the boundary plasma.

The scrape-off layer (SOL) is the region outside the last closed flux surface (LCFS) where the field lines are open and terminate on material walls. Charged particles move freely along the field lines and are lost when they strike the walls (until they recombine and reenter the plasma as cold neutrals, a process called recycling). The dynamics in the SOL is primarily set by the interplay between particles and heat crossing the LCFS from the edge, parallel losses to the walls, cross-field turbulent transport, and plasma surface interactions (PSIs), including recycling and impurity fluxes. As a result of these processes, the SOL plasma is rather cold, with Te10100T_{e}\sim 10-100 eV.

Refer to caption
Figure 1.3: Diagram of limiter (a)(a) and divertor (b)(b) configurations of tokamak operation. Figure from Wesson (2005).

The termination points of the open field lines in the SOL are determined by whether the tokamak is operated in a limiter or divertor configuration, as shown in the diagram in Fig. 1.3. In the former, material limiters are placed at various locations on the first wall. The field lines that intersect the limiters then define the SOL. While the limiter configuration is operational, the divertor configuration is generally preferred in high-performance devices. In the divertor configuration, an external current in the direction of the plasma current is applied at the top and/or bottom of the device, resulting in the formation of X-point nulls. This moves the plasma-wall interactions onto the divertor targets, which are much further away from the main core plasma than limiter plates. This is beneficial since neutrals and impurities released from the divertor plates cannot directly enter the core plasma. Divertor configurations are also preferable for handling the heat exhaust requirements of the SOL and removing impurities and fusion ash via pumping (Wesson, 2005).

1.3.1 Intermittent SOL transport and blob dynamics

The cross-field transport in the SOL is highly intermittent. Unlike in the core, where the transport is dominated by small fluctuations, fluctuations in the SOL can be comparable to the equilibrium quantities. This is primarily due to the convective transport of coherent structures of enhanced density and temperature called blobs or filaments. These structures propagate quasi-ballistically, moving radially outwards and resulting in significant particle and heat transport. Blobs are highly extended along the field line with parallel lengths 110\sim 1-10 m and much smaller scales 110\sim 1-10 cm perpendicular to the field (Zweben et al., 2017). The intermittent nature of blob transport suggests that a simple picture of diffusive transport is inadequate (Naulin, 2007). Instead, the transport is avalanche-like, suggesting that the system gets pushed up against some critical gradient threshold and then intermittently releases bursts of transport when the threshold is exceeded (LaBombard et al., 2005; Labombard et al., 2008). An expansive review of experimental evidence and theoretical understanding of intermittent edge turbulence and blobs is given by D’Ippolito et al. (2011).

The basic mechanism of blob transport is plasma polarization due to magnetic drifts. On the outboard side of the tokamak, the curvature and B\nabla B drifts are vertical, with ions drifting in one direction and electrons drifting in the other. The resulting charge polarization produces a vertical electric field across the blob, giving a radially outward E×BE\times B drift (Krasheninnikov, 2001). This is shown schematically in Fig. 1.4.

Refer to caption
Figure 1.4: Diagram of basic blob transport mechanism from charge polarization. Figure from (Krasheninnikov et al., 2008).
Refer to caption
Figure 1.5: Diagram of equivalent blob circuit. Charge polarization in the blob provides a constant current source. The current flows along the field lines in a dipolar structure. The current can be closed through the sheath or through the plasma, depending on the resistivities of the respective current paths. Figure from (Krasheninnikov et al., 2008). Note that the circuit element through which the polarization current flows may be more appropriately characterized as a capacitor (Xu et al., 2010).

The magnitude of the blob electric field, and thereby the blob speed, is affected by the balance between the polarization current and parallel currents. To explain this, it is useful to visualize the currents in the blob via a blob equivalent circuit (Myra & D’Ippolito, 2005; Krasheninnikov et al., 2008; Xu et al., 2010), as shown in the circuit diagram in Fig. 1.5 from Krasheninnikov et al. (2008). (Note that the circuit element through which the polarization current flows may be more appropriately characterized as a capacitor due to plasma inertia (Xu et al., 2010).) The magnetic drifts act as a local current source. At constant current, the potential drop across the blob is determined by the resistance in the circuit. If the plasma has low resistivity (η\eta_{\parallel}), the current flows freely along the field lines to the sheath, and the effective sheath resistance (ηsheath\eta_{\mathrm{sheath}}) will determine the blob potential and thereby the blob velocity. This is known as the sheath-limited regime, and it can lead to reduced blob speed and transport as the blob polarization current can be effectively shorted out by the current closure through the sheath. Conversely, if the plasma resistivity η\eta_{\parallel} is larger due to increased collisionality, the effective resistivity in the circuit will increase and lead to larger blob velocity. At large enough resistivity, parallel currents are hindered enough that cross-field current closure happens away from the sheath via ion polarization currents or collisional currents, with complete disconnection giving the inertial or resistive-ballooning regime. Magnetic shear (especially near the X-point) can have the opposite effect on the blob velocity, as it can lead to a thin, elongated region of the blob where magnetic shear is strong. This makes it easier for cross-field currents to close the circuit through the thin sheared part of the blob, reducing the resistivity of the current loop and thereby slowing the blob. Current closure through regions of high magnetic shear can thus also effectively disconnect the blob from the sheath. However, notice that sheath disconnection due to increased collisionality gives the opposite effect on blob velocity than sheath disconnection via magnetic shear; the former results in increased effective blob circuit resistivity and larger velocities, while the latter decreases resistivities and slows the blobs (D’Ippolito et al., 2011; Krasheninnikov et al., 2008).

1.3.2 SOL heat exhaust problem

Particles and heat from the core are transported across the LCFS and exhausted in the SOL. The heat flows quickly along the open field lines to the walls, with the parallel heat flux in the SOL reaching above 500 MW/m2 in some present devices and expected to be 1\sim 1 GW/m2 in ITER (Loarte et al., 2007). The maximum heat load for present materials with active cooling is typically 1010 MW/m2 normal to the surface in steady state and 2020 MW/m2 for transients (Loarte et al., 2007). Thus the heat load must be reduced below these material limits in order to avoid damage to the wall plates and the introduction of impurities that degrade fusion performance. The heat load can be reduced in part by making the incidence angle of the magnetic field lines on the walls very shallow (25)(\sim 2-5^{\circ}) to reduce the component of the flux normal to the walls, but this still leaves a significant portion of the heat to be dissipated via other means. The width of the heat flux channel becomes an important parameter, since spreading the heat over a larger area reduces the peak heat load. Here, cross-field turbulent transport is beneficial as it can widen the heat flux width. An empirical scaling of the heat flux width, λq\lambda_{q}, computed from a multi-machine database has shown that the heat-flux width, mapped to the outboard midplane, varies strongest with the inverse of the plasma current (or equivalently, the inverse of the poloidal magnetic field strength) (Eich et al., 2013). Simply extrapolating the scaling from present-day experiments to the upcoming ITER experiment suggests that the heat flux width for the ITER Q=10Q=10 baseline could be 1\approx 1 mm (Eich et al., 2013), much smaller than the 33.53-3.5 mm result from the ITER physics basis based mostly on JET ELM-averaged data (Loarte et al., 2007). SOLPS transport modeling has suggested λq=3.6\lambda_{q}=3.6 mm (Kukushkin et al., 2013). The validity of these empirical scalings for the ITER heat flux width is an important issue that must be addressed by first-principles modeling. A recent XGC1 electrostatic gyrokinetic simulation predicted λq5.9\lambda_{q}\approx 5.9 mm (Chang et al., 2017), with the width widened due to electron turbulence. Additional analysis of XGC1 data has suggested that trapped electron mode (TEM) turbulence in particular is responsible for increased SOL heat transport. While E×BE\times B shear suppresses TEM in the SOL of present devices, E×BE\times B shear is predicted to be weaker in ITER, allowing TEM to drive transport. These results have suggested a new scaling of λq1/Bpol(a/ρi,pol)\lambda_{q}\sim 1/B_{\mathrm{pol}}(a/\rho_{i,\mathrm{pol}}), with the new parameter a/ρi,pola/\rho_{i,\mathrm{pol}} related to the neoclassical E×BE\times B shearing rate (Chang et al., 2020).

1.4 Electromagnetic effects in the boundary plasma

In this thesis we will focus in particular on electromagnetic effects in the plasma boundary. The edge/SOL region features steep pressure gradients, especially in the H-mode transport barrier and SOL regions, which contribute to the importance of electromagnetic effects. Experimental evidence has indicated that the edge plasma state is controlled by electromagnetic drift wave dynamics (LaBombard et al., 2005; Labombard et al., 2008). In this regime, the parallel electron dynamics is no longer fast relative to the drift turbulence, so electrons can no longer be treated adiabatically (Scott, 1997). This leads to coupling of the perpendicular vortex motions and kinetic shear Alfvén waves, which results in field-line bending (Xu et al., 2010). The slowing of parallel electron dynamics can also add impedance along the field line, leading to blobs becoming electrically disconnected from the sheath and resulting in enhanced blob velocities. While in the electrostatic case the sheath potential is communicated to the upstream plasma rapidly on the order of the electron transit time (τe=L/vte\tau_{e}=L_{\parallel}/v_{te}, with vte=Te/mev_{te}=\sqrt{T_{e}/m_{e}}), in the electromagnetic case Alfvén waves communicate the potential on the order of the Alfvén time, τA=L/vA=L/(2/βcs)=Lμ0nmi/B\tau_{A}=L_{\parallel}/v_{A}=L_{\parallel}/(\sqrt{2/\beta}c_{\mathrm{s}})=L_{\parallel}\sqrt{\mu_{0}nm_{i}}/B, with cs=Te/mic_{\mathrm{s}}=\sqrt{T_{e}/m_{i}} the sound speed. Thus a basic condition for electromagnetic effects to alter sheath connection is vA<vtev_{A}<v_{te}, or β^(β/2)mi/me>1\hat{\beta}\equiv(\beta/2)m_{i}/m_{e}>1. If in the time τA\tau_{A} the blob is able to move more than its width across the field, the information about the sheath will never reach it. Thus the blob will move as if the sheath did not exist if τAL/v\tau_{A}\gtrsim L_{\perp}/v_{\perp}, or β(L/L)2(cs/v)2{\beta}\gtrsim(L_{\perp}/L_{\parallel})^{2}(c_{\mathrm{s}}/v_{\perp})^{2}, where LL_{\perp} is the typical length scale of the potential of the blob, and vv_{\perp} is the blob radial velocity at the midplane (Lee et al., 2015a; Hoare et al., 2019). Given these conditions, electromagnetic effects could especially be important for the high beta filaments found in edge localized modes (ELMs), which are large-scale magnetohydrodynamic (MHD) modes that result in large, high pressure filaments originating from the pedestal. ELM filaments also carry a large unidirectional current, distinguishing them from standard blobs and further enhancing the electromagnetic effects of ELMs by inducing magnetic field perturbations (Myra, 2007; Kirk et al., 2005, 2006; Migliucci & Naulin, 2010; Vianello et al., 2011). Additionally, experiments have found correlations between (non-ELM) large blobs and MHD modes (Zweben et al., 2020).

The following subsections briefly illustrate the role of magnetic induction in determining the parallel electron dynamics and producing field-line bending, mostly following Xu et al. (2010) and Scott (1997).

1.4.1 Parallel electron dynamics and the role of magnetic induction

The strong mobility of electrons along the field line makes it important to understand how the parallel current responds to forces due to parallel gradients in the density nn, electron temperature TeT_{e}, and the electrostatic potential Φ\Phi. The linear response determines the propagation of wave-like disturbances along the field line. The dynamics is governed by the electron parallel force balance equation, also known as the parallel component of the generalized Ohm’s law. In the electrostatic limit, we have

mene2dJdt+ηJ=1nepeΦ.\frac{m_{e}}{ne^{2}}\frac{\textnormal{d}J_{\parallel}}{\textnormal{d}t}+\eta_{\parallel}J_{\parallel}=\frac{1}{ne}{\nabla}_{\parallel}p_{e}-{\nabla}_{\parallel}\Phi. (1.6)

On the right-hand side, we have the balance between the parallel pressure and electric forces, where pe=nTep_{e}=nT_{e} is the electron pressure, n=ni=nen=n_{i}=n_{e} is the plasma density (assuming a quasi-neutral plasma with singly charged ions), and E=ΦE_{\parallel}=-\nabla_{\parallel}\Phi is the parallel electric field in the electrostatic limit. Here, =𝐛^\nabla_{\parallel}=\mathbf{\hat{b}}\boldsymbol{\cdot}\nabla denotes a derivative in the direction of the background magnetic field, 𝐛^=𝑩0/B\mathbf{\hat{b}}=\mbox{\boldmath${B}$}_{0}/B. On the left-hand side, the first term is electron inertia, which gives finite-electron-mass (mem_{e}), collisionless effects. Here, d/dt=/t+𝒗E\textnormal{d}/\textnormal{d}t=\partial/\partial t+\mbox{\boldmath${v}$}_{E}\boldsymbol{\cdot}\nabla is the total time derivative, with 𝒗E=(1/B)𝐛^×Φ\mbox{\boldmath${v}$}_{E}=(1/B)\mathbf{\hat{b}}\times\nabla\Phi the E×BE\times B velocity. The second term on the left-hand side is resistive friction, with JenueJ_{\parallel}\approx-enu_{\parallel e} the parallel current (dominated by electron parallel flow ueu_{\parallel e}) and η=0.51meνei/(ne2)\eta_{\parallel}=0.51m_{e}\nu_{ei}/(ne^{2}) the parallel resistivity, which is proportional to the electron collision frequency. The electrons are said to be “adiabatic” when the forces on the right-hand side balance. After linearizing and assuming the electrons are sufficiently fast to isothermalize along the field line so that Te=0\nabla_{\parallel}T_{e}=0, we have

Te0n=n0eΦ,T_{e0}\nabla_{\parallel}n=n_{0}e\nabla_{\parallel}\Phi, (1.7)

which results in the adiabatic electron density response, given by the Boltzmann distribution n=n0eΦ/Te0n=n_{0}e\Phi/T_{e0}, with subscript 0 denoting background quantities.

Now we will introduce electromagnetic (finite β\beta) effects. We will consider only perpendicular magnetic fluctuations of the form 𝑩1=×(A𝐛^)𝐛^×A\mbox{\boldmath${B}$}_{1}=\nabla\times(A_{\parallel}\mathbf{\hat{b}})\approx-\mathbf{\hat{b}}\times\nabla A_{\parallel}, where AA_{\parallel} is the parallel component of the magnetic vector potential. This is related to the parallel current via the parallel component of Ampère’s law,

2A=μ0J.-\nabla_{\perp}^{2}A_{\parallel}=\mu_{0}J_{\parallel}. (1.8)

Electromagnetic effects enter into parallel force balance in two ways. First, the parallel gradient must be taken along perturbed field lines, resulting in an additional “magnetic flutter” component due to 𝑩1\mbox{\boldmath${B}$}_{1}:

~1B(𝑩0+𝑩1)=𝐛^×A.\tilde{\nabla}_{\parallel}\equiv\frac{1}{B}(\mbox{\boldmath${B}$}_{0}+\mbox{\boldmath${B}$}_{1})\boldsymbol{\cdot}\nabla=\nabla_{\parallel}-\mathbf{\hat{b}}\times\nabla A_{\parallel}\boldsymbol{\cdot}\nabla. (1.9)

Second, magnetic induction adds to the parallel electric field, which is now given by

E=~ΦAt.E_{\parallel}=-\tilde{\nabla}_{\parallel}\Phi-\frac{\partial A_{\parallel}}{\partial t}. (1.10)

As a result, the parallel force balance equation becomes

At+mene2dJdt+ηJ=1ne~p~Φ.\frac{\partial A_{\parallel}}{\partial t}+\frac{m_{e}}{ne^{2}}\frac{\textnormal{d}J_{\parallel}}{\textnormal{d}t}+\eta_{\parallel}J_{\parallel}=\frac{1}{ne}\tilde{\nabla}_{\parallel}p_{\parallel}-\tilde{\nabla}_{\parallel}\Phi. (1.11)

Balancing the first two terms on the left-hand side, we can see that induction is dominant over inertia at perpendicular scales larger than the collisionless skin depth de=me/(n0e2μ0)d_{e}=\sqrt{m_{e}/(n_{0}e^{2}\mu_{0})}, so that kde<1k_{\perp}d_{e}<1. Balancing the first and third terms on the left-hand side gives that induction is dominant over resistivity at perpendicular scales larger than the collisional skin depth, so that kdeνei/ω<1k_{\perp}d_{e}\sqrt{\nu_{ei}/\omega}<1, with ω\omega some characteristic frequency so that /tω\partial/\partial{t}\sim\omega. Any imbalance of the forces on the right-hand side will result in non-adiabatic electrons, providing a channel to exchange the internal particle energy with the magnetic energy of field-line bending (via induction), or producing irreversible dissipation of magnetic energy (via resistivity). Defining the parallel electromotive force (emf) as (Hinton et al., 2003; Xu et al., 2010)

ψ(ηJE)d,\psi\equiv\int(\eta_{\parallel}J_{\parallel}-E_{\parallel})\textnormal{d}\ell, (1.12)

with \ell the length along the perturbed field line, we can rewrite parallel force balance compactly as

At+ηJ=~(ψΦ).\frac{\partial A_{\parallel}}{\partial t}+\eta_{\parallel}J_{\parallel}=\tilde{\nabla}_{\parallel}(\psi-\Phi). (1.13)

1.4.2 Field-line bending

To compute the evolution (bending) of magnetic field lines, we use Faraday’s law,

𝑩1t=×𝑬.\frac{\partial\mbox{\boldmath${B}$}_{1}}{\partial t}=-\nabla\times\mbox{\boldmath${E}$}. (1.14)

The electric field is given by

𝑬=Φ𝐛^At=ϕ~(ψΦ)𝐛^+η𝑱=Φ~ψ𝐛^+η𝑱,\mbox{\boldmath${E}$}=-\nabla\Phi-\mathbf{\hat{b}}\frac{\partial A_{\parallel}}{\partial t}=-\nabla\phi-\tilde{\nabla}_{\parallel}(\psi-\Phi)\mathbf{\hat{b}}+\eta\mbox{\boldmath${J}$}=-\nabla_{\perp}\Phi-\tilde{\nabla}_{\parallel}\psi\mathbf{\hat{b}}+\eta\mbox{\boldmath${J}$}, (1.15)

where we have used parallel force balance and dropped the parallel subscripts on the resistivity term (ηJηJ\eta_{\parallel}J_{\parallel}\gg\eta_{\perp}J_{\perp}). Note that Φ=𝒗E×(𝑩0+𝑩1)\nabla_{\perp}\Phi=\mbox{\boldmath${v}$}_{E}\times(\mbox{\boldmath${B}$}_{0}+\mbox{\boldmath${B}$}_{1}). Substituting into Faraday’s law, we have

𝑩1t=×[𝒗E×(𝑩0+𝑩1)]+×(~ψ𝐛^)+Dm2𝑩1η×𝑱.\frac{\partial\mbox{\boldmath${B}$}_{1}}{\partial t}=-\nabla\times\left[\mbox{\boldmath${v}$}_{E}\times(\mbox{\boldmath${B}$}_{0}+\mbox{\boldmath${B}$}_{1})\right]+\nabla\times(\tilde{\nabla}_{\parallel}\psi\mathbf{\hat{b}})+D_{m}\nabla^{2}\mbox{\boldmath${B}$}_{1}-\nabla\eta\times\mbox{\boldmath${J}$}. (1.16)

From left to right, on the right-hand side we have a frozen-in term, a drift term, a magnetic diffusion term (with Dm=η/μ0D_{m}=\eta/\mu_{0}) and a resistivity gradient term. In the limit of small resistivity, we can write

𝑩1t×[~(ψΦ)𝐛^].\frac{\partial\mbox{\boldmath${B}$}_{1}}{\partial t}\approx\nabla\times\left[\tilde{\nabla}_{\parallel}(\psi-\Phi)\mathbf{\hat{b}}\right]. (1.17)

This shows that the net parallel gradient force (the right-hand side of Eq. 1.13) drives line bending via non-adiabatic electrons exchanging energy with the magnetic field (Xu et al., 2010).

Note that we can also write the electric field as

𝑬=(𝑩0+𝑩1)×𝒗Fψ+η𝑱,\mbox{\boldmath${E}$}=(\mbox{\boldmath${B}$}_{0}+\mbox{\boldmath${B}$}_{1})\times\mbox{\boldmath${v}$}_{F}-\nabla\psi+\eta\mbox{\boldmath${J}$}, (1.18)

where 𝒗F(1/B)𝐛^×(Φψ)\mbox{\boldmath${v}$}_{F}\equiv(1/B)\mathbf{\hat{b}}\times\nabla(\Phi-\psi) is the velocity of field lines (neglecting resistive magnetic diffusion). From this, Faraday’s law becomes

𝑩1t=×[𝒗F×(𝑩0+𝑩1)]+Dm2𝑩1η×𝑱.\frac{\partial\mbox{\boldmath${B}$}_{1}}{\partial t}=-\nabla\times\left[\mbox{\boldmath${v}$}_{F}\times(\mbox{\boldmath${B}$}_{0}+\mbox{\boldmath${B}$}_{1})\right]+D_{m}\nabla^{2}\mbox{\boldmath${B}$}_{1}-\nabla\eta\times\mbox{\boldmath${J}$}. (1.19)

From this it follows that magnetic flux is conserved in the limit of no resistivity or diffusion, with field lines advected with velocity 𝒗F\mbox{\boldmath${v}$}_{F}. The difference between the E×BE\times B velocity and the velocity of the field lines is a function of the parallel emf: Δ𝒗=𝒗E𝒗F=(1/B)𝐛^×ψ\Delta\mbox{\boldmath${v}$}=\mbox{\boldmath${v}$}_{E}-\mbox{\boldmath${v}$}_{F}=(1/B)\mathbf{\hat{b}}\times\nabla\psi (Xu et al., 2010).

1.5 Modeling the boundary plasma

The boundary of a tokamak is a complicated nonlinear system. As such, numerical modeling is a critical tool for helping to understand the physics of the boundary plasma. As detailed below, several approaches have produced valuable results and insights at varying levels of complexity and computational expense. Overviews of some of the numerical modeling approaches and associated simulation codes for the boundary plasma are given by Ricci (2015); Loarte et al. (2007); Shi (2017), and briefly detailed below.

1.5.1 Empirical modeling

Empirical extrapolation of data obtained from present devices serves as the basis for much of the modeling and design of tokamak divertors and wall systems. Codes solve a simplified set of transport equations based on the Braginskii fluid equations in two dimensions, assuming axisymmetry. Since plasma turbulence is not captured directly in these models, ad hoc cross-field anomalous diffusion coefficients are used, with the parameters adjusted to fit existing experimental data. This system is often coupled to a Monte-Carlo neutral particle model so that pumping, fueling, and plasma-wall interactions can be modeled. Codes using this approach include SOLPS (formerly B2-EIRENE) (Reiter et al., 1991; Schneider et al., 1992), UEDGE (Rognlien et al., 1994), EDGE2D (Simonini et al., 1994), and SOLDOR (Shimizu et al., 2003). SOLPS has been used extensively as the SOL simulation code for the ITER divertor design (Pitts et al., 2009; Kukushkin et al., 2011).

1.5.2 Fluid modeling

Given the relatively low temperatures and high collisionalities of the scrape-off layer, a fluid approach is reasonable to reduce the computational cost of global turbulence simulations. As such, models based on the drift-reduced Braginskii equations (Braginskii, 1965; Zeiler et al., 1997) have provided valuable results and insights on boundary plasma phenomenon. Since these models only evolve the first three moments of the distribution function, they rely on high collisionality to provide fluid closure. This implicitly assumes that the distribution function is close to thermal equilibrium. Codes employing the drift-reduced Braginskii approach include BOUT++ (Xu et al., 2008), GBS (Ricci et al., 2012; Halpern et al., 2016), TOKAM3X (Tamain et al., 2010), GDB (Zhu et al., 2018), and GRILLIX (Stegmeir et al., 2018).

There have also been efforts to extend the validity of the moment-based approach to more kinetic regimes by using gyrofluid models (Ribeiro & Scott, 2008; Madsen, 2013; Held et al., 2016), based on earlier work on gyrofluid models for core turbulence (Hammett & Perkins, 1990; Dorland & Hammett, 1993; Beer & Hammett, 1996; Snyder & Hammett, 2001). Another recent approach uses an Hermite-Laguerre formulation to allow the use of an arbitrary number of moments, although this approach has not yet produced numerical results (Jorge et al., 2017; Frei et al., 2020).

1.5.3 Gyrokinetic modeling

Despite the high collisionality of the plasma boundary, kinetic treatments will inevitably be necessary for reliable quantitative predictions in some cases (Jenko & Dorland, 2001; Cohen & Xu, 2008). Significant deviations from thermal equilibrium can occur due to transient events such as ELMs (Batishcheva et al., 1996). Kinetic treatments are also required if one wishes to cross the LCFS and model the coupled dynamics of the pedestal and the SOL within a single framework, since the fluid approximations break down in the hot pedestal.

While the most general approach would involve solving the full six-dimensional Vlasov-Maxwell or Fokker-Planck-Maxwell system to model the plasma, this is impractical due to the high dimensionality and wide range of timescales involved, including the fast cyclotron motion. Instead, we can take advantage of the fact that the characteristic turbulent modes have frequencies much lower than the cyclotron frequency, allowing us to average over the cyclotron motion and eliminate one of the velocity dimensions (the gyrophase angle). The result is the gyrokinetic model, which describes the evolution of particle guiding centers in a reduced five-dimensional phase space. Gyrokinetic theory and direct numerical simulation have become important tools for studying turbulence and transport in fusion plasmas, especially in the core region (Dimits et al., 2000). This includes the simulation codes GEM (Parker et al., 1993a), GS2 (Kotschenreuther et al., 1995; Dorland et al., 2000), GTC (Lin et al., 2000), GENE (Jenko, 2000), EUTERPE (Jost et al., 2001), GYRO (Candy & Waltz, 2003), GT3D (Idomura et al., 2003), GKV (Watanabe & Sugama, 2005), GTS (Wang et al., 2006), ORB5 (Jolliet et al., 2007; Lanti et al., 2019), GT5D (Idomura et al., 2008), GKW (Peeters et al., 2009), CGYRO (Candy et al., 2016), and GX (Mandell et al., 2018). In the edge and SOL, gyrokinetic simulations are particularly challenging because the large, intermittent fluctuations in the SOL make assumptions of scale separation between equilibrium and fluctuations not strongly valid. This necessitates a full-ff approach that self-consistently evolves the full distribution function, ff (as opposed to the δf\delta f approach commonly used in the core, where one assumes f=F0+δff=F_{0}+\delta f with a fixed background F0F_{0} so that only δf\delta f perturbations must be evolved, and the parallel electric field nonlinearity is frequently neglected). Additional complications of the edge/SOL region include: open field line regions requiring sheath boundary conditions and models of plasma-wall interactions; X-point geometry in diverted configurations, which makes the use of efficient field-aligned coordinate systems challenging; a wide range of collisionality regimes, from the hot pedestal top to the cold SOL; and atomic physics and neutral interactions. Major extensions to existing core gyrokinetic codes or altogether new efforts are required to meet these challenges. To this end, steady progress in gyrokinetic boundary plasma modeling has been made with both particle-in-cell (PIC) and continuum methods. Codes employing the PIC method in the plasma boundary include XGC1 (Ku et al., 2009, 2016) and ELMFIRE (Korpilo et al., 2016). Continuum methods are used by the codes COGENT (Dorf et al., 2016), Gkeyll (Shi et al., 2017, 2019; Mandell et al., 2020) and a modified version of GENE (Pan et al., 2018). Both PIC and continuum methods have their own advantages and disadvantages, as we detail briefly below. XGC1 is currently the most sophisticated code for the plasma boundary, capable of simulating electrostatic gyrokinetic turbulence in realistic diverted geometries, including neutral and atomic physics. It is critical to have at least a few successful codes that can cross-check against each other on the difficult problems in the edge/SOL, so as to give more confidence to the predictions.

Particle-in-cell (PIC) approach

The first gyrokinetic simulation algorithms used particle-in-cell (PIC) methods (Lee, 1983; Dimits & Lee, 1993; Parker & Lee, 1993; Denton & Kotschenreuther, 1995; Dimits et al., 1996). In the PIC approach, the 5D phase space is sampled with an ensemble of NpN_{p} markers or ‘superparticles’, representing some clump of physical particles with given position and velocity. The markers are advanced through the domain according to the characteristics of the gyrokinetic equation, while the electromagnetic fields are evaluated and solved on a fixed three-dimensional grid. Communication between the markers and fields requires interpolation: in order to solve the field equations, the markers must be interpolated onto the grid positions so that charges and currents can be computed; likewise, the effects of the fields must be interpolated onto the marker positions to advance the particles. Since the PIC method is essentially a Monte Carlo sampling technique, sampling noise (which scales as 1/Np1/\sqrt{N_{p}}) arises in moment calculation and can be problematic in some cases (Nevins et al., 2005; Krommes, 2007; Wilkie & Dorland, 2016). The sampling noise can be reduced but not completely eliminated by δf\delta f methods (Denton & Kotschenreuther, 1995). Various other techniques have been used to reduce noise (Chen & Parker, 2007; Garbet et al., 2010). Noise-related issues have contributed to the challenges of handling electromagnetic fluctuations in PIC codes due to the Ampère cancellation problem, as we discuss below. In general, PIC methods benefit from being rather intuitive, fairly efficient, and easily parallelizable, with straight-forward generalization to higher dimensionality. The lack of a need for a velocity-space grid is attractive. Further, PIC methods automatically guarantee positivity of the distribution function. PIC methods also have a longer history to draw on than continuum methods.

Continuum (grid-based) approach

The first continuum gyrokinetic codes were developed some years later (Kotschenreuther et al., 1995; Dorland et al., 2000; Jenko, 2000; Jenko & Dorland, 2001; Candy & Waltz, 2003). In the continuum method, the full five-dimensional gyrokinetic distribution function is discretized on a 5D phase-space grid. Conventional numerical methods for solving partial differential equations are then used to advance the distribution function according to the gyrokinetic equation, including finite-difference, finite-volume, (pseudo)spectral, finite-element, and discontinuous Galerkin (DG) methods. Since the electromagnetic fields are discretized on the configuration-space subset of the grid, no interpolation is required to solve the field equations, only moment calculations. Continuum methods do not suffer from statistical noise issues, which has contributed to the success of continuum codes in including electromagnetic effects where some PIC codes have failed. Discretization on a five-dimensional phase-space grid presents some additional challenges for parallelization and memory handling, but these issues can still be handled efficiently with well-designed schemes. In particular, continuum schemes can make use of high-order methods that perform more calculations per grid point and potentially enable faster convergence. One key disadvantage of continuum methods is the strict Courant-Friedrichs-Lewy (CFL) stability limit placed on the time step for explicit time-advance schemes, which can be especially restrictive for electrostatic simulations (Lee, 1987) and highly-collisional regimes. Another disadvantage of the continuum approach is that the typical numerical methods used do not guarantee positivity of the distribution function, which can cause numerical stability issues.

Including electromagnetic effects

Including electromagnetic effects in gyrokinetic simulations has proved numerically and computationally challenging, both in the core and in the edge. The so-called Ampère cancellation problem is one of the main numerical issues that has troubled primarily PIC codes (Reynders, 1993; Cummings, 1994). Various δf\delta f PIC schemes to address the cancellation problem have been developed and there are interesting recent advances in this area (Chen & Parker, 2003; Mishchenko et al., 2004; Hatzky et al., 2007; Mishchenko et al., 2014; Startsev & Lee, 2014; Bao et al., 2018). Meanwhile, some continuum δf\delta f core codes avoided the cancellation problem completely (Rewoldt et al., 1987; Kotschenreuther et al., 1995), while others had to address somewhat minor issues resulting from it (Jenko, 2000; Candy & Waltz, 2003). With respect to the cancellation problem, one possible reason for the differences might be that in continuum codes the fields and particles are discretized on the same grid, whereas in PIC codes the particle positions do not coincide with the field grid. Because particle positions are randomly located relative to the field grid, one might need to be more careful in some way when treating the interaction of the particles and electromagnetic fields.

Prior to the work described in this thesis, all published nonlinear electromagnetic gyrokinetic results had focused on the core region, mostly within the δf\delta f formulation neglecting the EE_{\parallel} nonlinearity (although the ORB5 PIC code includes the EE_{\parallel} nonlinearity and is effectively full-ff (Lanti et al., 2019)). The XGC1 code is also full-ff and is focused on both the core and the edge/SOL; it has an option for a gyrokinetic ion/drift-fluid massless electron hybrid model (Hager et al., 2017), with a fully kinetic implicit electromagnetic scheme based on Chen et al. (2015) recently implemented and under further development (Ku et al., 2018b). The GENE-X code is a recent extension of the core gyrokinetic code GENE (Jenko, 2000) to a full-ff electromagnetic formulation similar to the one presented in this work. GENE-X has now produced preliminary (but not yet published) global electromagnetic gyrokinetic simulations including the SOL and X-point. Other gyrokinetic codes working on the SOL are not yet electromagnetic. To our knowledge, the results presented here were the first nonlinear electromagnetic full-ff gyrokinetic turbulence simulations on open field lines. The demonstration of full-ff electromagnetic capabilities, handled in stable and efficient manner that does not significantly increase the computational cost, is a major contribution of this thesis.

Handling diverted geometries with X-point

Another challenge is the magnetic geometry of the edge/SOL region, which requires treatment of open and closed magnetic field-line regions and the resulting plasma interactions with material walls on open field lines. The X-point in a diverted geometry is an additional complication which makes the use of field-aligned coordinates challenging.

Core gyrokinetic codes typically use such a field-aligned coordinate system, which allows one to take advantage of the elongated nature of the turbulence along the field line. This reduces the computational demands by allowing a coarse grid along the field line. Unfortunately, field-aligned coordinate systems are singular at the separatrix in diverted geometries due to the presence of the X-point (Stegmeir et al., 2016). This has lead some codes to abandon field-aligned coordinates altogether, opting instead for simpler cylindrical coordinates. XGC1 uses a cylindrical coordinate system for the particle motion and an unstructured field-following triangular mesh for the field solver (Ku et al., 2016). BOUT++ uses multiple blocks, each with separate field-aligned coordinates systems, that conform to the X-point but still avoid it (Leddy et al., 2017). Recent interest has focused on ideas like the flux-coordinate independent (FCI) approach, which abandons field- and flux-aligned coordinates in the poloidal plane but retains a field-line-following discretization of the parallel gradient operator to regain some of the advantages of field-aligned domains (Hariri & Ottaviani, 2013; Hariri et al., 2014; Stegmeir et al., 2016). This approach has been pioneered by the GRILLIX fluid code (Stegmeir et al., 2016, 2018), and recently adopted by several codes, including GDB, GBS, and GENE-X. Another recent approach by the COGENT code uses a flux-aligned poloidal grid with controlled dealignment near the X-point (McCorquodale et al., 2015; Dorf et al., 2016; Dorf & Dorr, 2020). After breaking the toroidal direction into several blocks (wedges), a local field-aligned coordinate system is used in each block. Interpolation (similar to what is done in the FCI approach) is required to compute the parallel derivatives between blocks.

Among gyrokinetic codes, currently only XGC1 (Ku et al., 2016) has published results simulating turbulence in a three-dimensional diverted geometry with an X-point. As mentioned above, the recently-developed GENE-X code is also capable of including the X-point in global gyrokinetic turbulence simulations.

1.6 Thesis overview

First-principles modeling is crucial for understanding the dynamics in the boundary plasma. In particular, there is a need for comprehensive gyrokinetic simulations including electromagnetic effects. To this end, our efforts in this thesis are focused on demonstrating and advancing the capabilities of the gyrokinetic modules of the Gkeyll plasma simulation framework (which also includes solver modules for the Vlasov–Maxwell system (Cagas et al., 2017; Juno et al., 2018) and multi-moment fluid equations (Wang et al., 2015)). Gkeyll was the first successful continuum gyrokinetic code on open field lines due to the pioneering work of Shi (2017); Shi et al. (2017, 2019). In this work we make the critical step of including electromagnetic fluctuations in Gkeyll and demonstrating that this additional physics can be handled in a stable and efficient manner. A primary goal is then to investigate how electromagnetic effects can influence SOL turbulence and transport dynamics.

In Chapter 2 we derive the 5D full-ff electromagnetic gyrokinetic system in Hamiltonian form using the symplectic (vv_{\parallel}) formulation. In Chapter 3 we describe an energy-conserving high-order discontinuous Galerkin discretization scheme for the EMGK system that has been implemented in Gkeyll, building on the electrostatic scheme of Shi (2017). In Chapter 4 we leverage Gkeyll’s new electromagnetic capabilities to produce the first published electromagnetic gyrokinetic results on open field lines. These simulations use a simple helical scrape-off layer as a model of the SOL of the National Spherical Torus Experiment (NSTX) experiment at PPPL, extending the electrostatic results of Shi et al. (2019). Chapter 5 moves towards more realistic geometry by describing and formulating field-aligned coordinate systems for use in SOL geometries with magnetic shear and shaping. Chapter 6 develops a novel positivity-preserving DG scheme which can improve robustness and accuracy of the simulations while maintaining critical conservation laws. Finally, we conclude in Chapter 7 by reviewing the main results and describing important areas for future work.

Chapter 2 Theoretical background: the full-ff electromagnetic gyrokinetic system

Turbulence in strongly magnetized plasma is characterized by frequencies much smaller than the ion cyclotron frequency (ωΩi)(\omega\ll\Omega_{i}) and strong anisotropy, with correlation lengths along the background field much longer than perpendicular to it (kk)(k_{\parallel}\ll k_{\perp}). These two properties are the basis for gyrokinetic theory, which reduces the full six-dimensional (three position dimensions and three velocity dimensions) kinetic phase space to five dimensions by averaging over the cyclotron motion. This eliminates a velocity coordinate (the gyrophase angle) and results in a kinetic description of the dynamics of charged gyro-rings. The first derivations of gyrokinetics used a recursive procedure to generate an order-by-order asymptotic expansion, yielding the local δf\delta f gyrokinetic equation with the distribution function separated into equilibrium (F0F_{0}) and perturbed (δf\delta f) parts (Catto, 1978; Antonsen & Lane, 1980; Frieman & Chen, 1982; Abel et al., 2013).

Alternative approaches were later presented which derived (global, full-ff) gyrokinetics via Lagrangian and Hamiltonian Lie-transform perturbation methods (Dubin et al., 1983; Hahm et al., 1988; Brizard & Hahm, 2007; Sugama, 2000). We will take this latter approach in this chapter, using phase-space-Lagrangian Lie perturbation methods (Littlejohn, 1983) to systematically derive self-consistent, energy-conserving, global gyrokinetic equations. We primarily follow Brizard & Hahm (2007) and references therein, but we have also found a series of Ph.D. dissertations from the GENE group (Dannert, 2005; Pueschel, 2009; Görler, 2009; Lapillonne, 2010; Told, 2012)111(Dannert, 2005) is written in German but Google Translate does an admirable job of parsing it. to be helpful for understanding parts of the derivation at a more introductory level.

2.1 Gyrokinetic single-particle dynamics

The goal of this first section is to obtain gyrokinetic equations of motion for single particles. We start from the description of a non-relativistic charged particle with charge qq, mass mm, and velocity 𝒗{v} at position 𝒙{x} in the presence of an electrostatic potential Φ(𝒙)\Phi(\mbox{\boldmath${x}$}) and magnetic potential 𝑨(𝒙)\mbox{\boldmath${A}$}(\mbox{\boldmath${x}$}). The single-particle phase-space Lagrangian is

L(𝒙,𝒗,𝒙˙,𝒗˙,t)=(m𝒗+q𝑨)𝒙˙(12m|𝒗|2+qΦ)𝒑𝒙˙H,L(\mbox{\boldmath${x}$},\mbox{\boldmath${v}$},\dot{\mbox{\boldmath${x}$}},\dot{\mbox{\boldmath${v}$}},t)=\left(m\mbox{\boldmath${v}$}+q\mbox{\boldmath${A}$}\right)\boldsymbol{\cdot}\dot{\mbox{\boldmath${x}$}}-\left(\frac{1}{2}m|\mbox{\boldmath${v}$}|^{2}+q\Phi\right)\equiv\mbox{\boldmath${p}$}\boldsymbol{\cdot}\dot{\mbox{\boldmath${x}$}}-H, (2.1)

where 𝒑=m𝒗+q𝑨\mbox{\boldmath${p}$}=m\mbox{\boldmath${v}$}+q\mbox{\boldmath${A}$} is the canonical momentum of the particle (in SI units), 𝒗=𝒙˙d𝒙/dt\mbox{\boldmath${v}$}=\dot{\mbox{\boldmath${x}$}}\equiv\textnormal{d}\mbox{\boldmath${x}$}/\textnormal{d}t, and HH is the Hamiltonian (for an introduction to the phase-space Lagrangian formulation of mechanics, see section II of Cary & Brizard, 2009). This Lagrangian will now be subjected to a series of coordinate transformations that will separate the fast gyromotion from the guiding-center and gyrocenter dynamics.

2.1.1 Ordering assumptions

The fundamental ordering requirement that allows us to effectively ignore the fast gyromotion of a charged particle in a magnetic field is

ωΩϵ1,\frac{\omega}{\Omega}\sim\epsilon\ll 1, (2.2)

where ω\omega is a typical frequency of interest, and Ω=qB/m\Omega=qB/m is the gyrofrequency for some species of interest. We will focus on drift wave turbulence, which has characteristic frequencies ωωvt/Lp\omega\sim\omega_{*}\sim v_{t}/L_{p}, where vtv_{t} is the thermal speed and LpL_{p} is a characteristic macroscopic scale length over which profile quantities vary. This implies that

ρLpϵ1\frac{\rho}{L_{p}}\sim\epsilon\ll 1 (2.3)

is another small parameter, where ρ=vt/Ω\rho=v_{t}/\Omega is the thermal gyroradius. This ordering is valid in many tokamaks over a wide range of experimental conditions, including the edge and scrape-off layer. The frequency and length-scale orderings from Eqs. 2.2 and 2.3 comprise the primary ordering in ϵ\epsilon. We must then decide how to deal with fluctuations, flows, and magnetic geometry within the model, resulting in additional parameters ordered with ϵ\epsilon and ϵ2\epsilon^{2}.

The standard nonlinear gyrokinetic ordering (Frieman & Chen, 1982) also assumes small fluctuations,

δfF0qδΦTϵ,\frac{\delta f}{F_{0}}\sim\frac{q\delta\Phi}{T}\sim\epsilon,

where δf\delta f and δΦ\delta\Phi are perturbations of the distribution function and potential, respectively, and F0F_{0} is the equilibrium distribution function. Typical wavenumbers (of the perturbations) are then ordered as

kρϵ,kρ1.k_{\parallel}\rho\sim\epsilon,\qquad k_{\perp}\rho\sim 1.

This is the “δf\delta f” ordering, which is usually well-satisfied in the core of tokamak plasmas, and has been used successfully to study core microturbulence for many years (Parker et al., 1993a; Kotschenreuther et al., 1995; Lin et al., 2000; Dimits et al., 2000; Dorland et al., 2000; Jenko, 2000; Jost et al., 2001; Candy & Waltz, 2003; Idomura et al., 2003; Watanabe & Sugama, 2005; Jolliet et al., 2007; Idomura et al., 2008; Peeters et al., 2009; Lanti et al., 2019). In the edge region, however, the δf\delta f ordering is not strongly valid due to the presence of large fluctuations, even though the fundamental frequency ordering is still satisfied.

The ordering can be generalized to allow larger perturbations by instead taking a drift ordering (Dimits et al., 1992; Parra & Catto, 2008; Dimits, 2012)

ϵVvEvtkρqΦTϵ1,\epsilon_{V}\equiv\frac{v_{E}}{v_{t}}\simeq k_{\perp}\rho\frac{q\Phi}{T}\sim\epsilon\ll 1, (2.4)

where vEv_{E} is the E×BE\times B drift velocity from Φ\Phi. Here, we have defined a new ordering parameter ϵV\epsilon_{V}, which we take to be 𝒪(ϵ)\mathcal{O}(\epsilon). This is commonly referred to as the “weak-flow” ordering since it takes E×BE\times B flows to be small compared to the thermal speed; this is generally satisfied in the edge and scrape-off layer (Brower et al., 1987; Gohil et al., 1994; Zweben et al., 2015). By constraining gradients of Φ\Phi instead of Φ\Phi itself, the weak-flow ordering simultaneously allows large perturbations qΦ/T1q\Phi/T\sim 1 at long wavelengths (kρϵV1k_{\perp}\rho\sim\epsilon_{V}\ll 1) and small perturbations qΦ/TϵVq\Phi/T\sim\epsilon_{V} at short wavelengths (kρ1k_{\perp}\rho\sim 1), along with perturbations at intermediate scales. Another way to think about this is that one can use Φ(𝑹)\Phi(\mbox{\boldmath${R}$}) at the center of a gyro-orbit (denoted 𝑹{R}) as a reference point, and then one can require that the variation of the potential energy around a gyro-orbit be small compared to the kinetic energy,

qΦ(𝑹+𝝆)qΦ(𝑹)q𝝆ΦT,q\Phi(\mbox{\boldmath${R}$}+\mbox{\boldmath${\rho}$})-q\Phi(\mbox{\boldmath${R}$})\approx q\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\nabla\Phi\ll T, (2.5)

which leads to the same criterion as above (Hammett, 2016). Here 𝝆{\rho} is the gyroradius vector which points from the center of the gyro-orbit 𝑹{R} to the particle location 𝒙{x} (it will be defined more precisely below). The ordering has also been extended further to allow strong E×BE\times B flows of order the thermal speed (ϵV1\epsilon_{V}\sim 1) (Artun & Tang, 1994; Brizard, 1995; Hahm, 1996; Qin et al., 2007; Hahm et al., 2009; Dimits, 2010; Sharma & McMillan, 2015; McMillan & Sharma, 2016; Sharma & McMillan, 2020); we will not consider this here.

We also need an ordering parameter pertaining to the magnetic geometry. For this, we introduce the equilibrium magnetic field scale length LB|lnB|1L_{B}\sim|\nabla_{\perp}\ln B|^{-1} R\sim R, where BB is the background magnetic field and RR is the major radius. In the core we expect LBLpL_{B}\sim L_{p}, but the edge features much stronger gradients so that Lp/LBLp/Rρ/LpϵL_{p}/L_{B}\sim L_{p}/R\lesssim\rho/L_{p}\sim\epsilon is small (Gohil et al., 1994; Burrell et al., 1994; Zweben et al., 2007). This leads us to a strong-gradient ordering, in which we define an additional ordering parameter

ϵBρLBϵ2.\epsilon_{B}\equiv\frac{\rho}{L_{B}}\sim\epsilon^{2}. (2.6)

This ordering has been employed in several edge gyrokinetic models (Hahm et al., 2009; Dimits, 2012; Frei et al., 2020), as it allows the gyrokinetic derivation to proceed fully consistently (up to second order in ϵ\epsilon) in a two-step process, first by using the ϵB\epsilon_{B} ordering to derive the guiding-center motion, and then subsequently using the ϵV\epsilon_{V} ordering to introduce electromagnetic perturbations. Without the strong-gradient ordering, ϵBϵVϵ\epsilon_{B}\sim\epsilon_{V}\sim\epsilon are of the same order, which is usually the case in the core. Even though many derivations still use the two-step procedure in this case (see e.g. Brizard & Hahm, 2007), Parra & Calvo (2011) have shown that the two-step procedure does not yield fully consistent results at second order (and higher), as it misses terms of order 𝒪(ϵVϵB)\mathcal{O}(\epsilon_{V}\epsilon_{B}) that involve both geometric effects and field perturbations. The strong-gradient ordering ϵBϵ2\epsilon_{B}\sim\epsilon^{2} eliminates these concerns, since the geometry only enters at even order in ϵ\epsilon.

With these ordering assumptions, we take the background magnetic field to be 𝑩0=×𝑨0\mbox{\boldmath${B}$}_{0}=\nabla\times\mbox{\boldmath${A}$}_{0}, with 𝑨0𝒪(1/ϵB)\mbox{\boldmath${A}$}_{0}\sim\mathcal{O}(1/\epsilon_{B}) the background vector potential. We do not include an 𝒪(1/ϵB)\mathcal{O}(1/\epsilon_{B}) background electrostatic potential because this would violate the weak-flow ordering. We then consider electromagnetic perturbations 𝑨1\mbox{\boldmath${A}$}_{1} and Φ1\Phi_{1} of the form (Dimits et al., 1992)

𝑨1(𝒙,t)=𝑨1(𝑹,t)+ϵVδ𝑨1(𝑹,𝝆,t)\displaystyle\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${x}$},t)=\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$},t)+\epsilon_{V}\,\delta\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$},\mbox{\boldmath${\rho}$},t) (2.7)
Φ1(𝒙,t)=Φ1(𝑹,t)+ϵVδΦ1(𝑹,𝝆,t),\displaystyle\Phi_{1}(\mbox{\boldmath${x}$},t)=\Phi_{1}(\mbox{\boldmath${R}$},t)+\epsilon_{V}\,\delta\Phi_{1}(\mbox{\boldmath${R}$},\mbox{\boldmath${\rho}$},t), (2.8)

where the guiding-center component of the perturbation is 𝒪(1)\mathcal{O}(1), and the 𝒪(ϵV)\mathcal{O}(\epsilon_{V}) part of the perturbation is the deviation of the potential around the gyro-orbit, effectively giving the finite-Larmor-radius (FLR) correction to the potential,

δ𝑨1\displaystyle\delta\mbox{\boldmath${A}$}_{1} 𝑨1(𝒙,t)𝑨1(𝑹,t)𝝆𝑨1TqB1BTqvfvt𝒪(ϵV)\displaystyle\equiv\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${x}$},t)-\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$},t)\approx\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\nabla\mbox{\boldmath${A}$}_{1}\sim\frac{T}{q}\frac{B_{1\perp}}{B}\sim\frac{T}{q}\frac{v_{f}}{v_{t}}\sim\mathcal{O}(\epsilon_{V}) (2.9)
δΦ1\displaystyle\delta\Phi_{1} Φ1(𝒙,t)Φ1(𝑹,t)𝝆Φ1TqvEvt𝒪(ϵV),\displaystyle\equiv\Phi_{1}(\mbox{\boldmath${x}$},t)-\Phi_{1}(\mbox{\boldmath${R}$},t)\approx\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\nabla\Phi_{1}\sim\frac{T}{q}\frac{v_{E}}{v_{t}}\sim\mathcal{O}(\epsilon_{V}), (2.10)

with vf=vB1/Bv_{f}=v_{\parallel}B_{1\perp}/B the magnetic flutter velocity. Thus the total electromagnetic potentials can be written as

𝑨(𝒙)\displaystyle\mbox{\boldmath${A}$}(\mbox{\boldmath${x}$}) =1ϵB𝑨0(𝒙)+𝑨1(𝒙)\displaystyle=\frac{1}{\epsilon_{B}}\mbox{\boldmath${A}$}_{0}(\mbox{\boldmath${x}$})+\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${x}$})
=[1ϵB𝑨0(𝑹)+𝝆𝑨0(𝑹)+𝒪(ϵB)]+𝑨1(𝑹)+ϵVδ𝑨1(𝑹,𝝆)\displaystyle=\left[\frac{1}{\epsilon_{B}}\mbox{\boldmath${A}$}_{0}(\mbox{\boldmath${R}$})+\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\nabla\mbox{\boldmath${A}$}_{0}(\mbox{\boldmath${R}$})+\mathcal{O}(\epsilon_{B})\right]+\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$})+\epsilon_{V}\delta\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$},\mbox{\boldmath${\rho}$}) (2.11)
Φ(𝒙)\displaystyle\Phi(\mbox{\boldmath${x}$}) =Φ1(𝒙)=Φ1(𝑹)+ϵVδΦ1(𝑹,𝝆),\displaystyle=\Phi_{1}(\mbox{\boldmath${x}$})=\Phi_{1}(\mbox{\boldmath${R}$})+\epsilon_{V}\delta\Phi_{1}(\mbox{\boldmath${R}$},\mbox{\boldmath${\rho}$}), (2.12)

where we have Taylor expanded the background magnetic potential 𝑨0(𝒙)=𝑨0(𝑹+𝝆)\mbox{\boldmath${A}$}_{0}(\mbox{\boldmath${x}$})=\mbox{\boldmath${A}$}_{0}(\mbox{\boldmath${R}$}+\mbox{\boldmath${\rho}$}) to first order in ϵB\epsilon_{B} around the guiding-center position 𝑹{R}. With these definitions, the Lagrangian from Eq. 2.1 can be written as

L=L0+ϵVδL\displaystyle{L}={L}_{0}+\epsilon_{V}\delta{L} =[qϵB𝑨0(𝑹)+q𝝆𝑨0(𝑹)+q𝑨1(𝑹)+m𝒗+𝒪(ϵB)]𝒙˙\displaystyle=\left[\frac{q}{\epsilon_{B}}\mbox{\boldmath${A}$}_{0}(\mbox{\boldmath${R}$})+q\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\nabla\mbox{\boldmath${A}$}_{0}(\mbox{\boldmath${R}$})+q\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$})+m\mbox{\boldmath${v}$}+\mathcal{O}(\epsilon_{B})\right]\boldsymbol{\cdot}\dot{\mbox{\boldmath${x}$}}
[12mv2+qΦ1(𝑹)]+ϵV[qδ𝑨1(𝑹,𝝆)𝒙˙qδΦ1(𝑹,𝝆)].\displaystyle\quad-\left[\frac{1}{2}mv^{2}+q\Phi_{1}(\mbox{\boldmath${R}$})\right]+\epsilon_{V}\left[q\,\delta\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$},\mbox{\boldmath${\rho}$})\boldsymbol{\cdot}\dot{\mbox{\boldmath${x}$}}-q\,\delta\Phi_{1}(\mbox{\boldmath${R}$},\mbox{\boldmath${\rho}$})\right]. (2.13)

Note that we will hereafter drop the subscript 0 in the background magnetic field 𝑩0\mbox{\boldmath${B}$}_{0}, unless it is needed for clarity, and simply write 𝑩{B}. For magnetic perturbations we will retain the subscript in 𝑩1\mbox{\boldmath${B}$}_{1}, but these will frequently be expressed instead in terms of the perturbed vector potential. The total magnetic field, including background and perturbation, will be written as 𝑩0+𝑩1\mbox{\boldmath${B}$}_{0}+\mbox{\boldmath${B}$}_{1}.

Writing the potentials in the form of Eqs. 2.11 and 2.12 has the advantage that we can clearly see that FLR corrections are higher order. Thus, we could self-consistently neglect FLR corrections by taking only the zeroth-order terms. While we will proceed with the general derivation up to order ϵϵV\epsilon\sim\epsilon_{V} in this chapter, for simplicity we have elected to neglect FLR corrections in the current implementation of the system in the Gkeyll code. Extension to the more general system including FLR corrections is left as important future work. The system that we solve in the current version of Gkeyll is summarized in Section 2.3.

2.1.2 Transformation to guiding-center coordinates

Following Littlejohn (1983) and Cary & Brizard (2009), we first transform the zeroth order Lagrangian L0L_{0} to guiding-center coordinates, 𝒁=(t,𝑹,v,μ,ϑ)\mbox{\boldmath${Z}$}=(t,\mbox{\boldmath${R}$},v_{\parallel},\mu,\vartheta), where 𝑹{R} is the guiding-center position, vv_{\parallel} is the guiding-center velocity along the background magnetic field, μ=mv2/(2B)\mu=mv_{\perp}^{2}/(2B) is the lowest-order magnetic moment, and ϑ\vartheta is the gyrophase angle. In terms of the guiding-center coordinates, the particle coordinates 𝒛=(t,𝒙,𝒗)\mbox{\boldmath${z}$}=(t,\mbox{\boldmath${x}$},\mbox{\boldmath${v}$}) coordinates can be expressed (with the time coordinate tt staying the same) as

𝒙=𝑹+ϵBρ(𝑹)𝐚^(𝑹,ϑ)=𝑹+ϵB𝝆\displaystyle\mbox{\boldmath${x}$}=\mbox{\boldmath${R}$}+\epsilon_{B}\rho(\mbox{\boldmath${R}$})\mathbf{\hat{a}}(\mbox{\boldmath${R}$},\vartheta)=\mbox{\boldmath${R}$}+\epsilon_{B}\mbox{\boldmath${\rho}$} (2.14)
𝒗=v𝐛^(𝑹)+v(𝑹)𝐜^(𝑹,ϑ)+ϵV𝒖(𝑹,v)=v𝐛^+2μBm𝐜^+ϵV𝒖,\displaystyle\mbox{\boldmath${v}$}=v_{\parallel}\mathbf{\hat{b}}(\mbox{\boldmath${R}$})+v_{\perp}(\mbox{\boldmath${R}$})\mathbf{\hat{c}}(\mbox{\boldmath${R}$},\vartheta)+\epsilon_{V}\mbox{\boldmath${u}$}_{\perp}(\mbox{\boldmath${R}$},v_{\parallel})=v_{\parallel}\mathbf{\hat{b}}+\sqrt{\frac{2\mu B}{m}}\mathbf{\hat{c}}+\epsilon_{V}\mbox{\boldmath${u}$}_{\perp}, (2.15)

where ρ(𝑹)=v/Ω(𝑹)=2mμ/(q2B(𝑹))\rho(\mbox{\boldmath${R}$})=v_{\perp}/\Omega(\mbox{\boldmath${R}$})=\sqrt{2m\mu/(q^{2}B(\mbox{\boldmath${R}$}))} is the gyroradius, 𝐛^=𝑩/B\mathbf{\hat{b}}=\mbox{\boldmath${B}$}/B is the unit vector along the background field, and 𝒖(𝑹,v)\mbox{\boldmath${u}$}_{\perp}(\mbox{\boldmath${R}$},v_{\parallel}) is a to-be-defined 𝒪(ϵV)\mathcal{O}(\epsilon_{V}) velocity perpendicular to 𝐛^\mathbf{\hat{b}}, taken to be the velocity of the reference frame; note that 𝒖\mbox{\boldmath${u}$}_{\perp} is evaluated at the guiding-center position 𝑹{R} and is assumed to be gyrophase-independent. From standard guiding-center motion, we might expect this reference frame velocity to be something like the E×BE\times B drift velocity.222A moving reference frame is typically used in strong-flow derivations of gyrokinetics, where ϵV1\epsilon_{V}\sim 1 so that all terms in Eq. 2.15 are the same order. In most weak-flow derivations (Frei et al., 2020, is an exception), the reference frame is assumed to be stationary (𝒖=0\mbox{\boldmath${u}$}_{\perp}=0), but here we allow for a slowly moving frame. We also define

𝐚^(𝑹,ϑ)=cosϑ𝒆1(𝑹)sinϑ𝒆2(𝑹)\displaystyle\mathbf{\hat{a}}(\mbox{\boldmath${R}$},\vartheta)=\cos\vartheta\,\mbox{\boldmath${e}$}_{1}(\mbox{\boldmath${R}$})-\sin\vartheta\,\mbox{\boldmath${e}$}_{2}(\mbox{\boldmath${R}$}) (2.16)
𝐜^(𝑹,ϑ)=𝐚^(𝑹,ϑ)ϑ=sinϑ𝒆1(𝑹)cosϑ𝒆2(𝑹)\displaystyle\mathbf{\hat{c}}(\mbox{\boldmath${R}$},\vartheta)=\frac{\partial\mathbf{\hat{a}}(\mbox{\boldmath${R}$},\vartheta)}{\partial\vartheta}=-\sin\vartheta\,\mbox{\boldmath${e}$}_{1}(\mbox{\boldmath${R}$})-\cos\vartheta\,\mbox{\boldmath${e}$}_{2}(\mbox{\boldmath${R}$}) (2.17)

to be unit vectors in the radial and tangential directions to the gyro-orbit that rotate with ϑ\vartheta, where 𝒆1\mbox{\boldmath${e}$}_{1} and 𝒆2\mbox{\boldmath${e}$}_{2} are some arbitrary pair of perpendicular unit vectors in the plane perpendicular to the background field such that 𝒆1×𝒆2=𝐛^\mbox{\boldmath${e}$}_{1}\times\mbox{\boldmath${e}$}_{2}=\mathbf{\hat{b}}. Here and in the following, we will keep track of the order of various terms in ϵB\epsilon_{B} and ϵV\epsilon_{V}, but formally these parameters are equal to unity so that the expressions retain the same dimensional form after taking ϵB=ϵV=1\epsilon_{B}=\epsilon_{V}=1.

Inserting the guiding-center coordinate transformations into Eq. 2.13, the zeroth order Lagrangian in guiding-center coordinates is

L0=[qϵB𝑨0+q𝑨1+q(𝝆)𝑨0+mv𝐛^+mv𝐜^](𝑹˙+𝝆˙)H0,{L}_{0}=\left[\frac{q}{\epsilon_{B}}\mbox{\boldmath${A}$}_{0}+q\mbox{\boldmath${A}$}_{1}+q(\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\nabla)\mbox{\boldmath${A}$}_{0}+mv_{\parallel}\mathbf{\hat{b}}+mv_{\perp}\mathbf{\hat{c}}\right]\boldsymbol{\cdot}\left(\dot{\mbox{\boldmath${R}$}}+\dot{\mbox{\boldmath${\rho}$}}\right)-H_{0}, (2.18)

where H0=mv2/2+μB+qΦ1H_{0}=mv_{\parallel}^{2}/2+\mu B+q\Phi_{1} is the zeroth order Hamiltonian, and spatially-varying quantities are evaluated at the guiding-center position 𝑹{R} unless otherwise noted. Note that although the gyroradius vector 𝝆{\rho} is 𝒪(ϵB)\mathcal{O}(\epsilon_{B}), its time derivative 𝝆˙\dot{\mbox{\boldmath${\rho}$}} is 𝒪(1)\mathcal{O}(1), as it is given by

𝝆˙\displaystyle\dot{\mbox{\boldmath${\rho}$}} =ϵB[(𝑹˙)𝝆+μ˙𝝆μ]+ϑ˙𝝆ϑ=ϵB[𝝆2B𝑹˙B+1qv𝐚^μ˙]+vΩ𝐜^ϑ˙\displaystyle=\epsilon_{B}\left[(\dot{\mbox{\boldmath${R}$}}\boldsymbol{\cdot}\nabla)\mbox{\boldmath${\rho}$}+\dot{\mu}\frac{\partial\mbox{\boldmath${\rho}$}}{\partial\mu}\right]+\dot{\vartheta}\frac{\partial\mbox{\boldmath${\rho}$}}{\partial\vartheta}=\epsilon_{B}\left[\frac{\mbox{\boldmath${\rho}$}}{2B}\dot{\mbox{\boldmath${R}$}}\boldsymbol{\cdot}\nabla B+\frac{1}{qv_{\perp}}\mathbf{\hat{a}}\dot{\mu}\right]+\frac{v_{\perp}}{\Omega}\mathbf{\hat{c}}\dot{\vartheta}
=vΩ𝐜^ϑ˙+𝒪(ϵB),\displaystyle=\frac{v_{\perp}}{\Omega}\mathbf{\hat{c}}\dot{\vartheta}+\mathcal{O}(\epsilon_{B}), (2.19)

since ϑ˙=ΩϵB1\dot{\vartheta}=\Omega\sim\epsilon_{B}^{-1} (Cary & Brizard, 2009).

We then make a series of gauge transformations to eliminate the dependence on the gyrophase to lowest order in ϵB\epsilon_{B}, following Littlejohn (1983). These gauge transformations take the form of adding a total time derivative to the Lagrangian, LL+S˙{L}\rightarrow{L}+\dot{S}, which does not affect the equations of motion. Taking S=q𝝆(𝑨0+ϵB𝑨1)S=-q\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}(\mbox{\boldmath${A}$}_{0}+\epsilon_{B}\mbox{\boldmath${A}$}_{1}), so that

S˙\displaystyle\dot{S} =(qϵB𝑨0+q𝑨1)𝝆˙q𝑹˙𝑨0𝝆+𝒪(ϵB),\displaystyle=-\left(\frac{q}{\epsilon_{B}}\mbox{\boldmath${A}$}_{0}+q\mbox{\boldmath${A}$}_{1}\right)\boldsymbol{\cdot}\dot{\mbox{\boldmath${\rho}$}}-q\dot{\mbox{\boldmath${R}$}}\boldsymbol{\cdot}\nabla\mbox{\boldmath${A}$}_{0}\boldsymbol{\cdot}\mbox{\boldmath${\rho}$}+\mathcal{O}(\epsilon_{B}), (2.20)

the Lagrangian can be transformed as

L0L0+S˙\displaystyle{L}_{0}\rightarrow{L}_{0}+\dot{S} =(qϵB𝑨0+q𝑨1)𝑹˙+[q𝝆𝑨0+mv𝐛^+mv𝐜^]𝝆˙H0,\displaystyle=\left(\frac{q}{\epsilon_{B}}\mbox{\boldmath${A}$}_{0}^{*}+q\mbox{\boldmath${A}$}_{1}\right)\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}+\left[q\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\nabla\mbox{\boldmath${A}$}_{0}+mv_{\parallel}\mathbf{\hat{b}}+mv_{\perp}\mathbf{\hat{c}}\right]\boldsymbol{\cdot}\dot{\mbox{\boldmath${\rho}$}}-H_{0}, (2.21)

where cancellations resulted from noting that q[𝝆𝑨0(𝑨0)𝝆]=q𝝆×(×𝑨0)=q𝝆×𝑩=mv𝐜^q\left[\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\nabla\mbox{\boldmath${A}$}_{0}-(\nabla\mbox{\boldmath${A}$}_{0})\boldsymbol{\cdot}\mbox{\boldmath${\rho}$}\right]=-q\mbox{\boldmath${\rho}$}\times(\nabla\times\mbox{\boldmath${A}$}_{0})=-q\mbox{\boldmath${\rho}$}\times\mbox{\boldmath${B}$}=-mv_{\perp}\mathbf{\hat{c}}, and we have defined the modified vector potential

𝑨0𝑨0+ϵBmvq𝐛^.\mbox{\boldmath${A}$}_{0}^{*}\equiv\mbox{\boldmath${A}$}_{0}+\epsilon_{B}\frac{mv_{\parallel}}{q}\mathbf{\hat{b}}. (2.22)

Recognizing 𝑨0\mbox{\boldmath${A}$}_{0}^{*} as the gyroaveraged canonical momentum from the background field, we can see that this gauge transformation has effectively gyroaveraged the first term in Eq. 2.13.

We then make an additional gauge transformation with S=ϵB(q/2)(𝝆)𝑨0𝝆S=-\epsilon_{B}(q/2)(\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\nabla)\mbox{\boldmath${A}$}_{0}\boldsymbol{\cdot}\mbox{\boldmath${\rho}$}, which gives

S˙=q2[(𝑨0)𝝆+(𝝆)𝑨0]𝝆˙ϵBq2𝝆d(𝑨0)dt𝝆,\displaystyle\dot{S}=-\frac{q}{2}\left[(\nabla\mbox{\boldmath${A}$}_{0})\boldsymbol{\cdot}\mbox{\boldmath${\rho}$}+\left(\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\nabla\right)\mbox{\boldmath${A}$}_{0}\right]\boldsymbol{\cdot}\dot{\mbox{\boldmath${\rho}$}}-\epsilon_{B}\frac{q}{2}\mbox{\boldmath${\rho}$}\boldsymbol{\cdot}\frac{\textnormal{d}(\nabla\mbox{\boldmath${A}$}_{0})}{\textnormal{d}t}\boldsymbol{\cdot}\mbox{\boldmath${\rho}$}, (2.23)

where we will drop the last term because it is higher order. The Lagrangian is then transformed as

L0L0+S˙\displaystyle{L}_{0}\rightarrow{L}_{0}+\dot{S} =(qϵB𝑨0+q𝑨1)𝑹˙+mμqϑ˙[12mv2+μB+qΦ1]+𝒪(ϵB).\displaystyle=\left(\frac{q}{\epsilon_{B}}\mbox{\boldmath${A}$}_{0}^{*}+q\mbox{\boldmath${A}$}_{1}\right)\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}+\frac{m\mu}{q}\dot{\vartheta}-\left[\frac{1}{2}mv_{\parallel}^{2}+\mu B+q\Phi_{1}\right]+\mathcal{O}(\epsilon_{B}). (2.24)

This Lagrangian describes the motion of charged particles in a strong background magnetic field and slowly varying electromagnetic potentials (with no variation at the gyroradius scale), and it could be used to derive the drift-kinetic Vlasov equation (up to zeroth order in ϵB\epsilon_{B}). Since Eq. 2.24 is independent of gyrophase, Noether’s theorem gives that the quantity L0/ϑ˙=mμ/q\partial{L}_{0}/\partial\dot{\vartheta}=m\mu/q is a constant, which is confirmation that μ\mu is an adiabatic invariant in the absence of electromagnetic perturbations on the scale of the gyroradius (to lowest order). For an alternative derivation of the guiding-center Lagrangian, which eliminates the gyrophase dependence via gyroaveraging instead of gauge transformations, see Helander & Sigmar (2002).

2.1.3 Transformation to gyrocenter coordinates

Now we must account for the variations of the electromagnetic fields on the scale of the gyroradius, which are contained in δL\delta L from Eq. 2.13,

δL\displaystyle\delta{L} =[qδ𝑨1(𝑹,𝝆)+m𝒖](𝑹˙+𝝆˙)[qδΦ1(𝑹,𝝆)+m𝒗𝒖+ϵV2mu2]\displaystyle=\left[q\,\delta\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$},\mbox{\boldmath${\rho}$})+m\mbox{\boldmath${u}$}_{\perp}\right]\boldsymbol{\cdot}(\dot{\mbox{\boldmath${R}$}}+\dot{\mbox{\boldmath${\rho}$}})-\left[q\,\delta\Phi_{1}(\mbox{\boldmath${R}$},\mbox{\boldmath${\rho}$})+m\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${u}$}_{\perp}+\frac{\epsilon_{V}}{2}mu_{\perp}^{2}\right]
=qδ𝑨1𝑹˙+mB𝒗δ𝑨1ϑ˙[qδΦ1+m𝒗𝒖+ϵV2mu2]+𝒪(ϵB),\displaystyle=q\,\delta\mbox{\boldmath${A}$}_{1}^{*}\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}+\frac{m}{B}\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\delta\mbox{\boldmath${A}$}_{1}^{*}\,\dot{\vartheta}-\left[q\,\delta\Phi_{1}+m\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${u}$}_{\perp}+\frac{\epsilon_{V}}{2}mu_{\perp}^{2}\right]+\mathcal{O}(\epsilon_{B}), (2.25)

where we have defined

δ𝑨1δ𝑨1(𝑹,𝝆)+(m/q)𝒖(𝑹,v).\delta\mbox{\boldmath${A}$}_{1}^{*}\equiv\delta\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$},\mbox{\boldmath${\rho}$})+(m/q)\mbox{\boldmath${u}$}_{\perp}(\mbox{\boldmath${R}$},v_{\parallel}). (2.26)

Since the perturbations δ𝑨1\delta\mbox{\boldmath${A}$}_{1} and δΦ1\delta\Phi_{1} depend on 𝝆{\rho}, we have reintroduced gyrophase dependence in the Lagrangian and broken μ\mu conservation. Unlike in the lowest-order case above, we cannot simply use gauge transformations to eliminate the gyrophase dependence at this order because the perturbations depend non-trivially on 𝝆{\rho}. Instead, we use another kind of coordinate transformation known as a Lie transform (for details, see Cary, 1981; Littlejohn, 1982; Cary & Littlejohn, 1983). The Lie transform offers a systematic method for making perturbative coordinate transformations and computing the resulting changes in functions of those coordinates.

For these transformations, it will be convenient to adopt the Poincaré-Cartan one-form formalism (see e.g. Cary & Littlejohn, 1983), where the one-form γ(𝒁)\gamma(\mbox{\boldmath${Z}$}) is defined via the action integral

=L(𝒁)dt=γ(𝒁).\mathcal{I}=\int L(\mbox{\boldmath${Z}$})\,\textnormal{d}t=\int\gamma(\mbox{\boldmath${Z}$}). (2.27)

Here,

γ\displaystyle\gamma =γZαdZα=Ldt\displaystyle=\gamma_{Z^{\alpha}}\textnormal{d}Z^{\alpha}=L\,\textnormal{d}t (2.28)

for ZαZ^{\alpha} (with α=0,1,,6\alpha=0,1,\dots,6) the components of the extended phase-space coordinates that include time as the zeroth element so that γt=H\gamma_{t}=-H, the Hamiltonian. The remaining components, γZi\gamma_{Z^{i}} with i=1,,6i=1,\dots,6, are together called the symplectic component of the one-form.

We will define γ=γ0+ϵVγ1\gamma=\gamma_{0}+\epsilon_{V}\gamma_{1}, with

γ0\displaystyle\gamma_{0} L0dt=q(𝑨0+𝑨1)d𝑹+mμqdϑ[12mv2+μB+qΦ1]dt\displaystyle\equiv L_{0}\,\textnormal{d}t=q\left(\mbox{\boldmath${A}$}_{0}^{*}+\mbox{\boldmath${A}$}_{1}\right)\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${R}$}+\frac{m\mu}{q}\textnormal{d}\vartheta-\left[\frac{1}{2}mv_{\parallel}^{2}+\mu B+q\Phi_{1}\right]\textnormal{d}t (2.29)
γ1\displaystyle\gamma_{1} δLdt=qδ𝑨1d𝑹+mB𝒗δ𝑨1dϑ[qδΦ1+m𝒗𝒖+ϵV2mu2]dt,\displaystyle\equiv\delta L\,\textnormal{d}t=q\,\delta\mbox{\boldmath${A}$}_{1}^{*}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${R}$}+\frac{m}{B}\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\delta\mbox{\boldmath${A}$}_{1}^{*}\,\textnormal{d}\vartheta-\left[q\,\delta\Phi_{1}+m\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${u}$}_{\perp}+\frac{\epsilon_{V}}{2}mu_{\perp}^{2}\right]\textnormal{d}t, (2.30)

where all quantities are evaluated at 𝑹{R} (although δ𝑨1\delta\mbox{\boldmath${A}$}_{1} and δΦ1\delta\Phi_{1} still also depend on 𝝆{\rho}), and we have dropped the 1/ϵB1/\epsilon_{B} ordering parameter on 𝑨0\mbox{\boldmath${A}$}_{0}^{*}. The Lie transformation that yields the gyrocenter one-form Γ=Γ0+ϵVΓ1+ϵV2Γ2+\Gamma=\Gamma_{0}+\epsilon_{V}\Gamma_{1}+\epsilon_{V}^{2}\Gamma_{2}+\dots is given (up to second order) by

Γ0\displaystyle\Gamma_{0} =γ0+dS0\displaystyle=\gamma_{0}+\textnormal{d}S_{0} (2.31)
Γ1\displaystyle\Gamma_{1} =γ11γ0+dS1\displaystyle=\gamma_{1}-\mathscr{L}_{1}\gamma_{0}+\textnormal{d}S_{1} (2.32)
Γ2\displaystyle\Gamma_{2} =γ22γ0121(γ1+Γ1)+dS2,\displaystyle=\gamma_{2}-\mathscr{L}_{2}\gamma_{0}-\frac{1}{2}\mathscr{L}_{1}(\gamma_{1}+\Gamma_{1})+\textnormal{d}S_{2}, (2.33)

where n\mathscr{L}_{n} denotes the nnth order Lie derivative and SnS_{n} is an arbitrary nnth order scalar gauge function. The Lie derivative acting on a one-form γ\gamma is given by333The expression in Eq. 2.34 is only part of the formal Lie derivative. There is another part of the form d(GnβγZβ)\textnormal{d}(G_{n}^{\beta}\gamma_{Z^{\beta}}), but this part can be absorbed into dS\textnormal{d}S in Eqs. 2.32 and 2.33 because SS can be chosen arbitrarily.

nγ=GnβωαβdZα=Gnβ(γZαZβγZβZα)dZα,\mathscr{L}_{n}\gamma=G_{n}^{\beta}\omega_{\alpha\beta}\textnormal{d}Z^{\alpha}=G_{n}^{\beta}\left(\frac{\partial\gamma_{Z^{\alpha}}}{\partial Z^{\beta}}-\frac{\partial\gamma_{Z^{\beta}}}{\partial Z^{\alpha}}\right)\textnormal{d}Z^{\alpha}, (2.34)

where the functions GnβG_{n}^{\beta} are the components of the nnth order generating vector field of the Lie transform, and ωαβ\omega_{\alpha\beta} are the elements of the Lagrange tensor. With this, the first order gyrocenter one-form can be rewritten as

Γ1,Zα=γ1,ZαG1β(γ0,ZαZβγ0,ZβZα)+S1Zα.{\Gamma}_{1,Z^{\alpha}}=\gamma_{1,Z^{\alpha}}-G_{1}^{\beta}\left(\frac{\partial\gamma_{0,Z^{\alpha}}}{\partial Z^{\beta}}-\frac{\partial\gamma_{0,Z^{\beta}}}{\partial Z^{\alpha}}\right)+\frac{\partial S_{1}}{\partial Z^{\alpha}}. (2.35)

The goal now is to find generating functions 𝑮n\mbox{\boldmath${G}$}_{n} and gauge functions SnS_{n} such that the gyrocenter one-form no longer depends on the gyrophase at each order. At zeroth order, we will simply take S0=0S_{0}=0, so that

Γ0=γ0,{\Gamma}_{0}=\gamma_{0}, (2.36)

since we have already removed gyrophase dependence from the zeroth order one-form, Eq. 2.29.

At first order, we can use Eq. 2.35 to compute

Γ\displaystyle\Gamma =qδ𝑨1+qG1\mathboldR×𝑩mG1v𝐛^+S1\displaystyle=q\,\delta\mbox{\boldmath${A}$}_{1}^{*}+qG_{1}^{\mathbold{R}}\times\mbox{\boldmath${B}$}^{*}-mG_{1}^{v_{\parallel}}\mathbf{\hat{b}}+\nabla S_{1} (2.37)
Γ1,v\displaystyle\Gamma_{1,v_{\parallel}} =m𝐛^G1\mathboldR+S1v\displaystyle=m\mathbf{\hat{b}}\boldsymbol{\cdot}G_{1}^{\mathbold{R}}+\frac{\partial S_{1}}{\partial v_{\parallel}} (2.38)
Γ1,μ\displaystyle\Gamma_{1,\mu} =mqG1ϑ+S1μ\displaystyle=\frac{m}{q}G_{1}^{\vartheta}+\frac{\partial S_{1}}{\partial\mu} (2.39)
Γ1,ϑ\displaystyle\Gamma_{1,\vartheta} =mB𝒗δ𝑨1mqG1μ+S1ϑ\displaystyle=\frac{m}{B}\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\delta\mbox{\boldmath${A}$}_{1}^{*}-\frac{m}{q}G_{1}^{\mu}+\frac{\partial S_{1}}{\partial\vartheta} (2.40)
Γ1,t\displaystyle\Gamma_{1,t} =qδΦ1ϵVqG1\mathboldR𝑬1+G1vmv+G1μB+S1t,\displaystyle=-q\,\delta\Phi_{1}-\epsilon_{V}qG_{1}^{\mathbold{R}}\boldsymbol{\cdot}\mbox{\boldmath${E}$}_{1}^{*}+G_{1}^{v_{\parallel}}mv_{\parallel}+G_{1}^{\mu}B+\frac{\partial S_{1}}{\partial t}, (2.41)

where 𝑬1=ϵV(Φ1+𝑨1/t)ϵB(μ/q)B=ϵV𝑬1ϵB(μ/q)B𝒪(ϵV)\mbox{\boldmath${E}$}_{1}^{*}=-\epsilon_{V}(\nabla\Phi_{1}+\partial\mbox{\boldmath${A}$}_{1}/\partial t)-\epsilon_{B}(\mu/q)\nabla B=\epsilon_{V}\mbox{\boldmath${E}$}_{1}-\epsilon_{B}(\mu/q)\nabla B\sim\mathcal{O}(\epsilon_{V}) and 𝑩=×𝑨0+ϵV×𝑨1=𝑩0+ϵV𝑩1\mbox{\boldmath${B}$}^{*}=\nabla\times\mbox{\boldmath${A}$}_{0}^{*}+\epsilon_{V}\nabla\times\mbox{\boldmath${A}$}_{1}=\mbox{\boldmath${B}$}_{0}^{*}+\epsilon_{V}\mbox{\boldmath${B}$}_{1}. We have also taken G1t=0G_{1}^{t}=0 since we do not need to make a coordinate transformation in time.

We now have some freedom to choose the 𝑮n\mbox{\boldmath${G}$}_{n} and SnS_{n} to simplify the form of the gyrocenter Lagrangian. To this end, we choose to enforce Γ1,v=Γ1,μ=Γ1,ϑ=0\Gamma_{1,v_{\parallel}}=\Gamma_{1,\mu}=\Gamma_{1,\vartheta}=0, which gives

𝐛^G1\mathboldR=1mS1v,G1ϑ=qmS1μ,G1μ=qB𝒗δ𝑨1+qmS1ϑ.\displaystyle\mathbf{\hat{b}}\boldsymbol{\cdot}G_{1}^{\mathbold{R}}=-\frac{1}{m}\frac{\partial S_{1}}{\partial v_{\parallel}},\qquad G_{1}^{\vartheta}=-\frac{q}{m}\frac{\partial S_{1}}{\partial\mu},\qquad G_{1}^{\mu}=\frac{q}{B}\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\delta\mbox{\boldmath${A}$}_{1}^{*}+\frac{q}{m}\frac{\partial S_{1}}{\partial\vartheta}. (2.42)

Dotting Eq. 2.37 with 𝑩\mbox{\boldmath${B}$}^{*} gives

𝑩Γ1,\mathboldR=q𝑩δ𝑨1mG1vB+𝑩S1,\displaystyle\mbox{\boldmath${B}$}^{*}\boldsymbol{\cdot}\Gamma_{1,\mathbold{R}}=q\mbox{\boldmath${B}$}^{*}\boldsymbol{\cdot}\delta\mbox{\boldmath${A}$}_{1}^{*}-mG_{1}^{v_{\parallel}}B_{\parallel}^{*}+\mbox{\boldmath${B}$}^{*}\boldsymbol{\cdot}\nabla S_{1}, (2.43)

while crossing Eq. 2.37 with 𝐛^\mathbf{\hat{b}} gives

𝐛^×Γ1,\mathboldR\displaystyle\mathbf{\hat{b}}\times\Gamma_{1,\mathbold{R}} =q𝐛^×δ𝑨1+qBG1\mathboldR+qm𝑩S1v+𝐛^×S1,\displaystyle=q\mathbf{\hat{b}}\times\delta\mbox{\boldmath${A}$}_{1}^{*}+qB_{\parallel}^{*}G_{1}^{\mathbold{R}}+\frac{q}{m}\mbox{\boldmath${B}$}^{*}\frac{\partial S_{1}}{\partial v_{\parallel}}+\mathbf{\hat{b}}\times\nabla S_{1}, (2.44)

so that we have

G1v\displaystyle G_{1}^{v_{\parallel}} =𝑩mB(Γ1,\mathboldR+S1+qδ𝑨1)\displaystyle=\frac{\mbox{\boldmath${B}$}^{*}}{mB_{\parallel}^{*}}\boldsymbol{\cdot}\left(-\Gamma_{1,\mathbold{R}}+\nabla S_{1}+q\delta\mbox{\boldmath${A}$}_{1}^{*}\right) (2.45)
G1\mathboldR\displaystyle G_{1}^{\mathbold{R}} =𝑩mBS1v𝐛^qB×(Γ1,\mathboldR+S1+qδ𝑨1),\displaystyle=-\frac{\mbox{\boldmath${B}$}^{*}}{mB_{\parallel}^{*}}\frac{\partial S_{1}}{\partial v_{\parallel}}-\frac{\mathbf{\hat{b}}}{qB_{\parallel}^{*}}\times\left(-\Gamma_{1,\mathbold{R}}+\nabla S_{1}+q\delta\mbox{\boldmath${A}$}_{1}^{*}\right), (2.46)

where B𝐛^𝑩B+𝒪(ϵB)B_{\parallel}^{*}\equiv\mathbf{\hat{b}}\boldsymbol{\cdot}\mbox{\boldmath${B}$}^{*}\approx B+\mathcal{O}(\epsilon_{B}). The first order gyrocenter Hamiltonian is then

H1\displaystyle H_{1} =Γ1,t=qδΦ1+m𝒗𝒖+ϵV12mu2ϵVqmBS1v𝑩𝑬1\displaystyle=-\Gamma_{1,t}=q\,\delta\Phi_{1}+m\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${u}$}_{\perp}+\epsilon_{V}\frac{1}{2}mu_{\perp}^{2}-\epsilon_{V}\frac{q}{mB_{\parallel}^{*}}\frac{\partial S_{1}}{\partial v_{\parallel}}\mbox{\boldmath${B}$}^{*}\boldsymbol{\cdot}\mbox{\boldmath${E}$}_{1}^{*}
ϵV𝑬1×𝐛^+v𝑩B(Γ1,\mathboldR+S1+qδ𝑨1)q𝒗δ𝑨1ΩS1ϑS1t\displaystyle\qquad-\frac{\epsilon_{V}\mbox{\boldmath${E}$}_{1}^{*}\times\mathbf{\hat{b}}+v_{\parallel}\mbox{\boldmath${B}$}^{*}}{B_{\parallel}^{*}}\boldsymbol{\cdot}\left(-\Gamma_{1,\mathbold{R}}+\nabla S_{1}+q\,\delta\mbox{\boldmath${A}$}_{1}^{*}\right)-q\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\delta\mbox{\boldmath${A}$}_{1}^{*}-\Omega\frac{\partial S_{1}}{\partial\vartheta}-\frac{\partial S_{1}}{\partial t}
=q(δΦ1𝒗δ𝑨1)+ϵV12mu2ϵV𝑬1×𝐛^+v𝑩B(Γ1,\mathboldR+qδ𝑨1)dS1dt.\displaystyle=q\left(\delta\Phi_{1}-\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\delta\mbox{\boldmath${A}$}_{1}\right)+\epsilon_{V}\frac{1}{2}mu_{\perp}^{2}-\frac{\epsilon_{V}\mbox{\boldmath${E}$}_{1}^{*}\times\mathbf{\hat{b}}+v_{\parallel}\mbox{\boldmath${B}$}^{*}}{B_{\parallel}^{*}}\boldsymbol{\cdot}\left(-\Gamma_{1,\mathbold{R}}+q\,\delta\mbox{\boldmath${A}$}_{1}^{*}\right)-\frac{\textnormal{d}S_{1}}{\textnormal{d}t}. (2.47)

We now choose the gauge function S1S_{1} to cancel the gyrophase dependence in Eq. 2.47. We will leave Γ1,\mathboldR\Gamma_{1,\mathbold{R}} unspecified for now; by construction, the gyrocenter one-form will be gyrophase-independent, so the choice of Γ1,\mathboldR\Gamma_{1,\mathbold{R}} will not affect the choice of S1S_{1}. We can define S1S_{1} as the solution to

dS1dtΩS1ϑ+𝒪(ϵV)=q(δΦ1~𝒗δ𝑨1~)ϵV𝑬1×𝐛^+v𝑩Bqδ𝑨1~,\displaystyle\frac{\textnormal{d}S_{1}}{\textnormal{d}t}\approx\Omega\frac{\partial S_{1}}{\partial\vartheta}+\mathcal{O}(\epsilon_{V})=q\left(\widetilde{\delta\Phi_{1}}-\widetilde{\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\delta\mbox{\boldmath${A}$}_{1}}\right)-\frac{\epsilon_{V}\mbox{\boldmath${E}$}_{1}^{*}\times\mathbf{\hat{b}}+v_{\parallel}\mbox{\boldmath${B}$}^{*}}{B_{\parallel}^{*}}\boldsymbol{\cdot}q\,\widetilde{\delta\mbox{\boldmath${A}$}_{1}}, (2.48)

where

A~=A(𝑹+𝝆)A\widetilde{A}=A(\mbox{\boldmath${R}$}+\mbox{\boldmath${\rho}$})-\langle A\rangle (2.49)

is the gyrophase-dependent part of a quantity A(𝑹+𝝆)A(\mbox{\boldmath${R}$}+\mbox{\boldmath${\rho}$}), and \langle\boldsymbol{\cdot}\rangle denotes a gyroaverage, defined by

A(𝑹+𝝆)12π02πA(𝑹+𝝆)dϑ.\langle A(\mbox{\boldmath${R}$}+\mbox{\boldmath${\rho}$})\rangle\equiv\frac{1}{2\pi}\int_{0}^{2\pi}A(\mbox{\boldmath${R}$}+\mbox{\boldmath${\rho}$})\,\textnormal{d}\vartheta. (2.50)

Noting that δΦ1~=Φ1~\widetilde{\delta\Phi_{1}}=\widetilde{\Phi_{1}}, δ𝑨1~=𝑨1~\widetilde{\delta\mbox{\boldmath${A}$}_{1}}=\widetilde{\mbox{\boldmath${A}$}_{1}}, and 𝒗δ𝑨1~=𝒗𝑨1~𝒗𝑨1\widetilde{\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\delta\mbox{\boldmath${A}$}_{1}}=\widetilde{\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${A}$}_{1}}-\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${A}$}_{1}, the gauge function S1S_{1} becomes

S1qΩϑ[Φ1~𝒗𝑨1~+𝒗𝑨1ϵV𝑬1×𝐛^+v𝑩B𝑨1~]dϑ,\displaystyle S_{1}\approx\frac{q}{\Omega}\int^{\vartheta}\left[\widetilde{\Phi_{1}}-\widetilde{\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${A}$}_{1}}+\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${A}$}_{1}-\frac{\epsilon_{V}\mbox{\boldmath${E}$}_{1}^{*}\times\mathbf{\hat{b}}+v_{\parallel}\mbox{\boldmath${B}$}^{*}}{B_{\parallel}^{*}}\boldsymbol{\cdot}\widetilde{\mbox{\boldmath${A}$}_{1}}\right]\textnormal{d}\vartheta^{\prime}, (2.51)

where we will take the solution with S1=0\langle S_{1}\rangle=0 (this is required to prevent S1S_{1} from becoming unbounded; see Cary & Littlejohn (1983)). The Hamiltonian then becomes

H1\displaystyle H_{1} =q[Φ1𝒗𝑨1Φ1]+ϵV12mu2\displaystyle=q\left[\langle\Phi_{1}-\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${A}$}_{1}\rangle-\Phi_{1}\right]+\epsilon_{V}\frac{1}{2}mu_{\perp}^{2}
ϵV𝑬1×𝐛^+ϵB(μ/q)𝐛^×B+v𝑩B(Γ1,\mathboldR+q𝑨1q𝑨1+m𝒖),\displaystyle\quad-\frac{\epsilon_{V}\mbox{\boldmath${E}$}_{1}\times\mathbf{\hat{b}}+\epsilon_{B}(\mu/q)\mathbf{\hat{b}}\times\nabla B+v_{\parallel}\mbox{\boldmath${B}$}^{*}}{B_{\parallel}^{*}}\boldsymbol{\cdot}\left(-\Gamma_{1,\mathbold{R}}+q\langle\mbox{\boldmath${A}$}_{1}\rangle-q\mbox{\boldmath${A}$}_{1}+m\mbox{\boldmath${u}$}_{\perp}\right), (2.52)

so that the gyrocenter one-form is

Γ=Γ0+ϵVΓ1=q(𝑨0+𝑨1+ϵVΓ1,\mathboldR)d𝑹+mμqdϑ[12mv2+μB+qΦ1+ϵVH1]dt.\Gamma=\Gamma_{0}+\epsilon_{V}\Gamma_{1}=q\left(\mbox{\boldmath${A}$}_{0}^{*}+\mbox{\boldmath${A}$}_{1}+\epsilon_{V}\Gamma_{1,\mathbold{R}}\right)\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${R}$}+\frac{m\mu}{q}\textnormal{d}\vartheta-\left[\frac{1}{2}mv_{\parallel}^{2}+\mu B+q\Phi_{1}+\epsilon_{V}H_{1}\right]\textnormal{d}t. (2.53)

Now we must choose Γ1,\mathboldR\Gamma_{1,\mathbold{R}}. One option is to use Γ1,\mathboldR=q𝑨1\Gamma_{1,\mathbold{R}}=-q\mbox{\boldmath${A}$}_{1}. This would eliminate 𝑨1\mbox{\boldmath${A}$}_{1} from the symplectic part of the one-form, opting instead to move all dependence on field perturbations to the Hamiltonian. This is known as the “Hamiltonian” formulation of electromagnetic gyrokinetics (Brizard & Hahm, 2007), so-named because all field perturbations reside in the Hamiltonian. This approach has the advantage that the equations of motion do not contain explicit time derivatives of the magnetic potential, which can be advantageous in some discretization schemes. As a result, however, the parallel momentum coordinate becomes the canonical momentum, which depends on the perturbed magnetic potential. In other discretization schemes (namely, in the one that we pursue in Chapter 3) having the perturbed magnetic potential in the Hamiltonian can be disadvantageous.

Thus we will take another approach, known as the “symplectic” formulation, so-named because the symplectic part of the gyrocenter one-form is allowed to retain gyrophase-independent parts of the perturbed fields. In this approach, we eliminate the dependence on 𝑨1\mbox{\boldmath${A}$}_{1} from the Hamiltonian at first order. This results in the parallel momentum coordinate remaining the kinetic momentum. Thus we take

Γ1,\mathboldR=qδ𝑨1=q𝑨1(𝑹+𝝆)𝑨1(𝑹)=q𝑨1q𝑨1,\displaystyle\Gamma_{1,\mathbold{R}}=q\langle\delta\mbox{\boldmath${A}$}_{1}\rangle=q\langle\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$}+\mbox{\boldmath${\rho}$})-\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$})\rangle=q\langle\mbox{\boldmath${A}$}_{1}\rangle-q\mbox{\boldmath${A}$}_{1}, (2.54)

where note that Γ1,\mathboldR𝑨~1\Gamma_{1,\mathbold{R}}\neq-\widetilde{\mbox{\boldmath${A}$}}_{1}, since the non-averaged term in Eq. 2.54 is evaluated at 𝑹{R}, not 𝑹+𝝆\mbox{\boldmath${R}$}+\mbox{\boldmath${\rho}$}. With this choice, the gyrocenter one-form is given by

Γ=q(𝑨0+𝑨1)d𝑹+mμqdϑdt,\Gamma=q\left(\mbox{\boldmath${A}$}_{0}^{*}+\langle\mbox{\boldmath${A}$}_{1}\rangle\right)\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${R}$}+\frac{m\mu}{q}\textnormal{d}\vartheta-\mathcal{H}\textnormal{d}t, (2.55)

with the total gyrocenter Hamiltonian

\displaystyle\mathcal{H} =12mv2+μB+qΦ1𝒗𝑨1+ϵV212mu2\displaystyle=\frac{1}{2}mv_{\parallel}^{2}+\mu B+q\langle\Phi_{1}-\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${A}$}_{1}\rangle+\epsilon_{V}^{2}\frac{1}{2}mu_{\perp}^{2}
[v𝑩0+ϵV(𝑬1×𝐛^+v𝑩1)+ϵB(μ/q)𝐛^×BB]ϵVm𝒖,\displaystyle\qquad-\left[\frac{v_{\parallel}\mbox{\boldmath${B}$}_{0}^{*}+\epsilon_{V}\left(\mbox{\boldmath${E}$}_{1}\times\mathbf{\hat{b}}+v_{\parallel}\mbox{\boldmath${B}$}_{1\perp}\right)+\epsilon_{B}(\mu/q)\mathbf{\hat{b}}\times\nabla B}{B_{\parallel}^{*}}\right]\boldsymbol{\cdot}\epsilon_{V}m\mbox{\boldmath${u}$}_{\perp}, (2.56)

and 𝑩1=(×𝑨1)\mbox{\boldmath${B}$}_{1\perp}=(\nabla\times\mbox{\boldmath${A}$}_{1})_{\perp}. By taking the velocity 𝒖\mbox{\boldmath${u}$}_{\perp} to be the 𝒪(ϵV)\mathcal{O}(\epsilon_{V}) part of the term in square brackets above, which is equivalent to the sum of the guiding-center E×BE\times B velocity, 𝒗E\mbox{\boldmath${v}$}_{E}, and the “magnetic flutter” component of the parallel velocity perpendicular to the background field, 𝒗f\mbox{\boldmath${v}$}_{f}, so that

𝒖(𝑹,v)𝑬1×𝐛^B+v𝑩1B=𝒗E+𝒗f,\mbox{\boldmath${u}$}_{\perp}(\mbox{\boldmath${R}$},v_{\parallel})\equiv\frac{\mbox{\boldmath${E}$}_{1}\times\mathbf{\hat{b}}}{B_{\parallel}^{*}}+v_{\parallel}\frac{\mbox{\boldmath${B}$}_{1\perp}}{B_{\parallel}^{*}}=\mbox{\boldmath${v}$}_{E}+\mbox{\boldmath${v}$}_{f}, (2.57)

we can reduce the Hamiltonian to

=12mv2+μB+qΦ1𝒗𝑨1ϵV2m2|𝒗E+𝒗f|2ϵVϵBm𝒗d(𝒗E+𝒗f).\mathcal{H}=\frac{1}{2}mv_{\parallel}^{2}+\mu B+q\langle\Phi_{1}-\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${A}$}_{1}\rangle-\epsilon_{V}^{2}\frac{m}{2}\left|\mbox{\boldmath${v}$}_{E}+\mbox{\boldmath${v}$}_{f}\right|^{2}-\epsilon_{V}\epsilon_{B}\,m\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}(\mbox{\boldmath${v}$}_{E}+\mbox{\boldmath${v}$}_{f}). (2.58)

Here,

𝒗dmv2qB𝐛^×(𝐛^𝐛^)+μqB𝐛^×B𝒪(ϵB)\mbox{\boldmath${v}$}_{d}\equiv\frac{mv_{\parallel}^{2}}{qB_{\parallel}^{*}}\mathbf{\hat{b}}\times(\mathbf{\hat{b}}\boldsymbol{\cdot}\nabla\mathbf{\hat{b}})+\frac{\mu}{qB_{\parallel}^{*}}\mathbf{\hat{b}}\times\nabla B\sim\mathcal{O}(\epsilon_{B}) (2.59)

is the combined curvature and B\nabla B drifts, with (×𝐛^)=𝐛^×(𝐛^𝐛^)(\nabla\times\mathbf{\hat{b}})_{\perp}=\mathbf{\hat{b}}\times(\mathbf{\hat{b}}\boldsymbol{\cdot}\nabla\mathbf{\hat{b}}). Thus the final form of the gyrocenter one-form is

Γ\displaystyle\Gamma =q(𝑨0+𝑨1)d𝑹+mμqdϑ[12mv2+μB+qΦ1𝒗𝑨1\displaystyle=q\left(\mbox{\boldmath${A}$}_{0}^{*}+\langle\mbox{\boldmath${A}$}_{1}\rangle\right)\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${R}$}+\frac{m\mu}{q}\textnormal{d}\vartheta-\left[\frac{1}{2}mv_{\parallel}^{2}+\mu B+q\langle\Phi_{1}-\mbox{\boldmath${v}$}_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${A}$}_{1}\rangle\right.
ϵV212m|𝒗E+𝒗f|2ϵVϵBm𝒗d(𝒗E+𝒗f)]dt.\displaystyle\qquad-\left.\epsilon_{V}^{2}\frac{1}{2}m\left|\mbox{\boldmath${v}$}_{E}+\mbox{\boldmath${v}$}_{f}\right|^{2}-\epsilon_{V}\epsilon_{B}\,m\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}(\mbox{\boldmath${v}$}_{E}+\mbox{\boldmath${v}$}_{f})\right]\textnormal{d}t. (2.60)

We can now see that the first-order correction to the gyrocenter one-form, Γ1\Gamma_{1}, has effectively replaced the guiding-center potentials 𝑨1(𝑹)\mbox{\boldmath${A}$}_{1}(\mbox{\boldmath${R}$}) and Φ1(𝑹)\Phi_{1}(\mbox{\boldmath${R}$}) that appeared in Γ0\Gamma_{0} with gyroaveraged versions. This also resulted in additional higher-order terms in the Hamiltonian. While we could (and should) develop the Lie transform to second order using Eq. 2.33 to obtain FLR corrections to these second-order terms, and possibly other second-order terms, the guiding-center (long-wavelength) versions of these terms as they appear in Eq. 2.60 will be sufficient for our current purposes, since we will only use the first-order Hamiltonian to compute the equations of motion.

Proper treatment of the second-order E×BE\times B energy term m/2|𝒗E|2-m/2|\mbox{\boldmath${v}$}_{E}|^{2} is necessary for deriving an energetically-consistent gyrokinetic Poisson equation, as we will see in Section 2.2. We have obtained this term without needing to compute the next-order Lie transform by making a convenient choice for the reference frame velocity 𝒖\mbox{\boldmath${u}$}_{\perp} in Eq. 2.15, effectively guessing an 𝒪(ϵV)\mathcal{O}(\epsilon_{V}) correction to the velocity 𝒗{v} that one could also find from continuing the Lie transform. We can compare the second-order terms in Eq. 2.60 to Eq. (54) from Brizard & Hahm (2007), which gives the Hamiltonian that results from computing the Lie transform to second order, with the second-order terms given in the long-wavelength limit. We see that indeed we have recovered some of the second-order terms, but missed a term of the form μ|𝑩1|2/(2B)\mu|\mbox{\boldmath${B}$}_{\perp 1}|^{2}/(2B).

2.1.4 Gyrocenter equations of motion

Now that we have the gyrocenter one-form given by Eq. 2.60, we can derive the gyrocenter Poisson bracket and the gyrocenter equations of motion. At this point, we will simplify the system by assuming 𝑨1=A𝐛^\mbox{\boldmath${A}$}_{1}=A_{\parallel}\mathbf{\hat{b}}, so that

𝑩1=×(A𝐛^)=𝐛^×A+A×𝐛^.\mbox{\boldmath${B}$}_{1}=\nabla\times(A_{\parallel}\mathbf{\hat{b}})=-\mathbf{\hat{b}}\times\nabla A_{\parallel}+A_{\parallel}\nabla\times\mathbf{\hat{b}}. (2.61)

This results in the neglect of most compressional fluctuations of the magnetic field, although even in this form there remains a small compressional component, 𝐛^𝑩1=A𝐛^×𝐛^\mathbf{\hat{b}}\boldsymbol{\cdot}\mbox{\boldmath${B}$}_{1}=A_{\parallel}\mathbf{\hat{b}}\boldsymbol{\cdot}\nabla\times\mathbf{\hat{b}}, which may vanish or be finite depending on the particular magnetic geometry. Note that the second term in Eq. 2.61 is frequently dropped since it is smaller than the first term by 𝒪(ϵB)\mathcal{O}(\epsilon_{B}), but we will choose to keep it, in part so that 𝑩1=0\nabla\boldsymbol{\cdot}\mbox{\boldmath${B}$}_{1}=0 exactly. Future work will include the full compressional fluctuations δB\delta B_{\parallel}, which can influence microinstabilities not only at large β1\beta\sim 1 but also when gradients of β\beta are large, particularly in spherical torus machines like NSTX (Bourdelle et al., 2003; Joiner et al., 2010; Belli & Candy, 2010; Zocco et al., 2015).

We will also drop some second-order terms in the Hamiltonian, but for now we will leave the exact form of the Hamiltonian unspecified, since the Hamiltonian does not affect the form of the Poisson bracket. Thus we will write the gyrocenter Lagrangian as

=q(𝑨0+A𝐛^)𝑹˙+mμqϑ˙H=𝚲𝒁˙H,\mathcal{L}=q\left(\mbox{\boldmath${A}$}_{0}^{*}+\langle{A}_{\parallel}\rangle\mathbf{\hat{b}}\right)\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}+\frac{m\mu}{q}\dot{\vartheta}-H=\mbox{\boldmath${\Lambda}$}\boldsymbol{\cdot}\dot{\mbox{\boldmath${Z}$}}-H, (2.62)

where 𝚲{\Lambda} denotes the symplectic part of the Lagrangian.

The phase-space Euler-Lagrange equations are then given by

ddt(Z˙i)=Zi,\frac{\textnormal{d}}{\textnormal{d}t}\left(\frac{\partial\mathcal{L}}{\partial\dot{Z}^{i}}\right)=\frac{\partial\mathcal{L}}{\partial Z^{i}}, (2.63)

which yields

Λ˙i=ΛjZiZ˙jHZi,\dot{\Lambda}_{i}=\frac{\partial\Lambda_{j}}{\partial Z^{i}}\dot{Z}^{j}-\frac{\partial H}{\partial Z^{i}}, (2.64)

where Zi(i=1,,6)Z^{i}\ (i=1,\dots,6) are the phase-space coordinates 𝒁{Z} not including time. We can expand the total time derivative Λ˙i\dot{\Lambda}_{i} and rearrange terms to obtain

ωijZ˙j=HZi+Λit,\omega_{ij}\dot{Z}^{j}=\frac{\partial H}{\partial Z^{i}}+\frac{\partial\Lambda_{i}}{\partial t}, (2.65)

where the Lagrange tensor 𝝎\boldsymbol{\omega} is defined by

ωijΛjZiΛiZj.\omega_{ij}\equiv\frac{\partial\Lambda_{j}}{\partial Z^{i}}-\frac{\partial\Lambda_{i}}{\partial Z^{j}}. (2.66)

Assuming det𝝎0\det\boldsymbol{\omega}\neq 0, we can define the Poisson tensor 𝚷\mathbf{\Pi} to be the inverse of the Lagrange tensor, (i.e., Πikωkj=δji\Pi^{ik}\omega_{kj}=\delta^{i}_{j}), so that the Euler-Lagrange equations from Eq. 2.65 can be inverted to give the equations of motion as

Z˙i=Πij(HZj+Λjt).\dot{Z}^{i}=\Pi^{ij}\left(\frac{\partial H}{\partial Z^{j}}+\frac{\partial\Lambda_{j}}{\partial t}\right). (2.67)

Defining the (non-canonical) Poisson bracket as

{f,g}fZiΠijgZj,\{f,g\}\equiv\frac{\partial f}{\partial Z^{i}}\Pi^{ij}\frac{\partial g}{\partial Z^{j}}, (2.68)

and recognizing that Πij={Zi,Zj}\Pi^{ij}=\{Z^{i},Z^{j}\}, we can also write the equations of motion as

Z˙i={Zi,H}+{Zi,Zj}Λjt.\dot{Z}^{i}=\{Z^{i},H\}+\{Z^{i},Z^{j}\}\frac{\partial\Lambda_{j}}{\partial t}. (2.69)

Inserting the gyrocenter phase-space Lagrangian from Eq. 2.60 into Eq. 2.66, the non-zero tensor elements are (Cary & Brizard, 2009)

ωRiv=ωvRi=mbi\displaystyle\omega_{R_{i}v_{\parallel}}=-\omega_{v_{\parallel}R_{i}}=-m\,b_{i} (2.70)
ωRiRj=ωRjRi=qϵijkB¯k\displaystyle\omega_{R_{i}R_{j}}=-\omega_{R_{j}R_{i}}=q\,\epsilon_{ijk}\bar{B}^{*k} (2.71)
ωμϑ=ωϑμ=mq,\displaystyle\omega_{\mu\vartheta}=-\omega_{\vartheta\mu}=-\frac{m}{q}, (2.72)

where ϵijk\epsilon_{ijk} is the Levi-Civita tensor and B¯k\bar{B}^{*k} are the components of 𝑩¯𝑩=𝑩0+×(A𝐛^)\mbox{\boldmath${\bar{B}}$}^{*}\equiv\langle\mbox{\boldmath${B}$}^{*}\rangle=\mbox{\boldmath${B}$}_{0}^{*}+\nabla\times(\langle A_{\parallel}\rangle\mathbf{\hat{b}}), so that the full tensor takes the form

𝝎=(0qB¯3qB¯2mb100qB¯30qB¯1mb200qB¯2qB¯10mb300mb1mb2mb300000000mq0000mq0).\mbox{\boldmath${\omega}$}=\begin{pmatrix}0&q\bar{B}^{*3}&-q\bar{B}^{*2}&-mb_{1}&0&0\\ -q\bar{B}^{*3}&0&q\bar{B}^{*1}&-mb_{2}&0&0\\ q\bar{B}^{*2}&-q\bar{B}^{*1}&0&-mb_{3}&0&0\\ mb_{1}&mb_{2}&mb_{3}&0&0&0\\ 0&0&0&0&0&-\frac{m}{q}\\ 0&0&0&0&\frac{m}{q}&0\end{pmatrix}. (2.73)

We can then invert this to obtain the Poisson tensor,

𝚷=𝝎1=1B¯(01qb31qb21mB¯1001qb301qb11mB¯2001qb21qb101mB¯3001mB¯11mB¯21mB¯300000000qm0000qm0),\mathbf{\Pi}=\mbox{\boldmath${\omega}$}^{-1}=\frac{1}{\bar{B}_{\parallel}^{*}}\begin{pmatrix}0&-\frac{1}{q}b_{3}&\frac{1}{q}b_{2}&\frac{1}{m}\bar{B}^{*1}&0&0\\ \frac{1}{q}b_{3}&0&-\frac{1}{q}b_{1}&\frac{1}{m}\bar{B}^{*2}&0&0\\ -\frac{1}{q}b_{2}&\frac{1}{q}b_{1}&0&\frac{1}{m}\bar{B}^{*3}&0&0\\ -\frac{1}{m}\bar{B}^{*1}&-\frac{1}{m}\bar{B}^{*2}&-\frac{1}{m}\bar{B}^{*3}&0&0&0\\ 0&0&0&0&0&\frac{q}{m}\\ 0&0&0&0&-\frac{q}{m}&0\end{pmatrix}, (2.74)

with B¯=𝐛^𝑩¯\bar{B}_{\parallel}^{*}=\mathbf{\hat{b}}\boldsymbol{\cdot}\mbox{\boldmath${\bar{B}}$}^{*}. The Poisson bracket is then given by Eq. 2.68,

{f,g}\displaystyle\{f,g\} =𝑩¯mB¯(fgvfvg)𝐛^qB¯f×g+qm(fϑgμfμgϑ).\displaystyle=\frac{\mbox{\boldmath${\bar{B}}$}^{*}}{m\bar{B}_{\parallel}^{*}}\boldsymbol{\cdot}\left(\nabla f\frac{\partial g}{\partial v_{\parallel}}-\frac{\partial f}{\partial v_{\parallel}}\nabla g\right)-\frac{\mathbf{\hat{b}}}{q\bar{B}_{\parallel}^{*}}\boldsymbol{\cdot}\nabla f\times\nabla g+\frac{q}{m}\left(\frac{\partial f}{\partial\vartheta}\frac{\partial g}{\partial\mu}-\frac{\partial f}{\partial\mu}\frac{\partial g}{\partial\vartheta}\right). (2.75)

We can also compute the Jacobian of the transformation from particle coordinates to gyrocenter coordinates 𝒛=(𝒙,𝒗)𝒁=(𝑹,v,μ,ϑ)\mbox{\boldmath${z}$}=(\mbox{\boldmath${x}$},\mbox{\boldmath${v}$})\rightarrow\mbox{\boldmath${Z}$}=(\mbox{\boldmath${R}$},v_{\parallel},\mu,\vartheta),

𝒥=1m3det𝝎=B¯m=1m[B+(mqv+A)𝐛^×𝐛^]=Bm+𝒪(ϵB),\mathcal{J}=\frac{1}{m^{3}}\sqrt{\det\boldsymbol{\omega}}=\frac{\bar{B}_{\parallel}^{*}}{m}=\frac{1}{m}\left[B+\left(\frac{m}{q}v_{\parallel}+\langle A_{\parallel}\rangle\right)\mathbf{\hat{b}}\boldsymbol{\cdot}\nabla\times\mathbf{\hat{b}}\right]=\frac{B}{m}+\mathcal{O}(\epsilon_{B}), (2.76)

where we will neglect 𝐛^×𝐛^𝒪(ϵB)\mathbf{\hat{b}}\boldsymbol{\cdot}\nabla\times\mathbf{\hat{b}}\lesssim\mathcal{O}(\epsilon_{B}) in the Jacobian. This approximation breaks the exact equivalence of 𝝎1\mbox{\boldmath${\omega}$}^{-1} and 𝚷\mathbf{\Pi}, but otherwise does not affect conservation properties. Note that the factor of 1/m31/m^{3} comes from the Jacobian of the transformation from canonical to non-canonical particle coordinates (𝒙,𝒑)(𝒙,𝒗)(\mbox{\boldmath${x}$},\mbox{\boldmath${p}$})\rightarrow(\mbox{\boldmath${x}$},\mbox{\boldmath${v}$}).444In some texts this 1/m31/m^{3} factor does not appear and the Jacobian is given as m2Bm^{2}B_{\parallel}^{*}, which is the Jacobian of the transformation (𝒙,𝒑)𝒁(\mbox{\boldmath${x}$},\mbox{\boldmath${p}$})\rightarrow\mbox{\boldmath${Z}$}; an additional factor of 1/m1/m can also appear when the parallel momentum pp_{\parallel} is used as a gyrocenter coordinate instead of vv_{\parallel}.

Now we can use Eq. 2.69 to obtain the gyrocenter equations of motion,

𝑹˙\displaystyle\dot{\mbox{\boldmath${R}$}} ={𝑹,H}+𝐛^qB¯×𝚲t=𝑩¯mB¯Hv+𝐛^qB¯×H\displaystyle=\{\mbox{\boldmath${R}$},H\}+\frac{\mathbf{\hat{b}}}{q\bar{B}_{\parallel}^{*}}\times\frac{\partial\mbox{\boldmath${\Lambda}$}}{\partial t}=\frac{\mbox{\boldmath${\bar{B}}$}^{*}}{m\bar{B}_{\parallel}^{*}}\frac{\partial H}{\partial v_{\parallel}}+\frac{\mathbf{\hat{b}}}{q\bar{B}_{\parallel}^{*}}\times\nabla H (2.77)
v˙\displaystyle\dot{v}_{\parallel} ={v,H}𝑩¯mB¯𝚲t=𝑩¯mB¯HqmAt.\displaystyle=\{v_{\parallel},H\}-\frac{\mbox{\boldmath${\bar{B}}$}^{*}}{m\bar{B}_{\parallel}^{*}}\boldsymbol{\cdot}\frac{\partial\mbox{\boldmath${\Lambda}$}}{\partial t}=-\frac{\mbox{\boldmath${\bar{B}}$}^{*}}{m\bar{B}_{\parallel}^{*}}\boldsymbol{\cdot}\nabla H-\frac{q}{m}\frac{\partial\langle A_{\parallel}\rangle}{\partial t}. (2.78)

Finally, note that the zeroth-order (guiding-center) equations of motion are the same, except with all gyroaverages replaced by evaluation of the quantity at the guiding-center position.

2.2 Gyrokinetic field theory

In the previous section, we derived the phase-space Lagrangian and equations of motion for a single charged particle in the presence of electromagnetic fields. Now we describe the collective behavior of a system of many such particles and the interactions between the particles and the fields.

The system Lagrangian is given by integrating the single-particle Lagrangian over phase space, weighted by the distribution function fsf_{s} and summed over all species ss, plus an additional field term:

=s𝒥fssd6𝒁+fd3𝒙.\mathcal{L}=\sum_{s}\int\mathcal{J}f_{s}\mathcal{L}_{s}\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}+\int\mathcal{L}_{f}\,\textnormal{d}^{3}\mbox{\boldmath${x}$}. (2.79)

Here, d6𝒁d3𝑹dvdμdϑ\textnormal{d}^{6}\mbox{\boldmath${Z}$}\equiv\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}v_{\parallel}\,\textnormal{d}\mu\,\textnormal{d}\vartheta is the gyrocenter phase-space volume element with 𝒥=B/m\mathcal{J}=B/m the Jacobian (dropping the 𝒪(ϵB)\mathcal{O}(\epsilon_{B}) terms in Eq. 2.76), s\mathcal{L}_{s} is the single-particle Lagrangian for species ss, and f\mathcal{L}_{f} is the field Lagrangian. Note that formally the Jacobian might be included in the definition of d6𝒁\textnormal{d}^{6}\mbox{\boldmath${Z}$}, but we instead opt to have the Jacobian appear explicitly in the expressions.

2.2.1 The gyrokinetic Vlasov equation

In the absence of sources and collisions (which we address later), the evolution of the distribution function ff is governed by the gyrokinetic Vlasov equation. This takes the form of Liouville’s equation, which states that the distribution function is conserved along the nonlinear phase-space characteristics. This is expressed by

df(𝒁,t)dt=ft+𝒁˙f𝒁=ft+𝑹˙f+v˙fv=0,\frac{\textnormal{d}f(\mbox{\boldmath${Z}$},t)}{\textnormal{d}t}=\frac{\partial f}{\partial t}+\dot{\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\frac{\partial f}{\partial\mbox{\boldmath${Z}$}}=\frac{\partial f}{\partial t}+\dot{\mbox{\boldmath${R}$}}\boldsymbol{\cdot}\nabla f+\dot{v}_{\parallel}\frac{\partial f}{\partial v_{\parallel}}=0, (2.80)

with the phase-space characteristics given by Eqs. 2.77 and 2.78. From Eq. 2.69, this can also be written in terms of the Poisson bracket as

ft+{f,H}+{f,𝒁}𝚲t=ft+{f,H}qmAtfv=0.\frac{\partial f}{\partial t}+\{f,H\}+\{f,\mbox{\boldmath${Z}$}\}\boldsymbol{\cdot}\frac{\partial\mbox{\boldmath${\Lambda}$}}{\partial t}=\frac{\partial f}{\partial t}+\{f,H\}-\frac{q}{m}\frac{\partial\langle A_{\parallel}\rangle}{\partial t}\frac{\partial f}{\partial v_{\parallel}}=0. (2.81)

Together with Liouville’s theorem, which states that phase-space volume is conserved, as expressed by

𝒥t+𝒁(𝒥𝒁˙)=𝒥t+(𝒥𝑹˙)+v(𝒥v˙)=0,\frac{\partial\mathcal{J}}{\partial t}+\frac{\partial}{\partial\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\left(\mathcal{J}\dot{\mbox{\boldmath${Z}$}}\right)=\frac{\partial\mathcal{J}}{\partial t}+\nabla\boldsymbol{\cdot}\left(\mathcal{J}\dot{\mbox{\boldmath${R}$}}\right)+\frac{\partial}{\partial v_{\parallel}}\left(\mathcal{J}\dot{v}_{\parallel}\right)=0, (2.82)

the gyrokinetic Vlasov equation can also be written in conservative form as

(𝒥f)t+𝒁(𝒥f𝒁˙)=(𝒥f)t+(𝒥f𝑹˙)+v(𝒥fv˙)=0.\frac{\partial(\mathcal{J}f)}{\partial t}+\frac{\partial}{\partial\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\left(\mathcal{J}f\dot{\mbox{\boldmath${Z}$}}\right)=\frac{\partial(\mathcal{J}f)}{\partial t}+\nabla\boldsymbol{\cdot}\left(\mathcal{J}f\dot{\mbox{\boldmath${R}$}}\right)+\frac{\partial}{\partial v_{\parallel}}\left(\mathcal{J}f\dot{v}_{\parallel}\right)=0. (2.83)

2.2.2 Variational derivation of the gyrokinetic field equations

We follow Sugama (2000); Scott & Smirnov (2010), to derive the gyrokinetic field equations. The field equations are derived directly from the Lagrangian by requiring variations of the action, =dt\mathcal{I}=\int\mathcal{L}\,\textnormal{d}t, to vanish with respect to the fields Φ1\Phi_{1} and 𝑨1\mbox{\boldmath${A}$}_{1}. In this way, approximations and simplifications can be made at the level of the Lagrangian, and then the resulting field equations will be consistent with those approximations, so that momentum and energy conservation are preserved.

Thus we must first specify the form of the Lagrangian. We consider three different cases: (1) keeping second-order terms in the single-particle Hamiltonian; (2) dropping second-order terms in the Hamiltonian; (3) dropping first- and second-order terms in the single-particle Lagrangian, resulting in the guiding-center Lagrangian.

Case 1: Single-particle Hamiltonian with second-order terms

In the first case, we take the single-particle Lagrangian to be the gyrocenter Lagrangian from Eq. 2.62. For the Hamiltonian, we will keep second-order terms, but we will neglect all second-order terms involving magnetic fluctuations in Eq. 2.58, so that we are left with

H=12mv2+μB+qΦ12mvE2=12mv2+μB+qΦm2B2|Φ|2.H=\frac{1}{2}mv_{\parallel}^{2}+\mu B+q\langle\Phi\rangle-\frac{1}{2}mv_{E}^{2}=\frac{1}{2}mv_{\parallel}^{2}+\mu B+q\langle\Phi\rangle-\frac{m}{2B^{2}}|\nabla_{\perp}\Phi|^{2}. (2.84)

Note that here and after we will drop the subscript on Φ1\Phi_{1}, since there is no Φ0\Phi_{0} to confuse it with.

The field Lagrangian f\mathcal{L}_{f} comes from the standard electrodynamic field term (E2B2)/(2μ0)(E^{2}-B^{2})/(2\mu_{0}), but we assume quasineutrality, which eliminates the electric field term. After neglecting parallel fluctuations of the magnetic field, we have

f=B122μ0|A|22μ0.\mathcal{L}_{f}=-\frac{B_{1\perp}^{2}}{2\mu_{0}}\approx-\frac{|\nabla_{\perp}A_{\parallel}|^{2}}{2\mu_{0}}. (2.85)

The system Lagrangian for this case is now

\displaystyle\mathcal{L} =s𝒥fs[qs(𝑨0+A𝐛^)𝑹˙+msμqsϑ˙\displaystyle=\sum_{s}\int\mathcal{J}f_{s}\left[q_{s}\left(\mbox{\boldmath${A}$}_{0}^{*}+\langle A_{\parallel}\rangle\mathbf{\hat{b}}\right)\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}+\frac{m_{s}\mu}{q_{s}}\dot{\vartheta}\right.
(12msv2+μB+qΦms2B2|Φ|2)]d6𝒁|A|22μ0d3𝒙.\displaystyle\qquad\left.-\left(\frac{1}{2}m_{s}v_{\parallel}^{2}+\mu B+q\langle\Phi\rangle-\frac{m_{s}}{2B^{2}}|\nabla_{\perp}\Phi|^{2}\right)\right]\textnormal{d}^{6}\mbox{\boldmath${Z}$}-\int\frac{|\nabla_{\perp}A_{\parallel}|^{2}}{2\mu_{0}}\textnormal{d}^{3}\mbox{\boldmath${x}$}. (2.86)

The field equation for the electrostatic potential Φ\Phi is found from the requirement that variations of the action with respect to Φ\Phi vanish. This gives the condition δ/δΦ(𝒙)=0\delta\mathcal{I}/\delta\Phi(\mbox{\boldmath${x}$})=0, where the functional derivative is given by

δδΦ(𝒙)\displaystyle\frac{\delta\mathcal{I}}{\delta\Phi(\mbox{\boldmath${x}$})} =s[𝒥fsHsΦ(𝒙)+(𝒥fsHsΦ(𝒙))]d6𝒁\displaystyle=\sum_{s}\int\left[-\mathcal{J}f_{s}\frac{\partial H_{s}}{\partial\Phi(\mbox{\boldmath${x}$})}+\nabla\boldsymbol{\cdot}\left(\mathcal{J}f_{s}\frac{\partial H_{s}}{\partial\nabla\Phi(\mbox{\boldmath${x}$})}\right)\right]\textnormal{d}^{6}\mbox{\boldmath${Z}$}
=s[qs𝒥fsδ(𝒙𝑹𝝆)(𝒥fsδ(𝒙𝑹)msB2Φ)]d6𝒁.\displaystyle=\sum_{s}\int\left[-q_{s}\mathcal{J}f_{s}\delta(\mbox{\boldmath${x}$}-\mbox{\boldmath${R}$}-\mbox{\boldmath${\rho}$})-\nabla\boldsymbol{\cdot}\left(\mathcal{J}f_{s}\delta(\mbox{\boldmath${x}$}-\mbox{\boldmath${R}$})\frac{m_{s}}{B^{2}}\nabla_{\perp}\Phi\right)\right]\textnormal{d}^{6}\mbox{\boldmath${Z}$}. (2.87)

Requirement that this quantity vanish yields an equation for Φ(𝒙)\Phi(\mbox{\boldmath${x}$}) that takes the form of the quasineutrality condition,

σgy+σpol=σgy𝑷=0,\sigma_{gy}+\sigma_{pol}=\sigma_{gy}-\nabla\boldsymbol{\cdot}\mbox{\boldmath${P}$}=0, (2.88)

where the gyrocenter charge density is

σgy=sqs𝒥fsd3𝒗sqsn¯s,\sigma_{gy}=\sum_{s}q_{s}\int\langle\mathcal{J}f_{s}\rangle^{\dagger}\textnormal{d}^{3}\mbox{\boldmath${v}$}\equiv\sum_{s}q_{s}\bar{n}_{s}, (2.89)

with d3𝒗2πdvdμ\textnormal{d}^{3}\mbox{\boldmath${v}$}\equiv 2\pi\textnormal{d}v_{\parallel}\textnormal{d}\mu. We will continue writing d3𝒗\textnormal{d}^{3}\mbox{\boldmath${v}$} in integrals defined this way throughout, even though there are only two evolved velocity dimensions; the factor of 2π2\pi comes from a trivial integration over the gyroangle, the third velocity dimension. This factor cancels the factors of (2π)1(2\pi)^{-1} included in the defintions of the gyroaveraging operations, where integration over the gyroangle does appear explicitly. Again, we also choose to leave the phase-space Jacobian out of our definition of d3𝒗\textnormal{d}^{3}\mbox{\boldmath${v}$} so that it appears explicitly in the expressions. The notation

f12π02πf(𝒙𝝆)dϑ\langle f\rangle^{\dagger}\equiv\frac{1}{2\pi}\int_{0}^{2\pi}f(\mbox{\boldmath${x}$}-\mbox{\boldmath${\rho}$})\,\textnormal{d}\vartheta (2.90)

denotes a gyroaverage taken at constant 𝒙{x} (as opposed to constant 𝑹{R}). Note that this operator is the adjoint of the gyroaverage taken at constant 𝑹{R} defined in Eq. 2.50, i.e. it satisfies the property

fgd3𝑹=fgd3𝒙.\int\langle f\rangle\,g\,\textnormal{d}^{3}\mbox{\boldmath${R}$}=\int f\langle g\rangle^{\dagger}\,\textnormal{d}^{3}\mbox{\boldmath${x}$}. (2.91)

The polarization charge density σpol\sigma_{pol} is given as the divergence of the polarization vector

𝑷=s𝒥fsmsB2Φd3𝒗=smsnsB2Φ.\mbox{\boldmath${P}$}=-\sum_{s}\int\mathcal{J}f_{s}\frac{m_{s}}{B^{2}}\nabla_{\perp}\Phi\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=-\sum_{s}\frac{m_{s}n_{s}}{B^{2}}\nabla_{\perp}\Phi. (2.92)

The quasineutrality condition can then be written as the gyrokinetic Poisson equation,

smsnsB2Φ=sqsn¯s.-\nabla\boldsymbol{\cdot}\sum_{s}\frac{m_{s}n_{s}}{B^{2}}\nabla_{\perp}\Phi=\sum_{s}q_{s}\bar{n}_{s}. (2.93)

Finally, note that the second order E×BE\times B energy term in the Hamiltonian was required to obtain the polarization charge density. Without it, the quasineutrality condition would not give us an equation for the potential.

The field equation for the parallel vector potential AA_{\parallel} is found from the requirement that variations of the action with respect to AA_{\parallel} vanish. This gives the condition δ/δA(𝒙)=0\delta\mathcal{I}/\delta A_{\parallel}(\mbox{\boldmath${x}$})=0, where the functional derivative is given by

δδA(𝒙)\displaystyle\frac{\delta\mathcal{I}}{\delta A_{\parallel}(\mbox{\boldmath${x}$})} =fA(𝒙)+s𝒥fssA(𝒙)d6𝒁\displaystyle=-\nabla\boldsymbol{\cdot}\frac{\partial\mathcal{L}_{f}}{\partial\nabla A_{\parallel}(\mbox{\boldmath${x}$})}+\sum_{s}\int\mathcal{J}f_{s}\frac{\partial\mathcal{L}_{s}}{\partial A_{\parallel}(\mbox{\boldmath${x}$})}\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}
=1μ02A+sqs𝐛^𝑹˙𝒥fsδ(𝒙𝑹𝝆)d6𝒁\displaystyle=\frac{1}{\mu_{0}}\nabla_{\perp}^{2}A_{\parallel}+\sum_{s}q_{s}\int\mathbf{\hat{b}}\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}\,\mathcal{J}f_{s}\,\delta(\mbox{\boldmath${x}$}-\mbox{\boldmath${R}$}-\mbox{\boldmath${\rho}$})\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}
=1μ02A+sqs1msHsv𝒥fsδ(𝒙𝑹𝝆)d6𝒁\displaystyle=\frac{1}{\mu_{0}}\nabla_{\perp}^{2}A_{\parallel}+\sum_{s}q_{s}\int\frac{1}{m_{s}}\frac{\partial H_{s}}{\partial v_{\parallel}}\mathcal{J}f_{s}\,\delta(\mbox{\boldmath${x}$}-\mbox{\boldmath${R}$}-\mbox{\boldmath${\rho}$})\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}
=1μ02A+sqsv𝒥fsδ(𝒙𝑹𝝆)d6𝒁,\displaystyle=\frac{1}{\mu_{0}}\nabla_{\perp}^{2}A_{\parallel}+\sum_{s}q_{s}\int v_{\parallel}\mathcal{J}f_{s}\,\delta(\mbox{\boldmath${x}$}-\mbox{\boldmath${R}$}-\mbox{\boldmath${\rho}$})\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}, (2.94)

where we have used Eq. 2.77 to substitute for 𝐛^𝑹˙=v\mathbf{\hat{b}}\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}=v_{\parallel}. The requirement that this quantity vanish results in the parallel component of Ampère’s law,

2A=μ0J¯,-\nabla_{\perp}^{2}A_{\parallel}=\mu_{0}\bar{J}_{\parallel}, (2.95)

with

J¯sqsv𝒥fsd3𝒗=sqsnsu¯s\bar{J}_{\parallel}\equiv\sum_{s}q_{s}\int v_{\parallel}\langle\mathcal{J}f_{s}\rangle^{\dagger}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=\sum_{s}q_{s}\overline{n_{s}u}_{\parallel s} (2.96)

the gyrocenter parallel current density.

Case 2: Single-particle Hamiltonian without second-order terms

In this case, we will drop all second-order terms in the Hamiltonian, so that we are left with

H=12mv2+μB+qΦ.H=\frac{1}{2}mv_{\parallel}^{2}+\mu B+q\langle\Phi\rangle. (2.97)

As we noted above, the second order E×BE\times B energy term (which we have now dropped) was needed to obtain the polarization charge density in the quasineutrality equation. Without the second-order term, we need another way to obtain the polarization term.

Following Sugama (2000); Scott & Smirnov (2010), we can instead cast the higher-order E×BE\times B energy term into a field term, i.e. as part of the field Lagrangian f\mathcal{L}_{f}. To do this, we replace the distribution function multiplying this term in the system Lagrangian by a time-independent background distribution function f0f_{0}, giving

\displaystyle\mathcal{L} =s𝒥fs(s0+s1)d6𝒁+s𝒥f0ss2d6𝒁|A|22μ0d3𝒙\displaystyle=\sum_{s}\int\mathcal{J}f_{s}\left(\mathcal{L}_{s0}+\mathcal{L}_{s1}\right)\textnormal{d}^{6}\mbox{\boldmath${Z}$}+\sum_{s}\mathcal{J}f_{0s}\mathcal{L}_{s2}\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}-\int\frac{|\nabla_{\perp}A_{\parallel}|^{2}}{2\mu_{0}}\textnormal{d}^{3}\mbox{\boldmath${x}$} (2.98)
=s𝒥fs[qs(𝑨0+A𝐛^)𝑹˙+msμqsϑ˙(12msv2+μB+qsΦ)]d6𝒁\displaystyle=\sum_{s}\int\mathcal{J}f_{s}\left[q_{s}\left(\mbox{\boldmath${A}$}_{0}^{*}+\langle A_{\parallel}\rangle\mathbf{\hat{b}}\right)\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}+\frac{m_{s}\mu}{q_{s}}\dot{\vartheta}-\left(\frac{1}{2}m_{s}v_{\parallel}^{2}+\mu B+q_{s}\langle\Phi\rangle\right)\right]\textnormal{d}^{6}\mbox{\boldmath${Z}$}
+s𝒥f0sms2B2|Φ|2d6𝒁|A|22μ0d3𝒙,\displaystyle\qquad+\sum_{s}\int\mathcal{J}f_{0s}\frac{m_{s}}{2B^{2}}|\nabla_{\perp}\Phi|^{2}\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}-\int\frac{|\nabla_{\perp}A_{\parallel}|^{2}}{2\mu_{0}}\textnormal{d}^{3}\mbox{\boldmath${x}$}, (2.99)

with the entire second line of Eq. 2.99 now comprising f\mathcal{L}_{f}.

After following the same steps as in Case 1 to derive the quasineutrality condition from δ/δΦ(𝒙)=0\delta\mathcal{I}/\delta\Phi(\mbox{\boldmath${x}$})=0, we obtain the same expression for the gyrocenter charge density in Eq. 2.89, but the polarization vector is modified as

𝑷=s𝒥f0smsB2Φd3𝒗=smsn0sB2Φ,\mbox{\boldmath${P}$}=-\sum_{s}\int\mathcal{J}f_{0s}\frac{m_{s}}{B^{2}}\nabla_{\perp}\Phi\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=-\sum_{s}\frac{m_{s}n_{0s}}{B^{2}}\nabla_{\perp}\Phi, (2.100)

where the density in Eq. 2.92 has been replaced by some time-independent background density n0n_{0}. This result is sometimes referred to as linearized polarization. From a computational perspective, it is helpful that in this case the kernel that must be inverted in the gyrokinetic Poisson equation does not change in time, allowing for parts of the inversion (e.g. matrix factorization) to be done only at the beginning of the calculation. Thus the linearized polarization is commonly used for computational efficiency (Idomura et al., 2008; Ku et al., 2018a; Shi et al., 2019), even in the edge/SOL where large density fluctuations could lead to questions of the validity of replacing the full density with a background density.

It is important to note that using the linearized polarization approximation requires neglecting the second order E×BE\times B energy term in the Hamiltonian, and vice versa, in order for the resulting system to be energetically consistent. This will be shown explicitly in Section 2.2.3, where we show conservation properties of the system.

Finally, the parallel Ampère equation for AA_{\parallel} remains unchanged from Eq. 2.95; since the Hamiltonian does not depend on AA_{\parallel} (in the symplectic formulation), dropping second-order terms in the Hamiltonian has no effect on variations of the action with respect to AA_{\parallel}.

Case 3: Guiding-center single-particle Lagrangian

We finally consider the case where we drop first- and second-order terms in the single-particle Lagrangian, resulting in the guiding-center Lagrangian (with no gyroaverages). Similar to Case 2, we can cast the first- and second-order terms into field terms multiplying a background distribution function:

\displaystyle\mathcal{L} =s𝒥fss0d6𝒁+s𝒥f0s(s1+s2)d6𝒁|A|22μ0d3𝒙\displaystyle=\sum_{s}\int\mathcal{J}f_{s}\mathcal{L}_{s0}\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}+\sum_{s}\int\mathcal{J}f_{0s}\left(\mathcal{L}_{s1}+\mathcal{L}_{s2}\right)\textnormal{d}^{6}\mbox{\boldmath${Z}$}-\int\frac{|\nabla_{\perp}A_{\parallel}|^{2}}{2\mu_{0}}\textnormal{d}^{3}\mbox{\boldmath${x}$} (2.101)
=s𝒥fs[qs(𝑨0+A𝐛^)𝑹˙+msμqsϑ˙(12msv2+μB+qsΦ)]d6𝒁\displaystyle=\sum_{s}\int\mathcal{J}f_{s}\left[q_{s}\left(\mbox{\boldmath${A}$}_{0}^{*}+A_{\parallel}\mathbf{\hat{b}}\right)\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}+\frac{m_{s}\mu}{q_{s}}\dot{\vartheta}-\left(\frac{1}{2}m_{s}v_{\parallel}^{2}+\mu B+q_{s}\Phi\right)\right]\textnormal{d}^{6}\mbox{\boldmath${Z}$}
+s𝒥f0s(qs[AA]𝐛^𝑹˙qs[ΦΦ]+ms2B2|Φ|2)d6𝒁\displaystyle\qquad+\sum_{s}\int\mathcal{J}f_{0s}\left(q_{s}[\langle A_{\parallel}\rangle-A_{\parallel}]\mathbf{\hat{b}}\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}-q_{s}[\langle\Phi\rangle-\Phi]+\frac{m_{s}}{2B^{2}}|\nabla_{\perp}\Phi|^{2}\right)\textnormal{d}^{6}\mbox{\boldmath${Z}$}
|A|22μ0d3𝒙.\displaystyle\qquad-\int\frac{|\nabla_{\perp}A_{\parallel}|^{2}}{2\mu_{0}}\textnormal{d}^{3}\mbox{\boldmath${x}$}. (2.102)

The functional derivative of the action with respect to variations of Φ(𝒙)\Phi(\mbox{\boldmath${x}$}) gives

δδΦ(𝒙)\displaystyle\frac{\delta\mathcal{I}}{\delta\Phi(\mbox{\boldmath${x}$})} =s[qs𝒥fsδ(𝒙𝑹)qs𝒥f0s[δ(𝒙𝑹𝝆)δ(𝒙𝑹)].\displaystyle=\sum_{s}\int\bigg{[}-q_{s}\mathcal{J}f_{s}\delta(\mbox{\boldmath${x}$}-\mbox{\boldmath${R}$})-q_{s}\mathcal{J}f_{0s}[\delta(\mbox{\boldmath${x}$}-\mbox{\boldmath${R}$}-\mbox{\boldmath${\rho}$})-\delta(\mbox{\boldmath${x}$}-\mbox{\boldmath${R}$})]\Bigg{.}
+(𝒥f0sδ(𝒙𝑹)msB2Φ)]d6𝒁\displaystyle\qquad\left.+\nabla\boldsymbol{\cdot}\left(\mathcal{J}f_{0s}\delta(\mbox{\boldmath${x}$}-\mbox{\boldmath${R}$})\frac{m_{s}}{B^{2}}\nabla_{\perp}\Phi\right)\right]\textnormal{d}^{6}\mbox{\boldmath${Z}$}
=sqs𝒥(fs+[f0sf0s])d3𝒗(smsB2Φ𝒥f0sd3𝒗)\displaystyle=-\sum_{s}q_{s}\int\mathcal{J}\left(f_{s}+[\langle f_{0s}\rangle^{\dagger}-f_{0s}]\right)\textnormal{d}^{3}\mbox{\boldmath${v}$}-\nabla\boldsymbol{\cdot}\left(\sum_{s}\frac{m_{s}}{B^{2}}\nabla_{\perp}\Phi\int\mathcal{J}f_{0s}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\right)
=sqs(ns+n¯0sn0s)smsn0sB2Φ.\displaystyle=-\sum_{s}q_{s}(n_{s}+\bar{n}_{0s}-n_{0s})-\nabla\boldsymbol{\cdot}\sum_{s}\frac{m_{s}n_{0s}}{B^{2}}\nabla_{\perp}\Phi. (2.103)

If we assume that the background density n0n_{0} varies slowly on the gyroradius scale (consistent with the ordering ρ/Lp1\rho/L_{p}\ll 1), we can approximate n¯0sn0s0\bar{n}_{0s}-n_{0s}\approx 0 (and to be consistent, we should also drop the f01f_{0}\mathcal{L}_{1} field term in Eq. 2.101), so that the gyrokinetic Poisson equation becomes

smsn0sB2Φ=sqsns.-\nabla\boldsymbol{\cdot}\sum_{s}\frac{m_{s}n_{0s}}{B^{2}}\nabla_{\perp}\Phi=\sum_{s}q_{s}{n}_{s}. (2.104)

Consistent with dropping gyroaverages in the single-particle Lagrangian, the charge density is no longer gyroaveraged here compared to the other cases. Note that even after dropping all gyroaverage operations in the single-particle Lagrangian and the Poisson equation, the polarization density on the left-hand side of Eq. 2.104 still incorporates some lowest-order finite-Larmor-radius (FLR) effects.

Similarly, the Ampère equation becomes

2A=μ0J=μ0sqsnsus,-\nabla_{\perp}^{2}A_{\parallel}=\mu_{0}{J}_{\parallel}=\mu_{0}\sum_{s}q_{s}n_{s}u_{\parallel s}, (2.105)

with the gyroaverage of the current density dropped as well.

2.2.3 Conservation properties of the gyrokinetic Vlasov-Poisson-Ampère system

The Hamiltonian structure of the gyrokinetic Vlasov-Poisson-Ampère system guarantees conservation of arbitrary functions of ff along the characteristics,

G(f)t+𝒁˙𝒁G(f)=0,\frac{\partial G(f)}{\partial t}+\dot{\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\frac{\partial}{\partial\mbox{\boldmath${Z}$}}G(f)=0, (2.106)

along with corresponding Casimir invariants 𝒥G(f)d6𝒁\int\mathcal{J}G(f)\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}. Thus, the system has an infinite number of conserved quantities, including the total particle number (or L1L_{1} norm) N=𝒥fd6𝒁N=\int\mathcal{J}f\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}, the L2L_{2} norm M=𝒥f2d6𝒁M=\int\mathcal{J}f^{2}\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}, and the kinetic entropy S=𝒥flnfd6𝒁S=-\int\mathcal{J}f\ln f\,\textnormal{d}^{6}\mbox{\boldmath${Z}$} (Idomura et al., 2008).

Conservation laws of energy and momentum can be derived by applying Noether’s theorem to the action integral (Sugama, 2000). The Noether energy \mathcal{E} is given by varying the action with respect to time variations, which results in

\displaystyle\mathcal{E} =s𝒥fs𝚲s𝒁˙d6𝒁=s𝒥fsHsd6𝒁f,\displaystyle=\sum_{s}\int\mathcal{J}f_{s}\,\mbox{\boldmath${\Lambda}$}_{s}\boldsymbol{\cdot}\dot{\mbox{\boldmath${Z}$}}\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}-\mathcal{L}=\sum_{s}\int\mathcal{J}f_{s}H_{s}\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}-\mathcal{L}_{f}, (2.107)

where recall 𝚲s=s/𝒁˙\mbox{\boldmath${\Lambda}$}_{s}=\partial\mathcal{L}_{s}/\partial\dot{\mbox{\boldmath${Z}$}} is the symplectic part of the single-particle Lagrangian. We can verify that this is indeed a conserved quantity for each of the cases discussed in the previous section, by inserting the corresponding definitions of the Hamiltonian and field Lagrangian. The proof relies on the fact that the field equations have been derived consistently from the system Lagrangian, with all approximations made at the level of the Lagrangian. Considering Case 1 from the previous section, which includes the second order E×BE\times B term in the Hamiltonian and the full polarization density (as opposed to the linearized polarization density in the other cases), we can explicitly compute the time derivative of \mathcal{E} as

t\displaystyle\frac{\partial\mathcal{E}}{\partial t} =s(𝒥fsHst+Hs(𝒥fs)t)d6𝒁ft\displaystyle=\sum_{s}\int\left(\mathcal{J}f_{s}\frac{\partial H_{s}}{\partial t}+H_{s}\frac{\partial(\mathcal{J}f_{s})}{\partial t}\right)\textnormal{d}^{6}\mbox{\boldmath${Z}$}-\frac{\partial\mathcal{L}_{f}}{\partial t}
=s(𝒥fs[qsΦtmsB2ΦΦt]\displaystyle=\sum_{s}\int\left(\mathcal{J}f_{s}\left[q_{s}\frac{\partial\langle\Phi\rangle}{\partial t}-\frac{m_{s}}{B^{2}}\nabla_{\perp}\Phi\boldsymbol{\cdot}\nabla_{\perp}\frac{\partial\Phi}{\partial t}\right]\right.
Hs𝒁(𝒥fs𝒁˙))d6𝒁+1μ0AAtd3𝒙\displaystyle\qquad\left.-\ H_{s}\frac{\partial}{\partial\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\left(\mathcal{J}f_{s}\dot{\mbox{\boldmath${Z}$}}\right)\right)\textnormal{d}^{6}\mbox{\boldmath${Z}$}+\int\frac{1}{\mu_{0}}\nabla_{\perp}A_{\parallel}\boldsymbol{\cdot}\nabla_{\perp}\frac{\partial A_{\parallel}}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${x}$} (2.108)

We can integrate by parts in several terms, and after assuming that boundary contributions vanish (boundary contributions are allowed, they just must be properly accounted for), this results in

t\displaystyle\frac{\partial\mathcal{E}}{\partial t} =s([qs𝒥fsΦt+(𝒥fsmsB2Φ)Φt]\displaystyle=\sum_{s}\int\left(\left[q_{s}\mathcal{J}f_{s}\frac{\partial\langle\Phi\rangle}{\partial t}+\nabla\boldsymbol{\cdot}\left(\mathcal{J}f_{s}\frac{m_{s}}{B^{2}}\nabla_{\perp}\Phi\right)\frac{\partial\Phi}{\partial t}\right]\right.
+𝒥fs𝒁˙Hs𝒁)d6𝒁1μ02AAtd3𝒙\displaystyle\qquad\left.+\ \mathcal{J}f_{s}\dot{\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\frac{\partial H_{s}}{\partial\mbox{\boldmath${Z}$}}\right)\textnormal{d}^{6}\mbox{\boldmath${Z}$}-\int\frac{1}{\mu_{0}}\nabla_{\perp}^{2}A_{\parallel}\frac{\partial A_{\parallel}}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${x}$}
=s([qs𝒥fs+(𝒥fsmsB2Φ)]Φt\displaystyle=\sum_{s}\int\left(\left[q_{s}\langle\mathcal{J}f_{s}\rangle^{\dagger}+\nabla\boldsymbol{\cdot}\left(\mathcal{J}f_{s}\frac{m_{s}}{B^{2}}\nabla_{\perp}\Phi\right)\right]\frac{\partial\Phi}{\partial t}\right.
qv𝒥fsAt)d3𝒙d3𝒗1μ02AAtd3𝒙\displaystyle\qquad\left.-\ qv_{\parallel}\langle\mathcal{J}f_{s}\rangle^{\dagger}\frac{\partial A_{\parallel}}{\partial t}\right)\textnormal{d}^{3}\mbox{\boldmath${x}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}-\int\frac{1}{\mu_{0}}\nabla_{\perp}^{2}A_{\parallel}\frac{\partial A_{\parallel}}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${x}$}
=([σgy𝑷]Φt1μ0[μ0J¯+2A]At)d3𝒙\displaystyle=\int\left(\left[\sigma_{gy}-\nabla\boldsymbol{\cdot}\mbox{\boldmath${P}$}\right]\frac{\partial\Phi}{\partial t}-\frac{1}{\mu_{0}}\left[\mu_{0}\bar{J}_{\parallel}+\nabla_{\perp}^{2}A_{\parallel}\right]\frac{\partial A_{\parallel}}{\partial t}\right)\textnormal{d}^{3}\mbox{\boldmath${x}$}
=0,\displaystyle=0, (2.109)

where we used Eq. 2.88 and Eq. 2.95, and

𝒁˙H𝒁\displaystyle\dot{\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\frac{\partial H}{\partial\mbox{\boldmath${Z}$}} ={H,H}+{H,𝒁}𝚲t={H,𝒁}𝚲t\displaystyle=\{H,H\}+\{H,\mbox{\boldmath${Z}$}\}\boldsymbol{\cdot}\frac{\partial\mbox{\boldmath${\Lambda}$}}{\partial t}=\{H,\mbox{\boldmath${Z}$}\}\boldsymbol{\cdot}\frac{\partial\mbox{\boldmath${\Lambda}$}}{\partial t}
=𝐛^𝑹˙At=qmHvAt=qvAt,\displaystyle=-\mathbf{\hat{b}}\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}\frac{\partial\langle A_{\parallel}\rangle}{\partial t}=-\frac{q}{m}\frac{\partial H}{\partial v_{\parallel}}\frac{\partial\langle A_{\parallel}\rangle}{\partial t}=-qv_{\parallel}\frac{\partial\langle A_{\parallel}\rangle}{\partial t}, (2.110)

with {H,H}=0\{H,H\}=0 from antisymmetry of the Poisson bracket.

Similarly, the Noether toroidal momentum is given by varying the action with respect to spatial variations, which results in

𝒫=s𝒥fsPφd6𝒁,\mathcal{P}=\sum_{s}\int\mathcal{J}f_{s}P_{\varphi}\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}, (2.111)

where

Pφφ˙=qAφ+(qA+mv)bφ,P_{\varphi}\equiv\frac{\partial\mathcal{L}}{\partial\dot{\varphi}}=q{A}_{\varphi}+(qA_{\parallel}+mv_{\parallel})b_{\varphi}, (2.112)

with Aφ=𝑨0(𝑹/φ)A_{\varphi}=\mbox{\boldmath${A}$}_{0}\boldsymbol{\cdot}(\partial\mbox{\boldmath${R}$}/\partial\varphi) and bφ=𝐛^(𝑹/φ)b_{\varphi}=\mathbf{\hat{b}}\boldsymbol{\cdot}(\partial\mbox{\boldmath${R}$}/\partial\varphi).

2.3 Summary of gyrokinetic system, in limit of current interest

Here we summarize the gyrokinetic system, in the limit that we will use for the remainder of this thesis. As a first step towards full-ff electromagnetic gyrokinetic simulations of the plasma boundary region, we have implemented the lowest-order (guiding-center, or drift-kinetic) limit of the system in the Gkeyll code, neglecting all gyroaveraging operations. This is a matter of simplicity, and implementing gyroaveraging effects given by the next order terms we have derived is important future work. We emphasize that this “long-wavelength” limit is a valid limit of our full-ff gyrokinetic derivation since we took care to include the guiding-center components of the field perturbations at 𝒪(1)\mathcal{O}(1) in Eqs. 2.11 and 2.12. Further, although one may think of this as a drift-kinetic limit, the presence of the ion polarization term in the quasineutrality equation distinguishes the long-wavelength gyrokinetic model from versions of drift-kinetics that include the polarization drift in the equations of motion or that determine the potential from some other equation.

In this limit, the gyrokinetic Poisson bracket is given by

{F,G}=𝑩mB(FGvFvG)𝐛^qB×FG,\{F,G\}=\frac{\mbox{\boldmath${B}$}^{*}}{mB_{\parallel}^{*}}\boldsymbol{\cdot}\left(\nabla F\frac{\partial G}{\partial v_{\parallel}}-\frac{\partial F}{\partial v_{\parallel}}\nabla G\right)-\frac{\mathbf{\hat{b}}}{qB_{\parallel}^{*}}\times\nabla F\boldsymbol{\cdot}\nabla G, (2.113)

with 𝑩=𝑩+(mv/q)×𝐛^+𝑩1\mbox{\boldmath${B}$}^{*}=\mbox{\boldmath${B}$}+(mv_{\parallel}/q)\nabla\times\mathbf{\hat{b}}+\mbox{\boldmath${B}$}_{1}, 𝑩1=×(A𝐛^)\mbox{\boldmath${B}$}_{1}=\nabla\times(A_{\parallel}\mathbf{\hat{b}}), and B=𝐛^𝑩BB_{\parallel}^{*}=\mathbf{\hat{b}}\boldsymbol{\cdot}\mbox{\boldmath${B}$}^{*}\approx B. The Hamiltonian is

H=12mv2+μB+qΦ.H=\frac{1}{2}mv_{\parallel}^{2}+\mu B+q\Phi. (2.114)

Inserting this into Eqs. 2.77 and 2.78, this results in the (guiding-center) equations of motion,

𝑹˙={𝑹,H}=𝑩Bv+𝐛^qB×(μB+qΦ),\displaystyle\dot{\mbox{\boldmath${R}$}}=\{\mbox{\boldmath${R}$},H\}=\frac{\mbox{\boldmath${B^{*}}$}}{B_{\parallel}^{*}}v_{\parallel}+\frac{\mathbf{\hat{b}}}{qB_{\parallel}^{*}}\times\left(\mu\nabla B+q\nabla\Phi\right), (2.115)
v˙=v˙HqmAt={v,H}qmAt=𝑩mB(μB+qΦ)qmAt.\displaystyle\dot{v}_{\parallel}=\dot{v}^{H}_{\parallel}-\frac{q}{m}\frac{\partial A_{\parallel}}{\partial t}=\{v_{\parallel},H\}-\frac{q}{m}\frac{\partial A_{\parallel}}{\partial t}=-\frac{\mbox{\boldmath${B^{*}}$}}{mB_{\parallel}^{*}}{\boldsymbol{\cdot}}\left(\mu\nabla B+q\nabla\Phi\right)-\frac{q}{m}\frac{\partial A_{\parallel}}{\partial t}. (2.116)

In Eq. 2.116 we have separated v˙\dot{v}_{\parallel} into a term that comes from the Hamiltonian, v˙H={v,H}\dot{v}^{H}_{\parallel}=\{v_{\parallel},H\}, and the term that comes from the symplectic part of the Lagrangian that is proportional to the inductive component of the parallel electric field, (q/m)A/t(q/m)\partial{A_{\parallel}}/\partial{t}. We use this notation for convenience, and so that the time derivative of AA_{\parallel} appears explicitly.

The gyrokinetic equation for species ss is then given by

fst+𝑹˙fs+v˙HfsvqsmsAtfsv=C[fs]+Ss,\displaystyle\frac{\partial f_{s}}{\partial t}+\dot{\mbox{\boldmath${R}$}}\boldsymbol{\cdot}\nabla f_{s}+\dot{v}^{H}_{\parallel}\frac{\partial f_{s}}{\partial v_{\parallel}}-\frac{q_{s}}{m_{s}}\frac{\partial A_{\parallel}}{\partial t}\frac{\partial f_{s}}{\partial v_{\parallel}}=C[f_{s}]+S_{s}, (2.117)

or equivalently,

fst+{fs,Hs}qsmsAtfsv=C[fs]+Ss,\frac{\partial f_{s}}{\partial t}+\{f_{s},H_{s}\}-\frac{q_{s}}{m_{s}}\frac{\partial A_{\parallel}}{\partial t}\frac{\partial f_{s}}{\partial v_{\parallel}}=C[f_{s}]+S_{s}, (2.118)

or in conservative form as

(𝒥fs)t+(𝒥𝑹˙fs)+v(𝒥v˙Hfs)v(𝒥qsmsAtfs)=𝒥C[fs]+𝒥Ss.\frac{\partial(\mathcal{J}f_{s})}{\partial t}+\nabla{\boldsymbol{\cdot}}(\mathcal{J}\dot{\mbox{\boldmath${R}$}}f_{s})+\frac{\partial}{\partial v_{\parallel}}\left(\mathcal{J}\dot{v}^{H}_{\parallel}f_{s}\right)-\frac{\partial}{\partial v_{\parallel}}\left(\mathcal{J}\frac{q_{s}}{m_{s}}\frac{\partial A_{\parallel}}{\partial t}f_{s}\right)=\mathcal{J}C[f_{s}]+\mathcal{J}S_{s}. (2.119)

Here we have included collisions, C[fs]C[f_{s}], and sources, SsS_{s}, which we did not derive in this chapter. Details about the model collision operator are included briefly below.

The field equations are the ones derived in Section 2.2.2, Case 3, consistent with neglecting gyroaveraging operations in the equations of motion. The gyrokinetic Poisson equation is

(ϵΦ)=sqs𝒥fsd3𝒗,-\nabla\boldsymbol{\cdot}\left(\epsilon_{\perp}\nabla_{\perp}\Phi\right)=\sum_{s}q_{s}\int\mathcal{J}f_{s}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}, (2.120)

with

ϵ=smsn0sB2,\epsilon_{\perp}=\sum_{s}\frac{m_{s}n_{0s}}{B^{2}}, (2.121)

and the parallel Ampère equation is

2A=μ0sqsv𝒥fsd3𝒗.-\nabla_{\perp}^{2}A_{\parallel}=\mu_{0}\sum_{s}q_{s}\int v_{\parallel}\mathcal{J}f_{s}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (2.122)

Note that we can also take the time derivative of this equation to get a generalized Ohm’s law which can be solved directly for A/t\partial A_{\parallel}/\partial t, the inductive component of the parallel electric field EE_{\parallel} (Reynders, 1993; Cummings, 1994; Chen & Parker, 2001)i:

2At=μ0sqsv(𝒥fs)td3𝒗.-\nabla_{\perp}^{2}\frac{\partial A_{\parallel}}{\partial t}=\mu_{0}\sum_{s}q_{s}\int v_{\parallel}\frac{\partial(\mathcal{J}f_{s})}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (2.123)

Writing the gyrokinetic equation as

(𝒥fs)t=(𝒥fs)t+v(𝒥qsmsAtfs),\frac{\partial(\mathcal{J}f_{s})}{\partial t}=\frac{\partial(\mathcal{J}f_{s})}{\partial t}^{\star}+\frac{\partial}{\partial v_{\parallel}}\left(\mathcal{J}\frac{q_{s}}{m_{s}}\frac{\partial A_{\parallel}}{\partial t}f_{s}\right), (2.124)

where (𝒥fs)/t\partial{(\mathcal{J}f_{s})^{\star}}/\partial{t} denotes all the terms in the gyrokinetic equation (including sources and collisions) except the A/t\partial A_{\parallel}/\partial t term, Ohm’s law can be rewritten (after an integration by parts) as

(2+sμ0qs2ms𝒥fsd3𝒗)At=μ0sqsv(𝒥fs)td3𝒗.\left(-\nabla_{\perp}^{2}+\sum_{s}\frac{\mu_{0}q_{s}^{2}}{m_{s}}\int\mathcal{J}f_{s}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\right)\frac{\partial A_{\parallel}}{\partial t}=\mu_{0}\sum_{s}q_{s}\int v_{\parallel}\frac{\partial(\mathcal{J}f_{s})}{\partial t}^{\star}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (2.125)

Finally, the conserved energy in this system is

\displaystyle\mathcal{E} =HE+B\displaystyle=\mathcal{E}_{H}-\mathcal{E}_{E}+\mathcal{E}_{B}
=s𝒥fsHsd6𝒁ϵ2|Φ|2d3𝑹+12μ0|A|2d3𝑹.\displaystyle=\sum_{s}\int\mathcal{J}f_{s}H_{s}\,\textnormal{d}^{6}\mbox{\boldmath${Z}$}-\int\frac{\epsilon_{\perp}}{2}|\nabla_{\perp}\Phi|^{2}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}+\int\frac{1}{2\mu_{0}}|\nabla_{\perp}A_{\parallel}|^{2}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}. (2.126)

2.4 Model collision operator

To model the effect of collisions we use a conservative Lenard–Bernstein (or Dougherty) collision operator (Lenard & Bernstein, 1958; Dougherty, 1964),

𝒥C[f]\displaystyle\mathcal{J}C[f] =ν{v[(vu)𝒥f+vt2(𝒥f)v]+μ[2μ𝒥f+2μmBvt2(𝒥f)μ]},\displaystyle=\nu\left\{\frac{\partial}{\partial v_{\parallel}}\left[\left(v_{\parallel}-u_{\parallel}\right)\mathcal{J}f+v_{t}^{2}\frac{\partial(\mathcal{J}f)}{\partial v_{\parallel}}\right]+\frac{\partial}{\partial\mu}\left[2\mu\mathcal{J}f+2\mu\frac{m}{B}v_{t}^{2}\frac{\partial(\mathcal{J}f)}{\partial\mu}\right]\right\}, (2.127)

where

nu=𝒥vfd3𝒗,nu2+3nvt2=𝒥(v2+2μB/m)fd3𝒗,\displaystyle nu_{\parallel}=\int\mathcal{J}v_{\parallel}f\,\textnormal{d}^{3}\mbox{\boldmath${v}$},\qquad\qquad nu_{\parallel}^{2}+3nv_{t}^{2}=\int\mathcal{J}\left(v_{\parallel}^{2}+2\mu B/m\right)f\,\textnormal{d}^{3}\mbox{\boldmath${v}$}, (2.128)

with n=𝒥fd3𝒗n=\int\mathcal{J}f\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. This collision operator contains the effects of drag and pitch-angle scattering, and it conserves number, momentum and energy density. Consistent with our present long-wavelength treatment of the gyrokinetic system, finite-Larmor-radius effects are ignored. For simplicity we restrict ourselves to the case in which the collision frequency ν\nu is velocity independent, i.e. νν(v)\nu\neq\nu(v). Further details about this collision operator, including its conservation properties and its numerical discretization, are shown in Francisquez et al. (2020).

Chapter 3 Numerical methods: an electromagnetic full-ff gyrokinetic scheme

The electromagnetic gyrokinetic system described in the previous chapter requires robust numerical methods that can preserve the underlying conservation laws. For this, we have chosen a numerical scheme based on the discontinuous Galerkin (DG) finite-element method. In this chapter, we develop a DG scheme that is explicitly constructed to conserve energy in Hamiltonian systems, and then we apply the general Hamiltonian scheme to electromagnetic gyrokinetics.

3.1 The discontinuous Galerkin method

The discontinuous Galerkin method comprises a class of Galerkin methods for numerically solving partial differential equations that combines attractive features of finite-element and finite-volume methods. The result is a method with flexibility in choice of local, arbitrarily high-order basis functions (as in finite-element methods), along with the ability to locally enforce conservation laws (as in finite-volume methods). DG methods first appeared in the study of neutron transport (Reed & Hill, 1973). The work of Cockburn & Shu (1998, 2001) introduced the Runge-Kutta discontinuous Galerkin (RKDG) method for the solution of nonlinear, time-dependent hyperbolic systems, leading to the use and study of DG methods for a wide variety of problems in computational fluid dynamics and other areas. For a more detailed introduction to DG methods, see the textbooks of Hesthaven & Warburton (2007) and Durran (2010) and the review by Cockburn & Shu (2001).

3.1.1 DG for hyperbolic conservation laws

To introduce the DG scheme, we will first focus on a scalar hyperbolic conservation law in one dimension of the generic form

ft+F(f)x=0,\frac{\partial f}{\partial t}+\frac{\partial F(f)}{\partial x}=0, (3.1)

with F(f){F}(f) some arbitrary (possibly nonlinear) flux, and the system defined on some region xΩx\in\Omega and subject to some boundary conditions and initial conditions.

We begin by dividing the region Ω\Omega into a mesh 𝒯\mathcal{T} of NN non-overlapping cells 𝒦i𝒯\mathcal{K}_{i}\in\mathcal{T}, with cell ii defined by 𝒦i=[xi1/2,xi+1/2]\mathcal{K}_{i}=[x_{i-1/2},x_{i+1/2}], where xi+1/2=(xi+xi+1)/2x_{i+1/2}=(x_{i}+x_{i+1})/2 and xix_{i} is the center of cell ii. We next define a piecewise-polynomial approximation space for the solution,

𝒱hp={ψ:ψ|𝒦i𝑷p,𝒦i𝒯},\mathcal{V}_{h}^{p}=\{\psi:\psi|_{\mathcal{K}_{i}}\in\mbox{\boldmath${P}$}^{p},\forall\ \mathcal{K}_{i}\in\mathcal{T}\}, (3.2)

where 𝑷p\mbox{\boldmath${P}$}^{p} is some space of polynomials with maximum degree pp (by some measure) containing polynomial functions ψ=ψ(x)\psi=\psi(x) local to each cell. The approximate solution is then defined in each cell as a finite sum of expansion functions ψk(x)\psi_{k}(x),

fhi(x,t)=k=0pfki(t)ψk(x).f_{h}^{i}(x,t)=\sum_{k=0}^{p}f_{k}^{i}(t)\psi_{k}(x). (3.3)

The global approximate solution fh(x,t)f_{h}(x,t), composed as a direct sum of the NN local solutions as

fh(x,t)=i=1Nfhi(x,t),f_{h}(x,t)=\bigoplus_{i=1}^{N}f_{h}^{i}(x,t), (3.4)

is assumed to approximate the exact solution f(x,t)fh(x,t)f(x,t)\simeq f_{h}(x,t). In the form defined above, the global solution fhf_{h} can be discontinuous at the interface between two cells; there are no restrictions on the local coefficients fkif_{k}^{i} in neighboring cells, so continuity is not enforced in general. The discontinuous piecewise-polynomial form of the global solution is a key part of the discontinuous Galerkin method.

Inserting the approximate solution fhf_{h} into Eq. 3.1, we obtain the residual

h(x,t)=fht+F(fh)x.\mathcal{R}_{h}(x,t)=\frac{\partial f_{h}}{\partial t}+\frac{\partial F(f_{h})}{\partial x}. (3.5)

Various schemes can be given by particular choices for how to minimize the residual. The DG scheme is given by minimizing the residual via the Galerkin condition, which can be stated as the requirement that the residual in each cell be orthogonal to all test functions ψ\psi in the solution space,

𝒦iψhdx=𝒦iψ(fht+F(fh)x)dx=0,ψ𝒱hp.\int_{\mathcal{K}_{i}}\psi\,\mathcal{R}_{h}\,\textnormal{d}x=\int_{\mathcal{K}_{i}}\psi\left(\frac{\partial f_{h}}{\partial t}+\frac{\partial F(f_{h})}{\partial x}\right)\textnormal{d}x=0,\qquad\forall\ \psi\in\mathcal{V}_{h}^{p}. (3.6)

Since F(fh)F(f_{h}) can be discontinuous at cell boundaries, the spatial derivative of F(fh)F(f_{h}) that appears in Eq. 3.6 introduces delta functions at the boundaries. To avoid this, we integrate by parts in space to move the derivative off of FF. This results in the DG weak form of the system,

𝒦iψfhtdx𝒦iψxFhdx+[ψF^]xi1/2xi+1/2=0.\int_{\mathcal{K}_{i}}\psi\frac{\partial f_{h}}{\partial t}\,\textnormal{d}x-\int_{\mathcal{K}_{i}}\frac{\partial\psi}{\partial x}F_{h}\,\textnormal{d}x+\bigg{[}\psi\hat{F}\bigg{]}^{x_{i+1/2}}_{x_{i-1/2}}=0. (3.7)

The weak form now contains a volume integral term (the second term on the left-hand side above) and a surface integral term (the third term on the left-hand side, where the ‘surface’ of cell 𝒦i\mathcal{K}_{i} is just the endpoints of the cell in this simple 1D example). We have introduced the numerical flux F^=F^(F,F+)\hat{F}=\hat{F}(F^{-},F^{+}) in the surface term. This arises because the flux Fh=F(fh)F_{h}=F(f_{h}) is not unique at the cell boundaries since fhf_{h} can be discontinuous at the cell boundary, resulting in different values of the flux when evaluated just inside (FF^{-}) or just outside (F+F^{+}) the boundary. The choice of the form of the numerical flux depends on the system of interest. For advection, i.e. when F(f)=ufF(f)=uf with uu the advection velocity, a common choice is the upwind flux,

F^(F,F+)=12[F++F]12sgn(u)[F+F]={Fif u>0F+if u<0.\hat{F}(F^{-},F^{+})=\frac{1}{2}\left[F^{+}+F^{-}\right]-\frac{1}{2}\text{sgn}(u)\left[F^{+}-F^{-}\right]=\begin{cases}F^{-}\quad\text{if }u>0\\ F^{+}\quad\text{if }u<0.\end{cases} (3.8)

The numerical flux is common to both sides of the cell boundary, so that the flux of particles out of one cell is identical to the the flux into the adjacent cell through the shared boundary. This ensures that the L1L_{1} norm N=fd𝒙N=\int f\,\textnormal{d}\mbox{\boldmath${x}$} is conserved. In general, the numerical flux must be consistent, so that F^(F,F)=F\hat{F}(F,F)=F. Finally, drawing on the success of monotone finite-volume methods, the flux should be monotone by requiring it to be non-decreasing in the first argument (FF^{-}) and non-increasing in the second argument (F+F^{+}) (LeVeque, 2002).

We can now obtain a system of coupled differential equations for the time evolution of the weights fki(t)f_{k}^{i}(t) by inserting the expansion from Eq. 3.3 into the weak form:

k=0p𝒦iψjψkfkitdx𝒦iψjxFhdx+[ψjF^]xi1/2xi+1/2=0,j=0,,p.\sum_{k=0}^{p}\int_{\mathcal{K}_{i}}\psi_{j}\psi_{k}\frac{\partial f_{k}^{i}}{\partial t}\,\textnormal{d}x-\int_{\mathcal{K}_{i}}\frac{\partial\psi_{j}}{\partial x}F_{h}\,\textnormal{d}x+\bigg{[}\psi_{j}\hat{F}\bigg{]}^{x_{i+1/2}}_{x_{i-1/2}}=0,\qquad j=0,\dots,p. (3.9)

Note that in the special case where the polynomials ψ𝒫p\psi\in\mathcal{P}^{p} are orthonormal, this reduces to

fjit=𝒦iψjxFhdx[ψjF^]xi1/2xi+1/2=0,j=0,,p.\frac{\partial f_{j}^{i}}{\partial t}=\int_{\mathcal{K}_{i}}\frac{\partial\psi_{j}}{\partial x}F_{h}\,\textnormal{d}x-\bigg{[}\psi_{j}\hat{F}\bigg{]}^{x_{i+1/2}}_{x_{i-1/2}}=0,\qquad j=0,\dots,p. (3.10)

This system of equations can now be discretized in time using an explicit scheme such as a high-order Runge–Kutta (RK) time discretization scheme, resulting in the RKDG method (Cockburn & Shu, 1998).

The scheme can be easily generalized to a multi-dimensional hyperbolic conservation law,

ft+𝑭(f)=0.\frac{\partial f}{\partial t}+\nabla\boldsymbol{\cdot}\mbox{\boldmath${F}$}(f)=0. (3.11)

As above, the DG weak form in cell ii is given by multiplying Eq. 3.11 by a test function ψ\psi, and integrating (by parts) over the cell. This gives

𝒦iψfhtd𝒙𝒦i𝑭hψd𝒙+𝒦iψ𝑭^d𝒔=0,\int_{\mathcal{K}_{i}}\psi\frac{\partial f_{h}}{\partial t}\textnormal{d}\mbox{\boldmath${x}$}-\int_{\mathcal{K}_{i}}\mbox{\boldmath${F}$}_{h}\boldsymbol{\cdot}\nabla\psi\,\textnormal{d}\mbox{\boldmath${x}$}+\oint_{\partial\mathcal{K}_{i}}\psi^{-}\mbox{\boldmath${\hat{F}}$}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}=0, (3.12)

where now the surface term takes the form of a surface integral over the cell boundary 𝒦i\partial\mathcal{K}_{i}, with d𝒔{s} the differential element pointing outward normal to the surface.

3.1.2 Choice of basis functions

There is significant freedom for the choice of basis functions ψ𝑷p\psi\in\mbox{\boldmath${P}$}^{p}. The class of possible basis functions is typically grouped into nodal and modal families. In the nodal approach, the basis functions are usually taken to be the Lagrange interpolating polynomials, which in one-dimension are given by

k(x)=0mpmkxxmxkxm.\ell_{k}(x)=\prod_{\begin{smallmatrix}0\leq m\leq p\\ m\neq k\end{smallmatrix}}\frac{x-x_{m}}{x_{k}-x_{m}}. (3.13)

with xkx_{k} the set of nodes chosen to represent the solution. The nodes are typical chosen to be quadrature points so that the integrals in the DG weak form can be computed efficiently. The coefficients in the expansion of the solution are then just the values of the solution at the nodes, so that fki(t)=fhi(xk,t)f_{k}^{i}(t)=f_{h}^{i}(x_{k},t) in Eq. 3.4.

We instead take the modal approach, where we obtain the expansion coefficients by projecting the solution onto some set of ‘modes’ ψk\psi_{k}, so that

fki(t)=𝒦iψk(x)fhi(x,t)dx.f_{k}^{i}(t)=\int_{\mathcal{K}_{i}}\psi_{k}(x)f_{h}^{i}(x,t)\,\textnormal{d}x. (3.14)

It is convenient to map each cell 𝒦i\mathcal{K}_{i} to the interval [1,1][-1,1] in each dimension. For the one-dimensional weak form from Eq. 3.9, this can be accomplished using the transformation

ξ=2(xxi)Δxi,\xi=\frac{2(x-x_{i})}{\Delta x_{i}}, (3.15)

where cell 𝒦i=[xiΔxi/2,xi+Δxi/2]\mathcal{K}_{i}=[x_{i}-\Delta x_{i}/2,x_{i}+\Delta x_{i}/2] has cell center xix_{i} and width Δxi\Delta x_{i}. This gives

dx=Δxj2dξ,x=2Δxjξ,\textnormal{d}x=\frac{\Delta x_{j}}{2}\textnormal{d}\xi,\qquad\frac{\partial}{\partial x}=\frac{2}{\Delta x_{j}}\frac{\partial}{\partial\xi}, (3.16)

so that Eq. 3.9 becomes

Δxi2k=0p11ψjψkfktdξ11ψjξFhdξ+[ψjF^]1 1=0.\frac{\Delta x_{i}}{2}\sum_{k=0}^{p}\int_{-1}^{1}\psi_{j}\psi_{k}\frac{\partial f_{k}}{\partial t}\,\textnormal{d}\xi-\int_{-1}^{1}\frac{\partial\psi_{j}}{\partial\xi}F_{h}\,\textnormal{d}\xi+\bigg{[}\psi_{j}\hat{F}\bigg{]}^{\,1}_{-1}=0. (3.17)

The first term on the left-hand side contains the mass matrix,

Mjk11ψjψkdξ.M_{jk}\equiv\int_{-1}^{1}\psi_{j}\psi_{k}\,\textnormal{d}\xi. (3.18)

It is then efficient to choose an orthogonal basis so that the mass matrix is diagonal, or even better, an orthonormal basis so that the mass matrix is the identity matrix. This can be done by starting with the simple monomial basis ψk(x)=xk\psi_{k}(x)=x^{k} and using a Gram-Schmidt orthogonalization procedure to generate an orthogonal basis on the interval [1,1][-1,1], which can then be appropriately normalized so that the basis is orthonormal. As a result, the 1D DG weak form in cell ii becomes

fkt=2Δxi11ψjξFhdξ2Δxi[ψjF^]1 1.\frac{\partial f_{k}}{\partial t}=\frac{2}{\Delta x_{i}}\int_{-1}^{1}\frac{\partial\psi_{j}}{\partial\xi}F_{h}\,\textnormal{d}\xi-\frac{2}{\Delta x_{i}}\bigg{[}\psi_{j}\hat{F}\bigg{]}^{\,1}_{-1}. (3.19)

These approaches can be generalized to higher dimensions by taking Lagrange tensor products of the one-dimensional basis sets. This results in the number of basis functions within a cell scaling like (p+1)d(p+1)^{d} for dd dimensions, which gives an exponential cost scaling with dimensionality. Since this can be prohibitive for a five-dimensional system like gyrokinetics, we instead reduce the tensor product basis by employing the serendipity basis set (Arnold & Awanou, 2011). Starting from a tensor product basis of the monomials with degree pp, elements are dropped if they have super-linear degree greater than pp, defined to be the total degree of the polynomial with respect to variables which enter super-linearly (so for example, the super-linear degree of x2yz3x^{2}yz^{3} is 5). For a two-dimensional p=2p=2 serendipity basis, this means that the x2y2x^{2}y^{2} element is dropped because its super-linear degree is four, while xy2xy^{2} and x2yx^{2}y are kept because they have super-linear degree of two, equal to pp. The resulting reduced set of monomials can then be orthogonalized and orthonormalized with a Gram-Schmidt procedure as in one dimension. The serendipity basis set has the advantage of using fewer basis functions while giving the same formal convergence order (although it is less accurate) as the Lagrange tensor basis. Note however that for p=1p=1 the serendipity basis is equivalent to the Lagrange tensor basis.

A more complete treatment of the advantages of various choices for DG basis sets is given by Juno (2020).

3.2 An energy-conserving discontinuous Galerkin scheme for general Hamiltonian systems

A broad class of problems in fluid mechanics and plasma physics are described by Hamiltonian systems. As we saw in Chapter 2, this includes the electromagnetic gyrokinetic system. In this section, we discuss a discontinuous Galerkin scheme for general Hamiltonian systems that is explicitly constructed to be energy-conserving. We will apply this scheme to the electromagnetic gyrokinetic system in Section 3.3. The scheme presented here (and in more detail in Hakim et al. (2019)) is a generalization of the DG scheme presented by Liu & Shu (2000) for the 2D incompressible Euler equations, which can be expressed in Hamiltonian form as we will see below.

3.2.1 Evolution of general Hamiltonian systems

The phase-space evolution of a Hamiltonian system is in general given by the Liouville equation, which describes the conservation of the phase-space distribution function f(t,𝒁)f(t,\mbox{\boldmath${Z}$}) along trajectories in phase space,

ft+𝒁˙f𝒁=0.\frac{\partial f}{\partial t}+\dot{\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\frac{\partial f}{\partial\mbox{\boldmath${Z}$}}=0. (3.20)

In this section we will assume that the coordinates 𝒁=(Z1,,ZNd)\mbox{\boldmath${Z}$}=(Z^{1},\ldots,Z^{N_{d}}), which label the NdN_{d}-dimensional phase space in which the distribution function evolves, are canonical or that they resulted from a time-independent non-canonical coordinate transformation111The symplectic formulation of electromagnetic gyrokinetics is derived via a time-dependent non-canonical coordinate transformation. In Section 3.3 we will show that the scheme in this section can be generalized to account for time dependence in the symplectic structure.. This means that the equations of motion can be written as

𝒁˙={𝒁,H},\dot{\mbox{\boldmath${Z}$}}=\{\mbox{\boldmath${Z}$},H\}, (3.21)

where HH is the Hamiltonian and {g,h}\{g,h\} is the Poisson bracket operator. Equivalently, Eq. 3.20 can be written in terms of the Poisson bracket as

ft+{f,H}=0.\frac{\partial f}{\partial t}+\{f,H\}=0. (3.22)

Liouville’s theorem also provides that phase-space volume is conserved under (possibly non-canonical) coordinate transformations. Given a coordinate transformation 𝒁¯𝒁\bar{\mbox{\boldmath${Z}$}}\rightarrow\mbox{\boldmath${Z}$} with Jacobian 𝒥\mathcal{J} such that d𝒁¯=𝒥d𝒁\textnormal{d}\bar{\mbox{\boldmath${Z}$}}=\mathcal{J}\textnormal{d}\mbox{\boldmath${Z}$}, this can be stated as

𝒁(𝒥𝒁˙)=0,\frac{\partial}{\partial\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\left(\mathcal{J}\dot{\mbox{\boldmath${Z}$}}\right)=0, (3.23)

where again in this section we assume the Jacobian of the transformation is time-independent. This allows us to write the Liouville equation in conservative form as

t(𝒥f)+𝒁(𝒥f𝒁˙)=0,\frac{\partial}{\partial t}\left(\mathcal{J}f\right)+\frac{\partial}{\partial\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\left(\mathcal{J}f\dot{\mbox{\boldmath${Z}$}}\right)=0, (3.24)

which now has the same form of a hyperbolic conservation law as in Section 3.1.1, with 𝑭=𝒥f𝒁˙\mbox{\boldmath${F}$}=\mathcal{J}f\dot{\mbox{\boldmath${Z}$}} the flux. Finally, the form of the Hamiltonian and the equation(s) governing its evolution depend on the system of interest.

Hamiltonian systems conserve the total energy of the system, given by

=H𝒥fd𝒁f,\mathcal{E}=\int H\mathcal{J}f\,\textnormal{d}\mbox{\boldmath${Z}$}-\mathcal{L}_{f}, (3.25)

where f\mathcal{L}_{f} accounts for possible field terms, such that

t=(H(𝒥f)t+𝒥fHt)d𝒁ft=0.\frac{\partial\mathcal{E}}{\partial t}=\int\left(H\frac{\partial(\mathcal{J}f)}{\partial t}+\mathcal{J}f\frac{\partial H}{\partial t}\right)\textnormal{d}\mbox{\boldmath${Z}$}-\frac{\partial\mathcal{L}_{f}}{\partial t}=0. (3.26)

The first term vanishes upon integration by parts, assuming no boundary contributions, since 𝒁˙H/𝒁={H,H}=0\dot{\mbox{\boldmath${Z}$}}\boldsymbol{\cdot}\partial H/\partial\mbox{\boldmath${Z}$}=\{H,H\}=0; physically, this is because the flow 𝒁˙\dot{\mbox{\boldmath${Z}$}} is along contours of constant energy in phase space. For systems with time-dependent Hamiltonians, the field equation governing the Hamiltonian is required to show that the second and third terms above cancel exactly.

3.2.2 Discontinuous Galerkin discretization scheme

Now we can follow the ideas from Section 3.1.1 to make a DG discretization of Eq. 3.24. We start by decomposing the global phase-space domain Ω\Omega into a structured phase-space mesh 𝒯\mathcal{T} with cells 𝒦i𝒯,i=1,,N\mathcal{K}_{i}\in\mathcal{T},\ i=1,...,N. As above, we then introduce a piecewise-polynomial approximation space for the distribution function f(t,𝒁)f(t,\mbox{\boldmath${Z}$}),

𝒱hp={ψ:ψ|𝒦i𝑷p,𝒦i𝒯},\mathcal{V}_{h}^{p}=\{\psi:\psi|_{\mathcal{K}_{i}}\in\mbox{\boldmath${P}$}^{p},\forall\ \mathcal{K}_{i}\in\mathcal{T}\}, (3.27)

The DG weak form in cell ii is then obtained by multiplying Eq. 3.24 by a test function ψ𝒱hp\psi\in\mathcal{V}^{p}_{h} and integrating (by parts) in the cell, yielding

𝒦iψ(𝒥fh)td𝒁𝒦i𝒥fh𝒁˙hψ𝒁d𝒁+𝒦iψ𝒥fh𝒁˙h^d𝒔=0,\int_{\mathcal{K}_{i}}\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}-\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\dot{\mbox{\boldmath${Z}$}}_{h}\boldsymbol{\cdot}\frac{\partial\psi}{\partial\mbox{\boldmath${Z}$}}\,\textnormal{d}\mbox{\boldmath${Z}$}+\oint_{\partial\mathcal{K}_{i}}\psi^{-}\widehat{\mathcal{J}f_{h}\dot{\mbox{\boldmath${Z}$}}_{h}}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}=0, (3.28)

where 𝒁˙h={𝒁,Hh}\dot{\mbox{\boldmath${Z}$}}_{h}=\{\mbox{\boldmath${Z}$},H_{h}\}, and 𝑭^=𝒥fh𝒁˙h^\hat{\mbox{\boldmath${F}$}}=\widehat{\mathcal{J}f_{h}\dot{\mbox{\boldmath${Z}$}}_{h}} is a numerical flux function. Solving Eq. 3.28 for all test functions ψ𝒱hp\psi\in\mathcal{V}_{h}^{p} in all cells 𝒦i𝒯\mathcal{K}_{i}\in\mathcal{T} yields the discretized distribution function fh𝒱hpf_{h}\in\mathcal{V}^{p}_{h}. However, noting that the quantity 𝒥fh\mathcal{J}f_{h} always appears together, it is convenient to instead discretize the Jacobian-weighted distribution function, 𝒥fh𝒱hp\mathcal{J}f_{h}\in\mathcal{V}^{p}_{h}.

We have not yet addressed the approximation space for the discrete Hamiltonian, HhH_{h}. For this, we will introduce a subset of 𝒱hp\mathcal{V}^{p}_{h} where the piecewise polynomials are continuous across cell interfaces, denoted by 𝒱hp=𝒱hpC0(𝒁)\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}^{p}_{h}=\mathcal{V}^{p}_{h}\cap C_{0}(\mbox{\boldmath${Z}$}), with C0(𝒁)C_{0}(\mbox{\boldmath${Z}$}) the set of continuous functions. As we will show later, in order to maintain energy conservation in our discrete scheme, we will require that the discrete Hamiltonian be continuous across cell interfaces, i.e. Hh𝒱hpH_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}^{p}_{h} (Hakim et al., 2019; Liu & Shu, 2000; Shi et al., 2017; Shi, 2017). This leads to the following Lemma:

Lemma 1.

The component of the phase-space characteristic velocity normal to a face of a cell is continuous across the cell boundary, as long as both the Hamiltonian and the Poisson tensor are continuous across the boundary.

Proof.

Recall from Section 2.1.4 that for a general Hamiltonian system, the Poisson bracket operator is defined as

{f,g}=fZαΠαβgZβ,\displaystyle\{f,g\}=\frac{\partial f}{\partial Z^{\alpha}}\Pi^{\alpha\beta}\frac{\partial g}{\partial Z^{\beta}}, (3.45)

where Παβ\Pi^{\alpha\beta} is the anti-symmetric Poisson tensor. The characteristic velocity, Z˙α={Zα,H}\dot{Z}^{\alpha}=\{Z^{\alpha},H\}, can then be written as Z˙α=ΠαβH/Zβ\dot{Z}^{\alpha}=\Pi^{\alpha\beta}\partial H/\partial Z^{\beta}. Let nαn_{\alpha} be a unit vector normal to a cell surface in dimension α\alpha. We have

nαZ˙α=nαΠαβHZβ=τβHZβ=𝝉H𝒁,\displaystyle n_{\alpha}\dot{Z}^{\alpha}=n_{\alpha}\Pi^{\alpha\beta}\frac{\partial H}{\partial Z^{\beta}}=\tau^{\beta}\frac{\partial H}{\partial Z^{\beta}}=\mbox{\boldmath${\tau}$}\boldsymbol{\cdot}\frac{\partial H}{\partial\mbox{\boldmath${Z}$}}, (3.46)

where τβnαΠαβ\tau^{\beta}\equiv n_{\alpha}\Pi^{\alpha\beta}. Hence, 𝝉𝒏=nαΠαβnβ=0\mbox{\boldmath${\tau}$}\boldsymbol{\cdot}\mbox{\boldmath${n}$}=n_{\alpha}\Pi^{\alpha\beta}n_{\beta}=0, as Παβ\Pi^{\alpha\beta} is anti-symmetric, showing that the vector 𝝉{\tau} is orthogonal to 𝒏{n}, and thus tangent to the cell surface. Hence, as the Hamiltonian is continuous within the cell (including the cell surface), the tangential component of its gradient (the normal component of the characteristic velocity) is also continuous on the cell surface. However, this also requires that the tangent vector 𝝉{\tau} is continuous across the boundary, which means the Poisson tensor itself must be continuous across cell boundaries. ∎

Remark.

When the conditions of Lemma 1 are met so that the phase-space characteristic velocities are indeed continuous across cell interfaces, we can pull the characteristic velocity out of the numerical flux function, since we will have Z˙hα=Z˙hα+\dot{Z}_{h}^{\alpha\,-}=\dot{Z}_{h}^{\alpha\,+} in each dimension α\alpha. Thus the numerical flux becomes 𝑭^=𝒁˙h𝒥fh^\hat{\mbox{\boldmath${F}$}}=\dot{\mbox{\boldmath${Z}$}}_{h}\widehat{\mathcal{J}f_{h}}.

3.2.3 Discrete energy conservation

We will now show that the scheme given by Eq. 3.28 conserves the total energy of the system exactly in the continuous-time limit. The energy is given by

h=ΩHh𝒥fhd𝒁f=i𝒦iHh𝒥fhd𝒁f,\mathcal{E}_{h}=\int_{\Omega}H_{h}\mathcal{J}f_{h}\textnormal{d}\mbox{\boldmath${Z}$}-\mathcal{L}_{f}=\sum_{i}\int_{\mathcal{K}_{i}}H_{h}\mathcal{J}f_{h}\textnormal{d}\mbox{\boldmath${Z}$}-\mathcal{L}_{f}, (3.47)

where f\mathcal{L}_{f} is a possible field term. This quantity evolves as

ht=i𝒦i(Hh(𝒥fh)t+𝒥fhHht)d𝒁ft.\frac{\partial\mathcal{E}_{h}}{\partial t}=\sum_{i}\int_{\mathcal{K}_{i}}\left(H_{h}\frac{\partial(\mathcal{J}f_{h})}{\partial t}+\mathcal{J}f_{h}\frac{\partial H_{h}}{\partial t}\right)\textnormal{d}\mbox{\boldmath${Z}$}-\frac{\partial\mathcal{L}_{f}}{\partial t}. (3.48)

To show that the first term vanishes, we can take ψ=Hh\psi=H_{h} in Eq. 3.28 since ψ𝒱hp\psi\in\mathcal{V}_{h}^{p} and Hh𝒱hp𝒱hpH_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}_{h}^{p}\subset\mathcal{V}_{h}^{p}. This gives

𝒦iHh(𝒥fh)td𝒁\displaystyle\int_{\mathcal{K}_{i}}H_{h}\frac{\partial(\mathcal{J}f_{h})}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$} =𝒦i𝒥fh𝒁˙hHh𝒁d𝒁𝒦iHh𝒥fh^𝒁˙hd𝒔.\displaystyle=\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\dot{\mbox{\boldmath${Z}$}}_{h}\boldsymbol{\cdot}\frac{\partial H_{h}}{\partial\mbox{\boldmath${Z}$}}\,\textnormal{d}\mbox{\boldmath${Z}$}-\oint_{\partial\mathcal{K}_{i}}H_{h}^{-}\widehat{\mathcal{J}f_{h}}\dot{\mbox{\boldmath${Z}$}}_{h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}. (3.57)

Now note that the volume term vanishes exactly because 𝒁h˙Hh/𝒁={Hh,Hh}=0\dot{\mbox{\boldmath${Z}$}_{h}}\boldsymbol{\cdot}\partial H_{h}/\partial\mbox{\boldmath${Z}$}=\{H_{h},H_{h}\}=0; physically, this is because the (discrete) flow 𝒁˙h\dot{\mbox{\boldmath${Z}$}}_{h} is along contours of constant (discrete) energy in phase space. Summing over all cells, the surface term also vanishes; the requirement that the Hamiltonian is continuous across cell boundaries, along with Lemma 1, means that the integrand only differs by a sign across cell boundaries, resulting in exact cancellations between the surface contributions from either side of each cell face. Thus we have

i𝒦iHh(𝒥fh)td𝒁=0.\sum_{i}\int_{\mathcal{K}_{i}}H_{h}\frac{\partial(\mathcal{J}f_{h})}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}=0. (3.58)

This gives energy conservation in systems in which the Hamiltonian is time-independent. In systems where the Hamiltonian is an evolving quantity, we must use the field equation governing the Hamiltonian to show that the remaining terms in Eq. 3.48 cancel. We will see an example of this in the next section, when we apply our energy-conserving DG scheme to the electromagnetic gyrokinetic system.

3.2.4 Example: the 2D incompressible Euler system

A well-known example of a Hamiltonian system is the two-dimensional incompressible Euler equations, expressed in the vorticity stream-function formulation (Christiansen & Zabusky, 1973; Olver, 1982). In this formulation, the (incompressible) fluid flow 𝒖=×(𝒆zϕ)\mbox{\boldmath${u}$}=\nabla\times(\mbox{\boldmath${e}$}_{z}\phi) is expressed in terms of the stream function ϕ\phi, and the vorticity is ϖ=𝒆z×𝒖\varpi=\mbox{\boldmath${e}$}_{z}\boldsymbol{\cdot}\nabla\times\mbox{\boldmath${u}$}, with 𝒆z\mbox{\boldmath${e}$}_{z} the direction perpendicular to the plane of motion. The evolution of the vorticity is then given by the Liouville equation,

ϖt+𝒖ϖ=0,\frac{\partial\varpi}{\partial t}+\mbox{\boldmath${u}$}\boldsymbol{\cdot}\nabla\varpi=0, (3.59)

or equivalently in terms of the canonical Poisson bracket {f,g}=xfygyfxg\{f,g\}=\partial_{x}f\partial_{y}g-\partial_{y}f\partial_{x}g as

ϖt+{ϖ,ϕ}=0.\frac{\partial\varpi}{\partial t}+\{\varpi,\phi\}=0. (3.60)

Comparing this equation to Eq. 3.22 above, we see that in the 2D incompressible Euler system the “phase space” is composed of the configuration space dimensions (x,y)(x,y), the vorticity ϖ\varpi is the “distribution function”, and the stream function ϕ\phi plays the role of the Hamiltonian. The stream function is determined by the Poisson equation,

2ϕ=ϖ,-\nabla_{\perp}^{2}\phi=\varpi, (3.61)

with =𝒆xx+𝒆yy\nabla_{\perp}=\mbox{\boldmath${e}$}_{x}\partial_{x}+\mbox{\boldmath${e}$}_{y}\partial_{y}.

From Eq. 3.25, the conserved energy in this system is

=ϕϖd𝒁f=ϕϖd𝒁12|ϕ|2d𝒁=12|ϕ|2d𝒁,\mathcal{E}=\int\phi\varpi\,\textnormal{d}\mbox{\boldmath${Z}$}-\mathcal{L}_{f}=\int\phi\varpi\,\textnormal{d}\mbox{\boldmath${Z}$}-\int\frac{1}{2}|\nabla_{\perp}\phi|^{2}\textnormal{d}\mbox{\boldmath${Z}$}=\int\frac{1}{2}|\nabla_{\perp}\phi|^{2}\,\textnormal{d}\mbox{\boldmath${Z}$}, (3.62)

where the field energy is

f=12|ϕ|2d𝒁.\mathcal{L}_{f}=\int\frac{1}{2}|\nabla_{\perp}\phi|^{2}\textnormal{d}\mbox{\boldmath${Z}$}. (3.63)

To prove that energy is indeed conserved, we can compute /t\partial\mathcal{E}/\partial t by first taking

ϕϖtd𝒁=ϕ𝒖ϖd𝒁=ϖ𝒖ϕd𝒁=0,\int\phi\frac{\partial\varpi}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}=-\int\phi\,\mbox{\boldmath${u}$}\boldsymbol{\cdot}\nabla\varpi\,\textnormal{d}\mbox{\boldmath${Z}$}=\int\varpi\,\mbox{\boldmath${u}$}\boldsymbol{\cdot}\nabla\phi\,\textnormal{d}\mbox{\boldmath${Z}$}=0, (3.64)

where 𝒖ϕ={ϕ,ϕ}=0\mbox{\boldmath${u}$}\boldsymbol{\cdot}\nabla\phi=\{\phi,\phi\}=0, and we have neglected boundary terms after integrating by parts. When the Hamiltonian ϕ\phi is time-dependent, we also have

ϖϕtd𝒁=2ϕϕtd𝒁=ϕtϕd𝒁=t12|ϕ|2d𝒁,\int\varpi\frac{\partial\phi}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}=-\int\nabla_{\perp}^{2}\phi\frac{\partial\phi}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}=\int\nabla_{\perp}\phi\boldsymbol{\cdot}\frac{\partial}{\partial t}\nabla_{\perp}\phi\,\textnormal{d}\mbox{\boldmath${Z}$}=\frac{\partial}{\partial t}\int\frac{1}{2}|\nabla_{\perp}\phi|^{2}\textnormal{d}\mbox{\boldmath${Z}$}, (3.65)

which exactly cancels the evolution of the field energy term,

ft=t12|ϕ|2d𝒁,\frac{\partial\mathcal{L}_{f}}{\partial t}=\frac{\partial}{\partial t}\int\frac{1}{2}|\nabla_{\perp}\phi|^{2}\textnormal{d}\mbox{\boldmath${Z}$}, (3.66)

so that we are left with energy conservation, /t=0\partial\mathcal{E}/\partial t=0.

Discontinuous Galerkin discretization (Liu-Shu scheme)

In the scheme of Liu & Shu (2000), the discrete energy is conserved exactly by the spatial scheme for 2D incompressible flow if the basis functions for the stream function ϕh\phi_{h} are in the continuous subset of the basis functions for the vorticity ϖh\varpi_{h}, irrespective of the numerical fluxes selected for the vorticity equation. In our notation, this means ϖh𝒱hp\varpi_{h}\in\mathcal{V}_{h}^{p} and ϕh𝒱hp\phi_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}^{p}_{h}. Identifying the vorticity as the “distribution function” and the stream function as the Hamiltonian, we can see that this is a special case of the general scheme prescribed in Section 3.2.2.

The DG weak form of the vorticity evolution equation in cell ii follows from Eq. 3.28, and is given by

𝒦iψϖhtd𝒁𝒦iϖh𝒁˙hψ𝒁d𝒁+𝒦iψϖh𝒁˙h^d𝒔=0,\int_{\mathcal{K}_{i}}\psi\frac{\partial\varpi_{h}}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}-\int_{\mathcal{K}_{i}}\varpi_{h}\dot{\mbox{\boldmath${Z}$}}_{h}\boldsymbol{\cdot}\frac{\partial\psi}{\partial\mbox{\boldmath${Z}$}}\,\textnormal{d}\mbox{\boldmath${Z}$}+\oint_{\partial\mathcal{K}_{i}}\psi^{-}\widehat{\varpi_{h}\dot{\mbox{\boldmath${Z}$}}_{h}}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}=0, (3.75)

with 𝒁˙h={𝒁,ϕh}\dot{\mbox{\boldmath${Z}$}}_{h}=\{\mbox{\boldmath${Z}$},\phi_{h}\}. In order to impose the continuity requirement on ϕh\phi_{h}, we can use the (continuous) finite-element method (FEM) to solve the Poisson equation. The discrete local weak form of the Poisson equation is obtained by multiplying Eq. 3.61 by a test function ξ𝒱hp\xi\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}^{p}_{h} and integrating (by parts) in each cell 𝒦i\mathcal{K}_{i},

𝒦iϕhξ(i)d𝒁𝒦iξ(i)ϕhd𝒔=𝒦iξ(i)ϖhd𝒁,\int_{\mathcal{K}_{i}}\nabla_{\perp}\phi_{h}\boldsymbol{\cdot}\nabla_{\perp}\xi^{(i)}\textnormal{d}\mbox{\boldmath${Z}$}-\oint_{\partial\mathcal{K}_{i}}\xi^{(i)}\nabla_{\perp}\phi_{h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}=\int_{\mathcal{K}_{i}}\xi^{(i)}\varpi_{h}\textnormal{d}\mbox{\boldmath${Z}$}, (3.84)

where ξ(i)\xi^{(i)} denotes the restriction of ξ\xi to cell ii. The global weak form is then obtained by summing Eq. 3.84 over all cells, which results in cancellation of the surface terms at cell interfaces and leaves only a global 𝒯\partial\mathcal{T} boundary term.

To verify that the discrete energy, h=ϕhϖhd𝒁12|ϕh|2d𝒁\mathcal{E}_{h}=\int\phi_{h}\varpi_{h}\textnormal{d}\mbox{\boldmath${Z}$}-\int\frac{1}{2}|\nabla_{\perp}\phi_{h}|^{2}\textnormal{d}\mbox{\boldmath${Z}$}, is conserved by this discretization scheme, we can first take ψ=ϕh\psi=\phi_{h} in Eq. 3.75 (since ψ𝒱hp\psi\in\mathcal{V}_{h}^{p} and ϕh𝒱hp𝒱hp\phi_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}_{h}^{p}\subset\mathcal{V}_{h}^{p}) and sum over all cells. This gives

i𝒦iϕhϖhtd𝒁=i𝒦iϖh𝒁˙hϕh𝒁d𝒁i𝒦iϕhϖh𝒁˙h^d𝒔=0,\sum_{i}\int_{\mathcal{K}_{i}}\phi_{h}\frac{\partial\varpi_{h}}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}=\sum_{i}\int_{\mathcal{K}_{i}}\varpi_{h}\dot{\mbox{\boldmath${Z}$}}_{h}\boldsymbol{\cdot}\frac{\partial\phi_{h}}{\partial\mbox{\boldmath${Z}$}}\,\textnormal{d}\mbox{\boldmath${Z}$}-\sum_{i}\oint_{\partial\mathcal{K}_{i}}\phi_{h}^{-}\widehat{\varpi_{h}\dot{\mbox{\boldmath${Z}$}}_{h}}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}=0, (3.93)

where as in Section 3.2.3, the volume term vanishes exactly because 𝒁h˙ϕh/𝒁={ϕh,ϕh}=0\dot{\mbox{\boldmath${Z}$}_{h}}\boldsymbol{\cdot}\partial\phi_{h}/\partial\mbox{\boldmath${Z}$}=\{\phi_{h},\phi_{h}\}=0, and the surface terms cancel at cell boundaries because the integrand only differs by a sign on either side due to continuity of ϕh\phi_{h}. Thus the evolution of the Hamiltonian part of the discrete energy, Hh=ϕhϖhd𝒁\mathcal{E}_{H\,h}=\int\phi_{h}\varpi_{h}\textnormal{d}\mbox{\boldmath${Z}$}, reduces to

Hht=tϕhϖhd𝒁=i𝒦iϖhϕhtd𝒁.\frac{\partial\mathcal{E}_{H\,h}}{\partial t}=\frac{\partial}{\partial t}\int\phi_{h}\varpi_{h}\textnormal{d}\mbox{\boldmath${Z}$}=\sum_{i}\int_{\mathcal{K}_{i}}\varpi_{h}\frac{\partial\phi_{h}}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}. (3.94)

This remaining term is canceled by the evolution of the field energy term, fh=12|ϕh|2d𝒁\mathcal{L}_{f\,h}=\int\frac{1}{2}|\nabla_{\perp}\phi_{h}|^{2}\textnormal{d}\mbox{\boldmath${Z}$}, which is given by

fht=i𝒦iϕhϕhtd𝒁=i𝒦iϖhϕhtd𝒁,\frac{\partial\mathcal{L}_{f\,h}}{\partial t}=\sum_{i}\int_{\mathcal{K}_{i}}\nabla_{\perp}\phi_{h}\boldsymbol{\cdot}\nabla_{\perp}\frac{\partial\phi_{h}}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}=\sum_{i}\int_{\mathcal{K}_{i}}\varpi_{h}\frac{\partial\phi_{h}}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}, (3.95)

where the second equality is obtained by taking ξ(i)=ϕh/t\xi^{(i)}=\partial\phi_{h}/\partial t in Eq. 3.84 and summing over cells. Thus, together we have

ht=Hhtfht=0,\frac{\partial\mathcal{E}_{h}}{\partial t}=\frac{\partial\mathcal{E}_{H\,h}}{\partial t}-\frac{\partial\mathcal{L}_{f\,h}}{\partial t}=0, (3.96)

and so energy is indeed conserved by the Liu-Shu scheme. Note that this property is independent of the choice of numerical fluxes in the vorticity equation.

3.3 Applying the scheme to electromagnetic gyrokinetics

For the electromagnetic gyrokinetic system, we again start by decomposing the global 5D phase-space domain Ω\Omega into a structured phase-space mesh 𝒯\mathcal{T} with cells 𝒦i𝒯,i=1,,N\mathcal{K}_{i}\in\mathcal{T},\ i=1,...,N. We then introduce a piecewise-polynomial approximation space for the Jacobian-weighted distribution function 𝒥f(𝑹,v,μ)\mathcal{J}f(\mbox{\boldmath${R}$},v_{\parallel},\mu),

𝒱hp={ψ:ψ|𝒦i𝑷p,𝒦i𝒯},\mathcal{V}_{h}^{p}=\{\psi:\psi|_{\mathcal{K}_{i}}\in\mbox{\boldmath${P}$}^{p},\forall\mathcal{K}_{i}\in\mathcal{T}\}, (3.97)

where 𝑷p\mbox{\boldmath${P}$}^{p} is some space of polynomials with maximum degree pp (by some measure). That is, ψ(𝒁)\psi(\mbox{\boldmath${Z}$}) are polynomial functions of 𝒁{Z} in each cell, and 𝑷p\mbox{\boldmath${P}$}^{p} is the space of the linear combination of some set of multi-variate polynomials. In the remainder of this work, we choose 𝑷p\mbox{\boldmath${P}$}^{p} to be an orthonormalized serendipity polynomial element space (Arnold & Awanou, 2011). The serendipity basis set has the advantage of using fewer basis functions while giving the same formal convergence order (although it is less accurate) as the Lagrange tensor basis, although note that for p=1p=1 the serendipity basis is equivalent to the Lagrange tensor basis.

We can then obtain the discrete weak form of the gyrokinetic equation by multiplying Eq. 2.119 by any test function ψ𝒱hp\psi\in\mathcal{V}^{p}_{h} and integrating (by parts) in each cell, giving

𝒦i\displaystyle\int_{\mathcal{K}_{i}} ψ(𝒥fh)td3𝑹d3𝒗\displaystyle\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
𝒦i𝒥fh𝑹˙hψd3𝑹d3𝒗𝒦i𝒥fh(v˙hHqmAht)ψvd3𝑹d3𝒗\displaystyle\quad-\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\nabla\psi\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}-\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\left(\dot{v}^{H}_{\parallel h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\right)\frac{\partial\psi}{\partial v_{\parallel}}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
+𝒦iψ𝒥fh^𝑹˙hd𝒔Rd3𝒗+𝒦iψ𝒥fh^(v˙hHqmAht)d3𝑹dsv\displaystyle\quad+\oint_{\partial\mathcal{K}_{i}}\psi^{-}\widehat{\mathcal{J}f_{h}}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}+\oint_{\partial\mathcal{K}_{i}}\psi^{-}\widehat{\mathcal{J}f_{h}}\left(\dot{v}^{H}_{\parallel h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}s_{v}
=𝒦iψ(𝒥C[fh]+𝒥Sh)d3𝑹d3𝒗.\displaystyle\quad=\int_{\mathcal{K}_{i}}\psi\left(\mathcal{J}C[f_{h}]+\mathcal{J}S_{h}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (3.98)

The discrete phase-space characteristics are defined via the discrete version of the gyrokinetic Poisson bracket, Eq. 2.113, as

𝑹˙h={𝑹,Hh}h=𝑩hmBhHhv+𝐛^qBh×Hh,\displaystyle\dot{\mbox{\boldmath${R}$}}_{h}=\{\mbox{\boldmath${R}$},H_{h}\}_{h}=\frac{\mbox{\boldmath${B}$}^{*}_{h}}{mB_{\parallel h}^{*}}\frac{\partial H_{h}}{\partial v_{\parallel}}+\frac{\mathbf{\hat{b}}}{qB_{\parallel h}^{*}}\times\nabla H_{h}, (3.99)
v˙h=v˙hHqmAht={v,Hh}hqmAht=𝑩hmBhHhqmAht,\displaystyle\dot{v}_{\parallel h}=\dot{v}^{H}_{\parallel h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}=\{v_{\parallel},H_{h}\}_{h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}=-\frac{\mbox{\boldmath${B}$}^{*}_{h}}{mB_{\parallel h}^{*}}{\boldsymbol{\cdot}}\nabla H_{h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}, (3.100)

with 𝑩h=𝑩0h+(mv/q)×𝐛^+×(Ah𝐛^)\mbox{\boldmath${B}$}^{*}_{h}=\mbox{\boldmath${B}$}_{0h}+(mv_{\parallel}/q)\nabla\times\mathbf{\hat{b}}+\nabla\times(A_{\parallel h}\mathbf{\hat{b}}), and Bh=𝐛^𝑩hB0hB^{*}_{\parallel h}=\mathbf{\hat{b}}\boldsymbol{\cdot}\mbox{\boldmath${B}$}^{*}_{h}\approx B_{0h}. Consistent with the energy-conserving DG algorithm formulated in Section 3.2, we will require the discrete Hamiltonian HhH_{h} to be continuous across cell interfaces. We do this by introducing a subset of 𝒱hp\mathcal{V}^{p}_{h} where the piecewise polynomials are continuous across cell interfaces, denoted by 𝒱hp\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}^{p}_{h}, and requiring Hh𝒱hpH_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}^{p}_{h}. From Lemma 1, this ensures that the discrete phase-space characteristics, 𝑹˙h={𝑹,Hh}h\dot{\mbox{\boldmath${R}$}}_{h}=\{\mbox{\boldmath${R}$},H_{h}\}_{h} and v˙hH(qs/ms)Ah/t={v,Hh}h(qs/ms)Ah/t\dot{v}^{H}_{\parallel h}-({q_{s}}/{m_{s}})\partial{A_{\parallel h}}/\partial{t}=\{v_{\parallel},H_{h}\}_{h}-({q_{s}}/{m_{s}})\partial{A_{\parallel h}}/\partial{t}, are also continuous across cell interfaces in the direction of flow.222In a general non-orthogonal field-aligned geometry this is not necessarily true. This is because 𝑩hz\mbox{\boldmath${B}$}^{*}_{h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla z contains AhA_{\parallel_{h}}, which can be discontinuous in the zz direction, making the Poisson tensor itself discontinuous in this direction. This makes the characteristic speed 𝑹˙hz\dot{\mbox{\boldmath${R}$}}_{h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla z discontinuous across zz cell interfaces. We will discuss this issue in Chapter 5.

Solving Eq. 3.98 for all test functions ψ𝒱hp\psi\in\mathcal{V}_{h}^{p} in all cells 𝒦i𝒯\mathcal{K}_{i}\in\mathcal{T} yields the discretized Jacobian-weighted distribution function 𝒥fh𝒱hp\mathcal{J}f_{h}\in\mathcal{V}^{p}_{h}. In the surface terms, d𝒔R\textnormal{d}\mbox{\boldmath${s}$}_{R} is the differential element on a configuration-space surface (pointing outward normal to the surface), and dsv=2πdμ𝒏(𝒁/v)\textnormal{d}s_{v}=2\pi\,\textnormal{d}\mu\,\mbox{\boldmath${n}$}\mbox{\boldmath${\boldsymbol{\cdot}}$}(\partial{\mbox{\boldmath${Z}$}}/\partial{v_{\parallel}}) is the differential element on a vv_{\parallel} surface. We choose to use standard upwind fluxes in our scheme, which depend on the local value of the phase-space characteristic flow normal to the surface evaluated at each Gaussian quadrature point on the surface. Given the phase-space flow 𝒁˙h\dot{\mbox{\boldmath${Z}$}}_{h}, the upwind flux can be expressed as

fh^=12(fh++fh)12sgn(𝒏𝒁˙h)(fh+fh),\widehat{f_{h}}=\frac{1}{2}\left(f_{h}^{+}+f_{h}^{-}\right)-\frac{1}{2}\text{sgn}\left(\mbox{\boldmath${n}$}{\boldsymbol{\cdot}}\dot{\mbox{\boldmath${Z}$}}_{h}\right)\left(f_{h}^{+}-f_{h}^{-}\right), (3.117)

where 𝒏=d𝒔/|d𝒔|\mbox{\boldmath${n}$}=\textnormal{d}\mbox{\boldmath${s}$}/|\textnormal{d}\mbox{\boldmath${s}$}| is the unit normal pointing out of the 𝒦i\partial\mathcal{K}_{i} surface.

We must also discretize the field equations. We introduce the restriction of the phase-space mesh to configuration space, 𝒯R\mathcal{T}^{R}, and we denote the configuration-space cells by 𝒦iR𝒯R\mathcal{K}_{i}^{R}\in\mathcal{T}^{R} for i=1,,NRi=1,...,N_{R}, where NRN_{R} is the number of configuration-space cells. We also restrict 𝒱hp\mathcal{V}_{h}^{p} to configuration space as

𝒳hp=𝒱hp𝒯R.\mathcal{X}_{h}^{p}=\mathcal{V}_{h}^{p}\setminus\mathcal{T}^{R}. (3.118)

Further, we introduce the subset of polynomials that are piecewise continuous across configuration-space cell interfaces 𝒳hp𝒳hp\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}_{h}^{p}\subset\mathcal{X}_{h}^{p}, along with an additional subset  𝒳hp𝒳hp\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}_{h}^{p}\subset\mathcal{X}_{h}^{p} where continuity is required in the directions perpendicular to the magnetic field, but not in the direction parallel to the field. Assuming a field-aligned coordinate system (e.g. Beer et al., 1995), we will take the perpendicular directions to be xx and yy, and the parallel direction to be zz.

Since we require HhH_{h} to be continuous across all cell interfaces, this means that we require Φh\Phi_{h} to be continuous, i.e. Φh𝒳hp\Phi_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}_{h}^{p}. Thus to solve the GK Poisson equation, Eq. 2.120, we use the (continuous) finite-element method (FEM). While one could ensure Φh\Phi_{h} is continuous in all directions by using a three-dimensional FEM solve, we instead use a two-dimensional FEM solve in the xx and yy directions, followed by a one-dimensional smoothing operation in the zz direction. That is, we first solve for  Φh 𝒳hp\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}^{p}_{h} using a two-dimensional FEM solve, and then we use a smoothing/projection operation to ensure continuity in the zz direction. We will denote this operation as Φh=𝒫z[ Φh]\Phi_{h}=\mathcal{P}_{z}[\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}_{h}] and define it below. We can make this splitting because \nabla_{\perp} only produces coupling in the xx and yy (perpendicular) directions.

For the two-dimensional solve, we solve for  Φh 𝒳hp\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}^{p}_{h} by multiplying Eq. 2.120 by a test function ξ 𝒳hp\xi\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}^{p}_{h} and integrating (by parts) in each configuration-space cell 𝒦iR\mathcal{K}^{R}_{i} to obtain the discrete local weak form

𝒦iRϵh Φhξ(i)d3𝑹𝒦iRξ(i)ϵh Φhd𝒔R=𝒦iRξ(i)𝒫z[σgh]d3𝑹,\int_{\mathcal{K}^{R}_{i}}\epsilon_{\perp h}\nabla_{\perp}\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\xi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\xi^{(i)}\ \epsilon_{\perp h}\nabla_{\perp}\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}=\int_{\mathcal{K}^{R}_{i}}\xi^{(i)}\ \mathcal{P}^{*}_{z}[\sigma_{g\,h}]\,\textnormal{d}^{3}\mbox{\boldmath${R}$}, (3.207)

where ξ(i)\xi^{(i)} denotes the restriction of ξ\xi to cell ii, ϵh=smsn0s/B0h2\epsilon_{\perp h}=\sum_{s}m_{s}n_{0s}/B_{0h}^{2}, and

σgh=sqs𝒯v𝒥fshd3𝒗,\sigma_{g\,h}=\sum_{s}q_{s}\int_{\mathcal{T}^{v}}\mathcal{J}f_{s\,h}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}, (3.208)

with 𝒯v\mathcal{T}^{v} the restriction of 𝒯\mathcal{T} to velocity space. The global weak form is then obtained by summing Eq. 3.207 over cells in xx and yy (but not in zz), which results in cancellation of the surface terms at cell interfaces and leaves only a global 𝒯R\partial\mathcal{T}^{R} boundary term. Note that in order to maintain energetic consistency (as we will see below), the introduction of 𝒫z\mathcal{P}_{z} necessitates the modification of the right-hand side of Eq. 3.207 with 𝒫z\mathcal{P}^{*}_{z}, the adjoint of 𝒫z\mathcal{P}_{z}, defined as

𝒯Rf𝒫z[g]d3𝑹=𝒯R𝒫z[f]gd3𝑹.\int_{\mathcal{T}^{R}}f\mathcal{P}_{z}[g]\,\textnormal{d}^{3}\mbox{\boldmath${R}$}=\int_{\mathcal{T}^{R}}\mathcal{P}^{*}_{z}[f]g\,\textnormal{d}^{3}\mbox{\boldmath${R}$}. (3.209)

For the smoothing operation Φh=𝒫z[ Φh]\Phi_{h}=\mathcal{P}_{z}[\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}_{h}], we use a one-dimensional FEM solve in the zz direction. This can be written as the solution Φh\Phi_{h} of the global (in zz) weak equality

𝒯jz𝑑𝑹χΦhd3𝑹=𝒯jz𝑑𝑹χ Φhd3𝑹,\int_{\mathcal{T}^{z}_{j}}d\mbox{\boldmath${R}$}\ \chi\ \Phi_{h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}=\int_{\mathcal{T}^{z}_{j}}d\mbox{\boldmath${R}$}\ \chi\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}, (3.226)

where χ𝒳^hp𝒳hp\chi\in\widehat{\mathcal{X}}^{p}_{h}\subset\mathcal{X}^{p}_{h}, with 𝒳^hp\widehat{\mathcal{X}}^{p}_{h} a subset of the configuration-space basis where continuity is required only in the zz direction. Here, 𝒯jz\mathcal{T}^{z}_{j} denotes a restriction of the domain that is global in zz but cell-wise local in xx and yy. We remark that using an FEM solve for this operation makes 𝒫z\mathcal{P}_{z} self-adjoint, so that 𝒫z=𝒫z\mathcal{P}^{*}_{z}=\mathcal{P}_{z}. Note, however, that one could instead use a different, local smoothing operation that is not self-adjoint, so we will keep the distinction between 𝒫z\mathcal{P}_{z} and 𝒫z\mathcal{P}_{z}^{*}. Also note that 𝒫z\mathcal{P}_{z} is a projection operator, in that 𝒫z[𝒫z[ Φh]]=𝒫z[ Φh]\mathcal{P}_{z}[\mathcal{P}_{z}[\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}_{h}]]=\mathcal{P}_{z}[\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}_{h}].

The continuous discrete Hamiltonian Hh𝒱hpH_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}_{h}^{p} is then given by

Hh=12mvh2+μB0h+q𝒫z[ Φh],H_{h}=\frac{1}{2}m{v_{\parallel\,h}^{2}}+\mu B_{0h}+q\mathcal{P}_{z}[\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}], (3.259)

where vh2{v_{\parallel\,h}^{2}} is the projection of v2v_{\parallel}^{2} onto 𝒱hp\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}^{p}_{h}. Note that this is only necessary when v2v_{\parallel}^{2} is not in the basis (i.e. when pv<2p_{v}<2, where pvp_{v} is the maximum degree of the vv_{\parallel} monomials in the basis set), resulting in a continuous piecewise-linear approximation to v2v_{\parallel}^{2}.

Since AhA_{\parallel h} does not appear in the Hamiltonian in the symplectic formulation of EMGK, we are free to allow discontinuity in AhA_{\parallel h}. Thus for the parallel Ampère equation we will take Ah 𝒳hpA_{\parallel h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}^{p}_{h} so that AhA_{\parallel h} is continuous in xx and yy but discontinuous in zz. Multiplying Eq. 2.122 by a test function φ 𝒳hp\varphi\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}^{p}_{h} and integrating, we can obtain the discrete weak form of this equation. The local weak form in cell ii is

𝒦iRAhφ(i)d3𝑹𝒦iRφ(i)Ahd𝒔R=μ0𝒦iRφ(i)Jhd3𝑹,\int_{\mathcal{K}^{R}_{i}}\nabla_{\perp}A_{\parallel h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\varphi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\varphi^{(i)}\nabla_{\perp}A_{\parallel h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}=\mu_{0}\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\ J_{\parallel h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}, (3.284)

where again the surface terms will cancel on summing over cells except at the global 𝒯R\partial\mathcal{T}^{R} boundary, and

Jh=sqsms𝒯vHshv𝒥fshd3𝒗.J_{\parallel h}=\sum_{s}\frac{q_{s}}{m_{s}}\int_{\mathcal{T}^{v}}\frac{\partial H_{s\,h}}{\partial v_{\parallel}}\mathcal{J}f_{s\,h}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (3.285)

Here, note that we have replaced the vv_{\parallel} in the JJ_{\parallel} definition from Eq. 2.122 with (1/m)Hh/v(1/m)\partial H_{h}/\partial v_{\parallel}; this will be required for energy conservation in the pv=1p_{v}=1 case, since Hh/vmv\partial H_{h}/\partial v_{\parallel}\neq mv_{\parallel} when v2v_{\parallel}^{2} is not in the basis. Instead, for pv=1p_{v}=1, Hh/v=mv¯\partial H_{h}/\partial v_{\parallel}=m\bar{v}_{\parallel}, the piecewise-constant projection of mvmv_{\parallel}. Looking back at the variational derivation of Ampère’s law in Eq. 2.94, we see that indeed using (1/m)Hh/v(1/m)\partial H_{h}/\partial v_{\parallel} is energetically consistent. As before, we solve Eq. 3.284 using a two-dimensional FEM solve in the xx and yy directions. Note, however, that we do not require the smoothing operation in zz here because AhA_{\parallel h} is allowed to be discontinuous in the zz direction.

The discrete weak form of Ohm’s law, Eq. 2.125, can be obtained by taking the time derivative of the discrete Ampère’s law, Eq. 3.284. The details of the required manipulations are left to Appendix 3.A. In the end, the distinction between pv=1p_{v}=1 and pv>1p_{v}>1 in the definition of JhJ_{\parallel h} leads to two different cases: in the pv=1p_{v}=1 case surface terms from the gyrokinetic update appear in the integrals, while volume terms vanish because v¯/v=0\partial\bar{v}_{\parallel}/\partial v_{\parallel}=0; in the pv>1p_{v}>1 case we have the opposite, with surface terms cancelling exactly at cell interfaces and volume terms remaining. The local weak form becomes

𝒦iRAhtφ(i)d3𝑹𝒦iRφ(i)Ahtd𝒔R\displaystyle\int_{\mathcal{K}^{R}_{i}}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\varphi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\varphi^{(i)}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}
𝒦iRφ(i)Aht[s,jμ0qs2ms𝒦jvv¯𝒥fsh^dsv]d3𝑹\displaystyle\quad-\int_{\mathcal{K}_{i}^{R}}\varphi^{(i)}\frac{\partial A_{\parallel h}}{\partial t}\left[\sum_{s,j}\frac{\mu_{0}q_{s}^{2}}{m_{s}}\oint_{\partial\mathcal{K}^{v}_{j}}\bar{v}_{\parallel}^{-}\widehat{\mathcal{J}f_{s\,h}}\,\textnormal{d}s_{v}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}
=μ0sqs𝒦iRφ(i)[𝒯vv¯(𝒥fsh)td3𝒗j𝒦jvv¯v˙hH𝒥fsh^dsv]d3𝑹,(pv=1)\displaystyle=\mu_{0}\sum_{s}q_{s}\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\Bigg{[}\int_{\mathcal{T}^{v}}\bar{v}_{\parallel}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}^{\star}\textnormal{d}^{3}\mbox{\boldmath${v}$}-\sum_{j}\oint_{\partial\mathcal{K}_{j}^{v}}\bar{v}_{\parallel}^{-}{\dot{v}^{H}_{\parallel h}}\widehat{\mathcal{J}f_{s\,h}}\,\textnormal{d}s_{v}\Bigg{]}\textnormal{d}^{3}\mbox{\boldmath${R}$},\quad\ (p_{v}=1) (3.286)
𝒦iRAhtφ(i)d3𝑹𝒦iRφ(i)Ahtd𝒔R\displaystyle\int_{\mathcal{K}^{R}_{i}}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\varphi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\varphi^{(i)}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}
+𝒦iRφ(i)Aht[sμ0qs2ms𝒯v𝒥fshd3𝒗]d3𝑹\displaystyle\quad+\int_{\mathcal{K}_{i}^{R}}\varphi^{(i)}\frac{\partial A_{\parallel h}}{\partial t}\left[\sum_{s}\frac{\mu_{0}q_{s}^{2}}{m_{s}}\!\int_{\mathcal{T}^{v}}\mathcal{J}f_{s\,h}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}
=μ0sqs𝒦iRφ(i)[𝒯vv(𝒥fsh)td3𝒗]d3𝑹,(pv>1)\displaystyle=\mu_{0}\sum_{s}q_{s}\!\!\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\left[\int_{\mathcal{T}^{v}}v_{\parallel}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}^{\star}\textnormal{d}^{3}\mbox{\boldmath${v}$}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$},\qquad\qquad(p_{v}>1) (3.287)

where Ah/t 𝒳hp\partial A_{\parallel h}/\partial t\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}^{p}_{h}, and

𝒦iψ(𝒥fh)td3𝑹d3𝒗=𝒦i𝒥fh𝑹˙hψd3𝑹d3𝒗+𝒦i𝒥fhv˙hHψvd3𝑹d3𝒗\displaystyle\int_{\mathcal{K}_{i}}\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}^{\star}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\nabla\psi\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}+\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\dot{v}^{H}_{\parallel h}\frac{\partial\psi}{\partial v_{\parallel}}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
𝒦iψ𝒥fh^𝑹˙hd𝒔Rd3𝒗+𝒦iψ(𝒥C[fh]+𝒥Sh)d3𝑹d3𝒗\displaystyle\quad-\oint_{\partial\mathcal{K}_{i}}\psi^{-}\widehat{\mathcal{J}f_{h}}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}+\int_{\mathcal{K}_{i}}\psi\left(\mathcal{J}C[f_{h}]+\mathcal{J}S_{h}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$} (3.296)

so that the gyrokinetic equation can be written as

𝒦iψ(𝒥fh)td3𝑹d3𝒗=𝒦iψ(𝒥fh)td3𝑹d3𝒗\displaystyle\int_{\mathcal{K}_{i}}\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=\int_{\mathcal{K}_{i}}\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}^{\star}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
𝒦iψ𝒥fh^(v˙hHqmAht)d3𝑹dsv𝒦i𝒥fhqmAhtψvd3𝑹d3𝒗.\displaystyle\quad-\oint_{\partial\mathcal{K}_{i}}\psi^{-}\widehat{\mathcal{J}f_{h}}\left(\dot{v}^{H}_{\parallel h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}s_{v}-\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\frac{\partial\psi}{\partial v_{\parallel}}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (3.297)

Note that some special attention is required to ensure that upwinding of the numerical fluxes is handled consistently in Eqs. (3.286) and (3.297) in the pv=1p_{v}=1 case. The upwind flow for the vv_{\parallel} surface terms is v˙hH(q/m)Ah/t\dot{v}^{H}_{\parallel h}-({q}/{m})\partial{A_{\parallel h}}/\partial{t}; this is somewhat problematic because we cannot readily solve for Ah/t\partial A_{\parallel h}/\partial t from Eq. 3.286 without first knowing the upwind direction, which depends on Ah/t\partial A_{\parallel h}/\partial t. Thus for pv=1p_{v}=1 only, we use an approximate Ah/t~\widetilde{\partial A_{\parallel h}/\partial t}, calculated using Eq. 3.287 (which contains no surface term contributions), to compute the upwind direction for the vv_{\parallel} surface terms in Eqs. (3.286) and (3.297). One could extend this algorithm by iterating with a new estimate of the upwind direction based on the previous estimate of Ah/t\partial A_{\parallel\,h}/\partial t, but we leave that for future work. The present algorithm seems to work well for the cases tested so far, and we expect that Ah/t~\widetilde{\partial A_{\parallel h}/\partial t} results in the correct upwind direction most of the time.

In our modal DG scheme, integrals in the above weak forms are computed analytically using a quadrature-free scheme that results in exact integrations (of the discrete integrands). This means there are no aliasing errors, and that integration by parts operations that led to these integrals are treated exactly, for the specified discrete representation of fhf_{h} and other factors in the integrand. This is important for ensuring the conservation properties of the scheme, since the conservation laws in the EMGK system are indirect, involving integrals of the gyrokinetic equation (Hakim et al., 2019). The fact that integrations are exact also has important implications for the cancellation problem. Since integrals in the discrete Ohm’s law are computed exactly, the discretization errors (which are solely embedded in the discrete integrands) cancel exactly, avoiding the cancellation problem. For more details about the modal scheme, the analytical integrations and the avoidance of the cancellation problem, we have included in Section 3.5.1 a derivation of a semi-discrete Alfvén wave dispersion relation that results from our scheme.

3.3.1 Discrete conservation properties

Now we would like to show that the discrete system (in the continuous-time limit) preserves various conservation laws of the continuous system. As with the continuous system, we will consider the conservation properties in the absence of collisions, sources and sinks, and we will assume that the boundary conditions are either periodic or that the distribution function vanishes at the boundary.

Proposition 1.

The discrete system conserves total number of particles (the L1L_{1} norm).

Proof.

Taking ψ=1\psi=1 in the discrete weak form of the gyrokinetic equation, Eq. 3.98, and summing over all cells, we have

i\displaystyle\sum_{i} t𝒦i𝒥fhd3𝑹d3𝒗+i𝒦i𝒥fh^𝑹˙hd𝒔Rd3𝒗\displaystyle\frac{\partial}{\partial t}\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}+\sum_{i}\oint_{\partial\mathcal{K}_{i}}\widehat{\mathcal{J}f_{h}}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
+i𝒦i𝒥fh^(v˙hHqmAht)d3𝑹dsv=0\displaystyle\quad+\sum_{i}\oint_{\partial\mathcal{K}_{i}}\widehat{\mathcal{J}f_{h}}\left(\dot{v}^{H}_{\parallel h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}s_{v}=0
t𝒯𝒥fhd3𝑹d3𝒗=0,\displaystyle\qquad\Rightarrow\quad\frac{\partial}{\partial t}\int_{\mathcal{T}}\mathcal{J}f_{h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=0, (3.298)

where the surface terms cancel exactly at cell interfaces because the integrands (both the phase-space characteristics and the numerical fluxes) are continuous across the interfaces. ∎

Proposition 2.

The discrete system conserves a discrete total energy, h=HhEh+Bh\mathcal{E}_{h}=\mathcal{E}_{H\,h}-\mathcal{E}_{E\,h}+\mathcal{E}_{B\,h}, where

Hh=s𝒯𝒥fshHshd3𝑹d3𝒗,\displaystyle\mathcal{E}_{H\,h}=\sum_{s}\int_{\mathcal{T}}\mathcal{J}f_{s\,h}H_{s\,h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}, (3.299)
Eh=𝒯ϵh2| Φh|2d3𝑹,\displaystyle\mathcal{E}_{E\,h}=\int_{\mathcal{T}}\frac{\epsilon_{\perp h}}{2}|\nabla_{\perp}\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}|^{2}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}, (3.308)

and

Bh=𝒯12μ0|Ah|2d3𝑹.\displaystyle\mathcal{E}_{B\,h}=\int_{\mathcal{T}}\frac{1}{2\mu_{0}}|\nabla_{\perp}A_{\parallel h}|^{2}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}. (3.309)
Proof.

We start by calculating

Hht=s,i𝒦i(Hsh(𝒥fsh)t+𝒥fshHsht)d3𝑹d3𝒗.\frac{\partial\mathcal{E}_{H\,h}}{\partial t}=\sum_{s,i}\int_{\mathcal{K}_{i}}\left(H_{s\,h}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}+\mathcal{J}f_{s\,h}\frac{\partial H_{s\,h}}{\partial t}\right)\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (3.310)

The first term can be calculated by taking ψ=Hh\psi=H_{h} in Eq. 3.98 and summing over cells and species, since ψ𝒱hp\psi\in\mathcal{V}^{p}_{h} and Hh𝒱hp𝒱hpH_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\displaystyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\textstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptstyle\mathcal{V}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\leaders\hrule\hfill\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{V}$\cr} }}}_{h}^{p}\subset\mathcal{V}_{h}^{p}:

s,i\displaystyle\sum_{s,i} 𝒦iHsh(𝒥fsh)td3𝑹d3𝒗s,i𝒦i𝒥fsh(𝑹˙hHsh+v˙hHHshv)d3𝑹d3𝒗\displaystyle\int_{\mathcal{K}_{i}}H_{s\,h}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}-\sum_{s,i}\int_{\mathcal{K}_{i}}\mathcal{J}f_{s\,h}\left(\dot{\mbox{\boldmath${R}$}}_{h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla H_{s\,h}+\dot{v}^{H}_{\parallel h}\frac{\partial H_{s\,h}}{\partial v_{\parallel}}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
+s,i𝒦i𝒥fshqsmsAhtHshvd3𝑹d3𝒗+s,i𝒦iHsh𝒥fsh^𝑹˙hd𝒔Rd3𝒗\displaystyle+\sum_{s,i}\int_{\mathcal{K}_{i}}\mathcal{J}f_{s\,h}\frac{q_{s}}{m_{s}}\frac{\partial A_{\parallel h}}{\partial t}\frac{\partial H_{s\,h}}{\partial v_{\parallel}}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}+\sum_{s,i}\oint_{\partial\mathcal{K}_{i}}H_{s\,h}^{-}\widehat{\mathcal{J}f_{s\,h}}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
+s,i𝒦iHsh𝒥fsh^(v˙hHqmAht)d3𝑹dsv=0.\displaystyle\quad+\sum_{s,i}\oint_{\partial\mathcal{K}_{i}}H_{s\,h}^{-}\widehat{\mathcal{J}f_{s\,h}}\left(\dot{v}^{H}_{\parallel h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}s_{v}=0. (3.319)

Here, we see why we must require HhH_{h} to be continuous; we want the surface terms to vanish, which means the integrands must be continuous across cell interfaces so that the contributions from either side of the interface cancel exactly when we sum over cells. The numerical flux 𝒥fh^\widehat{\mathcal{J}f_{h}} is by definition continuous across the interface, and we have already noted above that the phase-space characteristics 𝑹˙h\dot{\mbox{\boldmath${R}$}}_{h} and v˙hH(q/m)Ah/t\dot{v}^{H}_{\parallel h}-({q}/{m})\partial{A_{\parallel h}}/\partial{t} are also continuous across cell interfaces. This leaves the Hamiltonian, which we require to be continuous so that the surface terms do indeed vanish. Further, the first volume term vanishes exactly because 𝑹˙hHh+v˙hHHh/v={Hh,Hh}h=0\dot{\mbox{\boldmath${R}$}}_{h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla H_{h}+\dot{v}^{H}_{\parallel h}\partial H_{h}/\partial v_{\parallel}=\{H_{h},H_{h}\}_{h}=0 by definition of the Poisson bracket. However, since the symplectic formulation of EMGK is derived via a time-dependent coordinate transformation (which we did not consider in Section 3.2.1), we still have a leftover term involving Ah/t\partial A_{\parallel h}/\partial t, so that we have

s,i𝒦iHsh(𝒥fsh)td3𝑹d3𝒗\displaystyle\sum_{s,i}\int_{\mathcal{K}_{i}}H_{s\,h}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$} =s,i𝒦i𝒥fshqsmsAhtHshvd3𝑹d3𝒗\displaystyle=-\sum_{s,i}\int_{\mathcal{K}_{i}}\mathcal{J}f_{s\,h}\frac{q_{s}}{m_{s}}\frac{\partial A_{\parallel h}}{\partial t}\frac{\partial H_{s\,h}}{\partial v_{\parallel}}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
=𝒯RAhtJhd3𝑹.\displaystyle=-\int_{\mathcal{T}^{R}}\frac{\partial A_{\parallel h}}{\partial t}J_{\parallel h}\,\,\textnormal{d}^{3}\mbox{\boldmath${R}$}. (3.320)

Here, we see why we have defined JhJ_{\parallel h} using the derivative of HhH_{h} instead of vv_{\parallel}, as noted after Eq. 3.285. For the second term in Eq. 3.310, we now take into account time dependence in the Hamiltonian, which gives

s,i𝒦i𝒥fshHshtd3𝑹d3𝒗\displaystyle\sum_{s,i}\int_{\mathcal{K}_{i}}\mathcal{J}f_{s\,h}\frac{\partial H_{s\,h}}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$} =s,i𝒦i𝒥fshqs𝒫z[ Φht]d3𝑹d3𝒗\displaystyle=\sum_{s,i}\int_{\mathcal{K}_{i}}\mathcal{J}f_{s\,h}q_{s}\mathcal{P}_{z}[\frac{\partial\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}}{\partial t}]\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$} (3.329)
=𝒯Rσgh𝒫z[ Φht]d3𝑹.\displaystyle=\int_{\mathcal{T}^{R}}\sigma_{g\,h}\mathcal{P}_{z}[\frac{\partial\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}}{\partial t}]\,\textnormal{d}^{3}\mbox{\boldmath${R}$}. (3.338)

Thus we have

Hht=𝒯RAhtJhd3𝑹+𝒯Rσgh𝒫z[ Φht]d3𝑹.\frac{\partial\mathcal{E}_{H\,h}}{\partial t}=-\int_{\mathcal{T}^{R}}\frac{\partial A_{\parallel h}}{\partial t}J_{\parallel h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}+\int_{\mathcal{T}^{R}}\sigma_{g\,h}\mathcal{P}_{z}[\frac{\partial\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}}{\partial t}]\,\textnormal{d}^{3}\mbox{\boldmath${R}$}. (3.347)

Next, we calculate

Eht\displaystyle\frac{\partial\mathcal{E}_{E\,h}}{\partial t} =i𝒦iRϵh Φh Φhtd3𝑹=𝒯R𝒫z[σgh] Φhtd3𝑹\displaystyle=\sum_{i}\int_{\mathcal{K}^{R}_{i}}\epsilon_{\perp h}\nabla_{\perp}\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\frac{\partial\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}=\int_{\mathcal{T}^{R}}\mathcal{P}^{*}_{z}[\sigma_{g\,h}]\frac{\partial\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${R}$} (3.372)
=𝒯Rσgh𝒫z[ Φht]d3𝑹,\displaystyle=\int_{\mathcal{T}^{R}}\sigma_{g\,h}\mathcal{P}_{z}[\frac{\partial\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}}{\partial t}]\,\textnormal{d}^{3}\mbox{\boldmath${R}$}, (3.381)

where we have used ξ(i)= Φh/t\xi^{(i)}=\partial\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}/\partial t in Eq. 3.207 to make the second equality, noting that the surface term vanishes upon summing over cells because  Φh 𝒳hp\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}_{h}\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}^{p}_{h} is continuous in the perpendicular directions. Here, we see why we modified the right-hand side of Eq. 3.207 with 𝒫z\mathcal{P}_{z}^{*}, so that the resulting term in Eq. 3.381 matches the one in Eq. 3.338.

Finally, we calculate

Bht\displaystyle\frac{\partial\mathcal{E}_{B\,h}}{\partial t} =i𝒦iR1μ0AhAhtd3𝑹=𝒯RAhtJhd3𝑹,\displaystyle=\sum_{i}\int_{\mathcal{K}^{R}_{i}}\frac{1}{\mu_{0}}\nabla_{\perp}A_{\parallel h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}=\int_{\mathcal{T}^{R}}\frac{\partial A_{\parallel h}}{\partial t}J_{\parallel h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}, (3.406)

where we have used φ(i)=(1/μ0)Ah/t\varphi^{(i)}=({1}/{\mu_{0}})\partial{A_{\parallel h}}/\partial{t} in Eq. 3.284 to make the second equality, again noting that the surface term vanishes upon summing over cells because Ah/t 𝒳hp\partial A_{\parallel h}/\partial t\in\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\mathcal{X}$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\mathcal{X}$\cr} }}}^{p}_{h} is continuous in the perpendicular directions.

We now have conservation of discrete total energy:

ht=HhtEht+Bht=0.\frac{\partial\mathcal{E}_{h}}{\partial t}=\frac{\partial\mathcal{E}_{H\,h}}{\partial t}-\frac{\partial\mathcal{E}_{E\,h}}{\partial t}+\frac{\partial\mathcal{E}_{B\,h}}{\partial t}=0. (3.415)

We note that this proof did not rely on the particular choice of numerical flux function. ∎

3.3.2 Time-discretization scheme

So far we have considered only the discretization of the phase space for the system, and we have considered the conservation properties of the scheme in the continuous-time limit. Indeed, in the discrete-time system the conservation properties are no longer exact due to truncation error in the non-reversible time-stepping methods that we consider. However the errors will be independent of the phase-space discretization, and errors can be reduced by taking a smaller time step or by using a high-order time-stepping scheme to improve convergence. Following the approach of the Runge-Kutta discontinuous Galerkin method (Cockburn & Shu, 1998, 2001; Shu, 2009), we have implemented several explicit multi-stage strong stability-preserving Runge-Kutta high-order schemes (Gottlieb et al., 2001; Shu, 2002); most of the results in this thesis use a three-stage, third-order scheme (SSP-RK3), which is sufficiently accurate for our calculations; it is also unconditionally stable if the CFL condition is satisfied, unlike SSP-RK2. These schemes have the property that a high-order scheme can be composed of several first-order forward-Euler stages. For example, for SSP-RK3, the time advance is given by

f(1)\displaystyle f^{(1)} =[fn,tn]\displaystyle=\mathcal{F}[f^{n},t^{n}] (3.416)
f(2)\displaystyle f^{(2)} =34fn+14[f(1),tn+Δt]\displaystyle=\frac{3}{4}f^{n}+\frac{1}{4}\mathcal{F}[f^{(1)},t^{n}+\Delta t] (3.417)
fn+1\displaystyle f^{n+1} =13fn+23[f(2),tn+Δt/2],\displaystyle=\frac{1}{3}f^{n}+\frac{2}{3}\mathcal{F}[f^{(2)},t^{n}+\Delta t/2], (3.418)

where

[f,t]=f+Δt𝕃[f]\mathcal{F}[f,t]=f+\Delta t\,\mathbb{L}[f] (3.419)

denotes a first-order forward-Euler step, with 𝕃[f]\mathbb{L}[f] denoting the right-hand side operator resulting from the DG spatial discretization scheme. Thus we will detail our time-stepping scheme for a single forward-Euler stage, which can then be combined into a multi-stage high-order scheme.

Given fhn=fh(t=tn)f_{h}^{n}=f_{h}(t=t^{n}) and Ahn=Ah(t=tn)A_{\parallel h}^{n}=A_{\parallel h}(t=t^{n}) at time tnt^{n}, the steps of the forward-Euler scheme to advance to time tn+1=tn+Δtt^{n+1}=t^{n}+\Delta t are as follows:

  1. 1.

    Calculate  Φhn\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}_{h}^{n} using Eq. 3.207, and then Φhn=𝒫z[ Φhn]\Phi_{h}^{n}=\mathcal{P}_{z}[\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}_{h}^{n}] using Eq. 3.226.

    𝒦iRϵh Φhnξ(j)d3𝑹𝒦iRξ(j)ϵh Φhnd𝒔R=𝒦jRξ(j)𝒫z[σghn]d3𝑹\displaystyle\int_{\mathcal{K}^{R}_{i}}\epsilon_{\perp h}\nabla_{\perp}\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}^{n}{\boldsymbol{\cdot}}\nabla_{\perp}\xi^{(j)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\xi^{(j)}\epsilon_{\perp h}\nabla_{\perp}\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}^{n}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}=\int_{\mathcal{K}^{R}_{j}}\xi^{(j)}\mathcal{P}^{*}_{z}[\sigma_{g\,h}^{n}]\,\textnormal{d}^{3}\mbox{\boldmath${R}$} (3.452)
    𝒯jzχΦhnd3𝑹=𝒯jzχ Φhnd3𝑹\displaystyle\int_{\mathcal{T}^{z}_{j}}\chi\Phi_{h}^{n}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}=\int_{\mathcal{T}^{z}_{j}}\chi\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}^{n}\,\textnormal{d}^{3}\mbox{\boldmath${R}$} (3.461)
  2. 2.

    Calculate the partial EMGK update ((𝒥fh)/t)n\left({\partial(\mathcal{J}f_{h})}^{\star}/{\partial t}\right)^{n} using Eq. 3.296.

    𝒦iψ\displaystyle\int_{\mathcal{K}_{i}}\psi ((𝒥fh)t)nd3𝑹d3𝒗=𝒦i𝒥fhn𝑹˙hnψd3𝑹d3𝒗+𝒦i𝒥fhnv˙hHnψvd3𝑹d3𝒗\displaystyle\left(\frac{\partial(\mathcal{J}f_{h})}{\partial t}^{\star}\right)^{n}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}^{n}\dot{\mbox{\boldmath${R}$}}_{h}^{n}\boldsymbol{\cdot}\nabla\psi\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}+\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}^{n}\dot{v}^{H\,n}_{\parallel h}\frac{\partial\psi}{\partial v_{\parallel}}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
    𝒦iψ𝒥fh^n𝑹˙hnd𝒔Rd3𝒗+𝒦iψ(𝒥C[fhn]+𝒥Shn)d3𝑹d3𝒗\displaystyle\qquad\qquad-\oint_{\partial\mathcal{K}_{i}}\psi^{-}\widehat{\mathcal{J}f_{h}}^{n}\dot{\mbox{\boldmath${R}$}}_{h}^{n}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}+\int_{\mathcal{K}_{i}}\psi\left(\mathcal{J}C[f_{h}^{n}]+\mathcal{J}S_{h}^{n}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$} (3.462)
  3. 3.

    Calculate (Ah/t)n\left({\partial A_{\parallel h}}/{\partial t}\right)^{n} from Eq. 3.287 [for pv=1p_{v}=1, this is only a provisional value, which we will denote as (Ah/t~)n(\widetilde{\partial{A_{\parallel h}}/\partial{t}})^{n}].

    𝒦iR(Aht)n\displaystyle\int_{\mathcal{K}^{R}_{i}}\nabla_{\perp}\left(\frac{\partial A_{\parallel h}}{\partial t}\right)^{n}\mbox{\boldmath${\boldsymbol{\cdot}}$} φ(i)d3𝑹𝒦iRφ(i)(Aht)nd𝒔R\displaystyle\nabla_{\perp}\varphi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\varphi^{(i)}\nabla_{\perp}\left(\frac{\partial A_{\parallel h}}{\partial t}\right)^{n}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}
    +𝒦iRφ(i)(Aht)n[sμ0qs2ms𝒯v𝒥fshnd3𝒗]d3𝑹\displaystyle\quad+\int_{\mathcal{K}_{i}^{R}}\varphi^{(i)}\left(\frac{\partial A_{\parallel h}}{\partial t}\right)^{n}\left[\sum_{s}\frac{\mu_{0}q_{s}^{2}}{m_{s}}\!\int_{\mathcal{T}^{v}}\mathcal{J}f_{s\,h}^{n}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}
    =μ0sqs𝒦iRφ(i)[𝒯vv((𝒥fsh)t)nd3𝒗]d3𝑹\displaystyle=\mu_{0}\sum_{s}q_{s}\!\!\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\left[\int_{\mathcal{T}^{v}}v_{\parallel}\left(\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}^{\star}\right)^{n}\textnormal{d}^{3}\mbox{\boldmath${v}$}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$} (3.463)
  4. 4.

    (pv=1onlyp_{v}=1\ only) Use the provisional (Ah/t~)n(\widetilde{\partial{A_{\parallel h}}/\partial{t}})^{n} from step 3 to calculate the upwinding direction in the surface terms in Eq. 3.286, and then calculate (Ah/t)n({\partial{A_{\parallel h}}/\partial{t}})^{n}.

    𝒦iR(Aht)nφ(i)d3𝑹𝒦iRφ(i)(Aht)nd𝒔R\displaystyle\int_{\mathcal{K}^{R}_{i}}\nabla_{\perp}\left(\frac{\partial A_{\parallel h}}{\partial t}\right)^{n}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\varphi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\varphi^{(i)}\nabla_{\perp}\left(\frac{\partial A_{\parallel h}}{\partial t}\right)^{n}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}
    𝒦iRφ(i)(Aht)n[s,jμ0qs2ms𝒦jvv¯𝒥fsh^ndsv]d3𝑹\displaystyle\quad-\int_{\mathcal{K}_{i}^{R}}\varphi^{(i)}\left(\frac{\partial A_{\parallel h}}{\partial t}\right)^{n}\left[\sum_{s,j}\frac{\mu_{0}q_{s}^{2}}{m_{s}}\oint_{\partial\mathcal{K}^{v}_{j}}\bar{v}_{\parallel}^{-}\widehat{\mathcal{J}f_{s\,h}}^{n}\,\textnormal{d}s_{v}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}
    =μ0sqs𝒦iRφ(i)[𝒯vv¯((𝒥fsh)t)nd3𝒗j𝒦jvv¯v˙hHn𝒥fsh^ndsv]d3𝑹\displaystyle=\mu_{0}\sum_{s}q_{s}\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\Bigg{[}\int_{\mathcal{T}^{v}}\bar{v}_{\parallel}\left(\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}^{\star}\right)^{n}\textnormal{d}^{3}\mbox{\boldmath${v}$}-\sum_{j}\oint_{\partial\mathcal{K}_{j}^{v}}\bar{v}_{\parallel}^{-}{\dot{v}^{H\,n}_{\parallel h}}\widehat{\mathcal{J}f_{s\,h}}^{n}\,\textnormal{d}s_{v}\Bigg{]}\textnormal{d}^{3}\mbox{\boldmath${R}$} (3.464)
  5. 5.

    Calculate the full EMGK update, ((𝒥fh)/t)n\left(\partial(\mathcal{J}f_{h})/\partial t\right)^{n}, using Eq. 3.297. For pv=1p_{v}=1, the provisional (Ah/t~)n\left(\widetilde{\partial A_{\parallel h}/\partial t}\right)^{n} from step 3 should again be used to calculate the upwinding direction in the surface terms for consistency.

    𝒦iψ((𝒥fh)t)nd3𝑹d3𝒗=𝒦iψ((𝒥fh)t)nd3𝑹d3𝒗\displaystyle\int_{\mathcal{K}_{i}}\psi\left(\frac{\partial(\mathcal{J}f_{h})}{\partial t}\right)^{n}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=\int_{\mathcal{K}_{i}}\psi\left(\frac{\partial(\mathcal{J}f_{h})}{\partial t}^{\star}\right)^{n}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
    𝒦iψ𝒥fh^n[v˙hHnqm(Aht)n]d3𝑹dsv\displaystyle\quad-\oint_{\partial\mathcal{K}_{i}}\psi^{-}\widehat{\mathcal{J}f_{h}}^{n}\left[\dot{v}^{H\,n}_{\parallel h}-\frac{q}{m}\left(\frac{\partial A_{\parallel h}}{\partial t}\right)^{n}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}s_{v}
    𝒦i𝒥fhnqm(Aht)nψvd3𝑹d3𝒗.\displaystyle\quad-\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}^{n}\frac{q}{m}\left(\frac{\partial A_{\parallel h}}{\partial t}\right)^{n}\frac{\partial\psi}{\partial v_{\parallel}}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (3.465)
  6. 6.

    Advance fhf_{h} and AhA_{\parallel h} to time tn+1t_{n+1}.

    𝒥fhn+1=𝒥fhn+Δt((𝒥fh)t)n\displaystyle\mathcal{J}f_{h}^{n+1}=\mathcal{J}f_{h}^{n}+\Delta t\left(\frac{\partial(\mathcal{J}f_{h})}{\partial t}\right)^{n} (3.466)
    Ahn+1=Ahn+Δt(Aht)n\displaystyle A_{\parallel h}^{n+1}=A_{\parallel h}^{n}+\Delta t\left(\frac{\partial A_{\parallel h}}{\partial t}\right)^{n} (3.467)

Note that the parallel Ampère equation, Eq. 3.284, is only used to solve for the initial condition of Ah(t=0)A_{\parallel h}(t=0). For all other times, Eq. 3.467 is used to advance AhA_{\parallel h}. This prevents the system from being over-determined and ensures consistency between AhA_{\parallel h} and Ah/t\partial A_{\parallel h}/\partial t.

3.4 Linear benchmarks

The scheme presented above has been implemented into the Gkeyll plasma simulation framework. In this section we present some linear benchmarks that verify the implementation.

3.4.1 Kinetic Alfvén wave

As a first benchmark of our electromagnetic scheme, we consider the kinetic Alfvén wave. In a slab (straight background magnetic field) geometry, with stationary singly-charged ions (assuming ωkvti\omega\gg k_{\parallel}v_{ti}), the gyrokinetic equation for electrons reduces to

fet={He,fe}emfevAt=vfezemfev(Φz+At).\frac{\partial f_{e}}{\partial t}=\{H_{e},f_{e}\}-\frac{e}{m}\frac{\partial f_{e}}{\partial v_{\parallel}}\frac{\partial A_{\parallel}}{\partial t}=-v_{\parallel}\frac{\partial f_{e}}{\partial z}{-}\frac{e}{m}\frac{\partial f_{e}}{\partial v_{\parallel}}\left(\frac{\partial\Phi}{\partial z}+\frac{\partial A_{\parallel}}{\partial t}\right). (3.468)

Taking a single Fourier mode with perpendicular wavenumber kk_{\perp} and parallel wavenumber kk_{\parallel}, the field equations become

k2min0B2Φ=en0efedv\displaystyle k_{\perp}^{2}\frac{m_{i}n_{0}}{B^{2}}\Phi=en_{0}-e\int f_{e}\,\textnormal{d}v_{\parallel} (3.469)
k2A=μ0evfedv\displaystyle k_{\perp}^{2}A_{\parallel}=-\mu_{0}e\int v_{\parallel}f_{e}\,\textnormal{d}v_{\parallel} (3.470)
(k2+μ0e2mefedv)At=μ0ev{He,fe}dv\displaystyle\left(k_{\perp}^{2}+\frac{\mu_{0}e^{2}}{m_{e}}\int f_{e}\,\textnormal{d}v_{\parallel}\right)\frac{\partial A_{\parallel}}{\partial t}=-\mu_{0}e\int v_{\parallel}\{H_{e},f_{e}\}\,\textnormal{d}v_{\parallel} (3.471)

After linearizing the gyrokinetic equation by assuming a uniform Maxwellian background with density n0n_{0} and temperature TeT_{e}, so that fe=FMe+δfef_{e}=F_{Me}+\delta f_{e}, the dispersion relation becomes

ω2[1+ω2kvteZ(ω2kvte)]=k2vte2β^[1+k2ρs2+ω2kvteZ(ω2kvte)],\omega^{2}\left[1+\frac{\omega}{\sqrt{2}k_{\parallel}v_{te}}Z\left(\frac{\omega}{\sqrt{2}k_{\parallel}v_{te}}\right)\right]=\frac{k_{\parallel}^{2}v_{te}^{2}}{\hat{\beta}}\left[1+k_{\perp}^{2}\rho_{\mathrm{s}}^{2}+\frac{\omega}{\sqrt{2}k_{\parallel}v_{te}}Z\left(\frac{\omega}{\sqrt{2}k_{\parallel}v_{te}}\right)\right], (3.472)

where β^=(βe/2)mi/me\hat{\beta}=(\beta_{e}/2)m_{i}/m_{e}, with βe=2μ0n0Te/B2\beta_{e}=2\mu_{0}n_{0}T_{e}/B^{2}, vte=Te/mev_{te}=\sqrt{T_{e}/m_{e}} is the electron thermal speed, ρs=cs/Ωi\rho_{\mathrm{s}}=c_{\mathrm{s}}/\Omega_{i} is the ion sound gyroradius with cs=Te/mic_{\mathrm{s}}=\sqrt{T_{e}/m_{i}} the sound speed and Ωi=eB/mi\Omega_{i}=eB/m_{i} the gyrofrequency, and Z(x)Z(x) is the plasma dispersion function (Fried & Conte, 1961). Note that ρs\rho_{\mathrm{s}} can also be defined in terms of the electron skin depth, de=(n0e2μ0/me)1/2d_{e}=(n_{0}e^{2}\mu_{0}/m_{e})^{-1/2}, so that ρs=deβ^1/2\rho_{\mathrm{s}}=d_{e}\hat{\beta}^{1/2}. In the limit kρs1k_{\perp}\rho_{\mathrm{s}}\ll 1 the wave becomes the standard shear Alfvén wave from magnetohydrodynamics (MHD), which is an undamped wave with frequency ω=kvA\omega=k_{\parallel}v_{A}, where vA=vte/β^1/2v_{A}=v_{te}/\hat{\beta}^{1/2} is the Alfvén velocity. For larger values of kρsk_{\perp}\rho_{\mathrm{s}}, the mode is damped by kinetic effects.

Refer to caption
Refer to caption
Figure 3.1: Real frequencies (aa) and damping rates (bb) for the kinetic Alfvén wave vs kρsk_{\perp}\rho_{\mathrm{s}}. Solid lines are the exact values from Eq. 3.472 for three different values of β^=(βe/2)mi/me\hat{\beta}=(\beta_{e}/2)m_{i}/m_{e}, and black dots are the numerical results from Gkeyll.

In Fig. 3.1, we show the real frequencies (aa) and damping rates (bb) obtained by solving Eq. 3.472 for a few values of β^\hat{\beta}. We also show numerical results from Gkeyll, which match the analytic results very well. These results are a good indication that our scheme avoids the Ampère cancellation problem, which can cause large errors for modes with length-scales large compared to the electron skin depth, k2de21k_{\perp}^{2}d_{e}^{2}\ll 1, or equivalently, β^/k2ρs21\hat{\beta}/k_{\perp}^{2}\rho_{\mathrm{s}}^{2}\gg 1 (see Section 3.5); we see no such errors, even for the case with β^/k2ρs2=105\hat{\beta}/k_{\perp}^{2}\rho_{\mathrm{s}}^{2}=10^{5}. Each Gkeyll simulation was run using piecewise-linear basis functions (p=1p=1) in a reduced dimensionality mode with one configuration space dimension and one velocity space dimension, with (Nz,Nv)=(32,64)(N_{z},N_{v_{\parallel}})=(32,64) the number of cells in each dimension. The perpendicular dimensions (xx and yy), which appear only in the field equations in this simple system, were handled by replacing 2k2\nabla_{\perp}^{2}\rightarrow-k_{\perp}^{2}, as in Eqs. (3.469) and (3.470). We use periodic boundary conditions in zz and zero-flux boundary conditions in vv_{\parallel}.

We also show in Fig. 3.2 the fields Φh\Phi_{h} and Ah/t\partial A_{\parallel h}/\partial t for the case with β^=10\hat{\beta}=10 and kρs=0.01k_{\perp}\rho_{\mathrm{s}}=0.01, which gives β^/k2ρs2=105\hat{\beta}/k_{\perp}^{2}\rho_{\mathrm{s}}^{2}=10^{5}. For these parameters the system is near the MHD limit, which means we should expect E=Φ/zA/t0E_{\parallel}=-\partial\Phi/\partial z-\partial A_{\parallel}/\partial t\approx 0. While this condition is never enforced, getting the physics correct requires the scheme to allow Φh/zAh/t\partial\Phi_{h}/\partial z\approx-\partial A_{\parallel h}/\partial t. The fact that our scheme allows discontinuities in AA_{\parallel} in the parallel direction is an advantage in this case. Because Φh\Phi_{h} is piecewise-linear here, Φh/z\partial\Phi_{h}/\partial z is piecewise-constant; this is necessarily discontinuous for non-trivial solutions. Thus the scheme produces a piecewise-constant Ah/t\partial A_{\parallel h}/\partial t in this MHD-limit case, as shown in Fig. 3.2, resulting in Eh0E_{\parallel h}\approx 0. If our scheme did not allow discontinuities in AhA_{\parallel h}, a continuous Ah/t\partial A_{\parallel h}/\partial t would never be able to exactly cancel a discontinuous Φh/z\partial\Phi_{h}/\partial z, and the resulting Eh0E_{\parallel h}\neq 0 would make the solution inaccurate. Notably, this would be the case had we chosen the Hamiltonian (pp_{\parallel}) formulation of the gyrokinetic system, which uses p=mv+qAp_{\parallel}=mv_{\parallel}+qA_{\parallel} as the parallel velocity coordinate. This is because AA_{\parallel} is included in the Hamiltonian in the pp_{\parallel} formulation, which would require continuity of AhA_{\parallel h} (and thereby Ah/t\partial A_{\parallel h}/\partial t) to conserve energy in our discretization scheme.

Refer to caption
Figure 3.2: Φh\Phi_{h} (blue) and Ah/t\partial{A_{\parallel h}}/\partial{t} (yellow) for the case with β^=10\hat{\beta}=10 and kρs=0.01k_{\perp}\rho_{\mathrm{s}}=0.01. The amplitude of EhE_{\parallel h} (green) is 109\sim 10^{-9}.

3.4.2 Kinetic ballooning mode (KBM)

We use the kinetic ballooning mode (KBM) instability in the local limit as a second linear benchmark of our electromagnetic scheme. Kim et al. (1993) obtain the dispersion relation by solving

ω[1+τP0]Φ=[τ(ωωe)kP1]ωkA\displaystyle\omega\left[1+\tau-P_{0}\right]\Phi=\left[\tau(\omega-\omega_{*e})-k_{\parallel}P_{1}\right]\frac{\omega}{k_{\parallel}}A_{\parallel} (3.473)
2k2k2βiA=k[kP1τ(ωωe)]Φ[k2P2τ(ω(ωωe)2ωde(ωωe(1+ηe)))]A\displaystyle\frac{2k_{\parallel}^{2}k_{\perp}^{2}}{\beta_{i}}A_{\parallel}=k_{\parallel}\left[k_{\parallel}P_{1}-\tau(\omega-\omega_{*e})\right]\Phi-\left[k_{\parallel}^{2}P_{2}-\tau\left(\omega(\omega-\omega_{*e})-2\omega_{de}(\omega-\omega_{*e}(1+\eta_{e}))\right)\right]A_{\parallel} (3.474)

where

Pm=0𝑑vv𝑑v12πe(v2+v2)/2(v)mωωi[1+ηi(v2/23/2)]ωkvωdi(v2+v2/2)J02(vb),\displaystyle P_{m}=\int_{0}^{\infty}dv_{\perp}\ v_{\perp}\int_{-\infty}^{\infty}dv_{\parallel}\ \frac{1}{\sqrt{2\pi}}e^{-(v_{\parallel}^{2}+v_{\perp}^{2})/2}(v_{\parallel})^{m}\frac{\omega-\omega_{*i}\left[1+\eta_{i}(v^{2}/2-3/2)\right]}{\omega-k_{\parallel}v_{\parallel}-\omega_{di}(v_{\parallel}^{2}+v_{\perp}^{2}/2)}J_{0}^{2}(v_{\perp}\sqrt{b}), (3.475)

with τ=Ti/Te\tau=T_{i}/T_{e}, ωe=ky\omega_{*e}=k_{y}, ωi=ky\omega_{*i}=-k_{y}, ηs=Ln/LTs\eta_{s}=L_{n}/L_{Ts}, b=k2b=k_{\perp}^{2}, and Γ0(b)=I0(b)eb\Gamma_{0}(b)=I_{0}(b)e^{-b} with I0(b)=J0(ib)I_{0}(b)=J_{0}(ib) the modified Bessel function. Here, the wavenumbers kyk_{y} and kk_{\parallel} are normalized to ρi\rho_{i} and LnL_{n}, respectively, and the frequencies ω\omega and ω\omega_{*} are normalized to vti/Lnv_{ti}/L_{n}. In the local limit, ωds=ωsLn/R\omega_{ds}=\omega_{*s}L_{n}/R and k=kyk_{\perp}=k_{y} do not vary along the field line. The above equations include FLR effects even beyond the order of the general system that we derived in Chapter 2, with the ion polarization density given by

npolKim=n0[Γ0(b)1]eΦTi.n_{\mathrm{pol}}^{\mathrm{Kim}}=n_{0}\left[\Gamma_{0}(b)-1\right]\frac{e\Phi}{T_{i}}. (3.476)

The term in square brackets on the left-hand side of Eq. 3.473 implicitly contains a term proportional to npolKim-n_{\mathrm{pol}}^{\mathrm{Kim}}. In our system we only keep the first-order part of the polarization density (because higher-order corrections require even higher-order terms in the Hamiltonian), leaving

npol=n0beΦTi.n_{\mathrm{pol}}=-n_{0}b\frac{e\Phi}{T_{i}}. (3.477)

Thus we must modify the left-hand side of Eq. 3.473 by taking npolKimnpol-n_{\mathrm{pol}}^{\mathrm{Kim}}\rightarrow-n_{\mathrm{pol}}; we can do this by adding a term proportional to (npolnpolKim)-(n_{\mathrm{pol}}-n_{\mathrm{pol}}^{\mathrm{Kim}}) in the square brackets, resulting in

ω[Γ0(b)+b+τP0]Φ=[τ(ωωe)kP1]ωkA.\displaystyle\omega\left[\Gamma_{0}(b)+b+\tau-P_{0}\right]\Phi=\left[\tau(\omega-\omega_{*e})-k_{\parallel}P_{1}\right]\frac{\omega}{k_{\parallel}}A_{\parallel}. (3.478)

Finally, we additionally modify the FLR terms by taking b0b\rightarrow 0 while keeping the first-order polarization density (which we now write in terms of k2k_{\perp}^{2} instead of bb) and ky=k0k_{y}=k_{\perp}\neq 0 in the non-FLR terms, which gives

ω[1+k2+τP0]Φ=[τ(ωωe)kP1]ωkA,\displaystyle\omega\left[1+k_{\perp}^{2}+\tau-P_{0}\right]\Phi=\left[\tau(\omega-\omega_{*e})-k_{\parallel}P_{1}\right]\frac{\omega}{k_{\parallel}}A_{\parallel}, (3.479)

where now we will also assume b=0b=0 in all PmP_{m} expressions.

The local limit can be achieved by simulating a helical flux tube with no magnetic shear, which gives a system with constant magnetic curvature that corresponds to ωd=const\omega_{d}=\text{const}. This geometry has been previously used for SOL turbulence studies with Gkeyll (Shi et al., 2019; Bernard et al., 2019), except in this section we take the boundary condition along the field lines to be periodic. We will provide further details about the helical geometry and the coordinates in Chapter 4.

Refer to caption
Figure 3.3: Growth rates for the KBM instability in the local limit, as a function of βi\beta_{i}, with kρi=0.5,kLn=0.1,R/Ln=5,R/LTi=12.5,R/LTe=10,k_{\perp}\rho_{i}=0.5,\ k_{\parallel}L_{n}=0.1,\ R/L_{n}=5,\ R/L_{Ti}=12.5,\ R/L_{Te}=10, and τ=1\tau=1. The black dots are numerical results from Gkeyll, and the colored lines are the result of numerically solving the analytic dispersion relation given by Eqs. (3.479-3.474).

We show the results of Gkeyll simulations of the KBM instability in the local-limit helical geometry for several values of βi\beta_{i} in Fig. 3.3. The results agree well with the analytic result obtained by numerically solving Eqs. (3.474) and (3.479). The parameters kρi=0.5,kLn=0.1,R/Ln=5,R/LTi=12.5,R/LTe=10,τ=1k_{\perp}\rho_{i}=0.5,\ k_{\parallel}L_{n}=0.1,\ R/L_{n}=5,\ R/L_{Ti}=12.5,\ R/L_{Te}=10,\ \tau=1 are chosen to match those used in figure 1 of Kim et al. (1993), although the differences in FLR terms (b=0b=0) cause our growth rates to be larger than those in Kim et al. (1993). Finally, we note that since Gkeyll is designed primarily for nonlinear calculations, the fact that Fourier modes are not eigenfunctions of the DG discretization of the system makes these linear tests somewhat difficult for Gkeyll. This may play a role in the small deviation of the results from the analytical theory. Because of this, Fourier modes other than the one initialized can grow and pollute the results. In particular, we have not included results from the ion temperature gradient (ITG) branch because we find that a mode with k=0k_{\parallel}=0 grows and overcomes the finite kk_{\parallel} mode before its growth rate has converged.

3.5 Avoiding the Ampère cancellation problem

Historically, including electromagnetic effects in gyrokinetic simulations has proved numerically and computationally challenging, both in the core and in the edge. The so-called Ampère cancellation problem is one of the main numerical issues that has troubled primarily PIC codes (Reynders, 1993; Cummings, 1994).

To understand where the cancellation problem comes from, let us reexamine the simple Alfvén wave case from Section 3.4.1. The cancellation problem is usually discussed in the context of the pp_{\parallel} (Hamiltonian) formulation of electromagnetic gyrokinetics, which is the formulation used by most PIC codes (in order to avoid the appearance of the explicit time derivative of AA_{\parallel} in the gyrokinetic equation). In the pp_{\parallel} formulation, the simple gyrokinetic system that we looked at in Section 3.4.1 becomes

fet={He,fe}=1mepfezefepΦz\displaystyle\frac{\partial f_{e}}{\partial t}=\{H_{e},f_{e}\}=-\frac{1}{m_{e}}p_{\parallel}\frac{\partial f_{e}}{\partial z}{-}e\frac{\partial f_{e}}{\partial p_{\parallel}}\frac{\partial\Phi}{\partial z} (3.480)
k2min0B2Φ=en0efedp\displaystyle k_{\perp}^{2}\frac{m_{i}n_{0}}{B^{2}}\Phi=en_{0}-e\int f_{e}\,\textnormal{d}p_{\parallel} (3.481)
(k2+CNμ0e2me2fedp)A=CJμ0eme2pfedp.\displaystyle\left(k_{\perp}^{2}+C_{N}\ \frac{\mu_{0}e^{2}}{m_{e}^{2}}\int f_{e}\,\textnormal{d}p_{\parallel}\right)A_{\parallel}=-C_{J}\ \frac{\mu_{0}e}{m_{e}^{2}}\int p_{\parallel}f_{e}\,\textnormal{d}p_{\parallel}. (3.482)

In Eq. 3.482, we have introduced two constants, CNC_{N} and CJC_{J}. We will use these constants to represent small errors that could arise in the numerical calculation of these integrals. As in Section 3.4.1, we can calculate the dispersion relation for this system, but now we will take the limit ωkvte\omega\gg k_{\parallel}v_{te}, so that the dispersion relation reduces to

ω2=k2vA2CN+k2ρs2/β^[1+(CNCJ)β^k2ρs2],\omega^{2}=\frac{k_{\parallel}^{2}v_{A}^{2}}{C_{N}+k_{\perp}^{2}\rho_{\mathrm{s}}^{2}/\hat{\beta}}\left[1+(C_{N}-C_{J})\frac{\hat{\beta}}{k_{\perp}^{2}\rho_{\mathrm{s}}^{2}}\right], (3.483)

where recall that β^=(βe/2)mi/me\hat{\beta}=(\beta_{e}/2)m_{i}/m_{e}. This reduces to the correct result if CN=CJ=1C_{N}=C_{J}=1. However, if CNCJC_{N}\neq C_{J}, there will be a spurious numerical term from the second term in the brackets, leading to large errors for modes with β^/(k2ρs2)1\hat{\beta}/(k_{\perp}^{2}\rho_{\mathrm{s}}^{2})\gg 1. This means that one must be very careful in how the integrals in Eq. 3.482 are computed. The integrals need not be computed exactly, but one must ensure that they are computed consistently so that any numerical error is identical in both integrals (i.e. CN=CJC_{N}=C_{J}), resulting in the errors cancelling exactly. This can be challenging in PIC codes, in part because the moments of the distribution function involve some finite sampling noise. Another complication is that the particle positions do not coincide with the field grid, necessitating interpolations. Various δf\delta f PIC schemes to address the cancellation problem have been developed and there are interesting recent advances in this area (Chen & Parker, 2003; Mishchenko et al., 2004; Hatzky et al., 2007; Mishchenko et al., 2014; Startsev & Lee, 2014; Bao et al., 2018).

Meanwhile, some continuum δf\delta f core codes avoided the cancellation problem completely (Rewoldt et al., 1987; Kotschenreuther et al., 1995), while others had to address somewhat minor issues resulting from it (Jenko, 2000; Candy & Waltz, 2003). In particular, the use of the vv_{\parallel} (symplectic) formulation of EMGK in (Kotschenreuther et al., 1995) results in an Ampère’s law that contains only one integral, as in Eq. 2.95, so one does not need to worry about two large integral terms cancelling appropriately.

However, in our scheme based on the vv_{\parallel} formulation, we solve Ohm’s law for A/t\partial A_{\parallel}/\partial t. Recall from Section 3.4.1 that the simple gyrokinetic system is given by

fet={He,fe}emefevAt=vfezemfev(Φz+At)\displaystyle\frac{\partial f_{e}}{\partial t}=\{H_{e},f_{e}\}-\frac{e}{m_{e}}\frac{\partial f_{e}}{\partial v_{\parallel}}\frac{\partial A_{\parallel}}{\partial t}=-v_{\parallel}\frac{\partial f_{e}}{\partial z}{-}\frac{e}{m}\frac{\partial f_{e}}{\partial v_{\parallel}}\left(\frac{\partial\Phi}{\partial z}+\frac{\partial A_{\parallel}}{\partial t}\right) (3.484)
k2min0B2Φ=en0efedv\displaystyle k_{\perp}^{2}\frac{m_{i}n_{0}}{B^{2}}\Phi=en_{0}-e\int f_{e}\,\textnormal{d}v_{\parallel} (3.485)
(k2+CNμ0e2mefedv)At=CJμ0ev{He,fe}dv.\displaystyle\left(k_{\perp}^{2}+C_{N}\ \frac{\mu_{0}e^{2}}{m_{e}}\int f_{e}\,\textnormal{d}v_{\parallel}\right)\frac{\partial A_{\parallel}}{\partial t}=-C_{J}\ \mu_{0}e\int v_{\parallel}\{H_{e},f_{e}\}\,\textnormal{d}v_{\parallel}. (3.486)

Ohm’s law does have two integrals on either side of the equation. As above, we have inserted constants, CNC_{N} and CJC_{J} to represent small numerical errors in the calculation of the integrals. Again taking the limit ωkvte\omega\gg k_{\parallel}v_{te}, the dispersion relation reduces to

ω2=k2vA2CN+k2ρs2/β^[1+(CNCJ)β^k2ρs2].\omega^{2}=\frac{k_{\parallel}^{2}v_{A}^{2}}{C_{N}+k_{\perp}^{2}\rho_{\mathrm{s}}^{2}/\hat{\beta}}\left[1+(C_{N}-C_{J})\frac{\hat{\beta}}{k_{\perp}^{2}\rho_{\mathrm{s}}^{2}}\right]. (3.487)

This is the same dispersion relation as we obtained in Eq. 3.483 from the pp_{\parallel} formulation. Thus even though we are using the vv_{\parallel} formulation, we still have to worry about the cancellation problem when we use Ohm’s law to solve for A/t\partial A_{\parallel}/\partial t. We must be careful to compute the integrals in Ohm’s law consistently so that numerical errors cancel exactly. In the following section, we derive a semi-discrete Alfvén wave dispersion relation that results from our DG discretization scheme to show that our scheme does indeed avoid the cancellation problem.

3.5.1 Semi-discrete dispersion relation for Alfvén wave

Here we will derive a semi-discrete Alfvén wave dispersion relation by using a piecewise-linear DG discretization for only the vv_{\parallel} coordinate, with the remaining coordinates not discretized (for simplicity). The main purpose is to show how our discrete scheme avoids the Ampère cancellation problem. We will also show how the integrals in the DG weak form are computed analytically in our modal scheme.

The semi-discrete gyrokinetic weak form for this system is

𝒦jψfhtdv+𝒦jψ1meHhvfhzdveme(Φz+At)𝒦jψvfhdv\displaystyle\int_{\mathcal{K}_{j}}\psi\frac{\partial f_{h}}{\partial t}\,\textnormal{d}v_{\parallel}+\int_{\mathcal{K}_{j}}\psi\frac{1}{m_{e}}\frac{\partial H_{h}}{\partial v_{\parallel}}\frac{\partial f_{h}}{\partial z}\,\textnormal{d}v_{\parallel}-\frac{e}{m_{e}}\left(\frac{\partial\Phi}{\partial z}+\frac{\partial A_{\parallel}}{\partial t}\right)\int_{\mathcal{K}_{j}}\frac{\partial\psi}{\partial v_{\parallel}}f_{h}\,\textnormal{d}v_{\parallel}\qquad
+eme(Φz+At)(ψf^h)|𝒦j=0.\displaystyle+\frac{e}{m_{e}}\left(\frac{\partial\Phi}{\partial z}+\frac{\partial A_{\parallel}}{\partial t}\right)(\psi^{-}\widehat{f}_{h})\bigg{\rvert}_{\partial\mathcal{K}_{j}}=0. (3.488)

We begin by mapping each cell 𝒦j\mathcal{K}_{j} to ξ[1,1]\xi\in[-1,1] via the transformation ξ=2(vv¯j)/Δv\xi=2(v_{\parallel}-\bar{v}_{\parallel}^{j})/\Delta v_{\parallel}, where v¯j\bar{v}_{\parallel}^{j} is the cell center of cell jj, resulting in

11ψfhtdξ+11ψ2Δv1meHhξfhzdξeme(Φz+At)112Δvψξfhdξ\displaystyle\int_{-1}^{1}\psi\frac{\partial f_{h}}{\partial t}\,\textnormal{d}\xi+\int_{-1}^{1}\psi\frac{2}{\Delta v_{\parallel}}\frac{1}{m_{e}}\frac{\partial H_{h}}{\partial\xi}\frac{\partial f_{h}}{\partial z}\,\textnormal{d}\xi-\frac{e}{m_{e}}\left(\frac{\partial\Phi}{\partial z}+\frac{\partial A_{\parallel}}{\partial t}\right)\int_{-1}^{1}\frac{2}{\Delta v_{\parallel}}\frac{\partial\psi}{\partial\xi}f_{h}\,\textnormal{d}\xi\qquad
+eme(Φz+At)2Δv(ψf^h)|1 1=0.\displaystyle+\frac{e}{m_{e}}\left(\frac{\partial\Phi}{\partial z}+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{2}{\Delta v_{\parallel}}(\psi^{-}\widehat{f}_{h})\bigg{\rvert}_{-1}^{\ 1}=0. (3.489)

Taking an orthonormal piecewise-linear basis in ξ\xi, ψ=[12,32ξ]\psi=[\frac{1}{\sqrt{2}},\frac{\sqrt{3}}{\sqrt{2}}\xi], we expand fhf_{h} on the basis in cell jj as

fhj(z,v,t)=kψk(ξ)fkj(z,t)=12f0j+32f1jξ.f_{h}^{j}(z,v_{\parallel},t)=\sum_{k}\psi_{k}(\xi)f_{k}^{j}(z,t)=\frac{1}{\sqrt{2}}f_{0}^{j}+\frac{\sqrt{3}}{\sqrt{2}}f_{1}^{j}\xi. (3.490)

(Note that in the fully discretized case all coordinate dependence would be contained in multi-variate basis functions.) We can then analytically integrate the weak form for each ψk\psi_{k} to obtain the modal evolution equation for each DG ‘mode’ fkf_{k}:

f0jt+v¯jf0jz+eme(Φz+At)2Δvf^hj|1 1=0\displaystyle\frac{\partial f_{0}^{j}}{\partial t}+\bar{v}_{\parallel}^{j}\frac{\partial f_{0}^{j}}{\partial z}+\frac{e}{m_{e}}\left(\frac{\partial\Phi}{\partial z}+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{\sqrt{2}}{\Delta v_{\parallel}}\widehat{f}_{h}^{\,j}\bigg{\rvert}_{-1}^{\ 1}=0 (3.491)
f1jt+v¯jf1jz+eme(Φz+At)6Δvξf^hj|1 1eme(Φz+At)23Δvf0j=0.\displaystyle\frac{\partial f_{1}^{j}}{\partial t}+\bar{v}_{\parallel}^{j}\frac{\partial f_{1}^{j}}{\partial z}+\frac{e}{m_{e}}\left(\frac{\partial\Phi}{\partial z}+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{\sqrt{6}}{\Delta v_{\parallel}}\xi\widehat{f}_{h}^{\,j}\bigg{\rvert}_{-1}^{\ 1}-\frac{e}{m_{e}}\left(\frac{\partial\Phi}{\partial z}+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{2\sqrt{3}}{\Delta v_{\parallel}}f_{0}^{j}=0. (3.492)

Finally, we will make the ansatz fk=FMk+fkeikziωtf_{k}=F_{Mk}+f_{k}e^{ik_{\parallel}z-i\omega t} and linearize:

i(ωkv¯i)f0j+eme(ikΦ+At)2ΔvF^Mhj|1 1=0\displaystyle-i(\omega-k_{\parallel}\bar{v}_{\parallel}^{i}){f_{0}^{j}}+\frac{e}{m_{e}}\left(ik_{\parallel}{\Phi}+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{\sqrt{2}}{\Delta v_{\parallel}}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}=0 (3.493)
i(ωkv¯i)f1j+eme(ikΦ+At)6ΔvξF^Mhj|1 1eme(ikΦ+At)23ΔvFM0j=0.\displaystyle-i(\omega-k_{\parallel}\bar{v}_{\parallel}^{i}){f_{1}^{j}}+\frac{e}{m_{e}}\left(ik_{\parallel}{\Phi}+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{\sqrt{6}}{\Delta v_{\parallel}}\xi\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}-\frac{e}{m_{e}}\left(ik_{\parallel}{\Phi}+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{2\sqrt{3}}{\Delta v_{\parallel}}F_{M0}^{j}=0. (3.494)

We now turn to the field equations. The Poisson equation is

k2min0B2Φ=en0ej𝒦jfhdv.k_{\perp}^{2}\frac{m_{i}n_{0}}{B^{2}}\Phi=en_{0}-e\sum_{j}\int_{\mathcal{K}_{j}}f_{h}\,\textnormal{d}v_{\parallel}. (3.495)

Expanding fhf_{h} and using the ansatz, this becomes

k2min0B2Φ=en0ejΔv2FM0jejΔv2f0j=ejΔv2f0j,k_{\perp}^{2}\frac{m_{i}n_{0}}{B^{2}}\Phi=en_{0}-e\sum_{j}\frac{\Delta v_{\parallel}}{\sqrt{2}}F_{M0}^{j}-e\sum_{j}\frac{\Delta v_{\parallel}}{\sqrt{2}}f_{0}^{j}=-e\sum_{j}\frac{\Delta v_{\parallel}}{\sqrt{2}}f_{0}^{j}, (3.496)

where we will define FMhF_{Mh} so that jΔv2FM0j=n0\sum_{j}\frac{\Delta v_{\parallel}}{\sqrt{2}}F_{M0}^{j}=n_{0} by definition. For Ohm’s law, we must use the pv=1p_{v}=1 form from Eq. (3.286), which gives

k2AtAtμ0e2mejv¯jf^hj|𝒦j=μ0ej𝒦jv¯jfhtdv+ikΦμ0e2mejv¯jf^hj|𝒦j,k_{\perp}^{2}\frac{\partial A_{\parallel}}{\partial t}-\frac{\partial A_{\parallel}}{\partial t}\frac{\mu_{0}e^{2}}{m_{e}}\sum_{j}\bar{v}_{\parallel}^{j}\widehat{f}_{h}^{\,j}\bigg{\rvert}_{\partial\mathcal{K}_{j}}=-\mu_{0}e\sum_{j}\int_{\mathcal{K}_{j}}\bar{v}_{\parallel}^{j}\frac{\partial f_{h}}{\partial t}^{\star}\,\textnormal{d}v_{\parallel}+ik_{\parallel}\Phi\frac{\mu_{0}e^{2}}{m_{e}}\sum_{j}\bar{v}_{\parallel}^{j}\widehat{f}_{h}^{\,j}\bigg{\rvert}_{\partial\mathcal{K}_{j}}, (3.497)

where

𝒦jψfhtdv=ik𝒦jψ1meHhvfhdv+emeikΦ𝒦j𝑑vψvfhdv.\int_{\mathcal{K}_{j}}\psi\frac{\partial f_{h}}{\partial t}^{\star}\,\textnormal{d}v_{\parallel}=-ik_{\parallel}\int_{\mathcal{K}_{j}}\psi\frac{1}{m_{e}}\frac{\partial H_{h}}{\partial v_{\parallel}}f_{h}\,\textnormal{d}v_{\parallel}+\frac{e}{m_{e}}ik_{\parallel}\Phi\int_{\mathcal{K}_{j}}dv_{\parallel}\ \frac{\partial\psi}{\partial v_{\parallel}}f_{h}\,\textnormal{d}v_{\parallel}. (3.498)

Again expanding and using the ansatz, Ohm’s law becomes

k2AtAtμ0e2mejv¯jF^Mhj|1 1=μ0e(ik)jΔv2v¯j 2f0j+ikΦμ0e2mejv¯jF^Mhj|1 1.k_{\perp}^{2}\frac{\partial A_{\parallel}}{\partial t}-\frac{\partial A_{\parallel}}{\partial t}\frac{\mu_{0}e^{2}}{m_{e}}\sum_{j}\bar{v}_{\parallel}^{j}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}=-\mu_{0}e(ik_{\parallel})\sum_{j}\frac{\Delta v_{\parallel}}{\sqrt{2}}\bar{v}_{\parallel}^{j\,2}f_{0}^{j}+ik_{\parallel}\Phi\frac{\mu_{0}e^{2}}{m_{e}}\sum_{j}\bar{v}_{\parallel}^{j}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}. (3.499)

Analogously to Eq. 3.486, we can rewrite this equation as

k2At+Atμ0e2n0meCN=μ0e(ik)jΔv2v¯j 2f0jikΦμ0e2n0meCJ,k_{\perp}^{2}\frac{\partial A_{\parallel}}{\partial t}+\frac{\partial A_{\parallel}}{\partial t}\frac{\mu_{0}e^{2}n_{0}}{m_{e}}C_{N}=-\mu_{0}e(ik_{\parallel})\sum_{j}\frac{\Delta v_{\parallel}}{\sqrt{2}}\bar{v}_{\parallel}^{j\,2}f_{0}^{j}-ik_{\parallel}\Phi\frac{\mu_{0}e^{2}n_{0}}{m_{e}}C_{J}, (3.500)

where we have defined

CN=j1n0v¯jF^Mhj|1 1,\displaystyle C_{N}=-\sum_{j}\frac{1}{n_{0}}\bar{v}_{\parallel}^{j}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}, (3.501)
CJ=j1n0v¯jF^Mhj|1 1.\displaystyle C_{J}=-\sum_{j}\frac{1}{n_{0}}\bar{v}_{\parallel}^{j}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}. (3.502)

Clearly CN=CJC_{N}=C_{J}, which allows us to move the CNC_{N} term to the right-hand side, giving a term proportional to the total parallel electric field, E=ikΦAtE_{\parallel}=-ik_{\parallel}\Phi-\frac{\partial A_{\parallel}}{\partial t}:

k2At=μ0e(ik)jΔv2v¯j 2f0jμ0e2n0me(ikΦ+At)CN.k_{\perp}^{2}\frac{\partial A_{\parallel}}{\partial t}=-\mu_{0}e(ik_{\parallel})\sum_{j}\frac{\Delta v_{\parallel}}{\sqrt{2}}\bar{v}_{\parallel}^{j\,2}f_{0}^{j}-\frac{\mu_{0}e^{2}n_{0}}{m_{e}}\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)C_{N}. (3.503)

This is essential for avoiding the cancellation problem because if we instead had CNCJC_{N}\neq C_{J}, we would have had a leftover term proportional to (CNCJ)At(C_{N}-C_{J})\frac{\partial A_{\parallel}}{\partial t} on the left-hand side. This leftover term would then lead to the spurious term proportional to β^/(k2ρs2)\hat{\beta}/(k_{\perp}^{2}\rho_{\mathrm{s}}^{2}) in Eq. (3.487).

In order to compute the integral quantities in the field equations, we use Eq. (3.493) to compute

f0j\displaystyle f_{0}^{j} =eme(ikΦ+At)iωkv¯j2ΔvF^Mhj|1 1\displaystyle=-\frac{e}{m_{e}}\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{i}{\omega-k_{\parallel}\bar{v}_{\parallel}^{j}}\frac{\sqrt{2}}{\Delta v_{\parallel}}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}
eme(ikΦ+At)iω(1+kv¯jω+k2v¯j 2ω2+k3v¯j 3ω3)2ΔvF^Mhj|1 1(ωkvte),\displaystyle\approx-\frac{e}{m_{e}}\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{i}{\omega}\left(1+\frac{k_{\parallel}\bar{v}_{\parallel}^{j}}{\omega}+\frac{k_{\parallel}^{2}\bar{v}_{\parallel}^{j\,2}}{\omega^{2}}+\frac{k_{\parallel}^{3}\bar{v}_{\parallel}^{j\,3}}{\omega^{3}}\right)\frac{\sqrt{2}}{\Delta v_{\parallel}}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}\ \quad(\omega\gg k_{\parallel}v_{te}), (3.504)

where we have expanded in the limit ωkvte\omega\gg k_{\parallel}v_{te}. Now we can calculate

jΔv2f0j=eme(ikΦ+At)iωj(1+kv¯jω+k2v¯j 2ω2+k3v¯j 3ω3)F^Mhj|1 1\displaystyle\sum_{j}\frac{\Delta v_{\parallel}}{\sqrt{2}}f_{0}^{j}=-\frac{e}{m_{e}}\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{i}{\omega}\sum_{j}\left(1+\frac{k_{\parallel}\bar{v}_{\parallel}^{j}}{\omega}+\frac{k_{\parallel}^{2}\bar{v}_{\parallel}^{j\,2}}{\omega^{2}}+\frac{k_{\parallel}^{3}\bar{v}_{\parallel}^{j\,3}}{\omega^{3}}\right)\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1} (3.505)
jΔv2v¯j 2f0j=eme(ikΦ+At)iωj(1+kv¯jω)v¯j 2F^Mhj|1 1\displaystyle\sum_{j}\frac{\Delta v_{\parallel}}{\sqrt{2}}\bar{v}_{\parallel}^{j\,2}f_{0}^{j}=-\frac{e}{m_{e}}\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{i}{\omega}\sum_{j}\left(1+\frac{k_{\parallel}\bar{v}_{\parallel}^{j}}{\omega}\right)\bar{v}_{\parallel}^{j\,2}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1} (3.506)

Substituting these integral quantities into the field equations, the Poisson equation becomes

k2min0B2Φ\displaystyle k_{\perp}^{2}\frac{m_{i}n_{0}}{B^{2}}\Phi =e2me(ikΦ+At)ikω2j[v¯jF^Mhj|1 1+kω(1+kv¯jω)v¯j 2F^Mhj|1 1]\displaystyle=\frac{e^{2}}{m_{e}}\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{ik_{\parallel}}{\omega^{2}}\sum_{j}\left[\bar{v}_{\parallel}^{j}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}+\frac{k_{\parallel}}{\omega}\left(1+\frac{k_{\parallel}\bar{v}_{\parallel}^{j}}{\omega}\right)\bar{v}_{\parallel}^{j\,2}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}\right]
=e2me(ikΦ+At)ikω2[n0CN+jkω(1+kv¯jω)v¯j 2F^Mhj|1 1]\displaystyle=\frac{e^{2}}{m_{e}}\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)\frac{ik_{\parallel}}{\omega^{2}}\left[-n_{0}C_{N}+\sum_{j}\frac{k_{\parallel}}{\omega}\left(1+\frac{k_{\parallel}\bar{v}_{\parallel}^{j}}{\omega}\right)\bar{v}_{\parallel}^{j\,2}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}\right] (3.507)

and Ohm’s law becomes

k2At\displaystyle k_{\perp}^{2}\frac{\partial A_{\parallel}}{\partial t} =μ0e2me(ikΦ+At)j[v¯jF^Mhj|1 1+kω(1+kv¯jω)v¯j 2F^Mhj|1 1]\displaystyle=\frac{\mu_{0}e^{2}}{m_{e}}\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)\sum_{j}\left[\bar{v}_{\parallel}^{j}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}+\frac{k_{\parallel}}{\omega}\left(1+\frac{k_{\parallel}\bar{v}_{\parallel}^{j}}{\omega}\right)\bar{v}_{\parallel}^{j\,2}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}\right]
=μ0e2me(ikΦ+At)[n0CN+jkω(1+kv¯jω)v¯j 2F^Mhj|1 1],\displaystyle=\frac{\mu_{0}e^{2}}{m_{e}}\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)\left[-n_{0}C_{N}+\sum_{j}\frac{k_{\parallel}}{\omega}\left(1+\frac{k_{\parallel}\bar{v}_{\parallel}^{j}}{\omega}\right)\bar{v}_{\parallel}^{j\,2}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}\right], (3.508)

where we have substituted the definition of CNC_{N}. We can now combine Eqs. (3.507) and (3.508) by multiplying Eq. (3.507) by ikTe/n0ik_{\parallel}T_{e}/n_{0}, multiplying Eq. (3.508) by ρs2=miTe/(e2B2)\rho_{\mathrm{s}}^{2}=m_{i}T_{e}/(e^{2}B^{2}) and summing the two equations to get

k2ρs2(ikΦ+At)=\displaystyle k_{\perp}^{2}\rho_{\mathrm{s}}^{2}\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)=
(ikΦ+At)(β^k2vte2ω2)[CN+1n0jkω(1+kv¯jω)v¯j 2F^Mhj|1 1],\displaystyle\quad\left(ik_{\parallel}\Phi+\frac{\partial A_{\parallel}}{\partial t}\right)\left(\hat{\beta}-\frac{k_{\parallel}^{2}v_{te}^{2}}{\omega^{2}}\right)\left[-C_{N}+\frac{1}{n_{0}}\sum_{j}\frac{k_{\parallel}}{\omega}\left(1+\frac{k_{\parallel}\bar{v}_{\parallel}^{j}}{\omega}\right)\bar{v}_{\parallel}^{j\,2}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}\right], (3.509)

with β^=(βe/2)mi/me\hat{\beta}=(\beta_{e}/2)m_{i}/m_{e}. This then yields the dispersion relation

k2ρs2\displaystyle k_{\perp}^{2}\rho_{\mathrm{s}}^{2} =(β^k2vte2ω2)[CN+1n0jkω(1+kv¯jω)v¯j 2F^Mhj|1 1].\displaystyle=\left(\hat{\beta}-\frac{k_{\parallel}^{2}v_{te}^{2}}{\omega^{2}}\right)\left[-C_{N}+\frac{1}{n_{0}}\sum_{j}\frac{k_{\parallel}}{\omega}\left(1+\frac{k_{\parallel}\bar{v}_{\parallel}^{j}}{\omega}\right)\bar{v}_{\parallel}^{j\,2}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}\right]. (3.510)

To evaluate CNC_{N} and the other sum, we need to project the background onto the basis in each cell. Taking FM=n0h(2πvt2)1/2exp(v2/(2vt2))F_{M}=n_{0h}(2\pi v_{t}^{2})^{-1/2}\exp\left(-v_{\parallel}^{2}/(2v_{t}^{2})\right), we project onto the basis in cell jj as

FM0j\displaystyle F_{M0}^{j} =121112πvt2e(v¯j+Δvξ/2)22vt2dξ\displaystyle=\frac{1}{\sqrt{2}}\int_{-1}^{1}\frac{1}{\sqrt{2\pi v_{t}^{2}}}e^{\frac{-\left(\bar{v}_{\parallel}^{j}+\Delta v_{\parallel}\xi/2\right)^{2}}{2v_{t}^{2}}}\,\textnormal{d}\xi
=n0hΔv2[erf((j+1/2)Δvvt2)erf((j1/2)Δvvt2)]\displaystyle=\frac{n_{0h}}{\Delta v_{\parallel}\sqrt{2}}\left[\text{erf}\left(\frac{(j+1/2)\Delta v_{\parallel}}{v_{t}\sqrt{2}}\right)-\text{erf}\left(\frac{(j-1/2)\Delta v_{\parallel}}{v_{t}\sqrt{2}}\right)\right] (3.511)
FM1j\displaystyle F_{M1}^{j} =3211ξ12πvt2e(v¯j+Δvξ/2)22vt2dξ\displaystyle=\frac{\sqrt{3}}{\sqrt{2}}\int_{-1}^{1}\xi\frac{1}{\sqrt{2\pi v_{t}^{2}}}e^{\frac{-\left(\bar{v}_{\parallel}^{j}+\Delta v_{\parallel}\xi/2\right)^{2}}{2v_{t}^{2}}}\,\textnormal{d}\xi
=2n0hvtΔv23π(e((j+1/2)Δv)22vt2e((j1/2)Δv)22vt2)\displaystyle=-\frac{2n_{0h}v_{t}}{\Delta v_{\parallel}^{2}}\sqrt{\frac{3}{\pi}}\left(e^{\frac{-\left((j+1/2)\Delta v_{\parallel}\right)^{2}}{2v_{t}^{2}}}-e^{\frac{-\left((j-1/2)\Delta v_{\parallel}\right)^{2}}{2v_{t}^{2}}}\right)
n0h6Δvj[erf((j+1/2)Δvvt2)erf((j1/2)Δvvt2)],\displaystyle\qquad-\frac{n_{0h}\sqrt{6}}{\Delta v_{\parallel}}j\left[\text{erf}\left(\frac{(j+1/2)\Delta v_{\parallel}}{v_{t}\sqrt{2}}\right)-\text{erf}\left(\frac{(j-1/2)\Delta v_{\parallel}}{v_{t}\sqrt{2}}\right)\right], (3.512)

where we have taken the cell center to be v¯j=jΔv\bar{v}_{\parallel}^{j}=j\Delta v_{\parallel}. Now we can evaluate integrated quantities such as

j=NPΔv2FM0j\displaystyle\sum_{j=-N}^{P}\frac{\Delta v_{\parallel}}{\sqrt{2}}F_{M0}^{j} =n0h2[erf((P+1/2)Δvvt2)erf((N+1/2)Δvvt2)]\displaystyle=\frac{n_{0h}}{2}\left[\text{erf}\left(\frac{(P+1/2)\Delta v_{\parallel}}{v_{t}\sqrt{2}}\right)-\text{erf}\left(\frac{-(N+1/2)\Delta v_{\parallel}}{v_{t}\sqrt{2}}\right)\right]
=n0h2[erf(vmaxvt2)erf(vminvt2)]\displaystyle=\frac{n_{0h}}{2}\left[\text{erf}\left(\frac{v_{\text{max}}}{v_{t}\sqrt{2}}\right)-\text{erf}\left(\frac{v_{\text{min}}}{v_{t}\sqrt{2}}\right)\right]
=n0herf(vmaxvt2)assuming vmin=vmax\displaystyle=n_{0h}\text{erf}\left(\frac{v_{\text{max}}}{v_{t}\sqrt{2}}\right)\qquad\qquad\text{assuming }v_{\text{min}}=-v_{\text{max}} (3.513)

where now note that we have finite limits on the sum to indicate finite extents of the v[vmax,vmax]v_{\parallel}\in[-v_{\text{max}},v_{\text{max}}] grid. As we alluded to before, we will define n0hn_{0h} so that jΔv2FM0j=n0\sum_{j}\frac{\Delta v_{\parallel}}{\sqrt{2}}F_{M0}^{j}=n_{0} by definition, which means

n0h=n0erf(vmaxvt2).n_{0h}=\frac{n_{0}}{\text{erf}\left(\frac{v_{\text{max}}}{v_{t}\sqrt{2}}\right)}. (3.514)

Note that erf(x)\text{erf}(x) quickly approaches 1 with increasing xx, so that for example when vmax=4vtv_{\text{max}}=4v_{t}, n0h1.00006n0n_{0h}\approx 1.00006\,n_{0}. We can also calculate

CN\displaystyle C_{N} =1n0j=NPv¯jF^Mhj|1 1\displaystyle=-\frac{1}{n_{0}}\sum_{j=-N}^{P}\bar{v}_{\parallel}^{j}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}
=1n0j=NPjΔv2[FMhj(1)+FMhj+1(1)FMhj(1)FMhj1(1)]\displaystyle=-\frac{1}{n_{0}}\sum_{j=-N}^{P}\frac{j\Delta v_{\parallel}}{2}\left[F_{Mh}^{j}(1)+F_{Mh}^{j+1}(-1)-F_{Mh}^{j}(-1)-F_{Mh}^{j-1}(1)\right]
+σn0j=NPjΔv2[FMhj+1(1)FMhj(1)FMhj(1)+FMhj1(1)]\displaystyle\qquad\qquad+\frac{\sigma}{n_{0}}\sum_{j=-N}^{P}\frac{j\Delta v_{\parallel}}{2}\left[F_{Mh}^{j+1}(-1)-F_{Mh}^{j}(1)-F_{Mh}^{j}(-1)+F_{Mh}^{j-1}(1)\right]
=1n0j=NPΔv2[FMhj(1)+FMhj(1)]\displaystyle=\frac{1}{n_{0}}\sum_{j=-N}^{P}\frac{\Delta v_{\parallel}}{2}\left[F_{Mh}^{j}(1)+F_{Mh}^{j}(-1)\right]
+σn0j=NPΔv2[FMhj(1)FMhj(1)]+boundary terms\displaystyle\qquad\qquad+\frac{\sigma}{n_{0}}\sum_{j=-N}^{P}\frac{\Delta v_{\parallel}}{2}\left[F_{Mh}^{j}(1)-F_{Mh}^{j}(-1)\right]+\text{boundary terms}
=1n0j=NPΔv2FM0j+σn0j=NPΔv32FM1j+boundary terms\displaystyle=\frac{1}{n_{0}}\sum_{j=-N}^{P}\frac{\Delta v_{\parallel}}{\sqrt{2}}F_{M0}^{j}+\frac{\sigma}{n_{0}}\sum_{j=-N}^{P}\frac{\Delta v_{\parallel}\sqrt{3}}{\sqrt{2}}F_{M1}^{j}+\text{boundary terms}
=1+boundary terms1,\displaystyle=1+\text{boundary terms}\approx 1, (3.515)

where σ\sigma is the sign of the upwind velocity, and the boundary terms that result from the finite limits on the sum are small for vmax4vtv_{\text{max}}\gtrsim 4v_{t}. Thus we have CN1C_{N}\approx 1 as expected, although it does not need to be exactly equal to unity to eliminate the cancellation problem. Instead, it was sufficient that CN=CJC_{N}=C_{J} on either side of Eq. (3.500).

One can also show that

j=NPv¯j 2F^Mhj|1 1=boundary terms 0\displaystyle\sum_{j=-N}^{P}\bar{v}_{\parallel}^{j\,2}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}=\text{boundary terms }\approx 0 (3.516)
j=NPv¯j 3F^Mhj|1 1=3n0vt2(1Δv212vt2)+boundary terms 3n0vt2(1Δv212vt2).\displaystyle\sum_{j=-N}^{P}\bar{v}_{\parallel}^{j\,3}\widehat{F}_{Mh}^{j}\bigg{\rvert}_{-1}^{\ 1}=-3n_{0}v_{t}^{2}\left(1-\frac{\Delta v_{\parallel}^{2}}{12v_{t}^{2}}\right)+\text{boundary terms }\approx-3n_{0}v_{t}^{2}\left(1-\frac{\Delta v_{\parallel}^{2}}{12v_{t}^{2}}\right). (3.517)

Now substituting these results into the dispersion relation from Eq. (3.510), we obtain

k2ρs2(β^k2vte2ω2)(CN3k2vte2ω2(1Δv212vte2))(β^k2vte2ω2)\displaystyle k_{\perp}^{2}\rho_{\mathrm{s}}^{2}\approx\left(\hat{\beta}-\frac{k_{\parallel}^{2}v_{te}^{2}}{\omega^{2}}\right)\left(-C_{N}-\frac{3k_{\parallel}^{2}v_{te}^{2}}{\omega^{2}}\left(1-\frac{\Delta v_{\parallel}^{2}}{12v_{te}^{2}}\right)\right)\approx-\left(\hat{\beta}-\frac{k_{\parallel}^{2}v_{te}^{2}}{\omega^{2}}\right) (3.518)

after again taking the limit ωkvte\omega\gg k_{\parallel}v_{te} and assuming Δvvte\Delta v_{\parallel}\sim v_{te}. This finally gives

ω2k2vte2β^+k2ρs2,\omega^{2}\approx\frac{k_{\parallel}^{2}v_{te}^{2}}{\hat{\beta}+k_{\perp}^{2}\rho_{\mathrm{s}}^{2}}, (3.519)

which is the expected dispersion relation.

Appendix 3.A The discrete weak form of Ohm’s law

To obtain the discrete weak form of Ohm’s law, we start by taking the time derivative of Eq. (3.284):

𝒦iRAht\displaystyle\int_{\mathcal{K}^{R}_{i}}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t} φ(i)d3𝑹𝒦iRφ(i)Ahtd𝒔R\displaystyle\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\varphi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\varphi^{(i)}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}
=μ0sqsms𝒦iRφ(i)[𝒯vHshv(𝒥fsh)td3𝒗]d3𝑹.\displaystyle=\mu_{0}\sum_{s}\frac{q_{s}}{m_{s}}\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\left[\int_{\mathcal{T}^{v}}\frac{\partial H_{s\,h}}{\partial v_{\parallel}}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}. (3.520)

Now, note that, analogously to Eq. (2.124), we can write the discrete weak form of the gyrokinetic equation as

𝒦iψ(𝒥fh)td3𝑹d3𝒗=𝒦iψ(𝒥fh)td3𝑹d3𝒗\displaystyle\int_{\mathcal{K}_{i}}\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=\int_{\mathcal{K}_{i}}\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}^{\star}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
𝒦iψ𝒥fh^(v˙hHqmAht)d3𝑹dsv𝒦i𝒥fhqmAhtψvd3𝑹d3𝒗,\displaystyle\quad-\oint_{\partial\mathcal{K}_{i}}\psi^{-}\widehat{\mathcal{J}f_{h}}\left(\dot{v}^{H}_{\parallel h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}s_{v}-\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\frac{\partial\psi}{\partial v_{\parallel}}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}, (3.521)

where

𝒦iψ(𝒥fh)td3𝑹d3𝒗=𝒦i𝒥fh𝑹˙hψd3𝑹d3𝒗+𝒦i𝒥fhv˙hHψvd3𝑹d3𝒗\displaystyle\int_{\mathcal{K}_{i}}\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}^{\star}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\nabla\psi\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}+\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\dot{v}^{H}_{\parallel h}\frac{\partial\psi}{\partial v_{\parallel}}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
𝒦iψ𝒥fh^𝑹˙hd𝒔Rd3𝒗+𝒦iψ(𝒥C[fh]+𝒥Sh)d3𝑹d3𝒗.\displaystyle\quad-\oint_{\partial\mathcal{K}_{i}}\psi^{-}\widehat{\mathcal{J}f_{h}}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}+\int_{\mathcal{K}_{i}}\psi\left(\mathcal{J}C[f_{h}]+\mathcal{J}S_{h}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (3.522)

Substituting ψ=φ(i)Hh/v\psi=\varphi^{(i)}\partial H_{h}/\partial v_{\parallel} in Eq. (3.521) and summing over velocity cells, we obtain

𝒦iRφ(i)[𝒯vHhv(𝒥fh)td3𝒗]d3𝑹=𝒦iRφ(i)[𝒯vHhv(𝒥fh)td3𝒗]d3𝑹\displaystyle\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\left[\int_{\mathcal{T}^{v}}\frac{\partial H_{h}}{\partial v_{\parallel}}\frac{\partial(\mathcal{J}f_{h})}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}=\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\left[\int_{\mathcal{T}^{v}}\frac{\partial H_{h}}{\partial v_{\parallel}}\frac{\partial(\mathcal{J}f_{h})^{\star}}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}
𝒦iRφ(i)[j𝒦jv(v˙hHqmAht)Hhv𝒥fh^dsv]d3𝑹\displaystyle\qquad-\int_{\mathcal{K}_{i}^{R}}\varphi^{(i)}\left[\sum\limits_{j}\oint_{\partial\mathcal{K}_{j}^{v}}\left(\dot{v}^{H}_{\parallel h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\right)\frac{\partial H_{h}}{\partial v_{\parallel}}^{-}\widehat{\mathcal{J}f_{h}}\,\textnormal{d}s_{v}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}
𝒦iRφ(i)qmAht[𝒯v𝒥2Hhv2fhd3𝒗]d3𝑹.\displaystyle\qquad-\int_{\mathcal{K}_{i}^{R}}\varphi^{(i)}\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\left[\int_{\mathcal{T}^{v}}\mathcal{J}\frac{\partial^{2}H_{h}}{\partial v_{\parallel}^{2}}f_{h}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}. (3.523)

Note that, for pv>1p_{v}>1, the vv_{\parallel} surface term on the right-hand side vanishes because Hh/v\partial H_{h}/\partial v_{\parallel} is continuous across vv_{\parallel} cell interfaces when v2v_{\parallel}^{2} is included in the basis, resulting in cancellations. However, for pv=1p_{v}=1 this term is not continuous, and we must keep this surface term; further, the last term on the right-hand side vanishes for pv=1p_{v}=1 since 2Hh/v2=0\partial^{2}H_{h}/\partial v_{\parallel}^{2}=0. We can now substitute this result into the right-hand side of Eq. (3.520), giving

𝒦iRAhtφ(i)d3𝑹𝒦iRφ(i)Ahtd𝒔R\displaystyle\int_{\mathcal{K}^{R}_{i}}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\varphi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\varphi^{(i)}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}
𝒦iRφ(i)Aht[s,jμ0qs2ms𝒦jvv¯𝒥fsh^dsv]d3𝑹\displaystyle\quad-\int_{\mathcal{K}_{i}^{R}}\varphi^{(i)}\frac{\partial A_{\parallel h}}{\partial t}\left[\sum_{s,j}\frac{\mu_{0}q_{s}^{2}}{m_{s}}\oint_{\partial\mathcal{K}^{v}_{j}}\bar{v}_{\parallel}^{-}\widehat{\mathcal{J}f_{s\,h}}\,\textnormal{d}s_{v}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}
=μ0sqs𝒦iRφ(i)[𝒯vv¯(𝒥fsh)td3𝒗j𝒦jvv¯v˙hH𝒥fsh^dsv]d3𝑹,(pv=1)\displaystyle=\mu_{0}\sum_{s}q_{s}\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\Bigg{[}\int_{\mathcal{T}^{v}}\bar{v}_{\parallel}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}^{\star}\textnormal{d}^{3}\mbox{\boldmath${v}$}-\sum_{j}\oint_{\partial\mathcal{K}_{j}^{v}}\bar{v}_{\parallel}^{-}{\dot{v}^{H}_{\parallel h}}\widehat{\mathcal{J}f_{s\,h}}\,\textnormal{d}s_{v}\Bigg{]}\textnormal{d}^{3}\mbox{\boldmath${R}$},\quad\ (p_{v}=1) (3.524)
𝒦iRAhtφ(i)d3𝑹𝒦iRφ(i)Ahtd𝒔R\displaystyle\int_{\mathcal{K}^{R}_{i}}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\varphi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\varphi^{(i)}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}
+𝒦iRφ(i)Aht[sμ0qs2ms𝒯v𝒥fshd3𝒗]d3𝑹\displaystyle\quad+\int_{\mathcal{K}_{i}^{R}}\varphi^{(i)}\frac{\partial A_{\parallel h}}{\partial t}\left[\sum_{s}\frac{\mu_{0}q_{s}^{2}}{m_{s}}\!\int_{\mathcal{T}^{v}}\mathcal{J}f_{s\,h}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}
=μ0sqs𝒦iRφ(i)[𝒯vv(𝒥fsh)td3𝒗]d3𝑹,(pv>1)\displaystyle=\mu_{0}\sum_{s}q_{s}\!\!\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\left[\int_{\mathcal{T}^{v}}v_{\parallel}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}^{\star}\textnormal{d}^{3}\mbox{\boldmath${v}$}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$},\qquad\qquad(p_{v}>1) (3.525)

In Eq. (3.524), v¯\bar{v}_{\parallel} is the piecewise-constant projection of vv_{\parallel}.

Chapter 4 Simulations of a helical scrape-off layer as a model of the NSTX SOL

4.1 Helical scrape-off layer model

As a first step towards modeling the tokamak scrape-off layer, we consider a simple helical scrape-off layer model. In this configuration, the magnetic field is composed of a toroidal component BφB_{\varphi} and a vertical component BvB_{v}, giving helical field lines. All field lines are open, terminating on material walls at the top and bottom of the device. This configuration is also known as a simple magnetized torus (SMT), and has been studied experimentally via devices such as the Helimak (Gentle & He, 2008) and TORPEX (Fasoli et al., 2006). Despite the relative simplicity of the helical SMT configuration, it contains unfavorable magnetic curvature. This gives rise to the interchange instability that drives turbulence and blob dynamics in the SOL. Thus the SMT configuration is a good testbed for investigating SOL blob dynamics. We will use parameters roughly modeling the SOL of the National Spherical Torus Experiment (NSTX) at PPPL.

4.1.1 Simplified helical geometry

We simulate a flux-tube-like domain that wraps helically around the torus and terminates on conducting plates at each end. For this, we use a non-orthogonal, field-aligned coordinate system (Beer et al., 1995), with xx the radial coordinate, zz the coordinate along the field lines, and yy the binormal coordinate that labels field lines at constant xx and zz. One can think of these coordinates roughly mapping to physical cylindrical coordinates (R,φ,Z)R,\varphi,Z) via R=xR=x, φ=(ysinχ+zcosχ)/Rc\varphi=(y\sin\chi+z\cos\chi)/R_{c}, Z=zsinχZ=z\sin\chi (although this parametrization does not give a truly field-aligned coordinate system; see Appendix 5.A). In this chapter, the field-line pitch angle χ=sin1(Bv/B)\chi=\sin^{-1}(B_{v}/B) is taken to be constant, with BvB_{v} the vertical component of the magnetic field (analogous to the poloidal field in typical tokamak geometry), and BB the total magnitude of the background magnetic field. Further, Rc=R0+aR_{c}=R_{0}+a is the radius of curvature at the center of the simulation domain, with R0R_{0} the device major radius and aa the minor radius. As in Shi et al. (2019), we neglect all geometrical factors arising from the non-orthogonal coordinate system in this chapter, except for the assumption that perpendicular gradients of ff are much stronger than parallel gradients. Thus we can approximate

(×𝐛^)f(x,y,z)[(×𝐛^)y]fy=1BBxfy=1xfy,(\nabla\times\mathbf{\hat{b}})\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla f(x,y,z)\approx\left[(\nabla\times\mathbf{\hat{b}})\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla y\right]\frac{\partial f}{\partial y}=\frac{1}{B}\frac{\partial B}{\partial x}\frac{\partial f}{\partial y}=-\frac{1}{x}\frac{\partial f}{\partial y}, (4.1)

where we have used 𝑩Baxis(R0/x)𝒆z\mbox{\boldmath${B}$}\approx B_{\text{axis}}(R_{0}/x)\mbox{\boldmath${e}$}_{z}, with BaxisB_{\text{axis}} the magnetic field strength at the magnetic axis, and neglected the contribution of the small vertical field BvB_{v}.111As a result of these approximations, the actual geometry that we are simulating is purely toroidal (i.e. Bv0B_{v}\rightarrow 0), as we show in Appendix 5.B. This means that the magnetic (curvature plus B\nabla B) drift,

𝒗d=mv2qB×𝐛^+μqB𝐛^×B,\mbox{\boldmath${v}$}_{d}=\frac{mv_{\parallel}^{2}}{qB}\nabla\times\mathbf{\hat{b}}+\frac{\mu}{qB}\mathbf{\hat{b}}\times\nabla B, (4.2)

is purely in the yy direction,

𝒗dy=(mv2+μBqB)1x=mv2+μBqBaxisR0,𝒗dx=𝒗dz=0.\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla y=-\left(\frac{mv_{\parallel}^{2}+\mu B}{qB}\right)\frac{1}{x}=-\frac{mv_{\parallel}^{2}+\mu B}{qB_{\text{axis}}R_{0}},\qquad\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla x=\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla z=0. (4.3)

Thus this simplified geometry has constant magnetic curvature (the curvature does not vary along the field line, so there is no ballooning structure), and we have neglected magnetic shear in the present setup. Note that while we make several approximations in specifying the geometry in this chapter, we will relax these approximations in Chapter 5, where we will account for all geometric factors arising from non-orthogonal coordinates in helical geometry and include magnetic shear.

4.1.2 Modeling the Debye sheath via boundary conditions

A distinguishing feature of the SOL is that the magnetic field lines terminate on material surfaces, resulting in the presence of the Debye sheath at the plasma-material interface. Sheath effects play a key role in blob dynamics (Krasheninnikov et al., 2008), and can affect particle and heat fluxes to plasma-facing components.

Refer to caption
Figure 4.1: Illustration of the Debye sheath potential. Since the non-quasi-neutral region (shaded) violates the gyrokinetic ordering assumptions, we cannot resolve this region directly in our simulations. Instead, we handle the sheath through model boundary conditions. This figure was adapted from Shi (2017, figure 2.7).

The sheath forms because electrons move along field lines much faster than ions, resulting in electrons being initially lost more quickly to the wall. This leads to a layer of excess ions (ni>ne)(n_{i}>n_{e}) in the immediate vicinity of the wall, which breaks the quasi-neutrality condition. The plasma responds by generating an electric potential that drops near the wall, as shown in Fig. 4.1, which accelerates ions into the wall and reflects low-energy electrons. A quasi-steady state is established, such that the fluxes of ions and electrons into the wall are approximately balanced so that the parallel outflow is roughly ambipolar.

Gyrokinetics, which assumes quasi-neutrality (ni=ne)(n_{i}=n_{e}), cannot handle the sheath directly. Apart from violating the gyrokinetic quasi-neutrality assumption, the length and time scales are also beyond the ordering regime of gyrokinetics (ωΩi\omega\ll\Omega_{i}, kρi1k_{\perp}\rho_{i}\sim 1); the sheath is a few electron Debye lengths wide (λDeρi)(\lambda_{De}\ll\rho_{i}), and it forms on the order of the electron plasma frequency (ωpeΩi)(\omega_{pe}\gg\Omega_{i}). Thus, we cannot resolve the sheath directly in our gyrokinetic simulations. Instead, we handle the sheath through model boundary conditions.

Refer to caption
Figure 4.2: Illustration of the outgoing (aa) and reflected (bb) electron distribution function due to the conducting sheath boundary condition. High-energy electrons with v>vcut=2|e|ΔΦ/mev_{\parallel}>v_{\mathrm{cut}}=\sqrt{2|e|\Delta\Phi/m_{e}} are lost to the wall (orange region) while the lower energy electrons are reflected (blue region). This figure is from Shi (2017, figure 2.8).

We use a conducting-sheath boundary condition (Shi et al., 2017, 2019), which involves using the potential at the zz domain boundaries (obtained by solving the gyrokinetic Poisson equation on the whole domain) as the sheath potential, Φsh(x,y)=Φ(x,y,z=zsh)\Phi_{sh}(x,y)=\Phi(x,y,z=z_{sh}), with zsh=±Lz/2z_{sh}=\pm L_{z}/2 the zz domain boundaries. By assuming that there is an unresolved non-quasi-neutral region in which the sheath potential drops to some potential at the wall, Φw\Phi_{w} (which is taken to be zero for a grounded wall), we can use the difference ΔΦ=ΦshΦw\Delta\Phi=\Phi_{sh}-\Phi_{w} to reflect particles with msv2/2<qsΔΦm_{s}v_{\parallel}^{2}/2<-q_{s}\Delta\Phi. For a typical sheath with ΔΦ>0\Delta\Phi>0, this means that outgoing low-energy electrons (qs=|e|q_{s}=-|e|) will be reflected back into the domain, while high-energy electrons and all ions will be lost to the wall. The resulting reflected electron distribution function is shown in Fig. 4.2bb. Note that unlike in the standard logical sheath boundary condition (Parker et al., 1993b), we have not directly imposed that the ion and electron currents at the sheath entrance be equal at all times. Instead, the conducting-sheath boundary condition allows local current fluctuations in and out of the sheath. We do not, however, impose the Bohm sheath criterion that ions must be supersonic as they enter the sheath (Bohm, 1949; Stangeby, 2000). This is one area of potential improvement to our model sheath boundary conditions. Another area of future work is accounting for the shallow incidence angle of the field lines intersecting the wall plates, leading to the development of the Chodura sheath (Chodura, 1982). Recent work has studied the implications of the Chodura magnetic pre-sheath for gyrokinetic particle dynamics (Geraldini et al., 2017).

4.2 Proof of concept: results from the first nonlinear electromagnetic gyrokinetic simulations on open field lines

We now present preliminary nonlinear electromagnetic results from Gkeyll. As detailed above, we simulate turbulence on helical, open field lines as a rough model of the tokamak scrape-off layer, using a flux-tube-like domain on the outboard side that wraps helically around the torus and terminates on conducting plates at each end in zz. A cartoon diagram of our setup is shown in Fig. 4.3. These simulations are a direct extension of the work of Shi et al. (2019) to include electromagnetic fluctuations. This work comprises the first published electromagnetic gyrokinetic results on open field lines, as detailed in Mandell et al. (2020); Hakim et al. (2020).

4.2.1 Simulation setup

The simulation box is centered at (x,y,z)=(Rc,0,0)(x,y,z)=(R_{c},0,0) with dimensions Lx=50ρs014.6L_{x}=50\rho_{\mathrm{s}0}\approx 14.6 cm, Ly=100ρs029.1L_{y}=100\rho_{\mathrm{s}0}\approx 29.1 cm, and Lz=Lpol/sinχ=8L_{z}=L_{\mathrm{pol}}/\sin\chi=8 m, where Lpol=2.4L_{\mathrm{pol}}=2.4 m and ρs0=cs0/Ωi\rho_{\mathrm{s}0}=c_{\mathrm{s}0}/\Omega_{i}. Note that although the domain that we simulate is a flux tube, the simulations are not performed in the local limit; the simulations include radial variation of the magnetic field and the profiles, and are thus effectively global. The radial boundary conditions model conducting walls at the radial ends of the domain, given by the Dirichlet boundary condition Φ=A=0\Phi=A_{\parallel}=0. The condition Φ=0\Phi=0 prevents E×BE\times B flows into walls, while A=0A_{\parallel}=0 makes it so that (perturbed) field lines never intersect the walls. For the latter, one can think of image currents in the conducting wall that mirror currents in the domain, resulting in exact cancellation of the perpendicular magnetic fluctuations at the wall. Also note that in this simple magnetic geometry the magnetic drifts do not have a radial component. Thus these radial boundary conditions on the fields are sufficient to ensure that there is no flux of the distribution function to the radial boundaries. Periodic boundary conditions are used in the yy direction. As discussed in the previous section, conducting-sheath boundary conditions are applied to the distribution function in the zz direction, with the end-plates taken to be grounded so that Φw=0\Phi_{w}=0. The fields do not require a boundary condition in the zz direction since only perpendicular derivatives appear in the field equations. The velocity-space grid has extents 4vtsv4vts-4v_{ts}\leq v_{\parallel}\leq 4v_{ts} and 0μ6Ts0/B00\leq\mu\leq 6T_{s0}/B_{0}, where vts=Ts0/msv_{ts}=\sqrt{T_{s0}/m_{s}} and B0=BaxisR0/RcB_{0}=B_{\text{axis}}R_{0}/R_{c}. We use piecewise-linear (p=1p=1) basis functions, with (Nx,Ny,Nz,Nv,Nμ)=(16,32,10,10,5)(N_{x},N_{y},N_{z},N_{v_{\parallel}},N_{\mu})=(16,32,10,10,5) the number of cells in each dimension. For p=1p=1 DG, one should double each of these numbers to obtain the equivalent number of grid-points for comparison with standard grid-based gyrokinetic codes, or with the number of particles per cell in PIC codes. This level of moderate velocity resolution (200\sim 200 velocity grid-points per spatial grid-point) has been shown to be quite adequate for these types of problems (Candy & Waltz, 2006), where strong turbulence broadens the velocity resonances that might otherwise require high resolution to resolve. Further, since our algorithms conserve energy and particles, we do not need to increase velocity resolution to reduce conservation errors like in other non-conservative codes. Note however that the velocity resolution is far above that of Braginskii fluid codes, which typically keep only several fluid moments (\sim velocity degrees of freedom). This will be more important when simulating the less-collisional pedestal region, where the Braginskii system is not strongly valid.

Refer to caption
Figure 4.3: (a)(a) Cartoon diagram of tokamak SOL, showing a blob filament elongated along the field line, adapted from Carralero et al. (2015). (b)(b) Cartoon diagram of the helical SOL model.

The simulation parameters are similar to those used in Shi et al. (2019), roughly approximating an H-mode deuterium plasma in the NSTX SOL: Baxis=0.5B_{\text{axis}}=0.5 T, R0=0.85R_{0}=0.85 m, a=0.5a=0.5 m. We use Te0=Ti0=40T_{e0}=T_{i0}=40 eV to set the velocity grid extents; these values approximate the temperatures that we expect in the simulation, and are used in the initial conditions, but the temperatures are free to evolve during the simulation. For the particle source, we use the same form as in Shi et al. (2019) but we increase the source particle rate by a factor of 10 to access a higher β\beta regime where electromagnetic effects will be more important. This implies that the total power into the SOL is PSOL=54P_{\mathrm{SOL}}=54 MW, and the total power into the simulation domain (which is a flux tube that covers a fraction of the SOL) is Psrc=PSOLLyLz/(2πRcLpol)=6.2P_{\mathrm{src}}=P_{\mathrm{SOL}}L_{y}L_{z}/(2\pi R_{c}L_{\mathrm{pol}})=6.2 MW. The source is localized in the region x<xS+3λSx<x_{S}+3\lambda_{S}, with xS=Rc0.05x_{S}=R_{c}-0.05 m and λS=5×103\lambda_{S}=5\times 10^{-3} m. The location x=xS+3λSx=x_{S}+3\lambda_{S}, which separates the source region from the SOL region, can be thought of as the separatrix. A floor of one tenth the peak particle source rate is used near the midplane to prevent regions of nn0n\ll n_{0} from developing at large xx. (In Section 4.3, we drop this floor on the particle source rate, after finding that it seems sufficient to put a floor on the initial density.) The source particle rate and temperature are shown in the xzx-z plane in Fig. 4.4, along with an illustration of the boundary conditions. Unlike in Shi et al. (2019) we do not use numerical heating to keep f>0f>0 despite the fact that our DG algorithm does not guarantee positivity. While the simulations appear to be robust to negative ff in some isolated regions, lowering the source floor in the SOL region can sometimes lead to simulation failures due to positivity issues at large xx. A more sophisticated algorithm for ensuring positivity is in progress, and detailed in Chapter 6.

Refer to caption
Figure 4.4: Diagram of the source particle rate and temperature. In these cases, a floor of one tenth the peak particle source rate is used in the SOL region to prevent negative density regions from developing. Also shown in the left plot are the boundary conditions: Dirichlet at the radial boundaries with Φ=A=0\Phi=A_{\parallel}=0, and sheath boundary conditions along the field line. Not pictured are periodic boundary conditions in the yy direction (out-of-plane here).

We also artificially lower the collision frequency to one tenth the physical value to offset the increased particle source rate so that the time-step limit from collisions does not become too restrictive. Further, in these initial simulations, we model only ion–ion and electron–electron collisions; cross-species collisions are not included in this section, but they are included in the simulations in Section 4.3. As a result, the typical ion-ion mean free path is λii3\lambda_{ii}\sim 3 m, and the typical electron-electron mean free path is λee1\lambda_{ee}\sim 1 m.

The simulations were run in this configuration to t=1t=1 ms, with a quasi-steady state being reached around t=600μst=600\ \mu\text{s} when the sources balance losses to the end plates. For reference, the ion transit time is τi=(Lz/2)/vti50μs\tau_{i}=(L_{z}/2)/v_{ti}\approx 50\ \mu\text{s}. In terms of computational cost, the electromagnetic simulation is less than twice as expensive as the corresponding electrostatic simulation on a per-time-step basis. On 128 cores, the time per time step was 0.41 s for the electrostatic simulation and 0.68 s for the electromagnetic simulation. The increased cost is due to the additional field solves required for Ohm’s law, along with additional terms in the gyrokinetic equation. However, due to time-step restrictions on an electrostatic simulation due to the electrostatic shear Alfvén mode (also known as the ωH\omega_{H} mode) (Lee, 1987), the electromagnetic simulation makes up some of the additional cost by taking slightly larger time steps. The total wall-clock time (on 128 cores) for the electrostatic simulation was approximately 65 h, and the electromagnetic simulation took about 82 h. Altogether, the cost of these simulations is relatively modest, and the addition of electromagnetic effects only makes the simulations marginally (25\sim 25%) more expensive. We also note that the new version of Gkeyll, which uses a quadrature-free modal DG scheme, is approximately 10 times faster than the previous version of Gkeyll used in Shi et al. (2019), which used nodal DG with Gaussian quadrature. For details about the improvements from the quadrature-free modal scheme, see Hakim & Juno (2020).

4.2.2 Electromagnetic simulation results

We show snapshots of the density, temperature and β\beta of electrons (top row) and ions (bottom row) in Fig. 4.5. Note that the ion density is the guiding-center ion density, which does not include the ion polarization density. The snapshots are taken at the midplane (z=0z=0) at t=620μt=620\ \mus. We can see a blob with a mushroom structure being ejected from the source region. We also show in Fig. 4.6 snapshots of the electromagnetic fields taken at the same time and location. We show the electrostatic potential Φ\Phi, the parallel magnetic vector potential AA_{\parallel} and the normalized magnetic fluctuation amplitude |δB|/B0=|A|/B0|\delta B_{\perp}|/B_{0}=|\nabla_{\perp}A_{\parallel}|/B_{0} (top row), along with the components of the parallel electric field E=ΦA/tE_{\parallel}=-\nabla_{\parallel}\Phi-\partial A_{\parallel}/\partial t (bottom row). Note that only Φ\Phi, AA_{\parallel} and A/t\partial A_{\parallel}/\partial t are evolved quantities in the simulation, with the other quantities derived. We see that A/t\partial A_{\parallel}/\partial t is of comparable magnitude to Φ\nabla_{\parallel}\Phi, indicating that the dynamics is in the electromagnetic regime. Significant magnetic fluctuations of over 2.5%2.5\% can be seen in |δB|/B0|\delta B_{\perp}|/B_{0} in this snapshot.

Refer to caption
Figure 4.5: Snapshots from an electromagnetic simulation on open, helical field lines. From left to right, we show the density, temperature, and plasma beta of electrons (top row) and ions (bottom row). Note that the ion density is the guiding-center ion density, which does not include the ion polarization density. The snapshots are taken at the midplane (z=0)(z=0) at t=620μt=620\ \mus. The dashed line indicates the boundary between the source and SOL regions. A blob with mushroom structure is being ejected from the source region and propagating radially outward into the SOL region.
Refer to caption
Figure 4.6: Snapshots (at z=0z=0, t=620μt=620\ \mus) of the electrostatic potential Φ\Phi, parallel magnetic vector potential AA_{\parallel}, and normalized magnetic fluctuation amplitude |δB|/B0=|A|/B0|\delta B_{\perp}|/B_{0}=|\nabla_{\perp}A_{\parallel}|/B_{0} (top row), along with the components of the parallel electric field E=ΦA/tE_{\parallel}=-\nabla_{\parallel}\Phi-\partial{A_{\parallel}}/\partial{t} (bottom row).

In Figures 4.8 and 4.8 we show projections of the three-dimensional magnetic field line trajectories. These plots are created by integrating the field line equations for the total (background plus fluctuation) magnetic field. In Fig. 4.8, each field line starts at z=4z=-4 m and either x=1.33x=1.33 m or x=1.38x=1.38 m for a range of yy values and is traced to z=4z=4 m. The starting points (at z=4z=-4 m ) are marked with circles, while the ending points (at z=4z=4 m) are marked with crosses. The trajectories have been projected onto the xyx-y plane, and we have also plotted the ion density at z=0z=0 m in the background. From left to right, we show a short time series of snapshots, with t=230, 240t=230,\ 240 and 250μ250\ \mus. At t=230μt=230\ \mus, a blob is starting to emerge from the source region at y0.04y\approx 0.04 m. The field lines that start at x=1.33x=1.33 m are beginning to be stretched radially outward as the blob emerges. In the t=240μt=240\ \mus snapshot, we see that the blob is now propagating radially outward into the SOL region and the x=1.33x=1.33 m field lines have been stretched further. The field lines that start at x=1.38x=1.38 m are now also starting to be stretched near y0.02y\approx 0.02 m, and they are stretched even more in the t=250μt=250\ \mus snapshot as the blob continues to propagate. We can also see the remnants of another blob that was ejected near y=0.1y=-0.1 m in previous frames. In the t=230μt=230\ \mus snapshot, the field lines have been stretched by this blob, but by t=250μt=250\ \mus the field lines in this region have returned closer to their equilibrium position. This behavior of blobs bending and stretching the field lines is an inherently full-ff phenomenon. The blobs have a higher density and temperature than the background, so they raise the local plasma β\beta as they propagate. This causes the field lines to move with the plasma, allowing the fields lines to be deformed and stretched by the radially propagating blobs and ultimately leading to larger magnetic fluctuations. This behavior has been seen in some electromagnetic Braginskii fluid modeling of SOL blobs (Lee et al., 2015b, a; Hoare et al., 2019), but this is the first time this behavior has been shown with an electromagnetic full-ff gyrokinetic model in the SOL. The referenced fluid modeling has also focused on seeded blob simulations, whereas in our simulations the blobs form self-consistently.

Refer to caption
Figure 4.7: Three-dimensional magnetic field line trajectories at t=230t=230, 240240, and 250250 μ\mus, projected onto the xyx-y plane. The ion density at z=0z=0 m is plotted in the background. Each field line starts at z=4z=-4 m and either x=1.33x=1.33 m or x=1x=1.38 m for a range of yy values and is traced to z=4z=4 m. The starting points are marked with circles and the ending points are marked with crosses. Focusing on the blob that is being ejected near y=0y=0 m, we see that field lines are stretched and bent by the blob as it propagates into the SOL region. In previous frames (not shown) a blob was also ejected near y=0.1y=-0.1 m. At t=230t=230 μ\mus the field lines are still stretched from this event, but they return closer to their equilibrium position by t=250t=250 μ\mus. (A full animation of this timeseries is included in the online supplementary materials of Mandell et al. (2020).)
Refer to caption
Figure 4.8: Three-dimensional magnetic field line trajectories at t=240μt=240\ \mus, projected onto the xyx-y plane in (a)(a) and the xzx-z plane in (b)(b). The ion density is plotted in the background, at z=0z=0 m in (a)(a) and averaged over |y|<0.02|y|<0.02 m in (b)(b). Each field line starts at y=0y=0 m and z=4z=-4 m for a range of xx values and is traced to z=4z=4 m. The starting points are marked with circles and the ending points are marked with crosses. Each field line is colored the same in both (a)(a) and (b)(b). The field lines in the near-SOL are stretched radially outward by a blob near y=0y=0 m.

In Fig. 4.8 we show a slightly different view of the field-line trajectories at t=240μt=240\ \mus. Field lines are still traced from the bottom (z=4z=-4 m) to the top (z=4z=4 m), but now each field line starts at y=0y=0 m for a range of xx. The starting points are again marked with circles and the ending points are marked with crosses. We have projected the three-dimensional trajectories onto the xyx-y plane in Fig. 4.8(a)(a), and onto the xzx-z plane in Fig. 4.8(b)(b). In (a)(a) we again plot the ion density at z=0z=0 m in the background; in (b)(b) the ion density has been averaged over |y|<0.02|y|<0.02 m. As can be seen in Fig. 4.8(b)(b), the blob propagating near y0y\approx 0 m has stretched several field lines radially outward near the midplane. These bowed-out field lines originate from a range of xx values, 1.31.3\ m x1.35\lesssim x\lesssim 1.35 m, and have all been dragged along with the blob as it was ejected from the source region and propagated radially outward. We also see some degree of line-tying in these plots, with many of the field lines ending at a similar point in xyx-y space to where they began, despite being stretched near the midplane. The field lines are not perfectly line-tied, however; if they were, the crosses would perfectly align with their corresponding circles in the xyx-y projections. Because our sheath boundary condition allows current fluctuations at the sheath interface, we can model the finite resistance of the sheath, which makes line-tying only partial (Kunkel & Guillory, 1966). This allows the footpoints of the field lines to slip at the sheath interface (Ryutov, 2006). Examining Fig. 4.8 and Fig. 4.8, we see evidence of this in the simulation, with most of the end points moving slowly and smoothly in the vicinity of their origin, especially at larger xx. In the source region, however, there are other field lines whose end points suddenly jump further away from their origin. This suggests that we are seeing line breaking (reconnection) due to electron inertia effects and numerical diffusion, as field lines are pushed close together by large perturbations in the source region.

Refer to caption
Figure 4.9: Energy conservation in the electromagnetic NSTX-like simulation, accounting for sources and sinks.

We also show in Fig. 4.9 a time trace of the total energy in the system, accounting for sources and losses to the sheath. This is given by

=totsrc+loss,\displaystyle\mathcal{E}=\mathcal{E}_{\mathrm{tot}}-\mathcal{E}_{\mathrm{src}}+\mathcal{E}_{\mathrm{loss}}, (4.4)

with

tot\displaystyle\mathcal{E}_{\mathrm{tot}} =HE+B\displaystyle=\mathcal{E}_{H}-\mathcal{E}_{E}+\mathcal{E}_{B}
=s𝒯𝒥fshHshd3𝑹d3𝒗𝒯ϵh2| Φh|2d3𝑹+𝒯12μ0|Ah|2d3𝑹\displaystyle=\sum_{s}\int_{\mathcal{T}}\mathcal{J}f_{s\,h}H_{s\,h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}-\int_{\mathcal{T}}\frac{\epsilon_{\perp h}}{2}|\nabla_{\perp}\mathop{\mathchoice{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=2.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\displaystyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.5pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\textstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.25pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptstyle\Phi$\cr} }}{\vbox{ \offinterlineskip\halign{#\cr\kern-0.5pt\xleaders\hbox{\kern 0.5pt\vrule height=0.4pt,width=1.0pt\kern 0.5pt}\hfill\kern-0.5pt\cr\kern 1.0pt\cr$\scriptscriptstyle\Phi$\cr} }}}\mskip 0.02998mu_{h}|^{2}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}+\int_{\mathcal{T}}\frac{1}{2\mu_{0}}|\nabla_{\perp}A_{\parallel h}|^{2}\textnormal{d}^{3}\mbox{\boldmath${R}$} (4.13)

and

src=sdt𝒯SshHshd3𝑹d3𝒗\displaystyle\mathcal{E}_{\mathrm{src}}=\sum_{s}\int\textnormal{d}t\int_{\mathcal{T}}S_{s\,h}H_{s\,h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$} (4.14)
loss=sdt𝒯Hsh𝒥fsh^𝑹˙hd𝒔Rd3𝒗=sdtHsh𝒥fsh^𝐛^𝑹˙hdxdyd3𝒗|zlowerzupper.\displaystyle\mathcal{E}_{\mathrm{loss}}=\sum_{s}\int\textnormal{d}t\oint_{\partial\mathcal{T}}H_{s\,h}^{-}\widehat{\mathcal{J}f_{s\,h}}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}\textnormal{d}^{3}\mbox{\boldmath${v}$}=\sum_{s}\int\textnormal{d}t\int H_{s\,h}^{-}\widehat{\mathcal{J}f_{s\,h}}\mathbf{\hat{b}}\boldsymbol{\cdot}\dot{\mbox{\boldmath${R}$}}_{h}\textnormal{d}x\,\textnormal{d}y\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\Big{|}_{z_{\mathrm{lower}}}^{z_{\mathrm{upper}}}. (4.15)

Energy is preserved to 𝒪(105)\sim\mathcal{O}(10^{-5}), with these finite energy errors likely related to the discrete timestepping scheme (Shi, 2017).

4.2.3 Electrostatic-electromagnetic qualitative comparison

We have also run a corresponding electrostatic simulation in this configuration for direct comparison. This simulation is identical in configuration to the Lz=8L_{z}=8 m case from Shi et al. (2019) except for the increased particle source rate and lack of cross-species collisions.

An analysis of the blob dynamics in the two cases reveals differences that are supported by theory. In the electrostatic case, the electron density response is strongly adiabatic. We can see this in Fig. 4.11, where we break the electron density into adiabatic and non-adiabatic parts. To compute the adiabatic part, we assume that electrons are sufficiently fast to isothermalize along the field line and rapidly communicate the sheath potential upstream, so that parallel force balance becomes

TeneeneE=eneΦ.T_{e}\nabla_{\parallel}n_{e}\approx-en_{e}E_{\parallel}=en_{e}\nabla_{\parallel}\Phi. (4.16)

The resulting adiabatic density response is given by integrating this equation along the field line subject to the sheath boundary conditions, yielding

nadiab(z)=nsheathexp[e(Φ(z)Φsheath)/Te].n_{\mathrm{adiab}}(z)=n_{\mathrm{sheath}}\exp\left[e(\Phi(z)-\Phi_{\mathrm{sheath}})/T_{e}\right]. (4.17)

By subtracting the adiabatic density from the full electron density, we find that non-adiabatic density fluctuations are only of order 1%1\% in the electrostatic case.

Refer to caption
Figure 4.10: Breaking the electron density into adiabatic and non-adiabatic components shows that the electrons are strongly adiabatic in the electrostatic case.
Refer to caption
Figure 4.11: In the electrostatic case, blobs spin due to the Boltzmann spinning effect since the electrons are strongly adiabatic. (Angus et al., 2012).

As a result of the strongly adiabatic dynamics, the blobs spin via the Boltzmann spinning effect (Angus et al., 2012). To see the origins of this effect, we rearrange Eq. 4.17 to find the blob potential along the field line,

Φblob(z)Φsheath+(Te/e)ln(n(z)/nsheath).\Phi_{\mathrm{blob}}(z)\approx\Phi_{\mathrm{sheath}}+(T_{e}/e)\ln\left(n(z)/n_{\mathrm{sheath}}\right). (4.18)

When the midplane (z=0z=0) density is greater than the density at the endplates so that n(0)>nsheathn(0)>n_{\mathrm{sheath}}, a radial (with respect to the blob center) variation in the blob density can give a radial variation in the blob potential via the second term in Eq. 4.18. Since the blob density is peaked in the center of the blob, the resulting electric field then points radially outward from the blob center. This produces an E×BE\times B drift that spins the blob about its center, which is what we see in the electrostatic simulation, as shown in Fig. 4.11.

Refer to caption
Figure 4.12: The electron density is moderately non-adiabatic in the electromagnetic case (though not so strongly non-adiabatic as to give an MHD-like response with E=0E_{\parallel}=0).
Refer to caption
Figure 4.13: In the electromagnetic case, blobs propagate ballistically radially outwards, which suggests electrical disconnection from the sheath (Krasheninnikov et al., 2008; D’Ippolito et al., 2011).

When we make a similar comparison in the electromagnetic case, we find that the electron density is moderately non-adiabatic, as shown in Fig. 4.13, with adiabatic and non-adiabatic fluctuations on the same order. Note however that the electrons are not so strongly non-adiabatic as to give an MHD-like response with E=0E_{\parallel}=0 (which would require ne,nonadiabne,adiabn_{e,\mathrm{non-adiab}}\gg n_{e,\mathrm{adiab}}), since EE_{\parallel} is finite as shown in Fig. 4.6.

Here, the presence of a strong inductive component of EE_{\parallel} indicates that electromagnetic effects are important, so that the propagation speed of waves along the field line (which communicate information about the sheath to the upstream plasma, for example) is limited to the Alvén speed, vA=vte/β^1/2v_{A}=v_{te}/\hat{\beta}^{1/2}. In this case β^=(βe/2)mi/me10\hat{\beta}=(\beta_{e}/2)m_{i}/m_{e}\sim 10, so the parallel response time, τA=L/vA\tau_{A}=L_{\parallel}/v_{A}, is about 3 times slower than in the electrostatic case (where the parallel response time is given by the electron transit time, τe=L/vte\tau_{e}=L_{\parallel}/v_{te}). If the time τA\tau_{A} is longer than the time it takes the blob to move more than its width across the field, τ=L/v\tau_{\perp}=L_{\perp}/v_{\perp}, the information about the sheath will never reach it, leading to electrical disconnection from the sheath. Thus the blob will move as if the sheath did not exist if τAτ\tau_{A}\gtrsim\tau_{\perp}, or β(L/L)2(cs/v)2{\beta}\gtrsim(L_{\perp}/L_{\parallel})^{2}(c_{\mathrm{s}}/v_{\perp})^{2}, where LL_{\perp} is the typical length scale of the potential of the blob, and vv_{\perp} is the blob radial velocity at the midplane (Lee et al., 2015a; Hoare et al., 2019). This means that the vertical charge polarization in the blob due to the curvature drift cannot be shorted out by the sheath, and the blob moves radially outwards due to the resulting E×BE\times B drift as shown in Fig. 4.13. The simulation has self-consistently produced the same dipolar potential structure and behavior as shown in Fig. 1.4. Note that there are other effects, including collisional viscosity and magnetic shear, that can cause sheath disconnection apart from electromagnetic effects (Myra et al., 2006; Krasheninnikov et al., 2008), although the resulting blob dynamics is not always the same (D’Ippolito et al., 2011). Even without these other effects, electrostatic blobs could still be sheath-disconnected if the parallel connection length is long enough, so that τeτ\tau_{e}\gtrsim\tau_{\perp}.

We might expect that we will see significant differences in blob dynamics when comparing electrostatic and electromagnetic simulations (which otherwise have identical parameters) if the blobs are sheath-connected in the electrostatic simulations (τESτeτ\tau_{ES}\sim\tau_{e}\gtrsim\tau_{\perp}) and sheath-disconnected in the electromagnetic simulations (τEMτAτ\tau_{EM}\sim\tau_{A}\lesssim\tau_{\perp}). Together this gives a condition τeττA\tau_{e}\lesssim\tau_{\perp}\lesssim\tau_{A} where including electromagnetic effects in the simulation might have the greatest impact on the blob dynamics.

4.3 β\beta dependence of SOL dynamics

Motivated by the differences in the electrostatic vs. electromagnetic blob dynamics observed in the previous section, we will now study the effect of β\beta on dynamics in our model helical SOL due to electromagnetic effects. In particular, we are interested in varying the Alfvén speed, since this can slow the parallel electron dynamics and reduce connectivity with the sheath. Noting that the Alfvén speed vA=B/μ0nmiv_{A}=B/\sqrt{\mu_{0}nm_{i}} depends on the density nn but not the temperature, we will vary ββe=2μ0nTe/B2\beta\sim\beta_{e}=2\mu_{0}nT_{e}/B^{2} by varying nn at constant TeT_{e}. To do this, we perform a parameter scan of the source particle rate, which roughly controls the density in these flux-driven simulations.

The simulations in this section use the same simplified helical geometry as in Section 4.2. However, here we no longer use a source floor of one tenth the peak particle source rate. In these simulations, we have found that setting a floor on the initial density is sufficient to avoid positivity issues, which seem to be most problematic when an initial burst of blobs propagate into a region of near-zero density. Ensuring that the initial density is finite mitigates this issue. This allows the simulations to run rather robustly without simulation-crashing positivity issues, even without a finite particle source rate in the entire domain. We also extended the domain 2 cm further radially inward and slightly modified the source profile so that the peak density is more removed from the radial boundary. We again use piecewise-linear (p=1)(p=1) basis functions; we also slightly increased the resolution in the zz direction, so that (Nx,Ny,Nz,Nv,Nμ)=(16,32,14,10,5)(N_{x},N_{y},N_{z},N_{v_{\parallel}},N_{\mu})=(16,32,14,10,5). (Recall that these are the number of DG cells in each direction, and that to get the effective number of grid-points for p=1p=1 one should double each number.) Further, we have included electron-ion and ion-electron collisions here, whereas in Section 4.2 only same-species collisions were included. Note that here, as in the previous section, we have artificially reduced the collision frequency to 10%10\% of its physical value. We do this in part to avoid an expensive timestep restriction from large collisionality (this could be avoided in the future by using an implicit discretization of the collision operator), but also so that we can isolate how electromagnetic effects change with density from collisional effects that also scale with density (Myra et al., 2006). In reality, collisional viscosity and magnetic induction compete to slow parallel electron dynamics, with the slowest timescale dominating the behavior (Scott, 1997).

The base case for this parameter scan is a case with Lz,base=8L_{z,\mathrm{base}}=8 m and PSOL,base=5.4P_{\mathrm{SOL},\mathrm{base}}=5.4 MW, which is the ‘nominal’ experimental heating power. In the base case, the profiles are mostly unchanged when electromagnetic effects are included, as can be seen in the top row of Fig. 4.15. We then scan the source particle rate by taking PSOL=n^PSOL,baseP_{\mathrm{SOL}}=\hat{n}P_{\mathrm{SOL,base}} with n^={1,2,3.5,5,10}\hat{n}=\{1,2,3.5,5,10\} at constant source temperature. Fig. 4.14 shows the profiles in the xzx-z plane of the source particle rate and the source temperature for the base case, along with the boundary conditions (which are the same as in Section 4.2).

Refer to caption
Figure 4.14: Diagram of the source particle rate for the base case (n^=1\hat{n}=1). The source temperature is 70 eV. For other cases the source profiles are identical, except for a scaling factor n^\hat{n} on the source particle rate. Also shown in the left plot are the boundary conditions: Dirichlet at the radial boundaries with Φ=A=0\Phi=A_{\parallel}=0, and sheath boundary conditions along the field line. Not pictured are periodic boundary conditions in the yy direction (out-of-plane here).

4.3.1 Midplane radial profiles and gradients

In Fig. 4.15 we see time- and yy-averaged midplane profiles of density, temperature, and β\beta for electrostatic and electromagnetic cases with n^={1,3.5,10}\hat{n}=\{1,3.5,10\}. Electron quantities are shown with solid lines, while dashed quantities are ion guiding-center moments. The midplane density scales with source particle rate scaling factor n^\hat{n} while the temperature does not, as one would expect. In all cases, we see that Ti/Te2T_{i}/T_{e}\sim 2, which is consistent with experimental results showing 1Ti/Te41\lesssim T_{i}/T_{e}\lesssim 4 in the SOL (Kočan et al., 2011). As βn^\beta\sim\hat{n} increases we see more differences in the profiles between the electromagnetic and electrostatic cases. At higher n^\hat{n}, electromagnetic effects seem to make the profiles steeper in the source region (shaded) and flatter in the non-source region, which we will denote as the “SOL region”. Although the profiles in the source region are likely influenced by the form of the sources, the sources are the same in all cases (except for the scaling factor n^\hat{n}). This means that differences in the profiles in the source region are still physical, even if the profiles themselves are not due to sensitivity to the source parameters.

Refer to caption
Figure 4.15: Time- and yy-averaged midplane profiles of density (left), temperature (middle), and β\beta (right) for electrostatic (ES) and electromagnetic (EM) cases with source scaling factor n^={1,3.5,10}\hat{n}=\{1,3.5,10\}. Electron quantities are shown with solid lines, while dashed quantities are ion guiding-center moments. As n^\hat{n} increases, electromagnetic effects cause steepening of gradients in the source region (shaded) and flattening in the SOL region.
Refer to caption
Figure 4.16: On the left, electron β\beta profiles normalized to power scaling factor n^\hat{n} for electromagnetic (EM, top) and electrostatic (ES, bottom) cases. On the right, inverse pressure gradient scale lengths for each case, Lp1=lnβeL_{p}^{-1}=-\nabla_{\perp}\ln\beta_{e}. While profiles and gradients change very little with n^\hat{n} in the electrostatic cases, the electromagnetic cases show steepening of gradients in the source region (shaded) and flattening in the SOL region as n^β\hat{n}\sim\beta increases.
Refer to caption
Figure 4.17: Maximum (solid lines) and minimum (dashed) values of Lp1L_{p}^{-1} as a function of n^\hat{n} for the electromagnetic (EM) and electrostatic (ES) cases. The maximum gradients are found in the source region, while the minimum gradients are found in the SOL region. In each region, the electrostatic gradients are roughly constant as n^\hat{n} increases. In the electromagnetic cases, the source-region gradients increase with n^\hat{n} while the SOL gradients decrease.

Focusing on β\beta, on the left side of Fig. 4.16 we show the electron β\beta profiles for the entire n^\hat{n} parameter scan, this time normalized to n^\hat{n}. In the electromagnetic cases (top left), we can see again that as n^\hat{n} increases, the gradients steepen in the source region, and flatten in the SOL region. In the electrostatic cases (bottom left), there is little change in the profiles as n^\hat{n} increases. Since the collisionality is the only parameter changing with n^\hat{n} in the electrostatic cases, this indicates that collisions are not playing a major role in changing the dynamics (at least at the 10% reduced collisionality that we use here). Thus we are effectively isolating changes in dynamics due to electromagnetic effects as we scan n^\hat{n}. Even if the profiles look relatively similar, the changes in the gradients in the electromagnetic cases are still significant. On the right side of Fig. 4.16 we compute the inverse pressure gradient scale length, Lp1=lnβeL_{p}^{-1}=-\nabla_{\perp}\ln\beta_{e}. Since larger values of Lp1L_{p}^{-1} indicate steeper gradients, we can again see that increasing n^\hat{n} gives steeper gradients in the source region, but only in the electromagnetic cases. Plotting the maximum gradient values in Fig. 4.17, we see that the gradients in the source region increase by about 60%60\% over the electromagnetic n^\hat{n} scan, while there is no change in the electrostatic cases. In the SOL region the gradients decrease with n^\hat{n} in the electromagnetic cases; after plotting the minimum values of Ln1L_{n}^{-1} in Fig. 4.17, we see that the SOL gradients fall by about 50%50\% over the scan. In the n^=10\hat{n}=10 case, the ratio between the gradients in the source region and the SOL region is 6\sim 6, while in the electrostatic case the ratio is only 2\sim 2. A decrease in pressure gradient with increasing β\beta is consistent with the results of Halpern et al. (2013), which showed (in a circular-flux-surface geometry with a limiter on the high-field side) that there is transition between resistive and ideal ballooning modes at some critical βe\beta_{e} that leads to flattening due to increased transport.

We should note that experimental SOL profiles on NSTX are much steeper, falling off to near zero within a few centimeters of the last-closed-flux-surface. There are many effects that we are not currently modeling that could reduce transport and make the profiles steeper, including using the magnetic geometry from the experiment with magnetic shear and an X-point. This is left to future work (with some preliminary results including magnetic shear shown in Section 5.2), and so for now we do not expect agreement between our profiles and the experiment. Nonetheless, we can still investigate interesting physical aspects of the simulations and the influence of electromagnetic effects on the dynamics.

4.3.2 Interchange instability and E×BE\times B shear stabilization

All of these cases are unstable to the interchange mode due to (constant) unfavorable curvature in our helical magnetic geometry. The ideal interchange growth rate is γint=2cs/RLp\gamma_{\mathrm{int}}=\sqrt{2}c_{s}/\sqrt{RL_{p}}, and the modes are constant along the field line so that k=0k_{\parallel}=0. This is analogous to the Rayleigh-Taylor instability in fluid dynamics, with unfavorable magnetic curvature giving an effective gravity geff=2cs2/Rg_{\mathrm{eff}}=2c_{s}^{2}/R. On open field lines that end on conducting plates, true k=0k_{\parallel}=0 ideal interchange modes are not possible because this would imply Φ=\Phi= const everywhere (since Φ=\Phi= const on the plates). One way to restore interchange dynamics is to consider sheath effects, which allow jumps in the potential near the ends so that we can have k0k_{\parallel}\sim 0 in the interior with a finite electric field. The interchange growth rate can be reduced at low kρk_{\perp}\rho due to sheath boundary conditions when the current to the sheath is large, but this does not change the stability threshold (Myra et al., 1997); for a nice derivation of this effect, see Shi (2017). In Fig. 4.19, we show the effective ideal interchange growth rate, γint,eff=max(2cs/RLp)\gamma_{\mathrm{int,eff}}=\max(\sqrt{2}c_{s}/\sqrt{RL_{p}}), for each electromagnetic and electrostatic case, computed using the maximum value of γint\gamma_{\mathrm{int}} in the source region in each case. This does not account for stabilization from sheath-connection or possible electromagnetic effects. The effective interchange growth rate increases by about 20% with increasing n^\hat{n} in the electromagnetic cases, and stays relatively constant in the electrostatic cases. The fact that the effective ideal growth rate increases with n^\hat{n} suggests that there is some stabilizing effect due to electromagnetic effects that allows the gradients to steepen.

It is well known that the interchange mode can also be stabilized by shear in the velocity of plasma flows. A recent study by Zhang et al. (2020) that uses a constant effective gravity (like our constant curvature in helical geometry) and a pedestal-like density profile that has radial variation in both the density and its gradient appears particularly relevant to our results. In that work it was found that short wavelength interchange modes are very efficiently stabilized by E×BE\times B shear if the shearing rate ωE×B=vE\omega_{E\times B}=v_{E}^{\prime} is comparable to (but not necessarily larger than) the interchange growth rate, with significant stabilization at ωE×B/γint0.4\omega_{E\times B}/\gamma_{\mathrm{int}}\sim 0.4. Recent work by Goldston & Brown (2020) has suggested that this stabilization effect could have important implications for the trigger for pedestal formation in the L-H transition.

Refer to caption
Figure 4.18: Effective ideal interchange growth rates for the electromagnetic (EM) and electrostatic (ES) cases as a function of n^\hat{n}. The growth rate has been computed using the maximum value of Lp1L_{p}^{-1} in the source region for each case. In the electromagnetic cases, the growth rate increases by about 20% with increasing n^\hat{n}, while in the electrostatic cases the growth rate stays roughly constant with n^\hat{n}. These effective growth rates do not account for stabilization from sheath-connection or possible electromagnetic effects.
Refer to caption
Figure 4.19: Ratio of the average E×BE\times B shearing rate (which varies radially), ωE×B\omega_{E\times B}, to the effective interchange growth rate, γint,eff\gamma_{\mathrm{int,eff}}.

In Fig. 4.19, we show the ratio of the average E×BE\times B shearing rate (which varies radially) to the growth rate, ωE×B/γint,max\omega_{E\times B}/\gamma_{\mathrm{int,max}} for the electromagnetic and electrostatic cases. In the electrostatic cases (right), the ratio peaks in all cases near x=1.34x=1.34 m, with the ratio decreasing somewhat with n^\hat{n}. In the electromagnetic cases, the peak in the ratio shifts radially inward in the higher n^\hat{n} cases, so that the peak is just outside the source region near x=1.32x=1.32 m in these cases. This is also the radial location where the gradients begin to steepen in the high-n^\hat{n} electromagnetic cases, as shown in Fig. 4.16. Thus it is plausible that elevated E×BE\times B shear just outside the source region is producing stabilization of the interchange mode. The gradients are then able to steepen until the interchange mode is destabilized again with a growth rate large enough to overcome the E×BE\times B shearing. Determining why the peak in the shearing rate moves radially inward in the electromagnetic cases is an important issue requiring further investigation. Another possibility is that electromagnetic effects result in a change in the mode structure that allows steeper gradients. Since typically ϕTe\phi\sim T_{e}, an increase in Te′′T_{e}^{\prime\prime} that results from a steepening gradient could result in increased E×BE\times B shear. These two proposed mechanisms can also form a feedback loop, so it can be difficult to establish causality without identifying the initial trigger for the loop. Nonetheless, it is clear that electromagnetic effects are playing a key role since this behavior is not seen in the electrostatic cases. This mechanism has potential importance for pedestal formation and the L-H transition.

4.3.3 Destabilization of ballooning-type modes

In the electromagnetic cases, ballooning-type modes with finite kk_{\parallel} can be destabilized as β\beta (or more precisely, the gradient of β\beta) increases. In the core, the ideal ballooning stability parameter is typically defined as α=q2Rβ=q2Rβ/Lp\alpha=-q^{2}R\nabla_{\perp}\beta=q^{2}R\beta/L_{p}, where qq is the safety factor, RR is the major radius, and β=βi+βe\beta=\beta_{i}+\beta_{e} is total plasma β\beta. From the simplified ideal MHD ballooning mode equation in circular geometry (Coppi, 1977; Connor et al., 1978; Freidberg, 2014), we have

θ[(1+Λ2)Xθ]+α[ω^2(1+Λ2)+(Λsinθ+cosθ)]X=0,\frac{\partial}{\partial\theta}\left[(1+\Lambda^{2})\frac{\partial X}{\partial\theta}\right]+\alpha\left[\hat{\omega}^{2}\left(1+\Lambda^{2}\right)+(\Lambda\sin\theta+\cos\theta)\right]X=0, (4.19)

where X=X(θ)X=X(\theta) is the eigenfunction with θ\theta is the ballooning angle, and Λ=s^θαsinθ\Lambda=\hat{s}\theta-\alpha\sin\theta with s^=(r/q)dq/dr\hat{s}=(r/q)\textnormal{d}q/\textnormal{d}r the magnetic shear. From this one can obtain the complex frequency of the ballooning mode, ω^ω/γint\hat{\omega}\equiv\omega/\gamma_{\mathrm{int}}. In the core, ballooning is the result of unfavorable magnetic curvature on the outboard (low-field) side of the tokamak and favorable curvature on the inboard (high-field) side. This means the mode is most unstable on the outboard side, resulting in eigenmodes that peak (or balloon) on the outboard side. For circular flux surfaces, this variation in the curvature (and hence the ballooning drive) is given by the sinusoidal terms in Eq. 4.19, with θ=0\theta=0 the outboard side where cosθ\cos\theta is maximized.

In our simple helical geometry, we neglect magnetic shear and Shafranov shift (Λ=0\Lambda=0). We also have no favorable curvature, so that we take θ=0\theta=0 in the curvature term; our entire domain is effectively on the outboard side. Transforming the ballooning coordinate to be the length along the field line via z=qRθz=qR\theta, the result is the simple equation

2Xz2+αq2R2(ω^2+1)X=0.\frac{\partial^{2}X}{\partial z^{2}}+\frac{\alpha}{q^{2}R^{2}}(\hat{\omega}^{2}+1)X=0. (4.20)

If we have constant curvature and no favorable curvature region, why should we have ballooning? The answer lies in the boundary condition along the field line. We have open field lines that end on conducting plates, resulting in line-tying. This means the footpoints of the field lines stay relatively fixed, while near the midplane the field lines are free to bend and bow with the plasma, as we saw in Figs. 4.8 and 4.8. The result is the line-tied ballooning mode (Cowley, 1985; Cowley & Artun, 1997; Zhu et al., 2006).

As a simple way to account for line-tying, we can constrain the eigenmode to vanish at the ends of our finite domain at z=±Lz/2z=\pm L_{z}/2. This means that the eigenmode is constrained to be a Fourier mode with wavenumber k=π/Lzk_{\parallel}=\ell\pi/L_{z}, with \ell some integer, so that we have

k2=αq2R2(ω^2+1)k_{\parallel}^{2}=\frac{\alpha}{q^{2}R^{2}}(\hat{\omega}^{2}+1) (4.21)

To find the critical value of α\alpha for instability, we take =1\ell=1 to get the lowest kk_{\parallel} eigenmode that has a zero crossing at the ends of the domain. This gives

αq2R2(ω^2+1)=(πLz)2.\frac{\alpha}{q^{2}R^{2}}(\hat{\omega}^{2}+1)=\left(\frac{\pi}{L_{z}}\right)^{2}. (4.22)

Defining a new α\alpha-like parameter for our helical SMT geometry,

αSMTLz2π2αq2R2=Lz2π2βe+βiRLp,\alpha^{\mathrm{SMT}}\equiv\frac{L_{z}^{2}}{\pi^{2}}\frac{\alpha}{q^{2}R^{2}}=\frac{L_{z}^{2}}{\pi^{2}}\frac{\beta_{e}+\beta_{i}}{RL_{p}}, (4.23)

the ideal ballooning instability growth rate is

γbal=γint11αSMT.\gamma_{\mathrm{bal}}=\gamma_{\mathrm{int}}\sqrt{1-\frac{1}{\alpha^{\mathrm{SMT}}}}. (4.24)

This gives an instability threshold of αSMT1\alpha^{\mathrm{SMT}}\gtrsim 1. The growth rate is below the ideal interchange growth rate for all αSMT\alpha^{\mathrm{SMT}}, approaching γint\gamma_{\mathrm{int}} from below for αSMT1\alpha^{\mathrm{SMT}}\gg 1. Halpern et al. (2013) showed a similar calculation for circular flux surfaces, and also showed that the threshold can be lowered due to non-ideal effects not captured in the simple derivation above. Additional sheath-related modifications could also be required, similar to the sheath-modified interchange mode (Myra et al., 1997).

Refer to caption
Figure 4.20: Ballooning stability parameter αSMT=(Lz/π)2(βe+βi)/(RLp)\alpha^{\mathrm{SMT}}=(L_{z}/\pi)^{2}(\beta_{e}+\beta_{i})/(RL_{p}) for each of the electromagnetic cases. The ballooning stability threshold αSMT=1\alpha^{\mathrm{SMT}}=1 is shown by the horizontal dash-dotted line. All but the n^=1\hat{n}=1 case are near or above the instability threshold in the source region, indicating that ballooning-type modes are destabilized.
Refer to caption
Figure 4.21: Radial profiles of rms=krmsLz/π\ell_{\mathrm{rms}}=k_{\parallel\mathrm{rms}}L_{z}/\pi, computed using fluctuations in the electron density (left), electron temperature (middle), and potential (right). In the electromagnetic cases (top row), krmsk_{\parallel\mathrm{rms}} peaks in the source region and increases with n^\hat{n}, consistent with ballooning-type modes becoming destabilized in the source region. In the electrostatic cases krmsk_{\parallel\mathrm{rms}} does not change with n^\hat{n}, and stays at or below the levels of the n^=1\hat{n}=1 electromagnetic case, with very low levels for the temperature and potential fluctuations indicating that interchange modes (k=0)(k_{\parallel}=0) are dominant.

In Fig. 4.20 we plot radial profiles of the αSMT\alpha^{\mathrm{SMT}} parameter for each of the electromagnetic cases. In the source region, all but the n^=1\hat{n}=1 case are near or above the αSMT1\alpha^{\mathrm{SMT}}\gtrsim 1 threshold for ballooning instability, indicated in the plot with a dot-dashed line. This means that ballooning-type modes with finite kk_{\parallel} are destabilized in these cases.

We can also compute a measure of the root-mean-square (RMS) kk_{\parallel} in the fluctuations of field ff as

rms[f]=Lzπkrms[f]=Lzπ1f~rms(f~z)rms\ell_{\mathrm{rms}}[f]=\frac{L_{z}}{\pi}k_{\parallel\mathrm{rms}}[f]=\frac{L_{z}}{\pi}\frac{1}{\tilde{f}_{\mathrm{rms}}}\left(\frac{\partial\tilde{f}}{\partial z}\right)_{\mathrm{rms}} (4.25)

In Fig. 4.21, we compute radial profiles of this quantity for electron density, electron temperature, and potential fluctuations (i.e., f=ne,Te,Φf=n_{e},T_{e},\Phi). The top row shows the electromagnetic simulations and the bottom row shows the electrostatic ones. The trend is most noticeable in the temperature and potential fluctuations, with krmsk_{\parallel\mathrm{rms}} peaking in the source region and increasing with n^\hat{n} in the electromagnetic cases, consistent with ballooning-type modes becoming destabilized in the source region. In the electrostatic cases krmsk_{\parallel\mathrm{rms}} stays at or below the levels of the n^=1\hat{n}=1 electromagnetic case for all n^\hat{n}, indicating that the transition to ballooning-type modes is a purely electromagnetic effect. While we expect finite kk_{\parallel} for the density fluctuations even in the electrostatic cases due to the parallel variations in the background density (and its gradient), the temperature and potential fluctuations show k0k_{\parallel}\sim 0 interchange modes are dominant in the electrostatic cases.

4.3.4 Particle balance and transport

The profiles in the SOL are set by a balance between the sources, cross-field (perpendicular) transport, and parallel transport, including parallel end losses to the walls. That is, in quasi-steady state, we have

𝚪=𝚪+Γ=S,\nabla\boldsymbol{\cdot}\mbox{\boldmath${\Gamma}$}=\nabla_{\perp}\boldsymbol{\cdot}\mbox{\boldmath${\Gamma}$}_{\perp}+\nabla_{\parallel}\Gamma_{\parallel}=S, (4.26)

where 𝚪{\Gamma} is the particle flux with perpendicular and parallel components 𝚪\mbox{\boldmath${\Gamma}$}_{\perp} and Γ\Gamma_{\parallel}, and SS is the particle source. Since our numerical scheme conserves particles (and energy) both locally and globally, we are able to examine this particle balance and its consequences carefully. Recall that our radial boundary conditions are such that particles cannot leave through the side walls222In tokamak experiments there can be net particle and heat fluxes to the first wall, which can be concerning for large filaments and ELMs. Apart from large heat loads, this can also lead to main-chamber recycling that can degrade performance. This should be included in future models., so all losses are at the sheath entrances. Without cross-field transport upstream, the parallel fluxes to the endplates would have the same narrow footprint as the source in the simulations. Consequently, the widening of the footprint effectively gives the end result of the competition between upstream parallel and cross-field transport. In the following two sections we will examine the cross-field (perpendicular) and parallel particle transport.

Cross-field (perpendicular) particle transport

We compute the time- and yy-averaged midplane profiles of cross-field (perpendicular, with respect to the background magnetic field) particle flux for the electromagnetic cases in Fig. 4.22(aa), normalized in each case by n^\hat{n}. This is defined as

Γe=n~ev~r+neue~br\displaystyle\Gamma_{\perp e}=\langle\tilde{n}_{e}\tilde{v}_{r}\rangle+\langle\widetilde{n_{e}u_{\parallel e}}b_{r}\rangle (4.27)

where the first term is the contribution from the E×BE\times B drift, with vr=Er/B=(1/B)Φ/yv_{r}=E_{r}/B=-(1/B)\partial\Phi/\partial y, and the second term is the flux due to magnetic flutter, with br=(1/B)A/yb_{r}=(1/B)\partial A_{\parallel}/\partial y. The tilde indicates the fluctuation of a time-varying quantity, defined as A~=AA¯\tilde{A}=A-\bar{A} with A¯\bar{A} the time average of AA. The brackets A\langle A\rangle denote an average in yy and time. The radial particle flux at the midplane scales linearly with source power, with very little change in the radial profile after scaling by n^\hat{n}. We would also see little difference if we directly compared the radial particle flux profiles between each electrostatic and electromagnetic case. Given the differences in the profiles and gradients we saw in Fig. 4.15 and Fig. 4.16, it is perhaps somewhat surprising that as n^\hat{n} varies there are no differences in the profiles of radial particle flux at the midplane. In the core, where there is a clear scale separation in length scales between background and fluctuations, a linear flux-gradient parametrization of the transport in terms of an effective diffusivity DD_{\perp} and effective convective velocity VV_{\perp} can be justified, resulting in

Γ=nVDn.\Gamma_{\perp}=nV_{\perp}-D_{\perp}\nabla_{\perp}n. (4.28)

From this, one might expect that if gradients increase at constant flux then the diffusion coefficient must decrease (due to a mode transition, for example), and vice versa. In principle, the mode transition from interchange to ballooning that we observed in the previous section could result in a change in the diffusion coefficient. However, in the edge/SOL we do not have the scale separation required for this simple transport characterization, resulting in non-diffusive transport with large fluctuations and significant intermittency (Naulin, 2007).

Refer to caption
Figure 4.22: Electron radial particle flux (normalized to n^\hat{n}) (a)(a), effective diffusion coefficient (b)(b), and effective convective velocity (c)(c) at the midplane for the electromagnetic cases. This includes transport contributions from E×BE\times B drifts and magnetic flutter. After normalizing the particle fluxes to n^\hat{n} there is very little change in the radial profiles, so the particle flux scales linearly with n^\hat{n}. The effective diffusion coefficient increases by an order of magnitude from the source region to the SOL region. Also shown is the Bohm diffusion coefficient DBohm=116TeeB5D_{\mathrm{Bohm}}=\frac{1}{16}\frac{T_{e}}{eB}\sim 5 m/2{}^{2}/s. The peak in the effective convective velocity just outside the source region is slightly higher in the higher n^\hat{n} cases, which could indicate more convective blob transport due to sheath disconnection. Overall, the strong radial variation in these effective transport coefficients suggests that a simple linear flux-gradient relationship is not adequate.
Refer to caption
Figure 4.23: Flux-gradient relationships for the electromagnetic cases, computed using the time-averaged radial profiles of density and particle flux evaluated at each radial grid point. In each case, the starting point (around 600 on the yy-axis) represents data taken at x=1.3x=1.3 m, with xx increasing moving along each line until the endpoints (below 400 on the yy-axis) representing data at x=1.39x=1.39 m. The flux-gradient relationship is clearly nonlinear, indicating that the transport cannot be simply characterized in terms of an effective diffusion coefficient and a convective velocity. For reference, the effective flux from Bohm diffusion is also shown (brown dashed).

In Fig. 4.22(b)(b) and (c)(c) we compute the effective flux-gradient parametrization parameters via

Deff=Γe/ne\displaystyle D_{\perp\mathrm{eff}}=-\Gamma_{\perp e}/\nabla_{\perp}n_{e} (4.29)
Veff=Γe/ne.\displaystyle V_{\perp\mathrm{eff}}=\Gamma_{\perp e}/n_{e}. (4.30)

The large radial variation of these quantities suggests that the transport is inherently non-local, so that the transport is not determined by local background gradients but induced by propagating coherent structures (Xu et al., 2010). We also plot Γ/n\Gamma_{\perp}/n versus lnn\nabla_{\perp}\ln n in Fig. 4.23, with the data taken from each radial point in the profiles. If we had diffusive transport so that the flux-gradient relationship was linear, one would expect that as the gradient increases the flux should also increase, and one could evaluate the coefficients VV_{\perp} and DD_{\perp} based on a linear fit. We see no such linear relationship, which is further indication that the transport is non-diffusive and non-local.

Refer to caption
Figure 4.24: Difference in perpendicular particle transport between corresponding electromagnetic and electrostatic cases in the xzx-z plane for n^=1,3.5,10\hat{n}=1,3.5,10 cases, normalized to the flux from the electromagnetic case. Blue regions indicate Γ,ES>Γ,EM\Gamma_{\perp,ES}>\Gamma_{\perp,EM}, while red regions indicate Γ,ES<Γ,EM\Gamma_{\perp,ES}<\Gamma_{\perp,EM}. Near the midplane (z=0)(z=0) the transport is roughly the same in the electromagnetic and electrostatic cases, consistent with the results of Fig. 4.22. However, off-midplane there is some reduction in the perpendicular transport in the SOL region in the higher n^\hat{n} cases. There is also a small region near the endplates in the source region where the transport is larger in the electromagnetic cases. The black dotted line indicates the boundary of the source region.

To better understand differences in perpendicular particle transport between the electromagnetic and electrostatic cases, in Fig. 4.24 we compute the difference between the electromagnetic and electrostatic Γe\Gamma_{\perp e} in the xzx-z plane, averaged over yy and time, normalized to the electromagnetic flux Γ,EM\Gamma_{\perp,EM}. Here, regions where the perpendicular particle flux is larger in the electrostatic case than in the corresponding electromagnetic case are indicated in blue (Γ,ES>Γ,EM\Gamma_{\perp,ES}>\Gamma_{\perp,EM}), while red regions indicate the opposite (Γ,ES<Γ,EM\Gamma_{\perp,ES}<\Gamma_{\perp,EM}). Near the midplane (z=0z=0) the transport is roughly the same between each corresponding electrostatic and electromagnetic case, consistent with the results of Fig. 4.22. Off-midplane there is some reduction in transport in the SOL region in the high n^\hat{n} cases.

Refer to caption
Figure 4.25: Radial electron particle fluxes for the electromagnetic cases normalized to n^\hat{n}, evaluated at x=1.32x=1.32 m (just outside the source region) and plotted as a function of the distance along the field line, zz. Magnetic flutter transport (dash-dotted) becomes stronger relative to the total transport as n^\hat{n} increases, resulting in a slight reduction in cross-field transport off-midplane at higher n^\hat{n}.
Refer to caption
Figure 4.26: Electrostatic-electromagnetic comparison of radial electron particle fluxes for the n^=10\hat{n}=10 case, evaluated at x=1.32x=1.32 m (just outside the source region) and plotted as a function of the distance along the field line, zz. In the electromagnetic case (EM), we have broken the total transport into E×BE\times B (dashed) and flutter (dot-dashed) components. Radially-inward magnetic flutter transport peaking near z=±2z=\pm 2 reduces the net radially-outward transport off-midplane.

To investigate this further, in Fig. 4.26 we show the radial particle fluxes as a function of the distance along the field line, zz, evaluated just outside the source region at x=1.32x=1.32 m and normalized to n^\hat{n}. As n^\hat{n} increases, the particle flux falls off more quickly along the field line. This is despite the fact that the E×BE\times B fluxes remain near the levels seen in the electrostatic cases, as shown in an electrostatic-electromagnetic comparison of the n^=10\hat{n}=10 case in Fig. 4.26. The differences can be attributed to magnetic flutter transport (dotted lines) along the perturbed field lines becoming stronger (relative to the total radial transport) with increasing n^\hat{n}; here, negative values indicate radially inward transport.

Refer to caption
Figure 4.27: RMS fluctuation amplitude of magnetic perturbations, δB/B0\delta B_{\perp}/B_{0}, normalized to n^\hat{n}, evaluated at x=1.32x=1.32 m (just outside the source region) and plotted as a function of the distance along the field line, zz. The fluctuation amplitude scales well with n^\hat{n}.
Refer to caption
Figure 4.28: Particle flux due to magnetic flutter, evaluated at x=1.32x=1.32 m (just outside the source region) and plotted as a function of the distance along the field line, zz. Here we have normalized to n^2\hat{n}^{2}, indicating that the flutter transport roughly scales with n^2\hat{n}^{2}.

Radial magnetic flutter transport is the result of parallel motion along radially perturbed field lines, and is given by

Γflutter=neue~br\displaystyle\Gamma_{\mathrm{flutter}}=\langle\widetilde{n_{e}u_{\parallel e}}b_{r}\rangle (4.31)

In our system, as a blob is transported radially outwards by the E×BE\times B drift, it can drag the field lines with it at higher β\beta. However, the footpoints of the field lines are relatively fixed due to line-tying, so the field lines bow out radially at the midplane, as can be seen in Fig. 4.8bb. As particles travel from the midplane to the end plates along these bowed field lines, they are moving radially inward. This flutter transport cancels out some of the radially outward E×BE\times B transport at the midplane, resulting in a net reduction of radial transport off-midplane. To better understand the scaling of the flutter transport, we compute the RMS amplitude of the magnetic fluctuations along the field line at x=1.32x=1.32 m in Fig. 4.28. We see that the fluctuations scale well with n^β\hat{n}\sim\beta, where we have normalized to n^\hat{n} in the plot. Since the flutter transport is roughly proportional to neδBn_{e}\delta B_{\perp}, and both nen_{e} and δB\delta B_{\perp} scale linearly with n^\hat{n}, this means we might expect that the flutter transport scales roughly with n^2\hat{n}^{2}. In Fig. 4.28 we see that when we normalize the flutter profiles along the field line from Fig. 4.26 by n^2\hat{n}^{2} instead of n^\hat{n}, the flutter transport is indeed roughly scaling with n^2\hat{n}^{2}.

Parallel particle transport: particle fluxes to the endplates
Refer to caption
Figure 4.29: Parallel electron particle fluxes to the lower endplate, Γ,eend\Gamma_{\parallel,e}^{\mathrm{end}}, for n^={1,3.5,10}\hat{n}=\{1,3.5,10\}. As n^\hat{n} increases in the electromagnetic cases, reduced radial transport upstream due to magnetic flutter results in 10%\sim 10\% higher peak particle fluxes than in the corresponding electrostatic cases, peaked near x=1.3x=1.3 m (the source peak).

We examine the parallel electron particle fluxes to the lower endplate at z=Lz/2z=-L_{z}/2 in Fig. 4.29 (with the fluxes to the upper endplate nearly identical). This is defined as

Γ,eend=𝒥feh𝑹˙h𝐛^dxdyd3𝒗|z=Lz/2.\displaystyle\Gamma^{\mathrm{end}}_{\parallel,e}=\Big{\langle}\int{\mathcal{J}f_{e\,h}}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\mathbf{\hat{b}}\,\textnormal{d}x\,\textnormal{d}y\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\Big{|}_{z=-L_{z}/2}\Big{\rangle}. (4.32)

Note that this counts only the net flux of high energy electrons that can overcome the sheath potential. When we integrate the resulting profiles in xx, we obtain an integrated lower particle flux that is approximately half the integrated particle source rate (with the other half due to the upper particle flux), indicating that we have a steady state with the sources balanced by parallel end losses (recalling that there are no perpendicular losses to the radial boundaries here).

As n^\hat{n} increases in the electromagnetic cases, reduced radial transport upstream due to magnetic flutter results in 10%\sim 10\% higher peak particle fluxes than in the corresponding electrostatic cases, peaked near x=1.3x=1.3 m (the source peak). There is virtually no change in the profiles in the electrostatic cases other than scaling with n^\hat{n}. In each case there is also a second, smaller peak in the SOL region, with this peak slightly lower in the electromagnetic cases than in the electrostatic ones. This second peak is likely due to end losses from blobs that escape the source region and propagate some finite distance into the SOL region. That the electromagnetic fluxes are higher in the source region and slightly lower in the remainder of the domain is consistent with less upstream cross-field transport in the electromagnetic cases. Note that while the width of the flux profiles in the source region is certainly influenced by the width of the source, the shape of the source is identical for all cases. This means that the (relative) differences in the widths and heights of the profiles are physical. Nonetheless, since the absolute peak values and widths are sensitive to the source parameters, a comparison to experimental divertor fluxes is out of the scope of this work; this would likely require the inclusion of closed-field-line regions, since most of the sourcing of particles (and heat) is on closed field lines in tokamaks.

4.3.5 Heat fluxes to the endplates

A critical issue for future tokamak experiments and reactors is the heat exhaust problem, with large heat loads posing a risk to the survivability of the device walls. Thus it is important to develop high-fidelity modeling capability to be able to predict the heat loads and heat-flux widths on the divertor plates. While our present simulations do not have the realistic X-point geometry (including both closed- and open-field-line regions) or neutral particle dynamics required to produce experimentally-relevant heat flux predictions, we can still examine the heat flux profiles that result from our simulations. We can compute the total (ion plus electron) heat flux to the lower endplate at z=Lz/2z=-L_{z}/2 via

Qend=sHsh𝒥fsh𝑹˙h𝐛^dxdyd3𝒗|z=Lz/2.Q^{\mathrm{end}}_{\parallel}=\sum_{s}\Big{\langle}\int H_{s\,h}\mathcal{J}f_{s\,h}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\mathbf{\hat{b}}\,\textnormal{d}x\,\textnormal{d}y\,\textnormal{d}^{3}\mbox{\boldmath${v}$}\Big{|}_{z=-L_{z}/2}\Big{\rangle}. (4.33)

Here, we include the potential energy via the Hamiltonian to account for slowing of electrons as they climb the potential drop from the sheath entrance to the grounded wall. We plot the radial profiles of this quantity for the n^={1,3.5,10}\hat{n}=\{1,3.5,10\} electromagnetic and electrostatic cases in Fig. 4.30. Like in the previous section, the peak flux increases in the electromagnetic cases relative to the electrostatic cases as n^\hat{n} increases, with a 20%\sim 20\% higher peak in the n^=10\hat{n}=10 case. Again, this is consistent with upstream cross-field transport being reduced by electromagnetic effects.

Refer to caption
Figure 4.30: Total (ion plus electron) heat fluxes to the lower endplate, QendQ^{\mathrm{end}}_{\parallel}, for n^={1,3.5,10}\hat{n}=\{1,3.5,10\}. As n^\hat{n} increases in the electromagnetic cases the peak heat flux increases relative to the electrostatic cases, with a 20%\sim 20\% higher peak in the n^=10\hat{n}=10 case.

4.3.6 Fluctuation statistics

Experimental measurements have shown that the SOL is characterized by large, intermittent fluctuations. We compare fluctuation statistics between the electromagnetic and electrostatic n^=10\hat{n}=10 cases in Fig. 4.31. Statistics of the electron density are shown on the top row, the middle row shows statistics of electrostatic potential fluctuations and the bottom row shows statistics of the radial electron particle flux. All statistics are averaged over yy and zz near the midplane. The root-mean-square (RMS) density fluctuation level nrms/n¯n_{rms}/\bar{n} is at least 20% throughout the domain in both cases, consistent with the large fluctuations observed in experiments. Despite the fact that the electromagnetic and electrostatic cases show the same level of particle transport at the midplane, the RMS density fluctuations are slightly larger in the electromagnetic case. Meanwhile the RMS relative potential fluctuations are slightly smaller in the electromagnetic case. Since intermittency is a key feature of SOL transport observed in experiments, we also measure the skewness and excess kurtosis of the fluctuations. Positive values of these higher-order statistics generally indicate more intermittency. Both cases show comparable levels of skewness and excess kurtosis of the density fluctuations. The potential fluctuations seem to be more intermittent in the electrostatic case, with higher skewness and kurtosis in much of the domain. On the bottom row, we see that the electromagnetic case has some larger particle flux fluctuations approaching the far edge of the domain. In both the electromagnetic and electrostatic cases the particle flux is also intermittent, perhaps slightly more so in the electrostatic case, as indicated by positive skewness and kurtosis in much of the domain.

Refer to caption
Figure 4.31: Electrostatic-electromagnetic comparison of fluctuation statistics of the electron density, the electrostatic potential, and the electron particle flux for the n^=10\hat{n}=10 case.
Refer to caption
Figure 4.32: Components of the radial E×BE\times B particle flux, Γn,r=ne,rmsvr,rmscosα\Gamma_{n,r}=n_{e,\text{rms}}v_{r,\text{rms}}\cos\alpha, where cosα\cos\alpha measures the phase between the density and E×BE\times B fluctuations.

It is perhaps somewhat counter-intuitive that even though the density fluctuations are slightly larger in the electromagnetic case, the resulting transport is the same. The radial E×BE\times B particle flux can also be written as Γ,E×B=ne,rmsvr,rmscosα\Gamma_{\perp,E\times B}=n_{e,\text{rms}}v_{r,\text{rms}}\cos\alpha, where cosαn~ev~r/(ne,rmsvr,rms)\cos\alpha\equiv\langle\tilde{n}_{e}\tilde{v}_{r}\rangle/(n_{e,\text{rms}}v_{r,\text{rms}}) accounts for the phase between density and E×BE\times B velocity fluctuations. Fig. 4.32 shows these three components of Γ,E×B\Gamma_{\perp,E\times B} for the n^=10\hat{n}=10 case. Despite the electromagnetic case having slightly larger density fluctuations and better correlation between the density and E×BE\times B fluctuations in most of the domain, the resulting particle flux is identical in both cases, this is offset by reduced E×BE\times B fluctuation amplitude in the electromagnetic case.

4.4 Summary of results

In this chapter we presented the first electromagnetic gyrokinetic simulations on open field lines. We showed that large magnetic fluctuations on the order δB/B1%\delta B_{\perp}/B\sim 1\% can be handled in a stable and efficient manner. This is critical for enabling the study of electromagnetic effects in the edge and SOL, which are expected to be important for phenomena such as ELMs and the pedestal.

In Section 4.2 we showed a preliminary set of simulations, one electromagnetic and one electrostatic, and examined qualitative differences in the dynamics. In the electromagnetic case, we traced the perturbed magnetic field lines and found that they can be bent and stretched significantly by the plasma motion at high β\beta. We found that blobs spin in the electrostatic case due to adiabatic electron dynamics. In the electromagnetic case the electron response is non-adiabatic and the blobs propagate ballistically radially outwards, suggesting electrical disconnection from the sheath. The dynamics observed here could be relevant for high β\beta blobs and ELMs, which involve high β\beta filament-like structures that carry significant uni-directional current.

In Section 4.3, we performed a study of the effects of increasing β\beta on the SOL dynamics. At higher β\beta, the influence of electromagnetic effects became stronger, resulting in steepening of pressure gradients near the source region and flattening of gradients in the remainder of the domain. The interplay between steepening pressure gradients in the source region and increased E×BE\times B shear just outside the source region could be relevant for pedestal formation and the L-H transition. We also observed a transition from interchange-like modes with k0k_{\parallel}\sim 0 to ballooning-like modes with finite kk_{\parallel} as pressure gradients (αSMT)(\alpha^{\mathrm{SMT}}) increased above the ballooning stability threshold in the source region. While cross-field perpendicular transport at the midplane was unaffected by increasing β\beta, the transport was reduced off-midplane by magnetic flutter in the higher β\beta cases due to line bending. This resulted in the parallel particle and heat fluxes to the endplates being more peaked in the electromagnetic cases.

One might note that at the nominal experimental source power (n^=1)(\hat{n}=1), we observed electromagnetic effects to be mostly unimportant, and that we needed to scale up the source power (β\sim\beta) by a factor of 3-10 to see electromagnetic effects impact the dynamics. While this is true in the simple setup that we have considered here, in a real experiment there are other effects that could make electromagnetic dynamics important at the experimental β\beta levels. These include steeper pressure gradients, stronger magnetic fields, longer connection lengths, and magnetic shear, all of which could push the system into a more electromagnetic regime at experimental β\beta levels.

Appendix 4.A Note on some results from Mandell et al. (2020)

In Mandell et al. (2020), we presented n^=10\hat{n}=10 results that showed a reduction in radial transport in the electromagnetic case compared to the electrostatic case (see Fig. 10 of Mandell et al. (2020)). After further analysis, we believe that this was a consequence of placing the source region too close to the inner-radial boundary of the simulation. This resulted in fast parallel losses in the cells at the boundary because the Dirichlet condition Φ=0\Phi=0 on the walls meant that there could be no sheath potential to confine particles at the domain edge. In the electromagnetic cases, the issue was exacerbated by radially inward magnetic flutter transport near the boundary, resulting in even more losses from the boundary cells and consequently less perpendicular particle transport. This can be seen in Fig. 4.33. After extending the domain 2 cm radially inward and redoing the simulations, we saw much less difference in particle transport levels between the electromagnetic and electrostatic cases, consistent with the results in the n^=10\hat{n}=10 cases in Section 4.3.

Refer to caption
Figure 4.33: Midplane radial electron particle flux (a)(a) and parallel electron particle flux to the endplate (b)(b) for electromagnetic and electrostatic n^=10\hat{n}=10 cases from Mandell et al. (2020) (see Fig. 10 in that work). In these cases, the source region (gray) was too close to the radial boundary, resulting in fast parallel losses in the boundary cells. Parallel losses were even larger in the electromagnetic case due to radially inward magnetic flutter transport near the boundary. This resulted in less perpendicular particle transport at the midplane in the electromagnetic case. We have redone the simulations with the domain extended 2 cm radially inward and produced results consistent with the results in Section 4.3.

Chapter 5 Generalizing the magnetic geometry: towards a more realistic tokamak scrape-off layer

In this chapter we move towards more realistic tokamak SOL geometry by adopting a generalized field-aligned non-orthogonal coordinate system. Choosing field-aligned coordinates allows one to exploit the elongated nature of the turbulence, which is generally characterized by long wavelengths parallel to the background field and short perpendicular wavelengths (kkk_{\parallel}\ll k_{\perp}). In the local approach employed by several core gyrokinetic codes, the resulting domain is a thin flux tube extended along the field line. In the global approach, the domain remains field aligned, but extends radially to cover some or all of the minor radius of the device. In both approaches, the field-aligned coordinate can be coarse since kkk_{\parallel}\ll k_{\perp}. Thus when the (generalized) poloidal angle is chosen as the field-aligned coordinate, the resulting grid resolution is fine in the radial and toroidal (or binormal) directions to resolve short perpendicular wavelengths and coarse in the poloidal direction. In the toroidal direction, axisymmetry allows one to assume statistical periodicity so that only a fraction (wedge) of the full toroidal direction needs to be resolved, provided the toroidal domain extent is many turbulent correlation lengths wide. This approach has been used successfully by many local and global gyrokinetic codes, with the resulting computational savings comprising one of the main advantages of the field-aligned approach.111Alternatively, the toroidal angle can be used as the coarse field-aligned coordinate. However, in this case the full poloidal angle must be resolved with a fine grid (unlike the toroidal angle, statistical periodicity cannot be used in the poloidal angle to reduce the domain length). This is not as computationally efficient as using the poloidal angle as the field-aligned coordinate.

While a field-aligned coordinate system can be used both in the core and in the SOL, these coordinates are singular on the separatrix for diverted geometries due to the presence of the X-point (Stegmeir et al., 2016). To deal with this issue, recent interest has focused on the flux-coordinate independent (FCI) approach, which abandons field- and flux-aligned coordinates in the poloidal plane but retains a field-line-following discretization of the parallel gradient operator (Hariri & Ottaviani, 2013; Hariri et al., 2014; Stegmeir et al., 2016). This allows a coarse toroidal grid to be used, but still requires fine perpendicular resolution covering the entire poloidal plane. Another recent approach uses a flux-aligned poloidal grid with controlled dealignment near the X-point (McCorquodale et al., 2015; Dorf et al., 2016; Dorf & Dorr, 2020). After breaking the toroidal direction into several blocks (wedges), a local field-aligned coordinate system is used in each block. Interpolation (similar to what is done in the FCI approach) is required to compute the parallel derivatives between blocks.

Addressing the issue of the X-point in the Gkeyll code is left as important future work. All of the approaches detailed above have the disadvantage that a fine grid is required on the entire poloidal plane. To avoid this, one might imagine a cross-separatrix simulation domain composed of a global field-aligned region in the core, a thin non-field-aligned region near the separatrix (perhaps using some version of FCI in this small region), and another field-aligned flux-tube-like region in the SOL. This way, we could keep the advantages of flux tubes for most of the domain, limiting the region needing to be resolved with a fine poloidal grid to the small area near the separatrix. Interpolation between these regions with different coordinate systems and different poloidal resolution would be required and may present challenges.

This chapter takes a step towards these full geometry capabilities. In the first section we express the gyrokinetic system in general field-aligned coordinates. We then focus on how to formulate field-aligned coordinate systems for use in flux-tube-like domains in the SOL in Sections 5.2, 5.3 and 5.4.

5.1 Gyrokinetics in a field-aligned coordinate system

Here we will express the gyrokinetic system in a field-aligned coordinate system. The resulting equations contain various metric-related quantities since the coordinates are non-orthogonal. Many of these metric quantities were dropped in the simple helical geometry used in Chapter 4.

5.1.1 Preliminaries: general non-orthogonal curvilinear coordinates

Suppose we have a coordinate system in 3D space parametrized by coordinates (x,y,z)(x,y,z). If the coordinate system is orthogonal, a vector can be uniquely decomposed in terms of the coordinate basis vectors as 𝒗=vx𝐱^+vy𝐲^+vz𝐳^\mbox{\boldmath${v}$}=v_{x}\mathbf{\hat{x}}+v_{y}\mathbf{\hat{y}}+v_{z}\mathbf{\hat{z}}, where vxv_{x} is the component of the vector in the direction of the 𝐱^\mathbf{\hat{x}} basis vector, and similarly for yy and zz. However, if the coordinate system is non-orthogonal, there are two natural sets of basis vectors, leading to the covariant and contravariant representation of a vector:

𝒗{v} =vxx+vyy+vzz(covariant)\displaystyle=v_{x}\nabla x+v_{y}\nabla y+v_{z}\nabla z\qquad\text{(covariant)} (5.1)
𝒗{v} =vx𝒆x+vy𝒆y+vz𝒆z(contravariant)\displaystyle=v^{x}\mbox{\boldmath${e}$}_{x}+v^{y}\mbox{\boldmath${e}$}_{y}+v^{z}\mbox{\boldmath${e}$}_{z}\qquad\quad\,\text{(contravariant)} (5.2)

In the covariant representation, the (contravariant) basis vectors are the gradient vectors, defined by

𝒆α=α,α=(x,y,z).\qquad\qquad\mbox{\boldmath${e}$}^{\alpha}=\nabla\alpha,\qquad\alpha=(x,y,z). (5.3)

In the contravariant representation, the (covariant) basis vectors are the tangent vectors, defined by

𝒆α=𝑹α,α=(x,y,z),\qquad\qquad\mbox{\boldmath${e}$}_{\alpha}=\frac{\partial\mbox{\boldmath${R}$}}{\partial\alpha},\qquad\alpha=(x,y,z), (5.4)

where 𝑹{R} is the position vector. Note that we will usually opt to use α\nabla\alpha in place of 𝒆α\mbox{\boldmath${e}$}^{\alpha} to denote the gradient basis vectors, but we will continue to use 𝒆α\mbox{\boldmath${e}$}_{\alpha} for the tangent basis vectors.

These basis vectors are neither orthogonal nor unit vectors, which leads to the co- and contravariant metric coefficient tensors, defined by

gαβ\displaystyle g_{\alpha\beta} =𝒆α𝒆β(covariant)\displaystyle=\mbox{\boldmath${e}$}_{\alpha}\boldsymbol{\cdot}\mbox{\boldmath${e}$}_{\beta}\qquad\ \ \,\text{(covariant)} (5.5)
gαβ\displaystyle g^{\alpha\beta} =αβ(contravariant)\displaystyle=\nabla\alpha\boldsymbol{\cdot}\nabla\beta\qquad\text{(contravariant)} (5.6)

These two tensors are inverses of each other, so that (gαβ)=(gαβ)1(g_{\alpha\beta})=(g^{\alpha\beta})^{-1}. The two sets of basis vectors also obey the relationship

α𝒆β=δβα,\nabla\alpha\boldsymbol{\cdot}\mbox{\boldmath${e}$}_{\beta}=\delta^{\alpha}_{\beta}, (5.7)

where δβα\delta^{\alpha}_{\beta} is the Kronecker delta. It follows that the tangent basis vectors can be expressed in terms of the gradient basis vectors as

𝒆x=J(y×z),𝒆y=J(z×x),𝒆z=J(x×y),\mbox{\boldmath${e}$}_{x}=J\left(\nabla y\times\nabla z\right),\qquad\mbox{\boldmath${e}$}_{y}=J\left(\nabla z\times\nabla x\right),\qquad\mbox{\boldmath${e}$}_{z}=J\left(\nabla x\times\nabla y\right), (5.8)

where

J=[(y×z)x]1=[(z×x)y]1=[(x×y)z]1J=\left[\left(\nabla y\times\nabla z\right)\boldsymbol{\cdot}\nabla x\right]^{-1}=\left[\left(\nabla z\times\nabla x\right)\boldsymbol{\cdot}\nabla y\right]^{-1}=\left[\left(\nabla x\times\nabla y\right)\boldsymbol{\cdot}\nabla z\right]^{-1} (5.9)

is the Jacobian of the coordinate system written in terms of the gradient basis vectors. Similarly, we can express the gradient basis vectors as

x=1J(𝒆y×𝒆z),y=1J(𝒆z×𝒆x),z=1J(𝒆x×𝒆y),\nabla x=\frac{1}{J}\left(\mbox{\boldmath${e}$}_{y}\times\mbox{\boldmath${e}$}_{z}\right),\qquad\nabla y=\frac{1}{J}\left(\mbox{\boldmath${e}$}_{z}\times\mbox{\boldmath${e}$}_{x}\right),\qquad\nabla z=\frac{1}{J}\left(\mbox{\boldmath${e}$}_{x}\times\mbox{\boldmath${e}$}_{y}\right), (5.10)

and we can also write the Jacobian in terms of the tangent basis vectors as

J=(𝒆y×𝒆z)𝒆x=(𝒆z×𝒆x)𝒆y=(𝒆x×𝒆y)𝒆z.J=\left(\mbox{\boldmath${e}$}_{y}\times\mbox{\boldmath${e}$}_{z}\right)\boldsymbol{\cdot}\mbox{\boldmath${e}$}_{x}=\left(\mbox{\boldmath${e}$}_{z}\times\mbox{\boldmath${e}$}_{x}\right)\boldsymbol{\cdot}\mbox{\boldmath${e}$}_{y}=\left(\mbox{\boldmath${e}$}_{x}\times\mbox{\boldmath${e}$}_{y}\right)\boldsymbol{\cdot}\mbox{\boldmath${e}$}_{z}. (5.11)

The Jacobian can also be written (up to a sign) via the determinants of the metric tensors,

J=det(gαβ)1/2=det(gαβ)1/2.J=\det(g_{\alpha\beta})^{1/2}=\det(g^{\alpha\beta})^{-1/2}. (5.12)

Finally, note that the co- and contravariant components of a vector can be obtained from vz=𝒗𝒆zv_{z}=\mbox{\boldmath${v}$}\boldsymbol{\cdot}\mbox{\boldmath${e}$}_{z} and vz=𝒗zv^{z}=\mbox{\boldmath${v}$}\boldsymbol{\cdot}\nabla z, and similarly for xx and yy.

We will also make use of the following vector calculus identities for the gradient, divergence, and curl:

f=fxx+fyy+fzz,\displaystyle\nabla f=\frac{\partial f}{\partial x}\nabla x+\frac{\partial f}{\partial y}\nabla y+\frac{\partial f}{\partial z}\nabla z, (5.13)
𝑭=1J[x(JFx)+y(JFy)+z(JFz)],\displaystyle\nabla\boldsymbol{\cdot}\mbox{\boldmath${F}$}=\frac{1}{J}\left[\frac{\partial}{\partial x}\left(JF^{x}\right)+\frac{\partial}{\partial y}\left(JF^{y}\right)+\frac{\partial}{\partial z}\left(JF^{z}\right)\right], (5.14)
×𝑭=1J[(FzyFyz)𝒆x+(FxzFzx)𝒆y+(FyxFxy)𝒆z].\displaystyle\nabla\times\mbox{\boldmath${F}$}=\frac{1}{J}\left[\left(\frac{\partial F_{z}}{\partial y}-\frac{\partial F_{y}}{\partial z}\right)\mbox{\boldmath${e}$}_{x}+\left(\frac{\partial F_{x}}{\partial z}-\frac{\partial F_{z}}{\partial x}\right)\mbox{\boldmath${e}$}_{y}+\left(\frac{\partial F_{y}}{\partial x}-\frac{\partial F_{x}}{\partial y}\right)\mbox{\boldmath${e}$}_{z}\right]. (5.15)

Volume integrals can be expressed as

fd3𝑹=Jfdxdydz,\displaystyle\int f\,\textnormal{d}^{3}\mbox{\boldmath${R}$}=\int Jf\,\textnormal{d}x\,\textnormal{d}y\,\textnormal{d}z, (5.16)

and a surface integral over a constant xx surface is given by

𝑭d𝒔x=J𝑭xdydz=JFxdydz,\displaystyle\int\mbox{\boldmath${F}$}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{x}=\int J\mbox{\boldmath${F}$}\boldsymbol{\cdot}\nabla x\,\textnormal{d}y\,\textnormal{d}z=\int JF^{x}\,\textnormal{d}y\,\textnormal{d}z, (5.17)

and similarly for surface integrals over constant yy and zz surfaces.

For more details about non-orthogonal coordinate systems, see D’haeseleer et al. (1991).

5.1.2 Representation of the background field

In order to take advantage of the fact that turbulent structures are much more elongated along the field line than perpendicular to it (kkk_{\parallel}\ll k_{\perp}), we adopt a field-aligned coordinate system, which we will denote by (x,y,z)(x,y,z). To do this, we write the background magnetic field in Clebsch-like form as

𝑩=𝒞(x)x×y.\mbox{\boldmath${B}$}=\mathcal{C}(x)\nabla x\times\nabla y. (5.18)

Here, xx and yy are coordinates perpendicular to the background field, with xx usually a radial-like coordinate, and yy a field-line-labeling coordinate. Importantly, xx and yy are constant on field lines since 𝑩x=𝑩y=0\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla x=\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla y=0. For now, 𝒞\mathcal{C} is an arbitrary function of xx (it cannot depend on zz because 𝑩{B} must be divergence free, and it cannot depend on yy because we will assume axisymmetry). Since by construction the background field is perpendicular to the gradient basis vectors x\nabla x and y\nabla y, the background field can then be written in contravariant form as

𝑩=(𝑩z)𝒆z=𝒞J𝒆z.\mbox{\boldmath${B}$}=(\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla z)\mbox{\boldmath${e}$}_{z}=\frac{\mathcal{C}}{J}\mbox{\boldmath${e}$}_{z}. (5.19)

Thus the magnetic field is in the direction of the tangent vector in the zz direction, 𝒆z\mbox{\boldmath${e}$}_{z}, so zz is a field-aligned coordinate as desired. The Jacobian of the (x,y,z)(x,y,z) coordinate system is

J=[(x×y)z]1.J=\left[(\nabla x\times\nabla y)\boldsymbol{\cdot}\nabla z\right]^{-1}. (5.20)

Noting that the magnitude of the background field is given by

B=𝑩𝑩=𝒞Jgzz,B=\sqrt{\mbox{\boldmath${B}$}\boldsymbol{\cdot}\mbox{\boldmath${B}$}}=\frac{\mathcal{C}}{J}\sqrt{g_{zz}}, (5.21)

with gzz=𝒆z𝒆z=J2B2/𝒞2g_{zz}=\mbox{\boldmath${e}$}_{z}\boldsymbol{\cdot}\mbox{\boldmath${e}$}_{z}=J^{2}B^{2}/\mathcal{C}^{2}, we can also write the background field as

𝑩=Bgzz𝒆z.\mbox{\boldmath${B}$}=\frac{B}{\sqrt{g_{zz}}}\mbox{\boldmath${e}$}_{z}. (5.22)

Finally, we will assume that 𝑩{B} and all other geometric quantities are axisymmetric, so that they have no yy dependence, i.e. B/y=0\partial B/\partial y=0.

The definition of the coordinates (x,y,z)(x,y,z) that satisfy the above relations is relatively flexible, depending on desired properties of the coordinates. In Sections 5.2 and 5.3 we give specific definitions of the coordinates in different geometrical configurations.

5.1.3 Gyrokinetic Poisson bracket in field-aligned coordinates

Recall from Eq. 2.113 that the gyrokinetic Poisson bracket is defined as

{F,G}=𝑩mB(FGvFvG)𝐛^qB×FG,\{F,G\}=\frac{\mbox{\boldmath${B}$}^{*}}{mB_{\parallel}^{*}}\boldsymbol{\cdot}\left(\nabla F\frac{\partial G}{\partial v_{\parallel}}-\frac{\partial F}{\partial v_{\parallel}}\nabla G\right)-\frac{\mathbf{\hat{b}}}{qB_{\parallel}^{*}}\times\nabla F\boldsymbol{\cdot}\nabla G, (5.23)

with 𝑩=𝑩+(mv/q)×𝐛^+×(A𝐛^)\mbox{\boldmath${B}$}^{*}=\mbox{\boldmath${B}$}+(mv_{\parallel}/q)\nabla\times\mathbf{\hat{b}}+\nabla\times(A_{\parallel}\mathbf{\hat{b}}) and B=𝐛^𝑩B_{\parallel}^{*}=\mathbf{\hat{b}}\boldsymbol{\cdot}\mbox{\boldmath${B}$}^{*}. Using the identities from Section 5.1.1, we can write 𝑩\mbox{\boldmath${B}$}^{*} in contravariant form as

𝑩=𝒞J𝒆z+mvq1J[byz𝒆x+(bxzbzx)𝒆y+byx𝒆z]\displaystyle\mbox{\boldmath${B}$}^{*}=\frac{\mathcal{C}}{J}\mbox{\boldmath${e}$}_{z}+\frac{mv_{\parallel}}{q}\frac{1}{J}\left[-\frac{\partial b_{y}}{\partial z}\mbox{\boldmath${e}$}_{x}+\left(\frac{\partial b_{x}}{\partial z}-\frac{\partial b_{z}}{\partial x}\right)\mbox{\boldmath${e}$}_{y}+\frac{\partial b_{y}}{\partial x}\mbox{\boldmath${e}$}_{z}\right]
+1J[((Abz)y(Aby)z)𝒆x+((Abx)z(Abz)x)𝒆y+((Aby)x(Abx)y)𝒆z],\displaystyle\ +\frac{1}{J}\left[\left(\frac{\partial(A_{\parallel}b_{z})}{\partial y}-\frac{\partial(A_{\parallel}b_{y})}{\partial z}\right)\mbox{\boldmath${e}$}_{x}+\left(\frac{\partial(A_{\parallel}b_{x})}{\partial z}-\frac{\partial(A_{\parallel}b_{z})}{\partial x}\right)\mbox{\boldmath${e}$}_{y}+\left(\frac{\partial(A_{\parallel}b_{y})}{\partial x}-\frac{\partial(A_{\parallel}b_{x})}{\partial y}\right)\mbox{\boldmath${e}$}_{z}\right], (5.24)

so that the contravariant components of 𝑩\mbox{\boldmath${B}$}^{*} are

Bx\displaystyle B^{*x} =1J[mvqbyz+((Abz)y(Aby)z)],\displaystyle=\frac{1}{J}\left[-\frac{mv_{\parallel}}{q}\frac{\partial b_{y}}{\partial z}+\left(\frac{\partial(A_{\parallel}b_{z})}{\partial y}-\frac{\partial(A_{\parallel}b_{y})}{\partial z}\right)\right], (5.25)
By\displaystyle B^{*y} =1J[mvq(bxzbzx)+((Abx)z(Abz)x)],\displaystyle=\frac{1}{J}\left[\frac{mv_{\parallel}}{q}\left(\frac{\partial b_{x}}{\partial z}-\frac{\partial b_{z}}{\partial x}\right)+\left(\frac{\partial(A_{\parallel}b_{x})}{\partial z}-\frac{\partial(A_{\parallel}b_{z})}{\partial x}\right)\right], (5.26)
Bz\displaystyle B^{*z} =1J[𝒞+mvqbyx+((Aby)x(Abx)y)].\displaystyle=\frac{1}{J}\left[\mathcal{C}+\frac{mv_{\parallel}}{q}\frac{\partial b_{y}}{\partial x}+\left(\frac{\partial(A_{\parallel}b_{y})}{\partial x}-\frac{\partial(A_{\parallel}b_{x})}{\partial y}\right)\right]. (5.27)

Here, the covariant components of the unit vector 𝐛^=𝑩/B\mathbf{\hat{b}}=\mbox{\boldmath${B}$}/B are given by

bα=𝐛^𝒆α=gαzgzz,α=(x,y,z).\qquad\qquad\qquad b_{\alpha}=\mathbf{\hat{b}}\boldsymbol{\cdot}\mbox{\boldmath${e}$}_{\alpha}=\frac{g_{\alpha z}}{\sqrt{g_{zz}}},\qquad\qquad\alpha=(x,y,z). (5.28)

Then we can compute the bracket by using

𝑩F=BxFx+ByFy+BzFz\mbox{\boldmath${B}$}^{*}\boldsymbol{\cdot}\nabla F=B^{*x}\frac{\partial F}{\partial x}+B^{*y}\frac{\partial F}{\partial y}+B^{*z}\frac{\partial F}{\partial z} (5.29)

and

𝐛^×FG\displaystyle\mathbf{\hat{b}}\times\nabla F\boldsymbol{\cdot}\nabla G =1J(byFzbzFy)Gx+1J(bzFxbxFz)Gy\displaystyle=\frac{1}{J}\left(b_{y}\frac{\partial F}{\partial z}-b_{z}\frac{\partial F}{\partial y}\right)\frac{\partial G}{\partial x}+\frac{1}{J}\left(b_{z}\frac{\partial F}{\partial x}-b_{x}\frac{\partial F}{\partial z}\right)\frac{\partial G}{\partial y}
+1J(bxFybyFx)Gz.\displaystyle\qquad+\frac{1}{J}\left(b_{x}\frac{\partial F}{\partial y}-b_{y}\frac{\partial F}{\partial x}\right)\frac{\partial G}{\partial z}. (5.30)

Finally, the phase-space Jacobian BB_{\parallel}^{*} is given by

B=𝐛^𝑩=B+(mvq+A)1J[bxbyzby(bzxbxz)+bzbyx]B.B_{\parallel}^{*}=\mathbf{\hat{b}}\boldsymbol{\cdot}\mbox{\boldmath${B}$}^{*}=B+\left(\frac{mv_{\parallel}}{q}+A_{\parallel}\right)\frac{1}{J}\left[-b_{x}\frac{\partial b_{y}}{\partial z}-b_{y}\left(\frac{\partial b_{z}}{\partial x}-\frac{\partial b_{x}}{\partial z}\right)+b_{z}\frac{\partial b_{y}}{\partial x}\right]\approx B. (5.31)

5.1.4 Equations of motion in field-aligned coordinates

Recall from Eqs. 2.115 and 2.116 that the gyrokinetic equations of motion are given by

𝑹˙={𝑹,H}=𝑩Bv+𝐛^qB×(μB+qΦ),\displaystyle\dot{\mbox{\boldmath${R}$}}=\{\mbox{\boldmath${R}$},H\}=\frac{\mbox{\boldmath${B^{*}}$}}{B_{\parallel}^{*}}v_{\parallel}+\frac{\mathbf{\hat{b}}}{qB_{\parallel}^{*}}\times\left(\mu\nabla B+q\nabla\Phi\right), (5.32)
v˙={v,H}qmAt=𝑩mB(μB+qΦ)qmAt.\displaystyle\dot{v}_{\parallel}=\{v_{\parallel},H\}-\frac{q}{m}\frac{\partial A_{\parallel}}{\partial t}=-\frac{\mbox{\boldmath${B^{*}}$}}{mB_{\parallel}^{*}}{\boldsymbol{\cdot}}\left(\mu\nabla B+q\nabla\Phi\right)-\frac{q}{m}\frac{\partial A_{\parallel}}{\partial t}. (5.33)

We can write the velocity 𝑹˙\dot{\mbox{\boldmath${R}$}} in contravariant form as 𝑹˙=x˙𝒆x+y˙𝒆y+z˙𝒆z\dot{\mbox{\boldmath${R}$}}=\dot{x}\,\mbox{\boldmath${e}$}_{x}+\dot{y}\,\mbox{\boldmath${e}$}_{y}+\dot{z}\,\mbox{\boldmath${e}$}_{z}, with components

x˙\displaystyle\dot{x} ={x,H}=𝑹˙x=BxBv+𝐛^qB×(μB+qΦ)x\displaystyle=\{x,H\}=\dot{\mbox{\boldmath${R}$}}\boldsymbol{\cdot}\nabla x=\frac{B^{*x}}{B_{\parallel}^{*}}v_{\parallel}+\frac{\mathbf{\hat{b}}}{qB_{\parallel}^{*}}\times\left(\mu\nabla B+q\nabla\Phi\right)\boldsymbol{\cdot}\nabla x
=1JB[mv2qB(Bby)z+mv2+μBqBbyBzbzΦy+byΦz+v((Abz)y(Aby)z)]\displaystyle=\frac{1}{JB_{\parallel}^{*}}\left[-\frac{mv_{\parallel}^{2}}{qB}\frac{\partial(B\,b_{y})}{\partial z}+\frac{mv_{\parallel}^{2}+\mu B}{qB}b_{y}\frac{\partial B}{\partial z}-b_{z}\frac{\partial\Phi}{\partial y}+b_{y}\frac{\partial\Phi}{\partial z}+v_{\parallel}\left(\frac{\partial(A_{\parallel}b_{z})}{\partial y}-\frac{\partial(A_{\parallel}b_{y})}{\partial z}\right)\right] (5.34)
y˙\displaystyle\dot{y} ={y,H}=𝑹˙y=ByBv+𝐛^qB×(μB+qΦ)y\displaystyle=\{y,H\}=\dot{\mbox{\boldmath${R}$}}\boldsymbol{\cdot}\nabla y=\frac{B^{*y}}{B_{\parallel}^{*}}v_{\parallel}+\frac{\mathbf{\hat{b}}}{qB_{\parallel}^{*}}\times\left(\mu\nabla B+q\nabla\Phi\right)\boldsymbol{\cdot}\nabla y
=1JB[mv2qB((Bbz)x(Bbx)z)+mv2+μBqB(bzBxbxBz)+bzΦxbxΦz\displaystyle=\frac{1}{JB_{\parallel}^{*}}\left[-\frac{mv_{\parallel}^{2}}{qB}\left(\frac{\partial(B\,b_{z})}{\partial x}-\frac{\partial(B\,b_{x})}{\partial z}\right)+\frac{mv_{\parallel}^{2}+\mu B}{qB}\left(b_{z}\frac{\partial B}{\partial x}-b_{x}\frac{\partial B}{\partial z}\right)+b_{z}\frac{\partial\Phi}{\partial x}-b_{x}\frac{\partial\Phi}{\partial z}\right.
+v((Abx)z(Abz)x)]\displaystyle\qquad\qquad\quad\left.+v_{\parallel}\left(\frac{\partial(A_{\parallel}b_{x})}{\partial z}-\frac{\partial(A_{\parallel}b_{z})}{\partial x}\right)\right] (5.35)
z˙\displaystyle\dot{z} ={z,H}=𝑹˙z=BzBv+𝐛^qB×(μB+qΦ)z\displaystyle=\{z,H\}=\dot{\mbox{\boldmath${R}$}}\boldsymbol{\cdot}\nabla z=\frac{B^{*z}}{B_{\parallel}^{*}}v_{\parallel}+\frac{\mathbf{\hat{b}}}{qB_{\parallel}^{*}}\times\left(\mu\nabla B+q\nabla\Phi\right)\boldsymbol{\cdot}\nabla z
=1JB[𝒞v+mv2qB(Bby)xmv2+μBqBbyBx+bxΦybyΦx+v((Aby)x(Abx)y)]\displaystyle=\frac{1}{JB_{\parallel}^{*}}\left[\mathcal{C}v_{\parallel}+\frac{mv_{\parallel}^{2}}{qB}\frac{\partial(B\,b_{y})}{\partial x}-\frac{mv_{\parallel}^{2}+\mu B}{qB}b_{y}\frac{\partial B}{\partial x}+b_{x}\frac{\partial\Phi}{\partial y}-b_{y}\frac{\partial\Phi}{\partial x}+v_{\parallel}\left(\frac{\partial(A_{\parallel}b_{y})}{\partial x}-\frac{\partial(A_{\parallel}b_{x})}{\partial y}\right)\right] (5.36)

The parallel acceleration is given by

v˙\displaystyle\dot{v}_{\parallel} =1JB[mvqbyz+((Abz)y(Aby)z)](μmBx+qmΦx)\displaystyle=-\frac{1}{JB_{\parallel}^{*}}\left[-\frac{mv_{\parallel}}{q}\frac{\partial b_{y}}{\partial z}+\left(\frac{\partial(A_{\parallel}b_{z})}{\partial y}-\frac{\partial(A_{\parallel}b_{y})}{\partial z}\right)\right]\left(\frac{\mu}{m}\frac{\partial B}{\partial x}+\frac{q}{m}\frac{\partial\Phi}{\partial x}\right)
1JB[mvq(bxzbzx)+((Abx)z(Abz)x)]qmΦy\displaystyle-\frac{1}{JB_{\parallel}^{*}}\left[\frac{mv_{\parallel}}{q}\left(\frac{\partial b_{x}}{\partial z}-\frac{\partial b_{z}}{\partial x}\right)+\left(\frac{\partial(A_{\parallel}b_{x})}{\partial z}-\frac{\partial(A_{\parallel}b_{z})}{\partial x}\right)\right]\frac{q}{m}\frac{\partial\Phi}{\partial y}
1JB[𝒞+mvqbyx+((Aby)x(Abx)y)](μmBz+qmΦz)qmAt.\displaystyle-\frac{1}{JB_{\parallel}^{*}}\left[\mathcal{C}+\frac{mv_{\parallel}}{q}\frac{\partial b_{y}}{\partial x}+\left(\frac{\partial(A_{\parallel}b_{y})}{\partial x}-\frac{\partial(A_{\parallel}b_{x})}{\partial y}\right)\right]\left(\frac{\mu}{m}\frac{\partial B}{\partial z}+\frac{q}{m}\frac{\partial\Phi}{\partial z}\right)-\frac{q}{m}\frac{\partial A_{\parallel}}{\partial t}. (5.37)

Here we have not neglected any terms due to smallness of parallel derivatives compared to perpendicular derivatives. While this is a common approximation made in local gyrokinetic codes, we note that dropping such terms can break Liouville’s theorem, Eq. 2.82, so that the gyrokinetic equation can no longer be written in conservative form (phase-space volume is no longer conserved exactly). In particular, Liouville’s theorem in this case requires

(𝐛^×H)=(×𝐛^)H\nabla\boldsymbol{\cdot}(\mathbf{\hat{b}}\times\nabla H)=(\nabla\times\mathbf{\hat{b}})\boldsymbol{\cdot}\nabla H (5.38)

so that corresponding terms cancel exactly. If parallel derivatives were dropped, this could become

(𝐛^×H)(×𝐛^)H,\nabla\boldsymbol{\cdot}(\mathbf{\hat{b}}\times\nabla H)\neq(\nabla\times\mathbf{\hat{b}})_{\perp}\boldsymbol{\cdot}\nabla H, (5.39)

which breaks Liouville’s theorem. Since our energy-conserving discontinuous Galerkin scheme relies on the conservative form of the gyrokinetic equation, it is important for Liouville’s theorem to be preserved.

5.1.5 Field equations in field-aligned coordinates

For the gyrokinetic Poisson equation, Eq. 2.120, we must calculate

(ϵΦ)\displaystyle\nabla\boldsymbol{\cdot}(\epsilon_{\perp}\nabla_{\perp}\Phi) =1J[x(JϵΦx)+y(JϵΦy)+z(JϵΦz)]\displaystyle=\frac{1}{J}\left[\frac{\partial}{\partial x}\left(J\epsilon_{\perp}\nabla_{\perp}\Phi\boldsymbol{\cdot}\nabla x\right)+\frac{\partial}{\partial y}\left(J\epsilon_{\perp}\nabla_{\perp}\Phi\boldsymbol{\cdot}\nabla y\right)+\frac{\partial}{\partial z}\left(J\epsilon_{\perp}\nabla_{\perp}\Phi\boldsymbol{\cdot}\nabla z\right)\right]
1J[x(Jϵ(Φxgxx+Φygxy))+y(Jϵ(Φxgxy+Φygyy))].\displaystyle\approx\frac{1}{J}\left[\frac{\partial}{\partial x}\left(J\epsilon_{\perp}\left(\frac{\partial\Phi}{\partial x}g^{xx}+\frac{\partial\Phi}{\partial y}g^{xy}\right)\right)+\frac{\partial}{\partial y}\left(J\epsilon_{\perp}\left(\frac{\partial\Phi}{\partial x}g^{xy}+\frac{\partial\Phi}{\partial y}g^{yy}\right)\right)\right]. (5.40)

Here, unlike above, we do neglect the /z\partial/\partial z terms compared to the perpendicular derivative terms, so that the required Poisson solve remains two-dimensional. For energetic consistency, a similar treatment would need to be made in the corresponding electrostatic field energy term (or in the second-order E×BE\times B energy term if it is kept in the Hamiltonian). Similarly, in Ampère’s law, Eq. 2.122, we have

2A=1J[x(J(Axgxx+Aygxy))+y(J(Axgxy+Aygyy))].\nabla_{\perp}^{2}A_{\parallel}=\frac{1}{J}\left[\frac{\partial}{\partial x}\left(J\left(\frac{\partial A_{\parallel}}{\partial x}g^{xx}+\frac{\partial A_{\parallel}}{\partial y}g^{xy}\right)\right)+\frac{\partial}{\partial y}\left(J\left(\frac{\partial A_{\parallel}}{\partial x}g^{xy}+\frac{\partial A_{\parallel}}{\partial y}g^{yy}\right)\right)\right]. (5.41)

5.1.6 Summary of geometric quantities

The geometry quantities of interest, which appear in either the equations of motion or the field equations, are

bmag=B\displaystyle\texttt{bmag}=B (5.42)
cmag=𝒞=JBgzz\displaystyle\texttt{cmag}={\mathcal{C}}=\frac{JB}{\sqrt{g_{zz}}} (5.43)
b_x=bx=gxzgzz\displaystyle\texttt{b\_x}=b_{x}=\frac{g_{xz}}{\sqrt{g_{zz}}} (5.44)
b_y=by=gyzgzz\displaystyle\texttt{b\_y}=b_{y}=\frac{g_{yz}}{\sqrt{g_{zz}}} (5.45)
b_z=bz=gzz\displaystyle\texttt{b\_z}=b_{z}=\sqrt{g_{zz}} (5.46)
gxx=gxx\displaystyle\texttt{gxx}=g^{xx} (5.47)
gxy=gxy\displaystyle\texttt{gxy}=g^{xy} (5.48)
gyy=gyy\displaystyle\texttt{gyy}=g^{yy} (5.49)
jacobPhase=BB\displaystyle\texttt{jacobPhase}=B_{\parallel}^{*}\approx B (5.50)
jacobGeo=J=detgij.\displaystyle\texttt{jacobGeo}=J=\sqrt{\det g_{ij}}. (5.51)

Here we have also included the variable names for these quantities in Gkeyll.

5.2 Helical SOL configuration including magnetic shear

Thus far, our treatment of field-aligned geometry has been completely general, except for the assumption of axisymmetry. Now we will examine how a particular magnetic field geometry affects the choice of field-aligned coordinates and the resulting metric quantities that appear in the equations.

The helical field in an SMT is given in cylindrical (R,φ,Z)(R,\varphi,Z) coordinates (where φ\varphi is counter-clockwise viewed from above) by

𝑩=Bφ𝝋^+Bv𝐙^=B0R0R𝝋^+Bv𝐙^.\mbox{\boldmath${B}$}=B_{\varphi}\boldsymbol{\hat{\boldsymbol{\varphi}}}+B_{v}\mathbf{\hat{Z}}=\frac{B_{0}R_{0}}{R}\boldsymbol{\hat{\boldsymbol{\varphi}}}+B_{v}\mathbf{\hat{Z}}. (5.52)

Note we can also write this as

𝑩=Ψ×φ+B0R0φ,\mbox{\boldmath${B}$}=\nabla\Psi\times\nabla\varphi+B_{0}R_{0}\nabla\varphi, (5.53)

with Ψ=R2Bv/2\Psi=R^{2}B_{v}/2 the vertical magnetic flux function (analogous to the poloidal flux in a tokamak). The field line pitch varies with radius, and can be expressed via (Perez et al., 2006)

q(R)=HBφ2πRBv=B0R0H2πR2Bv,q(R)=\frac{HB_{\varphi}}{2\pi RB_{v}}=\frac{B_{0}R_{0}H}{2\pi R^{2}B_{v}}, (5.54)

where qq is analogous to the safety factor in a tokamak, and HH is the vertical height between the bottom and top end-plates where the field lines terminate. Similarly, we can define the magnetic shear as

s^=RqdqdR.\hat{s}=\frac{R}{q}\frac{\textnormal{d}q}{\textnormal{d}R}. (5.55)

Note that if we allow the vertical field to have some simple radial dependence via Bv=Bv(R)=Bv0(R/x0)nB_{v}=B_{v}(R)=B_{v0}(R/x_{0})^{n}, the shear is

s^=2RBvdBvdR=2n.\hat{s}=-2-\frac{R}{B_{v}}\frac{\textnormal{d}B_{v}}{\textnormal{d}R}=-2-n. (5.56)

When Bv=B_{v}= const (as is the case for standard SMTs like the Helimak), we have s^=2\hat{s}=-2. The connection length is given by Lc=HB/BvL_{c}=HB/B_{v}, which in general varies with radius. In Fig. 5.1(a)(a) we plot the connection length LcL_{c} as a function of radius for several values of s^\hat{s} with NSTX-like parameters.

Note that here all quantities, including the field line pitch and the magnetic shear, are still constant along the field lines. This is in contrast to a real tokamak SOL, where the pitch and shear can vary significantly along the field lines, especially near the X-point due to flux expansion. The field line pitch at the midplane is also nearly constant with radius in a real tokamak SOL, while here we have the pitch varying with radius. Nonetheless, this simple geometry will still allow us to study some of the effects of magnetic shear. Comparing to the actual connection length in the NSTX experiment shown in Fig. 5.1(b)(b) (with the figure adapted from Fig. 2 in Boedo et al. (2014)), we see that the variation in LcL_{c} with radius as |s^||\hat{s}| increases is approaching the variation of the connection length in the experiment. However, in the experiment the connection length varies even more than in the s^=10\hat{s}=-10 case over a shorter radial length, changing by a factor of almost four over a few centimeters.

Refer to caption
Figure 5.1: (a)(a) Connection length, Lc/2=HB/Bv/2L_{c}/2=HB/B_{v}/2, as a function of radius for several values of magnetic shear, s^\hat{s}, using NSTX-like parameters: R0=0.85R_{0}=0.85 m, x0=R0+a=1.35x_{0}=R_{0}+a=1.35 m, B0=0.5B_{0}=0.5 T, H=2.4H=2.4 m. Here we choose Bv0B_{v0} so that Lc(x0)=8L_{c}(x_{0})=8 m, which results in Bv00.1B_{v0}\approx 0.1 T. (b)(b) Connection length from the NSTX experiment, LL_{\parallel}, defined as parallel length from midplane to lower divertor plate. Figure adapted from Boedo et al. (2014).

Now we need field-line-following coordinates (x,y,z)(x,y,z), such that

𝑩=𝒞x×y.\mbox{\boldmath${B}$}=\mathcal{C}\nabla x\times\nabla y. (5.57)

This can be achieved by choosing the coordinates to be222Alternatively, we could have chosen the zz coordinate to measure distance along the field line, with z=Z/sinϑ=ZB/Bvz=Z/\sin\vartheta=ZB/B_{v}, as we show in Appendix 5.A. In this approach, the zz domain extent is given by the connection length; however, the connection length can vary with radius, so the zz domain extent would also need to vary with radius. Choosing the vertical height ZZ for the zz coordinate does not have this issue (assuming the vertical height between the top and bottom end plates does not change with radius), so this is the approach that we take in the bulk of this chapter.

x=R,z=Z,y=x0(φ2πqZH)=x0(φBφZBvR).\displaystyle x=R,\qquad z=Z,\qquad y=x_{0}\left(\varphi-\frac{2\pi qZ}{H}\right)=x_{0}\left(\varphi-\frac{B_{\varphi}Z}{B_{v}R}\right). (5.58)

The resulting gradient basis vectors are

x=𝐑^,y=2πx0zHdqdx𝐑^+x0x𝝋^2πx0qH𝐙^,z=𝐙^,\displaystyle\nabla x=\mathbf{\hat{R}},\qquad\nabla y=-\frac{2\pi x_{0}z}{H}\frac{\textnormal{d}q}{\textnormal{d}x}\mathbf{\hat{R}}+\frac{x_{0}}{x}\boldsymbol{\hat{\boldsymbol{\varphi}}}-\frac{2\pi x_{0}q}{H}\mathbf{\hat{Z}},\qquad\nabla z=\mathbf{\hat{Z}}, (5.59)

so that

x×y=x0x(2πqxH𝝋^+𝐙^)=x0x(BφBv𝝋^+𝐙^).\nabla x\times\nabla y=\frac{x_{0}}{x}\left(\frac{2\pi qx}{H}\boldsymbol{\hat{\boldsymbol{\varphi}}}+\mathbf{\hat{Z}}\right)=\frac{x_{0}}{x}\left(\frac{B_{\varphi}}{B_{v}}\boldsymbol{\hat{\boldsymbol{\varphi}}}+\mathbf{\hat{Z}}\right). (5.60)

Now taking 𝒞=Bvx/x0\mathcal{C}=B_{v}x/x_{0}, we obtain the correct form of the field,

𝑩=Bvxx0x×y=Bφ𝝋^+Bv𝐙^.\mbox{\boldmath${B}$}=\frac{B_{v}x}{x_{0}}\nabla x\times\nabla y=B_{\varphi}\boldsymbol{\hat{\boldsymbol{\varphi}}}+B_{v}\mathbf{\hat{Z}}. (5.61)
Refer to caption
Figure 5.2: Diagram of field-aligned coordinate basis vectors in the (φ,Z)(\varphi,Z) plane for a helical magnetic geometry. Note that vector magnitudes are not drawn to scale.

We can also calculate the tangent basis vectors

𝒆α=𝑿α=Rα𝐑^+Rφα𝝋^+Zα𝐙^,α=(x,y,z),\mbox{\boldmath${e}$}_{\alpha}=\frac{\partial\mbox{\boldmath${X}$}}{\partial\alpha}=\frac{\partial R}{\partial\alpha}\mathbf{\hat{R}}+R\frac{\partial\varphi}{\partial\alpha}\boldsymbol{\hat{\boldsymbol{\varphi}}}+\frac{\partial Z}{\partial\alpha}\mathbf{\hat{Z}},\qquad\alpha=(x,y,z), (5.62)

which gives

𝒆x=𝐑^+2πxzHdqdx𝝋^=𝐑^+BφzBvxs^𝝋^,𝒆y=xx0𝝋^,𝒆z=2πqxH𝝋^+𝐙^=BφBv𝝋^+𝐙^.\displaystyle\mbox{\boldmath${e}$}_{x}=\mathbf{\hat{R}}+\frac{2\pi xz}{H}\frac{\textnormal{d}q}{\textnormal{d}x}\boldsymbol{\hat{\boldsymbol{\varphi}}}=\mathbf{\hat{R}}+\frac{B_{\varphi}z}{B_{v}x}\hat{s}\boldsymbol{\hat{\boldsymbol{\varphi}}},\qquad\mbox{\boldmath${e}$}_{y}=\frac{x}{x_{0}}\boldsymbol{\hat{\boldsymbol{\varphi}}},\qquad\mbox{\boldmath${e}$}_{z}=\frac{2\pi qx}{H}\boldsymbol{\hat{\boldsymbol{\varphi}}}+\mathbf{\hat{Z}}=\frac{B_{\varphi}}{B_{v}}\boldsymbol{\hat{\boldsymbol{\varphi}}}+\mathbf{\hat{Z}}. (5.63)

A diagram of the field-aligned basis vectors in the (φ,Z)(\varphi,Z) plane is shown in Fig. 5.2.

Finally, the mapping from the field-aligned coordinates (x,y,z)(x,y,z) to physical Cartesian coordinates (X,Y,Z)(X,Y,Z) is given by

X=Rcosφ=xcos(yx0+2πqzH)=xcos(yx0+BφzBvx)\displaystyle X=R\cos\varphi=x\cos\left(\frac{y}{x_{0}}+\frac{2\pi qz}{H}\right)=x\cos\left(\frac{y}{x_{0}}+\frac{B_{\varphi}z}{B_{v}x}\right) (5.64)
Y=Rsinφ=xsin(yx0+2πqzH)=xsin(yx0+BφzBvx)\displaystyle Y=R\sin\varphi=x\sin\left(\frac{y}{x_{0}}+\frac{2\pi qz}{H}\right)=x\sin\left(\frac{y}{x_{0}}+\frac{B_{\varphi}z}{B_{v}x}\right) (5.65)
Z=z.\displaystyle Z=z. (5.66)

The geometry quantities of interest are

bmag=B=Bv1+Bφ2Bv2\displaystyle\texttt{bmag}=B=B_{v}\sqrt{1+\frac{B_{\varphi}^{2}}{B_{v}^{2}}} (5.67)
cmag=𝒞=JBgzz=Bvxx0\displaystyle\texttt{cmag}={\mathcal{C}}=\frac{JB}{\sqrt{g_{zz}}}=\frac{B_{v}x}{x_{0}} (5.68)
b_x=bx=gxzgzz=s^zB02R02BvBx3\displaystyle\texttt{b\_x}=b_{x}=\frac{g_{xz}}{\sqrt{g_{zz}}}=\frac{\hat{s}zB_{0}^{2}R_{0}^{2}}{B_{v}Bx^{3}} (5.69)
b_y=by=gyzgzz=B0R0Bx0\displaystyle\texttt{b\_y}=b_{y}=\frac{g_{yz}}{\sqrt{g_{zz}}}=\frac{B_{0}R_{0}}{Bx_{0}} (5.70)
b_z=bz=gzz=BBv\displaystyle\texttt{b\_z}=b_{z}=\sqrt{g_{zz}}=\frac{B}{B_{v}} (5.71)
gxx=gxx=1\displaystyle\texttt{gxx}=g^{xx}=1 (5.72)
gxy=gxy=s^zB0R0x0Bvx3\displaystyle\texttt{gxy}=g^{xy}=-\frac{\hat{s}zB_{0}R_{0}x_{0}}{B_{v}x^{3}} (5.73)
gyy=gyy=B02R02x02Bv2x6(x2+s^2z2)+x02x2\displaystyle\texttt{gyy}=g^{yy}=\frac{B_{0}^{2}R_{0}^{2}x_{0}^{2}}{B_{v}^{2}x^{6}}\left(x^{2}+\hat{s}^{2}z^{2}\right)+\frac{x_{0}^{2}}{x^{2}} (5.74)
jacobPhase=BB\displaystyle\texttt{jacobPhase}=B_{\parallel}^{*}\approx B (5.75)
jacobGeo=J=detgij=xx0.\displaystyle\texttt{jacobGeo}=J=\sqrt{\det g_{ij}}=\frac{x}{x_{0}}. (5.76)

Note that in Gkeyll, none of these expressions for the metric quantities are explicitly implemented; instead the mapping from computational to physical coordinates, Eqs. 5.64, 5.65 and 5.66, is supplied as an input and then the metric quantities are computed via automatic differentiation operations. This enables the flexibility to use more complicated mappings where analytical expressions for the metric quantities may not be available (see e.g. Section 5.3).

We can now compute how various terms in the equations of motion are affected by the geometry. For example, the components of the magnetic (curvature and B\nabla B) drift are

𝒗dx=0\displaystyle\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla x=0 (5.77)
𝒗dy=BJBv[mv2+μBqB(1x+Bv2B2(1+s^))+mv2qBBv2B2x(2+s^)]\displaystyle\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla y=\frac{B}{JB_{v}}\left[-\frac{mv_{\parallel}^{2}+\mu B}{qB}\left(\frac{1}{x}+\frac{B_{v}^{2}}{B^{2}}(1+\hat{s})\right)+\frac{mv_{\parallel}^{2}}{qB}\frac{B_{v}^{2}}{B^{2}x}(2+\hat{s})\right] (5.78)
𝒗dz=BφBmv2+μBqB(1x+Bv2B2(1+s^)).\displaystyle\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla z=\frac{B_{\varphi}}{B}\frac{mv_{\parallel}^{2}+\mu B}{qB}\left(\frac{1}{x}+\frac{B_{v}^{2}}{B^{2}}(1+\hat{s})\right). (5.79)

Comparing these terms to Eq. 4.3 that we used for the simplified helical geometry in Chapter 4, we see that the first term in 𝒗dy\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla y in Eq. 5.78 is the same except for a factor of B/(JBv)B/(JB_{v}). We also have some new terms in 𝒗dy\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla y, which are small corrections when BvBφBB_{v}\ll B_{\varphi}\sim B as assumed in Chapter 4. We also have a finite 𝒗dz\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla z, unlike in the simplified geometry treatment, though this term is small compared to 𝒗dy\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla y when BvBφBB_{v}\ll B_{\varphi}\sim B.

5.2.1 Simulation results: dependence on magnetic shear in helical configuration

In this section we present preliminary electrostatic gyrokinetic simulations in the helical configuration with magnetic shear described above. We perform a scan of the magnetic shear parameter, taking s^={2,5,10}\hat{s}=\{-2,-5,-10\}, with the geometry becoming more sheared as |s^||\hat{s}| increases. We use NSTX-like geometry parameters: R0=0.85R_{0}=0.85 m, x0=R0+a=1.35x_{0}=R_{0}+a=1.35 m, B0=0.5B_{0}=0.5 T, H=2.4H=2.4 m, and we choose Bv0=Bv(x0)B_{v0}=B_{v}(x_{0}) so that Lc(x0)=8L_{c}(x_{0})=8 m, resulting in Bv00.1B_{v0}\approx 0.1 T. The resulting connection length as a function of radius is shown in Fig. 5.1. The domain extents in the radial, binormal, and parallel directions, respectively, are 1.26x1.421.26\leq x\leq 1.42 m (Lx56ρs0L_{x}\approx 56\rho_{\mathrm{s}0}), 0.485y0.485-0.485\leq y\leq 0.485 m (Ly100ρs0H/Lc(x0)L_{y}\approx 100\rho_{\mathrm{s}0}H/L_{c}(x_{0})), and H/2zH/2-H/2\leq z\leq H/2. All other parameters are the same as used in the base case (n^=1\hat{n}=1) from Section 4.3, including the source power Psrc=PSOLLy/(2πRc)=0.62P_{\mathrm{src}}=P_{\mathrm{SOL}}L_{y}/(2\pi R_{c})=0.62 MW and the source profile with a Gaussian peak at x=1.3x=1.3 m.

Refer to caption
Figure 5.3: Time-averaged midplane density and temperature profiles for several values of magnetic shear, s^\hat{s}. The profiles steepen as |s^||\hat{s}| increases and the geometry becomes more sheared.
Refer to caption
Figure 5.4: Snapshots of electron density at the midplane for s^=2,,5,10\hat{s}=-2,-,5,-10.

In Fig. 5.4 we show time-averaged density and temperature radial profiles for each case. The profiles for the s^=2\hat{s}=-2 case are similar to the profiles from the base case in Section 4.3, which used a simplified geometry neglecting magnetic shear and assumed a constant connection length. This is somewhat expected since Fig. 5.1 shows that the connection length in the s^=2\hat{s}=-2 case varies little over the domain. As we move to more sheared geometries, the density profiles steepen, with the peak midplane density more than doubling between the s^=2\hat{s}=-2 and s^=10\hat{s}=-10 cases.

Snapshots of the electron density at the midplane for each case are shown in Fig. 5.4. While the s^=2\hat{s}=-2 case looks similar to the cases from Chapter 4 with blobs moving radially outwards, the s^=10\hat{s}=-10 case shows little evidence of radial transport. We measure the radial E×BE\times B particle flux near the midplane in Fig. 5.6 and confirm that indeed particle transport is reduced as |s^||\hat{s}| increases. Recalling the blob dynamics discussion from Section 1.3.1, magnetic shear can short-circuit the blob polarization by allowing currents to close through the thin sheared part of the blob, resulting in slower blobs. This seems to be consistent with the picture here, with blob transport getting weaker in more sheared cases.

Refer to caption
Figure 5.5: Time-averaged radial electron E×BE\times B particle flux near the midplane. The cross-field transport decreases as the geometry becomes more sheared at larger |s^||\hat{s}|, resulting in the steeper profiles seen in Fig. 5.4.
Refer to caption
Figure 5.6: Time-averaged electron particle and heat fluxes to the bottom (solid) and top (dashed) end plates. The peak fluxes increase as |s^||\hat{s}| increases, consistent with less cross-field transport upstream.
Refer to caption
Figure 5.7: Time-averaged electron radial E×BE\times B particle flux profiles along the field line, taken just outside the source region at x1.32x\sim 1.32 m. There is a slight asymmetry in the profiles, with slightly more radial transport at z>0z>0 than z<0z<0 for the s^=5\hat{s}=-5 and s^=10\hat{s}=-10 cases. This is consistent with the differences in the particle fluxes to the bottom and top end plates shown in Fig. 5.6.
Refer to caption
Figure 5.8: Time-averaged electron density profiles along the field line, taken just outside the source region at x1.32x\sim 1.32 m. There is a slight asymmetric shift in the profiles, with slightly higher density near the top of the domain (z=H/2=1.4z=H/2=1.4 m) especially for the more sheared cases.

As a result of weaker cross-field transport, the peak particle and heat fluxes to the end plate increase in the more sheared cases, as shown in Fig. 5.6. Note that we have separately shown the fluxes to the top and bottom end plates. There are some differences in the particle flux profiles between the ends, especially for the s^=10\hat{s}=-10 case, where there is a noticeable shift in the peak to higher xx between the bottom and top. When we examine how the radial particle flux (taken just outside the source region near x=1.32x=1.32 m) varies along the field line in Fig. 5.8, we see asymmetry as well. There slightly more radial transport at z>0z>0 than z<0z<0 for the s^=5\hat{s}=-5 and s^=10\hat{s}=-10 cases. This is consistent with the radial shift in the end plate particle fluxes to higher xx from bottom to top.

The average electron density also shows asymmetry along the field line, as shown in Fig. 5.8. Here we have again evaluated the profiles just outside the source region near x=1.32x=1.32 m. There is a slight shift in the profiles to higher zz, with the shift larger in the more sheared cases. One possible reason for the asymmetry is the presence of a vertical component of the E×BE\times B drift,

𝒗Ez=1JB(bxΦybyΦx)=x0xB(s^zB02R02BvBx3ΦyB0R0Bx0Φx).\mbox{\boldmath${v}$}_{E}\boldsymbol{\cdot}\nabla z=\frac{1}{JB_{\parallel}^{*}}\left(b_{x}\frac{\partial\Phi}{\partial y}-b_{y}\frac{\partial\Phi}{\partial x}\right)=\frac{x_{0}}{xB}\left(\frac{\hat{s}zB_{0}^{2}R_{0}^{2}}{B_{v}Bx^{3}}\frac{\partial\Phi}{\partial y}-\frac{B_{0}R_{0}}{Bx_{0}}\frac{\partial\Phi}{\partial x}\right). (5.80)

This term was not present in the earlier simplified geometry simulations from Section 4.2. It has been suggested that this term is responsible for asymmetry between top and bottom profiles in the Helimak (Bernard et al., 2020).

5.3 Solov’ev model analytical equilibria in the SOL

The Grad-Shafranov equation in cylindrical (R,Z,ϕ)(R,Z,\phi) coordinates,

μ0RJϕ=Ψ=R21R2Ψ=μ0R2p(Ψ)+II(Ψ),-\mu_{0}RJ_{\phi}=-\nabla^{*}\Psi=-R^{2}\nabla\boldsymbol{\cdot}\frac{1}{R^{2}}\nabla\Psi=\mu_{0}R^{2}p^{\prime}(\Psi)+II^{\prime}(\Psi), (5.81)

relates the equilibrium, defined by the poloidal flux function Ψ\Psi, to the pressure and current profiles, p(Ψ)p(\Psi) and I(Ψ)I(\Psi) respectively. Given Ψ(R,Z)\Psi(R,Z), one particular choice for the field-aligned coordinates are (x,y,z)=(Ψ,α,θ)(x,y,z)=(\Psi,-\alpha,\theta), where x=Ψx=\Psi is the poloidal flux, z=θz=\theta is a generalized poloidal angle, and y=αy=-\alpha is a field-line-labeling coordinate defined so that the Clebsch representation of the magnetic field is given by

𝑩=α×Ψ=x×y,\mbox{\boldmath${B}$}=\nabla\alpha\times\nabla\Psi=\nabla x\times\nabla y, (5.82)

with 𝒞=1\mathcal{C}=1 for this choice of coordinates. Note that for an axisymmetric system, the background magnetic field can also be expressed as

𝑩=I(Ψ)ϕ+Ψ×ϕ,\mbox{\boldmath${B}$}=I(\Psi)\nabla\phi+\nabla\Psi\times\nabla\phi, (5.83)

where ϕ\phi is the toroidal angle and I(Ψ)=RBϕI(\Psi)=RB_{\phi}. Thus in practice, the functions Ψ(R,Z)\Psi(R,Z) and Bϕ(R,Z)B_{\phi}(R,Z) are sufficient to determine the magnetic geometry. In this section we will take an analytical Solov’ev solution of the Grad-Shafranov equation for Ψ(R,Z)\Psi(R,Z), and show how to compute the remaining θ\theta and α\alpha coordinates. In principle, the procedure outlined could be used for an arbitrary Ψ(R,Z)\Psi(R,Z) profile, including one from a numerical equilibrium file generated by e.g. EFIT (Lao et al., 1985, 1990).

Refer to caption
Figure 5.9: Flux surfaces (surfaces of constant Ψ\Psi) for the analytical Solov’ev equilibrium given by Eq. 5.84, with NSTX-like parameters: R0=0.85R_{0}=0.85, B0=0.55B_{0}=0.55, κ0=2\kappa_{0}=2, and q¯=2\bar{q}=2. For the open field lines, we will take the end-plates to be at Z=±Zend=±1.5Z=\pm Z_{\text{end}}=\pm 1.5.

Taking a vacuum field (which is a good approximation in the SOL) so that I=I= const and approximating pΨp\propto\Psi, we obtain an analytical Solov’ev solution (Chance et al., 1978; Jardin, 2010),

Ψ(R,Z)=B02R02κ0q¯(R2Z2+κ024(R2R02)2),\Psi(R,Z)=\frac{B_{0}}{2R_{0}^{2}\kappa_{0}\bar{q}}\left(R^{2}Z^{2}+\frac{\kappa_{0}^{2}}{4}(R^{2}-R_{0}^{2})^{2}\right), (5.84)

where R0R_{0} is the major radius of the magnetic axis, B0B_{0} is the toroidal field strength at the magnetic axis, κ0\kappa_{0} is the ellipticity at the axis, and q¯\bar{q} is the safety factor at the axis. The resulting flux surfaces for NSTX-like parameters are shown in Fig. 5.9. The flux surfaces are up-down symmetric, and there are closed and open surfaces, separated by a separatrix given by the surface Ψ=Ψsep=B0κ0R02/(8q¯)\Psi=\Psi_{\text{sep}}=B_{0}\kappa_{0}R_{0}^{2}/(8\bar{q}). In this (unphysical) equilibrium, there are X-points where the separatrix intersects the R=0R=0 axis. However, we will focus only on the open flux surfaces (sufficiently far away from the X-points), that is, those with Ψ>Ψsep\Psi>\Psi_{\text{sep}}. We will assume that the field lines on these open surfaces terminate on end-plates at Z=±ZendZ=\pm Z_{\text{end}}. For a given surface with Ψ>Ψsep\Psi>\Psi_{\text{sep}}, we can then parametrize the surface with

R(Ψ,Z)=R02+2Z2κ02+2κ022κ03q¯R02B0Ψκ02R02Z2+Z4.R(\Psi,Z)=\sqrt{R_{0}^{2}+\frac{2Z^{2}}{\kappa_{0}^{2}}+\frac{2}{\kappa_{0}^{2}}\sqrt{\frac{2\kappa_{0}^{3}\bar{q}R_{0}^{2}}{B_{0}}\Psi-\kappa_{0}^{2}R_{0}^{2}Z^{2}+Z^{4}}}. (5.85)

We will now calculate the generalized poloidal angle, θ\theta. For this, first consider a magnetic surface coordinate system (Ψ,θ,ϕ)(\Psi,\theta,\phi). The line element in these coordinates is given by

d=𝑹ΨdΨ+𝑹θdθ+𝑹ϕdϕ.\textnormal{d}\mbox{\boldmath${\ell}$}=\frac{\partial\mbox{\boldmath${R}$}}{\partial\Psi}\textnormal{d}\Psi+\frac{\partial\mbox{\boldmath${R}$}}{\partial\theta}\textnormal{d}\theta+\frac{\partial\mbox{\boldmath${R}$}}{\partial\phi}\textnormal{d}\phi. (5.86)

On a magnetic surface we have dΨ=0\textnormal{d}\Psi=0 and in a poloidal plane we have dϕ=0\textnormal{d}\phi=0, so the line element on the surface in the poloidal plane is simply

dp=𝑹θdθ=Jϕ×Ψdθ,\textnormal{d}\mbox{\boldmath${\ell}$}_{p}=\frac{\partial\mbox{\boldmath${R}$}}{\partial\theta}\textnormal{d}\theta={J}\nabla\phi\times\nabla\Psi\,\textnormal{d}\theta, (5.87)

with magnitude

dp=|dp|=|Jϕ×Ψ|dθ=|JΨ|Rdθ.\textnormal{d}\ell_{p}=|\textnormal{d}\mbox{\boldmath${\ell}$}_{p}|=|{J}\nabla\phi\times\nabla\Psi|\textnormal{d}\theta=\frac{|{J}\nabla\Psi|}{R}\textnormal{d}\theta. (5.88)

Now we can find θ\theta by integrating

dθ=R|JΨ|dp\textnormal{d}\theta=\frac{R}{|{J}\nabla\Psi|}\textnormal{d}\ell_{p} (5.89)

along contours of Ψ\Psi,

θ=θ0θdθ=θ0θR|JΨ|dp.\theta=\int_{\theta_{0}}^{\theta}\textnormal{d}\theta^{\prime}=\int_{\theta_{0}}^{\theta}\frac{R}{|{J}\nabla\Psi|}\textnormal{d}\ell_{p}. (5.90)

Using the flux surface parametrization from Eq. 5.85, the differential length along contours of Ψ\Psi is given by

dp=1+(R(Ψ,Z)Z)2dZ.\textnormal{d}\ell_{p}=\sqrt{1+\left(\frac{\partial R(\Psi,Z)}{\partial Z}\right)^{2}}\textnormal{d}Z. (5.91)

Instead of prescribing the form of the generalized poloidal angle and subsequently computing the Jacobian J=(Ψ×θϕ)1{J}=(\nabla\Psi\times\nabla\theta\boldsymbol{\cdot}\nabla\phi)^{-1}, we can instead prescribe the Jacobian to give desired properties of the generalized poloidal angle (Jardin, 2010). Here, we will choose

J=s(Ψ)R|Ψ|,{J}=s(\Psi)\frac{R}{|\nabla\Psi|}, (5.92)

which gives an equal-arc-length poloidal angle in (π,π](-\pi,\pi], with

s(Ψ)=12πdp=1πZendZend1+(R(Ψ,Z)Z)2dZs(\Psi)=\frac{1}{2\pi}\oint\textnormal{d}\ell_{p}=\frac{1}{\pi}\int_{-Z_{\text{end}}}^{Z_{\text{end}}}\sqrt{1+\left(\frac{\partial R(\Psi,Z^{\prime})}{\partial Z^{\prime}}\right)^{2}}\textnormal{d}Z^{\prime} (5.93)

a normalization factor. This means that on a particular flux surface, the arc length of each Δθ\Delta\theta segment will be equal (see Fig. 5.10). Inserting this Jacobian definition into Eq. 5.90, the poloidal angle is then given by

θ(R,Z)=1s(Ψ(R,Z))ZendZ1+(R(Ψ,Z)Z)2dZ.\theta(R,Z)=\frac{1}{s(\Psi(R,Z))}\int_{-Z_{\text{end}}}^{Z}\sqrt{1+\left(\frac{\partial R(\Psi,Z^{\prime})}{\partial Z^{\prime}}\right)^{2}}\textnormal{d}Z^{\prime}. (5.94)

These integrals have no closed form in general and must be evaluated numerically.

Now we will define the third coordinate, α\alpha, such that 𝑩=α×Ψ\mbox{\boldmath${B}$}=\nabla\alpha\times\nabla\Psi. To do this, we take α\alpha to be of the form (Kruskal & Kulsrud, 1958)

α=ϕq(Ψ)θν(Ψ,θ,ϕ),\alpha=\phi-q(\Psi)\theta-\nu(\Psi,\theta,\phi), (5.95)

where ν\nu is a to-be-determined function that is periodic in θ\theta and ϕ\phi, and q(Ψ)q(\Psi) is the global safety factor, defined as the poloidal average of the local safety factor q^(Ψ,θ)\hat{q}(\Psi,\theta),

q(Ψ)=12π02πq^(Ψ,θ)dθ,q(\Psi)=\frac{1}{2\pi}\int_{0}^{2\pi}\hat{q}(\Psi,\theta)\,\textnormal{d}\theta, (5.96)

with

q^(Ψ,θ)=𝑩ϕ𝑩θ=𝒥𝑩ϕ=I(Ψ)𝒥R2=I(Ψ)s(Ψ)R|Ψ|.\hat{q}(\Psi,\theta)=\frac{\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla\phi}{\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla\theta}=-\mathcal{J}\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla\phi=-I(\Psi)\frac{\mathcal{J}}{R^{2}}=\frac{-I(\Psi)s(\Psi)}{R|\nabla\Psi|}. (5.97)

It is convenient to define a new toroidal angle ζ=ϕν\zeta=\phi-\nu, so that we have333Alternatively, we could have defined α\alpha in terms of the physical toroidal angle ϕ\phi, i.e. ζ=ϕ\zeta=\phi, by modifying the poloidal coordinate to be θ=θ+ν/q\theta^{\prime}=\theta+\nu/q. In either case, the result is straight field lines with slope qq, be it in the (θ,ζ)(\theta,\zeta) plane or the (θ,ϕ)(\theta^{\prime},\phi) plane.

𝑩=α×Ψ=Ψ×(qθζ).\mbox{\boldmath${B}$}=\nabla\alpha\times\nabla\Psi=\nabla\Psi\times\nabla(q\theta-\zeta). (5.98)

Here we can see that the field lines are straight lines with slope qq in the (θ,ζ)(\theta,\zeta) plane, given by α=ζq(Ψ)θ=const\alpha=\zeta-q(\Psi)\theta=\text{const}.

Refer to caption
Figure 5.10: Flux surfaces with ΨN=Ψ/Ψsep=(1.2,1.4,1.6,1.8,2.0)\Psi_{N}=\Psi/\Psi_{\text{sep}}=(1.2,1.4,1.6,1.8,2.0) are shown in blue. Lines of constant θ\theta are shown in red. Here, θ\theta is defined to be an equal-arc-length poloidal angle. This means that on a particular flux surface, the arc length of each Δθ=π/4\Delta\theta=\pi/4 segment is equal.

To compute α\alpha, we first note that

α=αθθ+αΨΨ+αϕϕ,\nabla\alpha=\frac{\partial\alpha}{\partial\theta}\nabla\theta+\frac{\partial\alpha}{\partial\Psi}\nabla\Psi+\frac{\partial\alpha}{\partial\phi}\nabla\phi, (5.99)

which gives

𝑩=Ψ×α=αθΨ×θ+αϕΨ×ϕ.\mbox{\boldmath${B}$}=\nabla\Psi\times\nabla\alpha=\frac{\partial\alpha}{\partial\theta}\nabla\Psi\times\nabla\theta+\frac{\partial\alpha}{\partial\phi}\nabla\Psi\times\nabla\phi. (5.100)

Now notice

𝑩ϕ=αθΨ×θϕ=1Jαθ,\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla\phi=\frac{\partial\alpha}{\partial\theta}\nabla\Psi\times\nabla\theta\boldsymbol{\cdot}\nabla\phi=\frac{1}{{J}}\frac{\partial\alpha}{\partial\theta}, (5.101)

and from Eq. 5.83, we also have

𝑩ϕ=I(Ψ)|ϕ|2=I(Ψ)R2.\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla\phi=I(\Psi)|\nabla\phi|^{2}=\frac{I(\Psi)}{R^{2}}. (5.102)

Thus we can integrate along θ\theta (at constant Ψ\Psi) to find α\alpha,

α=C(Ψ,ϕ)+0θαθdθ=ϕI(Ψ)0θJR2dθ=ϕRBϕ1|Ψ|Rdp,\alpha=C(\Psi,\phi)+\int_{0}^{\theta}\frac{\partial\alpha}{\partial\theta^{\prime}}\textnormal{d}\theta^{\prime}=\phi-I(\Psi)\int_{0}^{\theta}\frac{{J}}{R^{2}}\textnormal{d}\theta^{\prime}=\phi-RB_{\phi}\int\frac{1}{|\nabla\Psi|R}\textnormal{d}\ell_{p}, (5.103)

where we have taken the constant of integration to be C(Ψ,ϕ)=α(θ=0,Ψ,ϕ)=ϕC(\Psi,\phi)=\alpha(\theta=0,\Psi,\phi)=\phi. As we did for θ\theta, this integral can be computed by integrating along the contours of Ψ\Psi parametrized by ZZ,

α(R,Z,ϕ)=ϕRBϕ0Z1|Ψ|R(Ψ,Z)1+(R(Ψ,Z)Z)2dZ.\alpha(R,Z,\phi)=\phi-RB_{\phi}\int_{0}^{Z}\frac{1}{|\nabla\Psi|R(\Psi,Z^{\prime})}\sqrt{1+\left(\frac{\partial R(\Psi,Z^{\prime})}{\partial Z^{\prime}}\right)^{2}}\textnormal{d}Z^{\prime}. (5.104)
Refer to caption
Figure 5.11: Selecting a line of constant α\alpha and constant Ψ\Psi traces a field line (blue) from the bottom end-plate (at θ=π\theta=-\pi and Z=Zend=1.5Z=-Z_{\text{end}}=-1.5) to the top end-plate (at θ=π\theta=\pi and Z=Zend=1.5Z=Z_{\text{end}}=1.5). A rendering of part of the constant ΨN=1.2\Psi_{N}=1.2 surface is shown in the background.

We now have expressions for Ψ(𝑹)\Psi(\mbox{\boldmath${R}$}), α(𝑹)\alpha(\mbox{\boldmath${R}$}), and θ(𝑹)\theta(\mbox{\boldmath${R}$}). We can thus define a field-aligned coordinate system with (x,y,z)=(Ψ,α,θ)(x,y,z)=(\Psi,-\alpha,\theta). (The difference of sign between yy and α\alpha is a matter of convention, and we follow Beer et al. (1995) here). The expressions for α\alpha and θ\theta involve integrals that must be evaluated numerically in most cases. In Fig. 5.10, we show lines of constant θ\theta (and α\alpha) in the poloidal plane for the open-field-line region of the NSTX-like equilibrium shown in Fig. 5.9, demonstrating the equal-arc-length poloidal angle. In Fig. 5.11, we show that a line of constant α\alpha and constant Ψ\Psi traces a field line from the bottom end-plate to the top end-plate. Further, note that the connection length can be computed from

Lc=gzzdp=ZendZendgzz(R,Z)1+(R(Ψ,Z)Z)2dZ.L_{c}=\oint\sqrt{g_{zz}}\textnormal{d}\ell_{p}=\int_{-Z_{\text{end}}}^{Z_{\text{end}}}\sqrt{g_{zz}(R,Z^{\prime})}\sqrt{1+\left(\frac{\partial R(\Psi,Z^{\prime})}{\partial Z^{\prime}}\right)^{2}}\textnormal{d}Z^{\prime}. (5.105)

Fig. 5.12 shows the connection length as a function of the poloidal flux Ψ\Psi for the NSTX-like equilibrium.

Refer to caption
Figure 5.12: Connection length, LcL_{c}, as a function of normalized poloidal flux ΨN=Ψ/Ψsep\Psi_{N}=\Psi/\Psi_{\text{sep}} for the NSTX-like equilibrium.

We also need derivatives of the coordinates to compute metric quantities, which can also be computed numerically via automatic differentiation or finite differencing; alternatively, integral expressions for the derivatives can also be derived via the Leibniz integral rule. In Fig. 5.13, we show some of the resulting geometric quantities. There is significant flux expansion and magnetic shear for flux surfaces near the separatrix and X-points, which causes some of the metric quantities to diverge near the top-left and bottom-left corners of the (Ψ,θ)(\Psi,\theta) domain as Ψ\Psi approaches Ψsep\Psi_{\text{sep}}. Finally, note that the Jacobian of the (Ψ,α,θ)(\Psi,\alpha,\theta) coordinate system,

J=(Ψ×αθ)1=s(Ψ)R|Ψ|,J=(\nabla\Psi\times\nabla\alpha\boldsymbol{\cdot}\nabla\theta)^{-1}=s(\Psi)\frac{R}{|\nabla\Psi|}, (5.106)

is equivalent to the Jacobian defined in Eq. 5.92 for the (Ψ,θ,ϕ)(\Psi,\theta,\phi) magnetic surface coordinate system.

Refer to caption
Figure 5.13: Geometric quantities resulting from the field-aligned coordinate system as derived in this section for the NSTX-like equilibrium shown in Fig. 5.9.

Linear and nonlinear simulations using the shaped SOL geometry presented in this section are left to future work. An important question is how close the simulation domain can approach the X-point before the significant magnetic shear and metric divergence near the X-point become numerically untenable.

5.4 Analytical concentric circular equilibria

In the tokamak core, many early results and inter-code benchmarks have used an ad hoc analytical equilibrium model with circular concentric flux surfaces. This is commonly given by the popular sαs-\alpha model with no Shafranov shift (α=0\alpha=0). This type of geometry has also been used to model circular SOL plasmas with a limiter at the inboard midplane, modeling an inner-wall-limited plasma (Ricci & Rogers, 2013; Halpern et al., 2013; Francisquez et al., 2017; Zhu et al., 2017). Here we use a slightly modified circular equilibrium model that is more consistent than the sαs-\alpha model in the large aspect ratio approximation (Lapillonne et al., 2009).

As in the previous section, we start from a Solov’ev solution of the form of Eq. 5.84. We use a toroidal coordinate system (r,θ,ϕ)(r,\theta,\phi), where (r,θ)(r,\theta) are the minor radius and poloidal angle coordinates in the (R,Z)(R,Z) plane such that R=R0+rcosθR=R_{0}+r\cos\theta and Z=rsinθZ=r\sin\theta, and ϕ\phi is the toroidal angle. Taking the large aspect ratio limit R0/a1R_{0}/a\gg 1 and κ0=1\kappa_{0}=1 for circular flux surfaces, we obtain

Ψ=B02q¯r2.\Psi=\frac{B_{0}}{2\bar{q}}r^{2}. (5.107)

The resulting magnetic field is

𝑩=ϕ×Ψ+RBϕϕ=R0B0R[𝒆ϕ+rR0q¯𝒆θ].\mbox{\boldmath${B}$}=\nabla\phi\times\nabla\Psi+RB_{\phi}\nabla\phi=\frac{R_{0}B_{0}}{R}\left[\mbox{\boldmath${e}$}_{\phi}+\frac{r}{R_{0}\bar{q}}\mbox{\boldmath${e}$}_{\theta}\right]. (5.108)

While Eq. 5.107 implies q¯=const\bar{q}=\text{const}, we will generalize the equilibrium to allow q¯=q¯(r)\bar{q}=\bar{q}(r), which is related to the true safety factor via (Lapillonne et al., 2009)

q(r)=12π02π𝐁ϕ𝐁θdθ=q¯2π02πdθ1+ϵcosθ=q¯1ϵ2,q(r)=\frac{1}{2\pi}\int_{0}^{2\pi}\frac{{\bf B}\boldsymbol{\cdot}\nabla\phi}{{\bf B}\boldsymbol{\cdot}\nabla\theta}\ \textnormal{d}\theta=\frac{\bar{q}}{2\pi}\int_{0}^{2\pi}\frac{\textnormal{d}\theta}{1+\epsilon\cos\theta}=\frac{\bar{q}}{\sqrt{1-\epsilon^{2}}}, (5.109)

where ϵ=r/R0\epsilon=r/R_{0} is the inverse aspect ratio. We instead define the poloidal flux in terms of its radial derivative, dΨ/dr=rB0/q¯\textnormal{d}\Psi/\textnormal{d}r=rB_{0}/\bar{q}, giving

Ψ=0rrB0q¯(r)dr\Psi=\int_{0}^{r}\frac{r^{\prime}B_{0}}{\bar{q}(r^{\prime})}\,\textnormal{d}r^{\prime} (5.110)

instead of Eq. 5.107.

Here we will choose a straight-field-line poloidal angle χ\chi defined such that field lines are straight in the (χ,ϕ)(\chi,\phi) plane with slope qq. To do this we take (𝑩ϕ)/(𝑩χ)=q({\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla\phi})/({\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla\chi})=q, which leads to dχ/dθ=(𝑩ϕ)/(q𝑩θ)\textnormal{d}\chi/\textnormal{d}\theta=(\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla\phi)/(q\mbox{\boldmath${B}$}\boldsymbol{\cdot}\nabla\theta). Integrating over θ\theta then gives

χ(r,θ)=1q0θ𝐁ϕ𝐁θdθ=q¯q0θdθ1+ϵcosθ=2arctan[1ϵ1+ϵtan(θ2)].\chi(r,\theta)=\frac{1}{q}\int_{0}^{\theta}\frac{{\bf B}\boldsymbol{\cdot}\nabla\phi}{{\bf B}\boldsymbol{\cdot}\nabla\theta^{\prime}}\ \textnormal{d}\theta^{\prime}=\frac{\bar{q}}{q}\int_{0}^{\theta}\frac{\textnormal{d}\theta^{\prime}}{1+\epsilon\cos\theta^{\prime}}=2\arctan\left[\sqrt{\frac{1-\epsilon}{1+\epsilon}}\tan\left(\frac{\theta}{2}\right)\right]. (5.111)

Now we can define the field-aligned coordinate system (x,y,z)(x,y,z) as

x=rx0,y=r0q0(qχϕ)y0,z=χ,x=r-x_{0},\qquad y=\frac{r_{0}}{q_{0}}\left(q\chi-\phi\right)-y_{0},\qquad z=\chi, (5.112)

where r0r_{0} is the minor radius of a flux surface of interest, and q0=q(r0)q_{0}=q(r_{0}).

Refer to caption
Figure 5.14: Linear growth rate results for the Cyclone base case, with Gkeyll results (blue diamonds) compared to several other gyrokinetic codes. Note that since Gkeyll does not include gyroaveraging we only expect accuracy in the small kyρsk_{y}\rho_{\mathrm{s}} limit. Adapted from Figure 3a of (Görler et al., 2016).

5.4.1 Cyclone base case linear benchmark

Here we perform the now-standard Cyclone base case linear benchmark with Gkeyll using the circular equilibrium described in the previous section. These calculations use the electrostatic approximation with adiabatic electrons, as in the original benchmark (Dimits et al., 2000). Like the KBM calculations in Section 3.4.2, these simulations use a single narrow cell in the radial direction, making them effectively “local”, unlike a “global” calculation that covers some portion of the tokamak minor radius and accounts for the radial variation of background quantities.444While Gkeyll could in principle be capable of performing global calculations, one must be careful with the initial conditions to avoid an equilibrium-scale n=0n=0 mode that results from the neoclassical terms. This can obscure or alter the growth rate of the n0n\neq 0 mode of primary interest. The so-called “canonical” Maxwellian, which is formulated in terms of the canonical momentum so that it is an equilibrium of the full-ff gyrokinetic equation including the neoclassical terms, is used in some full-ff gyrokinetic codes to avoid exciting the n=0n=0 mode (Angelino et al., 2006). The implementation of a canonical Maxwellian initial condition is currently in progress, which will enable global instability calculations. We use an extended domain along the field line with 3πχ3π-3\pi\leq\chi\leq 3\pi and Dirichlet boundary conditions f(χ=±3π)=F0f(\chi=\pm 3\pi)=F_{0} so that no fluctuations are allowed at the domain ends.

Refer to caption
Figure 5.15: Linear eigenmode for n=10n=10 case, showing ballooning mode structure along the field line.

We compare our results to the inter-code benchmark of Görler et al. (2016); relevant parameters for the simulation setup are given in Tables I and II of that reference. In Fig. 5.14 we have reproduced Figure 3a of Görler et al. (2016) with the addition of some Gkeyll results. We see good agreement for n=5n=5, where n=kyr0/q0n=k_{y}r_{0}/q_{0} is the toroidal mode number. Since Gkeyll does not include gyroaveraging, we only expect accuracy in the small kyρsk_{y}\rho_{\mathrm{s}} limit. Consequently, we overpredict the growth rate as we move to higher mode numbers. We also show the linear eigenmode for the n=10n=10 case in Fig. 5.15, which has the characteristic peak at the outboard midplane (χ=0)(\chi=0) of a ballooning mode. Here we have removed the n=0n=0 component of the potential by subtracting its yy-average.

Additional work will extend these benchmarks to the two-species electrostatic cases and the electromagnetic cases that are also examined in Görler et al. (2016). We will also include global effects in future work.

Appendix 5.A Alternative coordinate mappings for helical geometry

One may note that the helical coordinate mapping we used in this chapter, Eq. 5.58, does not match the mapping proposed in Shi et al. (2019) or Chapter 4, given by

R=x,φ=ysinϑ+zcosϑRc,Z=zsinϑ,R=x,\qquad\varphi=\frac{y\sin\vartheta+z\cos\vartheta}{R_{c}},\qquad Z=z\sin\vartheta, (5.113)

where sinϑ=Bv/B=H/Lc\sin\vartheta=B_{v}/B=H/L_{c}, with ϑ\vartheta the field line pitch angle (as shown in Fig. 5.2) so that

x=R,z=Zsinϑ=LcHZ,y=Rcsinϑ(φZRccotϑ)=RcLcH(φZRcBφBv).x=R,\qquad z=\frac{Z}{\sin\vartheta}=\frac{L_{c}}{H}Z,\qquad y=\frac{R_{c}}{\sin\vartheta}\left(\varphi-\frac{Z}{R_{c}}\cot\vartheta\right)=R_{c}\frac{L_{c}}{H}\left(\varphi-\frac{Z}{R_{c}}\frac{B_{\varphi}}{B_{v}}\right). (5.114)

After computing the resulting gradient basis vectors, we have

x×y=LcH(BφBv𝝋^+Rcx𝐙^).\nabla x\times\nabla y=\frac{L_{c}}{H}\left({\frac{B_{\varphi}}{B_{v}}\boldsymbol{\hat{\boldsymbol{\varphi}}}+\frac{R_{c}}{x}\mathbf{\hat{Z}}}\right). (5.115)

Taking 𝒞=HBv/Lc\mathcal{C}=HB_{v}/L_{c}, the resulting background magnetic field in Clebsch form is

𝑩=𝒞x×y=Bφ𝝋^+RcxBv𝐙^.\mbox{\boldmath${B}$}=\mathcal{C}\nabla x\times\nabla y=B_{\varphi}\boldsymbol{\hat{\boldsymbol{\varphi}}}+\frac{R_{c}}{x}B_{v}\mathbf{\hat{Z}}. (5.116)

We see that this only gives the correct pitch of the magnetic field at x=Rcx=R_{c}, so this is not a field-aligned coordinate system.

We can fix this issue and make the coordinates field-aligned by changing the φ\varphi mapping to

φ=ysinϑRc+zcosϑx=yRcHLc+zx1H2Lc2,\varphi=\frac{y\sin\vartheta}{R_{c}}+\frac{z\cos\vartheta}{x}=\frac{y}{R_{c}}\frac{H}{L_{c}}+\frac{z}{x}\sqrt{1-\frac{H^{2}}{L_{c}^{2}}}, (5.117)

so that

y=Rcsinϑ(φZRcotϑ)=RcLcH(φBφZBvR),y=\frac{R_{c}}{\sin\vartheta}\left(\varphi-\frac{Z}{R}\cot\vartheta\right)=R_{c}\frac{L_{c}}{H}\left(\varphi-\frac{B_{\varphi}Z}{B_{v}R}\right), (5.118)

which is the same as the definition of yy from Eq. (5.58) except for a factor of 1/sinϑ1/\sin\vartheta (with x0=Rcx_{0}=R_{c} here). This gives

x×y=Rcx(cosϑ𝝋^+sinϑ𝐙^)=RcxLcH(BφBv𝝋^+𝐙^).\nabla x\times\nabla y=\frac{R_{c}}{x}\left(\cos\vartheta\hat{\boldsymbol{\varphi}}+\sin\vartheta\mathbf{\hat{Z}}\right)=\frac{R_{c}}{x}\frac{L_{c}}{H}\left(\frac{B_{\varphi}}{B_{v}}\boldsymbol{\hat{\boldsymbol{\varphi}}}+\mathbf{\hat{Z}}\right). (5.119)

Taking 𝒞=Bx/Rc\mathcal{C}=Bx/R_{c}, we have

𝐁=𝒞x×y=B(cosϑ𝝋^+sinϑ𝐙^)=Bφ𝝋^+Bz𝐙^,{\bf B}=\mathcal{C}\nabla x\times\nabla y=B\left(\cos\vartheta\boldsymbol{\hat{\boldsymbol{\varphi}}}+\sin\vartheta\mathbf{\hat{Z}}\right)=B_{\varphi}\boldsymbol{\hat{\boldsymbol{\varphi}}}+B_{z}\mathbf{\hat{Z}}, (5.120)

which is now the correct form of the magnetic field.

This mapping uses the distance along the field line as the field-aligned zz coordinate. For SMT configurations, where the connection length can vary radially, this choice could mean that the zz simulation domain extents must also vary radially. We could instead normalize the zz coordinate to the connection length, resulting in an equal-arc-length-like parallel coordinate, but this would result in the parallel coordinate becoming proportional to the vertical height ZZ. Thus we have used the vertical height ZZ as the zz coordinate in Section 5.2.

Appendix 5.B Self-consistently reproducing “simplified” helical geometry

Here we would like to effectively reproduce the “simplified” helical geometry that we used to produce the results in Section 4.2. As we will see, the actual geometry that matches the approximations we made in Section 4.1.1 is not helical, but purely toroidal; it essentially consists of rings of toroidal field stacked vertically on top of each other, as shown in Fig. 5.16. The mapping from cylindrical coordinates (R,φ,Z)(R,\varphi,Z) to field-aligned coordinates (x,y,z)(x,y,z) that gives this simplified geometry is

x=R,y=Z,z=Rcφ.x=R,\qquad y=Z,\qquad z=R_{c}\varphi. (5.121)

The tangent unit vectors are

𝒆x=𝐑^,𝒆y=𝐙^,𝒆z=xRc𝝋^,\mbox{\boldmath${e}$}_{x}=\mathbf{\hat{R}},\qquad\mbox{\boldmath${e}$}_{y}=\mathbf{\hat{Z}},\qquad\mbox{\boldmath${e}$}_{z}=\frac{x}{R_{c}}\boldsymbol{\hat{\boldsymbol{\varphi}}}, (5.122)

and the gradient unit vectors are

x=𝐑^,y=𝐙^,z=Rcx𝝋^.\nabla x=\mathbf{\hat{R}},\qquad\nabla y=\mathbf{\hat{Z}},\qquad\nabla z=\frac{R_{c}}{x}\boldsymbol{\hat{\boldsymbol{\varphi}}}. (5.123)
Refer to caption
Figure 5.16: Geometry with purely toroidal magnetic field. This is the geometry that matches the metric-related approximations we made for the results in Section 4.2. In those simulations, sheath boundary conditions applied in the zz direction are equivalent to a limiter that extends vertically at some toroidal location (although the “connection length” along the field lines used in the simulations is not necessarily the circumference of the toroidal rings). Periodic boundary conditions were applied in the yy direction, which is the vertical direction here.

The magnetic field is then given by

𝑩=𝒞x×y=JBgzz𝐑^×𝐙^=B𝝋^\mbox{\boldmath${B}$}=\mathcal{C}\nabla x\times\nabla y=\frac{JB}{\sqrt{g_{zz}}}\mathbf{\hat{R}}\times\mathbf{\hat{Z}}=B\boldsymbol{\hat{\boldsymbol{\varphi}}} (5.124)

with B=Baxis(R0/x)B=B_{\text{axis}}(R_{0}/x), so that the field is indeed purely toroidal.

Note that here, the coordinate along the field line, zz, is defined to be proportional to the toroidal angle, φ\varphi. Whereas elsewhere in this chapter we used the poloidal angle as the field-aligned coordinate, this is not possible here where the field lines have no pitch. In fact, this is precisely the issue with using a field-aligned poloidal coordinate at the X-point, where the poloidal magnetic field vanishes and the field is purely toroidal.

The remaining geometry quantities of interest are

cmag=𝒞=JBgzz=B\displaystyle\texttt{cmag}={\mathcal{C}}=\frac{JB}{\sqrt{g_{zz}}}=B (5.125)
b_x=bx=gxzgzz=0\displaystyle\texttt{b\_x}=b_{x}=\frac{g_{xz}}{\sqrt{g_{zz}}}=0 (5.126)
b_y=by=gyzgzz=0\displaystyle\texttt{b\_y}=b_{y}=\frac{g_{yz}}{\sqrt{g_{zz}}}=0 (5.127)
b_z=bz=gzz=xRc\displaystyle\texttt{b\_z}=b_{z}=\sqrt{g_{zz}}=\frac{x}{R_{c}} (5.128)
gxx=gxx=1\displaystyle\texttt{gxx}=g^{xx}=1 (5.129)
gxy=gxy=0\displaystyle\texttt{gxy}=g^{xy}=0 (5.130)
gyy=gyy=1\displaystyle\texttt{gyy}=g^{yy}=1 (5.131)
jacobPhase=BB\displaystyle\texttt{jacobPhase}=B_{\parallel}^{*}\approx B (5.132)
jacobGeo=J=detgij=xRc.\displaystyle\texttt{jacobGeo}=J=\sqrt{\det g_{ij}}=\frac{x}{R_{c}}. (5.133)

We can see that many of the metric quantities are trivial or vanish, just as we approximated in Section 4.1.1. The magnetic (curvature and B\nabla B) drifts are then

𝒗dx=0\displaystyle\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla x=0 (5.134)
𝒗dy=mv2+μBqB1x\displaystyle\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla y=-\frac{mv_{\parallel}^{2}+\mu B}{qB}\frac{1}{x} (5.135)
𝒗dz=0,\displaystyle\mbox{\boldmath${v}$}_{d}\boldsymbol{\cdot}\nabla z=0, (5.136)

which matches Eq. 4.3.

Chapter 6 Positivity-preserving discontinuous Galerkin algorithm for hyperbolic conservation laws without post-hoc diffusion

Physically, the distribution function of particles is a non-negative scalar function, i.e. f(𝒙,𝒗,t)0f(\mbox{\boldmath${x}$},\mbox{\boldmath${v}$},t)\geq 0 throughout the phase space. However, there is no guarantee that a numerical scheme will preserve this property. The discontinuous Galerkin schemes that we described in Chapter 3 are no exception, as they do not even ensure positivity of the cell average of the distribution function. In some cases small regions of negative ff do not impact the physics, but in other cases negative regions can lead to numerical instability. Thus we must develop a method to prevent negative regions in order for our simulations to be accurate and robust.

There is extensive literature on constructing positivity-preserving (or more generally, bound-preserving) DG schemes. For example, a widely used and now standard positivity-limiting scheme presented by Zhang & Shu (2011) works by limiting the amount of flux leaving a cell surface so that the cell average is not allowed to become negative. However, this limiter procedure by itself can produce unphysical steep slopes and higher moments. For this reason, a post-hoc sub-cell diffusion step is applied whereby the slopes and higher moments in each cell are adjusted so that the solution remains positive at some control points. This leads to a robust positivity-preserving algorithm for many conservation laws, like the Euler equations and the ideal MHD equations. Generalizations of the Zhang-Shu scheme have also been made (Johnson & Rossmanith, 2012).

However, the Zhang-Shu (and related) algorithms cannot be used for evolution of kinetic equations in which the conservation properties are indirect (i.e. when there is not a direct equation for the evolution of the energy). The reason for this is that post-hoc sub-cell diffusion will change the energy and break energy conservation. One could try to readjust the energy after the diffusive step to maintain energy conservation, as done in Shi (2017), but often such adjustments are not possible without disturbing the underlying physics.

In this chapter we develop a novel positivity-preserving DG scheme without post-hoc diffusion. After showing a preliminary example of the positivity issue, we first define what we mean by positivity in the context of the discontinuous Galerkin representation of the cell. Next we construct the positivity-preserving scheme and show that conservation properties are maintained for Hamiltonian systems. Finally we show numerical results in several dimensionalities and equation systems.

6.1 The positivity problem: 1D advection example

Consider an one-dimensional advection equation,

ft+vfx=0.\frac{\partial f}{\partial t}+v\frac{\partial f}{\partial x}=0. (6.1)

Taking vv to be constant in this simple example, we know the solution is

f(x,t)=f(xvt,0).f(x,t)=f(x-vt,0). (6.2)

That is, the solution keeps its initial shape as it moves through the domain with constant velocity vv. If the domain is periodic with length LL, the pulse will return to its initial position at time t=L/vt=L/v.

Refer to caption
Figure 6.1: Advection of a square pulse for one period on a 1D periodic domain, overlaid with the initial condition.

We can easily discretize this system with a discontinuous Galerkin scheme. In Fig. 6.1, we show the results of a piecewise-linear scheme with 32 cells on a one-dimensional periodic domain with length L=1L=1. The initial condition is a square pulse centered at x=0.5x=0.5 with width w=0.5w=0.5, shown dash-dotted. After 1 period, the solution (solid lines) returns to its initial position, although the shape of the pulse has been distorted by numerical artifacts. Notably, we see unphysical negative overshoot regions at the bottom of the pulse, as well as positive overshoots at the top of the pulse. Cells with a negative cell average are marked with points showing the cell center. While in some applications small negative overshoots may be tolerable, often these unphysical negative regions can cause severe problems. Our goal in this chapter will be to devise a positivity-preserving scheme that eliminates these negative regions.

6.2 Defining positivity, in the weak sense

The first challenge is to define what is meant by positivity in the context of the discontinuous Galerkin representation of the solution. In each cell, the solution is given by an expansion on some basis set. The goal of this section will be to develop a method to constrain the expansion coefficients to maintain positivity of the solution, in some sense. Let’s first consider the simplest case: a piecewise-linear (p=1p=1) representation in one dimension. Taking an orthonormal basis set ψ={1/2,3/2x}\psi=\{1/\sqrt{2},\sqrt{3/2}x\} in a cell x[1,1]x\in[-1,1], we have

fh=kfkψk=12f0+32xf1.f_{h}=\sum_{k}f_{k}\psi_{k}=\frac{1}{\sqrt{2}}f_{0}+\frac{\sqrt{3}}{\sqrt{2}}xf_{1}. (6.3)

How can we constrain the coefficients f0f_{0} and f1f_{1} to ensure that the solution is positive? To start, we should at least ensure that the cell average is positive, so that f00f_{0}\geq 0. Should the solution be required to be positive on the whole cell domain x=[1,1]x=[-1,1], or can the solution be negative on some portion of the domain?

One possible way to answer these questions is to define positivity as weak equality to a positive-definite function (Hakim et al., 2020). For example, we could consider a non-polynomial positive-definite exponential solution given by

gh=g0exp(g1x).g_{h}=g_{0}\exp(g_{1}x). (6.4)

Weak equality of fhf_{h} and ghg_{h} in the L2L_{2} sense, which we denote as fhghf_{h}\doteq g_{h}, then requires that the projections of the two representations onto the basis be equivalent:

1112fhdx=1112ghdx\displaystyle\int_{-1}^{1}\frac{1}{\sqrt{2}}f_{h}\,\textnormal{d}x=\int_{-1}^{1}\frac{1}{\sqrt{2}}g_{h}\,\textnormal{d}x\quad f0=2g0sinhg1g1\displaystyle\Rightarrow\quad f_{0}=\frac{\sqrt{2}g_{0}\sinh g_{1}}{g_{1}} (6.5)
1132xfhdx=1132xghdx\displaystyle\int_{-1}^{1}\frac{\sqrt{3}}{\sqrt{2}}xf_{h}\,\textnormal{d}x=\int_{-1}^{1}\frac{\sqrt{3}}{\sqrt{2}}xg_{h}\,\textnormal{d}x\quad f1=6g0g12(g1coshg1sinhg1).\displaystyle\Rightarrow\quad f_{1}=\frac{\sqrt{6}g_{0}}{g_{1}^{2}}\left(g_{1}\cosh g_{1}-\sinh g_{1}\right). (6.6)

Note that

f13f0=cothg11g1=L(g1),\frac{f_{1}}{\sqrt{3}f_{0}}=\coth g_{1}-\frac{1}{g_{1}}=L(g_{1}), (6.7)

where L(g1)L(g_{1}) is the well-known Langevin function in statistical mechanics. Notably, this function is bounded at |L(g1)|1|L(g_{1})|\leq 1 for all g1g_{1}. This means that in order for weak-equivalence of the solutions fhf_{h} and ghg_{h} to be possible, the coefficients of fhf_{h} must satisfy

|f1|3f01.\frac{|f_{1}|}{\sqrt{3}f_{0}}\leq 1. (6.8)

Together with the constraint f00f_{0}\geq 0, we now have positivity constraints for both coefficients of the piecewise-linear representation of the solution.

We can now express gh(x)g_{h}(x) in terms of f0f_{0} and x¯f1/(3f0)\bar{x}\equiv f_{1}/(\sqrt{3}f_{0}) via

gh(x)=f0g12sinhg1eg1x,g_{h}(x)=\frac{f_{0}g_{1}}{\sqrt{2}\sinh g_{1}}e^{g_{1}x}, (6.9)

where g1=g1(x¯)=L1(x¯)g_{1}=g_{1}(\bar{x})=L^{-1}(\bar{x}), and L1L^{-1} is the inverse Langevin function.111Although the inverse of the Langevin function does not have a closed form, a number of Padé approximations for the inverse have been developed, including (Cohen, 1991) L1(x)x(3x2)1x2.L^{-1}(x)\approx\frac{x(3-x^{2})}{1-x^{2}}. (6.10) Fig. 6.2 shows an example of the weak-equivalent linear and exponential solutions with f0=0.4f_{0}=0.4 and f1=0.8f_{1}=0.8.

Note that the constraint from Eq. 6.8 does not force the linear solution to be positive everywhere in the cell. In this case, the linear solution is negative for x<0.5x<-0.5 but the exponential solution is still realizable. In fact, one can show that the constraint on f1f_{1} is equivalent to requiring fh(x=±1/3)0f_{h}(x=\pm 1/3)\geq 0, so that as long as the linear solution remains positive at “positivity control nodes” x=±1/3x=\pm 1/3, the solution will be positive in the weak sense. The control nodes are also plotted in Fig. 6.2, and they are indeed both positive.

Refer to caption
Figure 6.2: Weak-equivalent linear and exponential solutions, with f0=0.4f_{0}=0.4 and f1=0.8f_{1}=0.8. The exponential solution ghg_{h} is given by Eq. 6.9. The “positivity control nodes” fh(x=±1/3)f_{h}(x=\pm 1/3) are also shown.

6.2.1 Generalization to higher dimensionality

It is not immediately clear how to tractably extend the procedure of the previous section to higher dimensionality. For example, to extend to a two-dimensional case, one might consider taking the exponential representation to be of the form gh=exp(g0+g1x+g2y+g3xy)g_{h}=\exp(g_{0}+g_{1}x+g_{2}y+g_{3}xy). However, 2D integrals of this function involve error functions, making it difficult to evaluate positivity constraints based on weak equality.

We will discuss a more rigorous procedure for generalizing the definition of the weak-equivalent positive-definite solution to higher dimensionality (and higher polynomial order) in Appendix 6.B. For now, however, let’s continue with the idea of “positivity control nodes”. In one dimension, we saw above that if the piecewise-linear solution is positive at the control nodes at x=±1/3x=\pm 1/3, then the solution can be made weak-equivalent to an exponential solution. A sensible extension of this idea to higher dimension is to take tensor products of the control nodes, so that for example in 2D, we have control nodes at (1/3,1/3),(1/3,1/3),(1/3,1/3)(-1/3,-1/3),\ (-1/3,1/3),\ (1/3,-1/3), and (1/3,1/3)(1/3,1/3). Thus in the following section, we will consider the solution to be positive (in the weak sense) if the NN-dimensional piecewise-linear solution is non-negative at all of the 2N2^{N} control nodes.

6.3 Constructing a positivity-preserving scheme without post-hoc diffusion

Now that we have a definition of positivity, we next focus on how to construct a discontinuous Galerkin scheme that preserves positivity. In our scheme, we would like to avoid post-hoc sub-cell diffusion (rescaling slopes or higher moments of the solution in a cell if they become too extreme and violate positivity constraints after taking a timestep), which can break conservation laws involving higher-order moments (such as energy conservation in Hamiltonian systems like gyrokinetics).

To begin, we will once again consider a generic hyperbolic conservation law of the form of Eq. 3.11,

ft+𝑭=0,\frac{\partial f}{\partial t}+\nabla\boldsymbol{\cdot}\mbox{\boldmath${F}$}=0, (6.11)

with 𝑭(f)\mbox{\boldmath${F}$}(f) some arbitrary nonlinear flux. Recall from Eq. 3.12 that the DG discretization of this equation is given by multiplying by a test function ψ\psi and integrating by parts over a cell 𝒦i\mathcal{K}_{i}:

𝒦iψfhtd𝒙𝒦i𝑭hψd𝒙+𝒦iψ𝑭^d𝒔=0.\int_{\mathcal{K}_{i}}\psi\frac{\partial f_{h}}{\partial t}\textnormal{d}\mbox{\boldmath${x}$}-\int_{\mathcal{K}_{i}}\mbox{\boldmath${F}$}_{h}\boldsymbol{\cdot}\nabla\psi\,\textnormal{d}\mbox{\boldmath${x}$}+\oint_{\partial\mathcal{K}_{i}}\psi^{-}\mbox{\boldmath${\hat{F}}$}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}=0. (6.12)

Let us first focus on the one-dimensional piecewise-linear (p=1p=1) case. Mapping each cell 𝒦i\mathcal{K}_{i} to the interval x[1,1]x\in[-1,1] using the transformation x=2(xxi)/Δxx^{\prime}=2(x-x_{i})/\Delta x, with xix_{i} the cell center and Δx\Delta x the cell width, this gives (after dropping primes for simplicity)

Δx211ψfhtdx11Fhψxdx+ψ(1)F^(1)ψ(1)F^(1)=0.\frac{\Delta x}{2}\int_{-1}^{1}\psi\frac{\partial f_{h}}{\partial t}\textnormal{d}x-\int_{-1}^{1}F_{h}\frac{\partial\psi}{\partial x}\textnormal{d}x+\psi(1)\hat{F}(1)-\psi(-1)\hat{F}(-1)=0. (6.13)

In our standard discretization scheme, we would substitute the one-dimensional p=1p=1 orthonormal modal basis functions ψj={1/2,3/2x}\psi_{j}=\{1/\sqrt{2},\sqrt{3/2}x\} for the test functions, which results in

f0t=2Δx[F^(1)F^(1)]\displaystyle\frac{\partial f_{0}}{\partial t}=-\frac{\sqrt{2}}{\Delta x}\left[\hat{F}(1)-\hat{F}(-1)\right] (6.14)
f1t=6Δx[F^(1)+F^(1)]+23ΔxF0,\displaystyle\frac{\partial f_{1}}{\partial t}=-\frac{\sqrt{6}}{\Delta x}\left[\hat{F}(1)+\hat{F}(-1)\right]+\frac{2\sqrt{3}}{\Delta x}F_{0}, (6.15)

where we have also expanded fhf_{h} and FhF_{h} on the orthonormal modal basis. In terms of these modal coefficients, we learned above that positivity requires f00f_{0}\geq 0 and |f1|3f0|f_{1}|\leq\sqrt{3}f_{0}. This is equivalent to ensuring that control node values at x=±1/3x=\pm 1/3 remain non-negative, fh(x=±1/3)0f_{h}(x=\pm 1/3)\geq 0.

We would like to find a way to limit the surface and volume terms to ensure that these constraints are not violated as the solution evolves. Existing positivity-preserving schemes attempt to limit the boundary fluxes so that the cell-average f0f_{0} stays positive (the volume term for the cell-average always vanishes, so the cell-average is only affected by surface terms). However, it is not immediately clear how to account for an additional constraint |f1|3f0|f_{1}|\geq\sqrt{3}f_{0}, since the cell-slope f1f_{1} is also affected by the same fluxes; for this reason, existing schemes often rescale the cell-slope f1f_{1} post-hoc, which effectively gives sub-cell diffusion that can break higher-order conservation laws.

It is more convenient to instead consider the evolution of the control nodes, f±fh(x=±1/3)=f0/2±f1/6f_{\pm}\equiv f_{h}(x=\pm 1/3)=f_{0}/\sqrt{2}\pm f_{1}/\sqrt{6}. Taking the appropriate linear combinations of Eqs. 6.14 and 6.15, we have

f+t\displaystyle\frac{\partial f_{+}}{\partial t} =2ΔxF^(1)+2ΔxF0\displaystyle=-\frac{2}{\Delta x}\hat{F}(1)+\frac{\sqrt{2}}{\Delta x}F_{0} (6.16)
ft\displaystyle\frac{\partial f_{-}}{\partial t} =2ΔxF^(1)2ΔxF0.\displaystyle=\frac{2}{\Delta x}\hat{F}(-1)-\frac{\sqrt{2}}{\Delta x}F_{0}. (6.17)

Unlike in Eqs. 6.14 and 6.15, each of the control nodes is only affected by a flux from one side of the cell: the left node ff_{-} is affected by the flux on the left boundary F^(1)\hat{F}(-1), and the right node f+f_{+} is affected by the flux on the right boundary F^(1)\hat{F}(1).

Neglecting the volume terms for now, this means that we can separately limit the left flux to maintain f0f_{-}\geq 0 and limit the right flux to maintain f+0f_{+}\geq 0. However, note that the neighboring cells are also affected by these fluxes. To account for this, let us instead examine the evolution of two cells, ii and i+1i+1, due to a flux F^i+1/2\hat{F}^{i+1/2} at their interface:

f+it\displaystyle\frac{\partial f_{+}^{i}}{\partial t} =2ΔxF^i+1/2+2ΔxF0i\displaystyle=-\frac{2}{\Delta x}\hat{F}^{i+1/2}+\frac{\sqrt{2}}{\Delta x}F_{0}^{i} (6.18)
fi+1t\displaystyle\frac{\partial f_{-}^{i+1}}{\partial t} =2ΔxF^i+1/22ΔxF0i+1.\displaystyle=\frac{2}{\Delta x}\hat{F}^{i+1/2}-\frac{\sqrt{2}}{\Delta x}F_{0}^{i+1}. (6.19)

We see that the flux F^i+1/2\hat{F}^{i+1/2} is simply exchanging information between f+if_{+}^{i} and fi+1f_{-}^{i+1}, while neither fif_{-}^{i} nor f+i+1f_{+}^{i+1} is affected by this flux. This also means that only one of f+if_{+}^{i} or fi+1f_{-}^{i+1} is decreased by the flux, with the other increasing by the same amount. Upon adopting a forward Euler timestepping scheme (which can be built into a higher-order Runge-Kutta scheme), and dropping the volume terms for now, it is easy to see how to limit the flux F^i+1/2\hat{F}^{i+1/2} so that neither f+if_{+}^{i} nor fi+1f_{-}^{i+1} can become negative after a single timestep. This gives

f+i2ΔtΔxF^i+1/2\displaystyle f_{+}^{i}-\frac{2\Delta t}{\Delta x}\hat{F}^{i+1/2} 0\displaystyle\geq 0 (6.20)
fi+1+2ΔtΔxF^i+1/2\displaystyle f_{-}^{i+1}+\frac{2\Delta t}{\Delta x}\hat{F}^{i+1/2} 0.\displaystyle\geq 0. (6.21)

The limit on F^i+1/2\hat{F}^{i+1/2} to ensure that the flux does not make either f+if_{+}^{i} or fi+1f_{-}^{i+1} negative in a single step is then

fi+1Δx2ΔtF^i+1/2f+iΔx2Δt.\displaystyle-f_{-}^{i+1}\frac{\Delta x}{2\Delta t}\leq\hat{F}^{i+1/2}\leq f_{+}^{i}\frac{\Delta x}{2\Delta t}. (6.22)

This is illustrated in the diagram in Fig. 6.3.

Refer to caption
Figure 6.3: Illustration of limiter scheme for boundary fluxes based on Eq. 6.22. The flux limit on the flux between cells ii and i+1i+1, F^i+1/2\hat{F}^{i+1/2}, is violated in the left (a)(a) and right (c)(c) panels, leading to negative control nodes (red points). In the left panel (a)(a), F^i+1/2\hat{F}^{i+1/2} is too large to the right and control node f+if_{+}^{i} becomes negative (red). In the right panel (c)(c), F^i+1/2\hat{F}^{i+1/2} is too large to the left, leading to control node fi+1f_{-}^{i+1} becoming negative (red). In the middle panel (b)(b), the flux is within the limits and the control nodes all remain positive (black points). Also note that the control points fif_{-}^{i} and f+i+1f_{+}^{i+1} remain fixed in all panels because they are unaffected by the flux (these points are affected by other fluxes, but not the one depicted here, F^i+1/2\hat{F}^{i+1/2}).

Once we have limited all fluxes to ensure that the surface terms cannot make f±f_{\pm} negative in any cell in the domain, we can limit the volume terms. Considering Eqs. 6.16 and 6.17, we can see that the volume terms exchange information between ff_{-} and f+f_{+} within each cell. Thus one way to limit the volume terms is to simply scale all the volume terms in each cell by a common factor 0θi10\leq\theta^{i}\leq 1 to ensure that neither ff_{-} or f+f_{+} is made negative by the volume terms.

For cell ii, the final forward-Euler update can be expressed as

f+i(tn+Δt)\displaystyle f^{i}_{+}(t_{n}+\Delta t) =f+i(tn)2ΔtΔxF^i+1/2+2ΔtΔxθiF0i\displaystyle=f^{i}_{+}(t_{n})-\frac{2\Delta t}{\Delta x}\hat{F}^{i+1/2}+\frac{\sqrt{2}\Delta t}{\Delta x}\theta^{i}F_{0}^{i} (6.23)
fi(tn+Δt)\displaystyle f^{i}_{-}(t_{n}+\Delta t) =fi(tn)+2ΔtΔxF^i1/22ΔtΔxθiF0i,\displaystyle=f^{i}_{-}(t_{n})+\frac{2\Delta t}{\Delta x}\hat{F}^{i-1/2}-\frac{\sqrt{2}\Delta t}{\Delta x}\theta^{i}F_{0}^{i}, (6.24)

with limits on the fluxes given by Eq. 6.22 and the volume scaling factor given by

θi=min(1,f+i2ΔtΔxF^i+1/22ΔtΔxF0i,fi+2ΔtΔxF^i1/22ΔtΔxF0i).\theta^{i}=\min\left(1,\frac{f_{+}^{i}-\frac{2\Delta t}{\Delta x}\hat{F}^{i+1/2}}{\frac{-\sqrt{2}\Delta t}{\Delta x}F_{0}^{i}},\frac{f_{-}^{i}+\frac{2\Delta t}{\Delta x}\hat{F}^{i-1/2}}{\frac{\sqrt{2}\Delta t}{\Delta x}F_{0}^{i}}\right). (6.25)

Here we have prioritized the surface terms over the volume terms in that we limit the surface terms first. This can, for example, allow a maximal flux out the left boundary to lower ff_{-} to zero. Then if the volume terms wanted to decrease ff_{-} further, the volume terms would be essentially turned off in this cell. In principle, one could instead prioritize the volume terms, allowing the maximum flow within the cell and then possibly turning off boundary fluxes. A comparison of these two approaches is left to future work.

6.3.1 Exponential surface extrapolation

While the scheme described above will rigorously preserve positivity of the solution, we can make an additional improvement involving how the boundary fluxes are computed. In a standard DG scheme with upwinded fluxes, the flux between cells ii and i+1i+1 would be computed as

F^i+1/2={ui+1/2fhi(xi+1/2)ui+1/2>0ui+1/2fhi+1(xi+1/2)ui+1/2<0\hat{F}^{i+1/2}=\begin{cases}u^{i+1/2}f_{h}^{i}(x^{i+1/2})\qquad&u^{i+1/2}>0\\ u^{i+1/2}f_{h}^{i+1}(x^{i+1/2})\qquad&u^{i+1/2}<0\end{cases} (6.26)

with fhi(xi+1/2)f_{h}^{i}(x^{i+1/2}) and fhi+1(xi+1/2)f_{h}^{i+1}(x^{i+1/2}) computed using the piecewise-linear representation of the solution, and ui+1/2u^{i+1/2} the advection velocity at the cell interface. After mapping to a unit cell on x[1,1]x\in[-1,1], the boundary values would be given by

fhi(1)=12f0+32f1\displaystyle f_{h}^{i}(1)=\frac{1}{\sqrt{2}}f_{0}+\frac{\sqrt{3}}{\sqrt{2}}f_{1} (6.27)
fhi+1(1)=12f032f1.\displaystyle f_{h}^{i+1}(-1)=\frac{1}{\sqrt{2}}f_{0}-\frac{\sqrt{3}}{\sqrt{2}}f_{1}. (6.28)

Let us consider an extreme case: a cell where the flux from the left boundary is zero, with advection velocity u>0u>0 a constant. In this case, the modal coefficients of fhf_{h} in the cell are given by (from Eqs. 6.14 and 6.15)

f0t=u2Δxfhi(1)\displaystyle\frac{\partial f_{0}}{\partial t}=-\frac{u\sqrt{2}}{\Delta x}f_{h}^{i}(1) (6.29)
f1t=u6Δxfhi(1)+2u3Δxf0.\displaystyle\frac{\partial f_{1}}{\partial t}=-\frac{u\sqrt{6}}{\Delta x}f_{h}^{i}(1)+\frac{2u\sqrt{3}}{\Delta x}f_{0}. (6.30)

From above, we know that we need |f1|/(3f0)<1|f_{1}|/(\sqrt{3}f_{0})<1 for the solution to remain positive and realizable. Thus, let us compute the evolution of x¯f1/(3f0)\bar{x}\equiv f_{1}/(\sqrt{3}f_{0}):

x¯t=13f0f1tx¯f0f0t=u2Δx[22(1x¯)fhi(1)f0].\frac{\partial\bar{x}}{\partial t}=\frac{1}{\sqrt{3}f_{0}}\frac{\partial f_{1}}{\partial t}-\frac{\bar{x}}{f_{0}}\frac{\partial f_{0}}{\partial t}=\frac{u\sqrt{2}}{\Delta x}\left[2-\sqrt{2}(1-\bar{x})\frac{f_{h}^{i}(1)}{f_{0}}\right]. (6.31)

If we use the standard linear extrapolation for fhi(1)f_{h}^{i}(1) from Eq. 6.27, this gives

x¯t=uΔx[2(1x¯)(1+3x¯)]\displaystyle\frac{\partial\bar{x}}{\partial t}=\frac{u}{\Delta x}\left[2-(1-\bar{x})(1+3\bar{x})\right] =uΔx[12x¯+3x¯2]\displaystyle=\frac{u}{\Delta x}\left[1-2\bar{x}+3\bar{x}^{2}\right] (6.32)
>0for all x¯.\displaystyle>0\quad\text{for all $\bar{x}$}.

This means that without any limiters, x¯\bar{x} always grows without bound in this extreme case, which would violate the realizability limit x¯<1\bar{x}<1 in a finite time. Note also that any reduction or limit on the boundary value fhi(1)f^{i}_{h}(1) only makes the issue worse, so that x¯\bar{x} increases more quickly and becomes unphysical sooner. In this case, the volume term is steepening the slope in the cell faster than the boundary flux can flatten it. In practice, the volume term limiter in our scheme would eventually prevent |x|>1|x|>1. Nonetheless, perhaps it would help to enhance the extrapolated boundary flux, in a way that x¯/t0\partial\bar{x}/\partial t\rightarrow 0 as x¯1\bar{x}\rightarrow 1. This way, perhaps we wouldn’t need to limit the volume terms as often or as much.

Refer to caption
Figure 6.4: x¯/t\partial\bar{x}/\partial t vs. x¯\bar{x}, given by Eq. 6.32, for different choices of how to evaluate the surface value fhi(1)f_{h}^{i}(1). A linear extrapolation, Eq. 6.27, gives x¯/t>0\partial\bar{x}/\partial t>0 for all x¯\bar{x}, which drives the solution to be unrealizable in finite time (without limiters). Using an exponential extrapolation instead, given by Eq. 6.33, gives x¯/t0\partial\bar{x}/\partial t\rightarrow 0 as x¯1\bar{x}\rightarrow 1, which means that x¯\bar{x} should stop increasing before becoming unphysical.

One way to enhance the boundary value is to make use of the exponential reconstruction given by Eq. 6.9. Extrapolating ghg_{h} to the right edge of the cell at x=1x=1, we have

gh(1)=f0g12sinhg1eg1.g_{h}(1)=\frac{f_{0}g_{1}}{\sqrt{2}\sinh g_{1}}e^{g_{1}}. (6.33)

In Fig. 6.4 we plot x¯/t{\partial\bar{x}}/{\partial t} for three cases: linear extrapolation, Eq. 6.27; exact exponential extrapolation, Eq. 6.33 with g1(x¯)=L1(x¯)g_{1}(\bar{x})=L^{-1}(\bar{x}); and approximate exponential extrapolation, Eq. 6.33 with g1(x¯)x¯(3x¯2)/(1x¯2)g_{1}(\bar{x})\approx\bar{x}(3-\bar{x}^{2})/(1-\bar{x}^{2}), i.e. using the Cohen approximation, Eq. 6.10, for the inverse Langevin function. We see that the both the exact and the approximate exponential extrapolation give x¯/t0\partial\bar{x}/\partial t\rightarrow 0 as x¯1\bar{x}\rightarrow 1, which means that x¯\bar{x} should stop increasing before becoming unphysical. The approximate exponential extrapolation gives a region where x¯/t<0\partial\bar{x}/\partial t<0, which may in fact make the algorithm more robust because in this case the equilibrium value is x¯0.6\bar{x}\approx 0.6. Meanwhile, the linear extrapolation gives x¯/t>0\partial\bar{x}/\partial t>0 for all x¯\bar{x} as we showed above.

6.3.2 Extension to higher dimensionality with p=1p=1

To extend the scheme to higher dimensionality, we will again track the evolution of control nodes, which are given by tensor products of the 1D control nodes. For example, in 2D, we have four control nodes: f=fh(1/3,1/3)f_{--}=f_{h}(-1/3,-1/3), f+=fh(1/3,1/3)f_{-+}=f_{h}(-1/3,1/3), f+=fh(1/3,1/3)f_{+-}=f_{h}(1/3,-1/3), and f++=fh(1/3,1/3)f_{++}=f_{h}(1/3,1/3). We will illustrate the scheme for the two-dimensional case, with extension to higher dimensions relatively straightforward.

In 2D, the DG weak form from Eq. 6.12 mapped to a cell in x[1,1],y[1,1]x\in[-1,1],\ y\in[-1,1] is given by

11dx11dyψfht11dx11dy[2ΔxFxhψx+2ΔyFyhψy]\displaystyle\int_{-1}^{1}\textnormal{d}x\int_{-1}^{1}\textnormal{d}y\,\psi\frac{\partial f_{h}}{\partial t}-\int_{-1}^{1}\textnormal{d}x\int_{-1}^{1}\textnormal{d}y\left[\frac{2}{\Delta x}F_{x\,h}\frac{\partial\psi}{\partial x}+\frac{2}{\Delta y}F_{y\,h}\frac{\partial\psi}{\partial y}\right]
+2Δx11dy[ψ(1,y)F^x(1,y)ψ(1,y)F^x(1,y)]\displaystyle\quad+\frac{2}{\Delta x}\int_{-1}^{1}\textnormal{d}y\left[\psi(1,y)\hat{F}_{x}(1,y)-\psi(-1,y)\hat{F}_{x}(-1,y)\right] (6.34)
+2Δy11dx[ψ(x,1)F^y(x,1)ψ(x,1)F^y(x,1)]=0.\displaystyle\quad+\frac{2}{\Delta y}\int_{-1}^{1}\textnormal{d}x\left[\psi(x,1)\hat{F}_{y}(x,1)-\psi(x,-1)\hat{F}_{y}(x,-1)\right]=0. (6.35)

We can then compute the evolution of the four control nodes as

ft\displaystyle\frac{\partial f_{--}}{\partial t} =1Δx(Fx013Fx2)1Δy(Fy013Fy1)+2ΔxF^x(1,13)+2ΔyF^y(13,1)\displaystyle=-\frac{1}{\Delta x}\left(F_{x0}-\frac{1}{\sqrt{3}}F_{x2}\right)-\frac{1}{\Delta y}\left(F_{y0}-\frac{1}{\sqrt{3}}F_{y1}\right)+\frac{2}{\Delta x}\hat{F}_{x}(-1,-\frac{1}{3})+\frac{2}{\Delta y}\hat{F}_{y}(-\frac{1}{3},-1) (6.36)
f+t\displaystyle\frac{\partial f_{-+}}{\partial t} =1Δx(Fx0+13Fx2)+1Δy(Fy013Fy1)+2ΔxF^x(1,13)2ΔyF^y(13,1)\displaystyle=-\frac{1}{\Delta x}\left(F_{x0}+\frac{1}{\sqrt{3}}F_{x2}\right)+\frac{1}{\Delta y}\left(F_{y0}-\frac{1}{\sqrt{3}}F_{y1}\right)+\frac{2}{\Delta x}\hat{F}_{x}(-1,\frac{1}{3})-\frac{2}{\Delta y}\hat{F}_{y}(-\frac{1}{3},1) (6.37)
f+t\displaystyle\frac{\partial f_{+-}}{\partial t} =1Δx(Fx013Fx2)1Δy(Fy0+13Fy1)2ΔxF^x(1,13)+2ΔyF^y(13,1)\displaystyle=\frac{1}{\Delta x}\left(F_{x0}-\frac{1}{\sqrt{3}}F_{x2}\right)-\frac{1}{\Delta y}\left(F_{y0}+\frac{1}{\sqrt{3}}F_{y1}\right)-\frac{2}{\Delta x}\hat{F}_{x}(1,-\frac{1}{3})+\frac{2}{\Delta y}\hat{F}_{y}(\frac{1}{3},-1) (6.38)
f++t\displaystyle\frac{\partial f_{++}}{\partial t} =1Δx(Fx0+13Fx2)+1Δy(Fy0+13Fy1)2ΔxF^x(1,13)2ΔyF^y(13,1).\displaystyle=\frac{1}{\Delta x}\left(F_{x0}+\frac{1}{\sqrt{3}}F_{x2}\right)+\frac{1}{\Delta y}\left(F_{y0}+\frac{1}{\sqrt{3}}F_{y1}\right)-\frac{2}{\Delta x}\hat{F}_{x}(1,\frac{1}{3})-\frac{2}{\Delta y}\hat{F}_{y}(\frac{1}{3},1). (6.39)
Refer to caption
Figure 6.5: Diagram of fluxes affecting each interior control node in 2D. Each interior control node is affected by only the fluxes at the nearest surface control nodes (a dotted line between an interior node and a flux indicates that the flux affects that node).

Notably, each interior control node is affected only by the fluxes at the nearest surface control nodes, as shown in the diagram in Fig. 6.5. Similar to above, we can limit each flux Notably, each interior control node is affected only by the fluxes at the nearest surface control nodes, as shown in the diagram in Fig. 6.5. Similar to above, we can limit each flux so that the affected control nodes cannot become negative on a single forward-Euler timestep. Focusing on the f++f_{++} control node, if the fluxes F^x(1,1/3)\hat{F}_{x}(1,1/3) and F^y(1/3,1)\hat{F}_{y}(1/3,1) are both directed out of the cell (as depicted in Fig. 6.5), we need to make sure that the combined flux does not exceed the limit given by

2ΔtΔxF^x(1,13)+2ΔtΔyF^y(13,1)f++.\frac{2\Delta t}{\Delta x}\hat{F}_{x}(1,\frac{1}{3})+\frac{2\Delta t}{\Delta y}\hat{F}_{y}(\frac{1}{3},1)\leq f_{++}. (6.40)

We can separately limit the xx and yy fluxes by apportioning a fraction of f++f_{++} that is allowed to removed in each direction, which we will denote as ηx\eta_{x} and ηy\eta_{y}, such that ηx+ηy=1\eta_{x}+\eta_{y}=1. Now we can limit the fluxes as

F^x(1,13)\displaystyle\hat{F}_{x}(1,\frac{1}{3}) ηxf++Δx2Δt\displaystyle\leq\eta_{x}f_{++}\frac{\Delta x}{2\Delta t} (6.41)
F^y(13,1)\displaystyle\hat{F}_{y}(\frac{1}{3},1) ηyf++Δy2Δt.\displaystyle\leq\eta_{y}f_{++}\frac{\Delta y}{2\Delta t}. (6.42)

The definition of the ηd\eta_{d} need not be exact; one possible choice is to use the ratio given by the contribution to the CFL rate from each direction, rdr_{d}, divided by the total CFL rate rr, so that ηd=rd/r\eta_{d}=r_{d}/r.

As above, each flux should be limited by the control nodes on each side of the boundary. Thus the full limit on F^x(xi+1/2,1/3)\hat{F}_{x}(x^{i+1/2},1/3) at the boundary between cells ii and i+1i+1 is given by

ηxi+1f+i+1Δx2ΔtF^x(xi+1/2,13)ηxif++iΔx2Δt,\displaystyle-\eta_{x}^{i+1}f_{-+}^{i+1}\frac{\Delta x}{2\Delta t}\leq\hat{F}_{x}(x^{i+1/2},\frac{1}{3})\leq\eta_{x}^{i}f_{++}^{i}\frac{\Delta x}{2\Delta t}, (6.43)

where note the flux fraction ηx\eta_{x} is computed locally in each cell. Similar limiter expressions can be given for each flux depicted in Fig. 6.5.

Further, the fluxes can be computed with exponential extrapolation as in Section 6.3.1. We can compute the exponential extrapolation in one direction at a time, avoiding the need for a multi-dimensional exponential expression. For example, to compute the exponential extrapolation for F^x(1,1/3)\hat{F}_{x}(1,1/3), we find the exponential g(x)g(x) that is weak-equivalent to f(x,1/3)f(x,1/3), and then evaluate the exponential expression at the surface.

Once all the surface terms have been limited to ensure that no control point can become negative, the volume terms can again be limited by scaling all volume terms by a common factor 0θi10\leq\theta^{i}\leq 1 in each cell ii. Writing the forward-Euler update of each control node cc in cell ii generically as

fci(tn+Δt)=fci(tn)+ΔtSci+θiΔtVci,f_{c}^{i}(t_{n}+\Delta t)=f_{c}^{i}(t_{n})+\Delta tS_{c}^{i}+\theta^{i}\Delta tV_{c}^{i}, (6.44)

with SciS_{c}^{i} and VciV_{c}^{i} the surface and volume terms, respectively, the volume scaling factor is given by

θi=minc|Vci<0(1,fci+ΔtSciΔtVci).\theta^{i}=\min_{c\,|\,V_{c}^{i}<0}\left(1,\frac{f_{c}^{i}+\Delta tS_{c}^{i}}{-\Delta tV_{c}^{i}}\right). (6.45)

6.4 Conservation properties for Hamiltonian systems

Although the positivity-preserving scheme presented above could be used to solve any kind of hyperbolic conservation law of the form of Eq. 6.11, the primary targets of our scheme are Hamiltonian systems like gyrokinetics. In Section 3.2 we showed a DG scheme that conserves energy in Hamiltonian systems. Now let us apply the positivity-preserving limiters and consider how the conservation properties are modified, if at all.

Starting from Eq. 3.28, the positivity-preserving evolution of the distribution function ff is given by

𝒦iψ(𝒥fh)td𝒁𝒦iθi𝒥fh𝒁˙hψ𝒁d𝒁+𝒦iψΛ[𝒥fh𝒁˙h^]d𝒔=0,\int_{\mathcal{K}_{i}}\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}-\int_{\mathcal{K}_{i}}\theta_{i}\mathcal{J}f_{h}\dot{\mbox{\boldmath${Z}$}}_{h}\boldsymbol{\cdot}\frac{\partial\psi}{\partial\mbox{\boldmath${Z}$}}\,\textnormal{d}\mbox{\boldmath${Z}$}+\oint_{\partial\mathcal{K}_{i}}\psi^{-}\Lambda\left[\widehat{\mathcal{J}f_{h}\dot{\mbox{\boldmath${Z}$}}_{h}}\right]\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}=0, (6.46)

where θi\theta_{i} represents the volume term scaling factor in cell ii, and the notation Λ[F^]\Lambda[\hat{F}] represents limiters applied to surface fluxes. To check energy conservation, we first insert the discrete Hamiltonian HhH_{h} for the test function ψ\psi and sum over cells, giving

i𝒦iHh(𝒥fh)td𝒁=i𝒦iθi𝒥fh𝒁˙hHh𝒁d𝒁i𝒦iHhΛ[𝒥fh𝒁˙h^]d𝒔=0.\sum_{i}\int_{\mathcal{K}_{i}}H_{h}\frac{\partial(\mathcal{J}f_{h})}{\partial t}\textnormal{d}\mbox{\boldmath${Z}$}=\sum_{i}\int_{\mathcal{K}_{i}}\theta_{i}\mathcal{J}f_{h}\dot{\mbox{\boldmath${Z}$}}_{h}\boldsymbol{\cdot}\frac{\partial H_{h}}{\partial\mbox{\boldmath${Z}$}}\,\textnormal{d}\mbox{\boldmath${Z}$}-\sum_{i}\oint_{\partial\mathcal{K}_{i}}H_{h}^{-}\Lambda\left[\widehat{\mathcal{J}f_{h}\dot{\mbox{\boldmath${Z}$}}_{h}}\right]\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}=0. (6.47)

Even with the scaling factor θi\theta_{i}, the volume term vanishes as in the standard case because 𝒁˙hHh/𝒁={Hh,Hh}=0\dot{\mbox{\boldmath${Z}$}}_{h}\boldsymbol{\cdot}\partial H_{h}/\partial\mbox{\boldmath${Z}$}=\{H_{h},H_{h}\}=0. The surface term also vanishes just as in the standard case; the fluxes still exactly cancel at cell boundaries, even with the flux limiters. For Hamiltonian systems written in canonical form, the remainder of the energy conservation proof from Section 3.2 is unchanged. However, additional complexities arise in our scheme for the symplectic formulation of the electromagnetic gyrokinetic system, which requires the inclusion of limiters in some of the field equations. Extension of the positivity-preserving scheme to EMGK is left to future work, and we discuss the difficulties briefly in Appendix 6.A.

6.5 Results

In this section we implement the positivity-preserving scheme in Gkeyll and present some numerical results. We first study passive advection and then we turn to Hamiltonian systems: the incompressible Euler equations and electrostatic gyrokinetics.

6.5.1 1D advection

Refer to caption
Figure 6.6: Positivity-preserving advection of a square pulse for one period on a 1D periodic domain with 32 cells, overlaid with the initial condition.

Let us first return to the one-dimensional advection example from Section 6.1. Again taking a square pulse on a periodic domain, Fig. 6.6 shows the results of the new scheme. Compared to Fig. 6.1, we now see no negative overshoots and no negative cell averages. In fact, not only do the cell averages remain positive, but the control nodes in each cell also remain positive, which ensures that slopes do not become unphysically large. Note however that points on cell boundaries can be negative, so long as the control nodes are positive, as can be seen at x=5/32x=5/32.

6.5.2 2D advection

Refer to caption
Figure 6.7: Two-dimensional square pulse after one period of diagonal advection on a periodic domain with 32×3232\times 32 cells using standard DG (left) and positivity-preserving DG (right). In the standard case, cells with negative cell average are masked in white.

As a first two-dimensional test, we again consider uniform constant advection of a square pulse, given initially by

f(x,y,0)={1|xxc|<1/4and|yyc|<1/40otherwise\displaystyle f(x,y,0)=\begin{cases}&1\qquad|x-x_{c}|<1/4\ \mathrm{and}\ |y-y_{c}|<1/4\\ &0\qquad\mathrm{otherwise}\end{cases} (6.48)

with xc=yc=1/2x_{c}=y_{c}=1/2. We advect the solution diagonally, with velocity components vx=vy=1v_{x}=v_{y}=1, through a periodic domain with Lx=Ly=1L_{x}=L_{y}=1. Fig. 6.7 shows a comparison of the results from the standard DG scheme and the positivity-preserving scheme. Both cases use piecewise-linear (p=1p=1) basis functions with 32 cells in each direction. In the standard case, cells with negative cell average are masked in white. The positivity-preserving scheme successfully eliminates these negative regions.

6.5.3 2D vortex waltz

Refer to caption
Figure 6.8: Vorticity at t=100t=100 for “vortex waltz” problem on a periodic domain with 128×128128\times 128 cells using standard DG (left) and positivity-preserving DG (right). In the standard case, cells with negative cell-average vorticity are masked in white.

A more stringent test of our positivity-preserving scheme and its conservation properties is given by the incompressible Euler system. As we saw in Section 3.2.4, this is a Hamiltonian system, with a conserved energy given by

=|ψ|2d𝒁.\mathcal{E}=\int|\nabla_{\perp}\psi|^{2}\textnormal{d}\mbox{\boldmath${Z}$}. (6.49)

In the “vortex waltz” problem (Nielsen et al., 1996), we initialize two Gaussian vortices which merge as they orbit around each other. The domain is doubly periodic of dimension 10×1010\times 10 length units. The initial vorticity given by

ϖ(x,y,0)=er12/0.8+er22/0.8,\displaystyle\varpi(x,y,0)=e^{-r_{1}^{2}/0.8}+e^{-r_{2}^{2}/0.8}, (6.50)

where ri2=(xxi)2+(yyi)2r_{i}^{2}=(x-x_{i})^{2}+(y-y_{i})^{2} with (x1,y1)=(3.5,5.0)(x_{1},y_{1})=(3.5,5.0) and (x2,y2)=(6.5,5.0)(x_{2},y_{2})=(6.5,5.0) the initial locations of the peaks. We discretize the system with piecewise-linear basis functions (p=1)(p=1) on a grid with 128×128128\times 128 cells. We show a comparison of the vorticity at t=100t=100 from the standard DG scheme and the positivity-preserving scheme in Fig. 6.8, again masking cells in white that have negative cell-average vorticity.

Refer to caption
Figure 6.9: Time traces of the total energy in the system (t)\mathcal{E}(t) normalized to the initial energy for three cases: standard DG, the full positivity-preserving DG scheme, and a non-conservative version of the positivity-preserving scheme which uses post-hoc diffusion instead of volume term limiters. In (a)(a), a standard linear extrapolation is used to evaluate the surface fluxes, while in (b)(b) the exponential extrapolation from Section 6.3.1 is used. Note the difference in scale between (a)(a) and (b)(b); the ‘standard’ trace (solid) is the same in both plots. The negligible difference between the conservative and non-conservative traces in (b)(b) shows that using the exponential extrapolation reduces the need for volume limiters.

To verify that the positivity-preserving scheme has not broken energy conservation, we show in Fig. 6.9 time traces of the total energy, given by Eq. 6.49, for three cases: standard DG, the full positivity-preserving scheme, and a non-conservative positivity scheme. In the non-conservative scheme, the surface term limiters are still applied as in the conservative scheme, but we do not apply the volume term limiters. This would keep cell averages positive but could allow unphysical slopes to develop, so we add post-hoc rescaling of the slopes at the end of the timestep to maintain realizability, which breaks energy conservation. Indeed, the plot shows that the standard and conservative positivity-preserving schemes conserve the energy well, while the non-conservative scheme has energy errors.

6.5.4 5D electrostatic gyrokinetics

Our most challenging test of the positivity algorithm is its application to the 5D electrostatic gyrokinetic system. Without implementing the positivity algorithm, the standard DG discretization of the electrostatic gyrokinetic system results in regions of negative distribution function, leading to regions of negative density and negative temperature. This can lead to unphysical behavior in the collision operator222To improve robustness, we have altered the implementation of the collision operator in the standard version so that collisions are effectively turned off in cells with negative temperature, which avoids unphysical anti-diffusion in these cells. This improves robustness but does not completely eliminate positivity-related issues in the simulations. and the sheath boundary conditions, resulting in numerical instabilities.

Refer to caption
Figure 6.10: Timeseries of electron density at the midplane (z=0z=0) for 5D collisionless electrostatic gyrokinetic seeded blob simulations with the standard DG scheme (top row) and the positivity-preserving scheme (bottom row). In the standard case, cells with negative cell-average density are masked in white.

As a first test of the positivity algorithm in the electrostatic gyrokinetic system, we perform a collisionless seeded blob test. We initialize a Gaussian blob in helical NSTX-like geometry with Lz=100L_{z}=100 m and sheath boundary conditions at z=±Lz/2z=\pm L_{z}/2. As the blob polarizes it begins to advect radially outwards and also spin due to the Boltzmann spinning effect (Angus et al., 2012). With the standard DG discretization, this results in cells with negative cell-average density, as shown in the top row of Fig. 6.10. With the positivity-preserving algorithm, these negative cells are eliminated. Fig. 6.11 shows that energy conservation is not altered by the positivity algorithm, with energy still conserved in the system to 𝒪(105)\sim\mathcal{O}(10^{-5}).

Refer to caption
Figure 6.11: Energy conservation in the electrostatic seeded blob simulations with the standard algorithm and the positivity-preserving algorithm. The positivity algorithm does not adversely affect energy conservation, as desired.

An energy-conserving positivity-preserving DG algorithm for the Dougherty collision operator has also been formulated and will be presented in future work. This will enable full electrostatic simulations like the ones presented in Section 4.2 that maintain positivity of the distribution function. Implementing the positivity-preserving algorithm in the electromagnetic gyrokinetic system is somewhat more challenging, as we detail in the Appendix 6.A.

6.6 Summary

In this chapter we have developed a discontinuous Galerkin scheme for maintaining positivity of the distribution function. The scheme has been carefully constructed to avoid post-hoc diffusion so that conservation properties are preserved for Hamiltonian systems. The results in Section 6.5 show that the scheme is successful in maintaining positivity for passive advection, incompressible Euler, and collisionless electrostatic gyrokinetic systems. Extension to include collisions and electromagnetic effects to the gyrokinetic system is left as future work.

While the simulations in the bulk of this thesis were able to run somewhat robustly with the standard DG algorithm (without any assurances of positivity of the distribution function), there were a number of simulations attempted as part of this thesis that failed due to positivity issues. For example, simulations failed when we tried to use a collision frequency that varied in space and time based on local plasma parameters, because negative local values of density and temperature resulted in an ill-defined collision frequency. We also expect the positivity problem to only get worse as we move to more realistic (and complex) simulation setups and geometries. Thus the work of this chapter is an important and necessary step towards robust, high-fidelity simulations.

Appendix 6.A Difficulties in extending the positivity scheme to electromagnetic gyrokinetics

Extending the positivity scheme to the electromagnetic gyrokinetics algorithm presented in Section 3.3 is challenging, in part because one does not have all the information needed to compute limiters when the limiters themselves are needed. To illustrate this, first imagine that we (magically) already know what all the limiters will be at the beginning of the timestep, such that no terms (surface or volume) can lead to a negative control node. Neglecting collisions, the DG discretization of the gyrokinetic equation might look something like

𝒦i\displaystyle\int_{\mathcal{K}_{i}} ψ(𝒥fh)td3𝑹d3𝒗\displaystyle\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
𝒦iθiH𝒥fh𝑹˙hψd3𝑹d3𝒗𝒦i𝒥fh(θiHv˙hHθiAqmAht)ψvd3𝑹d3𝒗\displaystyle\quad-\int_{\mathcal{K}_{i}}\theta_{i}^{H}\mathcal{J}f_{h}\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\nabla\psi\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}-\int_{\mathcal{K}_{i}}\mathcal{J}f_{h}\left(\theta_{i}^{H}\dot{v}^{H}_{\parallel h}-\theta_{i}^{A}\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\right)\frac{\partial\psi}{\partial v_{\parallel}}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
+𝒦iψΛ[𝒥fh^𝑹˙h]d𝒔Rd3𝒗+𝒦iψΛ[𝒥fh^(v˙hHqmAht)]d3𝑹dsv\displaystyle\quad+\oint_{\partial\mathcal{K}_{i}}\psi^{-}\Lambda\left[\widehat{\mathcal{J}f_{h}}\dot{\mbox{\boldmath${R}$}}_{h}\right]\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}+\oint_{\partial\mathcal{K}_{i}}\psi^{-}\Lambda\left[\widehat{\mathcal{J}f_{h}}\left(\dot{v}^{H}_{\parallel h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\right)\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}s_{v}
=0.\displaystyle\quad=0. (6.51)

Here, θiH\theta_{i}^{H} and θiA\theta_{i}^{A} represent volume term scaling factors in cell ii for the Poisson bracket and inductive volume terms, respectively, and the notation Λ[F^]\Lambda[\hat{F}] represents limiters applied to surface fluxes.

We would like to ensure that this limiter scheme preserves energy conservation. While the volume term limiters θH\theta^{H} on the Poisson bracket terms do not affect energy conservation, we have an additional volume term outside the bracket involving Ah/t\partial A_{\parallel h}/\partial t. We also have modifications to the surface terms. In order to maintain energy conservation, we must account for these limiters in the field equations. To see this, take ψ=Hsh\psi=H_{s\,h} to compute

s,i\displaystyle\sum_{s,i} 𝒦iHsh(𝒥fsh)td3𝑹d3𝒗=s,i𝒦i𝒥fshθiH(𝑹˙hHsh+v˙hHHshv)d3𝑹d3𝒗\displaystyle\int_{\mathcal{K}_{i}}H_{s\,h}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=\sum_{s,i}\int_{\mathcal{K}_{i}}\mathcal{J}f_{s\,h}\,\theta_{i}^{H}\left(\dot{\mbox{\boldmath${R}$}}_{h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla H_{s\,h}+\dot{v}^{H}_{\parallel h}\frac{\partial H_{s\,h}}{\partial v_{\parallel}}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
s,i𝒦i𝒥fshθiAqsmsAhtHshvd3𝑹d3𝒗s,i𝒦iHshΛ[𝒥fh^𝑹˙h]d𝒔Rd3𝒗\displaystyle-\sum_{s,i}\int_{\mathcal{K}_{i}}\mathcal{J}f_{s\,h}\,\theta^{A}_{i}\frac{q_{s}}{m_{s}}\frac{\partial A_{\parallel h}}{\partial t}\frac{\partial H_{s\,h}}{\partial v_{\parallel}}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}-\sum_{s,i}\oint_{\partial\mathcal{K}_{i}}H_{s\,h}^{-}\Lambda\left[\widehat{\mathcal{J}f_{h}}\dot{\mbox{\boldmath${R}$}}_{h}\right]\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
s,i𝒦iHshΛ[𝒥fh^(v˙hHqmAht)]d3𝑹dsv.\displaystyle\quad-\sum_{s,i}\oint_{\partial\mathcal{K}_{i}}H_{s\,h}^{-}\Lambda\left[\widehat{\mathcal{J}f_{h}}\left(\dot{v}^{H}_{\parallel h}-\frac{q}{m}\frac{\partial A_{\parallel h}}{\partial t}\right)\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}s_{v}. (6.52)

As noted above, despite the inclusion of the volume limiter θH\theta^{H}, the first volume term still vanishes exactly because 𝑹˙hHh+v˙hHHh/v={Hh,Hh}h=0\dot{\mbox{\boldmath${R}$}}_{h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla H_{h}+\dot{v}^{H}_{\parallel h}\partial H_{h}/\partial v_{\parallel}=\{H_{h},H_{h}\}_{h}=0. The surface terms also cancel exactly at cell interfaces, so we are left with

s,i𝒦iHsh(𝒥fsh)td3𝑹d3𝒗\displaystyle\sum_{s,i}\int_{\mathcal{K}_{i}}H_{s\,h}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$} =s,i𝒦i𝒥fshθiAqsmsAhtHshvd3𝑹d3𝒗\displaystyle=-\sum_{s,i}\int_{\mathcal{K}_{i}}\mathcal{J}f_{s\,h}\,\theta^{A}_{i}\frac{q_{s}}{m_{s}}\frac{\partial A_{\parallel h}}{\partial t}\frac{\partial H_{s\,h}}{\partial v_{\parallel}}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}
=𝒯RAhtJ~hd3𝑹,\displaystyle=-\int_{\mathcal{T}^{R}}\frac{\partial A_{\parallel h}}{\partial t}\tilde{J}_{\parallel h}\,\,\textnormal{d}^{3}\mbox{\boldmath${R}$}, (6.53)

where we will define a limited parallel current, denoted by J~h\tilde{J}_{\parallel h}, as

J~h=s,jqsms𝒦jvθjAHshv𝒥fshd3𝒗.\tilde{J}_{\parallel h}=\sum_{s,j}\frac{q_{s}}{m_{s}}\int_{\mathcal{K}^{v}_{j}}\theta^{A}_{j}\frac{\partial H_{s\,h}}{\partial v_{\parallel}}\mathcal{J}f_{s\,h}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (6.54)

To regain energetic consistency, this limited J~h\tilde{J}_{\parallel h} must be used in Ampère’s law, which becomes

𝒦iRAhφ(i)d3𝑹𝒦iRφ(i)Ahd𝒔R=μ0𝒦iRφ(i)J~hd3𝑹.\int_{\mathcal{K}^{R}_{i}}\nabla_{\perp}A_{\parallel h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\varphi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\varphi^{(i)}\nabla_{\perp}A_{\parallel h}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}=\mu_{0}\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\ \tilde{J}_{\parallel h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}. (6.55)

Now we can insert φ(i)=(1/μ0)Ah/t\varphi^{(i)}=(1/\mu_{0})\partial A_{\parallel h}/\partial t to compute

Bht\displaystyle\frac{\partial\mathcal{E}_{B\,h}}{\partial t} =i𝒦iR1μ0AhAhtd3𝑹=𝒯RAhtJ~hd3𝑹,\displaystyle=\sum_{i}\int_{\mathcal{K}^{R}_{i}}\frac{1}{\mu_{0}}\nabla_{\perp}A_{\parallel h}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}=\int_{\mathcal{T}^{R}}\frac{\partial A_{\parallel h}}{\partial t}\tilde{J}_{\parallel h}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}, (6.56)

which now cancels the term leftover from Eq. 6.53. Now to derive the self-consistent Ohm’s law, we take the time derivative of Eq. 6.55, giving

𝒦iRAhtφ(i)d3𝑹𝒦iRφ(i)Ahtd𝒔R\displaystyle\int_{\mathcal{K}^{R}_{i}}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\mbox{\boldmath${\boldsymbol{\cdot}}$}\nabla_{\perp}\varphi^{(i)}\,\textnormal{d}^{3}\mbox{\boldmath${R}$}-\oint_{\partial\mathcal{K}^{R}_{i}}\varphi^{(i)}\nabla_{\perp}\frac{\partial A_{\parallel h}}{\partial t}\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}
+μ0sqs𝒦iRφ(i)[j𝒦jvθjAv¯Λ[𝒥fsh^(v˙hHqsmsAht)]dsv]d3𝑹\displaystyle\quad+\mu_{0}\sum_{s}q_{s}\int_{\mathcal{K}_{i}^{R}}\varphi^{(i)}\left[\sum_{j}\oint_{\partial\mathcal{K}^{v}_{j}}\theta^{A}_{j}\bar{v}_{\parallel}^{-}\Lambda\left[\widehat{\mathcal{J}f_{s\,h}}\left({\dot{v}^{H}_{\parallel h}}-\frac{q_{s}}{m_{s}}\frac{\partial A_{\parallel h}}{\partial t}\right)\right]\textnormal{d}s_{v}\right]\textnormal{d}^{3}\mbox{\boldmath${R}$}
=μ0sqs𝒦iRφ(i)[j𝒦jvθjAv¯(𝒥fsh)td3𝒗]d3𝑹,\displaystyle=\mu_{0}\sum_{s}q_{s}\int_{\mathcal{K}^{R}_{i}}\varphi^{(i)}\Bigg{[}\sum_{j}\int_{\mathcal{K}^{v}_{j}}\theta^{A}_{j}\bar{v}_{\parallel}\frac{\partial(\mathcal{J}f_{s\,h})}{\partial t}^{\star}\textnormal{d}^{3}\mbox{\boldmath${v}$}\Bigg{]}\textnormal{d}^{3}\mbox{\boldmath${R}$}, (6.57)

where where we have assumed p=1p=1, and

𝒦iψ(𝒥fh)td3𝑹d3𝒗=\displaystyle\int_{\mathcal{K}_{i}}\psi\frac{\partial(\mathcal{J}f_{h})}{\partial t}^{\star}\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}=
𝒦iθiH𝒥fh(𝑹˙hψ+v˙hHψv)d3𝑹d3𝒗𝒦iψΛ[𝒥fh^𝑹˙h]d𝒔Rd3𝒗.\displaystyle\quad\int_{\mathcal{K}_{i}}\theta^{H}_{i}\mathcal{J}f_{h}\left(\dot{\mbox{\boldmath${R}$}}_{h}\boldsymbol{\cdot}\nabla\psi+\dot{v}^{H}_{\parallel h}\frac{\partial\psi}{\partial v_{\parallel}}\right)\textnormal{d}^{3}\mbox{\boldmath${R}$}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}-\oint_{\partial\mathcal{K}_{i}}\psi^{-}\Lambda\left[\widehat{\mathcal{J}f_{h}}\dot{\mbox{\boldmath${R}$}}_{h}\right]\boldsymbol{\cdot}\textnormal{d}\mbox{\boldmath${s}$}_{R}\,\textnormal{d}^{3}\mbox{\boldmath${v}$}. (6.58)

This limiter-modified Ohm’s law presents a number of challenges. First, the surface limiters on the second line in Eq. 6.57 make the problem of solving for Ah/t\partial A_{\parallel h}/\partial t a nonlinear one. These limiters act in phase-space, not real-space, which introduces additional degrees of freedom. And these are issues even when all the limiters are known at the time of the solve. In practice, there is the additional complication that all the limiters (the surface limiters and the volume limiters θA\theta^{A}) themselves depend on Ah/t\partial A_{\parallel h}/\partial t. Thus we essentially need to know Ah/t\partial A_{\parallel h}/\partial t to evaluate limiters in Ohm’s law in order to solve for Ah/t\partial A_{\parallel h}/\partial t. Inevitably, one will require an iteration scheme to solve this circular problem, although it is difficult to say whether such a scheme would converge quickly, if at all.

Appendix 6.B Generalization of positivity constraints to higher polynomial order and dimensionality

In this section we consider a rigorous procedure for tractably evaluating the positivity constraints in higher dimensionality and higher polynomial order. A key result of Section 6.2 was that in 1D, the most-extreme realizable solution has f1=±3f0f_{1}=\pm\sqrt{3}f_{0}. The corresponding exponential solution has g1±g_{1}\rightarrow\pm\infty, so that the exponential approaches a delta function at the cell boundary.

Another way to obtain this result is to project a delta function evaluated at the cell boundary (or more precisely, just inside the boundary) onto the piecewise-linear modal basis,

δ0=1112δ(x±1)dx=12\displaystyle\delta_{0}=\int_{-1}^{1}\frac{1}{\sqrt{2}}\delta(x-\pm 1)\,\textnormal{d}x=\frac{1}{\sqrt{2}} (6.59)
δ1=1132xδ(x±1)dx=±32,\displaystyle\delta_{1}=\int_{-1}^{1}\frac{\sqrt{3}}{\sqrt{2}}x\delta(x-\pm 1)\,\textnormal{d}x=\pm\frac{\sqrt{3}}{\sqrt{2}}, (6.60)

so that the delta function on the boundary has a weak-equivalent piecewise-linear representation given by

δ(x±1)12δ0+32xδ1=12±32xδ±(x).\delta(x-\pm 1)\doteq\frac{1}{\sqrt{2}}\delta_{0}+\frac{\sqrt{3}}{\sqrt{2}}x\delta_{1}=\frac{1}{2}\pm\frac{3}{2}x\equiv\delta^{\pm}(x). (6.61)

Indeed, δ1=±3δ0\delta_{1}=\pm\sqrt{3}\delta_{0}, so we have recovered the earlier result. Also note that the functions δ±(x)\delta^{\pm}(x) have zeros at the positivity control nodes x=±1/3x=\pm 1/3.

Now consider that we could use the functions δ±(x)\delta^{\pm}(x) as basis functions and expand the solution as

fh=f+δ++fδ=f+(12+32x)+f(1232x).f_{h}=f_{+}\delta^{+}+f_{-}\delta^{-}=f_{+}\left(\frac{1}{2}+\frac{3}{2}x\right)+f_{-}\left(\frac{1}{2}-\frac{3}{2}x\right). (6.62)

This is effectively a nodal basis, with nodal values f±=fh(x=±1/3)f_{\pm}=f_{h}(x=\pm 1/3). Note that we can also obtain the coefficients f±f_{\pm} via projection:

f±=11(12±12x)fhdx11δ±(x)fhdx.f_{\pm}=\int_{-1}^{1}\left(\frac{1}{2}\pm\frac{1}{2}x\right)f_{h}\,\textnormal{d}x\equiv\int_{-1}^{1}\delta_{\pm}(x)f_{h}\,\textnormal{d}x. (6.63)

Thus we will denote the functions δ±(x)\delta^{\pm}(x) as the positivity expansion basis functions, and the functions δ±(x)\delta_{\pm}(x) as the positivity projection basis functions. Finally, as before, the positivity constraint for the f±f_{\pm} coefficients is f±0f_{\pm}\geq 0.

Note that we have now slightly modified our positivity definition. Instead of using an exponential basis as the non-polynomial positive-definite basis set with which we require weak-equality, we will now use delta functions. Thus the positive-definite representation of the solution is

gh=g+δ(x1)+gδ(x+1).g_{h}=g_{+}\delta(x-1)+g_{-}\delta(x+1). (6.64)

Requiring this non-polynomial function to be positive on the entire cell domain gives the constraint g±0g_{\pm}\geq 0. Enforcing weak-equality with the piecewise-linear solution fh=f+δ++fδf_{h}=f_{+}\delta^{+}+f_{-}\delta^{-} now simply gives f±=g±f_{\pm}=g_{\pm}, since by construction the basis functions δ±\delta^{\pm} are weak-equivalent to the delta functions δ(x±1)\delta(x-\pm 1). This once again gives that the positivity constraints on the coefficients of fhf_{h} are f±0f_{\pm}\geq 0. Thus despite the change in positive-definite basis functions from exponentials to delta functions, the result is the same, which suggests some degree of equivalence between the two choices.

Now consider the one-dimensional piecewise-quadratic case. The orthonormal modal basis set on the cell x[1,1]x\in[-1,1] is

ψ={12,32x,3522(x213)}.\psi=\left\{\frac{1}{\sqrt{2}},\ \frac{\sqrt{3}}{\sqrt{2}}x,\ \frac{3\sqrt{5}}{2\sqrt{2}}\left(x^{2}-\frac{1}{3}\right)\right\}. (6.65)

Once again, we can project delta functions just inside the cell boundaries, δ(x±1)\delta(x-\pm 1), onto the basis, giving

δ±=12±32x+154(x213)δ(x±1).\displaystyle\delta^{\pm}=\frac{1}{2}\pm\frac{3}{2}x+\frac{15}{4}\left(x^{2}-\frac{1}{3}\right)\doteq\delta(x-\pm 1). (6.66)

We will again use these functions as expansion basis functions. Given the extra degree of freedom in the piecewise-quadratic case, we need an additional basis function. We can obtain the final basis function by taking a delta function at the cell center, δ(x0)\delta(x-0); we choose x=0x=0 so that the basis is symmetric about the cell center. Projecting onto the piecewise-quadratic basis gives

δ=12158(x213)δ(x0).\delta^{\circ}=\frac{1}{2}-\frac{15}{8}\left(x^{2}-\frac{1}{3}\right)\doteq\delta(x-0). (6.67)

Thus, the piecewise-quadratic positivity expansion basis is given by {δ+,δ,δ}\{\delta^{+},\delta^{\circ},\delta^{-}\}, allowing us to expand the solution as

fh=f+δ++fδ+fδ.f_{h}=f_{+}\delta^{+}+f_{\circ}\delta^{\circ}+f_{-}\delta^{-}. (6.68)

Unlike in the piecewise-linear case, the coefficients {f+,f,f}\{f_{+},f_{\circ},f_{-}\} do not coincide with nodal values of fhf_{h}. Instead, they must be obtained by using projection basis functions, which can be shown to be

δ+=12x(x+1),δ=1x2,δ=12x(x1),\delta_{+}=\frac{1}{2}x(x+1),\qquad\delta_{\circ}=1-x^{2},\qquad\delta_{-}=\frac{1}{2}x(x-1), (6.69)

so that

f+=11δ+fhdx,f=11δfhdx,f=11δfhdx.\displaystyle f_{+}=\int_{-1}^{1}\delta_{+}f_{h}\,\textnormal{d}x,\qquad f_{\circ}=\int_{-1}^{1}\delta_{\circ}f_{h}\,\textnormal{d}x,\qquad f_{-}=\int_{-1}^{1}\delta_{-}f_{h}\,\textnormal{d}x. (6.70)

Once again, the requirements gh=g+δ(x1)+gδ(x)+gδ(x+1)0g_{h}=g_{+}\delta(x-1)+g_{\circ}\delta(x)+g_{-}\delta(x+1)\geq 0 (for all x[1,1]x\in[-1,1]) and fhghf_{h}\doteq g_{h} give the positivity constraints that the coefficients of fh=f+δ++fδ+fδf_{h}=f_{+}\delta^{+}+f_{\circ}\delta^{\circ}+f_{-}\delta^{-} must be non-negative: f±,f0f_{\pm},f_{\circ}\geq 0.

We have now successfully generalized the procedure for evaluating positivity constraints to p=2p=2. We can further generalize to arbitrarily high order by making the following two observations. First, consider that we obtained the positivity expansion basis functions above by projecting delta functions centered at x=1,1x=-1,1 for p=1p=1 and x=1,0,1x=-1,0,1 for p=2p=2. We can recognize that these sets of points are Gauss-Lobatto nodes333The Gauss-Lobatto nodes always include the cell endpoints x=±1x=\pm 1 in the node set. Variants include the Legendre-Gauss-Lobatto nodes (commonly referred to as just the Gauss-Lobatto nodes), where the nodes of order pp are given by roots of the polynomial Pp(x)P^{\prime}_{p}(x), where P(x)P(x) is a Legendre polynomial; and the Chebyshev-Gauss-Lobatto nodes, where the nodes are located at xj=cos(πj/p)x_{j}=\cos(\pi j/p) for j=0,,pj=0,...,p. For p2p\leq 2, these variants give identical nodes. for p=1p=1 and p=2p=2, respectively. Second, note that the positivity projection functions are the Lagrange basis functions for the same set of Gauss-Lobatto nodes. For arbitrary pp, the Lagrange basis functions for nodes xjx_{j} are given by

j(x)=0mpmjxxmxjxm.\ell_{j}(x)=\prod_{\begin{smallmatrix}0\leq m\leq p\\ m\neq j\end{smallmatrix}}\frac{x-x_{m}}{x_{j}-x_{m}}. (6.71)

Thus we now have a general procedure for generating positivity expansion and projection basis functions in one-dimension for arbitrary polynomial order. The steps are

  1. 1.

    The positivity expansion basis functions can be found by projecting delta functions centered at Gauss-Lobatto nodes xjx_{j} onto the orthonormal modal basis 𝝍(x)\mbox{\boldmath${\psi}$}(x),

    j(x)=𝝍(x)11𝝍(x)δ(xxj)dx=𝝍(x)𝝍(xj).\displaystyle\ell^{j}(x)=\mbox{\boldmath${\psi}$}(x)\boldsymbol{\cdot}\int_{-1}^{1}\mbox{\boldmath${\psi}$}(x)\ \delta(x-x_{j})\,\textnormal{d}x=\mbox{\boldmath${\psi}$}(x)\boldsymbol{\cdot}\mbox{\boldmath${\psi}$}(x_{j}). (6.72)

    We can then use this basis to expand fhf_{h} as

    fh=j=0pgjj(x),\displaystyle f_{h}=\sum_{j=0}^{p}g_{j}\ell^{j}(x), (6.73)

    where we will now use gjg_{j} to denote the coefficients of the solution expanded on the positivity basis (to distinguish from modal coefficients fjf_{j}).

  2. 2.

    The positivity projection basis functions are the Lagrange basis functions for the Gauss-Lobatto nodes:

    j(x)=0mpmjxxmxjxm.\ell_{j}(x)=\prod_{\begin{smallmatrix}0\leq m\leq p\\ m\neq j\end{smallmatrix}}\frac{x-x_{m}}{x_{j}-x_{m}}. (6.74)

    Note that in general, the Lagrange basis functions for a particular set of nodes xjx_{j} can be derived by computing the matrix

    Mjk=11ψjkdx=ψj(xk),M_{jk}=\int_{-1}^{1}\psi_{j}\ell^{k}\,\textnormal{d}x=\psi_{j}(x_{k}), (6.75)

    where the second equality assumes that the ψj\psi_{j} are orthonormal. Then the Lagrange basis functions are given by

    j=k(M1)jkψk.\ell_{j}=\sum_{k}(M^{-1})_{jk}\psi_{k}. (6.76)

    These projection basis functions can be used to find the coefficients

    gj=11j(x)fhdx,g_{j}=\int_{-1}^{1}\ell_{j}(x)f_{h}\,\textnormal{d}x, (6.77)

    since

    11ijdx=δij.\int_{-1}^{1}\ell_{i}\ell^{j}\,\textnormal{d}x=\delta_{ij}. (6.78)

    The gjg_{j} are effectively the projection of fhf_{h} onto a Gauss-Lobatto nodal (Lagrange) basis. Note however that this is not the same as directly evaluating fhf_{h} at the Gauss-Lobatto nodes.

  3. 3.

    The piecewise-polynomial solution fhf_{h} is positive in the weak sense if all coefficients gjg_{j} from Eq. 6.77 are non-negative, so that gj0g_{j}\geq 0 for all jj.

The above procedure can then be further generalized to higher dimension by taking (possibly sparse) tensor products of the one-dimensional positivity expansion and projection basis functions.

Chapter 7 Summary and future work

7.1 Summary

The main advance of this thesis was the development of the first capabilities for simulating electromagnetic gyrokinetic turbulence on open magnetic field lines. This is an important step towards comprehensive electromagnetic gyrokinetic simulations of the coupled edge/SOL system. In the past, including electromagnetic effects in gyrokinetic codes has been challenging, as there are delicate issues such as the Ampère cancellation problem that must be handled properly. In our continuum full-ff approach, we build on the successes of continuum δf\delta f gyrokinetic codes in the core which have mostly avoided the cancellation problem. The inclusion of electromagnetic effects in gyrokinetic simulations that can handle the unique challenges of the boundary plasma (large fluctuations, open and closed field line regions, etc.) is critical to the understanding of phenomena such as edge-localized modes and the pedestal, for which electromagnetic dynamics are expected to play a key role.

In Chapter 2 we gave a first-principles derivation of the electromagnetic gyrokinetic system, in the limit of interest for our present work. This derivation used phase-space-Lagrangian Lie perturbation methods to systematically derive a self-consistent, energy-conserving, and global gyrokinetic system, including electromagnetic perturbations. We used the weak-flow ordering, which simultaneously allows large perturbations qΦ/T1q\Phi/T\sim 1 at long wavelengths (kρϵV1k_{\perp}\rho\sim\epsilon_{V}\ll 1) and small perturbations qΦ/TϵVq\Phi/T\sim\epsilon_{V} at short wavelengths (kρ1k_{\perp}\rho\sim 1), along with perturbations at intermediate scales. We also used the symplectic (vv_{\parallel}) formulation of electromagnetic gyrokinetics, which results in the explicit presence of the inductive electric field in the gyrokinetic equation. After deriving the general formalism including finite-Larmor-radius (FLR) corrections, we consistently reduced the system to the long-wavelength limit by neglecting first- and second-order terms in the single particle Lagrangian to obtain the guiding-center Lagrangian, which contains no gyroaverages. Variational derivation of the field equations resulted in a self-consistent, energy-conserving system for electromagnetic gyrokinetics in the long-wavelength limit. We take this limit for simplicity of implementation in the Gkeyll code, with extension of the implementation to include FLR terms left as future work. We summarized the system implemented in Gkeyll in Section 2.3.

We went to great lengths to ensure that the underlying system is self-consistent and conservative, so we also needed a robust numerical method with a discretization scheme that preserves these properties. This was the topic of Chapter 3. We have employed the discontinuous Galerkin method, a high-order numerical method that combines attractive features of finite-element and finite-volume methods. After discussing a discontinuous Galerkin scheme for general Hamiltonian systems that preserves energy by design (in the continuous-time limit), we applied the scheme to the electromagnetic gyrokinetic system. The scheme was then implemented in the gyrokinetic module of the Gkeyll plasma simulation framework. Linear benchmarks were shown to verify the implementation. The success of these benchmarks, especially for cases with high β\beta and small kρk_{\perp}\rho, indicated that the Ampère cancellation problem is avoided. We confirmed this by deriving a semi-discrete Alfvén wave dispersion relation. As a result, we can handle electromagnetic fluctuations in a stable, robust, and efficient manner.

The success of the scheme led to the first published simulations of electromagnetic gyrokinetic turbulence on open field lines, detailed in Chapter 4. As a rough model of the scrape-off layer in the National Spherical Torus Experiment (NSTX) experiment at PPPL, we took a simple helical configuration (like a simple magnetized torus, or SMT) with field lines wrapping helically around the torus and terminating on conducting plates at the top and bottom. This model system contains many of the necessary ingredients for SOL dynamics, including bad curvature and Debye sheath effects, which are handled via conducting-sheath boundary conditions. Initial results showed that when electromagnetic effects are included, high β\beta blobs can bend and stretch the magnetic field lines as they move radially outwards in the SOL. Qualitative comparisons to a corresponding electrostatic simulation showed differences in blob dynamics, with non-adiabatic electron dynamics playing a key role in the electromagnetic case due to slowing of the parallel response. We then performed a study of the effects of increasing β\beta on the SOL dynamics. At higher β\beta, the influence of electromagnetic effects became stronger, resulting in steepening of pressure gradients near the source region and flattening of gradients in the remainder of the domain. We observed a transition from interchange-like modes with k0k_{\parallel}\sim 0 to ballooning-like modes with finite kk_{\parallel} as pressure gradients (αSMT)(\alpha^{\mathrm{SMT}}) increased above the ballooning stability threshold in the source region. Radially inward magnetic flutter particle transport off midplane, resulting from parallel motion of electron along radially-bowed-out field lines, was observed to increase roughly as β2\beta^{2}. Meanwhile the E×BE\times B component of the radial particle transport only scaled linearly with β\beta. This led to slightly reduced radial transport in the high β\beta electromagnetic cases, resulting in slightly higher peak particle and heat loads on the end plates compared to corresponding electrostatic cases. These results could have important implications for the transport of high β\beta blobs and ELM filaments. Further, the electromagnetic mechanism resulting in the steepening of gradients in the source region could have implications for pedestal formation and thus deserves more thorough study. Crucially, our electromagnetic simulations were not significantly more expensive than corresponding electrostatic simulations, which should allow the routine inclusion of electromagnetic effects in future results.

We worked on advancing to more realistic SOL geometry in Chapter 5. We adopted a generalized field-aligned non-orthogonal coordinate system, and expressed the gyrokinetic system in these coordinates. While these coordinates break down at the separatrix in diverted geometries due to a singularity at the X-point, field-aligned coordinates could still be used for efficient discretization on either side of the separatrix, stitched to a non-aligned domain in the near vicinity of the separatrix. We then focused on how to formulate field-aligned coordinate systems for use in flux-tube-like domains in the SOL. We started with a helical configuration with magnetic shear, which generalizes the simple geometry used in Chapter 4. Preliminary electrostatic simulations in this configuration showed that transport is reduced in more sheared configurations. We then formulated field-aligned coordinate systems based on an analytical Solov’ev model SOL equilibrium and an analytical concentric circular equilibrium. The latter is a common geometry used in the core region, especially for inter-code benchmarking. We presented results from a preliminary electrostatic ITG benchmark based on the Cyclone base case in circular core geometry, which compared well with results from other codes in the long-wavelength limit where our system is valid.

In Chapter 6 we tackled the problem of positivity in our discontinuous Galerkin scheme. Simulations can suffer from accuracy and robustness issues because the standard DG scheme does not guarantee that the distribution function will remain positive (even in the cell-average). We developed a novel scheme for both defining and preserving positivity in the DG discretization. Importantly, the scheme was designed without post-hoc diffusion that is used in many existing positivity-preserving algorithms. This allows the scheme to preserve energy conservation while maintaining positivity, even in Hamiltonian systems like gyrokinetics where energy conservation relies on higher-order moments. We then implemented the scheme in Gkeyll and performed a variety of numerical tests for advection, the 2D incompressible Euler system, and the 5D electrostatic gyrokinetic system. The success of the scheme in maintaining positivity and preserving energy conservation, even in 5D, is a significant advance.

7.2 Future work

While the work of this thesis has advanced the modeling capabilities of the Gkeyll code, there are a number of areas that remain in order to produce realistic results for direct comparison with existing experiments or prediction of future ones. The following list focuses on enhancements requiring further code and algorithm development, many of which are already in progress.

  • Closed-field-line boundary conditions: The field-aligned geometry formulation presented in Chapter 5 can also be used for closed-field-line regions. What remains is the implementation of a boundary condition for closed-field-line regions. This work is currently underway, led by Mana Francisquez, using the twist-and-shift approach (Beer et al., 1995). This requires careful interpolation of mis-aligned sheared grids at the ends of the domain along the field line. Once ready, this will allow simulations in a limiter configuration containing both open and closed field line regions. This configuration has been used by several fluid and gyrofluid codes (Ribeiro & Scott, 2008; Halpern & Ricci, 2017; Francisquez et al., 2017), and can be used to study SOL flows, the edge radial electric field, and resulting edge toroidal rotation. These are all relevant to pedestal formation and the L-H transition. Parra & Catto (2008, 2010) have stressed the importance of third-order terms in the Hamiltonian that are required to accurately calculate toroidal rotation. While these subtleties must be investigated in detail, Parra & Catto’s results are for the low-flow, up-down symmetric, gyro-Bohm regime. In the edge, the gyro-Bohm scaling breaks down because eddy sizes are not much smaller than radial gradient scale lengths, and so including the third-order Hamiltonian terms may not be required for studying rotation mechanisms in the edge.

  • Diverted geometry with X-point: As we have discussed, the X-point is a significant challenge because field-aligned coordinates are singular on the separatrix. This has led to a number of new approaches, such as the flux-coordinate-independent (FCI) approach (Hariri & Ottaviani, 2013; Hariri et al., 2014; Stegmeir et al., 2016), which move away from the field-aligned approach. Implementation of FCI or a related approach near the X-point could allow simulation of diverted geometries. Ideally, one could still use conventional field-aligned domains in the core and in the SOL, and only use a non-aligned domain in the immediate vicinity of the separatrix. Stitching these domains together will require sophisticated interpolation and mapping schemes, especially if conservation laws are to be preserved.

  • Neutral modeling: Neutral interactions play a significant role in plasma-material interactions that dictate much of the SOL dynamics and evolution. As such, modeling neutrals is critical to producing experimentally-relevant results and predictions. Neutral modeling work is underway in Gkeyll, led by Tess Bernard, leveraging the existing 6D Vlasov kinetic module to produce a kinetic Boltzmann neutral model. The main interaction mechanisms of electron-impact ionization, charge exchange, and radiative recombination are modeled.

  • Gyroaveraging and higher order terms: While we derived a long-wavelength limit of the gyrokinetic system, it is important to generalize to shorter wavelengths kρ1k_{\perp}\rho\sim 1 within the weak-flow ordering. This involves gyroaveraging operations in the gyrokinetic equation and the field equations. Gyroaveraging is relatively simple in the Fourier spectral representation of many core gyrokinetic codes, where simply multiplying by the Bessel function J0(kv/Ω)J_{0}(k_{\perp}v_{\perp}/\Omega) gives gyroaveraging; however, in real space implementations, gyroaveraging requires integral operations that sample around the gyro-orbit. The finite-element implementation of Maurer et al. (2020) is likely a good starting point for a gyroaveraging implementation in Gkeyll. Additionally, the second-order E×BE\times B energy term in the Hamiltonian should be included, so that a time-evolving density can be used in the polarization term in the Poisson equation instead of the linearized polarization used in this work. This will be important for cases like pedestal formation where there is significant evolution of the density profile. With these additions, we could use the system given in Case 1 from Section 2.2.2.

  • More realistic/efficient collision operators: We have used a model Dougherty collision operator in this work, and we have taken a constant-in-space and constant-in-time collision frequency. A time- and spatially-varying collision frequency has been implemented in Gkeyll, but it suffers from robustness issues likely related to positivity. We have also used an artificially-reduced collision frequency in this work to avoid severe timestep restrictions; this issue could be alleviated with an implicit or super-timestepping implementation of the collision operator. Further, a more realistic collision operator beyond the simple Dougherty model should be implemented. Preliminary work on a full nonlinear Fokker-Planck collision model in Rosenbluth potential form in Gkeyll has been led by Petr Cagas.

  • Porting Gkeyll to GPUs: Today, many of the world’s fastest supercomputers all derive a majority of their computing power from graphics processors (GPUs). The rise of GPUs in scientific computing over the past decade has been driven in large part due to their supreme performance for machine learning applications. To fully leverage the power of these machines, the algorithms in Gkeyll must be efficiently implemented on GPUs. Work has begun to port the compute-intensive Gkeyll solver kernels to a CUDA implementation for use on NVIDIA GPUs, with significant progress made by myself, Ammar Hakim, Jimmy Juno, Mana Francisquez, and others on the Gkeyll team as part of GPU hackathons hosted by Princeton.

  • Extensions of the positivity algorithm, including collisions, electromagnetic gyrokinetics, and higher polynomial order: The positivity algorithms detailed in Chapter 6 are a significant step towards improving robustness of Gkeyll simulations. Currently, these algorithms are only implemented for the electrostatic gyrokinetic system. An implementation including collisions has also been made by Mana Francisquez, but at the time of writing there is some issue in the implementation with energy conservation. Further extension to the electromagnetic gyrokinetic system will require additional work, due to the issues discussed in Appendix 6.A. The algorithm is also formulated in a general way so that in principle it could be generalized to higher polynomial order. Finally, the algorithm could also be implemented into the Vlasov-Maxwell module in Gkeyll.

Along with the further development detailed above, there are a number of interesting and important physics problems that can leverage the electromagnetic gyrokinetic capabilities developed in this thesis. An immediate goal will be to investigate the importance of electromagnetic effects on SOL dynamics in realistic tokamak geometries at experimental parameters. Once the additional capability to simultaneously model open- and closed-field-lines has been developed, we will be able to study the dynamics of the coupled pedestal/SOL system. This is of critical importance for the development of a fusion pilot plant, and a major theme of the recent FESAC Long Range Planning report: “a sustained burning plasma at high power density is required simultaneously with a solution to the power exhaust challenge: mitigating the extreme heat fluxes to materials surrounding the plasma” (Carter et al., 2020).

Electromagnetic effects are expected to play a significant role in the pedestal region, in part due to large pressure gradients that push the plasma close to the ideal-MHD stability threshold (Snyder et al., 2011). Further, while electrostatic turbulence is often suppressed in the pedestal region by E×BE\times B shear and other effects, the transport can remain above neoclassical levels due to the presence of electromagnetic instabilities such as microtearing modes (Hatch et al., 2016). Since turbulence suppression in the pedestal region plays a key role in pedestal formation and sustenance in H-mode, understanding the impact of electromagnetic effects on pedestal transport is of critical importance to the success of current and future fusion devices such as ITER. Edge-localized modes (ELMs) can also play a key role in limiting the pedestal pressure gradient, and ELMs are strongly electromagnetic. Thus self-consistent study of pedestal dynamics requires modeling the coupled pedestal/SOL system, but previous efforts have relied on the electrostatic approximation to neglect electromagnetic perturbations (Idomura et al., 2009; Abiteboul et al., 2013; Churchill et al., 2017; Ku et al., 2018a). By leveraging and extending the unique capabilities developed in this thesis to model full-ff electromagnetic gyrokinetic turbulence in the boundary region, we will be able to model the evolution of the coupled pedestal/SOL system in the presence of electromagnetic microturbulence. This will enable exciting and impactful research that will be valuable for understanding current experiments and ensuring the success of future fusion reactors.

References

  • Abel et al. (2013) Abel, I. G., Plunk, G. G., Wang, E., Barnes, M., Cowley, S. C., Dorland, W. & Schekochihin, A. A. 2013 Multiscale gyrokinetics for rotating tokamak plasmas: Fluctuations, transport and energy flows. Reports Prog. Phys. 76 (11).
  • Abiteboul et al. (2013) Abiteboul, J., Ghendrih, P., Grandgirard, V., Cartier-Michaud, T., Dif-Pradalier, G., Garbet, X., Latu, G., Passeron, C., Sarazin, Y., Strugarek, A., Thomine, O. & Zarzoso, D. 2013 Turbulent momentum transport in core tokamak plasmas and penetration of scrape-off layer flows. Plasma Phys. Control. Fusion 55 (7), 74001–74012.
  • Angelino et al. (2006) Angelino, P., Bottino, A., Hatzky, R., Jolliet, S., Sauter, O., Tran, T. M. & Villard, L. 2006 On the definition of a kinetic equilibrium in global gyrokinetic simulations. Phys. Plasmas 13 (5), 969.
  • Angus et al. (2012) Angus, J. R., Krasheninnikov, S. I. & Umansky, M. V. 2012 Effects of parallel electron dynamics on plasma blob transport. Phys. Plasmas 19 (8), 82312.
  • Antonsen & Lane (1980) Antonsen, T. M. & Lane, B. 1980 Kinetic equations for low frequency instabilities in inhomogeneous plasmas. Phys. Fluids 23 (6), 1205–1214.
  • Arnold & Awanou (2011) Arnold, D. N. & Awanou, G. 2011 The serendipity family of finite elements. Found. Comput. Math. 11 (3), 337–344.
  • Artun & Tang (1994) Artun, M. & Tang, W. M. 1994 Nonlinear electromagnetic gyrokinetic equations for rotating axisymmetric plasmas. Phys. Plasmas 1 (8), 2682–2692.
  • Bao et al. (2018) Bao, J., Lin, Z. & Lu, Z. X. 2018 A conservative scheme for electromagnetic simulation of magnetized plasmas with kinetic electrons. Phys. Plasmas 25 (2), 22515.
  • Batishcheva et al. (1996) Batishcheva, A. A., Batishchev, O. V., Shoucri, M. M., Krasheninnikov, S. I., Catto, P. J., Shkarofsky, I. P. & Sigmar, D. J. 1996 A kinetic model of transient effects in tokamak edge plasmas. Phys. Plasmas 3 (5), 1634–1639.
  • Beer et al. (1995) Beer, M. A., Cowley, S. C. & Hammett, G. W. 1995 Field–aligned coordinates for nonlinear simulations of tokamak turbulence. Phys. Plasmas 2 (7), 2687–2700.
  • Beer & Hammett (1996) Beer, M. A. & Hammett, G. W. 1996 Toroidal gyrofluid equations for simulations of tokamak turbulence. Phys. Plasmas 3 (11), 4046–4064.
  • Belli & Candy (2010) Belli, E. A. & Candy, J. 2010 Fully electromagnetic gyrokinetic eigenmode analysis of high-beta shaped plasmas. Phys. Plasmas 17 (11), 112314.
  • Bernard et al. (2019) Bernard, T. N., Shi, E. L., Gentle, K. W., Hakim, A., Hammett, G. W., Stoltzfus-Dueck, T. & Taylor, E. I. 2019 Gyrokinetic continuum simulations of plasma turbulence in the Texas Helimak. Phys. Plasmas 26 (4).
  • Bernard et al. (2020) Bernard, T. N., Stoltzfus-Dueck, T., Gentle, K. W., Hakim, A., Hammett, G. W. & Shi, E. L. 2020 Investigating shear flow through continuum gyrokinetic simulations of limiter biasing in the Texas Helimak. Phys. Plasmas 27 (6), 62304.
  • Boedo et al. (2014) Boedo, J. A., Myra, J. R., Zweben, S., Maingi, R., Maqueda, R. J., Soukhanovskii, V. A., Ahn, J. W., Canik, J., Crocker, N., D’Ippolito, D. A., Bell, R., Kugel, H., Leblanc, B., Roquemore, L. A. & Rudakov, D. L. 2014 Edge transport studies in the edge and scrape-off layer of the National Spherical Torus Experiment with Langmuir probes. Phys. Plasmas 21 (4), 42309.
  • Bohm (1949) Bohm, D. 1949 Minimium ionic kinetic energy for stable sheath. In Charact. Electr. Discharges Magn. Fields (ed. A. Guthrie & K.R. Wakerling), chap. 3. MeGraw-Hill Book Company.
  • Bourdelle et al. (2003) Bourdelle, C., Dorland, W., Garbet, X., Hammett, G. W., Kotschenreuther, M., Rewoldt, G. & Synakowski, E. J. 2003 Stabilizing impact of high gradient of β\beta on microturbulence. Phys. Plasmas 10 (7), 2881–2887.
  • Braginskii (1965) Braginskii, S. I. 1965 Transport processes in a plasma; in Reviews of Plasma Physics, M.A. Leontovich (ed.). Rev. Plasma Phys. 1, 205.
  • Brizard (1995) Brizard, A. J. 1995 Nonlinear gyrokinetic Vlasov equation for toroidally rotating axisymmetric tokamaks. Phys. Plasmas 2 (2), 459–471.
  • Brizard & Hahm (2007) Brizard, A. J. & Hahm, T. S. 2007 Foundations of nonlinear gyrokinetic theory. Rev. Mod. Phys. 79 (2), 421–468.
  • Brower et al. (1987) Brower, D. L., Peebles, W. A., Kim, S. K., Luhmann, N. C., Tang, W. M. & Phillips, P. E. 1987 Observation of a high-density ion mode in tokamak microturbulence. Phys. Rev. Lett. 59 (1), 48–51.
  • Burrell et al. (1994) Burrell, K. H., Doyle, E. J., Gohil, P., Groebner, R. J., Kim, J., La Haye, R. J., Lao, L. L., Moyer, R. A., Osborne, T. H., Peebles, W. A., Rettig, C. L., Rhodes, T. H. & Thomas, D. M. 1994 Role of the radial electric field in the transition from L (low) mode to H (high) mode to VH (very high) mode in the DIII-D tokamak. Phys. Plasmas 1 (5), 1536–1544.
  • Cagas et al. (2017) Cagas, P., Hakim, A., Juno, J. & Srinivasan, B. 2017 Continuum kinetic and multi–fluid simulations of classical sheaths. Phys. Plasmas 24 (2), 22118.
  • Candy et al. (2016) Candy, J., Belli, E. A. & Bravenec, R. V. 2016 A high-accuracy Eulerian gyrokinetic solver for collisional plasmas. J. Comput. Phys. 324, 73–93.
  • Candy & Waltz (2003) Candy, J. & Waltz, R. E. 2003 An Eulerian gyrokinetic-Maxwell solver. J. Comput. Phys. 186 (2), 545–581.
  • Candy & Waltz (2006) Candy, J. & Waltz, R. E. 2006 Velocity-space resolution, entropy production, and upwind dissipation in Eulerian gyrokinetic simulations. Phys. Plasmas 13 (3), 32310.
  • Carralero et al. (2015) Carralero, D., Manz, P., Aho-Mantila, L., Birkenmeier, G., Brix, M., Groth, M., Müller, H. W., Stroth, U., Vianello, N. & Wolfrum, E. 2015 Experimental Validation of a Filament Transport Model in Turbulent Magnetized Plasmas. Phys. Rev. Lett. 115 (21).
  • Carter et al. (2020) Carter, T., Baalrud, S., Betti, R., Ellis, T., Foster, J., Geddes, C., Gleason, A., Holland, C., Humrickhouse, P., Kessel, C., Lasa, A., Ma, T., Mangi, R., Schaffner, D., Schmitz, O., Shumlak, U., Snead, L., Solomon, W., Trask, E., Waelbroeck, F., White, A. & Rej, D. 2020 Powering the Future: Fusion and Plasmas. Tech. Rep.. FESAC.
  • Cary (1981) Cary, J. R. 1981 Lie transform perturbation theory for Hamiltonian systems. Phys. Rep. 79 (2), 129–159.
  • Cary & Brizard (2009) Cary, J. R. & Brizard, A. J. 2009 Hamiltonian theory of guiding-center motion. Rev. Mod. Phys. 81 (2), 693–738.
  • Cary & Littlejohn (1983) Cary, J. R. & Littlejohn, R. G. 1983 Noncanonical Hamiltonian mechanics and its application to magnetic field line flow. Ann. Phys. (N. Y). 151 (1), 1–34.
  • Catto (1978) Catto, P. J. 1978 Linearized gyro-kinetics. Plasma Phys. 20, 719–722.
  • Chance et al. (1978) Chance, M. S., Greene, J. M., Grimm, R. C., Johnson, J. L., Manickam, J., Kerner, W., Berger, D., Bernard, L. C., Gruber, R. & Troyon, F. 1978 Comparative numerical studies of ideal magnetohydrodynamic instabilities. J. Comput. Phys. 28 (1), 1–13.
  • Chang et al. (2020) Chang, C.-S., Ku, S.-H., Hager, R., Churchill, R. M., Hughes, J., Köchl, F. & Loarte, A. 2020 Constructing a new predictive scaling formula for ITER’s divertor heat-load width informed by a simulation-anchored machine learning. arxiv.org pp. 1–23.
  • Chang et al. (2017) Chang, C.-S., Ku, S.-H., Loarte, A., Parail, V., Köchl, F., Romanelli, M., Maingi, R., Ahn, J. W., Gray, T., Hughes, J., LaBombard, B., Leonard, T., Makowski, M. & Terry, J. 2017 Gyrokinetic projection of the divertor heat-flux width from present tokamaks to ITER. Nucl. Fusion 57 (11).
  • Chen et al. (2015) Chen, G., Chacon, L. & Chacón, L. 2015 A multi-dimensional, energy- and charge-conserving, nonlinearly implicit, electromagnetic Vlasov–Darwin particle-in-cell algorithm. Comp. Phys. Comm. 197, 73–87.
  • Chen & Parker (2001) Chen, Y. & Parker, S. 2001 Gyrokinetic turbulence simulations with kinetic electrons. Phys. Plasmas 8 (5), 2095–2100.
  • Chen & Parker (2003) Chen, Y. & Parker, S. E. 2003 A δ\deltaf particle method for gyrokinetic simulations with kinetic electrons and electromagnetic perturbations. J. Comput. Phys. 189 (2), 463–475.
  • Chen & Parker (2007) Chen, Y. & Parker, S. E. 2007 Electromagnetic gyrokinetic δ\deltaf particle-in-cell turbulence simulation with realistic equilibrium profiles and geometry. J. Comput. Phys. 220 (2), 839–855.
  • Chodura (1982) Chodura, R. 1982 Plasma-wall transition in an oblique magnetic field. Phys. Fluids 25 (9), 1628–1633.
  • Christiansen & Zabusky (1973) Christiansen, J. P. & Zabusky, N. J. 1973 Instability, coalescence and fission of finite-area vortex structures. J. Fluid Mech. 61 (2), 219–243.
  • Churchill et al. (2017) Churchill, R. M., Chang, C. S., Ku, S. & Dominski, J. 2017 Pedestal and edge electrostatic turbulence characteristics from an XGC1 gyrokinetic simulation. Plasma Phys. Control. Fusion 59 (10), 105014.
  • Cockburn & Shu (1998) Cockburn, B. & Shu, C. W. 1998 The Runge-Kutta Discontinuous Galerkin Method for Conservation Laws V: Multidimensional Systems. J. Comput. Phys. 141 (2), 199–224.
  • Cockburn & Shu (2001) Cockburn, B. & Shu, C. W. 2001 Runge-Kutta Discontinuous Galerkin methods for convection-dominated problems. J. Sci. Comput. 16 (3), 173–261.
  • Cohen (1991) Cohen, A. 1991 A Padé approximant to the inverse Langevin function. Rheol. Acta 30 (3), 270–273.
  • Cohen & Xu (2008) Cohen, R. H. & Xu, X. Q. 2008 Progress in kinetic simulation of edge plasmas. Contrib. to Plasma Phys. 48 (1-3), 212–223.
  • Connor et al. (1978) Connor, J. W., Hastie, R. J. & Taylor, J. B. 1978 Shear, Periodicity, and Plasma Ballooning Modes. Phys. Rev. Lett. 40 (6), 396.
  • Coppi (1977) Coppi, B. 1977 Topology of ballooning modes. Phys. Rev. Lett. 39 (15), 939–942.
  • Cowley (1985) Cowley, S. C. 1985 Some Aspects of Anomalous Transport in Tokamaks: Stochastic Magnetic Fields, Tearing Modes and Nonlinear Ballooning Instabilities. Ph.D. thesis, Princeton University.
  • Cowley (2016) Cowley, S. C. 2016 The quest for fusion power. Nat. Phys. 12, 384.
  • Cowley & Artun (1997) Cowley, S. C. & Artun, M. 1997 Explosive instabilities and detonation in magnetohydrodynamics. Phys. Rep. 283 (1-4), 185–211.
  • Cummings (1994) Cummings, J. C. 1994 Gyrokinetic Simulation of Finite–Beta and Self–Sheared–Flow Effects on Pressure–Gradient Instabilities. Ph.D. thesis, Princeton University.
  • Dannert (2005) Dannert, T. 2005 Gyrokinetische Simulation von Plasmaturbulenz mit gefangenen Teilchen und elektromagnetischen Effekten. Ph.D. thesis, Technischen Universität München.
  • Denton & Kotschenreuther (1995) Denton, R. E. & Kotschenreuther, M. 1995 δ\deltaf Algorithm. J. Comput. Phys. 19, 283–294.
  • D’haeseleer et al. (1991) D’haeseleer, W. D., Hitchon, W. N. G., Callen, J. D. & Shohet, J. L. 1991 Flux Coordinates and Magnetic Field Structure. Springer-Verlag.
  • Dimits (2010) Dimits, A. M. 2010 Gyrokinetic equations in an extended ordering. Phys. Plasmas 17 (5), 055901.
  • Dimits (2012) Dimits, A. M. 2012 Gyrokinetic equations for strong-gradient regions. Phys. Plasmas 19 (2), 55901.
  • Dimits et al. (2000) Dimits, A. M., Bateman, G., Beer, M. A., Cohen, B. I., Dorland, W., Hammett, G. W., Kim, C., Kinsey, J. E., Kotschenreuther, M., Kritz, A. H., Lao, L. L., Mandrekas, J., Nevins, W. M., Parker, S. E., Redd, A. J., Shumaker, D. E., Sydora, R. & Weiland, J. 2000 Comparisons and physics basis of tokamak transport models and turbulence simulations. Phys. Plasmas 7 (3), 969–983.
  • Dimits & Lee (1993) Dimits, A. M. & Lee, W. W. 1993 Partially linearized algorithms in gyrokinetic particle simulation. J. Comput. Phys. 107 (2), 309–323.
  • Dimits et al. (1992) Dimits, A. M., Lodestro, L. L. & Dubin, D. H. 1992 Gyroaveraged equations for both the gyrokinetic and drift-kinetic regimes. Phys. Fluids B 4 (1), 274–277.
  • Dimits et al. (1996) Dimits, A. M., Williams, T. J., Byers, J. A. & Cohen, B. I. 1996 Scalings of ion-temperature-gradient-driven anomalous transport in tokamaks. Phys. Rev. Lett. 77 (1), 71–74.
  • D’Ippolito et al. (2011) D’Ippolito, D. A., Myra, J. R. & Zweben, S. J. 2011 Convective transport by intermittent blob-filaments: Comparison of theory and experiment. Phys. Plasmas 18 (6), 60501.
  • Dorf & Dorr (2020) Dorf, M. & Dorr, M. 2020 Progress with the 5D full-F continuum gyrokinetic code COGENT. Contrib. to Plasma Phys. 60 (5-6), e201900113.
  • Dorf et al. (2016) Dorf, M. A., Dorr, M. R., Hittinger, J. A., Cohen, R. H. & Rognlien, T. D. 2016 Continuum kinetic modeling of the tokamak plasma edge. Phys. Plasmas 23 (5), 56102.
  • Dorland & Hammett (1993) Dorland, W. & Hammett, G. W. 1993 Gyrofluid turbulence models with kinetic effects. Phys. Fluids B 5 (3), 812–835.
  • Dorland et al. (2000) Dorland, W., Jenko, F., Kotschenreuther, M. & Rogers, B. N. 2000 Electron Temperature Gradient Turbulence. Phys. Rev. Lett. 85 (26), 5579–5582.
  • Dougherty (1964) Dougherty, J. P. 1964 Model Fokker-Planck Equation for a Plasma and Its Solution. Phys. Fluids 7 (11), 1788.
  • Doyle et al. (2007) Doyle, E. J., Houlberg, W. A., Kamada, Y., Mukhovatov, V., Osborne, T. H., Polevoi, A., Bateman, G., Connor, J. W., Cordey, J. G., Fujita, T., Garbet, X., Hahm, T. S., Horton, L. D., Hubbard, A. E., Imbeaux, F., Jenko, F., Kinsey, J. E., Kishimoto, Y., Li, J., Luce, T. C., Martin, Y., Ossipenko, M., Parail, V., Peeters, A., Rhodes, T. L., Rice, J. E., Roach, C. M., Rozhansky, V., Ryter, F., Saibene, G., Sartori, R., Sips, A. C., Snipes, J. A., Sugihara, M., Synakowski, E. J., Takenaga, H., Takizuka, T., Thomsen, K., Wade, M. R. & Wilson, H. R. 2007 Chapter 2: Plasma confinement and transport. Nucl. Fusion 47 (6), 18–127.
  • Dubin et al. (1983) Dubin, D. H., Krommes, J. A., Oberman, C. & Lee, W. W. 1983 Nonlinear gyrokinetic equations. Phys. Fluids 26 (12), 3524–3535.
  • Durran (2010) Durran, D. R. 2010 Numerical methods for fluid dynamics: With applications to geophysics, Texts in Applied Mathematics, vol. 32. Springer Science & Business Media.
  • Eddington (1920) Eddington, A. S. 1920 The internal constitution of the stars. Nature 106 (2653), 14–20.
  • Eich et al. (2013) Eich, T., Leonard, A. W., Pitts, R. A., Fundamenski, W., Goldston, R. J., Gray, T. K., Herrmann, A., Kirk, A., Kallenbach, A., Kardaun, O., Kukushkin, A. S., Labombard, B., Maingi, R., Makowski, M. A., Scarabosio, A., Sieglin, B., Terry, J. & Thornton, A. 2013 Scaling of the tokamak near the scrape-off layer H-mode power width and implications for ITER. Nucl. Fusion 53 (9).
  • Fasoli et al. (2006) Fasoli, A., Labit, B., McGrath, M., Müller, S. H., Plyushchev, G., Podestà, M. & Poli, F. M. 2006 Electrostatic turbulence and transport in a simple magnetized plasma. Phys. Plasmas 13 (5), 055902.
  • Francisquez et al. (2020) Francisquez, M., Bernard, T. N., Mandell, N. R., Hammett, G. W. & Hakim, A. 2020 Conservative discontinuous Galerkin scheme of a gyro-averaged Dougherty collision operator. Nucl. Fusion 60, 096021.
  • Francisquez et al. (2017) Francisquez, M., Zhu, B. & Rogers, B. N. 2017 Global 3D Braginskii simulations of the tokamak edge region of IWL discharges. Nucl. Fusion 57 (11), 116049.
  • Frei et al. (2020) Frei, B. J., Jorge, R. & Ricci, P. 2020 A gyrokinetic model for the plasma periphery of tokamak devices. J. Plasma Phys. 86.
  • Freidberg (2014) Freidberg, J. 2014 Ideal MHD.
  • Fried & Conte (1961) Fried, B. D. & Conte, S. D. 1961 The plasma dispersion function: the Hilbert transform of the Gaussian. Academic Press.
  • Frieman & Chen (1982) Frieman, E. A. & Chen, L. 1982 Nonlinear gyrokinetic equations for low-frequency electromagnetic waves in general plasma equilibria. Phys. Fluids 25 (3), 502–508.
  • Garbet et al. (2010) Garbet, X., Idomura, Y., Villard, L. & Watanabe, T. H. 2010 Gyrokinetic simulations of turbulent transport. Nucl. Fusion 50 (4).
  • Gentle & He (2008) Gentle, K. W. & He, H. 2008 Texas helimak. Plasma Sci. Technol. 10 (3), 284–289.
  • Geraldini et al. (2017) Geraldini, A., Parra, F. I. & Militello, F. 2017 Gyrokinetic treatment of a grazing angle magnetic presheath. Plasma Phys. Control. Fusion 59 (2), 025015.
  • Gohil et al. (1994) Gohil, P., Burrell, K. H., Doyle, E. J., Groebner, R. J., Kim, J. & Seraydarian, R. P. 1994 The phenomenology of the L-H transition in the DIII-D tokamak. Nucl. Fusion 34 (8), 1057.
  • Goldston & Brown (2020) Goldston, R. & Brown, A. 2020 Generalization of the Heuristic Drift SOL Model for Finite Collisionality, and Effect on Flow Shearing Rate vs. Interchange Growth Rate. In Bull. Am. Phys. Soc.. American Physical Society.
  • Görler (2009) Görler, T. 2009 Multiscale effects in plasma microturbulence. Ph.D. thesis, Universität Ulm.
  • Görler et al. (2016) Görler, T., Tronko, N., Hornsby, W. A., Bottino, A., Kleiber, R., Norscini, C., Grandgirard, V., Jenko, F. & Sonnendrücker, E. 2016 Intercode comparison of gyrokinetic global electromagnetic modes. Phys. Plasmas 23 (7), 1904.
  • Gottlieb et al. (2001) Gottlieb, S., Shu, C.-W. & Tadmor, E. 2001 Strong stability–preserving high–order time discretization methods. SIAM Rev. 43 (1), 89–112.
  • Hager et al. (2017) Hager, R., Lang, J., Chang, C.-S., Ku, S.-H., Chen, Y., Parker, S. E. & Adams, M. F. 2017 Verification of long wavelength electromagnetic modes with a gyrokinetic–fluid hybrid model in the XGC code. Phys. Plasmas 24 (5), 54508.
  • Hahm (1996) Hahm, T. S. 1996 Nonlinear gyrokinetic equations for turbulence in core transport barriers. Phys. Plasmas 3 (12), 4658–4664.
  • Hahm et al. (1988) Hahm, T. S., Lee, W. W. & Brizard, A. 1988 Nonlinear gyrokinetic theory for finite-beta plasmas. Phys. Fluids 31 (7), 1940.
  • Hahm et al. (2009) Hahm, T. S., Wang, L. & Madsen, J. 2009 Fully electromagnetic nonlinear gyrokinetic equations for tokamak edge turbulence. Phys. Plasmas 16 (2), 22305.
  • Hakim et al. (2019) Hakim, A., Hammett, G. W., Shi, E. L. & Mandell, N. R. 2019 Discontinuous galerkin schemes for a class of hamiltonian evolution equations with applications to plasma fluid and kinetic problems, arXiv: 1908.01814.
  • Hakim & Juno (2020) Hakim, A. & Juno, J. 2020 Alias-Free, Matrix-Free and Quadrature-Free Discontinuous Galerkin Algorithms for (Plasma) Kinetic Equations. 2020 SC20 Int. Conf. High Perform. Comput. Networking, Storage Anal. pp. 1026–1040.
  • Hakim et al. (2020) Hakim, A. H., Mandell, N. R., Bernard, T. N., Francisquez, M., Hammett, G. W. & Shi, E. L. 2020 Continuum electromagnetic gyrokinetic simulations of turbulence in the tokamak scrape-off layer and laboratory devices. Phys. Plasmas 27 (4), 042304.
  • Halpern et al. (2013) Halpern, F. D., Jolliet, S., Loizu, J., Mosetto, A. & Ricci, P. 2013 Ideal ballooning modes in the tokamak scrape-off layer. Phys. Plasmas 20 (5), 52306.
  • Halpern & Ricci (2017) Halpern, F. D. & Ricci, P. 2017 Velocity shear, turbulent saturation, and steep plasma gradients in the scrape-off layer of inner-wall limited tokamaks. Nucl. Fusion 57 (3).
  • Halpern et al. (2016) Halpern, F. D., Ricci, P., Jolliet, S., Loizu, J., Morales, J., Mosetto, A., Musil, F., Riva, F., Tran, T. M. & Wersal, C. 2016 The GBS code for tokamak scrape-off layer simulations. J. Comput. Phys. 315, 388–408.
  • Hammett (2016) Hammett, G. W. 2016 Private communication.
  • Hammett & Perkins (1990) Hammett, G. W. & Perkins, F. W. 1990 Fluid moment models for Landau damping with application to the ion-temperature-gradient instability. Phys. Rev. Lett. 64 (25), 3019–3022.
  • Hariri et al. (2014) Hariri, F., Hill, P., Ottaviani, M. & Sarazin, Y. 2014 The flux-coordinate independent approach applied to X-point geometries. Phys. Plasmas 21 (8).
  • Hariri & Ottaviani (2013) Hariri, F. & Ottaviani, M. 2013 A flux-coordinate independent field-aligned approach to plasma turbulence simulations. Comput. Phys. Commun. 184 (11), 2419–2429.
  • Hatch et al. (2016) Hatch, D. R., Kotschenreuther, M., Mahajan, S., Valanju, P., Jenko, F., Told, D., Görler, T. & Saarelma, S. 2016 Microtearing turbulence limiting the JET-ILW pedestal. Nucl. Fusion 56 (10).
  • Hatzky et al. (2007) Hatzky, R., Könies, A. & Mishchenko, A. 2007 Electromagnetic gyrokinetic PIC simulation with an adjustable control variates method. J. Comput. Phys. 225 (1), 568–590.
  • Helander & Sigmar (2002) Helander, P. & Sigmar, D. 2002 Collisional Transport in Magnetized Plasmas. Cambridge University Press.
  • Held et al. (2016) Held, M., Wiesenberger, M., Madsen, J. & Kendl, A. 2016 The influence of temperature dynamics and dynamic finite ion Larmor radius effects on seeded high amplitude plasma blobs. Nucl. Fusion 56 (12), 126005.
  • Hesthaven & Warburton (2007) Hesthaven, J. S. & Warburton, T. 2007 Nodal discontinuous Galerkin methods: algorithms, analysis, and applications. Springer Science & Business Media.
  • Hinton et al. (2003) Hinton, F. L., Rosenbluth, M. N. & Waltz, R. E. 2003 Reduced equations for electromagnetic turbulence in tokamaks. Phys. Plasmas 10 (1), 168–178.
  • Hoare et al. (2019) Hoare, D., Militello, F., Omotani, J. T., Riva, F., Newton, S., Nicholas, T., Ryan, D. & Walkden, N. R. 2019 Dynamics of scrape-off layer filaments in high β\beta plasmas. Plasma Phys. Control. Fusion 61 (10).
  • Idomura et al. (2008) Idomura, Y., Ida, M., Kano, T., Aiba, N. & Tokuda, S. 2008 Conservative global gyrokinetic toroidal full-f five-dimensional Vlasov simulation. Comput. Phys. Commun. 179 (6), 391–403.
  • Idomura et al. (2003) Idomura, Y., Tokuda, S. & Kishimoto, Y. 2003 Global gyrokinetic simulation of ion temperature gradient driven turbulence in plasmas using a canonical Maxwellian distribution. Nucl. Fusion 43 (4), 234–243.
  • Idomura et al. (2009) Idomura, Y., Urano, H., Aiba, N. & Tokuda, S. 2009 Study of ion turbulent transport and profile formations using global gyrokinetic full-f Vlasov simulation. Nucl. Fusion 49 (6).
  • Jardin (2010) Jardin, S. 2010 Computational methods in plasma physics. CRC Press.
  • Jenko (2000) Jenko, F. 2000 Massively parallel Vlasov simulation of electromagnetic drift-wave turbulence. Comput. Phys. Commun. 125 (1), 196–209.
  • Jenko & Dorland (2001) Jenko, F. & Dorland, W. 2001 Nonlinear electromagnetic gyrokinetic simulations of tokamak plasmas. Plasma Phys. Control. Fusion 43 (12A), A141.
  • Johnson & Rossmanith (2012) Johnson, E. A. & Rossmanith, J. A. 2012 Outflow Positivity Limiting for Hyperbolic Conservation Laws. Part I: Framework and Recipe .
  • Joiner et al. (2010) Joiner, N., Hirose, A. & Dorland, W. 2010 Parallel magnetic field perturbations in gyrokinetic simulations. Phys. Plasmas 17 (7), 72104.
  • Jolliet et al. (2007) Jolliet, S., Bottino, A., Angelino, P., Hatzky, R., Tran, T. M., Mcmillan, B. F., Sauter, O., Appert, K., Idomura, Y. & Villard, L. 2007 A global collisionless PIC code in magnetic coordinates. Comput. Phys. Commun. 177 (5), 409–425.
  • Jorge et al. (2017) Jorge, R., Ricci, P. & Loureiro, N. F. 2017 A drift-kinetic analytical model for scrape-off layer plasma dynamics at arbitrary collisionality. J. Plasma Phys. 83 (6).
  • Jost et al. (2001) Jost, G., Tran, T. M., Cooper, W. A., Villard, L. & Appert, K. 2001 Global linear gyrokinetic simulations in quasi-symmetric configurations. Phys. Plasmas 8 (7), 3321–3333.
  • Juno (2020) Juno, J. 2020 A Deep Dive into the Distribution Function: Understanding Phase Space Dynamics with Continuum Vlasov-Maxwell Simulations. Ph.D. thesis, University of Maryland, College Park.
  • Juno et al. (2018) Juno, J., Hakim, A., TenBarge, J., Shi, E. & Dorland, W. 2018 Discontinuous Galerkin algorithms for fully kinetic plasmas. J. Comput. Phys. 353, 110–147.
  • Kim et al. (1993) Kim, J. Y., Horton, W. & Dong, J. Q. 1993 Electromagnetic effect on the toroidal ion temperature gradient mode. Phys. Fluids B 5 (11), 4030–4039.
  • Kinsey et al. (2011) Kinsey, J. E., Staebler, G. M., Candy, J., Waltz, R. E. & Budny, R. V. 2011 ITER predictions using the GYRO verified and experimentally validated trapped gyro-Landau fluid transport model. Nucl. Fusion 51 (8), 083001.
  • Kirk et al. (2006) Kirk, A., Ben Ayed, N., Counsell, G., Dudson, B., Eich, T., Herrmann, A., Koch, B., Martin, R., Meakins, A., Saarelma, S., Scannell, R., Tallents, S., Walsh, M. & Wilson, H. R. 2006 Filament structures at the plasma edge on MAST. Plasma Phys. Control. Fusion 48 (12 B), 433.
  • Kirk et al. (2005) Kirk, A., Wilson, H. R., Akers, R., Conway, N. J., Counsell, G. F., Cowley, S. C., Dowling, J., Dudson, B., Field, A., Lott, F., Lloyd, B., Martin, R., Meyer, H., Price, M., Taylor, D. & Walsh, M. 2005 Structure of ELMs in MAST and the implications for energy deposition. Plasma Phys. Control. Fusion 47 (2), 315–333.
  • Kočan et al. (2011) Kočan, M., Gunn, J. P., Carpentier-Chouchana, S., Herrmann, A., Kirk, A., Komm, M., Müller, H. W., Pascal, J. Y., Pitts, R. A., Rohde, V. & Tamain, P. 2011 Measurements of ion energies in the tokamak plasma boundary. J. Nucl. Mater. 415 (1 SUPPL), S1133–S1138.
  • Korpilo et al. (2016) Korpilo, T., Gurchenko, A. D., Gusakov, E. Z., Heikkinen, J. A., Janhunen, S. J., Kiviniemi, T. P., Leerink, S., Niskala, P. & Perevalov, A. A. 2016 Gyrokinetic full–torus simulations of ohmic tokamak plasmas in circular limiter configuration. Comp. Phys. Comm. 203, 128–137.
  • Kotschenreuther et al. (1995) Kotschenreuther, M., Rewoldt, G. & Tang, W. M. 1995 Comparison of initial value and eigenvalue codes for kinetic toroidal plasma instabilities. Comp. Phys. Comm. 88 (2-3), 128–140.
  • Krasheninnikov (2001) Krasheninnikov, S. I. 2001 On scrape off layer plasma transport. Phys. Lett. Sect. A Gen. At. Solid State Phys. 283 (5-6), 368–370.
  • Krasheninnikov et al. (2008) Krasheninnikov, S. I., D’Ippolito, D. A. & Myra, J. R. 2008 Recent theoretical progress in understanding coherent structures in edge and SOL turbulence. J. Plasma Phys. 74 (5), 679–717.
  • Krommes (2007) Krommes, J. A. 2007 Nonequilibrium gyrokinetic fluctuation theory and sampling noise in gyrokinetic particle-in-cell simulations. Phys. Plasmas 14 (9), 90501.
  • Kruskal & Kulsrud (1958) Kruskal, M. D. & Kulsrud, R. M. 1958 Equilibrium of a magnetically confined plasma in a toroid. Phys. Fluids 1 (4), 265–274.
  • Ku et al. (2009) Ku, S.-H., Chang, C.-S. & Diamond, P. H. 2009 Full–f gyrokinetic particle simulation of centrally heated global ITG turbulence from magnetic axis to edge pedestal top in a realistic tokamak geometry. Nucl. Fusion 49 (11), 115021.
  • Ku et al. (2018a) Ku, S.-H., Chang, C.-S., Hager, R., Churchill, R. M., Tynan, G. R., Cziegler, I., Greenwald, M., Hughes, J., Parker, S. E., Adams, M. F., D’Azevedo, E. & Worley, P. 2018a A fast low–to–high confinement mode bifurcation dynamics in the boundary-plasma gyrokinetic code XGC1. Phys. Plasmas 25 (5), 56107.
  • Ku et al. (2016) Ku, S.-H., Hager, R., Chang, C.-S., Kwon, J. M. & Parker, S. E. 2016 A new hybrid–Lagrangian numerical scheme for gyrokinetic simulation of tokamak edge plasma. J. Comput. Phys. 315, 467–475.
  • Ku et al. (2018b) Ku, S.-H., Sturdevant, B., Hager, R., Chang, C.-S., Chacon, L. & Chen, G. 2018b Fully implicit particle–in–cell simulation of gyrokinetic electromagnetic modes in XGC1 without the cancellation issue. In Bull. Am. Phys. Soc..
  • Kukushkin et al. (2011) Kukushkin, A. S., Pacher, H. D., Kotov, V., Pacher, G. W. & Reiter, D. 2011 Finalizing the ITER divertor design: The key role of SOLPS modeling. Fusion Eng. Des. 86 (12), 2865–2873.
  • Kukushkin et al. (2013) Kukushkin, A. S., Pacher, H. D., Pacher, G. W., Kotov, V., Pitts, R. A. & Reiter, D. 2013 Consequences of a reduction of the upstream power SOL width in ITER. J. Nucl. Mater. 438 (SUPPL).
  • Kunkel & Guillory (1966) Kunkel, W. B. & Guillory, J. U. 1966 Interchange stabilization by incomplete line-tying. In Phenom. Ioniz. Gases, Vol. II, VII Int. Conf., p. 702.
  • LaBombard et al. (2005) LaBombard, B., Hughes, J. W., Mossessian, D., Greenwald, M., Lipschultz, B. & Terry, J. L. 2005 Evidence for electromagnetic fluid drift turbulence controlling the edge plasma state in the Alcator C-Mod tokamak. Nucl. Fusion 45 (12), 1658–1675.
  • Labombard et al. (2008) Labombard, B., Hughes, J. W., Smick, N., Graf, A., Marr, K., McDermott, R., Reinke, M., Greenwald, M., Lipschultz, B., Terry, J. L., Whyte, D. G. & Zweben, S. J. 2008 Critical gradients and plasma flows in the edge plasma of Alcator C-Mod. Phys. Plasmas 15 (5), 56106.
  • Lang et al. (2013) Lang, P. T., Loarte, A., Saibene, G., Baylor, L. R., Becoulet, M., Cavinato, M., Clement-Lorenzo, S., Daly, E., Evans, T. E., Fenstermacher, M. E., Gribov, Y., Horton, L. D., Lowry, C., Martin, Y., Neubauer, O., Oyama, N., Schaffer, M. J., Stork, D., Suttrop, W., Thomas, P., Tran, M., Wilson, H. R., Kavin, A. & Schmitz, O. 2013 ELM control strategies and tools: Status and potential for ITER. Nucl. Fusion 53 (4), 043004.
  • Lanti et al. (2019) Lanti, E., Ohana, N., Tronko, N., Hayward-Schneider, T., Bottino, A., McMillan, B. F., Mishchenko, A., Scheinberg, A., Biancalani, A., Angelino, P. & Brunner, S. 2019 ORB5: a global electromagnetic gyrokinetic code using the PIC approach in toroidal geometry. Comput. Phys. Commun. p. 107072.
  • Lao et al. (1990) Lao, L., Ferron, J., Groebner, R., Howl, W., St JOHN, H., Strait, E. & Taylor, T. 1990 Equilibrium analysis of current profiles in tokamaks. Nucl. Fusion 30, 1035.
  • Lao et al. (1985) Lao, L. L., John, H. S., Stambaugh, R. D., Kellman, A. G. & Pfeiffer, W. 1985 Reconstruction of current profile parameters and plasma shapes in tokamaks. Nucl. Fusion 25 (11), 1611–1622.
  • Lapillonne (2010) Lapillonne, X. 2010 Local and global Eulerian gyrokinetic simulations of microturbulence in realistic geometry with applications to the TCV Tokamak. Ph.D. thesis, École Polytechnique Fédérale de Lausanne.
  • Lapillonne et al. (2009) Lapillonne, X., Brunner, S., Dannert, T., Jolliet, S., Marinoni, A., Villard, L., Görler, T., Jenko, F. & Merz, F. 2009 Clarifications to the limitations of the s-α\alpha equilibrium model for gyrokinetic computations of turbulence. Phys. Plasmas 16 (3), 032308.
  • Leddy et al. (2017) Leddy, J., Dudson, B., Romanelli, M., Shanahan, B. & Walkden, N. 2017 A novel flexible field-aligned coordinate system for tokamak edge plasma simulation. Comput. Phys. Commun. 212, 59–68.
  • Lee et al. (2015a) Lee, W., Angus, J. R., Umansky, M. V. & Krasheninnikov, S. I. 2015a Electromagnetic effects on plasma blob-filament transport. J. Nucl. Mater. 463, 765–768.
  • Lee et al. (2015b) Lee, W., Umansky, M. V., Angus, J. R. & Krasheninnikov, S. I. 2015b Electromagnetic effects on dynamics of high-beta filamentary structures. Phys. Plasmas 22 (1), 12505.
  • Lee (1983) Lee, W. W. 1983 Gyrokinetic approach in particle simulation. Phys. Fluids 26 (2), 556–562.
  • Lee (1987) Lee, W. W. 1987 Gyrokinetic particle simulation model. J. Comput. Phys. 72 (1), 243–269.
  • Lenard & Bernstein (1958) Lenard, A. & Bernstein, I. B. 1958 Plasma oscillations with diffusion in velocity space. Phys. Rev. 112 (5), 1456–1459.
  • LeVeque (2002) LeVeque, R. J. 2002 Finite Volume Methods for Hyperbolic Problems. Cambridge University Press.
  • Lin et al. (2000) Lin, Z., Hahm, T. S., Lee, W. W., Tang, W. M. & White, R. B. 2000 Gyrokinetic simulations in general geometry and applications to collisional damping of zonal flows. Phys. Plasmas 7 (5), 1857–1862.
  • Littlejohn (1982) Littlejohn, R. G. 1982 Hamiltonian perturbation theory in noncanonical coordinates. J. Math. Phys. 23 (5), 742–747.
  • Littlejohn (1983) Littlejohn, R. G. 1983 Variational Principles of Guiding Centre Motion. J. Plasma Phys. 29 (1), 111–125.
  • Liu & Shu (2000) Liu, J.-G. J. G. & Shu, C. W. C.-W. 2000 A high–order discontinuous Galerkin method for 2D incompressible flows. J. Comput. Phys. 160 (2), 577–596.
  • Loarte et al. (2007) Loarte, A., Lipschultz, B., Kukushkin, A. S., Matthews, G. F., Stangeby, P. C., Asakura, N., Counsell, G. F., Federici, G., Kallenbach, A., Krieger, K., Mahdavi, A., Philipps, V., Reiter, D., Roth, J., Strachan, J., Whyte, D., Doerner, R., Eich, T., Fundamenski, W., Herrmann, A., Fenstermacher, M., Ghendrih, P., Groth, M., Kirschner, A., Konoshima, S., Labombard, B., Lang, P., Leonard, A. W., Monier-Garbet, P., Neu, R., Pacher, H., Pegourie, B., Pitts, R. A., Takamura, S., Terry, J. & Tsitrone, E. 2007 Chapter 4: Power and particle control. Nucl. Fusion 47 (6), 203–263.
  • Madsen (2013) Madsen, J. 2013 Full-F gyrofluid model. Phys. Plasmas 20 (7), 072301.
  • Mandell et al. (2018) Mandell, N. R., Dorland, W. & Landreman, M. 2018 Laguerre-Hermite pseudo-spectral velocity formulation of gyrokinetics. J. Plasma Phys. 84 (1).
  • Mandell et al. (2020) Mandell, N. R., Hakim, A., Hammett, G. W. & Francisquez, M. 2020 Electromagnetic full-f gyrokinetics in the tokamak edge with discontinuous Galerkin methods. J. Plasma Phys. 86.
  • Maurer et al. (2020) Maurer, M., Bañón Navarro, A., Dannert, T., Restelli, M., Hindenlang, F., Görler, T., Told, D., Jarema, D., Merlo, G. & Jenko, F. 2020 GENE-3D: A global gyrokinetic turbulence code for stellarators. J. Comput. Phys. 420, 109694.
  • McCorquodale et al. (2015) McCorquodale, P., Dorr, M. R., Hittinger, J. A. & Colella, P. 2015 High-order finite-volume methods for hyperbolic conservation laws on mapped multiblock grids. J. Comput. Phys. 288, 181–195.
  • McMillan & Sharma (2016) McMillan, B. F. & Sharma, A. 2016 A very general electromagnetic gyrokinetic formalism. Phys. Plasmas 23 (9), 92504.
  • Migliucci & Naulin (2010) Migliucci, P. & Naulin, V. 2010 Magnetic signature of current carrying edge localized modes filaments on the Joint European Torus tokamak. Phys. Plasmas 17 (7).
  • Mishchenko et al. (2004) Mishchenko, A., Hatzky, R. & Könies, A. 2004 Conventional δ\deltaf-particle simulations of electromagnetic perturbations with finite elements. Phys. Plasmas 11 (12), 5480–5486.
  • Mishchenko et al. (2014) Mishchenko, A., Könies, A., Kleiber, R. & Cole, M. 2014 Pullback transformation in gyrokinetic electromagnetic simulations. Phys. Plasmas 21 (9), 92110.
  • Myra (2007) Myra, J. R. 2007 Current carrying blob filaments and edge-localized-mode dynamics. Phys. Plasmas 14 (10), 102314.
  • Myra & D’Ippolito (2005) Myra, J. R. & D’Ippolito, D. A. 2005 Edge instability regimes with applications to blob transport and the quasicoherent mode. Phys. Plasmas 12 (9), 1–10.
  • Myra et al. (1997) Myra, J. R., D’Ippolito, D. A. & Goedbloed, J. P. 1997 Generalized ballooning and sheath instabilities in the scrape-off layer of divertor tokamaks. Phys. Plasmas 4 (5), 1330–1341.
  • Myra et al. (2006) Myra, J. R., Russell, D. A. & D’Ippolito, D. A. 2006 Collisionality and magnetic geometry effects on tokamak edge turbulent transport. I. A two-region model with application to blobs. Phys. Plasmas 13 (11), 112502.
  • Naulin (2007) Naulin, V. 2007 Turbulent transport and the plasma edge. J. Nucl. Mater. 363-365 (1-3), 24–31.
  • Nevins et al. (2005) Nevins, W. M., Hammett, G. W., Dimits, A. M., Dorland, W. & Shumaker, D. E. 2005 Discrete particle noise in particle-in-cell simulations of plasma microturbulence. Phys. Plasmas 12 (12), 1–16.
  • Nielsen et al. (1996) Nielsen, A. H., He, X., Rasmussen, J. J. & Bohr, T. 1996 Vortex merging and spectral cascade in two-dimensional flows. Phys. Fluids 8 (9), 2263–2265.
  • Olver (1982) Olver, P. J. 1982 A nonlinear Hamiltonian structure for the Euler equations. J. Math. Anal. Appl. 89 (1), 233–250.
  • Pan et al. (2018) Pan, Q., Told, D., Shi, E. L., Hammett, G. W. & Jenko, F. 2018 Full-f version of GENE for turbulence in open-field-line systems. Phys. Plasmas 25 (6).
  • Parker & Lee (1993) Parker, S. E. & Lee, W. W. 1993 A fully nonlinear characteristic method for gyrokinetic simulation. Phys. Fluids B 5 (1), 77–86.
  • Parker et al. (1993a) Parker, S. E., Lee, W. W. & Santoro, R. A. 1993a Gyrokinetic simulation of ion temperature gradient driven turbulence in 3D toroidal geometry. Phys. Rev. Lett. 71 (13), 2042–2045.
  • Parker et al. (1993b) Parker, S. E., Procassini, R. J., Birdsall, C. K. & Cohen, B. I. 1993b A suitable boundary condition for bounded plasma simulation without sheath resolution. J. Comput. Phys. 104 (1), 41–49.
  • Parra & Calvo (2011) Parra, F. I. & Calvo, I. 2011 Phase-space Lagrangian derivation of electrostatic gyrokinetics in general geometry. Plasma Phys. Control. Fusion 53 (4), 045001.
  • Parra & Catto (2008) Parra, F. I. & Catto, P. J. 2008 Limitations of gyrokinetics on transport time scales. Plasma Phys. Control. Fusion 50 (6), 065014.
  • Parra & Catto (2010) Parra, F. I. & Catto, P. J. 2010 Transport of momentum in full f gyrokinetics. Phys. Plasmas 17 (5), 466.
  • Peeters et al. (2009) Peeters, A. G., Camenen, Y., Casson, F. J., Hornsby, W. A., Snodin, A. P., Strintzi, D. & Szepesi, G. 2009 The nonlinear gyro–kinetic flux tube code GKW. Comp. Phys. Comm. 180 (12), 2650–2672.
  • Perez et al. (2006) Perez, J. C., Horton, W., Gentle, K., Rowan, W. L., Lee, K. & Dahlburg, R. B. 2006 Drift wave instability in the Helimak experiment. Phys. Plasmas 13 (3), 32101.
  • Pitts et al. (2009) Pitts, R. A., Kukushkin, A., Loarte, A., Martin, A., Merola, M., Kessel, C. E., Komarov, V. & Shimada, M. 2009 Status and physics basis of the ITER divertor. Phys. Scr. T T138, 10.
  • Pueschel (2009) Pueschel, M. J. 2009 Electromagnetic Effects in Gyrokinetic Simulations of Plasma Turbulence. Ph.D. thesis, Westfälische Wilhelms-Universität Münster.
  • Qin et al. (2007) Qin, H., Cohen, R. H., Nevins, W. M. & Xu, X. Q. 2007 Geometric gyrokinetic theory for edge plasmas. Phys. Plasmas 14 (5), 56110.
  • Reed & Hill (1973) Reed, W. H. & Hill, T. R. 1973 Triangular mesh methods for the neutron transport equation. Tech. Rep.. Los Alamos Scientific Laboratory, Los Alamos, NM.
  • Reiter et al. (1991) Reiter, D., Kever, H., Wolf, G. H., Baelmans, M., Behrisch, R. & Schneider, R. 1991 Helium removal from tokamaks. Plasma Phys. Control. Fusion 33 (13), 1579–1600.
  • Rewoldt et al. (1987) Rewoldt, G., Tang, W. M. & Hastie, R. J. 1987 Collisional effects on kinetic electromagnetic modes and associated quasilinear transport. Phys. Fluids 30 (3), 807.
  • Reynders (1993) Reynders, J. V. W. 1993 Gyrokinetic simulation of finite–beta plasmas on parallel architectures. Ph.D. thesis, Princeton University.
  • Ribeiro & Scott (2008) Ribeiro, T. T. & Scott, B. 2008 Gyrofluid turbulence studies of the effect of the poloidal position of an axisymmetric Debye sheath. Plasma Phys. Control. Fusion 50 (5), 25.
  • Ricci (2015) Ricci, P. 2015 Simulation of the scrape-off layer region of tokamak devices. J. Plasma Phys. .
  • Ricci et al. (2012) Ricci, P., Halpern, F. D., Jolliet, S., Loizu, J., Mosetto, A., Fasoli, A., Furno, I. & Theiler, C. 2012 Simulation of plasma turbulence in scrape–off layer conditions: the GBS code, simulation results and code validation. Plasma Phys. Control. Fusion 54 (12), 124047.
  • Ricci & Rogers (2013) Ricci, P. & Rogers, B. N. 2013 Plasma turbulence in the scrape-off layer of tokamak devices. Phys. Plasmas 20 (1), 10702.
  • Rognlien et al. (1994) Rognlien, T. D., Brown, P. N., Campbell, R. B., Kaiser, T. B., Knoll, D. A., McHugh, P. R., Porter, G. D., Rensink, M. E. & Smith, G. R. 1994 2-D Fluid Transport Simulations of Gaseous/Radiative Divertors. Contrib. to Plasma Phys. 34 (2-3), 362–367.
  • Ryutov (2006) Ryutov, D. D. 2006 The dynamics of an isolated plasma filament at the edge of a toroidal device. Phys. Plasmas 13 (12), 122307.
  • Schneider et al. (1992) Schneider, R., Reiter, D., Zehrfeld, H. P., Braams, B., Baelmans, M., Geiger, J., Kastelewicz, H., Neuhauser, J. & Wunderlich, R. 1992 B2-EIRENE simulation of ASDEX and ASDEX-Upgrade scrape-off layer plasmas. J. Nucl. Mater. 196-198 (C), 810–815.
  • Scott (1997) Scott, B. 1997 Three-dimensional computation of drift Alfvén turbulence. Plasma Phys. Control. Fusion 39 (10), 1635–1668.
  • Scott & Smirnov (2010) Scott, B. & Smirnov, J. 2010 Energetic consistency and momentum conservation in the gyrokinetic description of tokamak plasmas. Phys. Plasmas 17 (11), 112302.
  • Sharma & McMillan (2015) Sharma, A. Y. & McMillan, B. F. 2015 A reanalysis of a strong-flow gyrokinetic formalism. Phys. Plasmas 22 (3), 32510.
  • Sharma & McMillan (2020) Sharma, A. Y. & McMillan, B. F. 2020 Solving gyrokinetic systems with higher-order time dependence. J. Plasma Phys. 86, 905860401.
  • Shi (2017) Shi, E. L. 2017 Gyrokinetic continuum simulation of turbulence in open–field–line plasmas. Ph.D. thesis, Princeton University.
  • Shi et al. (2017) Shi, E. L., Hammett, G. W., Stoltzfus-Dueck, T. & Hakim, A. 2017 Gyrokinetic continuum simulation of turbulence in a straight open-field-line plasma. J. Plasma Phys. 83 (3).
  • Shi et al. (2019) Shi, E. L., Hammett, G. W., Stoltzfus-Dueck, T. & Hakim, A. 2019 Full- f gyrokinetic simulation of turbulence in a helical open-field-line plasma. Phys. Plasmas 26 (1), 012307.
  • Shimizu et al. (2003) Shimizu, K., Takizuka, T., Sakurai, S., Tamai, H., Takenaga, H., Kubo, H. & Miura, Y. 2003 Simulation of divertor detachment characteristics in JT-60 with superconducting coils. J. Nucl. Mater. 313-316 (SUPPL.), 1277–1281.
  • Shu (2002) Shu, C.-W. 2002 A survey of strong stability preserving high order time discretizations. In Collect. Lect. Preserv. Stab. under Discret., pp. 51–65. SIAM Philadelphia, PA.
  • Shu (2009) Shu, C.-W. 2009 Discontinuous Galerkin methods: general approach and stability. In Numerical solutions of partial differential equations (ed. S. Bertoluzza, S. Falletta, G. Russo & C.-W. Shu), pp. 149–195. Birkhäuser Basel.
  • Simonini et al. (1994) Simonini, R., Corrigan, G., Radford, G., Spence, J. & Taroni, A. 1994 Models and Numerics in the Multi-Fluid 2-D Edge Plasma Code EDGE2D/U. Contrib. to Plasma Phys. 34 (2-3), 368–373.
  • Snyder et al. (2011) Snyder, P. B., Groebner, R. J., Hughes, J. W., Osborne, T. H., Beurskens, M., Leonard, A. W., Wilson, H. R. & Xu, X. Q. 2011 A first-principles predictive model of the pedestal height and width: Development, testing and ITER optimization with the EPED model.
  • Snyder & Hammett (2001) Snyder, P. B. & Hammett, G. W. 2001 A Landau fluid model for electromagnetic plasma microturbulence. Phys. Plasmas 8 (7), 3199–3216.
  • Stangeby (2000) Stangeby, P. C. 2000 The Plasma Boundary of Magnetic Fusion Devices. Taylor & Francis.
  • Startsev & Lee (2014) Startsev, E. A. & Lee, W. W. 2014 Finite-β\beta simulation of microinstabilities. Phys. Plasmas 21 (2).
  • Stegmeir et al. (2016) Stegmeir, A., Coster, D., Maj, O., Hallatschek, K. & Lackner, K. 2016 The field line map approach for simulations of magnetically confined plasmas. Comput. Phys. Commun. 198, 139–153.
  • Stegmeir et al. (2018) Stegmeir, A., Coster, D., Ross, A., Maj, O., Lackner, K. & Poli, E. 2018 GRILLIX: A 3D turbulence code based on the flux-coordinate independent approach. Plasma Phys. Control. Fusion 60 (3), 35005.
  • Sugama (2000) Sugama, H. 2000 Gyrokinetic field theory. Phys. Plasmas 7 (2), 466–480.
  • Tamain et al. (2010) Tamain, P., Ghendrih, P., Tsitrone, E., Grandgirard, V., Garbet, X., Sarazin, Y., Serre, E., Ciraolo, G. & Chiavassa, G. 2010 TOKAM-3D: A 3D fluid code for transport and turbulence in the edge plasma of Tokamaks. J. Comput. Phys. 229 (2), 361–378.
  • Told (2012) Told, D. 2012 Gyrokinetic Microturbulence in Transport Barriers. Ph.D. thesis, Universität Ulm.
  • Vianello et al. (2011) Vianello, N., Naulin, V., Schrittwieser, R., Müller, H. W., Zuin, M., Ionita, C., Rasmussen, J. J., Mehlmann, F., Rohde, V., Cavazzana, R. & Maraschek, M. 2011 Direct observation of current in type-I edge-localized-mode filaments on the ASDEX upgrade tokamak. Phys. Rev. Lett. 106 (12).
  • Wagner et al. (1982) Wagner, F., Becker, G., Behringer, K., Campbell, D., Eberhagen, A., Engelhardt, W., Fussmann, G., Gehre, O., Gernhardt, J., Gierke, G. V., Haas, G., Huang, M., Karger, F., Keilhacker, M., Klüber, O., Kornherr, M., Lackner, K., Lisitano, G., Lister, G. G., Mayer, H. M., Meisel, D., Muller, E. R., Murmann, H., Niedermeyer, H., Poschenrieder, W., Rapp, H., Röhr, H., Schneider, F., Siller, G., Speth, E., Stäbler, A., Steuer, K. H., Venus, G., Vollmer, O. & Yü, Z. 1982 Regime of improved confinement and high beta in neutral-beam-heated divertor discharges of the ASDEX tokamak. Phys. Rev. Lett. 49 (19), 1408–1412.
  • Wang et al. (2015) Wang, L., Hakim, A. H., Bhattacharjee, A. & Germaschewski, K. 2015 Comparison of multi–fluid moment models with particle–in–cell simulations of collisionless magnetic reconnection. Phys. Plasmas 22 (1), 12108.
  • Wang et al. (2006) Wang, W. X., Lin, Z., Tang, W. M., Lee, W. W., Ethier, S., Lewandowski, J. L., Rewoldt, G., Nahm, T. S. & Manickam, J. 2006 Gyro-kinetic simulation of global turbulent transport properties in tokamak experiments. Phys. Plasmas 13 (9), 969.
  • Watanabe & Sugama (2005) Watanabe, T.-H. H. & Sugama, H. 2005 Velocity–space structures of distribution function in toroidal ion temperature gradient turbulence. Nucl. Fusion 46 (1), 24.
  • Wesson (2005) Wesson, J. A. 2005 Tokamaks 3rd Edition, arXiv: arXiv:1011.1669v3.
  • Wilkie & Dorland (2016) Wilkie, G. J. & Dorland, W. 2016 Fundamental form of the electrostatic δ\deltaf -PIC algorithm and discovery of a converged numerical instability. Phys. Plasmas 23 (5), 052111.
  • Xu et al. (2010) Xu, G. S., Naulin, V., Fundamenski, W., Rasmussen, J. J., Nielsen, A. H. & Wan, B. N. 2010 Intermittent convective transport carried by propagating electromagnetic filamentary structures in nonuniformly magnetized plasma. Phys. Plasmas 17 (2).
  • Xu et al. (2008) Xu, X., Umansky, M., Dudson, B. & Snyder, P. 2008 Boundary plasma turbulence simulations for tokamaks. Comm. Comput. Phys 4 (5), 949–979.
  • Zeiler et al. (1997) Zeiler, A., Drake, J. F. & Rogers, B. 1997 Nonlinear reduced Braginskii equations with ion thermal dynamics in toroidal plasma. Phys. Plasmas 4 (6), 2134–2138.
  • Zhang & Shu (2011) Zhang, X. & Shu, C. W. 2011 Maximum-principle-satisfying and positivity-preserving high-order schemes for conservation laws: Survey and new developments.
  • Zhang et al. (2020) Zhang, Y., Krasheninnikov, S. I. & Smolyakov, A. I. 2020 Influence of flow shear on localized Rayleigh–Taylor and resistive drift wave instabilities. Contrib. to Plasma Phys. 60 (5-6), e201900098.
  • Zhu et al. (2017) Zhu, B., Francisquez, M. & Rogers, B. N. 2017 Global 3D two–fluid simulations of the tokamak edge region: Turbulence, transport, profile evolution, and spontaneous E x B rotation. Phys. Plasmas 24 (5), 55903.
  • Zhu et al. (2018) Zhu, B., Francisquez, M. & Rogers, B. N. 2018 GDB: A global 3D two-fluid model of plasma turbulence and transport in the tokamak edge. Comput. Phys. Commun. 232, 46–58.
  • Zhu et al. (2006) Zhu, P., Hegna, C. C. & Sovinec, C. R. 2006 Nonlinear growth of a line-tied g mode near marginal stability. Phys. Plasmas 13 (10), 102307.
  • Zocco et al. (2015) Zocco, A., Helander, P. & Connor, J. W. 2015 Magnetic compressibility and ion-temperature-gradient-driven microinstabilities in magnetically confined plasmas. Plasma Phys. Control. Fusion 57 (8).
  • Zweben et al. (2007) Zweben, S. J., Boedo, J. A., Grulke, O., Hidalgo, C., LaBombard, B., Maqueda, R. J., Scarin, P. & Terry, J. L. 2007 Edge turbulence measurements in toroidal fusion devices. Plasma Phys. Control. Fusion 49 (7), S1.
  • Zweben et al. (2015) Zweben, S. J., Davis, W. M., Kaye, S. M., Myra, J. R., Bell, R. E., Leblanc, B. P., Maqueda, R. J., Munsat, T., Sabbagh, S. A., Sechrest, Y. & Stotler, D. P. 2015 Edge and SOL turbulence and blob variations over a large database in NSTX. Nucl. Fusion 55 (9), 093035.
  • Zweben et al. (2020) Zweben, S. J., Fredrickson, E. D., Myra, J. R., Podestà, M. & Scotti, F. 2020 MHD-blob correlations in NSTX. Phys. Plasmas 27 (5), 52505.
  • Zweben et al. (2017) Zweben, S. J., Terry, J. L., Stotler, D. P. & Maqueda, R. J. 2017 Invited Review Article: Gas puff imaging diagnostics of edge plasma turbulence in magnetic fusion devices. Rev. Sci. Instrum. 88 (4), 41101.