0% found this document useful (0 votes)
52 views18 pages

Leapfrog Methods For Relativistic Charged-Particle Dynamics

This document describes three leapfrog methods for numerically integrating the equations of motion of relativistic charged particles in electromagnetic fields. The methods are based on a four-dimensional formulation of the equations. The basic leapfrog method preserves mass shell but not energy. An energy-preserving implicit leapfrog method conserves both energy and mass shell. A variational implicit leapfrog method exactly preserves a discrete energy and nearly preserves mass shell over long times, while also being symplectic. In the non-relativistic limit, the methods reduce to known non-relativistic integrators.

Uploaded by

Dr-Junaid Shaju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views18 pages

Leapfrog Methods For Relativistic Charged-Particle Dynamics

This document describes three leapfrog methods for numerically integrating the equations of motion of relativistic charged particles in electromagnetic fields. The methods are based on a four-dimensional formulation of the equations. The basic leapfrog method preserves mass shell but not energy. An energy-preserving implicit leapfrog method conserves both energy and mass shell. A variational implicit leapfrog method exactly preserves a discrete energy and nearly preserves mass shell over long times, while also being symplectic. In the non-relativistic limit, the methods reduce to known non-relativistic integrators.

Uploaded by

Dr-Junaid Shaju
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 18

Version of 24 April 2023

Leapfrog methods for relativistic charged-particle


dynamics

Ernst Hairer1 , Christian Lubich2 ,


Yanyan Shi2
arXiv:2304.13578v1 [math.NA] 26 Apr 2023

Abstract A basic leapfrog integrator and its energy-preserving and varia-


tional / symplectic variants are proposed and studied for the numerical inte-
gration of the equations of motion of relativistic charged particles in an electro-
magnetic field. The methods are based on a four-dimensional formulation of the
equations of motion. Structure-preserving properties of the numerical meth-
ods are analysed, in particular conservation and long-time near-conservation
of energy and mass shell as well as preservation of volume in phase space. In
the non-relativistic limit, the considered methods reduce to the Boris algo-
rithm for non-relativistic charged-particle dynamics and its energy-preserving
and variational / symplectic variants.

Keywords. relativistic charged particle, leapfrog integrator, structure preser-


vation, energy conservation, mass shell conservation, backward error analysis.

Mathematics Subject Classification (2020): 65L05, 65P10, 78A35

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

Boris algorithm [2] for non-relativistic charged-particle dynamics, which itself


extends the leapfrog method (or Störmer–Verlet method) for particle motion
in an electrostatic (potential-force) field; see e.g. Verlet [18] and [9]. However,
the methods considered here differ substantially from the method proposed
by Boris for the relativistic case, also given in [2]. That method is based on a
three-dimensional (3D) formulation of the equations of motion.
A concise review of the equations of motion of relativistic charged-particle
dynamics in 3D and 4D formulations is given in Section 2. In this paper we
will work with the 4D formulation, which to us appears favourable for the nu-
merical discretization. There is an ample literature on numerical integrators
based on the 3D formulation, e.g. [2, 11, 12, 16, 17, 23], but only recently first
numerical integrators based on the 4D formulation were proposed in the phys-
ical literature [20, 15, 22, 19]. Despite their algorithmic simplicity, the leapfrog
methods of this paper have apparently not appeared in the literature on rela-
tivistic charged-particle dynamics before.
In Section 3 we propose and study the basic leapfrog integrator, which is
explicit, or more precisely linearly implicit. It preserves the mass shell and
is also volume-preserving. Energy is in general not approximately conserved
over long times along the numerical solutions, but often shows a random-walk
behaviour, as it is the case also for the non-relativistic Boris algorithm [6].
Energy is conserved in the special case of a constant electric field and is nearly
conserved for all times in the case of a linear electric field, i.e., of a quadratic
scalar potential. Unlike the Boris integrator in the non-relativistic setting [6],
the method does not in general nearly preserve energy over long times in the
case of a constant magnetic field, and not even for a vanishing magnetic field.
In Section 4 we consider a discrete-gradient implicit leapfrog integrator. It
conserves energy and mass shell and is also volume-preserving.
In Section 5 we study a variational leapfrog integrator, which is also im-
plicit. It exactly preserves a discrete energy that is close to the physical energy
and it nearly preserves the mass shell over times that are exponentially long in
the inverse step size. The method is symplectic and therefore conserves volume
in the 8-dimensional phase space. The three different leapfrog methods of Sec-
tions 3, 4 and 5 coincide in the special case of constant electric and magnetic
fields.
In Section 6 we discuss the non-relativistic limits of the three integrators.
As it turns out, the relativistic explicit leapfrog method has the non-relativistic
Boris method as its non-relativistic limit, the relativistic energy-preserving
leapfrog method has a non-relativistic energy-preserving leapfrog method as
its limit, and the relativistic variational leapfrog method has a known non-
relativistic variational integrator as its limit.

