Solving gyrokinetic systems with higher-order time dependence

We discuss theoretical and numerical aspects of gyrokinetics as a Lagrangian field theory when the field perturbation is introduced into the symplectic part. A consequence is that the field equations and particle equations of motion in general depend on the time derivatives of the field. The most well-known example is when the parallel vector potential is introduced as a perturbation, where a time derivative of the field arises only in the equations of motion, so an explicit equation for the fields may still be written. We will consider the conceptually more problematic case where the time-dependent fields appear in both the field equations and equations of motion, but where the additional term in the field equations is formally small. The conceptual issues were described by Burby (J. Plasma Phys., vol. 82 (3), 2016, 905820304): these terms lead to apparent additional degrees of freedom to the problem, so that the electric field now requires an initial condition, which is not required in low-frequency (Darwin) Vlasov–Maxwell equations. Also, the small terms in the Euler–Lagrange equations are a singular perturbation, and these two issues are interlinked. For well-behaved problems the apparent additional degrees of freedom are spurious, and the physically relevant solution may be directly identified. Because we needed to assume that the system is well behaved for small perturbations when deriving gyrokinetic theory, we must continue to assume that when solving it, and the physical solutions are thus the regular ones. The spurious nature of the singular degrees of freedom may also be seen by changing coordinate systems so the varying field appears only in the Hamiltonian. We then describe how methods appropriate for singular perturbation theory may be used to solve these asymptotic equations numerically. We then describe a proof-of-principle implementation of these methods for an electrostatic strong-flow gyrokinetic system; two basic test cases are presented to illustrate code functionality.

