Abstract
A modification of the standard Boris algorithm, called filtered Boris algorithm, is proposed for the numerical integration of the equations of motion of charged particles in a strong non-uniform magnetic field in the asymptotic scaling known as maximal ordering. With an appropriate choice of filters, second-order error bounds in the position and in the parallel velocity, and first-order error bounds in the normal velocity are obtained with respect to the scaling parameter. This also yields a second-order approximation to the guiding center motion. The proof compares the modulated Fourier expansions of the exact and the numerical solutions. Numerical experiments illustrate the error behaviour of the filtered Boris algorithm.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
In this paper we propose and analyse a numerical integrator for the equations of motion of a charged particle in a strong inhomogeneous magnetic field,
This scaling is of interest in particle methods in plasma physics and is called maximal ordering in [2]; see also [12] for a careful discussion of scalings and a rigorous analysis of this model. It is assumed that \({|B_0(0)|\ge 1}\), that \(B_0\), \(B_1\) and E are smooth functions that are bounded independently of \(\varepsilon \) on bounded domains together with all their derivatives, and that the initial data \(x(0)=x^0\), \(\dot{x}(0)=v^0\) are bounded independently of \(\varepsilon \).
In (1.1), \(x(t)\in {\mathbf{R}}^3\) represents the position at time t of a charged particle (of unit mass and charge) that moves in the magnetic field B and the electric field E. The motion is composed of fast rotation around a guiding center (with the Larmor radius proportional to \(\varepsilon \)) and slow motion of the guiding center.
The standard integrator for charged particles in a magnetic field is the Boris algorithm [1] (see also, e.g., [6]), which in the two-step formulation with step size h is given by
with the velocity approximation \(v^n = \frac{1}{2h}\bigl ( x^{n+1} - x^{n-1}\bigr ) \) at time \(t^n=nh\). This algorithm does, however, not behave well for (1.1) with small \(\varepsilon \). Here we propose a modification, which we name filtered Boris algorithm. This modified integrator allows us to obtain better accuracy with considerably larger time steps, at minor additional computational cost. It is still a symmetric algorithm. We formulate and discuss this new algorithm in Sect. 2. It comes in different variants that depend on the choice of a suitable filter function and of the positions where the magnetic field is evaluated, and we identify favourable choices.
A different approach to numerical integrators for charged particles in a strong magnetic field is taken in [3], where damping linearly implicit integrators are studied. For step sizes \(h\ge \varepsilon \), those integrators quickly reduce that part of the kinetic energy that comes from the velocity component perpendicular to the magnetic field. As is shown in [3], the numerical solution then approximates a numerical solution of an asymptotic model for guiding-center motion. In contrast, the original Boris method and the filtered Boris method proposed here do not dampen the high oscillations, and the filtered method is shown to give approximations of second-order accuracy to both the actual position and the actual guiding center over an \({\mathcal O}(1)\) time scale for stepsizes \(h\sim \varepsilon \).
In Sect. 3 we state the main theoretical result, Theorem 3.1, which gives an error bound for the filtered Boris method that behaves favourably with respect to \(\varepsilon \). While most filters only yield a first-order error bound in the positions, for a particular, non-trivial choice of the filter a second-order error bound is obtained. A second-order error bound is also obtained for the component of the velocity that is parallel to the magnetic field. For the normal velocity approximation, there is still a first-order error bound for any filter. The proof of Theorem 3.1 is based on comparing the modulated Fourier expansions of the exact and the numerical solutions, which are derived in Sects. 4 and 5, respectively. Combining those results, the proof of Theorem 3.1 is finally completed in Sect. 6.
We remark that the differential equations for the coefficient functions of the modulated Fourier expansions derived explicitly up to \({\mathcal O}(\varepsilon ^2)\) in Sect. 4 also yield the motion of the guiding center up to \({\mathcal O}(\varepsilon ^2)\). They coincide up to \({\mathcal O}(\varepsilon ^2)\) with the guiding center equations of the numerical approximation given by the filtered Boris integrator for an appropriate filter and for non-resonant step sizes \(h\le C\varepsilon \) with a possibly large constant C. This does not hold true for the standard Boris integrator.
In Sect. 7 we describe a related, but different integrator, called two-point filtered Boris algorithm, which evaluates the magnetic field both in the current position and in the current guiding center approximation in each step, and which has similar convergence properties to the previously considered filtered Boris method.
In Sect. 8 we present the results of numerical experiments in which we compare the standard and filtered Boris algorithms.
In the Appendix we show how the filters are evaluated efficiently using a Rodriguez-type formula.
2 Filtered Boris algorithm
Using the velocity approximation at the mid-point,
the Boris algorithm (1.2) is usually written and implemented as a one-step method \((x^n,v^{n-1/2}) \mapsto (x^{n+1},v^{n+1/2})\),
To capture the high oscillations in the velocity more accurately, the second line of (2.1) needs to be modified, and one should rather work with averaged velocities \( v^{n+1/2} \approx \tfrac{1}{h}\int _{t^n}^{t^{n+1}} v(t)\, {\mathrm d}t\) and possibly averaged positions. This can be achieved with the help of filter functions like in [4, 9] and [8, Section XIII.2].
For a vector \(B=(b_1,b_2,b_3)^\top \in {\mathbf{R}}^3\) we denote by |B| the Euclidean norm of B and we use the common notation
For real-analytic functions \(\Psi (\zeta )\) [such as \(\exp (\zeta )\)] we will form matrix functions \(\Psi (-h\widehat{B})\), which are efficiently computed by a Rodriguez-type formula as described in the Appendix.
We denote by
with \(B^n=B(x^n,t^n)\) the guiding center approximation at time \(t^n\) (cf. [11]). For the argument of B in the algorithm we choose a point on the straight line connecting \(x^n\) and \(x^n_\odot \):
with \(\theta ^n=\theta (h |B^n|)\) for a real function \(\theta \). It turns out that there is a unique choice of \(\theta \) such that a second-order error bound will be obtained:
where \({{\,\mathrm{sinc}\,}}(\xi )=\sin (\xi )/\xi \). We note that with the scaling (1.1), we have \(\bar{x}^n = x^n +{\mathcal O}(\varepsilon )\), provided that \(h|B^n|\) is bounded away from non-zero integral multiples of \(2\pi \).
We consider the following modification of the Boris algorithm.
Algorithm 2.1
(Filtered Boris algorithm) Given \((x^n , v^{n-1/2})\), the algorithm computes \((x^{n+1} , v^{n+1/2})\) as follows, with \(B^n=B(x^n,t^n)\), \(\bar{B}^n=B(\bar{x}^n,t^n)\) with \(\bar{x}^n\) defined by (2.4), and \(E^n=E(x^n,t^n)\):
where \(\,\Psi (\zeta )=\mathrm {tanch}(\zeta /2)\,\) with \(\,\mathrm {tanch}(\zeta )=\tanh (\zeta )/\zeta \).
The velocity approximation \(v^n\) is computed as
where \(~\displaystyle \Phi _1 (\zeta ) = \frac{1}{{{\,\mathrm{sinch}\,}}(\zeta )}~\) with \(~\displaystyle {{\,\mathrm{sinch}\,}}(\zeta ) = \frac{ \sinh (\zeta )}{\zeta }\), and \(~\displaystyle \Upsilon (\zeta ) =\frac{ \Phi _1 (\zeta ) -1 }{\zeta } \). The starting approximation \(v^{1/2}\) is computed from (2.10) below with \(n=0\).
Theorem 3.1 below shows that the choice of filter functions made in Algorithm 2.1 and (2.5) is the unique choice that gives a second-order error bound.
For the choice \(\theta ^n = 1\), the algorithm is explicit and requires only matrix-vector multiplications that can be done efficiently with a Rodriguez-type formula (see the Appendix).
For \(\theta ^n = \theta (h|B^n|)\) with \(\theta (\zeta ) \) from (2.5), the algorithm is implicit, because \(\bar{x}^n\) then depends on \(v^n\) and appears in the argument of \(\bar{B}^n\) in the second line. This can be solved by a rapidly convergent fixed-point iteration for \(\bar{x}^n\):
We start the iteration with \(\bar{x}^n = x^n\), then compute \(v_-^{n+1/2}\) from (2.6) and \(v^n\) from (2.7) using
This then yields \(x^n_\odot \) from (2.3) and the new \(\bar{x}^n\) from (2.4). We note that all matrix-vector multiplications can be done with a Rodriguez-type formula.
It is readily checked that this iteration map has a Lipschitz constant of size \({\mathcal O}(\varepsilon ^2)\) under the scaling (1.1) and for stepsizes \(h={\mathcal O}(\varepsilon )\). Since the deviation from the solution of the implicit method is therefore reduced by a factor \({\mathcal O}(\varepsilon ^2)\) in each iteration, making just one iteration is sufficient to get the improved second-order accuracy of the implicit method.
We mention that Algorithm 2.1 preserves volume in phase space exactly in the case of constant B (and time-dependent B(t)), but only approximately up to \({\mathcal O}(h\varepsilon )\) in the general case of an inhomogeneous magnetic field (1.1). For the original Boris method it is, however, known from [13] that the map \((x_n,v_{n-1/2})\mapsto (x_{n+1},v_{n+1/2})\) is volume-preserving for general magnetic fields.
6pt
Two-step formulation The filtered Boris algorithm has the symmetric two-step formulation
as is readily obtained by taking two consecutive steps and using (2.8). This formulation is the basis of our theoretical analysis. 6pt
Starting value The starting value \(v^{1/2}\) is chosen such that formulas (2.6)–(2.7) also hold for \(n=0\). We find, for arbitrary n, that
where \(\varphi _1(\zeta )=(e^\zeta -1)/\zeta \). Note that, for given \(x^0\) and \(v^0\), the vectors \(x^n_\odot \) and \(\bar{x}^n\) are known, so that (2.7) provides an explicit formula for \(v^{1/2}\). 6pt
One-step map\({(x^n,v^n)\mapsto (x^{n+1},v^{n+1})}\) Using the last formula of (2.6) together with (2.10) for relating \(x^{n+1}\) and \(x^n\), and (2.10) with n and \(+\) and with \(n+1\) and − for relating \(v^{n+1}\) and \(v^n\), the filtered Boris algorithm can be written as
where \(\Phi ^n_\pm = \varphi _1(\mp h\widehat{\bar{B}^n})\) and \(\Psi ^n_\pm = \Psi (h\widehat{B^n} )\pm 2\Phi ^n_\pm \Upsilon (h\widehat{B^n})\).
The method is symmetric in the sense that exchanging \(n\leftrightarrow n+1\) and \(h\leftrightarrow -h\) gives the same formulas.
6pt
The integrator in the case of a constant magnetic field For constant B, we note that \((\Phi ^{n+1}_-)^{-1} \Phi ^{n}_+ = \exp (-h\widehat{B})\), and so (2.11) reduces to the exponential integrator (with the notation \(\Psi _\pm (\zeta )=\Psi (\zeta ) \mp 2\varphi _1(\pm \zeta )\Upsilon (\zeta )\))
with \(\Psi _0(\zeta )=\Psi _+(\zeta )/\varphi _1(-\zeta )\) and \(\Psi _1(\zeta )=\Psi _-(\zeta )/\varphi _1(-\zeta )\). The method is exact for a constant magnetic field B and vanishing electric field E, because
Since we have chosen \(\Psi (\zeta ) =\mathrm {tanch}(\zeta /2)\), the method is also exact for constant B and E. This is seen as follows: For constant B, the variation-of-constants formula for the system \(\dot{x}=v, \ \ \dot{v}= x \times B + E(x)\) reads, in view of (2.13),
For constant E, this becomes (2.12), which yields \(\Psi _\pm (\zeta )=\varphi _2(\pm \zeta )\), where \(\varphi _2(\zeta )=(e^\zeta -1 - \zeta )/(\zeta ^2/2) = \int _0^1 (1- s ) \,\varphi _1((1- s )\zeta ) {\mathrm d}s \).
3 Statement of the main result
Our main theoretical result in this paper is the following error bound for the filtered Boris algorithm. Here we denote, for the exact velocity \(v(t)=\dot{x}(t)\),
and similarly for the numerical velocity \(v^n\),
We then have the following result.
Theorem 3.1
We assume the following, with arbitrarily chosen positive constants c, C, M and T:
- 1.
The initial velocity satisfies an \(\varepsilon \)-independent bound
$$\begin{aligned} |v^0| \le M. \end{aligned}$$(3.1) - 2.
The exact solution x(t) of (1.1) stays in a bounded set K (independent of \(\varepsilon \)) for \(0\le t \le T\).
- 3.
The step size satisfies \(h \le C \varepsilon \) and is such that the following non-resonance condition is satisfied:
$$\begin{aligned} \big |{{\,\mathrm{sinc}\,}}\bigl (\tfrac{1}{2} kh |B(x(t),t)|\bigr )\big | \ge c >0 \quad \text {for } k=1,2,3. \end{aligned}$$(3.2)
If in the filtered Boris algorithm,
\(\bar{x}^n\) is given by (2.4) with the function \(\theta \) of (2.5), and
the filter functions \(\Psi \) and \(\Upsilon \) are defined as in Algorithm 2.1,
then the errors in the positions and the velocities are bounded by
For a different choice of the functions \(\theta \), \(\Psi \) and \(\Upsilon \), the error bounds are not better than \({\mathcal O}(\varepsilon )\) for general problems (1.1). The constants in the \({\mathcal O}\)-notation are independent of \(\varepsilon \) and h and n with \(0\le t^n=nh\le T\), but depend on T, on the velocity bound M and the constants c and C, and on bounds of derivatives of \(B_0\), \(B_1\) and E in a neighbourhood of the set K.
We remark that in view of the error bounds, the non-resonance condition might be required along the numerical solution \(x^n\) instead of the exact solution x(t) as in (3.2).
The proof of this theorem will compare the modulated Fourier expansion of the exact solution (as given in Sect. 4) with that of the numerical approximation (as given in Sect. 5). It will be given in Sect. 6.
Remark 3.1
The proof also shows that the choice \(\bar{x}^n = x^n\) is sufficient for order 2 if the magnetic field satisfies, for all \(z\in {\mathbf{C}}^3\) and \(x\in K\) and all times t,
Remark 3.2
As a consequence of Theorem 3.1, the approximate guiding center \(x^n_\odot \) of the numerical solution, given by (2.3), is an \({\mathcal O}(\varepsilon ^2)\) approximation to
which is an \({\mathcal O}(\varepsilon ^2)\) approximation to the guiding center of the trajectory x(t) (by Theorem 4.1 below; cf. [11]).
4 Modulated Fourier expansion of the exact solution
We write the solution of (1.1) as a modulated Fourier expansion
with coefficient functions \(z^k(t)\) for which all time derivatives are bounded independently of \(\varepsilon \), where \(\dot{\phi }(t) /\varepsilon = \big | B\bigl (z^0(t),t\bigr )\big |\), and \(z^0(t)\) describes the motion of the guiding center. Such a formal expansion has first been considered in [10] for proving the existence of an adiabatic invariant (essentially the magnetic moment \(\tfrac{1}{2}|\dot{x} \times B(x)|^2/|B(x)|^3\)). It has been used for a rigorous proof of the long-time near-conservation of the magnetic moment in [7], where this approach was extended to the numerical solution of a variational integrator, for which near-conservation of the magnetic moment and of the energy is rigorously proved over long times that cover arbitrary negative powers of \(\varepsilon \).
Following [7], we diagonalize the linear map \(v\mapsto v\times B(x,t)\), which has eigenvalues \(\lambda _1 = \mathrm {i}|B(x,t)|\), \(\lambda _0 =0\), and \(\lambda _{-1}=-\mathrm {i}|B(x,t)|\). We denote the normalized eigenvectors by \(v_1(x,t), v_0(x,t),v_{-1}(x,t)\), and remark that \(v_0(x,t)\) is collinear to B(x, t). We let \(P_j(x,t)=v_j(x,t)v_j(x,t)^*\) be the orthogonal projections onto the eigenspaces. Furthermore, we write the coefficient functions of (4.1) in the time-dependent basis \(v_j\bigl (z^0(t),t\bigr )\),
Since x(t) is real, we assume \(z^{-k} = \overline{z^k}\) for all k. Together with the fact that \(v_{-1}(x,t) = \overline{v_1(x,t)}\) and \(v_0(x,t)\) is real, it follows
The following result is a variant of Theorem 4.1 in [7], adapted to the present case of a strong magnetic field of the form (1.1). Note that B in this paper corresponds to \(B/\varepsilon \) in [7].
Theorem 4.1
Let x(t) be a solution of (1.1) with bounded initial velocity (3.1) that stays in a compact set K for \(0\le t \le T\). For an arbitrary truncation index \(N\ge 1\) we then have
where the phase function satisfies \(\dot{\phi }(t) = \varepsilon | B (z^0(t),t ) |={\mathcal O}(1)\).
- (a)
The coefficient functions \(z^k(t)\) together with their derivatives (up to order N) are bounded as \(z_j^0 = {\mathcal O}(1)\) for \(j\in \{-1,0,1\}\), \(z_1^1 = {\mathcal O}(\varepsilon )\), \(z_{-1}^{-1} = {\mathcal O}(\varepsilon )\), \(z_j^k = {\mathcal O}(\varepsilon ^3)\) for \(|k|=1\), \(j\ne k\), and for the remaining (j, k) with \( |k| \le N\),
$$\begin{aligned} z_j^k = {\mathcal O}(\varepsilon ^{|k|+1}). \end{aligned}$$(4.5)They are unique up to \({\mathcal O}(\varepsilon ^{N+2})\). Moreover, we have \(\dot{z}^0 \times B(z^0,t) = {\mathcal O}(1)\).
- (b)
The remainder term and its derivative are bounded by
$$\begin{aligned} R_N(t) = {\mathcal O}(t^2 \varepsilon ^N), \quad \dot{R}_N(t) = {\mathcal O}(t \varepsilon ^N) \quad \hbox {for}\quad 0\le t\le T. \end{aligned}$$(4.6) - (c)
The functions \(z_0^0, z_{\pm 1}^0, z_1^1,z_{-1}^{-1}\) satisfy the differential equations
$$\begin{aligned} \ddot{z}_0^0= & {} P_0(z^0,t) E(z^0,t) + 2\, P_0(z^0,t) \, {\mathrm {Re}\,} \Bigl ( \mathrm {i}\frac{\dot{\phi }}{\varepsilon }z_1^1 \times B'(z^0,t)z_{-1}^{-1}\Bigr )\nonumber \\&+ 2\, \dot{P}_0(z^0,t) \dot{z}^0 + \ddot{P}_0(z^0,t) z^0 + {\mathcal O}(\varepsilon ^2 ) , \end{aligned}$$(4.7)$$\begin{aligned} \dot{z}_{\pm 1}^0= & {} \dot{P}_{\pm 1}(z^0,t) z^0 \pm \mathrm {i}\frac{\varepsilon }{\dot{\phi }} P_{\pm 1}(z^0,t) E(z^0,t) + {\mathcal O}(\varepsilon ^2), \end{aligned}$$(4.8)$$\begin{aligned} \dot{z}_{\pm 1}^{\pm 1}= & {} - \frac{\ddot{\phi }}{\dot{\phi }}z_{\pm 1}^{\pm 1} + {\mathcal O}(\varepsilon ^2)={\mathcal O}(\varepsilon ^2), \end{aligned}$$(4.9)where we use the notation \(\dot{P}_j(z^0,t) = \frac{{\mathrm d}}{{\mathrm d}t} P_j\bigl (z^0(t),t\bigr )\) and similar for \(\ddot{P}_j(z^0,t)\). All other coefficient functions \(z_j^k\) are given by algebraic expressions depending on \(z^0, \dot{z}_0^0,z_1^1,z_{-1}^{-1}\).
- (d)
Assuming \(\phi (0)=0\), initial values for the differential equations of item (c) are given by
$$\begin{aligned} z^0(0)&= x(0) + \frac{\dot{x}(0) \times B(x(0),0)}{|B(x(0),0)|^2} + {\mathcal O}(\varepsilon ^2), \\ \dot{z}_0^0(0)&= P_0(x(0),0) \dot{x}(0)+ \dot{P}_0(x(0),0) x(0)+ {\mathcal O}(\varepsilon ^2 ) , \\ z_{\pm 1}^{\pm 1} (0)&= \mp \,\mathrm {i}\frac{\varepsilon }{\dot{\phi }(0)}P_{\pm 1}(x(0),0)\dot{x}(0) + {\mathcal O}(\varepsilon ^2). \end{aligned}$$The constants symbolised by the \({\mathcal O}\)-notation are independent of \(\varepsilon \) and t with \(0\le t \le T\), but they depend on N, on the velocity bound M in (3.1), on bounds of derivatives of B and E, and on T.
Remark 4.1
We note that the guiding center motion of the system (1.1) is given by the non-oscillating term \(z^0(t)\) in the modulated Fourier expansion. By the uniqueness of the modulated Fourier expansion up to high powers of \(\varepsilon \), the equations in item (d) hold not only at time 0, but for all \(t\le T\).
Proof
(a) and (b) Compared to Theorem 4.1 in [7], where a more general strong magnetic field is considered, the time interval of validity of the modulated Fourier expansion is here \({\mathcal O}(1)\) instead of just \({\mathcal O}(\varepsilon )\), and the bound (4.5) is improved by a factor \(\varepsilon \). The improvement of the time scale comes about by observing that a function \( x_*(t)\) that solves (1.1) up to a defect d(t), i.e.,
satisfies an error bound, for \(0\le t \le T\),
where C is independent of \(\varepsilon \) but grows exponentially with T. This is proved by decomposing \(B(x,t)= \varepsilon ^{-1} B_0(0) + \varepsilon ^{-1}(B_0(\varepsilon x)-B_0(0)) + B_1(x,t)\) and using the variation-of-constants formula and the Gronwall inequality. The improvement of the bound (4.5) is a consequence of the fact that the derivatives of B(x, t) are bounded independently of \(\varepsilon \).
(c) For the error bound of Sect. 6 we need precise formulas for the dominant terms of (4.4). Inserting the expansion (4.1) into the differential Eq. (1.1) and comparing the coefficients of \({\mathrm e}^{\mathrm {i}k \phi (t)/\varepsilon }\) yields
where, using Taylor series expansion for the nonlinearities,
Here, \(B^{(m)}(x,t)\) and \(E^{(m)}(x,t)\) denote the mth derivative with respect to x, \(\alpha =(\alpha _1,\ldots ,\alpha _m)\) is a multi-index with \(\alpha _j \in {\mathbf{Z}}{\setminus }\{0\}\), \(s(\alpha ) = \alpha _1 + \cdots + \alpha _m\), \(|\alpha | = |\alpha _1| + \cdots + |\alpha _m|\), and \({\mathbf{z}}^\alpha = (z^{\alpha _1}, \ldots , z^{\alpha _m})\).
From (4.10) it follows that the motion of the guiding center \(z^0(t)\) is given by
The solution \(z^0(t)\) is influenced by the functions \(z^{\pm 1}\) which, by (4.10), satisfy
Note that, whereas \(B(z^0,t)\) is of size \({\mathcal O}(\varepsilon ^{-1})\), its derivatives are bounded independently of \(\varepsilon \) due to the special form (1.1).
To get solutions with derivatives bounded uniformly in \(\varepsilon \), one has to extract the dominant terms. Multiplying (4.11) with \(P_0(z^0,t)\) eliminates the \(\varepsilon ^{-1}\)-term that is present in \(B(z^0,t)\), and the second derivative \(\ddot{z}_0^0\) becomes dominant. Differentiating the relation \(z_0^0 = P_0(z^0,t) z^0\) with respect to time yields \(\ddot{z}_0^0 = P_0(z^0,t) \ddot{z}^0 + 2\dot{P}_0(z^0,t) \dot{z}^0 + \ddot{P}_0(z^0,t) z^0\). This then gives (4.7). Note that, due to the special form of B(x, t), the time derivatives of \(P_j(z^0,t)\) are of size \({\mathcal O}(\varepsilon )\).
A multiplication of (4.11) with \(P_{\pm 1}(z^0,t)\) gives
Substituting \(P_{\pm 1}(z^0,t) \dot{z}^0 = \dot{z}_{\pm 1}^0 - \dot{P}_{\pm 1}(z^0,t) z^0 \), and extracting \(\dot{z}_{\pm 1}^0\) yields (4.8). Note that \(\dot{z}_{\pm 1}^0 ={\mathcal O}(\varepsilon )\), so that also \(\ddot{z}_{\pm 1}^0 ={\mathcal O}(\varepsilon )\), and \( P_{\pm 1}(z^0,t) \ddot{z}^0 = {\mathcal O}(\varepsilon )\).
Since \(\dot{\phi }/ \varepsilon = | B(z^0,t)|\), the \(\varepsilon ^{-2}\)-terms cancel in (4.12) after projection with \(P_{\pm 1}(z^0,t)\). Therefore, the \(\varepsilon ^{-1}\)-terms are dominant and we obtain (4.9).
(d): Assuming \(\phi (0)=0\), initial values are determined from (4.4) by
This is a nonlinear system for \(z^0(0), \dot{z}_0^0(0), z_1^1(0), z_{-1}^{-1}(0)\). We write the vectors in the basis \(\{v_j(z^0(0),0)\}\), and we select the dominant terms in each equation. They are \(z^0(0)\) in the upper relation of (4.13), and \(\dot{z}_0^0 (0), z_1^1(0), z_{-1}^{-1}(0)\) in the lower relation. Fixed-point iteration then yields the stated equations for the initial values. Note that the relation \(P_j(z^0(0),0) = P_j(x(0),0) + {\mathcal O}(\varepsilon ^2 )\) has been applied. \(\square \)
5 Modulated Fourier expansion of the numerical solution
We consider the two-step formulation (2.9) of the filtered Boris algorithm, and we write the numerical approximation \(x^n\) as
We use the same notation for the coefficient functions as in Sect. 4. Note, however, that for the numerical solution these functions are not the same and depend on the additional parameter h. We again consider the basis \(\{ v_j (x,t) \}\) and the corresponding orthogonal projections \(P_j(x,t)\), and we write the coefficient functions \(z^k\) as in (4.2), with the only difference that here the argument \(z^0(t)\) is the non-oscillating part of (5.1) and not that of (4.1).
Theorem 5.1
Let \(\{ x^n \}\) be a numerical solution of the filtered Boris algorithm applied to (1.1) with bounded initial velocity (3.1), and suppose that it stays in a compact set K for \(0\le nh \le T\). We assume the non-resonance condition
for a fixed, but arbitrary truncation index \(N\ge 2\), and (for convenience of presentation) also the bound \(\eta = h/\varepsilon \le C\). Moreover, we assume that the filter function \(\Psi \) in (2.9) is bounded by \(|\Psi (\mathrm {i}\xi )| \le C \,|\mathrm {tanc}(\tfrac{1}{2} \xi )|\) for all real \(\xi \), where \(\mathrm {tanc}(\xi )=\tan (\xi )/\xi \). Then, we have that
where the phase function is given by \(\dot{\phi }(t) = \varepsilon | B (z^0(t),t ) |\).
- (a) and (b)
The coefficient functions \(z^k(t)\) together with their derivatives (up to order N) as well as the remainder term and its derivative satisfy the bounds of items (a) and (b) of Theorem 4.1.
- (c)
The functions \(z_0^0, z_{\pm 1}^0, z_1^1,z_{-1}^{-1}\) satisfy the differential equations (with \(\theta (\xi )\) used in the definition of \(\bar{x}^n\) in (2.4))
$$\begin{aligned} \ddot{z}_0^0= & {} P_0(z^0,t) E(z^0,t) + 2\, P_0(z^0,t) \, {\mathrm {Re}\,} \Bigl ( \mathrm {i}\frac{\dot{\phi }}{\varepsilon }z_1^1 \times B'(z^0,t)z_{-1}^{-1}\Bigr ) \nonumber \\&\times \theta (\eta \dot{\phi }) {{\,\mathrm{sinc}\,}}(\eta \dot{\phi }/2)^2+ 2 \dot{P}_0(z^0,t) \dot{z}^0 + \ddot{P}_0(z^0,t) z^0 + {\mathcal O}(\varepsilon ^2 ) , \end{aligned}$$(5.4)$$\begin{aligned} \dot{z}_{\pm 1}^0= & {} \dot{P}_{\pm 1}(z^0,t) z^0 \pm \frac{\displaystyle \Psi \bigl ( \mathrm {i}{\eta \dot{\phi }} \bigr )}{\displaystyle \mathrm {tan c} \Bigl ( \frac{\eta \dot{\phi }}{2} \Bigr )} \,\mathrm {i}\,\frac{\varepsilon }{\dot{\phi }} \, P_{\pm 1}(z^0,t) E(z^0,t) + {\mathcal O}(\varepsilon ^2), \end{aligned}$$(5.5)$$\begin{aligned} \dot{z}_{\pm 1}^{\pm 1}= & {} -\,\frac{1}{ \displaystyle \mathrm {tan c} \Bigl ( \frac{\eta \dot{\phi }}{2} \Bigr )} \frac{\ddot{\phi }}{\dot{\phi }}\,z_{\pm 1}^{\pm 1} + {\mathcal O}(\varepsilon ^2) = {\mathcal O}(\varepsilon ^2) . \end{aligned}$$(5.6)All other coefficient functions \(z_j^k\) are given by algebraic expressions depending on \(z^0, \dot{z}_0^0,z_1^1,z_{-1}^{-1}\).
- (d)
Assuming \(\phi (0)=0\), initial values for the differential equations of item (c) are given by the same equations as for the exact solution, up to \({\mathcal O}(\varepsilon ^2)\),
$$\begin{aligned} \begin{aligned} z^0(0)&= x(0) + \frac{\dot{x}(0) \times B(x(0),0)}{|B(x(0),0)|^2} + {\mathcal O}(\varepsilon ^2),\\ \dot{z}_0^0(0)&= P_0(x(0),0) \dot{x}(0)+ \dot{P}_0(x(0),0) x(0)+ {\mathcal O}(\varepsilon ^2 ) , \\ z_{\pm 1}^{\pm 1} (0)&= \mp \,\mathrm {i}\frac{\varepsilon }{\dot{\phi }(0)}P_{\pm 1}(x(0),0)\dot{x}(0) + {\mathcal O}(\varepsilon ^2). \end{aligned} \end{aligned}$$(5.7)The constants symbolised by the \({\mathcal O}\)-notation are independent of \(\varepsilon \) and n with \(0\le nh \le T\), but they depend on N, on the velocity bound M in (3.1), on bounds of derivatives of B and E, and on T.
Proof
(a) and (b) We do not present the details of the proof of the existence of the modulated Fourier expansion and the bounds for the coefficient functions and the remainder term, since this uses the same kind of arguments as in previous such proofs, e.g. in [5, 7, 8]. In particular, for \(|k|=1, j\ne k\) and for \(|k| \ge 2\) the construction of the coefficient functions (see part (c) below) shows that \(z_j^k\) is multiplied by
Under the non-resonance assumption (5.2) this expression is bounded from below by a positive constant, so that an algebraic relation for \(z_j^k\) can be extracted.
By construction of the coefficient functions the truncated series of (5.3) satisfies the two-step relation (2.9) up to a defect of size \({\mathcal O}(\varepsilon ^N)\). A standard discrete Gronwall argument then gives the bounds on the remainder.
(d) The initial values are obtained from
which is a consequence of (5.1), and from
which follows from (2.7) and Lemma 5.1. As in the proof of Theorem 4.1 this constitutes a nonlinear system for the values \(z^0(0), \dot{z}_0^0(0), z_1^1 (0), z_{-1}^{-1}(0)\). The relation (5.8) yields \(z^0_0(0)\). Multiplication of (5.9) with \(P_j\bigl ( z^0(0),0\bigr ) = P_j \bigr ( x(0),0 \bigr ) + {\mathcal O}(\varepsilon ^2 )\) gives \(\dot{z}_0^0(0)\) for \(j=0\) and \(z_{\pm 1}^{\pm 1}(0) \) for \(j=\pm 1\), where we use in addition that \(\Phi _1(h\widehat{B}(x(0),0))=\Phi _1(h\widehat{B}(z^0(0),0))+{\mathcal O}(\varepsilon ^2)\) and \(P_{\pm 1}\dot{z}^0=\dot{z}^0_{\pm 1} - \dot{P}_{\pm 1} z^0 = {\mathcal O}(\varepsilon )\). Remarkably we get, up to terms of size \({\mathcal O}(\varepsilon ^2 )\), the same formulas for the initial values as for the exact solution.
By the uniqueness of the modulated Fourier expansion [up to \({\mathcal O}(\varepsilon ^N)\)], these relations hold not only at time 0, but for arbitrary times \(t\le T\), except for a phase factor \(e^{\mp \mathrm {i}\phi (t)}\) in the equation for \(z^{\pm 1}_{\pm 1}\). This phase factor did not appear in (5.7) because we chose \(\phi (0)=0\).
(c) To derive the differential equations for the coefficient functions we first expand the perturbed argument of B(x, t) in the filtered Boris algorithm as
The coefficient functions \(\zeta ^k(t)\) are obtained as follows: inserting the modulated Fourier expansion (5.1) into (2.7), using Lemma 5.1 below, and replacing \(\Phi _1\bigl ( h\widehat{\bar{B}^n}\bigr )\) by \(\Phi _1\bigl ( h\widehat{B} (z^0(t^n),t^n)\bigr )\) yields with \(t=nh\)
see also the more detailed computation in Sect. 6. Since we have \(\dot{z}_0^0 (t) = P_0\bigl ( z^0(t),t\bigr ) z^0(t) + {\mathcal O}(\varepsilon )\) and \(B^n = \widehat{B} \bigl (z^0(t^n),t^n\bigr )+ {\mathcal O}(\varepsilon )\), this implies
and consequently \(x^n_\odot = z^0 (t^n) + {\mathcal O}(\varepsilon ^2 )\), which shows that \(x^n_\odot \) is an excellent approximation of the non-oscillating part of the numerical solution \(x^n\). Together with the definition (2.4) of \(\bar{x}^n\) we find the dominating terms of the expansion (5.10) as
where \(\theta (t)=\theta (h\dot{\phi }(t)/\varepsilon )=\theta \bigl (h|B(z^0(t),t)|\bigr )\).
After this preparation, we insert the expansions (5.1) for \(x^n\) and (5.10) for \(\bar{x}^n\) into the two-step formulation (2.9) of the filtered Boris algorithm. Using Lemma 5.1 below, expanding the nonlinearities around \(\zeta ^0\) and \(z^0\), and comparing the coefficients of \({\mathrm e}^{\mathrm {i}k \phi (t)/\varepsilon }\) yields
where \(T_{\widehat{B}}^{(m)} (x,t)\) denotes the mth derivative of \(T_{\widehat{B}} (x,t) = \frac{2}{h} \tanh \bigl ( -\frac{h}{2} \widehat{B} (x,t)\bigr )\) with respect to x and, similarly, \(\Psi _{\widehat{B}}^{(m)} (x,t)\) is the mth derivative of \(\Psi _{\widehat{B}} (x,t) = \Psi \bigl ( -h \widehat{B} (x,t)\bigr )\) with respect to x. These derivatives are bounded under the assumption that \(\eta = h/\varepsilon \le c\) and the non-resonance condition (3.2).
For \(k=0\) we obtain
and for \(k=\pm 1 \) we get
Because of (5.11), the argument \(\zeta ^0\) can be replaced by \(z^0\) in these equations. In the limit \(h\rightarrow 0\), i.e., \(\eta \rightarrow 0\) we have accordance with the Eqs. (4.11) and (4.12) for the exact solution, respectively.
To get the differential equations for the dominant coefficient functions, we shall use the relations
Multiplying the Eq. (5.12) with \(P_0(z^0,t)\) and applying the differentiation formula of Lemma 5.2 yields the differential equation
Using \(\bigl ( \widehat{B} ' (x,t) \Delta x\bigr ) v = - v\times B ' (x,t) \Delta x\), which follows from differentiation of \(\widehat{B}(x,t) v = - v\times B(x,t)\), the trigonometric identity \(\sin (2\alpha ) = 2 \sin (\alpha ) \cos (\alpha )\), and the second relation of (5.11), this equation becomes (5.4).
A multiplication of (5.12) with \(P_{\pm 1} (z^0,t)\) permits to extract the dominant first derivative \(\dot{z}_{\pm 1}^0\) and gives (5.5).
We next consider the Eq. (5.13). The \(\varepsilon ^{-2}\)-terms in the left and right sides are contained in
After multiplication with \(P_{\pm 1 }(z^0,t)\) these terms cancel because of the above formula for \(P_{\pm 1}(z^0,t) T_{\widehat{B}}(z^0,t)\). The remaining terms lead to
which simplifies to (5.6). \(\square \)
In the above proof we referred to the following lemmas.
Lemma 5.1
([7]) For smooth functions \(\phi (t)\) and \(z^k(t)\) let \(y^k(t) = {\mathrm e}^{\mathrm {i}k \phi (t)/\varepsilon } z^k(t)\), and denote \(\eta = h/\varepsilon \). The finite differences of \(y^k(t)\) then satisfy
where \(c_{2j}^0 =0\), \(c_{2j+1}^0 = \eta ^{2j} /(2j+1)!\), and \(d_0^0=0\), \(d_{2j}^0 = 2\eta ^{2j-2}/(2j)!\), \(d_{2j+1}^0 = 0\). The leading coefficients are
Note that these coefficients depend on \(\eta \), \(\varepsilon \), and t via derivatives of \(\phi (t)\).
Proof
Expanding \(\phi (t\pm h)\) and \(z^k(t\pm h)\) into Taylor series around t yields the stated formulas. \(\square \)
Lemma 5.2
Let \(T_{\widehat{B}} (x,t) = \frac{2}{h} \tanh \bigl ( -\frac{h}{2} \widehat{B} (x,t)\bigr )\), and let \(P_j(x,t)\) be the orthogonal projections onto the eigenspace of \(\widehat{B} (x,t)\) corresponding to the eigenvalues \(\lambda _0 =0\) and \(\lambda _1 = - \mathrm {i}|B(x,t)| = - \mathrm {i}\dot{\phi }(x,t)/\varepsilon \), and \(\lambda _{-1} = \mathrm {i}|B(x,t)| = \mathrm {i}\dot{\phi }(x,t)/\varepsilon \), respectively. Omitting the argument (x, t), we then have with \(\eta = h/\varepsilon \),
where prime indicates the derivative with respect to x.
Proof
Writing \(\tanh \) as a Taylor series with coefficients \(\gamma _l\) and differentiating term by term, we obtain
This proves the statement of the lemma. \(\square \)
6 Proof of Theorem 3.1
Theorems 4.1 and 5.1 show that the coefficient functions \(z^k(t)\) [and also \(\dot{z}^0(t)\)] of the modulated Fourier expansions of the exact and numerical solutions coincide up to \({\mathcal O}(\varepsilon ^2)\) for the choice (2.5) and \(\,\Psi (\zeta )=\mathrm {tanch}(\zeta /2)\). This also shows that the phase functions \(\phi \) (with \(\dot{\phi }(t)= \varepsilon |B(z^0(t),t)|\)) differ only by \({\mathcal O}(\varepsilon ^2)\), respectively. Since all coefficient functions \(z^k\) of the modulated Fourier expansion with the exception of \(z^0\) are of size \({\mathcal O}(\varepsilon )\) or smaller, this yields that all summands \(z^k(t){\mathrm e}^{\mathrm {i}k\phi (t)/\varepsilon }\) still differ only by \({\mathcal O}(\varepsilon ^2)\). So we obtain the \({\mathcal O}(\varepsilon ^2)\) error bound for the positions as stated in Theorem 3.1.
We now turn to the error bound for the velocities. By Theorem 4.1, using that \(\dot{z}^{\pm 1}_{\pm 1}={\mathcal O}(\varepsilon ^2)\) and \(z^k_j={\mathcal O}(\varepsilon ^3)\) for \(|k|=1\) and \(k\ne j\) and for \(|k|\ge 2\) and all \(j=-1,0,1\), together with their derivatives, the velocity of the exact solution satisfies
We shall show below that the numerical solution admits the same expansion with functions \(\phi (t), \dot{z}^0(t)\), \(z^1_1(t)\), \(z^{-1}_{-1}(t)\) that correspond to the modulated Fourier expansion (5.1) of the numerical solution and not to (4.1) of the exact solution. By Theorems 4.1 and 5.1, these functions differ only by \({\mathcal O}(\varepsilon ^2)\). Because of the denominator \(\varepsilon \) in the second and third terms on the right-hand side of (6.1), this yields
and proves the statement of Theorem 3.1.
Using Lemma 5.1 and \(\ddot{\phi }(t)={\mathcal O}(\varepsilon )\), we have, with \(t=nh\), that
A consequence of the maximal ordering in (1.1) is that \(\Phi _1\bigl ( h \widehat{B}(\bar{x}^n,t^n)\bigr ) = \Phi _1\bigl ( h \widehat{B}(z^0(t^n),t^n)\bigr ) + {\mathcal O}(\varepsilon ^2)\), and \(\Upsilon \bigl ( h \widehat{B}( x^n,t^n)\bigr ) = \Upsilon \bigl ( h \widehat{B}(z^0(t^n),t^n)\bigr ) + {\mathcal O}(\varepsilon ^2)\). Splitting \(\Phi _1(\cdot ) \dot{z}^0\) into \(\dot{z}^0 + \bigl (\Phi _1(\cdot ) - I \bigr )\dot{z}^0\) and using \(\Upsilon (\zeta ) = \bigl ( \Phi _1 (\zeta ) -1\bigr )/\zeta \), we therefore have
Since \(\Upsilon (0)=0\) we have \(\Upsilon \bigl ( h \widehat{B}(z^0(t),t)\bigr )P_0(z^0(t),t) = 0\). On the other hand
which follows from (5.5) for \(\Psi (\mathrm {i}y) = \mathrm {tanc} (y/2)\). This proves the relation (6.1) also for the numerical solution.
7 A two-point filtered Boris algorithm
Algorithm 2.1 evaluates the magnetic field B at \(\bar{x}^n\) given by (2.4)–(2.5), which can be far from both \(x^n\) and the guiding center approximation \(x^n_\odot \) of (2.3) when \(h|B(x_n)|\) is close to a nonzero integral multiple of \(2\pi \). In the following we propose an alternative filtered Boris algorithm with the same second-order convergence properties as in Theorem 3.1, which evaluates the magnetic field at the two points \(x^n\) and \(x^n_\odot \).
Algorithm 7.1
(Two-point filtered Boris algorithm) Given \((x^n , v^{n-1/2})\), the algorithm computes \((x^{n+1} , v^{n+1/2})\) as follows, with \(B^n=B(x^n,t^n)\), \(B^n_\odot =B(x^n_\odot ,t^n)\) and \(E^n=E(x^n,t^n)\):
where \(\Psi (\zeta ) = {{\,\mathrm{tanch}\,}}(\zeta /2)\) and \(\displaystyle \Phi _1(\zeta ) = \frac{1}{{{\,\mathrm{sinch}\,}}(\zeta )}\) are as in Algorithm 2.1, and \(\displaystyle \Phi _2 (\zeta ) = \frac{1}{{{\,\mathrm{sinch}\,}}(\zeta /2)^2} \).
The velocity approximation \(v^n\) is again computed by (2.7), with \(B^n\) instead of \(\bar{B}^n\).
For constant B, Algorithms 2.1 and 7.1 are identical and explicit. In the general case, both methods are implicit, but this time the fixed-point iteration for \(x^n_\odot \) requires not only the evaluation of matrix functions by the Rodriguez formula, but in addition the solution of a linear system with the \(3\times 3\) matrix \( \Phi _2(h\widehat{B}^n_\odot )+ \frac{1}{2} h \widehat{B}^n \Phi _1(h\widehat{B}^n)\). We further note that in the case of a vanishing electric field, \(E^n=0\), Algorithm 2.1 preserves the velocity norm \(|v^{n+1/2}|=|v^{n-1/2}|\), which is satisfied only approximately up to \({\mathcal O}(h\varepsilon )\) by Algorithm 7.1. While these properties are unfavourable for Algorithm 7.1, our numerical experiments indicate that it yields higher accuracy than Algorithm 2.1 for stepsizes such that h|B| is large, and in particular it is less sensitive to near-resonances where h|B| is close to an integral multiple of \(2\pi \).
The two-step formulation of Algorithm 7.1 is
The starting value\(v^{1/2}\) is chosen such that formulas (7.1) and (2.7) also hold for \(n=0\). With the abbreviations
we find, for arbitrary n, that like in (2.10),
and the one-step map \({(x^n,v^n)\mapsto (x^{n+1},v^{n+1})}\) is then again given by (2.11) with these modified matrices \(\Phi ^n_\pm \) and \(\Psi ^n_\pm \).
For the two-point filtered Boris algorithm, the second-order convergence result of Theorem 3.1 in x and \(v_\parallel \) and the first-order convergence in \(v_\perp \) remain valid, as can be shown by an adaptation of the proof of Theorem 5.1, for which we omit the details.
8 Numerical experiment
As an illustrative numerical experiment, we consider the charged-particle motion in the magnetic field
and the electric field \(E(x,t)=-\nabla _x U(x)\) with the potential
The initial values are chosen as \(x(0)=(\frac{1}{3},\frac{1}{4},\frac{1}{2})^{\intercal }\) and \(v(0)=(\frac{2}{5},\frac{2}{3},1)^{\intercal }\). We solve this problem for \(0\le t \le 1\) with \(h=\epsilon ,4\epsilon ,16\epsilon \) and compare the numerical errors of the following methods:
the standard Boris algorithm,
Exp-A: the filtered Boris method of Algorithm 2.1 with \(\theta =1\) in (2.4) (where \(\bar{x}^n=x^n\) and the method is explicit),
Imp-A: the filtered Boris method of Algorithm 2.1 with \(\theta \) of (2.5),
Two P-A: the two-point filtered Boris method of Algorithm 7.1.
The errors in x and \( v_\parallel , v_\perp \) against different \(\epsilon =1/2^j\) are displayed in Fig. 1, where \(j=4,\ldots ,13\). Then we fix \(\epsilon =1/2^{10}\) and show the errors at \(t=1\) against \(h/\epsilon \) in Fig. 2. It is observed that all three filtered Boris methods improve considerably over the standard Boris method, and the optimally filtered methods Imp-A and Two P-A show second order, whereas method Exp-A only shows first order. Methods Imp-A and Two P-A behave very similar away from stepsize resonances, but method Two P-A appears more robust near stepsize resonances. For the implicit methods Imp-A and Two P-A, the error behaviour remains essentially unchanged after just one fixed-point iteration.
References
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)
Brizard, A.J., Hahm, T.S.: Foundations of nonlinear gyrokinetic Theory. Rev. Modern Phys. 79(2), 421–468 (2007)
Filbet, F., Rodrigues, L.: Asymptotically stable particle-in-cell methods for the vlasov-poisson system with a strong external magnetic field. SIAM J. Numer. Anal. 54(2), 1120–1146 (2016)
García-Archilla, B., Sanz-Serna, J.M., Skeel, R.D.: Long-time-step methods for oscillatory differential equations. SIAM J. Sci. Comput. 20, 930–963 (1999)
Hairer, E., Lubich, C.: Long-term analysis of the Störmer-Verlet method for Hamiltonian systems with a solution-dependent high frequency. Numer. Math. 34, 119–138 (2016)
Hairer, E., Lubich, C.: Energy behaviour of the Boris method for charged-particle dynamics. BIT 58, 969–979 (2018)
Hairer, E., Lubich, C.: Long-term analysis of a variational integrator for charged-particle dynamics in a strong magnetic field. Numerische Mathematik (2019, to appear)
Hairer, E., Lubich, C., Wanner, G.: Geometric Numerical Integration. Structure-Preserving Algorithms for Ordinary Differential Equations, 2 (ed.) Springer Series in Computational Mathematics 31. Springer, Berlin (2006)
Hochbruck, M., Lubich, C.: A Gautschi-type method for oscillatory second-order differential equations. Numer. Math. 83, 403–426 (1999)
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. Interscience Publishers John Wiley & Sons, New York (1963)
Possanner, S.: Gyrokinetics from variational averaging: existence and error bounds. J. Math. Phys. 59(8), 082702 (2018)
Qin, H., Zhang, S., Xiao, J., Liu, J., Sun, Y., Tang, W.M.: Why is Boris algorithm so good? Phys. Plasm. 20(8), 084503 (2013)
Acknowledgements
Open Access funding provided by Projekt DEAL. C.L. thanks Eric Sonnendrücker for stimulating discussions during the Oberwolfach workshop 2019-04. This work was supported by the Fonds National Suisse, Project No. 200020-159856, by Deutsche Forschungsgemeinschaft, SFB 1173, and by the Humboldt Foundation.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix: Implementation
Appendix: Implementation
The filtered Boris algorithm requires the computation of matrix functions applied to a vector. This can be done very efficiently with a Rodriguez-like formula. Consider a vector \(B=(b_1,b_2,b_3)^\top \in {\mathbf{R}}^3\) and the skew-symmetric matrix \(\widehat{B}\) of (2.2), and let \(b= |B|\). Assume that the function \(\varphi (\zeta )\) can be expanded into a Taylor series at the origin with real coefficients \(c_n\), and write
with \(\varphi _1(y) = \sum _{j\ge 0} c_{2j+1} (-y^2)^j\) and \(\varphi _2(y) = \sum _{j\ge 0} c_{2j+2} (-y^2)^j\). The fact that
implies that
This permits us to compute \(\varphi (\widehat{B}) v\) by evaluating the scalars \(\varphi (0), \varphi _1 (b), \varphi _2 (b)\), and by forming twice a product of \(\widehat{B}\) with a vector. Note that \(\widehat{B} v = B\times v \).
For the case that \(\varphi (\zeta ) \) has only even powers of \(\zeta \), we have \(\varphi _1 (y)=0\), and the formula simplifies. Similarly, for the case where only odd powers of \(\zeta \) are present, we have \(\varphi (0)=0\) and \(\varphi _2 (y)=0\). For the matrix functions of Algorithm 2.1 we thus have
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
Hairer, E., Lubich, C. & Wang, B. A filtered Boris algorithm for charged-particle dynamics in a strong magnetic field. Numer. Math. 144, 787–809 (2020). https://doi.org/10.1007/s00211-020-01105-3
Received:
Revised:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s00211-020-01105-3