Skip to main content
  • Technical report
  • Open access
  • Published:

Advanced numerical techniques for time integration of relativistic equations of motion for charged particles

Abstract

Advanced numerical techniques for solving the relativistic equations of motion for charged particles are provided. A new fourth-order integrator is developed by combining the Taylor series expansion of the numerical angle of relativistic gyration and the fourth-order Runge–Kutta method for integrating the Lorentz factor. The new integrator gives the exact relativistic E-cross-B drift velocity, but has a numerical accuracy much higher than the classic fourth-order Runge–Kutta integrator.

Graphical Abstract

Background

The relativistic equations of motion for charged particles are important for planetary and space science studies, especially for relativistic particle accelerations at collisionless shocks (Umeda and Yamazaki 2006; Nakanotani et al. 2018) and in planetary radiation belts (Katoh 2014; Katoh and Omura 2016; Hiraga and Omura 2020; Omura 2021; Fujiwara et al. 2022). The classic fourth-order Runge–Kutta integrator (RK4) (Runge 1895; Kutta 1901) has been used over many years for solving the relativistic equations of motion for charged particles. Although RK4 has a high numerical accuracy, it does not satisfy any of conservation laws.

As an alternative to RK4, the Boris integrator (Boris 1970) has been used over fifty years in particle-in-cell simulations. The Boris integrator has the second-order accuracy in time. The Boris integrator conserves the kinetic energy during the gyration of charged particles in a magnetic field. This property makes the phase-space trajectories of particles with the Boris integrator more accurate than with the classic RK4 in a long-term time integration (Qin et al. 2013; He et al. 2015). The Boris integrator also provides the exact non-relativistic \(E \times B\) drift velocity. It has been known, however, that the Boris integrator has a numerical error in the gyration angle per time step.

It is also known that the Boris integrator has a large numerical error in the drift velocity of the relativistic \(E \times B\) drift (Vay 2008; Zhang et al. 2015; Higuera and Cary 2017; Ripperda et al. 2018). There have been several attempts for obtaining a more accurate relativistic \(E \times B\) drift velocity, such as the Vay integrator (Vay 2008) and the Higuera–Cary integrator (Higuera and Cary 2017). These explicit integrators reduce numerical errors in the phase-space trajectories of particles when a particle velocity vector is close to the guiding-center velocity vector only. For a velocity vector far from the guiding-center velocity vector, a numerical error in the phase-space trajectories of particles with the Boris integrator is smaller than that with the Vay or the Higuera–Cary integrators.

Based on the analytic solution to the relativistic \(E \times B\) drift motion, a new explicit integrator for the relativistic equations of motion for a charged particle has been developed recently (Umeda 2023). The new integrator (hereafter the Umeda integrator) has the second-order accuracy in time and provides the exact relativistic \(E \times B\) drift velocity. However, the Umeda integrator has a numerical error in the gyration angle per time step as the Boris integrator. A purpose of the present study is to increase the numerical accuracy of the Umeda integrator.

Brief introduction to the Umeda integrator

Let us start with the relativistic equations of motion for a charged particle with a position vector \(\varvec{r}\), a velocity vector \(\varvec{v}\), a mass m, and a charge q, which expresses the acceleration of charged particles by electric field \(\varvec{E}\) and magnetic field \(\varvec{B}\):

$$\begin{aligned}{} & {} \frac{\textrm{d}\varvec{r}}{\textrm{d}t} = \varvec{v}, \end{aligned}$$
(1a)
$$\begin{aligned}{} & {} \frac{\textrm{d}}{\textrm{d}t}(\gamma \varvec{v}) = \frac{q}{m}(\varvec{E}+\varvec{v}\times \varvec{B}), \end{aligned}$$
(1b)

where \(\gamma\) is the relativistic Lorentz factor given as:

$$\begin{aligned} \gamma = \frac{c}{\sqrt{c^2-|\varvec{v}|^2}}, \end{aligned}$$
(2)

with c being the speed of light.

To simplify Eq.(1b), a motion of a charged particle is separated into motions in the directions parallel and perpendicular to a magnetic field. The velocity components parallel and perpendicular to a magnetic field are given as follows:

$$\begin{aligned}{} & {} \varvec{v}_\parallel = \frac{ (\varvec{v}\cdot \varvec{B})\varvec{B} }{|\varvec{B}|^2}, \end{aligned}$$
(3a)
$$\begin{aligned}{} & {} \varvec{v}_{\perp } = \varvec{v} - \varvec{v}_\parallel = - \frac{ (\varvec{v}\times \varvec{B})\times \varvec{B} }{|\varvec{B}|^2}. \end{aligned}$$
(3b)

Then, Eq.(1b) is separated into two components parallel and perpendicular to the magnetic field as follows:

$$\begin{aligned}{} & {} \frac{\textrm{d} \varvec{u}_\parallel }{\textrm{d}t} = \frac{q}{m} \varvec{E}_\parallel , \end{aligned}$$
(4a)
$$\begin{aligned}{} & {} \frac{\textrm{d} \varvec{u}_\perp }{\textrm{d}t} = \frac{q}{m} \left( \varvec{v} \times \varvec{B} \right) + \frac{q}{m} \varvec{E}_{\perp } =\frac{q}{m} \left\{ (\varvec{v} - \varvec{v}_E ) \times \varvec{B} \right\} \nonumber \\{} & {} \quad = \frac{q}{m} \left( \varvec{v} \times \varvec{B} \right) - \frac{q}{m} \left( \frac{\varvec{E} \times \varvec{B}}{|\varvec{B}|^2} \times \varvec{B} \right) = \frac{q}{m} \left( \varvec{v} \times \varvec{B} \right) + \frac{q}{m} \left\{ \varvec{E} - \frac{(\varvec{E} \cdot \varvec{B})\varvec{B}}{|\varvec{B}|^2} \right\} , \end{aligned}$$
(4b)

where \(\varvec{u} \equiv \gamma \varvec{v}\) is a momentum vector and \(\varvec{v}_E\) is the \(E \times B\) drift velocity vector

$$\begin{aligned} \varvec{v}_E = \frac{\varvec{E} \times \varvec{B}}{|\varvec{B}|^2}, \end{aligned}$$

with \(\varvec{E}_\parallel\) and \(\varvec{E}_\perp\) being the electric field components parallel and perpendicular to the magnetic field, respectively,

$$\begin{aligned}{} & {} \varvec{E}_\parallel = \frac{(\varvec{E} \cdot \varvec{B})\varvec{B}}{|\varvec{B}|^2}, \\{} & {} \varvec{E}_\perp = \varvec{E} - \varvec{E}_\parallel = - \frac{(\varvec{E} \times \varvec{B}) \times \varvec{B}}{|\varvec{B}|^2} = - \varvec{v}_E \times \varvec{B}. \end{aligned}$$