(Received 29 January 2020; revised 28 May 2020; accepted 1 June 2020) We discuss theoretical and numerical aspects of gyrokinetics as a Lagrangian field theory when the field perturbation is introduced into the symplectic part. A consequence is that the field equations and particle equations of motion in general depend on the time derivatives of the field. The most well-known example is when the parallel vector potential is introduced as a perturbation, where a time derivative of the field arises only in the equations of motion, so an explicit equation for the fields may still be written. We will consider the conceptually more problematic case where the time-dependent fields appear in both the field equations and equations of motion, but where the additional term in the field equations is formally small. The conceptual issues were described by Burby (J. Plasma Phys.,vol. 82 (3), 2016, 905820304): these terms lead to apparent additional degrees of freedom to the problem, so that the electric field now requires an initial condition, which is not required in low-frequency (Darwin) Vlasov-Maxwell equations. Also, the small terms in the Euler-Lagrange equations are a singular perturbation, and these two issues are interlinked. For well-behaved problems the apparent additional degrees of freedom are spurious, and the physically relevant solution may be directly identified. Because we needed to assume that the system is well behaved for small perturbations when deriving gyrokinetic theory, we must continue to assume that when solving it, and the physical solutions are thus the regular ones. The spurious nature of the singular degrees of freedom may also be seen by changing coordinate systems so the varying field appears only in the Hamiltonian. We then describe how methods appropriate for singular perturbation theory may be used to solve these asymptotic equations numerically. We then describe a proof-of-principle implementation of these methods for an electrostatic strong-flow gyrokinetic system; two basic test cases are presented to illustrate code functionality. 2 A. Y. Sharma and B. F. McMillan fields. In order for a gyrokinetic approach to be feasible, certain constraints on the amplitude or wavelength of the fields are implied, but these should ideally be as weak as possible. We have derived a gyrokinetic formalism, in a Lagrangian formalism, which allows for quite general fields (McMillan & Sharma 2016): this paper is motivated by questions of how to derive and implement equations of motion in such theories. Essentially, the complication relative to more standard gyrokinetic theories is that the self-consistent electromagnetic fields appear in the symplectic part of the Lagrangian. Although certain other formalisms share this feature (a review of the typical theory is found in Brizard & Hahm (2007)), additional issues arise due to the more general nature of the symplectic scheme in McMillan & Sharma (2016), as well as in certain drift kinetic theories (Miyato et al. 2009) and higher-order weak-flow gyrokinetics (Parra & Catto 2008): time derivatives of the field appear both in the equations of motion and the field equation, unlike in the standard symplectic electromagnetic (EM) formulation. These additional terms in the field equation, under investigation here, are formally small, and thus tempting to treat as corrections, unlike the terms that appear in the standard symplectic EM formulation.
Some somewhat subtle problems then arise in the specification and solution of such equations, and their relationship to standard gyrokinetic theory (Burby 2016); the 'auxiliary field' φ appears as a dynamical variable requiring an initial condition, and unphysical rapid variation of the solutions to the Euler-Lagrange equations appears. This is odd because the field φ may be written in terms of the particle distribution function in Vlasov-Maxwell theory, so should not appear as an extra degree of dynamical freedom. Burby (2016) explains a method to resolve this; we will explain a related approach to removing these unphysical degrees of freedom, as well as how to implement a more direct approach that simply imposes regular behaviour in the small-perturbation limit. We will first explain how these complications arise in an electrostatic theory (Sharma & McMillan 2015).
The normalised gyrocentre particle Lagrangian up to first order in this formalism is where A is the magnetic vector potential, R is the gyrocentre position, v is the parallel particle velocity,b is the magnetic field unit vector, µ is the magnetic moment, θ is the gyroangle, B is the magnetic field strength, defines the gyroaveraging operator, ρ is the gyroradius vector, r is the field position, φ(r, t) is the electrostatic potential, is the flow velocity and t is time. Note that this formalism is equivalent to standard symplectic electrostatic drift-kinetic theory if the gyroaveraging is suppressed, and the drift-kinetic Euler-Lagrange equations are subject to the same complication. For simplicity, we consider two-dimensional simulations in the plane perpendicular to the magnetic field. For this geometry, we can find equations of motion and a field Solving gyrokinetic systems with higher-order time dependence 3 equation obtained from our first-order gyrocentre Lagrangian from variational theory. The equations of motion areṘ Note that, unlike standard gyrokinetic theory, the polarisation drift now appears in the drift motion, in terms of the time derivative of the flow (note that the polarisation drift appears in the equations of motion even in certain weak-flow formalisms (Heikkinen et al. 2008)). The field equation is where F is the gyrocentre distribution function and d 6 Z = B * dR dv dµ dθ. We have (1.7) The first term in the field equation (1.5) contains the effect of polarisation through the dependence of the phase-space volume on potential (as the polarisation drift is retained in the gyrocentre trajectory). These equations reduce to drift-kinetic theory if the gyroaverage is set to an identity. The third term in the equation forṘ (in (1.4)) and the second term in the righthand parentheses in our Poisson equation (1.5) contain a partial time derivative of the potential-dependent flow velocity. These terms, however, are actually of higher order (in = ∇ 2 φ) than the dominant terms in these expressions: this is obvious for the polarisation drift, but it requires some work to show why the term in the Poisson equation is small (and the distribution function must not have too strong a gradient). We would therefore be justified in neglecting them, given the theory is only valid up to first order. It is nonetheless useful to keep them, in order to derive a conservative numerical scheme: we are interested in solving over transport time scales where secular accumulation of small fluxes might potentially be important. Retaining these formally small terms is also necessary for consistency if higher-order terms are kept in the Lagrangian.
A difficulty arises because both the field equation and the equation of motion involve the polarisation drift (as in Heikkinen et al. (2008)), so involve the time derivative of the electrostatic potential. We will show why for these equations, an iterative solution approach is justified. Essentially, this is permitted by the formal smallness of the time derivatives, so they may be treated as corrections; if they were large, on the other hand, they would fundamentally change the nature of the equations.
In certain other symplectic electromagnetic formalisms (indeed, in the formalism often just called symplectic gyrokinetics), the field time-derivative term (of the parallel vector potential) in the equations of motion is of the same order as the remaining perturbed motion and, in particular, contains the lowest-order physics of the Alfvén waves. Thus, a direct iterative approach would not normally converge (Belli & Hammett 2005); however, where the time derivative of the fields only appears in 4 A. Y. Sharma and B. F. McMillan the equations of motion and not the field equation, an explicit equation for the time derivative of A may be written by taking the time derivative of the field equation and substituting in the Vlasov equation (Manuilskiy & Lee 2000;Görler et al. 2011;Mandell et al. 2020). That is, these terms do not actually lead to the conceptual and numerical problems explored in this paper. In a general setting, a combination of that approach and the iterative scheme described in this paper may be necessary: an explicit equation for the lowest-order solution of the time dependence of the fields, plus an iteration approach to deal with small terms that create a dependence on higher-order time derivatives.

