Abstract
Xiao and Qin (Comput Phys Commun 265:107981, 2021) recently proposed a remarkably simple modification of the Boris algorithm to compute the guiding centre of the highly oscillatory motion of a charged particle with step sizes that are much larger than the period of gyrorotations. They gave strong numerical evidence but no error analysis. This paper provides an analysis of the large-stepsize modified Boris method in a setting that has a strong non-uniform magnetic field and moderately bounded velocities, considered over a fixed finite time interval. The error analysis is based on comparing the modulated Fourier expansions of the exact and numerical solutions, for which the differential equations of the dominant terms are derived explicitly. Numerical experiments illustrate and complement the theoretical results.
Similar content being viewed by others
1 Introduction
Integrating the equations of motion of charged particles is a fundamental computational task in particle methods of plasma physics, e.g. [2]. The standard numerical integrator for these computations is the Boris algorithm [3], which has the charm of simplicity and remarkable conservation properties [8, 17]. In the practically important situation of a strong magnetic field and moderate velocities, which will be considered in this paper, the particle trajectories show fast gyrorotations of small radius around a guiding centre [15].
To approximate the guiding centre motion, one approach—not considered here—is to integrate numerically the known but structurally complicated differential equations for the approximate guiding centre by a suitable numerical method [6].
In a different and arguably more efficient approach, a Boris-type integrator with appropriate modifications is applied to the original equations of motion of the charged particle with large step sizes that do not resolve the high-frequency oscillations. As the standard Boris algorithm used with large step sizes is known to produce numerical solutions with unphysically large gyroradius [16, 18], modifications to it are necessary. In the case of a near-uniform strong magnetic field, it suffices to filter out the normal component of the initial velocity [10], but the mere modification of initial values is not sufficient in a strongly non-uniform magnetic field. Xiao and Qin [22] recently proposed to additionally modify the electric field in a non-obvious way when using the Boris algorithm with large step sizes and showed striking numerical results, but no error analysis was given. It was then found that a very similar numerical method, with the same extra force term, was already proposed by Vu and Brackbill [19] (Method III) in 1995, motivated by Parker and Birdsall [16] on the large-stepsize behaviour of the Boris method; see in particular formula (10) in [16], based on the equations of guiding-centre motion as given by Northrop [15], which are at the origin of the extra force term added to the schemes in [19] and [22]. A very interesting approach to understanding such methods in terms of slow manifolds was recently given by Burby and Klotz [5] and Burby and Hirvijoki [4], but these papers deal with the exact flow on and near the slow manifold and do not clarify the behaviour of the numerical method for large step sizes.
The objective of the present paper is to give a rigorous analysis of the modified Boris algorithm of Xiao and Qin [22] for approximating the guiding centre motion of a charged particle in a strong non-uniform magnetic field taking large time steps that cover many periods of gyrorotation.
In Sect. 2 we formulate the general setting of charged-particle motion in a strongly non-uniform strong magnetic field, describe the Boris algorithm and its modification, and state our main result, Theorem 2.1, which yields second-order error bounds for the position and velocity of the guiding centre when approximated with the modified Boris method with large step sizes whose square exceeds the inverse of the strength of the magnetic field. In Sect. 3 we present results of numerical experiments that illustrate and complement the theory. In Sect. 4 we give modulated Fourier expansions of both the exact and the numerical solution. Their comparison yields the proof of Theorem 2.1.
2 Large-stepsize modified Boris method and its error bound
2.1 Setting
The motion of a charged particle (of unit mass and charge) in a magnetic and electric field is governed by the differential equation
where \(x(t)\in {\mathbb {R}}^3\) is the position at time t, \(v(t)=\dot{x}(t)\) is the velocity, B is the magnetic field and E is the electric field. Here, \(B(x) = \nabla \times A(x)\) with a vector potential \(A(x)\in {\mathbb {R}}^3\) and \(E(x) = - \nabla \phi (x)\) with a scalar potential \(\phi (x)\in {\mathbb {R}}\), which we assume to be bounded from below. We are interested in the case of a strong magnetic field
where \(B_1\) and its first two derivatives are bounded independently of the small parameter \(\varepsilon \), and \(|B_1(x)|\ge 1\) for all x. The derivatives of E(x) are also assumed to be bounded independently of \(\varepsilon \). (Note that in contrast to, e.g., [10, 11], it is not assumed here that derivatives of the strong magnetic field B are bounded independently of \(\varepsilon \). Here, the derivatives of B are of size \(O(\varepsilon ^{-1})\) as is B itself.)
The motion (2.1) and its approximation are to be studied over time intervals \(t\in [0,T]\) with fixed T independent of \(\varepsilon \), for initial values \((x(0),\dot{x}(0))\) that are bounded independently of \(\varepsilon \): for some constants \(M_0,M_1\),
Under these conditions, it is known that the magnetic moment
which is of size \(O(\varepsilon )\) under our assumptions, is an adiabatic invariant [14, 15]: \(\mu (x(t),\dot{x}(t))\) is conserved up to \(O(\varepsilon ^2)\) over very long times \(t\le \varepsilon ^{-N}\) with arbitrary \(N>1\) [1, 9]. Here we consider (2.1) only over fixed times T that are independent of \(\varepsilon \).
2.2 Modified Boris method of Xiao and Qin [22]
The integrator for charge-particle dynamics (2.1) proposed in [22] is a remarkably simple but nontrivial modification of the Boris algorithm, with the objective to approximate the guiding centre of the particle motion with large step sizes \(h\gg \varepsilon \) without resolving the gyrorotations. In its two-step formulation the method computes the new position \(x^{n+1}\) as an approximation at time \(t_{n+1}=(n+1)h\) via
with the initial magnetic moment \(\mu ^0=\mu (x(0),\dot{x}(0))\) and the symmetric finite difference velocity approximation
This differs from the original Boris method only in the addition of the extra term \(- \mu ^0\, \nabla |B|(x^n)\), which also appears in the differential equations for the guiding centre; see [15] and, e.g., Theorem 4.1 below. Note that \(\mu ^0\, \nabla |B|(x)=O(1)\) under our assumptions, whereas it is \(O(\varepsilon )\) under the stronger assumption of maximal ordering in [10, 11] and could therefore be ignored in the numerical methods of those papers.
The modified Boris method starts from modified initial values
where \(P_\parallel (x^0)\) is the orthogonal projection onto the span of \(B(x^0)\). With \(P_\perp (x^0)=I-P_\parallel (x^0)\), we note that
i.e., the perpendicular component of the initial velocity has been filtered out.
Note that the modified Boris method (2.4) is not consistent with (2.1) as \(h\rightarrow 0\) and \(\varepsilon \) is fixed. It is identical to the standard Boris integrator for the modified force field
The actual implementation uses the common one-step formulation of the Boris algorithm [3].
2.3 Large-stepsize error bound
For the following theorem, which is the main result of this paper, we need a nondegeneracy condition:
This determines an upper bound \(C_*\) on the ratio \(h^2/\varepsilon \). We have the following large-stepsize error bound for the modified Boris method.
Theorem 2.1
Consider applying the modified Boris method to (2.1)–(2.3) with modified initial values (2.6) over a time interval \(0\le t\le T\) (with T independent of \(\varepsilon \)) using a step size h with \(h^2\sim \varepsilon \), i.e.,
for some positive constants \(c_*\) and \(C_*\). Under the nondegeneracy condition (2.7), the errors in position x and parallel velocity \(v_\parallel =P_\parallel (x) v\) (where \(P_\parallel (x)\) denotes the orthogonal projection onto the span of B(x)) at time \(t_n=nh\le T\) are bounded by
where C is independent of \(\varepsilon \), h and n with \(nh\le T\) (but depends on T, on bounds of derivatives of \(B_1\) and E, and on \(c_*\) and \(C_*\)).
Since x(t) and \(v_\parallel (t)\) are \(O(\varepsilon )\) close to the guiding centre at time t and its velocity, respectively, and since \(\varepsilon \sim h^2\) by assumption, Theorem 2.1 yields that the modified Boris method approximates the guiding centre motion with \(O(h^2)\) accuracy for step sizes h that are much larger than the gyroperiod \(2\pi /|B(x)| \sim \varepsilon \).
The proof of this theorem will be given in Sect. 4.
Remark 2.1
It is of interest to understand how the error bound changes when \(\varepsilon \ll h^2\) or \(h \gg \varepsilon \gg h^2\). An \(O(h^2)\) error bound still holds true for the less restrictive stepsize condition
for less strongly varying magnetic fields
This can still be obtained with essentially the same proof, but we will not work out the lengthy yet conceptually straightforward details.
In the situation of \(h^2 \le \varepsilon \ll h\) given by
an \(O(\varepsilon )\) error bound can be shown without an extra assumption on derivatives of B, again with essentially the same proof.
3 Numerical experiments
We show numerical results of the modified Boris method for two examples.
3.1 Tokamak example from [22]
We consider the motion of a charged particle in a tokamak geometry without electric field [22]. In Cartesian coordinates, the magnetic field is given as
Starting with the initial position \(x(0)=(1.05,0,0)^\top \) and the initial velocity \({\dot{x}}(0)=(2.1\times 10^{-3}, 4.3\times 10^{-4},0)^\top \), the orbit projected onto the \((R,x_3)\) plane is a banana orbit. The final time considered is \(T=3.75\times 10^4\). We note that upon rescaling time as \(t \rightarrow \varepsilon t\) with \(\varepsilon =10^{-3}\), the problem has the scaling of Sect. 2.1.
Figure 1 shows the trajectories computed by the standard Boris, standard Boris with projected initial velocity and the modified Boris algorithm. Two step sizes \(h=0.2\) and \(h=20\) are chosen. It is observed that when \(h=0.2\), the standard Boris shows the correct result while the gyroradius gets larger with larger step size. For \(h=20\) the numerical result is completely wrong. If we use standard Boris with \(v^0_\perp =0\), the gyroradius is always small, but the trajectory is not correct. A similar behaviour (not shown here) is observed also for the filtered methods of [10, 11], which were designed for a scaling (maximal ordering) where \(\mu \nabla |B|\) is \(O(\varepsilon )\) small. After adding the \(\mu ^0 \nabla |B|\) term, which is O(1) for the problem considered here, the modified Boris method shows correct results even for the large step size \(h=20\).
3.2 Order of accuracy
We test the numerical accuracy of modified Boris algorithm with large time step by applying the scheme to the example in [9]. We have the electric field
the magnetic field
and we take initial values
Figure 2 shows the absolute errors in x, \(v_\parallel \) and \(v_\perp \) at time \(t=1\) versus \(\varepsilon \) for various h. It is observed that the errors in x and \(v_\parallel \) tend to a constant error level proportional to \(h^2\), which is in accordance with our theoretical result in Theorem 2.1.
4 Modulated Fourier expansions and proof of Theorem 2.1
Theorem 2.1 will be proved by comparing the modulated Fourier expansions of the exact and numerical solutions. Modulated Fourier expansions have previously been used in the analysis of numerical methods for oscillatory differential equations, see [7, 12] and numerous further papers, and lately also for charged-particle dynamics in a strong magnetic field [9,10,11, 20, 21]. Incidentally, modulated Fourier expansions (though not under this name) were used for studying the gyration of charged particles by Kruskal [14] as early as 1958.
The analysis given here builds on that of [9] for the exact solution in the situation of a strong non-uniform magnetic field and on that of [10] for the Boris method with large step sizes in the situation of a mildly non-uniform strong magnetic field.
In this section we give the modulated Fourier expansions of the exact solution (Theorem 4.1) and of the numerical solution (Theorem 4.2), including explicit expressions for the differential equations of the dominant modulation functions. The analysis identifies the additional term in the modified Boris algorithm as the additional term appearing for the motion of the guiding centre in the modulated Fourier expansion that is missed by the standard Boris algorithm. This explains the excellent behaviour of the algorithm. The proof of Theorem 2.1 is then obtained by a comparison of Theorems 4.1 and 4.2.
4.1 Modulated Fourier expansion of the exact solution
We write the solution of (2.1) as
with piecewise smooth modulation functions \(z^k\) and phase function \(\varphi \) for which all time derivatives are bounded independently of \(\varepsilon \), except at the discontinuities of \(z^k\) and \(\dot{\varphi }\) at integral multiples \(t=n\varepsilon \) with jumps of size \(O(\varepsilon ^N)\), for an arbitrarily chosen integer \(N>1\). The phase satisfies \({\dot{\varphi }}(t)/\varepsilon =|B(z^0(t))|\) and \(z^0(t)\) is the guiding centre at time t (defined up to \(O(\varepsilon ^N)\)).
Following [9], we diagonalize the linear map \(v \mapsto v\times B(x)\), which has eigenvalues \(\lambda _1={\textrm{i}}|B(x)|\), \(\lambda _0=0\) and \(\lambda _{-1}=-{\textrm{i}}|B(x)|\). The corresponding normalized eigenvectors are denoted by \(\nu _1(x)\), \(\nu _0(x)\), and \(\nu _{-1}(x)\). We let \(P_j(x)=\nu _j(x)\nu _j(x)^*\) be the orthogonal projections onto the eigenspaces, where we note that \(P_\parallel (x)=P_0(x)\) and \(P_\perp (x)=I-P_\parallel (x)= P_1(x)+P_{-1}(x)\). We write the coefficient functions in the basis \(\nu _j(z^0(t))\),
whereas for \(k=0\) we decompose
where \(c^0(t)\) is a piecewise constant function with a finite number of jumps independent of \(\varepsilon \), chosen arbitrarily such that \(|x(t) - c^0(t)|\) remains distinctly smaller than the inverse of a bound of the derivative of \(P_0\) in a neighbourhood of the solution.
The following result is based on Theorem 4.1 of [9], where the existence of the modulated Fourier expansion of solutions of (2.1)–(2.2) was established together with bounds of the modulation functions and of the remainder term. However, the differential equations for the dominant modulation functions \(z^0_0\), \(z^0_{\pm 1}\) and \(z^{\pm 1}_{\pm 1}\) and their initial values were not stated explicitly. As these will be needed in the following and are also of independent interest, they are given here.
Theorem 4.1
Let x(t) be a solution of (2.1)–(2.2) with an initial velocity bounded independently of \(\varepsilon \) \((|\dot{x}(0)|\le M)\). For an arbitrary truncation index \(N\ge 1\) we then have an expansion
where the phase function satisfies \({\dot{\varphi }}(t)=|B_1(z^0(t))|\) (recall that \(B(x)=B_1(x)/\varepsilon \) with \(B_1\) independent of \(\varepsilon \)), and we fix \(\varphi (0)=0\).
-
(a)
The coefficient functions \(z^k(t)\) are piecewise continuous with jumps of size \(O(\varepsilon ^{N})\) at integral multiples of \(\varepsilon \) and are smooth elsewhere. Together with their derivatives (up to order N) they are bounded as
$$\begin{aligned} z^k=O(\varepsilon ^{|k|}) \quad \qquad \hbox { for all }\ |k|\le N-1 \end{aligned}$$and further satisfy \(z^k_j =O(\varepsilon ^2)\) for \( |k|=1, j\ne k\). Moreover, \(\dot{z}^0 \times B_1(z^0)=O(\varepsilon )\). The functions \(z^k\) are unique up to \(O(\varepsilon ^{N})\).
-
(b)
The remainder term and its derivative are bounded by
$$\begin{aligned} R_N(t)=O(\varepsilon ^{N}),\quad {\dot{R}}_N(t)=O(\varepsilon ^{N-1}), \qquad 0\le t \le T. \end{aligned}$$ -
(c)
On each time interval \(n\varepsilon \le t < (n+1)\varepsilon \le T\) (for integers \(n\ge 0\)), the functions \(z_0^{0}\), \(z_{\pm 1}^{0}\), \(z_1^{1}\), \(z_{-1}^{-1}\) satisfy the following differential equations. Here, all functions B, E, \(P_j\) are evaluated at the guiding centre \(z^0(t)\), and we write \(\dot{P}_j = ({\textrm{d}}/{\textrm{d}}t) P_j(z^0(t))=P_j'(z^0(t)) \dot{z}^0(t)\) and analogously \({\ddot{P}}_j\). Moreover, \(\mu ^0=\mu (x(0),\dot{x}(0)))\) is the magnetic moment. Omitting the ubiquitous argument t, we have
$$\begin{aligned} \ddot{z}^{0}_0&=2{\dot{P}}_0 {\dot{z}}^0+{\ddot{P}}_0 (z^0-c^0)+ P_0\left( E -\mu ^0\,\nabla |B |\right) +O(\varepsilon ),\\ {\dot{z}}^0_{\pm 1}&={\dot{P}}_{\pm 1} (z^0-c^0)\pm \frac{{\textrm{i}}}{|B |}\,{\dot{P}}_{\pm 1} {\dot{z}}^0\ \pm \frac{{\textrm{i}}}{|B |}\,P_{\pm 1} \left( E -\mu ^0\,\nabla |B |\right) +O(\varepsilon ^2),\\ {\dot{z}}^{\pm 1}_{\pm 1}&={\dot{P}}_{\pm 1} z^{\pm 1}_{\pm 1}-\frac{({\textrm{d}}/{\textrm{d}}t)|B |}{|B |}z^{\pm 1}_{\pm 1}\ \mp \frac{{\textrm{i}}}{|B |}\,P_{\pm 1}\left( {\dot{z}}^0\times B'(z^0) z^{\pm 1}_{\pm 1}\right) +O(\varepsilon ^2). \end{aligned}$$All other modulation functions \(z_j^{k}\) are given by algebraic expressions depending on \(z^{0}\), \({\dot{z}}_0^{0}\), \(z_1^{1}\), \(z_{-1}^{-1}\).
-
(d)
Initial values for the differential equations of item (c) are given by
$$\begin{aligned} \begin{aligned} z^{0}(0)=&\ x(0)+ \frac{{\dot{x}}(0)\times B(x(0))}{|B(x(0))|^2}+O(\varepsilon ^2),\\ {\dot{z}}_0^{0}(0)=&\ P_0{\dot{x}}(0) +{\dot{P}}_0(z^{0}(0)-c^0(0)) +O(\varepsilon ),\\ z_{\pm 1}^{\pm 1}(0)=&\ \frac{\mp {\mathrm i}}{|B|}\, P_{\pm 1}{\dot{x}}(0)+O(\varepsilon ^2), \end{aligned} \end{aligned}$$where \(B,B'\) and \(P_j\) are evaluated at the initial guiding centre \(z^0(0)\) (up to \(O(\varepsilon ^2)\)).
The constants symbolized by the O-notation are independent of \(\varepsilon \) and t with \(0\le t\le T\), but depend on N, on the velocity bound M, on bounds of derivatives of B and E in a neighbourhood of the trajectory \(\{ x(t):\, 0\le t \le T\}\), and on the final time T.
Remark 4.1
Since the energy \(H(x,v)=\tfrac{1}{2} |v|^2 + \phi (x)\) is conserved, it is bounded by \(\tfrac{1}{2} {\widetilde{M}}^2:= \tfrac{1}{2} M^2 + \phi (x(0))\) and we have \(\tfrac{1}{2} |\dot{x}(t)|^2 \le {\widetilde{M}}^2 - \phi (x(t))\). As we assumed that the scalar potential \(\phi \) is bounded from below, this gives an a priori bound on the velocity. Hence, the solution stays in a ball with centre x(0) and radius depending only on x(0) and \(\dot{x}(0)\) in a fixed time interval \(0\le t \le T\).
Remark 4.2
The differential equations for \(z^0_0\) and \(z^0_{\pm 1}\) are implicit, because the term \({\ddot{P}}(z^0)(z^0-c^0)\) contains \(\ddot{z}^0_0\). By our choice of \(c^0\), which ensures that \(|z^0-c^0|\) is sufficiently small, the equation can be solved for \(\ddot{z}^0_0\) to yield an explicit second-order differential equation. Similarly, the first-order differential equations for \(z^0_{\pm 1}\), which contain the time derivative in the term \({\dot{P}}_{\pm 1}(z^0)(z^0-c^0)\), can be solved for \(\dot{z}^0_{\pm 1}\) to yield explicit first-order differential equations. As was noted in [9], the modulation functions \(z^k\) are independent of the choice of \(c^0\).
Remark 4.3
From the second equation of (c), it is straightforward to get (with \(P_\perp =P_1+P_{-1}\) and \(P_\parallel =P_0\))
with \(B, \nabla |B|, P_\parallel ,P_\perp \) and E evaluated at the guiding centre \(z^0\), which shows several slow drifts for the guiding centre motion usually derived by averaging techniques in the physical literature.
Proof
It is sufficient to prove the theorem on time intervals of length \(\varepsilon \). At the end of an interval \([(n-1)\varepsilon ,n\varepsilon ]\), the construction of the modulated Fourier expansion is restarted from the exact solution values \(x(n\varepsilon ),\dot{x}(n\varepsilon )\), which in view of the uniqueness of the modulation functions up to \(O(\varepsilon ^N)\) stated in (a) and the bound of the remainder term stated in (b) leads to jump discontinuities of size \(O(\varepsilon ^N)\) in the modulation functions and the derivative of the phase function.
Statements (a) and (b) are given by Theorem 4.1 in [9]. Here, we just give the proof of (c) and (d).
(c): Inserting the modulated Fourier expansion into the differential equation (2.1) and comparing the coefficients of \({\textrm{e}}^{{\textrm{i}}k\varphi (t)/\varepsilon }\) yields
where the right-hand side \(F^k\) is obtained from a Taylor expansion of B and E at \(z^0\); see [9] for the general formula. For \(k=0\), we obtain the motion of the guiding centre \(z^0(t)\):
For \(k=\pm 1\), we have
We first study the case \(k=0\), i.e. (4.1). Here we begin by giving an alternative expression for the term I, which is an O(1) term. We show that
With the normalized eigenvectors \(\nu _j\), we have \(z_1^1=\zeta \nu _1\) and \(z_{-1}^{-1}={\overline{\zeta }} \nu _{-1}\) with \(\nu _{-1}=\overline{\nu }_1\). We define the local orthonormal basis \(e_1, e_2, e_3\) of \({\mathbb {R}}^3\) by the eigenvectors \(\nu _j\) as \(\nu _0= B/|B|=e_1\) and \(\nu _{\pm 1}=\frac{1}{\sqrt{2}}(e_2\pm {\textrm{i}}e_3)\). Using that \(z^k_j=O(\varepsilon ^2)\) for \(|k|=1\) and \(j\ne k\) by part (a), the term I can then be written as
Following equation (11) in [15], we find
On the other hand,
and thus
From the orthogonality of \(z_1^1\) and \(z_{-1}^{-1}\) it follows that
Inserting (4.5) and (4.6) into (4.4) gives
Using the adiabatic invariance [9, 15] \( \, \mu (x(t),\dot{x}(t)) = \mu ^0 + O(\varepsilon ^2), \) we obtain (4.3), and hence equation (4.1) can be equivalently written as
— Multiplying (4.7) with \(P_0(z^0)\) gives
Using the product rule
this gives the first equation in (c).
— Multiplying (4.7) with \(P_{\pm 1}(z^0)\) gives
Substituting \(P_{\pm 1}(z^0){\dot{z}}^0={\dot{z}}^0_{\pm 1}-{\dot{P}}_{\pm 1}(z^0)(z^0-c^0)\) yields
Denoting \(g_{\pm 1}={\dot{z}}^0_{\pm 1}-{\dot{P}}_{\pm 1}(z^0-c^0)\), we have \({\dot{g}}_{\pm 1}=\ddot{z}^0_{\pm 1}-{\ddot{P}}_{\pm 1}(z^0)(z^0-c^0)-{\dot{P}}_{\pm 1}(z^0){\dot{z}}^0\). The above equation can be expressed as
By differentiation and substitution, the first term on the right-hand side can be absorbed into the \(O(\varepsilon ^2)\) term, and so we get the second equation in (c).
Since the \(\varepsilon ^{-2}\)-terms cancel in (4.2) after projection with \(P_{\pm 1}(z^0)\), the \(\varepsilon ^{-1}\)-terms are dominant and we obtain the last equation in (c).
(d): The initial values can be obtained by the same arguments as in the proof of Theorem 4.1 in [11]. \(\square \)
4.2 Modulated Fourier expansion of the numerical solution
The modulated Fourier expansion can be extended to the numerical solution of the modified Boris algorithm similarly to Theorem 4.2 in [10]. There are, however, additional terms and difficulties to be considered, since here we do not have a magnetic field in a near-constant direction as in [10].
Theorem 4.2
Let \(x^n\) be the numerical solution obtained by applying the modified Boris algorithm to (2.1)–(2.3) with a stepsize h satisfying
for some positive constants \(c_*\) and \(C_*\). We assume that the component orthogonal to \(B(x^0)\) of the starting velocity, \(v^0_\perp =P_\perp (x^0) v^0= v^0 - P_0(x^0)v^0\), is chosen to be small:
We further make the nondegeneracy assumption (2.7). For an arbitrary truncation index \(N\ge 2\), we then have a decomposition
with the following properties:
-
(a)
The functions y(t) and z(t), \(0\le t \le T\), are piecewise continuous with jumps of size \(O(h^N)\) at integral multiples of h and are smooth elsewhere. Together with their derivatives (up to order N) they are bounded as \(y=O(1)\), \(z=O(h^2)\). They are unique up to \(O(h^{N})\). Moreover, \(P_\perp (y)\dot{y} = O(\varepsilon )\) and \(P_0(y)z=O(h^4)\).
-
(b)
The remainder term is bounded by
$$\begin{aligned} R_N(t)=O(h^N) \quad \text {for} \quad 0\le t\le T. \end{aligned}$$ -
(c)
We let \(c^0(t)\) be a piecewise constant function that is sufficiently close to y(t). The functions \(y_j=P_j(y) (y- c^0)\) \((j=0,\pm 1)\) and \(z_{\pm 1}=P_{\pm 1}z\) satisfy the following differential equations for \(0\le t \le T\) except at the jumps. Here, all functions B, E, \(P_j\) are evaluated at the numerical guiding centre y(t), and we write \(\dot{P}_j = ({\textrm{d}}/{\textrm{d}}t) P_j(y(t))=P_j'(y(t)) \dot{y}(t)\) and analogously \({\ddot{P}}_j\). Moreover, \(\mu ^0=\mu (x(0),\dot{x}(0)))\) is the magnetic moment. Omitting the ubiquitous argument t, we have
$$\begin{aligned} \ddot{y}_0&=2{\dot{P}}_0{\dot{y}}+{\ddot{P}}_0(y-c^0)+ P_0\left( E-\mu ^0\,\nabla |B|\right) +O(h^2)\\ {\dot{y}}_{\pm 1}&={\dot{P}}_{\pm 1}(y-c^0) \pm \frac{{\textrm{i}}}{|B|}{\dot{P}}_{\pm 1}{\dot{y}} \pm \frac{{\textrm{i}}}{|B|}P_{\pm 1}\left( E-\mu ^0\,\nabla |B|\right) +O(h^2)\\ {\dot{z}}_{\pm 1}&={\dot{P}}_{\pm 1}z\mp \frac{4{\textrm{i}}}{h^2|B|}z_{\pm 1}{\mp \,\frac{{\textrm{i}}}{|B|}P_{\pm 1}\left( {\dot{y}}\times B'(y)z\right) }+O(\varepsilon h^2). \end{aligned}$$The function \(z_0=P_0(y)(z-c_0)\) is given by an algebraic expression depending on y, \({\dot{y}}_0\) and \(z_{\pm 1}\).
-
(d)
Initial values for the differential equations of item (c) are given by
$$\begin{aligned} \begin{aligned} y(0)&= x^0+O(h^2),\\ {\dot{y}}_0(0)&=P_0(x^0) v^0 +O(h^2), \\ z_{\pm 1}(0)&= O(h^2). \end{aligned} \end{aligned}$$
The constants symbolized by the O-notation are independent of \(\varepsilon \), h and n with \(0\le nh \le T\), but depend on the velocity bound, on bounds of derivatives of B and E in a neighbourhood of the numerical trajectory, and on the final time T.
Remark 4.4
The essential observation is that for the modified Boris method, the differential equations for the numerical guiding centre y(t) are the same, up to a defect of size \(O(h^2)\), as the differential equations for the guiding centre \(z^0(t)\) of the exact solution, and also the initial values agree up to \(O(h^2)\). In contrast, for the standard Boris method with parallel-projected initial velocity, the terms \(\mu ^0\,\nabla |B|\) are missing. This is the reason for the failure of the standard Boris method with modified starting values for large step sizes \(h^2\ge \varepsilon \) in the situation of strongly non-uniform strong magnetic fields.
Proof
This theorem is proved similarly to Theorem 4.2 in [10] (which gives an analogous decomposition for the standard Boris method in the case of a near-constant strong magnetic field) combined with the treatment of the strongly nonuniform magnetic field in Theorem 4.1 in [9]. Here, we do not repeat the arguments in the proofs of those papers for (a) and (b) (such as the recursive elimination of higher time derivatives, an idea going back in time as far as the Euler–Maclaurin summation formula [13]) but concentrate on the parts (c) and (d) that are specific for the present situation.
Since a general strong magnetic field is considered, the time interval of validity of the modulated Fourier expansion is here O(h) instead of O(1), and so we need to patch together many such short-time expansions, starting anew from each \(x^n\), in the same way we did in Theorem 4.1 over intervals of length proportional to \(\varepsilon \).
Inserting the decomposition (4.10) into the numerical method (2.4) and separating the terms without and with the factor \((-1)^n\) gives
Since \(z=O(h^2)\) and \(\dot{z}=O(h^2)\), the second term on the right hand side of the first equation is
in our stepsize regime \(h^2\sim \varepsilon \).
Taking the projection \(P_0=P_0(y)\) on both sides of (4.11) yields the first equation in (c). Taking the projection \(P_{\pm 1}\) on both sides gives
As in Theorem 4.1 we thus have, with \(B=B(y)\),
Taking the projection \(P_{\pm 1}=P_{\pm 1}(y)\) on both sides of (4.12) yields
and so we find
We thus have the differential equations of part (c). Taking \(P_0\) on both sides of (4.12) and multiplying with \(-h^2/4\) yields
Since \(P_\perp \dot{y}=O(\varepsilon )\), we have \(P_0({\dot{y}}\times B'(y)z)= P_0(P_\perp {\dot{y}}\times B'(y)z)=O(z)\). This gives us \(z_0=O(h^4)\) provided that \(z_{\pm 1}=O(h^2)\).
(d) The numerical approximation to the velocity is given by
and so we have
which under the bounds of (a) yields \(v^n_{\perp }=O(h^2)\). We now consider this equation for \(n=0\). Since the above equation for \(P_{\pm 1}{\dot{z}}\) and the bound for \(z_0\) yield
the above equation for \(v^0_\perp \) yields
and with the nondegeneracy condition (2.7) we are now able to construct \(z_\perp (0)\) and hence \(z_{\pm 1}(0)\), which thanks to \(h^2\sim \varepsilon \) and \(v^0_\perp =O(\varepsilon )\) are indeed of size \(O(h^2)\). \(\square \)
4.3 Proof of Theorem 2.1
Theorem 4.1 represents the exact solution as
and Theorem 4.2 represents the numerical solution of the modified Boris method with \(h^2\sim \varepsilon \) as
where the guiding centre \(z^0(t)\) and the numerical guiding centre \(y(t_n)\) satisfy the same differential equations up to \(O(h^2)\) with the same initial values up to \(O(h^2)\), and the jumps of size \(O(\varepsilon ^N)\) or \(O(h^N)\) for arbitrary N contribute less than \(O(h^2)\) to the difference. (The piecewise constant function \(c^0(t)\) can be chosen the same in both cases.) Therefore, \(z^0(t)\) and y(t) differ by \(O(h^2)\) on a fixed time interval \(0\le t \le T\). This proves the \(O(h^2)\) error bound for the positions in Theorem 2.1.
We now turn to the error bound for the velocity. We compare the velocity of the exact solution
and the numerical velocity
Since \(P_\parallel (z^0)z^{\pm 1}_{\pm 1}=0\) and \(P_\parallel (y)z=z_0=O(h^4)\), and since we already know that \(z^0(t)-y(t)=O(h^2)\) and \(z^0(t)-x(t)=O(\varepsilon )\) and \(y(t_n)-x^n=O(h^2)\), it follows that
Finally, the bound \(v^n_\perp =O(h^2)\) was already shown in part (d) of the proof of Theorem 4.2. This completes the proof of Theorem 2.1.
References
Benettin, G., Sempio, P.: Adiabatic invariants and trapping of a point charge in a strong nonuniform magnetic field. Nonlinearity 7(1), 281 (1994)
Birdsall, C.K., Langdon, A.B.: Plasma Physics via Computer Simulation. Taylor and Francis Group, New York (2005)
Boris, J.P.: Relativistic plasma simulation-optimization of a hybrid code. In: Proceeding of Fourth Conference on Numerical Simulations of Plasmas, pp. 3–67 (1970)
Burby, J.W., Hirvijoki, E.: Normal stability of slow manifolds in nearly periodic Hamiltonian systems. J. Math. Phys. 62(9), 093506 (2021)
Burby, J.W., Klotz, T.J.: Slow manifold reduction for plasma science. Commun. Nonlinear Sci. Numer. Simul. 89, 105289 (2020)
Ellison, C.L., Finn, J.M., Burby, J.W., Kraus, M., Qin, H., Tang, W.M.: Degenerate variational integrators for magnetic field line flow and guiding center trajectories. Phys. Plasmas 25(5), 052502 (2018)
Hairer, E., Lubich, C.: Long-time energy conservation of numerical methods for oscillatory differential equations. SIAM J. Numer. Anal. 38, 414–441 (2000)
Hairer, E., Lubich, C.: Energy behaviour of the Boris method for charged-particle dynamics. BIT Numer. Math. 58, 969–979 (2018)
Hairer, E., Lubich, C.: Long-term analysis of a variational integrator for charged-particle dynamics in a strong magnetic field. Numer. Math. 144(3), 699–728 (2020)
Hairer, E., Lubich, C., Shi, Y.: Large-stepsize integrators for charged-particle dynamics over multiple time scales. Numer. Math. 151, 659–691 (2022)
Hairer, E., Lubich, C., Wang, B.: A filtered Boris algorithm for charged-particle dynamics in a strong magnetic field. Numer. Math. 144(4), 787–809 (2020)
Hairer, E., Lubich, C., Wanner, G.: Geometric Numerical Integration. Structure-Preserving Algorithms for Ordinary Differential Equations. Springer Series in Computational Mathematics 31, 2nd edn. Springer-Verlag, Berlin (2006)
Hairer, E., Wanner, G.: Analysis by Its History. Undergraduate Texts in Mathematics. 2nd printing edition. Springer-Verlag, New York (1997)
Kruskal, M.: The gyration of a charged particle. Rept. PM-S-33 (NYO-7903), Princeton University, Project Matterhorn (1958)
Northrop, T.G.: The adiabatic motion of charged particles. Interscience Tracts on Physics and Astronomy, vol. 21. Interscience Publishers John Wiley & Sons, New York–London–Sydney (1963)
Parker, S.E., Birdsall, C.K.: Numerical error in electron orbits with large \(\omega _{\rm ce }{\varDelta } t\). J. Comput. Phys. 97(1), 91–102 (1991)
Qin, H., Zhang, S., Xiao, J., Liu, J., Sun, Y., Tang, W.M.: Why is Boris algorithm so good? Phys. Plasmas 20(8), 084503 (2013)
Ricketson, L.F., Chacón, L.: An energy-conserving and asymptotic-preserving charged-particle orbit implicit time integrator for arbitrary electromagnetic fields. J. Comput. Phys. 418, 109639 (2020)
Vu, H.X., Brackbill, J.U.: Accurate numerical solution of charged particle motion in a magnetic field. J. Comput. Phys. 116(2), 384–387 (1995)
Wang, B.: Exponential energy-preserving methods for charged-particle dynamics in a strong and constant magnetic field. J. Comput. Appl. Math. 387, 112617 (2021)
Wang, B., Zhao, X.: Error estimates of some splitting schemes for charged-particle dynamics under strong magnetic field. SIAM J. Numer. Anal. 59(4), 2075–2105 (2021)
Xiao, J., Qin, H.: Slow manifolds of classical Pauli particle enable structure-preserving geometric algorithms for guiding center dynamics. Comput. Phys. Commun. 265, 107981 (2021)
Acknowledgements
We thank Michael Kraus for making us aware of Xiao and Qin’s modified Boris integrator in [22] and the slow manifold approach in [4]. This work was supported by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation)—Project-ID258734477—SFB 1173 and the Sino-German (CSC-DAAD) Postdoc Scholarship, Program No. 57575640.
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Corresponding author
Ethics declarations
Conflict of interest
The authors declare that they have no conflict of interest.
Additional information
Communicated by Gunilla Kreiss.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Lubich, C., Shi, Y. On a large-stepsize integrator for charged-particle dynamics. Bit Numer Math 63, 14 (2023). https://doi.org/10.1007/s10543-023-00951-5
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10543-023-00951-5
Keywords
- Charged particle
- Strong non-uniform magnetic field
- Guiding centre
- Modified Boris integrator
- Modulated Fourier expansion