Let us take a coordinate system such that \(\varvec{B} \parallel z\) and \(\varvec{E} \parallel y\) (i.e., \(\varvec{E} \times \varvec{B} \parallel x\)). For the relativistic \(E \times B\) drift (i.e., \(c|\varvec{B}|>|\varvec{E}|\)) with a constant electromagnetic field, the perpendicular component of the momentum vector in the present coordinate system, i.e., \(\varvec{u}_\perp =(u_x,u_y)\) moves along the following elliptical trajectory (Friedman and Semon 2005):

$$\begin{aligned} \left( u_x-\gamma _B\gamma _Ev_E\right) ^2 + \gamma _E^2u_y^2 = C, \end{aligned}$$
(5)

where C is a constant, \(\gamma _E\) is the Lorentz factor of the \(E\times B\) drift velocity \(v_E = E_y/B_z\),

$$\begin{aligned} \gamma _E \equiv \frac{c}{\sqrt{c^2-v_E^2}}, \end{aligned}$$

and \(\gamma _B\) is a correction factor due to the gradient-B-type drift caused by \(\textrm{d}\gamma /\textrm{d}t \ne 0\), which is also known as a “boosted” Lorentz factor (Ripperda et al. 2018):

$$\begin{aligned} \gamma _B \equiv \frac{c^2-v_Ev_x}{\sqrt{ (c^2-v_E^2)(c^2-v_x^2-v_y^2-v_z^2) }} \equiv \gamma _E\left( \gamma -\frac{\varvec{v}_E\cdot \varvec{u}}{c^2} \right) . \end{aligned}$$
(6)

The boosted Lorentz factor is constant on the elliptical trajectory in Eq.(5), which is obtained by taking the time derivative of \(\gamma _B\) as follows:

$$\begin{aligned} \frac{\varvec{v}_E}{c^2} \cdot \frac{\textrm{d}\varvec{u}}{\textrm{d}t} = \frac{\varvec{E} \times \varvec{B} }{c^2|\varvec{B}|^2} \cdot \frac{q}{m} \left( \varvec{E} + \varvec{v} \times \varvec{B} \right) = \frac{q}{mc^2|\varvec{B}|^2} \left( \varvec{E}\times \varvec{B}\right) \cdot \left( \varvec{v}\times \varvec{B}\right) = \frac{q}{mc^2} \varvec{E} \cdot \varvec{v} = \frac{\textrm{d}\gamma }{\textrm{d}t}. \end{aligned}$$

Here, a similar approach to Zenitani and Umeda (2018) for the Boris integrator is used. The elliptical trajectory in the \(u_x-u_y\) space is written by using the elliptical rotation matrix as follows:

$$\begin{aligned} \left( \begin{array}{c} u_x^{t+\frac{\Delta t}{2}} - \gamma _B\gamma _Ev_E \\ u_y^{t+\frac{\Delta t}{2}} \end{array}\right) = \left( \begin{array}{cc} \cos \left( \frac{\omega _c\Delta \tau }{\gamma _E}\right) &{} \gamma _E \sin \left( \frac{\omega _c\Delta \tau }{\gamma _E}\right) \\ -\frac{1}{\gamma _E} \sin \left( \frac{\omega _c\Delta \tau }{\gamma _E}\right) &{} \cos \left( \frac{\omega _c\Delta \tau }{\gamma _E}\right) \\ \end{array}\right) \left( \begin{array}{c} u_x^{t-\frac{\Delta t}{2}} - \gamma _B\gamma _Ev_E \\ u_y^{t-\frac{\Delta t}{2}} \end{array}\right) , \end{aligned}$$

where \(\omega _c \equiv q|\varvec{B}|/m\) is the gyro frequency and \(\tau\) is the proper time in relativity,

$$\begin{aligned} \int _{\tau -\frac{\Delta \tau }{2}}^{\tau +\frac{\Delta \tau }{2}} \gamma (\tau ') \textrm{d}\tau ' = \left( t + \frac{\Delta t}{2} \right) - \left( t - \frac{\Delta t}{2} \right) = \Delta t. \end{aligned}$$
(7)

This is rewritten by using the half-angle formula of trigonometric functions together with Eq.(6) as follows:

$$\begin{aligned}{} & {} \left( \begin{array}{c} u_x^{t+\frac{\Delta t}{2}} \\ u_y^{t+\frac{\Delta t}{2}} \end{array}\right) = \left( \begin{array}{c} u_x^{t-\frac{\Delta t}{2}} \\ u_y^{t-\frac{\Delta t}{2}} \end{array}\right) - \left( \begin{array}{cc} \displaystyle \frac{2\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) }{1+\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) } &{} \displaystyle - \gamma _E \frac{2\tan \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) }{1+\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) } \\ \displaystyle \gamma _E \frac{2\tan \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) }{1+\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) } &{} \displaystyle \frac{2\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) }{1+\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) } \\ \end{array}\right) \left( \begin{array}{c} u_x^{t-\frac{\Delta t}{2}} \\ u_y^{t-\frac{\Delta t}{2}} \end{array}\right) \nonumber \\{} & {} \quad + \left( \begin{array}{cc} \displaystyle \gamma _B \frac{2\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) }{1+\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) } &{} \displaystyle -\gamma ^{t-\frac{\Delta t}{2}} \frac{2\tan \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) }{1+\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) } \\ \displaystyle \gamma ^{t-\frac{\Delta t}{2}} \frac{2\tan \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) }{1+\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) } &{} \displaystyle \gamma _B \frac{2\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) }{1+\tan ^2 \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) } \end{array}\right) \left( \begin{array}{c} \gamma _Ev_E \\ 0 \end{array}\right) . \end{aligned}$$
(8)

The gyration angle per proper time step \(\Delta \tau\) is approximated as:

$$\begin{aligned} \tan \left( \frac{\omega _c\Delta \tau }{2\gamma _E}\right) \approx \frac{q\Delta \tau }{2m\gamma _E}|\varvec{B}|. \end{aligned}$$

Equation (8) is then rewritten in the following vector form:

$$\begin{aligned}{} & {} \varvec{u}_\perp ^{t+\frac{\Delta t}{2}} = \varvec{u}_\perp ^{t-\frac{\Delta t}{2}} - 2\beta _U \left( \frac{q\Delta \tau }{2m\gamma _E} |\varvec{B}| \right) ^2 \varvec{u}^{t-\frac{\Delta t}{2}}_\perp + \beta _U \frac{q\Delta \tau }{m} \left( \varvec{u}^{t-\frac{\Delta t}{2}} \times \varvec{B} \right) \nonumber \\{} & {} \quad +2\beta _U \frac{\gamma _B}{\gamma _E} \left( \frac{q\Delta \tau }{2m} |\varvec{B}| \right) ^2 \varvec{v}_E - \beta _U \gamma ^{t-\frac{\Delta t}{2}} \frac{q \Delta \tau }{m} \left( \varvec{v}_E \times \varvec{B} \right) , \end{aligned}$$
(9)

where

$$\begin{aligned} \beta _U = \frac{1}{1+\left( \frac{q\Delta \tau }{2m\gamma _E} |\varvec{B}| \right) ^2}. \end{aligned}$$