2 Relativistic charged-particle dynamics

In this preparatory section we review the differential equations of motion to-


gether with their conserved quantities, the energy and the mass shell. They
Relativistic charged-particle dynamics 3

can be formulated in a 3D and a 4D setting, both of which appear in the phys-


ical literature; see e.g. [4, Section 8-4] and [13, Chapter 11]. Our presentation
is partly inspired by [19]. We will use the convention to denote 3D vectors and
matrices by italic letters and 4D vectors and matrices by boldface letters.

2.1 Three-dimensional formulation

The equations of motion of a relativistic charged particle are usually formu-


lated as
dx u
=
dt γ
du u (2.1)
= × B(x) + E(x)
dt γ
p
γ = 1 + |u|2
where x(t) ∈ R3 is the position at time t, u(t) ∈ R3 is the momentum, and
γ is the relativistic factor. Here, the physical units are chosen such that the
speed of light is 1 and the particle has mass 1 and electric charge 1. E(x) and
B(x) are the given electric field and magnetic field, respectively, which can be
expressed as E(x) = −∇φ(x) and B(x) = ∇ × A(x) with a scalar potential
φ(x) ∈ R and a vector potential A(x) ∈ R3 . We assume throughout the paper
that φ and A are arbitrarily differentiable (and hence also E and B).
d
Equations (2.1) are the Euler–Lagrange equations dt ∇v L = ∇x L for the
p
Lagrangian (with v = u/γ and consequently 1/γ = 1 − |v|2 )
1
L(x, v) = − + A(x) · v − φ(x).
γ
With the conjugate momenta p = ∇v L = γv + A(x) = u + A(x), the Hamil-
tonian H = p
p p · v − L (energy of the charged particle) of (2.1) is (with γ =
1 + |u|2 = 1 + |p − A(x)|2 )
H(x, p) = γ + φ(x). (2.2)
We will often write H(x, γ) to emphasize the dependence of the energy on x
and γ instead of the canonical variables (x, p).

2.2 Four-dimensional formulation

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

which is equivalent to the system of second-order differential equations

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

where B b = B × v for all v ∈ R3 . The matrix


b is the 3 × 3 matrix satisfying Bv
F represents the Faraday tensor.
The first line of this 4-dimensional system of differential equations (with
ẗ = γ̇) reads −γ̇ = ∇φ(x)> ẋ ≡ dτ d
φ(x), which imposes conservation of the
energy (2.2).
The Lagrangian corresponding to (2.4) is (with u = (γ; u) as the variable
representing ẋ)

L(x, u) = 1
2 u> Mu + A(x)> u with A(x) = (−φ(x); A(x)). (2.5)

Note that F = (∂x A)> − ∂x A.


