An energy-conserving and asymptotic-preserving charged-particle orbit implicit time integrator for arbitrary electromagnetic fields
Lee F. Ricketson, Luis Chac\'on

TL;DR
This paper introduces an energy-conserving, asymptotic-preserving implicit integrator for charged-particle orbits in electromagnetic fields, capable of accurately capturing full or guiding center motion with adaptive time-stepping.
Contribution
The paper presents a novel implicit scheme based on Crank-Nicolson that conserves energy and handles multiple physical regimes with adaptive time-stepping.
Findings
Significantly improved accuracy due to energy conservation.
Smooth transition between magnetized and unmagnetized regimes.
Effective over gyration time-scale with adaptive stepping.
Abstract
We present a new implicit asymptotic preserving time integration scheme for charged-particle orbit computation in arbitrary electromagnetic fields. The scheme is built on the Crank-Nicolson integrator and continues to recover full-orbit motion in the small time-step limit, but also recovers all the first-order guiding center drifts as well as the correct gyroradius when stepping over the gyration time-scale. In contrast to previous efforts in this direction, the new scheme also features exact energy conservation. In the derivation of the scheme, we find that a new numerical time-scale is introduced. This scale is analyzed and the resulting restrictions on time-step are derived. Based on this analysis, we develop an adaptive time-stepping strategy the respects these constraints while stepping over the gyration scale when physically justified. It is shown through numerical tests on…
| (a) Displacement restriction | (b) Avg. restriction | |
|---|---|---|
| (i) | ||
| (ii) |
| Boris () | CBFV | BFV | MI | |
|---|---|---|---|---|
| Mean | 0.099487 | 0.100280 | 0.026340 | 0.0172801 |
| Std. dev. in | 0.051293 | 0.058710 | 0.025910 | 0.014327 |
| Boris () | CBFV | BFV | |
|---|---|---|---|
| Critical | 0.73107 | 0.73110 | 0.62725 |
| % Error | 0.004 | 14.2 |
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
An energy-conserving and asymptotic-preserving charged-particle orbit implicit time integrator for arbitrary electromagnetic fields
L.F. Ricketson
Lawrence Livermore National Laboratory, Livermore, CA 94550, United States
and
L. Chacón
Los Alamos National Laboratory, Los Alamos, NM 87545, United States
Abstract.
We present a new implicit asymptotic preserving time integration scheme for charged-particle orbit computation in arbitrary electromagnetic fields. The scheme is built on the Crank-Nicolson integrator and continues to recover full-orbit motion in the small time-step limit, but also recovers all the first-order guiding center drifts as well as the correct gyroradius when stepping over the gyration time-scale. In contrast to previous efforts in this direction, the new scheme also features exact energy conservation. In the derivation of the scheme, we find that a new numerical time-scale is introduced. This scale is analyzed and the resulting restrictions on time-step are derived. Based on this analysis, we develop an adaptive time-stepping strategy the respects these constraints while stepping over the gyration scale when physically justified. It is shown through numerical tests on single-particle motion that the scheme’s energy conservation property results in tremendous improvements in accuracy, and that the scheme is able to transition smoothly between magnetized and unmagnetized regimes as a result of the adaptive time-stepping.
1. Introduction
In recent years, considerable progress has been made on implicit particle-in-cell (PIC) methods - e.g. [5, 7, 8, 9, 10, 11, 25]. Prominent among the advantages of these methods is their exact total energy conservation for any time-step and cell size. Due to this conservation, implicit PIC schemes have been shown to be more robust against the finite-grid instability than their explicit counterparts. In addition to the obvious benefits of exact energy conservation for long-time accuracy, resistance to this instability facilitates enormous speed-ups when solution structures of interest are much larger than the Debye length.
However, in strongly magnetized plasmas, there is another onerous time-step constraint not overcome by these implicit schemes - namely, the time-step must resolve the gyroperiod. Traditionally, this difficulty has been overcome using gyrokinetic plasma models [6, 12, 14, 17, 21], in which the gyroperiod time-scale has been analytically eliminated by an asymptotic expansion.
This gyrokinetic approach presents two difficulties. Firstly, the exact energy conservation property enjoyed by implicit schemes is not easily carried over to the gyrokinetic context. Indeed, some gyrokinetic models do not conserve energy even at the continuum level, and those that do conserve only an approximation of the total full-orbit energy [3]. Secondly, in many problems of interest, the gyrokinetic approximation may be valid only in a subset of the spatial domain. If the transition region - between strongly and weakly magnetized portions of the domain - is narrow and its location is known a priori, then a domain decomposition method can be effective. However, in challenging problems of scientific interest, the transition region may be wide and its location may be unknown and/or time varying.
An alternate approach to overcoming the gyroperiod time-step restriction that side- steps these difficulties is to derive an asymptotic preserving (AP) time-stepping scheme. That is, one seeks a time-stepping scheme for particle evolution that (a) recovers the exact dynamics as , (b) recovers the guiding-center particle motion when , where is the gyro-frequency, and (c) transitions seamlessly between these two regimes. Several such schemes exist in the literature [2, 13, 15, 16, 18, 26], but none feature exact total energy conservation in the context of a PIC scheme.
The purpose of the present article is to propose a new implicit, AP time-stepping method that exactly conserves total energy. The starting point is the Crank-Nicolson integrator used in prior implicit PIC work - see citations above. Building on asymptotic and empirical results in [2], we show that, in contrast to the classical Boris scheme (which is known to feature an artificially enlarged gyroradius for [1, 22]), Crank-Nicolson recovers the correct gyroradius for arbitrary time-step. We then add modifications that borrow ideas from both [2, 26] and [18] to ensure that the scheme captures the drift while preserving energy conservation. We refer to prior work [22] to find that the scheme captures the inertial drifts for arbitrary time-step with no additional modifications.
Additionally, we derive expressions for the time-step restrictions on our new scheme. It is shown that when the assumptions necessary for drift motion are satisfied, these time- step limits do in fact allow for . We present an adaptive time-stepping scheme that ensures that these new restrictions are obeyed at each time step in spatiotemporally varying fields.
Finally, our scheme is compared against the standard Boris push and existing AP integrators. This is done for single particle motion in several field configurations of varying complexity. We find that the enforcement of energy conservation gives the new scheme dramatically improved long-time accuracy compared to previous efforts. For instance, while adiabatic invariance of magnetic moment is not explicitly enforced, we find that the new scheme conserves it to a good approximation in magnetized regions while previous schemes fail to do so.
The remainder of the article is structured as follows. In Section 2, we review background material, including the requirements for energy conservation in implicit PIC, guiding center motion, properties of Crank-Nicolson applied to charged particle motion, and existing AP integrators. In Section 3, we develop our energy-conserving modification to capture the drift; we also derive time-step restrictions for our scheme and present an adaptive time- stepping strategy. We present numerical examples in Section 4 and conclude in Section 5.
2. Review
2.1. Implicit PIC
At the heart of recent energy-conserving implicit PIC schemes is the Crank-Nicolson integrator for updating particle position and velocity at time , denoted by , to time :
[TABLE]
where the quantities at the half-time-step are defined by
[TABLE]
Here, and are computed self-consistently using the particle data as inputs.
Exact energy conservation is shown under various conditions by noting that
[TABLE]
From here, the details vary slightly depending on the context (e.g. electrostatic [9] or Vlasov-Darwin [8]), but the common theme is that if (a) is updated using Ampere’s law rather than Poisson’s equation, and (b) the current density is interpolated to the grid using the same shape function that is used to interpolate from the grid to the particles, then one can choose the discretization such that the second line of (3) is equivalent to the negation of the change in discrete potential energy from step to . Thus, the total energy is unchanged by a time-step. See [8, 9] for considerably more detail.
For our purposes, the key step in this analysis lies in going from the first to second line in (3). There, we have used the fact that the discrete magnetic-field force is necessarily orthogonal to . Any additional forces added to the first line of (1) that are also orthogonal to will thus not break the energy conservation property. This observation is crucial in the derivation of our energy-conserving AP integrator, as it allows us to work without considering the details of the field solve and its relation to particle data. As such, for the remainder of the article we are safe in dropping the subscript everywhere and considering a single particle in prescribed electromagnetic fields.
2.2. Guiding Center Motion and Crank-Nicolson
Single particle motion in prescribed electromagnetic fields is well-understood in the asymptotic limit in which the gyroperiod is small compared to all other time scales. The standard derivation - see e.g. [20, 19] - uses the method of averaging to show that, to leading order, the particle velocity is composed of a rapid gyration superimposed on several slower “drifts”:
[TABLE]
Above, , form an orthonormal basis for , is the magnetic moment, and the evolution of is specified by conservation of - i.e. . The parallel velocity solves the ODE
[TABLE]
to leading order.
These drifts are often given names, which we will find convenient to use: is called the “ drift”, the “inertial drift”, and the “magnetic drift” or “ drift”. The inertial drift is often decomposed into - the “polarization drift” - and , which we will refer to as the “curvature drift”. Traditionally, the curvature drift is the name for a particular component of , but it is frequently the most important one, so we will use this name for all of .
Additionally, the effective force appearing in (5) is often called the “mirror force”, so named because it gives rise to particle confinement in a magnetic mirror. In the course of the derivation, it has the same origin as the drift - namely, an effective force acts on the guiding center. The perpendicular component of this force results in the drift, while the parallel component manifests as the mirror force. For this reason, we shall use the term “ drift” to refer both to the explicit drift and motion induced by the mirror force when no confusion results.
It is our aim to find a time integration scheme that accurately reproduces all of these drifts when . It is straightforward to show that the Crank-Nicolson scheme (1) already captures the drift for arbitrary time-step. However, we present the argument in detail here because it establishes notation that we will find useful in our later analysis. It will also lead us to the conclusion that Crank-Nicolson recovers the correct gyroradius for arbitrary .
To that end, let us temporarily assume that and are uniform in time and space so that we may drop their superscripts. We define the new discrete velocity
[TABLE]
Elementary manipulation shows that
[TABLE]
We wish to focus on perpendicular motion, so we cross the above with to find
[TABLE]
Substituting this into the perpendicular component of (7) gives
[TABLE]
From here, simple manipulation gives
[TABLE]
Dotting both sides with themselves and doing some algebra, we can see that . This reveals that the transformation is a rotation. Dotting with shows that the rotation angle satisfies
[TABLE]
In constant, uniform fields, we can thus write the perpendicular component of the velocity update as
[TABLE]
where denotes the rotation matrix about by angle given above - i.e. it can be defined by the relation along with (10). In uniform fields, this would be the exact solution if it were the case that . However, only approximates for , as can be easily seen from Taylor expansion of the right side of (11). It bears noting that for , the rotation angle tends to . This observation lends intuition to later analysis.
Thus, we see that at least in constant, homogeneous fields, Crank-Nicolson exactly recovers the correct drift, but makes errors in the gyro-phase of the particle that grow with time-step. However, in the strongly magnetized case, errors in gyro-phase are of little concern, since we assume that the gyroradius is small compared to length scales of interest.
Finally, we note that nothing in this derivation actually requires and to be spatially or temporally uniform - it was simply convenient to drop the superscripts. We may thus reintroduce the superscripts on all fields now. The only additional subtlety is that the component is always with respect to , regardless of the time-level at which we are evaluating the velocity - this is a consequence of (8), in which the in the cross product is evaluated at . The general form of (12) is thus
[TABLE]
where is the identity tensor. Thus, even in varying fields, the drift is approximately recovered so long as and change little within a time-step. Since each is assumed to vary on a scale much longer than the gyro-period, this is a much less restrictive constraint than .
2.3. Numerical Gyroradius
It is well known that the classical, explicit Boris time integrator, which may be defined by
[TABLE]
features a numerical gyroradius much larger than the true gyroradius for [1, 22]. In particular, the velocity update is identical to the Crank-Nicolson scheme defined above, so in a homogeneous magnetic field with , the velocity update still represents rotation by the angle defined in (11). Geometric arguments show that when the position is updated using a velocity of constant magnitude rotating at each time step by an angle , the radius of the circular motion is given by [1, 22] (see particularly Figure 4-3b in [1])
[TABLE]
In the Boris push, the perpendicular velocity used to update position is simply . Making use of the trigonometric identity and (11), one finds that
[TABLE]
where is the physically correct gyroradius. This clearly has negative consequences for accuracy in spatially varying fields when , as discussed in [26].
In contrast, when using the Crank-Nicolson scheme defined in (1), the velocity used in updating position is not but . By returning to (9) and dotting with itself (we may drop the tilde since we are assuming ), we find
[TABLE]
This statement may initially be counter-intuitive, but may be explained in the following way: We have already established that for , the angle through with rotates in a time step is nearly , so that . Thus, , being an average of two vectors which are approximately the negations of each other, should be much smaller than either. Indeed, should tend to zero as diverges, which is precisely what (17) states.
Substituting this expression for into (15), we find that when the Crank-Nicolson scheme is used, we have
[TABLE]
Thus, remarkably, the Crank-Nicolson scheme recovers the exact correct gyroradius for any value of . This was shown in the limit in [26], and observed empirically in the general case in the numerical experiments of [2, 26]. Thus, the implicit Crank-Nicolson scheme begins at an advantage over the Boris push when investigating particle dynamics with .
2.4. Preservation of Inertial Drifts and Non-Preservation of Drift
In [22], Parker and Birdsall show that the Boris push recovers all first order drift motions for arbitrary , albeit with an artificially enlarged gyroradius. The discretization is shown to only introduce an additional force of , where is a norm of the Hessian of . That is, if the effective gyroradius is small compared to the scale over which varies, this force is small.
In Parker and Birdsall’s numerical guiding center equation derivation, the numerical drift arises from an effective force , where
[TABLE]
One may use the expressions above for and to show that, for the Boris push, .
However, we have just shown that, for Crank-Nicolson, is much smaller than for Boris when . Thus, Crank-Nicolson dramatically underestimates the drift for . To be precise, since - see (16) and (18) - and the rotation angles are identical, we have
[TABLE]
This, though, is the only modification of the Parker/Birdsall analysis. Thus, Crank-Nicolson still captures the inertial drifts - this is verified empirically in our numerical experiments in Section 4. For this reason, we follow the lead of previous efforts toward AP schemes by focusing on modifying Crank-Nicolson to capture the drift.
2.5. Prior AP Schemes
Previous works have succeeded in capturing the drift, although without the energy conservation property we seek. These schemes can be sorted into three categories. In the first category are schemes [2, 18, 26] that modify the velocity update equation by adding an “effective” force that approximates for and is negligible for . In the second category are schemes [13, 18] that modify the position update equation by adding an “effective” velocity that approximates for and is negligible for . In the third category are the semi-implicit Runge-Kutta schemes of [16] - these schemes are restricted to magnetic fields with fixed direction but variable magnitude.
Note that the scheme of Genoni et al. [18], called the Magnetized Implicit (MI) scheme, falls into both of the first two categories in the sense that it uses an effective force to capture the mirror force () and an effective velocity to capture the perpendicular drift .
In summarizing previous efforts, we will focus on the first category because it is more compatible with energy conservation than the second category - we make the reasons for this clear in Section 3 - and applicable to more general field geometries than the third category.
2.5.1. Brackbill-Forslund-Vu
The scheme developed by Brackbill, Forslund, and Vu in [2, 26] (denoted BFV henceforth) introduces an effective force defined by
[TABLE]
where all quantities without superscripts are evaluated at . Using the notation in Section 2.2, straightforward manipulation reveals that
[TABLE]
From here, one can read off the following limits:
[TABLE]
If changes little in a time step, then , since and dominate other drifts in the guiding center limit. Thus, for , and has the features necessary to capture the drift for large .
We can actually go a step further than this. Recall that applying the analysis in [22] to Crank-Nicolson, we were able to show that unmodified Crank-Nicolson features an effective force of , with given in (20). The BFV scheme proposes to modify Crank-Nicolson so that the total force due to is
[TABLE]
In the first equality, we have just used (22) and retained our assumption that the gyration velocity is approximated . Thus, remarkably, the BFV scheme recovers - to leading order - the correct force not merely in the limits and , but also for every value of !
This scheme has two noteworthy drawbacks. First, and most important for us, is that it does not satisfy the constraint , so it does not conserve energy. Second, it requires the direct computation of at every time-step - in fact, since an iterative solver is typically used to compute the implicit particle update, it must be computed many times per step.
2.5.2. Magnetized Implicit Scheme
The MI scheme of Genoni et al. [18] introduces the effective force
[TABLE]
Strictly speaking, MI uses only the parallel component, - the perpendicular drift is captured by an effective velocity instead. However, we show that the full approximates all components of - note that this is not shown in [18].
Note that, using results from Section 2.2, we may rewrite the first term in the cross product defining as
[TABLE]
By Taylor expansion, the second term in the cross product may be approximated by
[TABLE]
Thus, we can write
[TABLE]
where all quantities without superscripts are evaluated at .
Let us now consider the gyroaverage, denoted by , of this expression. To leading order, we have
[TABLE]
where denotes the field at the guiding center position, we assumed that , the drift velocities, and parallel motion change little in a gyroperiod, and the notation has been reintroduced. We may then follow the standard drift derivation in [20, 19] - namely, expand the triple product and note that - to arrive at
[TABLE]
By once again using (17), we find
[TABLE]
This clearly tends to for large , and is for , as desired. Additionally, note that similarly to the BFV scheme, this effective force has the property that
[TABLE]
to leading order. Thus, at least in a gyroaveraged sense, the MI scheme recovers the correct leading order force for every value of .
A key difference, of course, between and is that the former only approximates the correct force in a gyroaveraged sense. The MI scheme thus must rely on the time-stepping process to, in some sense, perform the gyro-averaging implicitly by sampling the particle at different gyro-phases at different time-steps. This works well in practice for moderate - see [18] and our numerical results below - but introduces anomalous drifts for very large .
This limitation will be analyzed in detail in the context of our scheme in the following section, but may be intuitively understood as follows: For very large , the gyration velocity rotates by approximately at every step. It thus takes many time steps to accumulate a representative sample of gyrophases. Before that number of steps is reached, a biased estimate of the gyroaverage is implicitly computed, which gives rise to anomalous displacements. At smaller time steps, an accurate gyroaverage is computed in just a few time steps, and the size of the anomalous displacements is reduced so as to be smaller than the gyroradius.
Of course, this effective force also does not conserve energy. In the full MI scheme, a modification to the perpendicular motion is made to compensate for this, so that it remains true that the magnetic field does no work. Even with that correction, though, the inclusion of an effective velocity to capture prevents this scheme from conserving even individual particle energy, much less total energy in the context of an implicit PIC scheme.
This scheme has two benefits. First, it does not require an explicit computation of . Second, as it is presented in [18], it is actually an explicit scheme, using a two-stage predictor-corrector procedure with the quantities evaluated at the using the values from the predictor stage. This has obvious benefits for computation speed and implementation simplicity, but further reduces accuracy and conservation as seen in our numerical tests.
3. The Drift and Energy Conservation
In seeking to preserve total energy conservation in the context of implicit PIC simulation, we immediately rule out the use of an effective velocity, favoring instead an effective force. This is because it is clear that an effective velocity is likely to break energy conservation. We see this from the following logic: Denote a particle’s change in kinetic energy in a single time step by , and its change in potential energy by . The energy conservation property we seek is written . The velocity update is ignorant of modifications to the position update to leading order, so the addition of an effective velocity will not alter , but will alter (the particle’s position, and thus electrostatic potential energy, is modified).
One has very little hope of maintaining conservation when is modified while is fixed. Indeed, each particle’s new effective velocity would have to conspire to modify its potential energy in such a way that the sum over all modifications is zero - and this must be true for arbitrary field configurations! This circumstance is made even more unlikely by the fact that the effective velocity is meant to capture the drift, which is agnostic with respect to the electric field. Altering thus should not alter the effective velocity, meaning it must surely alter .
In contrast, the addition of an effective force modifies both the position and velocity updates in a self-consistent manner - the position is modified indirectly by the modification of the velocity. Aside from the constraint mentioned above that the new force be orthogonal to , the only other place in the implicit PIC energy conservation proofs of [8, 9] that the particle velocity arises is in the computation of the current density. All that is relied upon there is that the position and velocity are related by the Crank-Nicolson position update, which is unmodified by an effective force. Thus, we see that the introduction of an effective force holds the promise of energy conservation (it conserves energy if and only if it is orthogonal to ), while the introduction of an effective velocity is extremely unlikely to do so.
3.1. Conservative Effective Force
Our guiding principle for finding an effective force that both approximates and is orthogonal to is as follows: the effective force is postulated to be the projection of some vector onto the orthogonal complement of . That is,
[TABLE]
for some suitably chosen . An intuitively reasonable choice for would seem to be a scalar multiple of either or . This will turn out to be true in certain cases, which we show below.
This simplistic view, unfortunately, has the problem that it artificially mixes parallel and perpendicular motion. Consider particle motion in the fields , . In reality, a particle’s velocity in the -direction is constant in these fields, since . However, the effective force in (33) will in general have a non-zero component in the -direction. In particular, the -component is non-zero if the particle initially has non-zero and is not orthogonal to . Thus, introduction of this force will modify the parallel velocity even when parallel velocity is physically constant.
This issue is fixed by breaking our projection into parallel and perpendicular components. Instead of (33), we use the modified projection
[TABLE]
where all instances of and are evaluated at , and the and symbols refer to components orthogonal and parallel, respectively, to . Note that each of the two terms appearing in (34) is independently orthogonal to . The first term is responsible for the mirror force - i.e. - with a modification to the perpendicular motion to conserve energy, and the second is intended to give rise to . In the example above in which parallel velocity should be constant, this effective force behaves correctly so long as , since this implies .
We now return to our goal, which is that should, in some sense, approximate when . One consequence of this goal is that we require to be independent of gyrophase. However, we are also requiring to be orthogonal to , which manifestly does depend on gyrophase. It is thus unrealistic to expect to approximate the force at every time-step.
We can, however, enforce that approximate the correct force in a gyro-averaged sense, as in the MI scheme. That is, we will specify the vector by insisting that
[TABLE]
and requiring additionally that be independent of gyrophase. Note that we have chosen the gyroaverage to equal so that we retain the desirable property enjoyed by both the BFV and MI schemes that the force is recovered correctly for every value of . We have chosen instead of because the latter is dependent on gyrophase, and the gyroaverages of the two are identical to leading order as shown above.
It remains only to compute given the constraints above. We will assume that, as in the particle drift derivation, is dominated jointly by gyration , the drift , and parallel velocity . We write to leading order, and assume that , , and all change on time-scales much longer that . We can then write the gyroaverage condition above as
[TABLE]
Only one of the terms on the right is parallel to , so we immediately find that . Note that this does recover constant parallel velocity in the simple case described above.
By evaluating the remaining three distinct gyroaveraged expressions - see Appendix A for more detail - and substituting in the known value of , one can simplify the perpendicular components of the expression above to find
[TABLE]
where and we have introduced for brevity. Note that it is not surprising that the cases and are qualitatively different. Indeed, for , traverses the full unit circle in the course of a gyration, while in the oposite case it has a positive component in the direction for every gyrophase.
It is thus sensible to break further analysis into cases: (i.e. ) and (i.e. ). In the former case, the entire first term vanishes and we find
[TABLE]
Again, this is unsurprising because traverses the full unit circle in this case, so the average of the projection operator onto its orthogonal complement is .
The case is more algebraically cumbersome. After some simplification - in particular, noting that in this case - we can simplify (37) to
[TABLE]
This vector equation can be solved for by decomposing it into components parallel and orthogonal to . By dotting with and respectively then solving for the relevant component of , we find
[TABLE]
From here, it is straightforward to write an expression for in the case :
[TABLE]
We can now see by comparing (41) to (38) - along with the knowledge that - that the following is a uniformly valid expression for :
[TABLE]
where denotes the indicator function, i.e., if holds and zero otherwise.
For completeness, we summarize here the full form of our proposed energy-conserving, asymptotic preserving particle update:
[TABLE]
where is given by (42) with all velocities evaluated at , and is defined by (21).
There are three interesting points that warrant elaboration here. Firstly, the relative size of and is dependent on . This is because the relevant values of and are those at ; while changes little in a time-step, the rapid variation of has already been shown to lead it to shrink for increading - see (17), where we have assumed so . The consequences of this fact will be expanded upon in the following sections.
Secondly, note that diverges as (i.e. if ). This may initially appear alarming, but is accounted for by the fact that itself is never actually used in the velocity update - only its projection onto the orthogonal complement of . In the same limit , dominates , so that this projection is very nearly onto the orthogonal complement of . Since the divergence of is in the direction, this projection results in the actual effective force remaining well-behaved as . The reliance of the scheme on this precise cancellation, though, does indicate that it is crucial that the implicit solve be performed accurately. In particular, should be computed self-consistently (as opposed to using some explicit estimation of ) since the scheme is extremely sensitive to its precise value when .
Thirdly, one can see that is in general discontinuous on the manifold defined by . Indeed,
[TABLE]
due to the presence of the indicator function. This, again, is a consequence of the qualitative difference in the behavior of over a gyro-orbit depending on which of , is larger. Of course, by construction, the gyroaverage of the effective force arising from is continuous, so this discontinuity is only expected to be an issue for the small subset of particles for which and are very close to equal, so that there is a risk of their relative size changing from time-step to time-step. Our adaptive time-stepping strategy outlined below will endeavor to choose time-steps so that this is not the case.
3.2. Time-step Restrictions
While an asymptotic preserving scheme admits the use of time-steps with , one of course cannot expect accurate results for arbitrarily large time-steps. Understanding the restrictions on is crucial when applying the scheme to problems of scientific interest, as failure to do so risks viewing erroneous results as legitimate.
An obvious restriction is that the time-step should be sufficiently small that variations in and are well-resolved. The scheme proposed here features two additional time-step restrictions that we now describe. After deriving the time-step restrictions on the scheme, we present an adaptive time-stepping scheme designed to ensure these constraints are respected at every step.
Like the MI scheme but unlike BFV, our proposed scheme (43) has an effective force that only approximates in a gyroaveraged sense. That is, we must rely on the time-stepping process to perform a sort of “implicit” gyroaverage for us - here we use the term “implicit” not in the sense that a system of equations must be solved, but in the sense that no gyroaverage operator explicitly appears in our time integration scheme. This fact was alluded to when discussing MI; we discuss it in considerably more detail here.
Recall that the drift in the perpendicular direction that we seek to capture has the form
[TABLE]
The scheme proposed here, on the other hand, gives rise to a drift of the form
[TABLE]
The scheme thus features an anomalous drift with velocity
[TABLE]
By construction, the gyroaverage of this anomalous displacement vanishes. However, on shorter time-scales, it has the potential to impact the particle’s long-term trajectory. This can be avoided by enforcing two conditions: (a) the anomalous displacement due to this anomalous drift should be no larger than the gyroradius, and (b) the time-scale over which this anomalous displacement averages to zero should be small compared to time-scales of interest, denoted henceforth by .
Deriving the restrictions on time-step arising from these conditions is quite challenging in general, but can be done analytically in two important limits: (i) , and (ii) . The derivations of these restrictions are lengthy, and therefore confined to Appendix B. We summarize the results in Table 1, in which we record the maximum value of permitted by each restriction in each of the two asymptotic limits above.
The relevant non-dimensional quantities in determining these restrictions on are defined by
[TABLE]
The quantity denotes the shortest time-scale in our problem that we wish to resolve. For brevity, we quote here only simplified restrictions under the assumptions . The more general expressions may be found in Appendix B.
3.3. Adaptive Time-stepping
Having understood the limitations on our scheme’s time-step, we propose an adaptive time-stepping strategy that respects these limits. In addition, the time-stepping strategy should endeavor to avoid the manifold on which our effective force is discontinuous. We specify parameters , , and . We then select a time-step as follows:
- (1)
Compute all relevant quantities - and , their gradients, , etc. - at the current particle position. 2. (2)
Set . 3. (3)
Estimate at the half time-step with . 4. (4)
If , set and proceed with the time-step. 5. (5)
Else, if , set and proceed with the time-step. 6. (6)
Else, set . Then set and proceed with the time-step. 7. (7)
If, upon completion of the time-step, it is found that the fractional change in magnetic moment during the time-step exceeds , shrink the step size by a factor of and recompute the step.
Several details of this time-step selection warrant elaboration. First, the parameters , and have simple interpretations. controls how close to the time-step restrictions of Table 1 one is willing to get. corresponds to steps at the limit of what is valid, while smaller values of correspond to more conservative strategies. In our numerical experiments, we use .
The parameter controls how close to the manifold - on which our effective force is discontinuous - we allow ourselves to approach. If there is no way to respect the time-step constraints while keeping either or , then the gyroperiod is resolved (see step 5) so that the discontinuity is no longer a concern. In our numerical experiments, we use . Note that the circumstances in which this restriction is active are extremely rare. Indeed, being required to resolve requires both that and the maximum allowable time-step to be not much larger than . In quasi-neutral plasmas, one typically expects , so this constraint only applies to a select few particles for which a large time-step was impossible in the first place.
The parameter measures the accuracy with which we wish to resolve spatial variations in the magnetic field. Indeed, note that one component of the constraint in step 2 reads
[TABLE]
The right-side measures fractional variation in the magnetic field due to perpendicular velocity. corresponds to resolving the spatial scale over which doubles. In our numerical experiments, we choose , corresponding to resolving variations in . Note that also appears in the time-step chosen when must be resolved (step 5). It is not necessary that these two constants be equal, but turns out to be a reasonable value for each.
The parameter controls the maximum permissible fractional change in within a time-step. It appears in step 7 as a safeguard for situations in which the particle is weakly magnetized. When varies non-adiabatically, it is typically important to resolve these changes in . This is ensured by choosing a relatively small value of . Our numerical tests use .
A final note regarding : In general, this is a problem-dependent quantity to be determined by the user. A reasonable starting point, however, that is used in the majority of our numerical tests is as follows. Begin by defining lengths scales
[TABLE]
arising from perpendicular and parallel variations in and . A time-scale to be resolved can then be defined by
[TABLE]
4. Numerical Examples
We test our scheme by investigating single-particle motion in four electromagnetic field configurations. We use a simple magnetic mirror configuration, a case with transverse magnetic field gradient in a uniform electric field, a case in which the particle passes through a weakly magnetized region, and a Solov’ev equilibrium in tokamak geometry with a flux-function electric field.
In all cases, we work in a dimensionless formulation in which , and measure both accuracy and conservation properties of the scheme. To measure accuracy, we compare to a simulation using the standard Boris integrator - used by the majority of PIC schemes - with . We solve the systems of equations arising from our implicit discretizations using a Jacobian-Free Newton Krylov (JFNK) method with tolerance set to .
The adaptive time-stepping scheme and definition of found above are used except where otherwise noted. When individual values of are reported, these are averages over the entirety of the simulation. When noteworthy, we plot the value of as a function of time to illuminate the behavior of the adaptive time-stepping scheme.
In each test case, we compare our scheme against not only a well-resolved Boris run, but also the BFV scheme, MI, and unmodified Crank-Nicolson. Each scheme uses the adaptive time-stepping scheme described above for a fair comparison.
4.1. Magnetic Mirror
As is standard, our magnetic mirror is formed by two circular current loops. Let the loops be oriented normal to the -axis, centered at , with radius and carrying current . The resulting magnetic field (up to constants) near the -axis is given by
[TABLE]
We work with , , , leading to a mirror ratio of . We initialize the particle at with . To a good approximation, this results in gyration about the -axis. Having fixed the perpendicular velocity at , the trapped-passing boundary may be expressed purely in terms of a critical initial parallel velocity given by
[TABLE]
We perform a parameter scan in the initial parallel velocity to test how accurately each scheme captures the trapped-passing boundary. The particle trajectories in the - plane for several particular values of are found in Figure 1.
As expected, Crank-Nicolson dramatically underestimates the mirror force for , and confinement is not achieved for any of the parallel velocities tested. BFV correctly predicts confinement for parallel velocities relatively small compared to , but underestimates the trapped-passing boundary by more that .
In this case, both the present scheme and MI perform quite well, predicting the trapped-passing boundary quite accurately. An understanding of the reason for this can be gleaned from Figure 2, in which we measure energy conservation during a sample simulation.
As expected, our scheme and Crank-Nicolson conserve energy up to the tolerance of the nonlinear solver. In the absence of an electric field, MI and Boris conserve energy up to numerical round-off. BFV, on the other hand, features errors in energy due to the form of the effective force introduced, leading to its poor performance.
In addition to the - plane, we plot as a function of time for each method in Figure 3, this time focusing on values of near .
When focusing on values of near the trapped-passing boundary, the improved performance of the new scheme, even relative to MI, is readily visible.
4.2. Transverse Magnetic Field Gradient
The previous test exercises only the mirror force, in the absence of an electric field. Here, we test each scheme’s ability to capture the transverse drift in a homogeneous electric field. We set , , and initialize the particle at the origin with . Simulations are run to the final time .
These fields induce an drift in the positive -direction and a drift in the positive -direction. This test case affords the opportunity to measure magnetic moment conservation and ability to capture the polarization drift, the latter arising because the speed is time-varying. The trajectory in the - plane as well as as a function of time appear in Figure 4.
As is readily apparent, the new scheme features improved accuracy in capturing the trajectory. This can be directly linked to improved magnetic moment conservation: other schemes underestimate , so they also underestimate the drift, for it is proportional to . The reason for the failure of earlier schemes - especially BFV - to conserve is simple to understand. Fundamentally, adiabatic invariance of is a result of the energy equation
[TABLE]
followed by substituting in the drift motion for , gyroaveraging, and neglecting small terms. When the “effective” force is introduced as in BFV, a new term appears in the energy equation above:
[TABLE]
In addition to leading to reduction in total energy - see Figure 5 - this term also means that when retracing the steps in the -conservation derivation, one must find , where we have again assumed that dominates the drift motion. In our case, and are parallel, so for (i.e. ), one expects exponential decay of at rate , just as observed.
Crank-Nicolson, on the other hand, does conserve energy. However, its underestimation of the drift keeps the particle in a region of artificially high electrostatic potential. This must be compensated for by robbing the particle of kinetic energy. Since we’ve already shown that the drift is accurately captured, that kinetic energy must come from the particle’s gyration, thus leading to decay of .
Note also that while MI conserves energy to numerical roundoff in the absence of an electric field - see magnetic mirror test case above - it features errors in the presence of even a uniform electric field due to its usage of an effective velocity. Finally, we note that our adaptive time-stepping strategy chooses larger time-steps for BFV, MI, and Crank-Nicolson than for our scheme near the end of the simulation. This is a result of the shrinking value those schemes experience, which shrinks the gyroradius and leads the scheme to believe a larger time-step is possible.
4.3. Weakly Magnetized Region
A strong motivation for an AP scheme capable of stepping over the gyrofrequency is that, unlike drift- or gyro-kinetics, it can handle weakly magnetized regions in which the guiding-center approximation is invalid. We test this capability in a simple geometry by setting
[TABLE]
Having already convinced ourselves that C-N fails to capture the drift for , we omit it in plots here to reduce clutter.
We initialize a particle at the origin, where it experiences an drift in the positive -direction. This pushes it through the narrow region surrounding in which the particle is quite weakly magnetized and the guiding center approximation is violated. Therein, it experiences a large, non-adabatic jump in magnetic moment before continuing to drift to the right into another strongly magnetized region. A sample trajectory and time history of for each scheme appear in Figure 6.
Note that, while our proposed scheme is the only one able to reproduce the adiabatic invariance of in the magnetized regions far from , it still does not recover the particle trajectory accurately. This is because the rapid, non-adiabatic jump in that occurs as the particle passes through the weakly magnetized region is very sensitive to the particle’s gyrophase as it enters the weakly magnetized region. Since stepping over the gyroperiod inherently throws away gyrophase information, no scheme using can hope to recover the details of any given particle trajectory in this case.
What one can hope for, however, is that the average jump in magnetic moment is reproduced accurately when averaged over initial particle gyrophase. Indeed, a fundamental assumption in the drift- and gyro-kinetic approximations is that the distribution function is independent of gyrophase. In this case, recovering the average jump is sufficient to predict the ensemble dynamics. To this end, we initialize particles at the origin with velocities , , and measure the final magnetic moment of the particle averaged over the interval . The final magnetic moment as a function of initial gyrophase for each scheme is plotted in Figure 7.
As expected, the magnetic moment is not accurately reproduced for most particular gyrophases. However, the present scheme reproduces the mean of the fully-resolved Boris run to within , and the standard deviation to within . For detailed values, see Table 2.
Recall that a drift- or gyro-kinetic approximation would predict no change in in this (or any other) case.
As a final note, we plot as a function of time and the energy errors for this test case in Figure 8. We use initial gyrophase for these plots, as in Figure 6.
As expected, our adaptive time-step strategy permits large time-steps except when the particle is in the weakly magnetized region, in which all scales are resolved. Observe that, as in the previous test case, the underestimation of by BFV and MI leads them to take larger time-steps toward the end of the simulation.
4.4. Tokamak Equilibrium
As a final test, we consider an equilibrium magnetic field in a tokamak-like geometry. Simple analytic solutions of the Grad-Shafranov solutions described in [4] specify the poloidal field, and the toroidal field is assumed to arise from a line current along the -axis. In particular, a Solov’ev equilibrium solution of the Grad-Shafranov equation for the flux function can be written as
[TABLE]
where , are constants and is the standard polar coordinate system. The poloidal magnetic field is then given by . In [23], it is shown that the coefficients may be found uniquely by specifying the tokamak parameters (inverse aspect ratio), (elongation), and (triangularity). Our poloidal field is thus uniquely specified by setting ( simply controls the overall strength of the poloidal field) and using the shape parameters of the International Thermonuclear Energy Reactor (ITER): , , and . The toroidal field is chosen to be .
Additionally, we introduce an electrostatic potential, which is itself a flux function. This choice is motivated by the fact that, in steady state, the ideal MHD Ohm’s law () requires that . We define the electrostatic potential by . This non-trivial spatial dependence of the electric field necessitates an additional subtlety in order to retain energy conservation in the single-particle case. Indeed, Crank-Nicolson only features exact energy conservation when the electric field varies linearly in space, so that identically. In [24], a trick is introduced to recover exact energy conservation in the general case; in the present context, the trick consists of the replacement
[TABLE]
in the velocity update equation. Note that this replacement results in a scheme that is still second-order accurate, as the new pre-factor tends to one at second order. Note further that this trick is not necessary for the total energy conservation theorems of implicit PIC - again, see [8, 9]. We simply use it here demonstrate that exact conservation can be achieved in the single particle case as well.
We initialize a particle in these fields at with velocity . The -velocity is left variable so as to again study the trapped-passing boundary - at the initial particle location, the magnetic field is predominantly toroidal, making a reasonable proxy for . A sample trajectory projected onto the - plane with can be found in Figure 9.
Note that BFV incorrectly predicts a passing particle, while MI predicts an unphysical trajectory even after reducing the time-step by a factor of four relative to CBFV and BFV.
We use a binary search to approximate the critical value of that separates the trapped and passing regimes. We report the resulting values and percentage errors - the well-resolved Boris run is taken as the baseline in the absence of analytic theory - in Table 3.
As in previous cases, the improved accuracy of the new method is attributable to improved energy and magnetic moment conservation, each of which is plotted in Figure 10.
5. Conclusions
In this work, we have introduced a first-of-kind numerical method for particle orbit integration that both (a) reproduces guiding center motion, including all first-order drifts, even when stepping over the gyration time-scale, and (b) conserves energy. The time integrator is implicit, built upon the classical Crank-Nicolson algorithm, and is thus appropriate for incorporation into implicit PIC methods. We have presented numerical results for single particle motion in several field configurations that demonstrate the dramatically improved conservation properties and accuracy of the scheme relative to earlier efforts.
Opportunities for further development are myriad. Practical implementation of the method in PIC codes stands to benefit tremendously from effective preconditioning of the nonlinear solve of the orbit integral. Work in this direction, building on results for BFV in [26] that analytically eliminate portions of the nonlinearity, is underway. Additionally, the present scheme can only be said to capture the drift-kinetic limit - truly capturing the gyrokinetic limit requires removing the assumption that the gyroradius is small compared to length scales of interest. Progress in this direction is of obvious interest. Further refinement and generalization of the adaptive time-stepping strategy is also of importance for the scheme’s future practical utility.
Acknowledgements
This work was performed under the auspices of the U.S. Department of Energy by LLNL and LANL under contracts DE-AC52-07NA27344, DE-AC52-06NA25396, and supported by the Exascale Computing Project (17-SC-20-SC), a collaborative effort of the U.S. Department of Energy Office of Science and the National Nuclear Security Administration. The authors wish to acknowledge valuable conversations regarding this work with Guangye Chen, William Taitano, C-S Chang, Joshua Burby, and Matthew Miecnikowski.
Appendix A Gyroaverage computations
When computing the gyroaverages on the right of (36), we may without loss of generality align with the -axis. Denoting gyrophase by and writing , we have
[TABLE]
A computer algebra system can evaluate all of these integrals analytically. We find
[TABLE]
where as in the main text. Recalling that we assumed was in the -direction, we can make these expressions general again with
[TABLE]
Here, again as in the main text, .
Appendix B Derivation of Time-step restrictions
As noted in the main text, the fact that our scheme features a drift that differs from the true drift velocity induces an anomalous drift that (a) should be kept small and (b) should average to zeros on time-scales of interest. Here, we derive the resulting restrictions on time-step size in the limits (i) and (ii) .
B.1. The case
As noted in the main text - see (38) - in the case , the expression for simplified considerably:
[TABLE]
Substituting this into (34) , we find an expression for :
[TABLE]
Recalling the relationship between and implied by (22) and subtracting the above from , we find the following expression for the anomalous velocity:
[TABLE]
At this point, it is useful to break into two pieces. We write , with
[TABLE]
Note that in the present limit in which gyration dominates the perpendicular velocity, each piece of has constant magnitude over time-scales short compared to variations in and . The first piece simply rotates by angle given in (11). In the second piece, the operator corresponds to a reflection about the axis. Elementary geometry can thus be used to show that the second piece rotates by angle at each time-step.
As already noted, motion whose velocity has constant magnitude with velocity rotating by fixed angle transcribes a circle of radius given in (15). Thus, the displacement induced by in this limit is a superposition of two circles of radius and , respectively. Elementary manipulation leads to formulae for these radii:
[TABLE]
where is the gyroradius and and are as defined in (48).
To guarantee that the total anomalous displacement never exceeds the gyroradius, it thus suffices to impose . This leads to the simultaneous time-step constraints
[TABLE]
Taking the minimum of these two restrictions in the limit gives the time-step restriction (ia) in Table 1.
We get the other restriction by analyzing the time required to traverse each circle and asking that it be less than the smallest time-scale of interest, denoted . The traversal time is simply the circumference of the circle - approximately - over the anomalous drift speed. For each of the two circles in question, we thus find traversal times
[TABLE]
Insisting that both these quantities be smaller than leads to
[TABLE]
In the limit , this reduces to the restriction (ib) in Table 1. We note that no time-step satisfies this constraint if . However, in this case there is no separation in time-scales between gyration and and we are forced to resolve the gyration scale at any rate.
B.2. The case
We note that this limit corresponds to . We thus keep only the terms proportional to in evaluating the anomalous drift velocity in this case. Using the general form of in (42), we find that to leading order
[TABLE]
Next, we note that
[TABLE]
where in the second approximation we’ve again assumed , and defines as the angle between and . This leads us to the conclusion
[TABLE]
to leading order in , where we’ve used in the second approximation.
Substituting this into (71), we have
[TABLE]
Note that rotates by at every time-step, and the angle changes by as well so long as changes little in a time-step. Thus, for - i.e. - approximately flips sign at every time-step. More generally, for near but not equal to , we my reasonably estimate that the anomalous displacement averages to zero over time-steps. As such, we may bound the maximum anomalous displacement by its value after time-steps, and insist that this value be less than . That is, we insist that . For large , Taylor expansion shows that . Taking the worst case scenario in which and is parallel to , and recalling the subtlety that the relevant in the definition of is while in it is , this constraint reduces to
[TABLE]
Again assuming gives the constraint (iia) in Table 1.
The constraint on the time-scale over which the anomalous displacement averages to zero is in this case simply . Again in the limit , this reduces to constraint (iib) in Table 1.
The reference list from the paper itself. Each links out to its DOI / PubMed record.
- 1[1] C.K. Birdsall and A.B. Langdon. Plasma physics via computer simulation . CRC press, 2004.
- 2[2] J.U. Brackbill and D.W. Forslund. Simulation of low-frequency, electromagnetic phenomena in plasmas. In Multiple time scales , pages 271–310. Elsevier, 1985.
- 3[3] John R. Cary. Hamiltonian theory of guiding-center motion. Reviews of Modern Physics , 81(2):693–738, 2009.
- 4[4] A.J. Cerfon and J.P. Freidberg. “one size fits all” analytic solutions to the Grad–Shafranov equation. Physics of Plasmas , 17(3):032502, 2010.
- 5[5] L. Chacón, G. Chen, and D.C. Barnes. A charge-and energy-conserving implicit, electrostatic particle-in-cell algorithm on mapped computational meshes. Journal of Computational Physics , 233:1–9, 2013.
- 6[6] C.-S. Chang, S. Ku, and H. Weitzner. Numerical study of neoclassical plasma pedestal in a tokamak geometry. Physics of Plasmas , 11(5):2649–2667, 2004.
- 7[7] G. Chen and L. Chacón. An energy-and charge-conserving, nonlinearly implicit, electromagnetic 1D-3V Vlasov–Darwin particle-in-cell algorithm. Computer Physics Communications , 185(10):2391–2402, 2014.
- 8[8] G. Chen and L. Chacón. A multi-dimensional, energy-and charge-conserving, nonlinearly implicit, electromagnetic Vlasov–Darwin particle-in-cell algorithm. Computer Physics Communications , 197:73–87, 2015.