The time-development equation for the momentum vector \(\varvec{u}\) is obtained by adding the momentum component parallel to the ambient magnetic field \(\varvec{u}_\parallel\) to Eq.(9):

$$\begin{aligned}{} & {} \varvec{u}^{t+\frac{\Delta t}{2}} = \varvec{u}^{t-\frac{\Delta t}{2}} + \frac{q\Delta t}{m}\varvec{E} + \beta _U \frac{q\Delta \tau }{m} \left( \varvec{u}^{t-\frac{\Delta t}{2}} \times \varvec{B} \right) + 2\beta _U \left( \frac{q\Delta \tau }{2m\gamma _E} \right) ^2 \nonumber \\{} & {} \quad \left\{ \left( \varvec{u}^{t-\frac{\Delta t}{2}} \times \varvec{B} \right) \times \varvec{B} \right\} \nonumber \\{} & {} \quad +2\beta _U \frac{\gamma _B}{\gamma _E} \left( \frac{q\Delta \tau }{2m} |\varvec{B}| \right) ^2 \varvec{v}_E + \left( \frac{q\Delta t}{m} - \beta _U \gamma ^{t-\frac{\Delta t}{2}} \frac{q \Delta \tau }{m} \right) \left( \varvec{v}_E \times \varvec{B} \right) . \end{aligned}$$
(10)

The proper time step is approximated by:

$$\begin{aligned} \int _{\tau -\frac{\Delta \tau }{2}}^{\tau +\frac{\Delta \tau }{2}} \gamma (\tau ') \textrm{d}\tau ' \approx \Gamma \Delta \tau = \Delta t. \end{aligned}$$
(11)

The previous study (Umeda 2023) chose

$$\begin{aligned} \Gamma = \gamma _- \equiv \frac{\sqrt{c^2+\left| \varvec{u}^{t-\frac{\Delta t}{2}} + \frac{q\Delta t}{{2}m}\varvec{E} \right| ^2}}{c}, \end{aligned}$$

which has been used in the Boris integrator (Boris 1970).

Note that the Boris integrator (Boris 1970) is also rewritten with the same form as Eq.(10):

$$\begin{aligned}{} & {} \varvec{u}^{t+\frac{\Delta t}{2}} = \varvec{u}^{t-\frac{\Delta t}{2}} + \frac{q\Delta t}{m}\varvec{E} + \beta _B \frac{q\Delta t}{m\gamma _-} \left( \varvec{u}^{t-\frac{\Delta t}{2}} \times \varvec{B} \right) + 2\beta _B \left( \frac{q\Delta t}{2m\gamma _-} \right) ^2 \nonumber \\{} & {} \quad \left\{ \left( \varvec{u}^{t-\frac{\Delta t}{2}} \times \varvec{B} \right) \times \varvec{B} \right\} \nonumber \\{} & {} \quad +2\beta _B \gamma _- \left( \frac{q\Delta t}{2m\gamma _-} |\varvec{B}| \right) ^2 \varvec{v}_E + \frac{q\Delta t}{m} \left( 1 - \beta _B \right) \left( \varvec{v}_E \times \varvec{B} \right) , \end{aligned}$$
(12)

where

$$\begin{aligned} \beta _B = \frac{1}{1+\left( \frac{q\Delta t}{2m\gamma _-} |\varvec{B}| \right) ^2}. \end{aligned}$$

The Umeda integrator (Umeda 2023) corresponds to the Boris integrator (Boris 1970) if \(\varvec{E}=0\). The Umeda integrator also approaches to the non-relativistic Boris integrator as \(c \rightarrow \infty\) (i.e., \(\gamma \rightarrow 1\)).

Construction of higher-order integrator

For an arbitrary time step \(\Delta t\), the momentum vector \(\varvec{u}\) obtained with the Umeda integrator (Umeda 2023) is always on the elliptical trajectory, which is the analytic solution to the relativistic \(E \times B\) drift in a uniform and constant electromagnetic field. That is, the Umeda integrator satisfies \(\textrm{d}\gamma _B/\textrm{d}t = 0\) and gives the exact relativistic \(E \times B\) drift velocity. However, a numerical error in the gyration angle becomes larger as the time step \(\Delta t\) becomes larger. Below, numerical techniques for reducing numerical errors are given.

Taylor series expansion of tangent function

The Taylor series expansion of the tangent function in Eq.(8) with Eq.(11) is given as follows (Kato and Zenitani 2021):

$$\begin{aligned} \tan \left( \frac{q\Delta \tau }{2m\gamma _E} |\varvec{B}| \right) \approx \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \left\{ 1 + \frac{1}{3} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^2 + \frac{2}{15} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^4 + \cdots \right\} .\nonumber \\ \end{aligned}$$
(13)

The Boris integrator (Boris 1970) and the previous study (Umeda 2023) used the first (i.e., \(\Delta t\)) term only. The time-development equation for the momentum vector \(\varvec{u}\) is written in the following form by using Eq.(13):

$$\begin{aligned}{} & {} \varvec{u}^{t+\frac{\Delta t}{2}} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{1}{\Gamma },\Delta t\right) , \end{aligned}$$
(14a)
$$\begin{aligned}{} {} {{\mathcal {F}}}\left( \frac{1}{\Gamma },\Delta t\right) & \equiv \frac{q\Delta t}{m}\varvec{E} + f_1 \left( \varvec{u}^{t-\frac{\Delta t}{2}} \times \varvec{B} \right) + f_2 \left\{ \left( \varvec{u}^{t-\frac{\Delta t}{2}} \times \varvec{B} \right) \times \varvec{B} \right\} \nonumber \\{} & {} \quad + f_3 \varvec{v}_E + f_4 \left( \varvec{v}_E \times \varvec{B} \right) , \end{aligned}$$
(14b)
$$\begin{aligned}{} {} f_1 & = \frac{ \gamma _E }{|\varvec{B}|} \sin \left( \frac{q\Delta t}{m\gamma _E\Gamma } |\varvec{B}| \right) = 2\beta _U \frac{ \gamma _E }{|\varvec{B}|} \tan \left( \frac{q\Delta t}{2m\gamma _E\Gamma } |\varvec{B}| \right) \nonumber \\{} \hfill \\ & \approx \beta _U \frac{q\Delta t}{m\Gamma } \left\{ 1 + \frac{1}{3} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^2 + \frac{2}{15} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^4 + \cdots \right\} , \end{aligned}$$
(14c)
$$\begin{aligned}{} & {} f_2 = \frac{ 1}{|\varvec{B}|^2} \left\{ 1-\cos \left( \frac{q\Delta t}{m\gamma _E\Gamma } |\varvec{B}| \right) \right\} = 2\beta _U \frac{ 1 }{|\varvec{B}|^2} \tan ^2\left( \frac{q\Delta t}{2m\gamma _E\Gamma } |\varvec{B}| \right) \nonumber \\{} & {} \quad \approx 2\beta _U \left( \frac{q\Delta t}{2m\gamma _E\Gamma } \right) ^2 \left\{ 1 + \frac{1}{3} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^2 + \frac{2}{15} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^4 + \cdots \right\} ^2, \end{aligned}$$
(14d)
$$\begin{aligned}{} & {} f_3 = \gamma _B\gamma _E \left\{ 1-\cos \left( \frac{q\Delta t}{m\gamma _E\Gamma } |\varvec{B}| \right) \right\} = 2\beta _U \gamma _B\gamma _E \tan ^2\left( \frac{q\Delta t}{2m\gamma _E\Gamma } |\varvec{B}| \right) \nonumber \\{} & {} \quad \approx 2\beta _U \frac{\gamma _B}{\gamma _E} \left( \frac{q\Delta t}{2m\Gamma } |\varvec{B}| \right) ^2 \left\{ 1 + \frac{1}{3} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^2 + \frac{2}{15} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^4 + \cdots \right\} ^2, \end{aligned}$$
(14e)
$$\begin{aligned}{} & {} f_4 = \frac{q\Delta t}{m} - \frac{\gamma ^{t-\frac{\Delta t}{2}} \gamma _E }{|\varvec{B}|}\sin \left( \frac{q\Delta t}{m\gamma _E\Gamma } |\varvec{B}| \right) = \frac{q\Delta t}{m} - 2\beta _U \frac{\gamma ^{t-\frac{\Delta t}{2}} \gamma _E }{|\varvec{B}|} \tan \left( \frac{q\Delta t}{2m\gamma _E\Gamma } |\varvec{B}| \right) \nonumber \\{} & {} \quad \approx \frac{q\Delta t}{m} \left[ 1 - \beta _U \frac{\gamma ^{t-\frac{\Delta t}{2}}}{\Gamma } \left\{ 1 + \frac{1}{3} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^2 + \frac{2}{15} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^4 + \cdots \right\} \right] , \end{aligned}$$
(14f)
$$\begin{aligned}{} & {} \beta _U = \frac{1}{\displaystyle 1 + \tan ^2\left( \frac{q\Delta t}{2m\gamma _E\Gamma } |\varvec{B}| \right) }\nonumber \\{} & {} \quad \approx \frac{1}{\displaystyle 1 + \left( \frac{q\Delta t}{2m\gamma _E\Gamma } |\varvec{B}| \right) ^2 \left\{ 1 + \frac{1}{3} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^2 + \frac{2}{15} \left( \frac{q\Delta t}{2m\gamma _E\Gamma }|\varvec{B}| \right) ^4 + \cdots \right\} ^2 }. \end{aligned}$$
(14g)