With the conjugate momenta p = ∇u L = Mu + A(x), the Hamiltonian
(mass shell) is
H(x, p) = 12 u>Mu. (2.6)
We will often write H(u) to emphasize the dependence of the mass shell on u
instead of the canonical variables (x, p).
Both Hamiltonians, the energy H and the mass shell H, are conserved
along the solutions of the equivalent systems of differential equations (2.1)
and (2.4). As for every Hamiltonian system, the flow ϕτ : (x(0), p(0)) 7→
(x(τ ), p(τ )) is symplectic and, in particular, preserves volume in phase space:
for every bounded open set Ω ⊂ R8 and for every τ such that ϕτ (x, p) exists
for all (x, p) ∈ Ω, we have vol(ϕτ (Ω)) = vol(Ω). Since the transformation
(x, u) 7→ (x, p) with p = Mu + A(x) preserves volume, also the transformed
flow (x(0), u(0)) 7→ (x(τ ), u(τ )) is volume-preserving.
Further conserved quantities arise if the 4D vector potential A is Lorentz-
invariant: Suppose that for some matrix L ∈ R4×4 with ML + L> M = 0, the
augmented vector potential A satisfies
>
esL A(esL x) = A(x) for all s ∈ R and all x ∈ R4 . (2.7)
Relativistic charged-particle dynamics 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

I(x, p) = p> Lx, where again p = Mu + A(x), (2.8)

is conserved along solutions of (2.4), as is also verified by direct calculation.


We will also write I(x, u) to emphasize the dependence on x and u instead of
the canonical variables (x, p).
Finally we remark that the conservation of the mass shell (2.6) and the
invariant (2.8) remain valid for a 4D vector potential A(x) = (−φ(t, x); A(t, x))
that also depends on time t. This is evidently not true for conservation of the
energy (2.2), but it remains true if only A is time-dependent.

3 The explicit leapfrog method based on the 4D formulation

3.1 The explicit leapfrog method in two- and one-step form

The simplest discretization of (2.4) replaces the derivatives by symmetric finite


differences: Given a stepsize h > 0 (with a fixed upper bound h ≤ h̄) and
approximations xn , xn−1 to the augmented position vector x = (t; x) at τ =
τn = nh and τ = τn−1 , the new position vector xn+1 is determined from

xn+1 − 2xn + xn−1 n x


n+1
− xn−1
M = F(x ) . (3.1)
h2 2h
The augmented momentum u = (γ; u) = ẋ is approximated by

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 .


While we claim no originality for this remarkably simple leapfrog method,


it seems not to have been studied for relativistic charged-particle dynamics so
6 E. Hairer, Ch. Lubich, Y. Shi

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,

k(xn , un ) − (x(τ n ), u(τ n ))k = O(h2 ) for nh ≤ τend ,

where the constant symbolized by O is independent of h and n with nh ≤ τend ,


but depends on τend .

3.2 Preservation of mass shell and volume

The following two theorems state important conservation properties.

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,

which is the stated result. t


u

As a consequence, for un+1/2 = γ n+1/2 ; un+1/2 the term − γ n+1/2 )2 +
2
un+1/2 is independent of n, and hence
q
2
γ n+1/2 = 1 + un+1/2 for all n, (3.4)

provided that this relation holds true at n = 0, as is ensured by our choice of


starting value u1/2 = (γ 1/2 ; u1/2 ).

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.

Proof The one-step map Φh : (x, u) 7→ (b


x, u
b ) given by

x
b = x + hb
u
1 −1

u
b = Cay 2 hM F(x) u

with the Cayley transform Cay(Z) = (I − Z)−1 (I + Z) has the Jacobian


    
I + hK hC I hI I 0
DΦh (x, u) = =
K C 0 I KC
Relativistic charged-particle dynamics 7

u/∂u = Cay 21 hM−1 F(x) . Since F(x) is skew-



with K = ∂bu/∂x and C = ∂b
symmetric and M is symmetric, the matrix Z = 12 hM−1 F(x) trivially satisfies

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.

Long-time near-preservation of the energy H of (2.2) cannot be expected


in general. However, in the special case of a quadratic electric potential φ the
energy is nearly conserved over long times (see Theorem 3.3), and for a linear
potential it is exactly conserved (Remark 4.1). This is different from the non-
relativistic case, where the corresponding leapfrog method, the Boris method
[2], does not preserve energy exactly in the case of a constant electric field.

