We discuss an extension of the velocity Verlet method that accurately approximates the kinetic-energy-conserving charged particle motion that comes from magnetic forcing. For a uniform magnetic field, the method is shown to conserve both particle kinetic energy and magnetic dipole moment better than midpoint Runge–Kutta. We then use the magnetic velocity Verlet method to generate trapped particle trajectories, both in a cylindrical magnetic mirror machine setup and for dipolar fields like the earth's magnetic field. Finally, the method is used to compute an example of (single) mirror motion in the presence of a magnetic monopole field, where the trajectory can be described in closed form.

1.
Jane M.
Repko
,
Wayne W.
Repko
, and
Allan
Saaf
, “
Charged particle trajectories in simple non-uniform magnetic fields
,”
Am. J. Phys.
59
,
652
655
(
1991
).
2.
David J.
Griffiths
,
Introduction to Electrodynamics
, 4th ed. (
Cambridge U. P.
,
Cambridge
,
2017
).
3.
M.
Kaan Öztürk
, “
Trajectories of charged particles trapped in Earth's magnetic field
,”
Am. J. Phys.
80
,
420
428
(
2012
).
4.
George C.
McGuire
, “
Using computer algebra to investigate the motion of an electric charge in magnetic and electric dipole fields
,”
Am. J. Phys.
71
,
809
812
(
2003
).
5.
Elisha R.
Huggins
and
Jeffrey J.
Lelek
, “
Motion of electrons in electric and magnetic fields; introductory laboratory and computer studies
,”
Am. J. Phys.
47
,
992
999
(
1979
).
6.
J.
Franklin
and
K. C.
Newton
, “
Classical and quantum mechanical motion in magnetic fields
,”
Am. J. Phys.
84
(
4
),
263
269
(
2016
).
7.
Q.
Spreiter
and
M.
Walter
, “
Classical molecular dynamics simulation with the Velocity Verlet algorithm at strong external magnetic fields
,”
J. Comp. Phys.
152
(
1
),
102
119
(
1999
).
8.
John David
Jackson
,
Classical Electrodynamics
, 3rd ed. (
Wiley
,
New Jersey
,
1998
).
9.
Herbert
Goldstein
,
Charles P.
Poole
, Jr.
, and
John L.
Safko
,
Classical Mechanics
, 3rd ed. (
Pearson
,
London
,
2001
).
10.
Loup
Verlet
, “
Computer ‘Experiments’ on classical fluids. I. Thermodynamical properties of Lennard-Jones molecules
,”
Phys. Rev.
159
(
1
),
98
103
(
1967
).
11.
Denis
Donnelly
, “
Symplectic integrators: An introduction
,”
Am. J. Phys.
73
(
10
),
938
945
(
2005
).
12.
M. P.
Allen
and
D. J.
Tildesley
,
Computer Simulations of Liquids
(
Oxford U. P
.,
New York
,
1987
).
13.
Joel
Franklin
,
Computational Methods for Physics
(
Cambridge U. P
.,
New York
,
2013
).
14.
See supplementary material at http://dx.doi.org/10.1119/10.0001876 for a Mathematica implementation of the magnetic Verlet method with some examples from the article.
15.
R. F.
Post
, “
Summary of UCRL Pyrotron (mirror machine) program
,” In
Proceedings of the Second International Conference on Peaceful Uses of Atomic Energy
, Geneva,
1958
, Paper 31, Vol.
32
, pp.
245
265
. Available at http://www-naweb.iaea.org/napc/physics/2ndgenconf/data/Proceedings%201958/papers%20Vol32/Paper31_Vol32.pdf
16.

We encourage curious readers to find the source current density that produces this field and compare that source with the one that produced the field in Eq. (28). In addition, one can compare the field in Eq. (29) with the full, off-axis, field produced by a pair of current loops placed at ±d along the z axis.

17.

There is also the possibility that the particle is not trapped at all. One can develop, from the expression for μ, constraints on the ratio of the perpendicular to longitudinal velocity components that prevent trapping. We leave this interesting opportunity, and its numerical verification, for the reader (Refs. 15 and 8).

18.
E.
della Valle
,
P.
Marracino
,
S.
Setti
,
R.
Cadossi
,
M.
Liberti
, and
F.
Apollonio
, “
Magnetic molecular dynamics simulations with Velocity Verlet algorithm
,” In
2017 XXXIInd General Assembly and Scientific Symposium of the International Union of Radio Science (URSI GASS)
, Montreal, QC,
2017
, pp.
1
4
.
19.
S. A.
Chin
, “
Structure of numerical algorithms and advanced mechanics
,”
Am. J. Phys.
88
(
10
),
883
894
(
2020
).

Supplementary Material

AAPT members receive access to the American Journal of Physics and The Physics Teacher as a member benefit. To learn more about this member benefit and becoming an AAPT member, visit the Joining AAPT page.