Here, an operator \({{\mathcal {F}}}\) with arguments of \(1/\Gamma\) and \(\Delta t\) is defined for simplicity. The operator \({{\mathcal {F}}}\) has three forms as described below.

Taylor series expansion: If \(\gamma _E^2>1\), i.e., \(|\varvec{v}_E| < c\), the numerical error of the Taylor series expansion from the tangent function becomes larger as the argument \(\frac{q\Delta t}{2m\gamma _E\Gamma } |\varvec{B}|\) approaches to \(\pi /2\), which appears as a numerical error in the gyration angle. The operator \({{\mathcal {F}}}\) with the Taylor series expansion has an upper-bound in the numerical gyration angle per time step, \(\frac{q}{m\gamma _E\Gamma } |\varvec{B}|\Delta t <\pi\). If \(\gamma _E^2=\infty\), i.e., \(|\varvec{v}_E| = c\), \(\gamma _E\) disappears from the numerator of the operator \({{\mathcal {F}}}\) with the Taylor series expansion. Hence, the operator \({{\mathcal {F}}}\) is computationally stable. If \(\gamma _E^2<0\), i.e., \(|\varvec{v}_E| > c\); however, the operator \({{\mathcal {F}}}\) with the Taylor series expansion becomes unstable numerically for \(\beta _U<0\), i.e., \(\left( \frac{q\Delta t}{2m\gamma _E\Gamma } |\varvec{B}| \right) ^2 \le -1\) (Umeda 2023). Although higher-order terms of the Taylor series relax the numerically unstable condition, a safety factor given in the previous study (Umeda 2023) is necessary to avoid the numerical instability.

Tangent function: If \(\gamma _E^2>1\), i.e., \(|\varvec{v}_E| < c\), the tangent function leads to overflow or underflow at \(\frac{q\Delta t}{2m\gamma _E\Gamma } |\varvec{B}| = \pi /2\) with some compilers. It is recommended to use cosine and sine functions instead. If \(\gamma _E^2=\infty\), i.e., \(|\varvec{v}_E| = c\), \(\gamma _E\tan \left( \frac{q\Delta t}{2m\gamma _E\Gamma } |\varvec{B}| \right)\) in Eq.(14) is replaced with \(\frac{q\Delta t}{2m\Gamma }|\varvec{B}|\). If \(\gamma _E^2<0\), i.e., \(|\varvec{v}_E| > c\), \(\tan \theta\) in Eq.(14) is replaced with \(-\iota \tanh (\iota \theta )\), where \(\iota\) is the imaginary unit. The operator \({{\mathcal {F}}}\) with the hyperbolic tangent function is computationally stable, since \(\tanh ^2(\iota \theta ) < 1\).

Cosine and sine functions: If \(\gamma _E^2>1\), i.e., \(|\varvec{v}_E| < c\), the cosine and sine functions do not lead to overflow or underflow for any argument. If \(\gamma _E^2=\infty\), i.e., \(|\varvec{v}_E| = c\), \(\gamma _E\sin \left( \frac{q\Delta t}{m\gamma _E\Gamma } |\varvec{B}| \right)\) and \(\gamma _E^2\left\{ 1-\cos \left( \frac{q\Delta t}{m\gamma _E\Gamma } |\varvec{B}| \right) \right\}\) in Eq.(14) is replaced with \(\frac{q\Delta t}{m\Gamma }|\varvec{B}|\) and \(2\left( \frac{q\Delta t}{2m\Gamma } |\varvec{B}| \right) ^2\), respectively. That is, \(f_1= \frac{q\Delta t}{m\Gamma }\), \(f_2=f_3=0\), and \(f_4=\frac{q\Delta t}{m}\left( 1-{\gamma ^{t+\frac{\Delta t}{2}}}/{\Gamma }\right)\). If \(\gamma _E^2<0\), i.e., \(|\varvec{v}_E| > c\), \(\sin \theta\) and \(\cos \theta\) in Eq.(14) is replaced with \(-\iota \sinh (\iota \theta )\) and \(\cosh (\iota \theta )\), respectively. The operator \({{\mathcal {F}}}\) with the hyperbolic cosine and sine functions is computationally stable as well.

Multi-stepping with Runge–Kutta methods