3.3 Energy behaviour: numerical experiments

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.

Example 3.1 (quadratic electric potential)


 q >
φ(x) = x21 + 2x22 + 3x23 − x1 , B(x) = 0, 0, x21 + x22

with initial values x(0) = (0, 1, 0.1)> , u(0) = (0.09, 0.05, 0.2)> .

Example 3.2 (non-quadratic electric potential)


 q >
φ(x) = x31 − x32 + x41 /5 + x42 + x43 , B(x) = 0, 0, x21 + x22

with initial values x(0) = (0, 1, 0.1)> , u(0) = (0.09, 0.55, 0.3)> .

Example 3.3 (constant magnetic field)


>
φ(x) = x31 − x32 + x41 /5 + x42 + x43 , B(x) = 0, 0, 1
and initial values as in Example 3.2, but with perturbations k · 10−15 for
k = 0, 1, 2, 3, 4 added to the second component of x(0).
8 E. Hairer, Ch. Lubich, Y. Shi

2 h2 step size h = 0.01

Tend = 1 000 000

2 h2 step size h = 0.02

Tend = 1 000 000

2 h2 step size h = 0.04

Tend = 1 000 000

Fig. 3.1 Relative error of the energy (2.2) as a function of the proper time τ for the problem
of Example 3.1.

4 000 h2 step size h = 0.0001

Tend = 100 000

4 000 h2 step size h = 0.0002

Tend = 100 000

4 000 h2 step size h = 0.0004

Tend = 100 000

Fig. 3.2 Relative error of the energy (2.2) as a function of the proper time τ for the problem
of Example 3.2.

In Figure 3.1 we observe long-time near-conservation of energy in the case


of a quadratic electric potential, but in Figure 3.2 a random-walk behaviour is
seen in the case of a non-quadratic electric potential. A random-walk behaviour
Relativistic charged-particle dynamics 9

5 000 h2 step size h = 0.001

Tend = 100 000

5 000 h2 step size h = 0.002

Tend = 100 000

5 000 h2 step size h = 0.004

Tend = 100 000

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].

3.4 Backward error analysis

The explicit leapfrog method can be written as

tn+1 − 2tn + tn−1 n > x


n+1
− xn−1
= E(x )
h2 2h
xn+1 − 2xn + xn−1 n t
n+1
− tn−1 b n) x
n+1
− xn−1
= E(x ) − B(x ,
h2 2h 2h
and we let
tn+1 − tn−1 xn+1 − xn−1
γn = un = .
2h 2h
In the spirit of backward error analysis we search for an h-dependent modified
differential equation such that its solution t(τ ), x(τ ) formally satisfies t(nh) =
10 E. Hairer, Ch. Lubich, Y. Shi

tn and x(nh) = xn :

t(τ + h) − 2t(τ ) + t(τ − h) > x(τ + h) − x(τ − h)


= E x(τ )
h2 2h
x(τ + h) − 2x(τ ) + x(τ − h)  t(τ + h) − t(τ − h)
2
= E x(τ )
h 2h
 x(τ + h) − x(τ − h)
−B
b x(τ ) .
2h
A formal expansion into Taylor series yields (omitting the argument τ )

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

3.4.1 Quadratic electric potential

With a quadratic scalar potential φ(x) we have long-time near-conservation


of the energy H(x, γ) = γ + φ(x) along numerical solutions obtained with the
leapfrog method.

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 ),

H(xn , γ n ) = H(x0 , γ 0 ) + O(h2 ),

over long times nh ≤ h−N for arbitrary N ≥ 1. The constant symbolized by O


is independent of n and h, but depends on the exponent N .

Proof Inserting the first relation of (3.7) into (3.5) yields

h2 ... h2
γ + . . . = E(x)> ẋ + ...
 
