Leapfrog Methods For Relativistic Charged-Particle Dynamics
Leapfrog Methods For Relativistic Charged-Particle Dynamics
1 Introduction
In this paper we present and study numerical integrators for relativistic charged-
particle dynamics. They are of interest in the context of particle methods for
plasma physics when relativistic effects need to be taken into account. The
methods put forward here are based on a four-dimensional (4D) formulation
of the equations of motion. The proposed leapfrog integrator and its energy-
conserving and variational variants can be viewed as extensions of the standard
1 Dept. de Mathématiques, Univ. de Genève, CH-1211 Genève 24, Switzerland.
E-mail: [email protected]
2 Mathematisches Institut, Univ. Tübingen, D-72076 Tübingen, Germany.
E-mail: {Lubich, Shi}@na.uni-tuebingen.de
2 E. Hairer, Ch. Lubich, Y. Shi
The numerical methods studied in this paper are based on a different formu-
lation that works in 4D space-time. By introducing the proper time τ , the
equations (2.1) can be expressed as
dt dγ
=γ = E(x) · u
dτ dτ
dx du
=u = γE(x) + u × B(x),
dτ dτ
4 E. Hairer, Ch. Lubich, Y. Shi
d2 t dx
2
= E(x) ·
dτ dτ (2.3)
d2 x dt dx
= E(x) − B(x) × .
dτ 2 dτ dτ
With the 4-dimensional position vector x = (t; x) = (t, x> )> and the matrix
of the Minkowski metric −dt2 + dx21 + dx22 + dx23 ,
M = diag(−1, 1, 1, 1),
we can write (2.3) in the compact form (with the dots standing for differenti-
ation with respect to τ ),
0 −E >
Mẍ = F(x)ẋ with skew-symmetric F = b , (2.4)
E −B
L(x, u) = 1
2 u> Mu + A(x)> u with A(x) = (−φ(x); A(x)). (2.5)
Then, the Lagrangian is invariant under the action of the group (esL )s∈R , i.e.
L(esL x, esL u) = L(x, u). Therefore, Noether’s theorem yields that
xn+1 − xn−1
un = . (3.2)
2h
For the actual computation a one-step formulation is preferable: Given the
position and momentum approximation (xn , un−1/2 ), the algorithm computes
(xn+1 , un+1/2 ) by leapfrog hopping:
1 1 h 1 1
M un+ 2 − un− 2 = F(xn ) un+ 2 + un− 2
2 (3.3)
1
n+1 n n+ 2
x = x + hu .
Given the initial values (x0 , u0 ), the starting value u1/2 is chosen by first
computing u1/2 as the last three components of u e 1/2 = u0 + h2 M−1 F(x0 )u0 ,
p
1/2 1/2
then γ 1/2 2
= 1 + |u | and finally setting u = (γ 1/2 ; u1/2 ).
In each step, the method requires evaluating the electric and magnetic fields
E and B at the known current position xn and then solving a 4-dimensional
linear system with the matrix M − 12 hF(xn ). The approximation (3.2) of u at
the grid points is obtained as un = 21 un+1/2 + un−1/2 .
far. This shall be done in this paper. We begin with a few observations. First,
this is a symmetric (or time-reversible) method: interchanging the temporal
superscripts n + 1 and n − 1 and replacing h by −h yields again the same
method. As a consequence, it gives a second-order approximation as h → 0:
with τ n = nh,
Theorem 3.1 The leapfrog method (3.3) preserves the mass shell (2.6):
H un+1/2 = H un−1/2 .
Proof Multiplying the first equation of (3.3) with (un+1/2 + un−1/2 )> and
using the skew-symmetry of F(xn ) yields
> >
1
2 un+1/2 Mun+1/2 − 1
2 un−1/2 Mun−1/2 = 0,
Theorem 3.2 The one-step map (xn , un−1/2 ) 7→ (xn+1 , un+1/2 ) of the leapfrog
method (3.3) is volume-preserving.
x
b = x + hb
u
1 −1
u
b = Cay 2 hM F(x) u
MZ + Z> M = 0.
This relation implies (see e.g. [10, Lemma IV.8.7]) that C = Cay(Z) satisfies
C>MC = M
and hence | det(C)| = 1. This yields | det DΦh (x, u) | = 1 for all (x, u), which
shows that Φh is a volume-preserving map. t
u
Remark 3.1 Since the map (x, u) 7→ (x, p) with p = Mu + A(x) is volume-
preserving, also the one-step map in the 8D phase space, (xn , pn−1/2 ) 7→
(xn+1 , pn+1/2 ) with pn+1/2 = Mun+1/2 + A(xn+1 ), is volume-preserving.
In the following examples we plot the relative error of the energy H of (2.2) as
a function of the proper time τ . The time step size is h, the integration interval
is [0, τend ], and the vertical axis covers the interval from −ch2 to +ch2 , with c
depending on the particular example.
with initial values x(0) = (0, 1, 0.1)> , u(0) = (0.09, 0.05, 0.2)> .
with initial values x(0) = (0, 1, 0.1)> , u(0) = (0.09, 0.55, 0.3)> .
Fig. 3.1 Relative error of the energy (2.2) as a function of the proper time τ for the problem
of Example 3.1.
Fig. 3.2 Relative error of the energy (2.2) as a function of the proper time τ for the problem
of Example 3.2.
Fig. 3.3 Relative error of the energy (2.2) as a function of the proper time τ for the problem
of Example 3.3, for five initial values differing by less than 10−14 .
is also observed for constant magnetic fields, see Figure 3.3, and even for the
zero magnetic field (not shown).
The energy behaviour differs from that of the Boris method in the non-
relativistic case: long-time near-conservation of energy was shown for the two
cases of a constant magnetic field or a quadratic electric potential [6, Theorem
2.1], and for the data of Example 3.2 a linear drift in the energy was observed in
[6, Example 5.1], whereas for a different (linear) magnetic field a random-walk
behaviour was observed [6, Example 5.2].
tn and x(nh) = xn :
h2 .... h2 ...
ẗ + t + . . . = E(x)> ẋ + x + ... (3.5)
12 6
h2 .... h2 ... h2 ...
ẍ + x + . . . = E(x) ṫ + t + . . . − B(x)
b ẋ + x + . . . . (3.6)
12 6 6
With the h-dependent functions γ(τ ) = t(τ + h) − t(τ − h) 2h and u(τ ) =
x(τ + h) − x(τ − h) 2h we also have
h2 ... h2 ...
γ = ṫ + t + ..., u = ẋ + x + ....
6 6
These relations can be formally inverted and give
h2 h2
ṫ = γ − γ̈ + . . . , ẋ = u − ü + . . . . (3.7)
6 6
Theorem 3.3 Consider the leapfrog method (3.1)–(3.2) in the case of a quadratic
potential φ(x) = 12 x> Qx + q > x. Provided that the numerical solution (xn , un )
stays in a fixed compact set, the energy (2.2) is conserved up to O(h2 ),
h2 ... h2
γ + . . . = E(x)> ẋ + ...
γ̇ − x + ... . (3.8)
12 6
Relativistic charged-particle dynamics 11
d
Hh (x, γ) = O(hN )
dτ
along solutions of the modified differential equation. This yields the result as
in [6, Theorem 2.1]. t
u
d h2 ... h2 ...
γ + φ(x) − γ + . . . = E(x)> x + ... . (3.9)
dτ 12 6
Computing E(x) from (3.6) and inserting the resulting expression into (3.9)
yields
for the right-hand side of (3.9). If the magnetic field is constant, it follows
>
from [6] that x(k) Bb x(l) is a total differential when k − l is an even integer.
Consequently, there exist functions F2j (x, ẋ, γ) such that
The explicit leapfrog method in the preceding subsection does not preserve the
energy H of (2.2). We describe an implicit energy-preserving variant that uses
discrete gradients. Given the potential φ, a continuous map ∇φ : R3 ×R3 → R3
is a discrete gradient of φ if the following two conditions are satisfied for all
b ∈ R3 :
x, x
∇φ(b
x, x) · (b
x − x) = φ(b
x) − φ(x), ∇φ(x, x) = ∇φ(x).
x) − φ(x) − ∇φ(x)T ∆x
φ(b
∇φ(b
x, x) = ∇φ(x) + ∆x
k∆xk2
Theorem 4.1 The discrete-gradient leapfrog method preserves both the mass
shell (2.6) and the energy (2.2): for all n,
H un+1/2 = H u1/2
From the first line in the first equation of the one-step formulation (3.3) with
n
F instead of F(xn ) and the definition of a discrete gradient, we therefore
obtain
γ n+1/2 − γ n−1/2 un+1/2 + un−1/2
− = ∇φn ·
h 2
xn+1/2 − xn−1/2
= ∇φ(xn+1/2 , xn−1/2 ) ·
h
φ(xn+1/2 ) − φ(xn−1/2 )
= .
h
In view of (2.2), this proves the energy conservation H n+1/2 = H n−1/2 .
Conservation of mass shell is proved in the same way as in Theorem 3.3. t
u
Remark 4.1 In the special case of a constant electric field E the two integrators
of this and the preceding subsection coincide, since then φ(x) = −E > x and
hence −∇φn = −∇φ(xn ) = E. In particular, in this case the explicit leapfrog
integrator of Section 3 conserves the energy H.
two-step method:
xn+1 − 2xn + xn−1
M = (5.2)
h2
n+1 n−1 n+1 n−1
x −x A(x ) − A(x )
A0 (xn )> − ,
2h 2h
4
with the derivative matrix A0 (x) = ∂x A(x) = ∂j Ai (x) i,j=1 for x = (t; x);
cf. [7, 8, 21] for the analogous method in the non-relativistic case.
This method is again complemented with the augmented-momentum ap-
proximation (3.2). The method can equivalently be written as a perturbation
of the explicit leapfrog method:
xn+1 − 2xn + xn−1 n x
n+1
− xn−1
M = F(x )
h2 2h
n+1 n−1
x −x A(xn+1 ) − A(xn−1 )
+ A0 (xn ) − . (5.3)
2h 2h
The method has a one-step formulation similar to (3.3) of the explicit leapfrog
algorithm, adding the correction term of (5.3) in the first line of (3.3). It is,
however, an implicit method, because the vector potential A is evaluated at
the new position xn+1 .
Remark 5.1 The correction to the explicit leapfrog method as given in the
second line of (5.3) vanishes for linear A(x). Hence, the variational integrator
and the explicit leapfrog method as well as the energy-preserving leapfrog
method coincide for constant fields B and E.
A different one-step formulation of (5.2) is given by the map (xn , pn ) 7→
n+1
(x , pn+1 ) that is implicitly defined by
pn = −∂1 Lh (xn , xn+1 )
1
= M − 12 hA0 (xn )> un+1/2 + A(xn ) + A(xn+1 ) (5.4)
2
pn+1 = ∂2 Lh (xn , xn+1 )
1
= M + 21 hA0 (xn+1 )> un+1/2 + A(xn ) + A(xn+1 ) ,
2
where again un+1/2 = (γ n+1/2 ; un+1/2 ) = xn+1 − xn /h. This map yields
the numerical positions xn of the discrete Euler–Lagrange equations (5.2)
and is known to be symplectic (and hence also volume-preserving); see Theo-
rem VI.6.1 in [10], which can be traced back to Maeda [14].
In the continuous problem, the first component of p = Mu + A(x) equals
−γ − φ(x) = −H(x, γ), i.e. the negative energy (2.2). Since the 4D vector
potential A(x) = (−φ(x); A(x)) is independent of t when φ and A do not
depend on time, the first column of A0 (x) is zero. This implies that in the
discrete equations (5.4), the first component of both pn and pn+1 equals the
negative of
1
H n+1/2 := γ n+1/2 + φ(xn ) + φ(xn+1 ) . (5.5)
2
Relativistic charged-particle dynamics 15
Theorem 5.1 The variational leapfrog integrator preserves the discrete en-
ergy (5.5):
H n+1/2 = H 1/2 for all n.
Theorem 5.2 Assume that the potentials φ and A are analytic in a domain
D ⊂ R4 . Provided that the numerical solution (xn , un+1/2 ) stays in a com-
pact set, and xn ∈ D, the variational leapfrog integrator preserves the mass
shell (2.6) up to O(h2 ),
Proof The result is obtained from the known theory of variational / symplectic
integrators; see e.g. [10, Chapters VI and IX]. Backward error analysis shows
that symplectic methods, such as (5.4) in our case, nearly conserve the Hamil-
tonian, which here is the mass shell (2.6), over very long times; see Theorem
IX.8.1 in [10], which goes back to Benettin & Giorgilli [1]. Under the given
assumptions, this yields that the mass shell (2.6) is nearly conserved up to
O(h2 ),
H(xn , pn ) = H(x0 , p0 ) + O(h2 ) for nh ≤ ec/h . (5.7)
Using (5.4), a calculation shows that the mass shell expressed in terms of u
satisfies along the actually computed numerical solution (xn , un+1/2 )
1
H(un+1/2 ) = H(xn , pn ) + H(xn+1 , pn+1 ) + O(h2 ).
2
The relation (5.7) therefore implies that H(un+1/2 ) = H(u1/2 ) + O(h2 ) over
exponentially long times nh ≤ ec/h . t
u
16 E. Hairer, Ch. Lubich, Y. Shi
This follows directly from the discrete Noether’s theorem [10, Theorem VI.6.7],
which states that invariants resulting from Noether’s theorem are preserved
by variational / symplectic integrators that preserve the symmetry, as is the
case for the linear group action (esL )s∈R with (2.7).
The conservation of the first component of p along the numerical solution,
and hence the energy conservation of Theorem 5.1, can also be seen as an
instance of the discrete Noether’s theorem, in view of the invariance of the
discrete Lagrangian under the group action x 7→ x+se1 , s ∈ R, with e1 the first
4-dimensional unit vector, which yields the preservation of e> n
1 p = −H
n+1/2
.
6 Non-relativistic limit
H(x, γ) = γ + φ(x) = 1 + ε2 1
u|2 + φe + O(ε4 ),
2 |e
where the constant term 1 is irrelevant, and the second term on the right-hand
side is the ε2 -scaled non-relativistic energy. In the following we omit the tilde
on the variables.
With the scaling u → εu, φ → ε2 φ, A → εA, and the rescaling of time as
εt → t and ετ → τ , the equations of motion (2.4) become ṫ = γ, ẋ = u and
−ε2 E(x)> u
−γ̇
= .
u̇ E(x)γ − B(x)u
b
ṫ = γ = 1 + O(ε2 τ ).
ẋ = u, u̇ = E(x) + u × B(x).
Relativistic charged-particle dynamics 17
We next consider what the corresponding limit equations are for the three
leapfrog methods studied in this paper. With the above scaling and the ap-
propriate rescaling εh → h of the stepsize, the limit equation for the ex-
plicit leapfrog method (3.1) becomes the Boris method [2] applied to the non-
relativistic equations of motion,
Acknowledgement
The work of Yanyan Shi was funded by the Sino-German (CSC-DAAD) Post-
doc Scholarship, Program No. 57575640. Ernst Hairer acknowledges the sup-
port of the Swiss National Science Foundation, grant No.200020 192129.
References