To evaluate \(\Gamma\) in Eq.(14) more accurately, the time integration of \(\gamma\) in Eq.(11) is performed with multi-step (or multi-stage) numerical integrators based on the Runge–Kutta methods (Runge 1895; Kutta 1901; Butcher 1996). This subsection provides the numerical integration with the classic fourth-order Runge–Kutta (RK4) method. The multi-step numerical integrations with other methods, i.e., Euler integrator, mid-point rule, trapezoidal rule, Heun3 integrator (Heun 1900), RK3 integrator (Kutta 1901), and Kutta-3/8 rule (Kutta 1901), are provided in Appendix A.

RK4 integrator is widely used in scientific computing in various fields, which has the fourth-order accuracy in time (Kutta 1901). The momentum vector at time \(t_1 \approx t\) is estimated with the Euler integrator at the first step. The momentum vector at time \(t_2 \approx t\) is re-estimated with the mid-point rule at the second step. The momentum vector at time \(t_3 \approx t + \Delta t/2\) is estimated with the mid-point rule at the third step. Then, the time integration is performed based on the Simpson integration rule by using \(1/\gamma ^{t-\frac{\Delta t}{2}}\), \(1/\gamma ^{t_1}\) and \(1/\gamma ^{t_2}\) (at time t), and \(1/\gamma ^{t_3}\) (at time \(t+\Delta t/2\)). Finally, the momentum vector at time \(t+\Delta t/2\) is obtained at the fourth step as follows:

$$\begin{aligned}{} & {} \varvec{u}^{t_1} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\frac{\Delta t}{2}\right) , \end{aligned}$$
(15a)
$$\begin{aligned}{} & {} \varvec{u}^{t_2} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t_1}\right| ^2 }}, \frac{\Delta t}{2} \right) , \end{aligned}$$
(15b)
$$\begin{aligned}{} & {} \varvec{u}^{t_3} = \varvec{u}^{t-\frac{\Delta t}{2}} + \mathcal{F}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t_2}\right| ^2 }}, \Delta t \right) , \end{aligned}$$
(15c)
$$\begin{aligned}{} & {} \varvec{u}^{t+\frac{\Delta t}{2}} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{6\sqrt{c^2 + \left| \varvec{u}^{t_3}\right| ^2 }} + \frac{c}{3\sqrt{c^2 + \left| \varvec{u}^{t_2}\right| ^2 }} + \frac{c}{3\sqrt{c^2 + \left| \varvec{u}^{t_1}\right| ^2 }} \right. \nonumber \\{} & {} \quad \left. + \frac{c}{6\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\Delta t \right) , \end{aligned}$$
(15d)
$$\begin{aligned}{} & {} \varvec{r}^{t+\frac{\Delta t}{2}} = \varvec{r}^{t-\frac{\Delta t}{2}} \nonumber \\{} & {} \quad + \frac{\Delta t}{6} \left( \frac{c\varvec{u}^{t_3}}{\sqrt{c^2 + \left| \varvec{u}^{t_3}\right| ^2 }} + \frac{2c\varvec{u}^{t_2}}{\sqrt{c^2 + \left| \varvec{u}^{t_2}\right| ^2 }} + \frac{2c\varvec{u}^{t_1}}{\sqrt{c^2 + \left| \varvec{u}^{t_1}\right| ^2 }} + \frac{c\varvec{u}^{t-\frac{\Delta t}{2}}}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }} \right) . \end{aligned}$$
(15e)

Numerical tests

Numerical errors of the present integrators from the theoretical solution to the relativistic \(E \times B\) drift in a uniform and constant electromagnetic field (Friedman and Semon 2005; Umeda 2023) are examined. For evaluating the relativistic gyration angle, the \(\Delta t\) term only, up to \(\Delta t^3\) terms, up to \(\Delta t^5\) terms of the Taylor series, and the tangent function are used. For the integration of \(1/\Gamma\), Euler, mid-point, trapezoidal, Heun3, RK3, RK4, and Kutta-3/8 integrators are used.

The order of accuracy for various combinations of the Taylor series terms and the multi-stage integrators is summarized in Table 1. The \(\Delta t\) term, up to \(\Delta t^3\) terms, and up to \(\Delta t^5\) terms of the Taylor series have the second-, fourth-, and sixth-order accuracy in time. However, the Euler integrator, i.e., \(1/\Gamma =1/\gamma ^{t-\frac{\Delta t}{2}}\) has the first-order accuracy in time independently of the number of the Taylor series terms. Note that the previous Umeda integrator with the \(\Delta t\) term only and \(1/\Gamma =1/\gamma _-\) has the second-order accuracy in time (Umeda 2023), the choice of which is not so bad. Both of the mid-point rule and the trapezoidal rule have the second-order accuracy in time independently of the number of the Taylor series terms. The accuracy of the trapezoidal rule is slightly higher than that of the mid-point rule (not shown). The Heun3 and RK3 integrators have the third-order accuracy in time with the Taylor series terms higher than \(\Delta t\) but have the second-order accuracy in time with the \(\Delta t\) term only. The accuracy of Heun3 is almost the same as that of RK3 (not shown). The RK4 integrator and the Kutta-3/8 rule have the fourth-order accuracy in time with the Taylor series terms higher than \(\Delta t\) but have the second-order accuracy in time with \(\Delta t\) term only. The accuracy of the Kutta-3/8 rule is almost the same as that of RK4 (not shown). These results suggest that the order of accuracy is determined by the lowest order of accuracy of either the Taylor series terms or the multi-stage integrators.

Table 1 Order of accuracy for various combinations of Taylor series terms and multi-stage integrators

Numerical tests are performed with a uniform, constant and time-independent electromagnetic field \(\varvec{E}=(0,E_y,0)\) and \(\varvec{B}=(0,0,B_z)\). The \(E \times B\) drift velocity \(v_E = E_y/B_z = 0.8c\) and the initial velocity vector \(\varvec{v}_0=(0.5c,0,0)\) are used. The time step is varied from \(\omega _c\Delta t = 2^3\) to \(2^{-9}\), where \(\omega _c=qB_z/m\) is the non-relativistic gyro frequency, The numerical results at \(\omega _c t=24\) is compared against the theoretical solution.

Figure 1 shows the relative error \(\eta\) of the momentum vector \(\varvec{u}=(u_x,u_y)\) and position vector \(\varvec{r}=(x,y)\) from the theoretical solution as a function of \(\Delta t\) with the combination of RK4 and different number of Taylor series terms. The circle, triangle, square, and x-mark show the results with \(\Delta t\) term only, up to \(\Delta t^3\) terms, up to \(\Delta t^5\) terms, and tangent function, respectively. It is clearly shown that the order of accuracy is second in time with \(\Delta t\) term only. The order of accuracy is fourth in time with more than \(\Delta t^3\) terms. As the number of Taylor series terms increases, the numerical accuracy approaches to that with the tangent function. The numerical error with the Taylor series expansion is enhanced for an extremely large time step, \(\frac{\omega _c\Delta t}{\gamma _E\Gamma } \ge \pi\), because of a large numerical error in the gyration angle. In Fig. 1, the maximum argument is \(\omega _c\Delta t = 8\) with \(\gamma _E = 5/3\) and \(1.15< \Gamma <2.7\). The computational cost is also measured on a single compute core of the Intel Xeon Gold 6342 processor with the Intel oneAPI compiler ver.2021.5.0. The compile options are “-ipo -ip -O3 -xICELAKE-SERVER.” The elapsed time per particle and per time step with \(\Delta t\) term only, up to \(\Delta t^3\) terms, up to \(\Delta t^5\) terms, and tangent function is 67.7 ns, 73.3 ns, 76.2 ns, and 94.2 ns, respectively.