γ̇ − x + ... . (3.8)
12 6
Relativistic charged-particle dynamics 11

Along the solution of the modified differential equation we have E(x)> ẋ =


d
− dτ φ(x), and we know from [6] that for a quadratic potential φ(x), the func-
tion E(x)> x(k) can be written as a total differential for odd values of k. Conse-
quently, there exist h-independent functions H2j (x, γ) such that the function

Hh (x, γ) = H(x, γ) + h2 H2 (x, γ) + h4 H4 (x, γ) + . . . ,

truncated at the O(hN ) term, satisfies

d
Hh (x, γ) = O(hN )

along solutions of the modified differential equation. This yields the result as
in [6, Theorem 2.1]. t
u

3.4.2 Constant magnetic field

In the non-relativistic case, the Boris method has long-time near-conservation


of energy also for a constant magnetic field [6, Theorem 2.1]. The numerical
experiments given above indicate that this is no longer true in the relativis-
tic case with the leapfrog method (3.1). Let us explain where the different
behaviour comes from. We write (3.8) as

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

 h2 ... −1  h2 ....  h2 ... >  h2 ... 


ṫ + t +... (ẍ + x + . . . + B(x)
b ẋ + x +... x +...
6 12 6 6

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

d  h2 ...  h2 ... −1 d  


γ + φ(x) − γ + . . . = ṫ + t + ... h2 F2 (x, ẋ, γ) + . . . .
dτ 12 6 dτ

Unfortunately, this relation does not permit us to prove long-time near-conser-


vation of energy for the explicit leapfrog method.
12 E. Hairer, Ch. Lubich, Y. Shi

4 An energy-preserving implicit leapfrog method

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).

Well-known examples are the midpoint discrete gradient [5]

x) − φ(x) − ∇φ(x)T ∆x
φ(b
∇φ(b
x, x) = ∇φ(x) + ∆x
k∆xk2

with x = 12 (b b − x and the average vector field [3]


x + x) and ∆x = x
Z 1
∇φ(b
x, x) = ∇φ(x + θ(b
x − x)) dθ.
0

To obtain an energy-conserving method, we replace (3.1) by

xn+1 − 2xn + xn−1 n x


n+1
− xn−1
M 2
=F , (4.1)
h 2h
where we choose
0 (∇φn )>
 
n
F =
−∇φn −B(x
b n)

with the discrete gradient

∇φn = ∇φ(xn+1/2 , xn−1/2 ) for xn±1/2 = 12 (xn + xn±1 ).


n
The method has a one-step formulation analogous to (3.3), with F instead of
F(xn ). This yields augmented momentum approximations un+1/2 . In contrast
to method (3.3), this method is now implicit in xn+1 , since ∇φn depends on
n
xn+1 . Also note that now xn−1 enters F , and so we do not have a pure
one-step scheme as in the explicit leapfrog method (3.3).

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
 

H(xn+1/2 , γ n+1/2 ) = H(x1/2 , γ 1/2 ).

Proof We note that

un+1/2 + un−1/2 xn+1 − xn−1 xn+1/2 − xn−1/2


= un = = .
2 2h h
Relativistic charged-particle dynamics 13

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.

The discrete-gradient leapfrog method cannot be written as a one-step


method, because ∇φn depends on xn+1 , xn , xn−1 . However, we have the fol-
lowing result.

Theorem 4.2 With every xn in an open subset of R4 , let xn−1 be associ-


ated in a differentiable but otherwise arbitrary way. Then, the one-step map
(xn , un−1/2 ) 7→ (xn+1 , un+1/2 ) of the discrete-gradient leapfrog method is volume-
preserving for any choice of the discrete gradient.
n
Proof The proof follows the lines of the proof of Theorem 3.2, noting that F
is still skew-symmetric and that for any matrix K = ∂b u/∂x the one-step map
is volume-preserving. t
u

5 Variational leapfrog integrator

The variational integrator described here is constructed in the same way as is


done in the interpretation of the Störmer–Verlet–leapfrog method as a vari-
ational integrator; see e.g. [9, Section 1.6]. The integral of the Lagrangian
(2.5) over a time step is approximated in two steps: the path x(t) of posi-
tions is approximated by the linear interpolant of the endpoint positions, and
the integral is approximated by the trapezoidal rule. This yields the following
approximation to the action integral over a time step, the ‘discrete Lagrangian’
h h
Lh (xn , xn+1 ) = L(xn , un+1/2 ) + L(xn+1 , un+1/2 ) (5.1)
2 2

with un+1/2 = xn+1 −xn /h. Extremizing this expression leads to the discrete
Euler-Lagrange equations, which are the equations of the following implicit
14 E. Hairer, Ch. Lubich, Y. Shi

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

So we have proved the following conservation result.

Theorem 5.1 The variational leapfrog integrator preserves the discrete en-
ergy (5.5):
H n+1/2 = H 1/2 for all n.

As long as |xn+1/2 | ≤ M0 and |un+1/2 | ≤ M1 , Taylor expansion of φ(x) at


xn+1/2
using xn+1/2±1/2 = xn+1/2 ± 12 hun+1/2 shows that

H n+1/2 = H(xn+1/2 , γ n+1/2 ) + O(h2 ),

and hence Theorem 5.1 yields near-conservation of the energy (2.2) up to


O(h2 ):
H(xn+1/2 , γ n+1/2 ) = H(x1/2 , γ 1/2 ) + O(h2 ), (5.6)
where the constant symbolized by O is independent of h and n, but depends
on the bounds M0 and M1 .
For the mass-shell we have the following near-conservation result over ex-
ponentially long times.

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 ),