Converting between symplectic and Hamiltonian forms
One approach to solving systems with a symplectic form containing a time-varying field is to split the symplectic form into a large part and a correction, is independent of the perturbed field, and find a change of variables to convert to a Hamiltonian approach. The choice of splitting is obvious for perturbative theories. Another approach is to use a splitting based on an approximate solution φ 0 for the fields, which is dependent on the particle positions, but not onŻ (a related version of this approach is suggested in Burby (2016)). One may then write γ (φ, Z) = γ (φ 0 , Z) + γ (φ − φ 0 ): in our case, φ 0 is found by neglecting the second term in the Poisson equation. We then identify γ 0 = γ (φ 0 , Z) and γ 1 = γ (φ − φ 0 ). In order to keep the splitting procedure entirely described within the variational formalism, an additional equation describing the approximate Poisson equation, and thus φ 1 , may be added to the system Lagrangian via a Lagrange multiplier. Neither the splitting nor this additional equation modify the solutions to the dynamical equations, but simply serve to identify a small term γ 1 in the symplectic form. The particle Lagrangian L may then be transformed to show that where a near-unity transform Z = T(Z) has been used to eliminate γ 1 from the symplectic form, ω is the Poisson matrix associated with γ 0 , S is a gauge function that may be chosen to simplify the Hamiltonian, the implied sums are over indices i ∈ 1, 6 and all functions in the last line are evaluated at Z . The Lie transform approach may be used to eliminate γ 1 from the symplectic form at all orders, but only the solution at lowest order is shown explicitly. For standard symplectic EM theories, the transform T amounts to the replacement p = qA + mv . Taking instead p = q(A − A 0 ) + mv , where A 0 is an approximate solution for the vector potential (for example, one may compute its time dependence using the zero-resistivity limit of Ohm's law E = 0) is the basis for the partially symplectic approach of Mishchenko et al. (2017). The transform performed in this section is a generalisation of the partially symplectic approach for general Lagrangian forms. As a result of the transform, the perturbed field now appears only in the Hamiltonian, through γ 1 . Variation of the potential then results in a field equation dependent only on the set of particle coordinates Z, but not onŻ (in the standard symplectic EM case, the result is the integral of the p current). The result is a solution for φ and thusŻ consistent with the original Lagrangian, which may locally (in a short time window) be expressed as a power-series expansion in .
Solving gyrokinetic systems with higher-order time dependence

5
We do not pursue this approach as a practical way to solve gyrokinetic equations: the use of an approximate field solution as part of an additional transform appears likely to lead to particularly messy expressions for general cases. But this approach does show the existence of a solution (for the particle trajectories Z and φ) which has a regular power-series expansion, as long as an approximate solution A 0 may be found. We will use a more direct approach to find the terms in the expansion order-by-order.

Form of the field equation in this symplectic theory
In general, gyrokinetic theory is an asymptotic theory, constructed on the assumption that the local dynamics (i.e. over a sufficiently short time interval), and thus φ and Z, depend smoothly on a small parameter, so they may be written (over short time intervals) as an asymptotic power-series expansion in terms of the ordering parameter and time. That is, the formalism neglects effects which are asymptotically small, such as resonances between gyration and drift motion, because they do not appear in the power-series expansion, as well as effects on short time scales comparable to the gyration time. Note that the correct ordering of generators in the Lie transform also depends on the smooth dependence of the dynamics, which is a requirement to be able to derive gyrokinetic theories using Lie transform methods. The considerations of the previous section demonstrate that we may convert the symplectic formalism to a Hamiltonian formulation where there is no time derivative of the field in the Poisson equation, and solve it in the usual way, to find a solution regular as → 0. It is more straightforward however to simply determine the terms in this power series directly without an additional coordinate transform.
Time derivatives appear in the Poisson equation, equation (1.5), multiplied by (some power of) the ordering parameter with a dependence of the form A direct solution of this equation coupled to the particle equations of motion requires an initial condition for φ, which is surprising, since in a low-frequency (Darwin) theory we expect φ to be a function of the particle positions. Also, if we were to ignore the required slow time variation of the solutions, the derivative term would be a singular perturbation, because the ordering parameter multiplies the highest-order term. Solutions in general would vary in a singular fashion as → 0, rather than smoothly approaching the = 0 limit. The typical variation time scale would go as −1 as → 0, which is not formally compatible with the assumed time-scale ordering of gyrokinetics.
In order to impose that the term multiplied by be small, we find a power-series expansion in that satisfies the equation. Singular initial-value differential equations may often be solved by separating space into a transient (inner) region with rapid time variation where the term involving highorder time derivatives is comparable to other terms, and a smooth outer region, where the singular term is relatively small (O'Malley Jr. 2013). The outer solution is defined as the limit of a Picard iteration (and this is generally how it is found in practice). That is, given φ 0 satisfying Bφ 0 + C = 0 and, for n > 0, and the outer solution is taken to be φ = lim n→∞ φ n . These equations need to be solved simultaneously with the Vlasov equation (or equations of motion in the Lagrangian 6 A. Y. Sharma and B. F. McMillan formulation), which also involves the derivative of the field φ and determines the operators A, B and C (most obviously because the particle distribution determines the gyrocentre charge density); we have where Z 0 and Z 1 denote the equations of motion (1.4) split by order of the terms. If this process converges, φ is a solution to the original equation, with a smooth dependence on near = 0. We do not attempt to find conditions under which this series converges; proving this would require an examination of the spectral properties of the problem-specific operators. For well-behaved systems, one expects a finite radius of convergence in (because the iteration involves a small parameter, unlike Belli & Hammett (2005)). Given that the fast dynamics appears to be spurious, and that the physical dynamics, at least locally, should smoothly tend to the = 0 case in the → 0 limit, we suggest that this outer solution is the physically relevant one. Because this choice also removes the extra degrees of freedom (specification of the initial value of φ), this allows an unambiguous specification of the initial conditions using the particle distribution. The outer solution then satisfies both the initial condition and the time-evolution equations (gyroVlasov-Maxwell), and evolves on time scales consistent with the assumed time-scale ordering, and thus meets the requirements of a correct solution. There may well be physical transient dynamics that occurs on faster time scales (comparable to the gyrofrequency), but we have, in any case, chosen to neglect this as part of the gyrokinetic ordering, so it is consistent to also neglect it here.

Numerical solution of outer time-evolution equations
The outer solution to the time-evolution equations is defined using a Picard iteration method, and numerical methods can directly implement this iteration procedure. As part of this process, the time derivative of the field must be evaluated and, given the value of the field on the time-grid points, this may be constructed using standard finite-difference methods. Numerical methods to solve these asymptotic methods are not novel (Abrahamsson, Keller & Kreiss 1974;O'Malley Jr. 2013), but will likely be unfamiliar to most plasma physicists.
We will illustrate how such methods work by describing a simple approach based on the fourth-order Runge-Kutta integrator. Based on the values at either end of the Runge-Kutta time step, a time-continuous interpolator for the field (a dense representation) may be constructed, to allow the time derivative to be calculated for the next Picard iteration. We represent the equation to be solved as where X is some general (e.g. vector) quantity. For the gyrokinetic problem, the variable X would represent the extended system state (φ, f ), and the operators U, A, B and C encode the coupled Vlasov-Poisson system. We choose to construct X 0 (t) via a standard fourth-order Runge-Kutta scheme, which we take two steps of, from time point T to T + h/2, then to time point T + h. Five intermediate values X i (T), X i (T), X i (T + h/2), X i (T + h/2) and X i (T + h) are used, here with i = 0, to construct a fourth-order polynomial interpolant X † (t) on the Solving gyrokinetic systems with higher-order time dependence 7 domain t ∈ [T, T + h]. Differentiation of X † then yields approximations to the first and second derivatives on the domain that are accurate to order h 4 and h 3 , respectively.
The Picard iteration procedure then consists of solving for each i using Runge-Kutta and then finding the dense approximant X † (with X −1 = 0). The time derivative has accuracy one order in h lower than the Runge-Kutta solution, but is multiplied by in the iteration step, so the overall accuracy of the method is P N=0 h N P−N , where P = 4 is the accuracy of the Runge-Kutta scheme we have chosen. Also, the formal accuracy does not improve after the fourth iteration. We illustrate the first two steps of this iteration scheme.
First, we solve the unperturbed system and find X † 0 ∼ X 0 . The next iteration is then constructed using and the order and 2 terms involving higher-order time derivatives may be directly evaluated to yield a time-varying inhomogeneous term on the right-hand side of the equation; this is a first-order ordinary differential equation for X 1 .
Although this provides a method to construct a solution to the order of accuracy desired, the computational expense scales like P + 1. A more efficient approach is, apart from at the first time step, to reuse the polynomial interpolant from the previous time step. This is most obviously compatible with the use of multi-step methods where the maximum step size is small compared to Runge-Kutta-type methods, so the amount of extrapolation required is small. If stability is not significantly modified due to finite-effects, the computational expense is not significantly worse than the = 0 case. Note that this approach may also be used as a way of speeding up various iterative schemes found in certain gyrokinetic codes (Mishchenko, Könies & Hatzky 2005;Bottino et al. 2010). That is, we can use polynomial extrapolation to find an accurate 'starting' value for these schemes.

Two example problems
Two problems are considered. The first is a first-order nonlinear problem (which tests the nonlinear behaviour of the scheme) and the second is a linear second-order ordinary differential equation with constant coefficients and a forcing (demonstrating that we can find the outer solution to a singular perturbation problem).
First, consider the equationẏ = e −y + ẏ, We will solve this problem using the iterative approach discussed in the previous section. To check that the implementation matches the theoretical scaling, we perform a single step of this augmented RK4 scheme and examine the dependence of the error on and h. which has the solution y = C 1 exp(−t/ ) + C 2 + 1 1 + 2 (sin(t) − cos(t)), (4.8) where the outer solution with C 1 = 0 does not exhibit the rapid transient. We solve for the outer solution using the same iterative numerical method with = 0.1 and time step h = 1/3. The analytical solution and the error as a function of time are plotted in figure 2. Adequate numerical performance is seen.

Numerical scheme for implicit Vlasov-Poisson
To demonstrate that this methodology may be practically implemented in a gyrokinetic code, we discretise the Vlasov-Poisson equations (equations (1.4) and (1.5)) using a δf particle-in-cell (PIC) method (Lanti et al. 2020) and use the resulting code for two example applications. Monte Carlo markers are used to represent distribution function quanta, employing the splitting F = F 0 + δF, where we choose the equilibrium part F 0 = n 0 (2πT) −3/2 e −((1/2)v 2 +µB)/T to be Maxwellian, n 0 (R) is the background density, T(R) is the temperature, v is the particle velocity and the fluctuating part δF is discretised as follows.
Solving gyrokinetic systems with higher-order time dependence 9 FIGURE 2. Numerical solution to (4.7) (solid trace), and the difference between this and the exact solution (dashed trace), multiplied by 10 4 , for = 0.1 and h = 1/3.

Discretisation
where N p is the number of particles, N is the number of markers and w n is the marker weight. Integrating both sides of (5.1) over a region Q of volume V n associated with a single marker (the marker phase-space volume) and considering the limit where this volume is small, so quantities may be considered constant in this volume, we have where δF n is the average value of δF over Q, with and d 6 z n = B * d 3 R dµ dv dθ. The value of V n depends on how the markers are loaded. More specifically, based on the algorithm chosen for sampling phase space, we can compute the distribution of markers g(Z), which is defined so that over some volume the total number of markers is We then have V n = B * /gB.

5.2.
Initialisation: phase-space volume Since B * , defined in (1.6), is potential-dependent, we cannot directly find V n (5.5) even though g is known. Instead, we use the approximation B * = B as an initial approximation to V n . We can then set w n from the specified initial distribution using (5.2).
Upon computing the potential to lowest order in , we compute B * and then find the corrected value for V n (at first order in ). To keep φ constant when correcting V n , we do not alter w n . This means that although the state of the initialisation is internally consistent, the actual initial δF n in the simulation is slightly modified compared to the nominal value specified in the input file. Note that higher-order corrections to the potential depend on V n , so this update would need to be included in the iterative loop at the first time step to allow higher-order consistency: the current implementation does not account for this.

Time evolving the Vlasov-Poisson system
We have discussed general methods for solving coupled time-evolution equations like our Vlasov-Poisson equations. For our proof-of-principle code, however, we use a simplified low-order method. Our Poisson equation (1.5) and the Euler-Lagrange equation (1.4) contain an implicit term involvingu 1 , which cannot be directly computed from the system state (marker weights and positions). We use a single-step method in order to computeu 1 . We begin by taking a small Euler time step of length h with the terms involvingu 1 neglected. We may then approximateu 1 via finite differences asu In order to evolve our markers, we use a fourth-order Runge-Kutta time-integration scheme. This requires evaluating the time derivative of the trajectories for each substep, at time points within the interval [t, t + h]. At each substep, an Euler time step of length h is used to evaluate the implicit time derivatives, which are correct to first order in and h . Overall, the error per unit time of this method (analysed in the same way as the methods described above) is O(h 4 + h + 2 ).
6. Gyrokinetic simulations 6.1. Kelvin-Helmholtz instability 6.1.1. Weak flows In the weak-flow and cold-ion limits, our Vlasov-Poisson system is equivalent to the Hasegawa-Mima equation (Hasegawa & Mima 1977;Horton & Hasegawa 1994). The Hasegawa-Mima equation exhibits cascade and inverse cascade phenomena, and describes perpendicular modes that lie in the plane perpendicular to a slab magnetic field. Analytic linear growth rates may be computed by assuming a three-wave coupling, for which |φ k 1 | |φ k 2 | ∼ |φ k 3 | |φ k n |, n = 1, 2, 3, (6.1) Weak-flow code verification was performed by comparing linear Kelvin-Helmholtz instability growth rates computed from gyrokinetic simulations with the analytic and semi-analytic results.
The converged simulations used gyrokinetic hydrogen ions, 2 24 markers, adiabatic electrons, uniform background densities, uniform ion and electron temperatures, an ion to electron temperature ratio of T i /T e = 10 −4 and a time step equal to the ion thermal gyroperiod. The doubly periodic, two-dimensional spatial simulation domain used a 64 × 32 grid in (x, y) and a length πρ ti in the y direction.
The potential was initialised to contain background and perturbation sinusoidal components in the y and x directions, respectively. This was achieved by initialising δf as δf = A[sin(k y R y ) + 10 −4 cos(k x R x )]F 0 , (6.2) where A = 47.5 is the δf amplitude and k x and k y = 2ρ −1 ti are the wavenumbers in the x and y directions, respectively (a scan over k x was performed at fixed k y ).
As multiple unstable modes are present in the simulation, we do not expect agreement with the analytic, three-wave-coupling result (6.1), but do expect agreement with a semi-analytic result derived in a similar manner to that of Rogers & Dorland (2005) as follows.
During the linear period of the simulation, the potential is given by where γ is the linear growth rate and i in an exponent is the imaginary unit. By substituting this potential (6.3) into the Hasegawa-Mima equation, we obtain the eigenvalue equation × cos(k y y)} φ n e ink y y = 0. (6.4) By using a change of basis via ∞ n=−∞ φ n e ink y y = ∞ n=0 a n cos nk y y + ∞ n=1 b n sin nk y y (6.5) and the orthogonality of sine and cosine, the eigenvalue equation (6.4) can be written in the form Ma = γ a, (6.6) where M ∈ C n×n is an infinite square matrix, n ∈ Z + , a = a m and m ∈ Z * . The eigenvalue equation in this form (6.6) can be solved numerically by computing the maximum real eigenvalues of a truncation of M that corresponds to our finite discretised spectral range. The simulated, semi-analytic (6.6) and analytic (6.1) linear Kelvin-Helmholtz instability growth-rate spectra are shown in figure 3. As expected, we only have good quantitative agreement between the simulated and semi-analytic (6.6) spectra.

12
A. Y. Sharma and B. F. McMillan FIGURE 3. Linear Kelvin-Helmholtz instability growth-rate spectra for the gyrokinetic simulation (points) and semi-analytic result (solid curve). The analytic, three-wavecoupling result (dashed curve) is shown for comparison. The simulation parameters are described in § 6.1.1.

Strong flows
The growth rate of the conventional Kelvin-Helmholtz instability is symmetric with respect to the sign of the parallel vorticity. However, for extended magnetohydrodynamics (MHD) that includes finite-Larmor-radius effects (Nagano 1978), an asymmetry appears (this effect has also been seen with hybrid codes (Gingell et al. 2012)).
The simulations used gyrokinetic hydrogen ions, 2 23 markers, constant electron density, uniform background ion density, uniform ion and electron temperatures, T i = T e and a time step equal to the thermal gyroperiod. The doubly periodic, two-dimensional spatial simulation domain used a 64 × 64 grid in (x, y) and a length L y = 40πρ ti in the y direction. The potential was initialised to contain a shear layer dominated by a single sign of the parallel vorticity with u ∼ 1 in the y direction, and a sinusoidal perturbation in the x direction. This was achieved by initialising δf as where A = ±2.54 × 10 −4 is the δf amplitude (the sign of which allows the initialisation to be dominated by the corresponding sign of parallel vorticity), σ = L y /13.43, k x is the wavenumber in the x direction and c = − √ π/13.43 is chosen to enforce the requirement that the total charge density in the simulation domain is zero.
The implicit termu 1 (1.7) is a polarisation drift term that contains the centrifugal drift (Brizard 1995). Without the sinusoidal perturbation in δf (6.7), this initialisation corresponds to a laminar flow, for whichu 1 is zero. However, the seeding of a Kelvin-Helmholtz instability of the background shear layer corresponds to a non-zerou 1 that increases in magnitude as the amplitude of the perturbation grows and large curved flows arise.
The dependence on the sign of the vorticity enters through the second term in B * (1.6). Therefore, due to the presence of B * andu 1 in the last term inṘ (in (1.4)), this term is a strong-flow term that is asymmetric with respect to the sign of the parallel vorticity.
Solving gyrokinetic systems with higher-order time dependence 13 FIGURE 4. The difference between the growth-rate spectra for positive and negative parallel vorticity for the gyrokinetic simulation and analytic extended MHD (Nagano 1978). The simulation details are given in § 6.1.2 and k y = 2π/L y .
The difference between the growth rate spectra for positive and negative parallel vorticity is plotted in figure 4 for both extended MHD that assumes a thin incompressible shear layer (Nagano 1978) and the gyrokinetic simulation. There is good qualitative agreement between the two models and the asymmetry is of the same order of magnitude in both cases.
The dependence on the sign of the parallel vorticity is due to the chirality of gyromotion (Nagano 1978;Gingell et al. 2012). That is, the net flow depends on whether the shear flow and gyromotion are correspondent.

Blob motion
We examine the motion of a self-advecting blob of plasma, which initially consists of a pair of vortices of opposite sign. This is intended to be representative of the plasma blobs that form in the tokamak edge, driven by gradients in the plasma and magnetic field; as we are considering a simulation with a homogeneous B field, we will be simulating only the late-time behaviour of these blobs and ignoring the drive process itself (Krasheninnikov 2001). In the long-wavelength limit, the solutions of gyrokinetics are related to the Euler equation, which has solutions in terms of trajectory equations for localised vortices.
The simulations used gyrokinetic hydrogen ions, 2 26 markers, constant electron density, uniform background ion density, uniform ion and electron temperatures, T i = T e and a time step equal to the thermal gyroperiod. The doubly periodic, two-dimensional spatial simulation domain used 256 grid points and a length of L = 80πρ ti in each direction. The initialisation of δf was given by  The blob propagation for weak and strong flows is shown in figure 5. For weak flows, the dipole potential propagates in a straight line. An interpretation in terms of point vortices is that each vortex pulls the other around its centre, resulting in propagation. In the weak-flow limit, this motion is symmetrical, so each vortex is displaced an equal amount perpendicular to the line between the two vortices and the result is straight-line motion. For strong flows, the dipole propagates in a circle, instead: this is due to the effective E × B drift speed being somewhat dependent on the sign of the parallel vorticity, so the top and bottom vortices move at different speeds. As the motion of each vortex stays perpendicular to the inter-vortex line, the resulting motion is on a curve. These effects are also observed with gyrofluid models (Madsen et al. 2011;Wiesenberger, Madsen & Kendl 2014).
The radius of curvature of the curved path of the strong-flow blob R b may be computed based on the relative speed of the two vortices and the distance between them. For circular motion about a common point collinear with the vortex pair, the velocities of the two vortices are (R b ± y d )v b0 /R b , where v b0 is the lowest-order blob speed (excluding the parallel vorticity dependence) and we solve to find R b . We assume that the initial motion (figure 5) of the blob in the y direction is small compared to that in the x direction. This gives where δv is half the difference between the two vortex velocities. The lowest-order blob velocity may be calculated by determining the electric field produced by each vortex and evaluating the E × B motion on the other vortex, which is equal for the two vortices due to the symmetry of the setup. Assuming that the vortices retain their initial circular symmetry (which is justified for sufficiently small vortices), the velocity field outside a vortex at the origin in free space may be found as v =θK/R, whereθ is the angular unit vector, K is a constant and R is the distance from the vortex centre.
We have v b0 = u xi − u xs , (6.10) where u xi is the bulk inter-vortex flow speed in the x direction, u xs is the bulk singlevortex flow speed in the x direction, u x = B −1 ∂ y φ ∼ B −1 φ/L y (6.11) and L y is the local length scale of variation of φ in the y direction. The strong-flow correction to the plasma equation of motion may be found by evaluating the third, strong-flow term inṘ (in (1.4)), by using that B * − B (1.6) is small, δv ∼ B −2 (B * − B)u 1 , (6.12) where B * − B ∼u 1 ∼ u xs L u (6.13) and L u is the local length scale of variation of u xs in the y direction.
The radius of curvature of the circular motion of the strong-flow blob expected from analysis is 2.36 × 10 3 ρ ti and we have reasonable agreement with the radius of curvature measured in simulations of 2.69 × 10 3 ρ ti .

Conclusions
We have described methods for the solution of gyrokinetic evolution equations where the field equations have a dependence on the time derivative of the field. Solutions consistent with the gyrokinetic ordering and the assumed smooth behaviour of trajectories in the limit of small may be defined in terms of the limit of a Picard iteration procedure. Usually it will be possible in principle to transform coordinates so that the implicit dependence on the field does not arise, where a direct solution of the differential equation and the usual method of numerical solution are valid. It is, however, usually simpler to use the assumed asymptotic behaviour of the solution to directly construct solutions of equations derived from the symplectic form of the Lagrangian.
Implementation of this method for an electrostatic gyrokinetic formalism (Sharma & McMillan 2015) is relatively straightforward, and we have illustrated that the code reduces to the usual weak-flow limit, and is also able to resolve dynamically evolving self-consistent strong flows. Although allowing time-evolving strong flows is interesting in itself, e.g. to allow the study of astrophysical structures and tokamak pedestals, this is mostly intended as a pathway to generalised electromagnetic gyrokinetic simulations. That is, implementing codes that allow large-scale MHD motion to be solved self-consistently together with microturbulence in a unified fashion; appropriate formalisms exist (McMillan & Sharma 2016) that seem to be amenable to this approach, but have not yet been translated into numerical codes.