Fig. 1
figure 1

Relative error \(\eta\) of the momentum vector \(\varvec{u}=(u_x,u_y)\) and position vector \(\varvec{r}=(x,y)\) from the theoretical solution as a function of \(\Delta t\) for the present integrators with the combination of RK4 and different number of Taylor series terms. The circle, triangle, square, and x-mark show the results with \(\Delta t\) term only, up to \(\Delta t^3\) terms, up to \(\Delta t^5\) terms, and tangent function, respectively

Figure 2 shows relative error \(\eta\) of the momentum vector \(\varvec{u}=(u_x,u_y)\) and position vector \(\varvec{r}=(x,y)\) from the theoretical solution as a function of \(\Delta t\) with the combination of the tangent function and different integrators. The circle, triangle, square, and x-mark show the results with Euler, trapezoidal, Heun3, and RK4 integrators, respectively. It is clearly shown that the order of accuracy is first, second, third, and fourth in time with Euler, trapezoidal, Heun3, and RK4 integrators, respectively.

Fig. 2
figure 2

Relative error \(\eta\) of the momentum vector \(\varvec{u}=(u_x,u_y)\) and position vector \(\varvec{r}=(x,y)\) from the theoretical solution as a function of \(\Delta t\) for the present integrators with the combination of the tangent function and different integrators. The circle, triangle, square, and x-mark show the results with Euler, trapezoidal, Heun3, and RK4 integrators, respectively

Figure 3 shows the relative error \(\eta\) of the momentum vector \(\varvec{u}=(u_x,u_y)\) and position vector \(\varvec{r}=(x,y)\) from the theoretical solution as a function of \(\Delta t\) for the previous and present integrators. The circle, triangle, square, and x-mark show the results with Boris (1970), Umeda (2023), fourth-order Runge–Kutta integrators (RK4 to Eq.(1) directly), and the present study with the combination of RK4 and the tangent function, respectively. It is shown that the numerical error of direct RK4 is much lower than that of both Boris (1970) and Umeda (2023) integrators. The numerical error of the present study is two orders lower than that of direct RK4. The elapsed time per particle and per time step with the Umeda integrator is 58.4 ns. Hence, the numerical cost of the present study is much cheaper than that of the previous study.

Fig. 3
figure 3

Relative error \(\eta\) of the momentum vector \(\varvec{u}=(u_x,u_y)\) and position vector \(\varvec{r}=(x,y)\) from the theoretical solution as a function of \(\Delta t\) for the previous and present integrators. The circle, triangle, square, and x-mark show the results with Boris (1970), Umeda (2023), fourth-order Runge–Kutta integrators (RK4 to Eq.(1) directly), and the present study with the combination of RK4 and the tangent function, respectively

A long-term numerical test is also performed with the same electromagnetic field \(\varvec{E}=(0,E_y,0)\) and \(\varvec{B}=(0,0,B_z)\), the \(E \times B\) drift velocity \(v_E = E_y/B_z = 0.8c\), and the initial velocity vector \(\varvec{v}_0=(0.5c,0,0)\). The time step is fixed to \(\omega _c\Delta t = 0.1\), and the numerical test is performed up to \(\omega _c t=10^7\). Figure 4 shows the relative error \(\eta\) of the momentum vector \(\varvec{u}=(u_x,u_y)\), the position vector \(\varvec{r}=(x,y)\), the constant for the elliptical trajectory C in Eq.(5), and the boosted Lorentz factor \(\gamma _B\) in Eq.(6) from the theoretical solution as a function of time for the previous and present integrators.

Fig. 4
figure 4

Relative error \(\eta\) of the momentum vector \(\varvec{u}=(u_x,u_y)\), the position vector \(\varvec{r}=(x,y)\), the constant for the elliptical trajectory C in Eq.(5), and the boosted Lorentz factor \(\gamma _B\) in Eq.(6) from the theoretical solution as a function of time for the previous and present integrators. (a) \(0 \le \omega _ct \le 100\) and (b) \(0 \le \omega _ct \le 10^7\). The circle, triangle, square, and x-mark show the results with Boris (1970), Umeda (2023), fourth-order Runge–Kutta integrators (RK4 to Eq.(1) directly), and the present study with the combination of RK4 and the tangent function, respectively

For a short-term numerical test, the numerical errors in the momentum and position vectors with the second-order (Boris and Umeda), RK4, and present integrators are \(\sim 10^{-4}\), \(\sim 10^{-8}\), and \(\sim 10^{-10}\), respectively, which is consistent with Fig. 3. The numerical error in the constant for the elliptical trajectory C with the Boris integrator varies between \(10^{-6}\) and \(10^{-2}\) at a certain period (\(T\approx 20/\omega _c\) in the present case), which depends on \(\gamma _E\) and \(\gamma _B\). This result indicates that the momentum vector moves along an elliptical trajectory with a wrong relativistic \(E \times B\) drift velocity. The numerical error in the boosted Lorentz factor \(\gamma _B\) is related to the numerical error in C, because the center of the elliptical trajectory is given as \((\gamma _B\gamma _E v_E,0)\). The numerical error in the constant for the elliptical trajectory C with RK4 is \(\sim 10^{-8}\). On the other hand, the numerical errors in the constant for the elliptical trajectory C with the Umeda and present integrators are \(\sim 10^{-14}\).

For a long-term numerical test, the numerical errors in the momentum vectors with the Boris and Umeda integrators vary between \(10^{-2}\) and \(10^{0}\) because of the accumulation of the numerical error in the gyration angle. The numerical error in the momentum vectors with the present integrator is much lower than that with other integrators. Note that oscillations in the numerical errors in Fig. 4b are due to a data sampling rate. The numerical errors in the position vector with the Boris, Umeda, and present integrators are \(\sim 10^{-4}\), \(\sim 10^{-5}\) and \(\sim 10^{-8}\), respectively. The numerical error in the constant for the elliptical trajectory C with RK4 increases to \(10^{-2}\), which indicates that the momentum vector deviates from the theoretical trajectory. On the other hand, the numerical error in C with the Boris integrator varies between \(10^{-6}\) and \(10^{-2}\), which indicates that the momentum vector is on the elliptical trajectory for a long term. The numerical errors in C and \(\gamma _B\) with the Umeda and present integrators are \(\sim 10^{-12}\). The result clearly shows that the operator \({{\mathcal {F}}}\) in Eq.(14) is well-designed for conserving both C and \(\gamma _B\).