H(un+1/2 ) = H(u1/2 ) + O(h2 ),

where the constant symbolized by O is independent of n and h over exponen-


tially long times nh ≤ ec/h with c > 0.

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

Remark 5.2 The invariant I of (2.8) in the case of a Lorentz-invariant 4D


vector potential A(x) satisfying (2.7) is exactly preserved by the variational
integrator:
I(xn , pn ) = I(x0 , p0 ) for all n.

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

In the case of a small momentum u = εeu with ε  1 and moderately bounded


u
e we have
p
u|2 = 1 + 12 ε2 |e
γ = 1 + ε2 |e u|2 + O(ε4 ).

With a small potential that scales as φ(x) = ε2 φ(x)


e with moderately bounded
φ,
e the energy is

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

On an interval of length τ = o(ε−2 ), and under the assumption of bounded


x(τ ) and (rescaled) u(τ ) on this interval, we obtain

ṫ = γ = 1 + O(ε2 τ ).

In the limit ε → 0, we thus obtain γ = 1 and t = τ and the familiar classical


equations of motion of a charged particle,

ẋ = 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,

xn+1 − 2xn + xn−1 n xn+1 − xn−1


= E(x ) + × B(xn ).
h2 2h
For the energy-conserving leapfrog method the limit equation is similar, just
with the discrete gradient −∇φn instead of E(xn ) = −∇φ(xn ). This method
preserves the energy 12 |v n+1/2 |2 + φ(xn+1/2 ) for all n.
For the variational leapfrog method the limit equation is
xn+1 − 2xn + xn−1 n xn+1 − xn−1
= E(x ) + × B(xn )
h2 2h
xn+1 − xn−1 A(xn+1 ) − A(xn−1 )
+ A0 (xn ) − ,
2h 2h
which is the variational integrator for the non-relativistic equations of motion
considered in [7, 8, 21].

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

1. G. Benettin and A. Giorgilli. On the Hamiltonian interpolation of near to the identity


symplectic mappings with application to symplectic integration algorithms. J. Statist.
Phys., 74:1117–1143, 1994.
2. J. P. Boris. Relativistic plasma simulation-optimization of a hybrid code. Proceeding of
Fourth Conference on Numerical Simulations of Plasmas, pages 3–67, November 1970.
3. E. Celledoni, V. Grimm, R. McLachlan, D. McLaren, D. O’Neale, B. Owren, and
G. Quispel. Preserving energy resp. dissipation in numerical PDEs using the “aver-
age vector field” method. J. Comput. Phys., 231(20):6770–6789, 2012.
4. H. Goldstein, C. Poole, and J. Safko. Classical Mechanics. Pearson Education India,
2011.
5. O. Gonzalez. Time integration and discrete Hamiltonian systems. J. Nonlinear Sci.,
6:449–467, 1996.
6. E. Hairer and C. Lubich. Energy behaviour of the Boris method for charged-particle
dynamics. BIT, 58:969–979, 2018.
7. E. Hairer and C. Lubich. Long-term analysis of a variational integrator for charged-
particle dynamics in a strong magnetic field. Numer. Math., 144(3):699–728, 2020.
8. E. Hairer, C. Lubich, and Y. Shi. Large-stepsize integrators for charged-particle dy-
namics over multiple time scales. Numer. Math., 151(3):659–691, 2022.
9. E. Hairer, C. Lubich, and G. Wanner. Geometric numerical integration illustrated by
the Störmer–Verlet method. Acta Numerica, 12:399–450, 2003.
18 E. Hairer, Ch. Lubich, Y. Shi

10. E. Hairer, C. Lubich, and G. Wanner. Geometric Numerical Integration. Structure-


Preserving Algorithms for Ordinary Differential Equations. Springer Series in Compu-
tational Mathematics 31. Springer-Verlag, Berlin, 2nd edition, 2006.
11. Y. He, Y. Sun, R. Zhang, Y. Wang, J. Liu, and H. Qin. High order volume-preserving
algorithms for relativistic charged particles in general electromagnetic fields. Physics of
Plasmas, 23(9):092109, 2016.
12. A. V. Higuera and J. R. Cary. Structure-preserving second-order integration of rel-
ativistic charged particle trajectories in electromagnetic fields. Physics of Plasmas,
24(5):052104, 2017.
13. J. D. Jackson. Classical Electrodynamics. Wiley, Singapore, 3rd edition, 1999.
14. S. Maeda. Lagrangian formulation of discrete systems and concept of difference space.
Math. Japonica, 27:345–356, 1982.
15. A. Matsuyama and M. Furukawa. High-order integration scheme for relativistic charged
particle motion in magnetized plasmas with volume preserving properties. Computer
Physics Comm., 220:285–296, 2017.
16. B. Ripperda, F. Bacchini, J. Teunissen, C. Xia, O. Porth, L. Sironi, G. Lapenta, and
R. Keppens. A comprehensive comparison of relativistic particle integrators. The As-
trophysical Journal Supplement Series, 235(1):21, 2018.
17. J.-L. Vay. Simulation of beams or plasmas crossing at relativistic velocity. Physics of
Plasmas, 15(5):056701, 2008.
18. L. Verlet. Computer “experiments” on classical fluids. I. Thermodynamical properties
of Lennard-Jones molecules. Physical Review, 159:98–103, 1967.
19. Y. Wang, J. Liu, and Y. He. High order explicit Lorentz invariant volume-preserving
algorithms for relativistic dynamics of charged particles. J. Comput. Phys., 439:110383,
2021.
20. Y. Wang, J. Liu, and H. Qin. Lorentz covariant canonical symplectic algorithms for
dynamics of charged particles. Physics of Plasmas, 23(12):122513, 2016.
21. S. D. Webb. Symplectic integration of magnetic systems. J. Comput. Phys., 270:570–
576, 2014.
22. J. Xiao and H. Qin. Explicit high-order gauge-independent symplectic algorithms for
relativistic charged particle dynamics. Computer Physics Comm., 241:19–27, 2019.
23. R. Zhang, J. Liu, H. Qin, Y. Wang, Y. He, and Y. Sun. Volume-preserving algorithm
for secular relativistic dynamics of charged particles. Physics of Plasmas, 22(4):044501,
2015.

You might also like