It is noted that the operator \({{\mathcal {F}}}(1/\Gamma ,\Delta t)\) is Eq.(14) is replaced with \(\mathcal{F}[1/\Gamma ,\varvec{E}^{t}(\varvec{r}^{t}),\varvec{B}^{t}(\varvec{r}^{t}),\Delta t]\) with the position vector obtained with the multi-stage numerical integrator, if electromagnetic fields are non-uniform and time-dependent.

Conclusions

Instead of the classic Runge–Kutta (RK4) integrator (Runge 1895; Kutta 1901), the relativistic equations of motion for charged particles have been conventionally solved with the Boris integrator (or the Boris push) (Boris 1970) in particle-in-cell (PIC) plasma simulations. The conventional Boris integrator (Boris 1970), the previous Vay (2008) and Higuera and Cary (2017) integrators conserve the kinetic energy of charged particles during the gyration but have large numerical errors in the relativistic \(E \times B\) drift velocity. Recently, a new integrator (the Umeda integrator) has been developed, which provides the exact relativistic \(E \times B\) drift velocity (Umeda 2023). However, the Umeda integrator has the second-order accuracy in time and has a numerical error in the relativistic gyration angle as well.

To reduce the numerical error of the Umeda integrator and to make its order of accuracy higher, two advanced numerical techniques are adopted in the present study. One is the Taylor series expansion of the numerical gyration angle (Kato and Zenitani 2021), and the other is multi-step (multi-stage) Runge–Kutta method (Butcher 1996) for the integration of the Lorentz factor. With the combination of the trigonometric function for the gyration angle and RK4 for the integration of the Lorentz factor, a new fourth-order integrator has been developed. The new integrator conserves both of the kinetic energy of charged particles during the gyration and the relativistic boosted Lorentz factor, but has a numerical accuracy much higher than the classic RK4. The computational cost of the new integrator is much cheaper than the Umeda integrator. Although the order of accuracy is extended up to fourth in the present study, higher-order multi-stage integrators for the integration of the Lorentz factor could make the order of accuracy higher in time.

Availability of data and materials

The numerical code used in the present study is available from the corresponding author on reasonable request.

Abbreviations

PIC:

Particle-in-cell

RK:

Runge–Kutta

References

Download references

Acknowledgements

This work was conducted as a computational joint research program at the Institute for Space-Earth Environmental Research, Nagoya University.

Funding

This work was supported by MEXT/JSPS under Grant-In-Aid (KAKENHI) for Scientific Research (B) No. JP19H01868.

Author information

Authors and Affiliations

Authors

Contributions

TU developed the new scheme and drafted the manuscript. RO developed the numerical codes, performed the numerical tests, and analyzed the numerical results. Both of authors read and approved the final manuscript.

Corresponding author

Correspondence to Takayuki Umeda.

Ethics declarations

Ethics approval and consent to participate

Not applicable.

Consent for publication

Not applicable.

Competing interests

The authors declare that they have no competing interests.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Appendix A: Multi-stepping with other Runge–Kutta methods

Appendix A: Multi-stepping with other Runge–Kutta methods

Euler integrator

The Euler integrator is known as an explicit time-forwarding numerical procedure with the first-order accuracy in time. The momentum vector is updated with \(1/\Gamma = 1/\gamma ^{t-\frac{\Delta t}{2}}\) as follows:

$$\begin{aligned}{} & {} \varvec{u}^{t+\frac{\Delta t}{2}} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\Delta t\right) , \end{aligned}$$
(A.1a)
$$\begin{aligned}{} & {} \varvec{r}^{t+\frac{\Delta t}{2}} = \varvec{r}^{t-\frac{\Delta t}{2}} + \Delta t \frac{c\varvec{u}^{t-\frac{\Delta t}{2}}}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }}. \end{aligned}$$
(A.1b)

Mid-point rule

The numerical integrator based on the mid-point rule has second-order accuracy in time. The momentum vector at time t is estimated with the Euler integrator at the first step. Then, by assuming that \(1/\Gamma = 1/\gamma ^{t}\) is constant in time from \(t-\Delta t/2\) to \(t+\Delta t/2\), the momentum vector at time \(t+\Delta t/2\) is obtained at the second step as follows:

$$\begin{aligned}{} & {} \varvec{u}^{t} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\frac{\Delta t}{2}\right) , \end{aligned}$$
(A.2a)
$$\begin{aligned}{} & {} \varvec{u}^{t+\frac{\Delta t}{2}} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t}\right| ^2 }},\Delta t\right) , \end{aligned}$$
(A.2b)
$$\begin{aligned}{} & {} \varvec{r}^{t+\frac{\Delta t}{2}} = \varvec{r}^{t-\frac{\Delta t}{2}} + \Delta t \frac{c\varvec{u}^{t}}{\sqrt{c^2 + \left| \varvec{u}^{t}\right| ^2 }}. \end{aligned}$$
(A.2c)

Trapezoidal rule

The numerical integrator based on the trapezoidal rule has second-order accuracy in time. The momentum vector at time \(t_1 \approx t + \Delta t/2\) is estimated with the Euler integrator at the first step. By assuming that \(1/\gamma\) changes linearly from \(1/\gamma ^{t-\Delta t/2}\) to \(1/\gamma ^{t_1}\), \(1/\Gamma\) is obtained with the numerical integration based on the trapezoidal rule. Then, the momentum vector at time \(t+\Delta t/2\) is obtained at the second step as follows:

$$\begin{aligned}{} & {} \varvec{u}^{t_1} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\Delta t\right) , \end{aligned}$$
(A.3a)
$$\begin{aligned}{} & {} \varvec{u}^{t+\frac{\Delta t}{2}} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{2\sqrt{c^2 + \left| \varvec{u}^{t_1}\right| ^2 }} + \frac{c}{2\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\Delta t \right) , \end{aligned}$$
(A.3b)
$$\begin{aligned}{} & {} \varvec{r}^{t+\frac{\Delta t}{2}} = \varvec{r}^{t-\frac{\Delta t}{2}} + \frac{\Delta t}{2} \left( \frac{c\varvec{u}^{t_1}}{\sqrt{c^2 + \left| \varvec{u}^{t_1}\right| ^2 }} + \frac{c\varvec{u}^{t-\frac{\Delta t}{2}}}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }} \right) . \end{aligned}$$
(A.3c)

Heun3 integrator

The third-order Heun (Heun3) integrator is known as an explicit time-forwarding numerical procedure with the third-order accuracy in time (Heun 1900). The momentum vector at time \(t - \Delta t/6\) is estimated with the Euler integrator at the first step. Then, the momentum vector at time \(t + \Delta t/6\) is estimated with the mid-point rule at the second step. Finally, the momentum vector at time \(t+\Delta t/2\) is obtained at the third step as follows:

$$\begin{aligned}{} & {} \varvec{u}^{t-\frac{\Delta t}{6}} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\frac{\Delta t}{3}\right) , \end{aligned}$$
(A.4a)
$$\begin{aligned}{} & {} \varvec{u}^{t+\frac{\Delta t}{6}} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{6}}\right| ^2 }},\frac{2\Delta t}{3}\right) , \end{aligned}$$
(A.4b)
$$\begin{aligned}{} & {} \varvec{u}^{t+\frac{\Delta t}{2}} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{3c}{4\sqrt{c^2 + \left| \varvec{u}^{t+\frac{\Delta t}{6}}\right| ^2 }} + \frac{c}{4\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\Delta t\right) , \end{aligned}$$
(A.4c)
$$\begin{aligned}{} & {} \varvec{r}^{t+\frac{\Delta t}{2}} = \varvec{r}^{t-\frac{\Delta t}{2}} + \frac{\Delta t}{4} \left( \frac{3c\varvec{u}^{t+\frac{\Delta t}{6}}}{\sqrt{c^2 + \left| \varvec{u}^{t+\frac{\Delta t}{6}}\right| ^2 }} + \frac{c\varvec{u}^{t-\frac{\Delta t}{2}}}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }} \right) . \end{aligned}$$
(A.4d)

RK3 integrator

The third-order Runge–Kutta (RK3) integrator is known as an explicit numerical procedure with the third-order accuracy in time (Kutta 1901). The momentum vector at time t is estimated with the Euler integrator at the first step. The momentum vector at time \(t_1 \approx t + \Delta t/2\) is estimated at the second step. By assuming that \(1/\gamma\) changes in a parabolic manner from \(1/\gamma ^{t-\Delta t/2}\) to \(1/\gamma ^{t_1}\) via \(1/\gamma ^t\), \(1/\Gamma\) is obtained with the numerical integration based on the Simpson integration rule. Finally, the momentum vector at time \(t+\Delta t/2\) is obtained at the third step as follows:

$$\begin{aligned}{} & {} \varvec{u}^{t} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\frac{\Delta t}{2}\right) , \end{aligned}$$
(A.5a)
$$\begin{aligned}{} & {} \varvec{u}^{t_1} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{2c}{\sqrt{c^2 + \left| \varvec{u}^{t}\right| ^2 }} - \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\Delta t\right) , \end{aligned}$$
(A.5b)
$$\begin{aligned}{} {} \varvec{u}^{t+\frac{\Delta t}{2}} & = \,\varvec{u}^{t-\frac{\Delta t}{2}} \nonumber \\{} & {} \quad + {{\mathcal {F}}}\left( \frac{c}{6\sqrt{c^2 + \left| \varvec{u}^{t_1}\right| ^2 }} + \frac{2c}{3\sqrt{c^2 + \left| \varvec{u}^{t}\right| ^2 }} + \frac{c}{6\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\Delta t \right) , \end{aligned}$$
(A.5c)
$$\begin{aligned}{} {} \varvec{r}^{t+\frac{\Delta t}{2}} & = \,\varvec{r}^{t-\frac{\Delta t}{2}} \nonumber \\{} & {} \quad + \frac{\Delta t}{6} \left( \frac{c\varvec{u}^{t_1}}{\sqrt{c^2 + \left| \varvec{u}^{t_1}\right| ^2 }} + \frac{4c\varvec{u}^{t}}{\sqrt{c^2 + \left| \varvec{u}^{t}\right| ^2 }} + \frac{c\varvec{u}^{t-\frac{\Delta t}{2}}}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }} \right) . \end{aligned}$$
(A.5d)

Kutta-3/8 rule

There is another version of the fourth-order Runge–Kutta integrator, which is known as the Kutta-3/8 rule (Kutta 1901). The momentum vector at time \(t-\frac{\Delta t}{6}\) is estimated with the Euler integrator at the first step. The momentum vector at time \(t+\frac{\Delta t}{6}\) is estimated at the second step. The momentum vector at time \(t_1 \approx t + \Delta t/2\) is estimated at the third step. Then, the time integration is performed based on the numerical integration of a cubic polynomial function passing through four points of \(1/\gamma ^{t-\frac{\Delta t}{2}}\), \(1/\gamma ^{t-\frac{\Delta t}{6}}\), \(1/\gamma ^{t+\frac{\Delta t}{6}}\), and \(1/\gamma ^{t_1}\) (at time \(t+\Delta t/2\)). Finally, the momentum vector at time \(t+\Delta t/2\) is obtained at the fourth step as follows:

$$\begin{aligned}{} & {} \varvec{u}^{t-\frac{\Delta t}{6}} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\frac{\Delta t}{3}\right) , \end{aligned}$$
(A.6a)
$$\begin{aligned}{} & {} \varvec{u}^{t+\frac{\Delta t}{6}} = \,\varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{6}}\right| ^2 }} - \frac{c}{3\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }}, \frac{2\Delta t}{3} \right) , \end{aligned}$$
(A.6b)
$$\begin{aligned}{} & {} \varvec{u}^{t_1} = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t+\frac{\Delta t}{6}}\right| ^2 }} - \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{6}}\right| ^2 }} \right. \nonumber \\{} & {} \quad \left. + \frac{c}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }}, \Delta t \right) , \end{aligned}$$
(A.6c)
$$\begin{aligned}{} {} \varvec{u}^{t+\frac{\Delta t}{2}} & = \varvec{u}^{t-\frac{\Delta t}{2}} + {{\mathcal {F}}}\left( \frac{c}{8\sqrt{c^2 + \left| \varvec{u}^{t_1}\right| ^2 }} + \frac{3c}{8\sqrt{c^2 + \left| \varvec{u}^{t+\frac{\Delta t}{6}}\right| ^2 }} + \frac{3c}{8\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{6}}\right| ^2 }}\right. \nonumber \\{} & {} \quad \left. + \frac{c}{8\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }},\Delta t \right) , \end{aligned}$$
(A.6d)
$$\begin{aligned}{} {} \varvec{r}^{t+\frac{\Delta t}{2}} & = \varvec{r}^{t-\frac{\Delta t}{2}} + \frac{\Delta t}{8} \left( \frac{c\varvec{u}^{t_1}}{\sqrt{c^2 + \left| \varvec{u}^{t_1}\right| ^2 }} + \frac{3c\varvec{u}^{t+\frac{\Delta t}{6}}}{\sqrt{c^2 + \left| \varvec{u}^{t+\frac{\Delta t}{6}}\right| ^2 }} + \frac{3c\varvec{u}^{t-\frac{\Delta t}{6}}}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{6}}\right| ^2 }} \right. \nonumber \\{} & {} \quad \left. + \frac{c\varvec{u}^{t-\frac{\Delta t}{2}}}{\sqrt{c^2 + \left| \varvec{u}^{t-\frac{\Delta t}{2}}\right| ^2 }} \right) . \end{aligned}$$
(A.6e)

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

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Umeda, T., Ozaki, R. Advanced numerical techniques for time integration of relativistic equations of motion for charged particles. Earth Planets Space 75, 157 (2023). https://doi.org/10.1186/s40623-023-01902-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1186/s40623-023-01902-8

Keywords