Finalize report

This commit is contained in:
2025-10-16 17:39:21 +02:00
parent 93d7c4be42
commit 50a5649539
19 changed files with 20110 additions and 86 deletions
Binary file not shown.
+358
View File
@@ -0,0 +1,358 @@
@article{harris_array_2020,
title = {Array programming with {NumPy}},
volume = {585},
url = {https://doi.org/10.1038/s41586-020-2649-2},
doi = {10.1038/s41586-020-2649-2},
pages = {357--362},
number = {7825},
journaltitle = {Nature},
author = {Harris, Charles R. and Millman, K. Jarrod and Walt, Stéfan J. van der and Gommers, Ralf and Virtanen, Pauli and Cournapeau, David and Wieser, Eric and Taylor, Julian and Berg, Sebastian and Smith, Nathaniel J. and Kern, Robert and Picus, Matti and Hoyer, Stephan and Kerkwijk, Marten H. van and Brett, Matthew and Haldane, Allan and Río, Jaime Fernández del and Wiebe, Mark and Peterson, Pearu and Gérard-Marchant, Pierre and Sheppard, Kevin and Reddy, Tyler and Weckesser, Warren and Abbasi, Hameer and Gohlke, Christoph and Oliphant, Travis E.},
date = {2020-09},
note = {Publisher: Springer Science and Business Media {LLC}},
}
@article{hunter_matplotlib_2007,
title = {Matplotlib: A 2D graphics environment},
volume = {9},
doi = {10.1109/MCSE.2007.55},
abstract = {Matplotlib is a 2D graphics package used for Python for application development, interactive scripting, and publication-quality image generation across user interfaces and operating systems.},
pages = {90--95},
number = {3},
journaltitle = {Computing in Science \& Engineering},
author = {Hunter, J. D.},
date = {2007},
note = {Publisher: {IEEE} {COMPUTER} {SOC}},
}
@article{pedregosa_scikit-learn_2011,
title = {Scikit-learn: Machine Learning in Python},
volume = {12},
pages = {2825--2830},
journaltitle = {Journal of Machine Learning Research},
author = {Pedregosa, F. and Varoquaux, G. and Gramfort, A. and Michel, V. and Thirion, B. and Grisel, O. and Blondel, M. and Prettenhofer, P. and Weiss, R. and Dubourg, V. and Vanderplas, J. and Passos, A. and Cournapeau, D. and Brucher, M. and Perrot, M. and Duchesnay, E.},
date = {2011},
}
@inreference{noauthor_stochastic_2025,
title = {Stochastic gradient descent},
rights = {Creative Commons Attribution-{ShareAlike} License},
url = {https://en.wikipedia.org/w/index.php?title=Stochastic_gradient_descent&oldid=1309164477},
abstract = {Stochastic gradient descent (often abbreviated {SGD}) is an iterative method for optimizing an objective function with suitable smoothness properties (e.g. differentiable or subdifferentiable). It can be regarded as a stochastic approximation of gradient descent optimization, since it replaces the actual gradient (calculated from the entire data set) by an estimate thereof (calculated from a randomly selected subset of the data). Especially in high-dimensional optimization problems this reduces the very high computational burden, achieving faster iterations in exchange for a lower convergence rate.
The basic idea behind stochastic approximation can be traced back to the RobbinsMonro algorithm of the 1950s. Today, stochastic gradient descent has become an important optimization method in machine learning.},
booktitle = {Wikipedia},
urldate = {2025-09-22},
date = {2025-09-02},
langid = {english},
note = {Page Version {ID}: 1309164477},
file = {Snapshot:/home/lars/Zotero/storage/B6CVR59B/index.html:text/html},
}
@unpublished{elstner_lecture_2025,
location = {Karlsruhe Institute for Technology, Karlsruhe},
title = {Lecture: Machine Learning for Chemistry},
type = {Lecture},
howpublished = {Lecture},
author = {Elstner, Marcus and Kubar, Tomas},
date = {2025-05-20},
langid = {german},
file = {PDF:/home/lars/Zotero/storage/5LSLJMK8/Elstner and Kubar - 2025 - Lecture Machine Learning for Chemistry.pdf:application/pdf},
}
@online{lekhansh_lasso_2024,
title = {Lasso vs. Ridge Regression: A Detailed Comparison},
url = {https://medium.com/@tyagi.lekhansh/lasso-vs-ridge-regression-a-detailed-comparison-140f7832c624},
shorttitle = {Lasso vs. Ridge Regression},
abstract = {In the realm of regression analysis, Lasso (Least Absolute Shrinkage and Selection Operator) and Ridge Regression are two popular…},
titleaddon = {Medium},
author = {Lekhansh},
urldate = {2025-09-22},
date = {2024-09-04},
langid = {english},
}
@book{hastie_elements_2009,
location = {New York, {NY}},
title = {The Elements of Statistical Learning},
rights = {http://www.springer.com/tdm},
isbn = {978-0-387-84857-0 978-0-387-84858-7},
url = {http://link.springer.com/10.1007/978-0-387-84858-7},
series = {Springer Series in Statistics},
publisher = {Springer},
author = {Hastie, Trevor and Tibshirani, Robert and Friedman, Jerome},
urldate = {2025-09-22},
date = {2009},
doi = {10.1007/978-0-387-84858-7},
keywords = {Averaging, Boosting, classification, clustering, data mining, machine learning, Projection pursuit, Random Forest, supervised learning, Support Vector Machine, unsupervised learning},
file = {Full Text PDF:/home/lars/Zotero/storage/D3N4DVY9/Hastie et al. - 2009 - The Elements of Statistical Learning.pdf:application/pdf},
}
@book{goodfellow_deep_2016,
title = {Deep Learning},
publisher = {{MIT} Press},
author = {Goodfellow, Ian and Bengio, Yoshua and Courville, Aaron},
date = {2016},
}
@book{bishop_pattern_2006,
location = {New York},
title = {Pattern recognition and machine learning},
isbn = {978-0-387-31073-2},
series = {Information science and statistics},
publisher = {Springer},
author = {Bishop, Christopher M.},
date = {2006},
langid = {english},
file = {PDF:/home/lars/Zotero/storage/9H5W9BGC/Bishop - 2006 - Pattern recognition and machine learning.pdf:application/pdf},
}
@book{vogel_particle_2024,
location = {Cham},
title = {Particle Confinement in Penning Traps: An Introduction},
volume = {126},
rights = {https://www.springernature.com/gp/researchers/text-and-data-mining},
isbn = {978-3-031-55419-3 978-3-031-55420-9},
url = {https://link.springer.com/10.1007/978-3-031-55420-9},
series = {Springer Series on Atomic, Optical, and Plasma Physics},
shorttitle = {Particle Confinement in Penning Traps},
publisher = {Springer International Publishing},
author = {Vogel, Manuel},
urldate = {2025-10-09},
date = {2024},
langid = {english},
doi = {10.1007/978-3-031-55420-9},
keywords = {Confined ions and plasmas, Highly charged ions, Ion trapping, Laser Cooling, Magnetic moments, Particle confinement, Penning traps, Precision spectroscopy, Resistive Cooling, Stored ions, Trapped charged particles, Unified notation Penning traps},
file = {Full Text PDF:/home/lars/Zotero/storage/SI8SF7RF/Vogel - 2024 - Particle Confinement in Penning Traps An Introduction.pdf:application/pdf},
}
@article{scampoli_aegis_2014,
title = {The {AEgIS} experiment at {CERN} for the measurement of antihydrogen gravity acceleration},
volume = {29},
issn = {0217-7323},
url = {https://www.worldscientific.com/doi/abs/10.1142/S0217732314300171},
doi = {10.1142/S0217732314300171},
abstract = {The Antihydrogen Experiment: Gravity, Interferometry, Spectroscopy ({AEgIS}) experiment is conducted by an international collaboration based at {CERN} whose aim is to perform the first direct measurement of the gravitational acceleration of antihydrogen in the local field of the Earth, with Δg/g = 1\% precision as a first achievement. The idea is to produce cold (100 {mK}) antihydrogen through a pulsed charge exchange reaction by overlapping clouds of antiprotons, from the Antiproton Decelerator ({AD}) and positronium atoms inside a Penning trap. The antihydrogen has to be produced in an excited Rydberg state to be subsequently accelerated to form a beam. The deflection of the antihydrogen beam can then be measured by using a moiré deflectometer coupled to a position sensitive detector to register the impact point of the anti-atoms through the vertex reconstruction of their annihilation products. After being approved in late 2008, {AEgIS} started taking data in a commissioning phase in 2012. This paper presents an outline of the experiment with a brief overview of its physics motivation and of the state-of-the-art of the g measurement on antimatter. Particular attention is given to the current status of the emulsion-based position detector needed to measure the sag in {AEgIS}.},
pages = {1430017},
number = {17},
journaltitle = {Modern Physics Letters A},
shortjournal = {Mod. Phys. Lett. A},
author = {Scampoli, Paola and Storey, James},
urldate = {2025-10-09},
date = {2014-06-07},
note = {Publisher: World Scientific Publishing Co.},
keywords = {Antihydrogen, gravity, high resolution tracking detector},
}
@article{bertsche_prospects_2018,
title = {Prospects for comparison of matter and antimatter gravitation with {ALPHA}-g},
volume = {376},
url = {https://royalsocietypublishing.org/doi/full/10.1098/rsta.2017.0265},
doi = {10.1098/rsta.2017.0265},
abstract = {The {ALPHA} experiment has recently entered an expansion phase of its experimental programme, driven in part by the expected benefits of conducting experiments in the framework of the new {AD}+{ELENA} antiproton facility at {CERN}. With antihydrogen trapping now a routine operation in the {ALPHA} experiment, the collaboration is leading progress towards precision atomic measurements on trapped antihydrogen atoms, with the first excitation of the 1S2S transition and the first measurement of the antihydrogen hyperfine spectrum (Ahmadi et al. 2017 Nature 541, 506510 (doi:10.1038/nature21040); Nature 548, 6669 (doi:10.1038/nature23446)). We are building on these successes to extend our physics programme to include a measurement of antimatter gravitation. We plan to expand a proof-of-principle method (Amole et al. 2013 Nat. Commun. 4, 1785 (doi:10.1038/ncomms2787)), first demonstrated in the original {ALPHA} apparatus, and perform a precise measurement of antimatter gravitational acceleration with the aim of achieving a test of the weak equivalence principle at the 1\% level. The design of this apparatus has drawn from a growing body of experience on the simulation and verification of antihydrogen orbits confined within magnetic-minimum atom traps. The new experiment, {ALPHA}-g, will be an additional atom-trapping apparatus located at the {ALPHA} experiment with the intention of measuring antihydrogen gravitation.
This article is part of the Theo Murphy meeting issue Antiproton physics in the {ELENA} era.},
pages = {20170265},
number = {2116},
journaltitle = {Philosophical Transactions of the Royal Society A: Mathematical, Physical and Engineering Sciences},
author = {Bertsche, W. A.},
urldate = {2025-10-09},
date = {2018-02-19},
note = {Publisher: Royal Society},
keywords = {gravity, antigravity, antihydrogen, antimatter, {CPT}, Lorentz invariance},
file = {Full Text PDF:/home/lars/Zotero/storage/7YM83XXD/Bertsche - 2018 - Prospects for comparison of matter and antimatter gravitation with ALPHA-g.pdf:application/pdf},
}
@incollection{dambrosio_runge-kutta_2023,
location = {Cham},
title = {Runge-Kutta Methods},
isbn = {978-3-031-31343-1},
url = {https://doi.org/10.1007/978-3-031-31343-1_4},
abstract = {Order barriers of linear multistep methods are rather severe. In this chapter, we move to a different family of methods, i.e., Runge-Kutta methods, enabling better order and stability barriers. The strategy is novel with respect to that beyond linear multistep methods: indeed, it is no longer of multistep type, but we move to a multistage strategy relying on the information in some additional points, located inside each subinterval of the domain discretization. Order analysis is here presented according to the theory of rooted trees and B-series.},
pages = {109--150},
booktitle = {Numerical Approximation of Ordinary Differential Problems : From Deterministic to Stochastic Numerical Methods},
publisher = {Springer Nature Switzerland},
author = {DAmbrosio, Raffaele},
editor = {D'Ambrosio, Raffaele},
urldate = {2025-10-10},
date = {2023},
langid = {english},
doi = {10.1007/978-3-031-31343-1_4},
file = {Full Text PDF:/home/lars/Zotero/storage/2AHLRIZU/DAmbrosio - 2023 - Runge-Kutta Methods.pdf:application/pdf},
}
@incollection{dambrosio_linear_2023,
location = {Cham},
title = {Linear Multistep Methods},
isbn = {978-3-031-31343-1},
url = {https://doi.org/10.1007/978-3-031-31343-1_3},
abstract = {Even if one-step methods provide the simplest and maybe most intuitive family of step-by-step numerical schemes, enlarging this class with more complex methods could be useful in order to achieve better accuracy and stability properties. For this reason, we present a more general family of methods relying on a multistep structure and provide the analysis of accuracy and stability properties of linear multistep methods.},
pages = {73--107},
booktitle = {Numerical Approximation of Ordinary Differential Problems : From Deterministic to Stochastic Numerical Methods},
publisher = {Springer Nature Switzerland},
author = {DAmbrosio, Raffaele},
editor = {D'Ambrosio, Raffaele},
urldate = {2025-10-10},
date = {2023},
langid = {english},
doi = {10.1007/978-3-031-31343-1_3},
file = {Full Text PDF:/home/lars/Zotero/storage/262EDLAD/DAmbrosio - 2023 - Linear Multistep Methods.pdf:application/pdf},
}
@software{beer_nukesorpueue_2025,
title = {Nukesor/pueue},
rights = {Apache-2.0},
url = {https://github.com/Nukesor/pueue},
abstract = {:stars: Manage your shell commands.},
author = {Beer, Arne Christian},
urldate = {2025-10-16},
date = {2025-10-15},
note = {original-date: 2015-09-04T16:24:23Z},
keywords = {command-line, command-line-tool, daemon, hacktoberfest, queue-manager, queue-tasks, rust, shell-queue},
}
@software{team_pandas-devpandas_2025,
title = {pandas-dev/pandas: Pandas},
url = {https://zenodo.org/records/17229934},
shorttitle = {pandas-dev/pandas},
abstract = {Pandas is a powerful data structures for data analysis, time series, and statistics.},
publisher = {Zenodo},
author = {team, The pandas development},
urldate = {2025-10-16},
date = {2025-09-30},
doi = {10.5281/zenodo.17229934},
keywords = {data science, python},
file = {Snapshot:/home/lars/Zotero/storage/QV289HHN/17229934.html:text/html},
}
@inproceedings{sanderson_armadillo_2025,
title = {Armadillo: An Efficient Framework for Numerical Linear Algebra},
url = {http://arxiv.org/abs/2502.03000},
doi = {10.1109/ICCAE64891.2025.10980539},
shorttitle = {Armadillo},
abstract = {A major challenge in the deployment of scientific software solutions is the adaptation of research prototypes to production-grade code. While high-level languages like {MATLAB} are useful for rapid prototyping, they lack the resource efficiency required for scalable production applications, necessitating translation into lower level languages like C++. Further, for machine learning and signal processing applications, the underlying linear algebra primitives, generally provided by the standard {BLAS} and {LAPACK} libraries, are unwieldy and difficult to use, requiring manual memory management and other tedium. To address this challenge, the Armadillo C++ linear algebra library provides an intuitive interface for writing linear algebra expressions that are easily compiled into efficient production-grade implementations. We describe the expression optimisations we have implemented in Armadillo, exploiting template metaprogramming. We demonstrate that these optimisations result in considerable efficiency gains on a variety of benchmark linear algebra expressions.},
pages = {303--307},
booktitle = {2025 17th International Conference on Computer and Automation Engineering ({ICCAE})},
author = {Sanderson, Conrad and Curtin, Ryan},
urldate = {2025-10-16},
date = {2025-03-20},
eprinttype = {arxiv},
eprint = {2502.03000 [cs]},
keywords = {Computer Science - Mathematical Software},
file = {Preprint PDF:/home/lars/Zotero/storage/UNJD6AR5/Sanderson and Curtin - 2025 - Armadillo An Efficient Framework for Numerical Linear Algebra.pdf:application/pdf;Snapshot:/home/lars/Zotero/storage/RHNN68A2/2502.html:text/html},
}
@article{sanderson_practical_2019,
title = {Practical Sparse Matrices in C++ with Hybrid Storage and Template-Based Expression Optimisation},
volume = {24},
issn = {2297-8747},
url = {http://arxiv.org/abs/1811.08768},
doi = {10.3390/mca24030070},
abstract = {Despite the importance of sparse matrices in numerous fields of science, software implementations remain difficult to use for non-expert users, generally requiring the understanding of underlying details of the chosen sparse matrix storage format. In addition, to achieve good performance, several formats may need to be used in one program, requiring explicit selection and conversion between the formats. This can be both tedious and error-prone, especially for non-expert users. Motivated by these issues, we present a user-friendly and open-source sparse matrix class for the C++ language, with a high-level application programming interface deliberately similar to the widely used {MATLAB} language. This facilitates prototyping directly in C++ and aids the conversion of research code into production environments. The class internally uses two main approaches to achieve efficient execution: (i) a hybrid storage framework, which automatically and seamlessly switches between three underlying storage formats (compressed sparse column, Red-Black tree, coordinate list) depending on which format is best suited and/or available for specific operations, and (ii) a template-based meta-programming framework to automatically detect and optimise execution of common expression patterns. Empirical evaluations on large sparse matrices with various densities of non-zero elements demonstrate the advantages of the hybrid storage framework and the expression optimisation mechanism.},
pages = {70},
number = {3},
journaltitle = {Mathematical and Computational Applications},
shortjournal = {{MCA}},
author = {Sanderson, Conrad and Curtin, Ryan},
urldate = {2025-10-16},
date = {2019-07-19},
eprinttype = {arxiv},
eprint = {1811.08768 [cs]},
keywords = {Computer Science - Mathematical Software},
file = {Preprint PDF:/home/lars/Zotero/storage/PZ5ZIXJU/Sanderson and Curtin - 2019 - Practical Sparse Matrices in C++ with Hybrid Storage and Template-Based Expression Optimisation.pdf:application/pdf;Snapshot:/home/lars/Zotero/storage/CQNT3AKH/1811.html:text/html},
}
@software{pranav_p-ranavargparse_2025,
title = {p-ranav/argparse},
rights = {{MIT}},
url = {https://github.com/p-ranav/argparse},
abstract = {Argument Parser for Modern C++},
author = {Pranav},
urldate = {2025-10-16},
date = {2025-10-15},
note = {original-date: 2019-03-30T22:28:48Z},
keywords = {argument-parser, cpp17, cross-platform, header-only, library, mit-license},
}
@software{ramirez_typer_nodate,
title = {Typer},
url = {https://github.com/fastapi/typer},
author = {Ramírez, Sebastián},
}
@online{noauthor_github_2025,
title = {{GitHub} Copilot · Your {AI} pair programmer},
url = {https://github.com/features/copilot},
abstract = {{GitHub} Copilot works alongside you directly in your editor, suggesting whole lines or entire functions for you.},
titleaddon = {{GitHub}},
urldate = {2025-10-16},
date = {2025},
langid = {english},
file = {Snapshot:/home/lars/Zotero/storage/CZLEGSHZ/copilot.html:text/html},
}
@unpublished{kubar_lecture_2025,
location = {Karlsruhe Institute for Technology, Karlsruhe},
title = {Lecture: Molecular Dynamic Simulations Summer 2025},
type = {Lecture},
howpublished = {Lecture},
author = {Kubar, Tomas and Elstner, Marcus and Kozlowska, Mariana},
date = {2025-05-20},
langid = {german},
}
@article{fjordholm_numerical_nodate,
title = {Numerical methods for {ODEs}},
url = {https://www.uio.no/studier/emner/matnat/math/MAT3110/h24/pensumliste/numerical_methods_tufte.pdf},
author = {Fjordholm, Ulrik Skre},
langid = {english},
file = {PDF:/home/lars/Zotero/storage/P27ZBG42/Fjordholm - Numerical methods for ODEs.pdf:application/pdf},
}
@online{cheever_fourth_2022,
title = {Fourth Order Runge-Kutta},
url = {https://lpsa.swarthmore.edu/NumInt/NumIntFourth.html},
author = {Cheever, Erik},
urldate = {2025-10-16},
date = {2022},
file = {Fourth Order Runge-Kutta:/home/lars/Zotero/storage/UT45E36A/NumIntFourth.html:text/html},
}
@article{noauthor_pdf_2025,
title = {({PDF}) Why is Boris algorithm so good?},
url = {https://www.researchgate.net/publication/258081219_Why_is_Boris_algorithm_so_good},
doi = {10.1063/1.4818428},
abstract = {{PDF} {\textbar} Due to its excellent long term accuracy, the Boris algorithm is the de facto standard for advancing a charged particle. Despite its popularity, up... {\textbar} Find, read and cite all the research you need on {ResearchGate}},
journaltitle = {{ResearchGate}},
urldate = {2025-10-16},
date = {2025-08-06},
langid = {english},
file = {Snapshot:/home/lars/Zotero/storage/RGHADD4H/258081219_Why_is_Boris_algorithm_so_good.html:text/html;Submitted Version:/home/lars/Zotero/storage/IHRBN7XU/2025 - (PDF) Why is Boris algorithm so good.pdf:application/pdf},
}
@article{webb_symplectic_2014,
title = {Symplectic integration of magnetic systems},
volume = {270},
issn = {0021-9991},
url = {https://www.sciencedirect.com/science/article/pii/S0021999114002368},
doi = {10.1016/j.jcp.2014.03.049},
abstract = {Simulation of the long time behavior of systems requires more than just numerical stability to return dependable results it must preserve the underlying geometric structure of the continuous equations. Symplectic integrators are the most common form of geometric integrator, and are therefore of interest in simulating plasmas for many plasma periods, for example. We present here results on generating symplectic integrators for magnetic systems, and in particular show that the algorithms due to Boris and Vay are symplectic.},
pages = {570--576},
journaltitle = {Journal of Computational Physics},
shortjournal = {Journal of Computational Physics},
author = {Webb, Stephen D.},
urldate = {2025-10-16},
date = {2014-08-01},
keywords = {Boris integrator, Magnetic systems, Symplectic integration},
file = {ScienceDirect Full Text PDF:/home/lars/Zotero/storage/G4JCWPPB/Webb - 2014 - Symplectic integration of magnetic systems.pdf:application/pdf;ScienceDirect Snapshot:/home/lars/Zotero/storage/H8YLEJ8C/S0021999114002368.html:text/html},
}
@software{hoppock_iwhoppockboris-algorithm_2025,
title = {iwhoppock/boris-algorithm},
url = {https://github.com/iwhoppock/boris-algorithm},
abstract = {The Boris algorithm for numerically tracing non-relativistic charged particles in electromagnetic fields, written in C, matlab, and python},
author = {Hoppock, Ian},
urldate = {2025-10-16},
date = {2025-09-29},
note = {original-date: 2018-11-15T15:21:28Z},
keywords = {boris, boris-algorithm, particle-tracing, particle-tracking, physics, plasma, plasma-physics, plasma-simulation, plasma-turbulence, single-particle-motion},
}
@@ -0,0 +1,5 @@
While general purpose integrators like the Runge-Kutta methods can be applied to a wide range of problems, specialized algorithms like the Velocity-Verlet and Boris methods are tailored for specific types of systems, such as those encountered in molecular dynamics and charged particle dynamics, respectively. While Velocity-Verlet offers very good energy conservation properties for systems with position-dependent forces, it is not applicable for problems involving charged particles in magnetic fields, as the Lorentz force depends on velocity. The Boris algorithm, on the other hand, is specifically designed to handle the velocity-dependent nature of the magnetic force and is widely used in plasma physics and charged particle simulations. It delivers a similar numerical accuracy as the Runge-Kutta methods, while being phase-space preserving and requiring a fraction of the computational cost.
All algorithms including Forward Euler integration improve their accuracy with decreasing time step size, as the local truncation error per step is proportional to a power of the time step size $h$. However, due to limitations in computational resources, purpose built algorithms like Boris algorithm are needed to efficiently simulate complex systems over long time periods with sufficient accuracy. Thus, Boris algorithm is the preferred choice for simulating Penning traps.
If there is no knowledge about the system to be simulated, we have shown near perfect results for the RK4 method at a slightly increased computational cost. Furthermore, RK4 was energy conserving in our simulations. If phase-space conservation is not of uttermost importance, using Runge-Kutta methods is a good choice for general purpose simulations.
+37 -8
View File
@@ -17,6 +17,7 @@ Using Newton's equations of motion, $\ddot{\vec r} = \vec F / m$, we can derive
\begin{equation}
\ddot z + \omega_z^2 z \equiv \ddot z + \frac{2 q V_0}{m d^2} z = 0.
\end{equation}
This is a simple harmonic oscillator equation which can be solved using standard methods.
In the transversal plane, the equations of motion are coupled due to the Lorentz force $\vec F = q \vec v \times \vec B$. Using the electric field resulting from $\vstat$ (see \cref{app:efield_equations} for details on all electric field components) we find
\begin{align}
\ddot x - \omega_0 \dot y - \frac{1}{2} \omega_z^2 x &\equiv \ddot x - \frac{q B_0}{m} \dot y - \frac{q V_0}{m d^2} x = 0, \label{eq:transv_eom_x}\\
@@ -49,7 +50,7 @@ For the case of multiple particles, it is important to include the particle-part
\subsection*{Numerical Integration Methods}
\subsubsection*{Forward Euler method}
The simplest numerical method to solve the ordinary differential equation system is the Forward Euler method. It is a first order method, meaning that the local truncation error per step is on the order of $\mathcal{O}(h^2)$, with $h$ being the step size. The global error after $N$ steps is therefore on the order of $\mathcal{O}(h)$. The method is explicit, meaning that the state of the system at the next time step can be calculated directly from the current state. Given a general ordinary differential equation of the form
The simplest numerical method to solve the ordinary differential equation system is the Forward Euler method. It is a first order method, meaning that the local truncation error per step is on the order of $\mathcal{O}(h^2)$, with $h$ being the step size. The global error after $N$ steps is therefore on the order of $\mathcal{O}(h)$ \cite{fjordholm_numerical_nodate}. The method is explicit, meaning that the state of the system at the next time step can be calculated directly from the current state. Given a general ordinary differential equation of the form
\begin{equation}
\dot y(t) = f(t, y(t)),
\end{equation}
@@ -57,18 +58,18 @@ the Forward Euler method updates the state of the system as follows:
\begin{equation}
y_{n+1} = y_n + h f(t_n, y_n).
\end{equation}
For our second order differential equations, we first rewrite them as a system of first order equations. The next state of the system is then calculated using the current position and velocity as
For our second order differential equations, we first rewrite them as a system of first order equations. The next state of the system is then calculated using the current position and velocity as \cite{fjordholm_numerical_nodate}
\begin{align}
\vec r_{n+1} &= \vec r_n + h \vec v_n, \\
\vec v_{n+1} &= \vec v_n + h \frac{\vec F(\vec r_n, \vec v_n, t_n)}{m}.
\end{align}
This method is computationally inexpensive, as we only need a single force evaluation per time step. However, it is known to be not very accurate.
\subsubsection*{Runge-Kutta 4 method}
The Runge-Kutta 4 (RK4) method is a popular and more accurate method for solving ordinary differential equations. It is a fourth-order method, meaning that the local truncation error per step is on the order of $\mathcal{O}(h^5)$, and the global error after $N$ steps is on the order of $\mathcal{O}(h^4)$. The RK4 method calculates the next state of the system using a weighted average of four different estimates of the slope (the derivative) at different points within the time step. Given a general ordinary differential equation of the form
The Runge-Kutta 4 (RK4) method is a popular and more accurate method for solving ordinary differential equations. It is a fourth-order method, meaning that the local truncation error per step is on the order of $\mathcal{O}(h^5)$, and the global error after $N$ steps is on the order of $\mathcal{O}(h^4)$ \cite{fjordholm_numerical_nodate}. The RK4 method calculates the next state of the system using a weighted average of four different estimates of the slope (the derivative) at different points within the time step. Given a general ordinary differential equation of the form
\begin{equation}
\dot y(t) = f(t, y(t)),
\end{equation}
the RK4 method updates the state of the system as follows:
the RK4 method updates the state of the system as follows \cite{cheever_fourth_2022,fjordholm_numerical_nodate}:
\begin{align}
k_1 &= h f(t_n, y_n), \\
k_2 &= h f\left(t_n + \frac{h}{2}, y_n + \frac{k_1}{2}\right), \\
@@ -83,16 +84,33 @@ In contrast to the previous two methods, the Velocity-Verlet method is a symplec
\begin{equation}
\ddot{\vec r}(t) = \frac{\vec F(\vec r(t), t)}{m}.
\end{equation}
The method is time-reversible and conserves energy better over long time periods compared to non-symplectic methods like Forward Euler and RK4. The Velocity-Verlet method updates the position and velocity of the system as follows:
The method is time-reversible and conserves energy better over long time periods compared to non-symplectic methods like Forward Euler and RK4 \cite{kubar_lecture_2025}. The Velocity-Verlet method updates the position and velocity of the system as follows \cite{kubar_lecture_2025}:
\begin{align}
\vec r_{n+1} &= \vec r_n + h \vec v_n + \frac{h^2}{2} \vec a_n, \\
\vec a_{n+1} &= \frac{\vec F(\vec r_{n+1}, t_{n+1})}{m}, \\
\vec v_{n+1} &= \vec v_n + \frac{h}{2} (\vec a_n + \vec a_{n+1}),
\end{align}
It is important to note that the Velocity-Verlet integrator requires forces to be independent of velocity. In the case, that the algorithm is applicable, it is a very efficient method, as it only requires a single force evaluation per time step, while still being a second order method with a local truncation error per step on the order of $\mathcal{O}(h^3)$ and a global error after $N$ steps on the order of $\mathcal{O}(h^2)$.
It is important to note that the Velocity-Verlet integrator requires forces to be independent of velocity. In the case, that the algorithm is applicable, it is a very efficient method, as it only requires a single force evaluation per time step, while still being a second order method with a local truncation error per step on the order of $\mathcal{O}(h^3)$ and a global error after $N$ steps on the order of $\mathcal{O}(h^2)$\cite{kubar_lecture_2025}.
Because of the symplectic nature, the low number of force evaluations and the good energy conservation properties, the Velocity-Verlet method is widely used and the quasi-standard in molecular dynamics simulations\cite{kubar_lecture_2025}.
\subsubsection*{Boris algorithm}
\textcolor{red}{TODO}
The Boris algorithm is a widely used method for integrating the equations of motion of charged particles in electromagnetic fields \cite{webb_symplectic_2014,noauthor_pdf_2025}. It is particularly well-suited for problems where the Lorentz force plays a significant role, as it is designed to handle the velocity-dependent nature of the magnetic force. The Boris algorithm is a symplectic integrator\cite{webb_symplectic_2014}\footnote{The simplecticity of Boris algorithm is controversial with disagreement between papers \cite{noauthor_pdf_2025}. All publications agree on the fact, that Boris algorithm is phase-space preserving at the very least.}, which means it conserves the phase space volume and exhibits good long-term energy conservation properties. The algorithm updates the position and velocity of a charged particle in a magnetic field as follows:
We define two auxiliary velocities $\vec v^-$ and $\vec v^+$, which represent the velocity before and after the magnetic field rotation, respectively. The algorithm proceeds in the following steps \cite{hoppock_iwhoppockboris-algorithm_2025}:
\begin{align}
\vec v^- &= \vec v_n + \frac{q \vec E h}{2m}\\
\vec v' &= \vec v^- + \vec v^- \times \vec t\\
\vec v^+ &= \vec v^- + \vec v' \times \vec s
\end{align}
with
\begin{align}
\vec t &= \frac{q \vec B h}{2m}\\
\vec s &= \frac{2 \vec t}{1 + |\vec t|^2}.
\end{align}
The final update of the velocity and position is then given by
\begin{align}
\vec v_{n+1} &= \vec v^+ + \frac{q \vec E h}{2m}\\
\vec r_{n+1} &= \vec r_n + h \vec v_{n+1}
\end{align}
\subsection*{Code Structure}
The basic framework for the numerical analysis is based on a \texttt{PenningTrap} class, which contains all the particles present in the trap, as well as a parametrization of the electric and magnetic fields. The particles are represented by a \texttt{Particle} class, which contains the physical properties of the particle, as well as its current position and velocity. With this information, the \texttt{PenningTrap} class can calculate the forces acting on each particle, including the external fields and the particle-particle interactions. The particle-particle interactions can be toggled on and off, allowing for a simulation of both scenarios. The external fields can be modified by supplying a field-method of the form \texttt{external\_field(const arma::vec\& r, double t, const PenningTrap\& trap)}. The reference to the \texttt{PenningTrap} allows for the parameters of the field to be stored in the trap object. The implementation of the \texttt{Particle} and \texttt{PenningTrap} classes can be found in \texttt{/src/project3/include/classes.hpp} of the project repository, as well as in the corresponding source file \texttt{/src/project3/src/classes.cpp}.
@@ -100,5 +118,16 @@ The basic framework for the numerical analysis is based on a \texttt{PenningTrap
\subsection*{Numerical Methods Implementation}
All numerical methods are implemented as classes inheriting from a base class \texttt{Solver}. The base class contains a reference to the \texttt{PenningTrap} object, as well as the time step size. The recording of particle properties over time, like position and velocity is part of the general \texttt{Solver} class. Each derived class implements the \texttt{step()} method, which updates the state of the system by one time step using the respective numerical method. The implementation of the \texttt{Solver} class and its derived classes can be found in \texttt{/src/project3/include/solvers.hpp} of the project repository, as well as in the corresponding source file \texttt{/src/project3/src/solvers.cpp}. The following solvers are implemented:\texttt{Forward\-Euler\-Solver}, \texttt{RK4\-Solver}, \texttt{Velocity\-Verlet\-Solver} and \texttt{Analytical\-Solver}, which implements the analytical solution for a special case of initial conditions (see \cref{app:special_case_analytical_solution}).
Unless otherwise specified, the simulations are run with the following parameters:
\begin{itemize}
\item Trap parameters: $V_0 = \qty{25.0}{\mV},\, B_0 = \qty{1.00}{\tesla},\, d = \qty{500}{\um}$
\item Particle parameters: $q = e,\, m = \qty{40.078}{\amu}$
\item Simulation parameters: $T = n_\mathrm{steps} \cdot h = \qty{50}{\us}$.
\end{itemize}
\subsection*{Tools}
\textcolor{red}{TODO}
All simulations are written in C++ and compiled using \texttt{g++ (GCC) 15.2.1 20250808 (Red Hat 15.2.1-1)}. For optimization, the \texttt{-O3} flag is used. The code makes use of the Armadillo library\cite{sanderson_armadillo_2025,sanderson_practical_2019} for linear algebra operations and the argparse library\cite{pranav_p-ranavargparse_2025} for command line argument parsing.
To visualize the results and analyze the data, Python 3.13.7 with the libraries \texttt{numpy} \cite{harris_array_2020}, \texttt{matplotlib} \cite{hunter_matplotlib_2007} and \texttt{pandas} \cite{team_pandas-devpandas_2025} is used. To create easy to use command line interfaces for the Python scripts, the \texttt{typer} library\cite{ramirez_typer_nodate} is used.
As a large number of simulations need to be run for different parameters, a bash script is used to automate the process. The script can be found in \texttt{/src/project3/generate\_results.sh} of the project repository. It uses the \texttt{pueue} task management tool\cite{beer_nukesorpueue_2025} to run multiple simulations in parallel, making use of all available CPU cores. To automate the plot generation, the script \texttt{generate\_plots.sh} is used, which can be found in the same directory.
To aid in the development process, the large language model GitHub Copilot\cite{noauthor_github_2025} was used to generate code snippets and provide suggestions for code completion. Other large language models were not used in the writing of this report.
+108 -2
View File
@@ -1,7 +1,113 @@
\subsection*{Numerical Accuracy of Trajectories}
As there is no closed form solution to the trajectories in a Penning trap containing multiple particles, which interact through Coulomb forces, the case of a single particle is used to verify the numerical accuracy of the implemented algorithms. As a metric for the accuracy, the relative error
\begin{equation} \label{eq:rel_error}
\epsilon = \frac{|\vec{r}_{\text{exact}} - \vec{r}_{\text{numerical}}|}{|\vec{r}_{\text{exact}}|}
\end{equation}
is used, where $\vec{r}_{\text{exact}}$ as derived in \cref{sec:methods}, and $\vec{r}_{\text{numerical}}$ is the numerical solution obtained from the implemented algorithms. The relative error is calculated at each time step, and the maximum value over the entire simulation is reported as the error for that particular simulation.
Apart from the quantitative measure of the accuracy, the qualitative behavior of the trajectories is also examined. The numerical solutions are plotted and compared to the expected behavior. Especially properties like energy drift of the solution and the general shape of the trajectory can give insight into the performance of the algorithms.
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/xy_trajectory/two_particles_2_no_interactions_4000.000000_steps_rk4_positions_xy_trajectory.pdf}
\caption{Trajectory of two particles in a Penning trap, simulated using the RK4 method. The particles are initialized as: $\vec r_1 = (\qty{20}{\um}, \qty{0}{um}, \qty{20}{\um})$, $\vec v_1 = (\qty{0}{\um/\us}, \qty{25}{\um/\us}, \qty{0}{\um/\us})$, $\vec r_2 = (\qty{25}{\um}, \qty{25}{\um}, \qty{0}{\um})$, $\vec v_2 = (\qty{0}{\um/\us}, \qty{40}{\um/\us}, \qty{5}{\um/\us})$.}
\label{fig:two_particle_trajectory_rk4}
\end{figure}
The Runge-Kutta 4 method shows a very good qualitative behavior, with no apparent inaccuracies in the trajectory, as shown in \cref{fig:two_particle_trajectory_rk4}. Comparing against the same trajectories calculated using the Velocity-Verlet method, we can immediately see shortcomings of the latter. Trajectories for the Velocity-Verlet algorithm, the Boris algorithm and Euler algorithm are included in \cref{fig:two_particle_trajectory_verlet,fig:two_particle_trajectory_boris,fig:two_particle_trajectory_euler} in \cref{app:further_results}. The trajectory shows a significant drift over time, which is not present in the RK4 solution. The Verlet solution rapidly increases its radius, which is not physical in a system with conserved energy. While one would expect the symplectic Verlet method to perform better in this regard, the velocity-dependant Lorentz force is not suited for computations using the Velocity-Verlet algorithm, as discussed in \cref{sec:methods}.
A similar behavior of non-physical qualitative behavior is observed for the Euler method, which also shows a significant energy drift. The Boris algorithm, which is specifically designed to handle electromagnetic forces, shows a qualitatively correct behavior, with no apparent energy drift and a stable orbit over time.
As well as the trajectory in the transversal plane, the osciallatory behavior in the $z$ direction and the phase space usage in all three dimensions is examined. As there is no influence of the magnetic field in the $z$ direction, the oscillations should be perfectly harmonic. Furthermore should the Velocity-Verlet method exhibit correct behavior, as there is no velocity-dependant force in this direction. The very good performance of RK4, Boris and Velocity-Verlet in this regard is confirmed, while the Euler method shows energy drift and a non-harmonic behavior with increasing amplitude over time.
The numerical analysis of the trajectories shows similar behavior for the two algorithms designed to handle electromagnetic forces, RK4 and Boris. The evolution of the relative error $\epsilon$ as defined in \cref{eq:rel_error} over time is shown in \cref{fig:relative_error}. Both algorithms show a steady osciallation in the relative error around \numrange{1e-3}{2e-3}, with RK4 showing a slightly lower error overall. The Velocity-Verlet and Euler methods show a significantly higher error, with the Euler method reaching a relative error of up to \num{0.1} at certain times. The Velocity-Verlet method shows a relative error of up to \num{0.2}.
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/error_plot/two_particles_1_no_interactions_32000.000000_steps_analytical_positions_error_plot.pdf}
\caption{Relative error $\epsilon$ for a single particle in a Penning trap simulated for \num{32000} time steps. The particle is initialized as: $\vec r = (\qty{20}{\um}, \qty{0}{um}, \qty{20}{\um})$, $\vec v = (\qty{0}{\um/\us}, \qty{25}{\um/\us}, \qty{0}{\um/\us})$.}
\label{fig:relative_error}
\end{figure}
\subsection*{Many-Body Simulations}
In addition to the case of perfect trajectories without Coulomb interactions, the behavior of a cloud of up to \num{100} particles is examined. This use case is of particular interest, as it is closer to real-world applications of Penning traps, such as in mass spectrometry. The limit of increasing particle number is also of interest, as the computational complexity increases significantly with the number of particles, due to the expected $\mathcal{O}(N^2)$ scaling of the Coulomb interaction calculations. Additionally, the collective behavior of particles, i.e. the statistical properties of the ensemble, and the accuracy thereof is studied.
All particles are initialized with random positions and velocities, sampled from a normal distribution. The standard deviation of the position distribution is set to \qty{50}{\um} in all three dimensions, while the standard deviation of the velocity distribution is set to \qty{50}{\um/\us}. To compare the influence of Coulomb interactions on the simulation performance and statistical properties, simulations with and without interactions are performed.
\subsubsection*{Resonant Behavior}
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/resonances/Boris_ many_particles_100_particles_40000_steps_enabled_interactions_oscillating_potential.png}
\caption{Fraction of particles remaining in the trap after \qty{50}{\us} of simulation time using Boris algorithm, as a function of the frequency of the dynamic trapping potential $\vdyn$ with different oscillatory amplitudes. The first scan (dashed) is performed without Coulomb interactions, while the second scan (solid) is performed with Coulomb interactions enabled.}
\label{fig:resonance_scan}
\end{figure}
A further behavior that can be studied in the many-body simulations is the resonant behavior of the particle cloud when a dynamic trapping potential $\vdyn$ is used. By varying the frequency of the dynamic potential $\omega_V$, we can study how the stability of the trap is influenced by resonances. The stability is measured by the fraction of particles remaining in the trap after a fixed simulation time of \qty{50}{\us}. A particle is considered to be inside the trap, if its distance from the center of the trap is less than $d$, where $d$ is the characteristic dimension of the trap, as defined in \cref{sec:methods}. In a first scan of the frequency range from \qtyrange{0.2}{2.5}{\mega\hertz}, three resonances are found, at \qty{0.7}{\mega\hertz}, \qty{1.4}{\mega\hertz} and \qty{2.1}{\mega\hertz}. The first scan is performed without Coulomb interactions between the particles, as to speed up the simulation. In a second scan, the resonance in the range of \qtyrange{1.0}{1.8}{\mega\hertz} is studied in more detail, with a finer frequency resolution and with Coulomb interactions enabled. The results of both scans are shown in \cref{fig:resonance_scan}.
\subsection*{Performance and Efficiency}
\subsection*{Many-Body Simulations}
\subsection*{Symplectic Properties}
\begin{table}
\centering
\caption{Relative run times of the different solvers in \unit{\um} per particle and time step. The times are averaged over 4 runs with different time steps. Coulomb interactions are enabled and $\vstat$ is used as the trapping potential. Output during the simulation is enabled.}
\label{tab:solver_scaling}
\begin{tabular}{lccc}
\toprule
Num. Particles & 10 & 50 & 100 \\
Solver & & & \\
\midrule
Euler & \num{1.45(30)e+00} & \num{5.90(41)e+00} & \num{1.244(90)e+01} \\
Velocity Verlet & \num{1.46(17)e+00} & \num{6.22(52)e+00} & \num{1.271(61)e+01} \\
Runge-Kutta 4 & \num{3.71(65)e+00} & \num{1.57(13)e+01} & \num{3.58(57)e+01} \\
Boris & \num{1.43(22)e+00} & \num{5.95(51)e+00} & \num{1.263(60)e+01} \\
\bottomrule
\end{tabular}
\end{table}
For different step sizes, i.e. a different number of total time steps, the total run time of a simulation with different numbers of particles is measured. For measuring the run time, the \texttt{ctime} module with the \texttt{std::clock()} function is used. All runs were performed on the same machine, with an AMD Ryzen 7 4750U CPU and \qty{16}{\giga\byte} of RAM, running Fedora 42. For parallelization of the runs the scheduler \texttt{pueue} was used with \num{14} simultaneous jobs. To reduce the influence of other processes on the machine, the runs were performed at night when the machine was otherwise idle. Furthermore, the runs were interweaved in a way, that no solving algorithm could take dvantage from time dependant properties of the machine, such as thermal throttling. The output during the simulation was enabled, as the output is reused for the analysis of the statistical properties of the particle ensemble. The I/O operations were performed outside of the timed section of the code, to get a more accurate measure of the run time of the algorithms themselves. The times were averaged over \num{4} runs with different time steps, and the relative time per particle and time step was calculated. The results are shown in \cref{tab:solver_scaling}.
The results show a clear linear scaling of the relative time per particle and time step with increasing number of particles, as expected from the $\mathcal{O}(N^2)$ scaling of the Coulomb interaction calculations. The Euler, Velocity-Verlet and Boris methods show a very similar performance, with the RK4 method being slower by a factor of approximately \num{2.8}. The similar performance of the Euler, Velocity-Verlet and Boris methods is expected, as all three methods require a single force calculation per time step. The RK4 method requires four force calculations per time step, which explains the significantly higher run time. From the scaling behavior for simulations with Coulomb interactions, we can derive that the major contributing factor to the run time is the calculation of the interactions.
\begin{table}
\centering
\caption{Total run times of the different solvers in \unit{\s} for a simulation of \num{100} particles and \num{40000} time steps. The dynamic potential $\vdyn$ is used, and Coulomb interactions are both enabled and disabled. The output during the simulation is disabled to get a more accurate measure of the run time.}
\label{tab:solver_comparison}
\begin{tabular}{lcc}
\toprule
& Interactions Disabled & Interactions Enabled \\
Solver & & \\
\midrule
Velocity Verlet & \num{1.23(26)e+00} & \num{3.14(16)e+01} \\
Runge-Kutta 4 & \num{8.8(11)e+00} & \num{1.267(48)e+02} \\
Boris & \num{1.07(24)e+00} & \num{3.11(16)e+01} \\
\bottomrule
\end{tabular}
\end{table}
For a more precise comparison on how the four different algorithms compare, with respect to run time, a simulation with \num{100} particles and \num{40000} time steps is performed. There is no output recording during the simulation, as the simulations for the resonant behavior are reused. The lack of output recording allows for a more accurate measure of the run time of the algorithms themselves. The results are shown in \cref{tab:solver_comparison}. The Boris algorithm will serve as a baseline for the comparison, as it shows the lowest execution time of the three algorithms tested. The Velocity-Verlet algorithm shows a similar performance, with an increase in CPU time of \qty{0.75+-7.33}{\percent} with interactions and \qty{14.9+-34.95}{\percent} without interactions. The RK4 method shows a significantly higher run time, with an increase of \qty{307+-26}{\percent} with interactions and \qty{721+-210}{\percent} without interactions. The stark difference in performance between the RK4 method and the other two methods is expected, as the RK4 method requires four force calculations per time step, while the other two methods only require a single force calculation per time step. The slight increase in run time of the Velocity-Verlet method compared to the Boris method is unexpected, but within the margin of error of the measurements. The error of each run time is estimated via the standard deviation of \num{348} runs without interactions and \num{483} runs with interactions. The error on the relative speed decrease is estimated via Gaussian error propagation assuming uncorrelated errors.
The high performance of the Boris method in comparison to RK4 is also an important factor to consider when assessing the numerical accuracy of the trajectories. While both algorithms performed similarly in terms of trajectory accuracy at the same step size, the decreased computation time for Boris algorithm allows for a significantly smaller step size at the same computation time. This in turn allows for a higher numerical accuracy of the trajectories, as the error generally decreases with decreasing step size.
\subsection*{Symplectic Properties}
While a full analysis of the symplectic properties of the different algorithms is outside the scope of this project, a brief qualitative analysis is performed. The symplectic nature of an algorithm is especially important in long-term simulations, as non-symplectic algorithms may produce incorrect ensemble properties over long time scales, even if the short-term accuracy is high. The Velocity-Verlet algorithm is symplectic by design for Hamiltonian systems, while the Boris algorithm is also known to exhibit symplectic properties in electromagnetic systems. The RK4 method and the Euler method are not symplectic.
A qualitative analysis of the symplectic properties is performed by examining the systems total energy
\begin{equation}
E = \sum_{i=1}^N \left( \frac{m_i v_i^2}{2} + q_i V(\vec r_i) + \frac{1}{2} \sum_{\substack{j=1 \\ j \neq i}}^N \frac{q_i q_j}{4 \pi \epsilon_0|\vec r_i - \vec r_j|} \right)
\end{equation}
over the simulation duration. As the system is isolated, the total energy should be conserved. A non-conservation of the total energy indicates a non-symplectic behavior of the algorithm.
\Cref{fig:total_energy} shows the total energy development of the system for the different algorithms. A more detailed analysis on the dependance on step size is shown in \cref{app:further_results} with \cref{fig:boris_many_particles_energy,fig:euler_many_particles_energy,fig:verlet_many_particles_energy,fig:rk4_many_particles_energy}. The RK4 and Boris methods show a very stable total energy over the entire simulation duration, with slight oscillations around a mean value. The Velocity-Verlet method shows a significant drift to increasing total energy over time, indicating a non-symplectic behavior in this system. The Euler method shows a similar behavior, with a slightly less pronounced increase in total energy over time.
\begin{figure}
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/many_particles_100_particles_32000_steps_enabled_interactions_total_energies.pdf}
\caption{Total energy of a system of \num{100} particles in a Penning trap over \num{32000} time steps, simulated using different algorithms. The kinetic component of the total energy is shown as a dotted line, while the potential component is shown as a dashed line. The solid line shows the total energy of the system.}
\label{fig:total_energy}
\end{figure}
The non-symplectic behavior of the Velocity-Verlet method in this system is expected due to the velocity-dependant Lorentz force, as discussed in \cref{sec:methods}. The non-symplectic behavior of the Euler method is also expected, as it is not a symplectic algorithm. The good energy conservation of the RK4 method is noteworthy, as it is not a symplectic algorithm either. However, a conservation of total energy in a single simulation for a specific time span does not imply symplectic properties of the algorithm. In general RK4 is not considered a symplectic algorithm, and may show non-symplectic behavior in other systems or over longer time spans.
Boris method also shows a very good conservation of total energy, which is expected due to its design for electromagnetic systems and symplectic properties therein.
Binary file not shown.
+61 -2
View File
@@ -57,14 +57,19 @@
\usepackage{hyperref} % automagic cross-referencing
\usepackage{listings} % display code
\usepackage{subfigure} % imports a lot of cool and useful figure commands
% \usepackage{float}
\usepackage{float}
%\usepackage[section]{placeins}
\usepackage{algorithm}
\usepackage{booktabs}
\usepackage[noend]{algpseudocode}
\usepackage{subfigure}
\usepackage{tikz}
\usepackage{cleveref}
\usepackage{siunitx}
% Define amu = Dalton
\DeclareSIUnit\amu{u}
\usepackage{todonotes}
\usetikzlibrary{quantikz}
% defines the color of hyperref objects
% Blending two colors: blue!80!black = 80% blue and 20% black
@@ -92,7 +97,7 @@
%This is how we create an abstract section.
\begin{abstract}
\textcolor{red}{TODO: ABSTRACT HERE.}
Using integration algorithms for ordinary differential equations, we predict the time evolution of charged particles in the electromagnetic fields of a Penning trap. Comparing the computational cost and numerical accuracy of the Forward Euler, Velocity-Verlet, Boris and Runge-Kutta 4th order methods, we find that the Boris algorithm is the most efficient choice for this problem. It is phase-space preserving, energy conserving and reduces the computational cost by up to \qty{700}{\percent} compared to general purpose approaches. To study ensemble properties of the trapped particles, we simulate the dynamics of 100 particles to find resonances and observe energy conservation of the different algorithms. Comparing to analytical solutions, at \num{32000} time steps of $h = \qty{1.56}{\ns}$, the Boris algorithm achieves a relative numerical error of the trajectory of less than \num{2e-3}.
\end{abstract}
\maketitle
@@ -146,6 +151,60 @@ we derive $\phi_\pm = 0$ as $f(0) \in \mathbb{R}$ and therefore $A_+ + A_- = x_0
A_\pm =\pm \frac{v_0 + \omega_\mp x_0}{\omega_- - \omega_+}.
\end{equation}
\section{Further Results} \label{app:further_results}
\begin{figure}[H]
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/xy_trajectory/two_particles_2_no_interactions_4000.000000_steps_velocity_verlet_positions_xy_trajectory.pdf}
\caption{Trajectory of two particles in a Penning trap simulated using the Velocity-Verlet solver (4000 steps). The particles are initialized as
$\vec r_1 = (\qty{20}{\um}, \qty{0}{\um}, \qty{20}{\um})$,
$\vec v_1 = (\qty{0}{\um/\us}, \qty{25}{\um/\us}, \qty{0}{\um/\us})$,
$\vec r_2 = (\qty{25}{\um}, \qty{25}{\um}, \qty{0}{\um})$,
$\vec v_2 = (\qty{0}{\um/\us}, \qty{40}{\um/\us}, \qty{5}{\um/\us})$.}
\label{fig:two_particle_trajectory_verlet}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/xy_trajectory/two_particles_2_no_interactions_4000.000000_steps_euler_positions_xy_trajectory.pdf}
\caption{Trajectory of two particles in a Penning trap simulated using the Euler solver (4000 steps). Same initial conditions as in Fig.~\ref{fig:two_particle_trajectory_verlet}.}
\label{fig:two_particle_trajectory_euler}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/xy_trajectory/two_particles_2_no_interactions_4000.000000_steps_boris_positions_xy_trajectory.pdf}
\caption{Trajectory of two particles in a Penning trap simulated using the Boris solver (4000 steps). Same initial conditions as in Fig.~\ref{fig:two_particle_trajectory_verlet}.}
\label{fig:two_particle_trajectory_boris}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/Boris_many_particles_100_particles_enabled_interactions_total_energies.pdf}
\caption{Total energy of 100 particles in a Penning trap simulated using the Boris solver with inter-particle interactions enabled for different time step sizes.}
\label{fig:boris_many_particles_energy}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/VelocityVerlet_many_particles_100_particles_enabled_interactions_total_energies.pdf}
\caption{Total energy of 100 particles in a Penning trap simulated using the Velocity-Verlet solver with inter-particle interactions enabled for different time step sizes.}
\label{fig:verlet_many_particles_energy}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/Euler_many_particles_100_particles_enabled_interactions_total_energies.pdf}
\caption{Total energy of 100 particles in a Penning trap simulated using the Euler solver with inter-particle interactions enabled for different time step sizes.}
\label{fig:euler_many_particles_energy}
\end{figure}
\begin{figure}[H]
\centering
\includegraphics[width=\columnwidth]{../../src/project3/python/plots/RK4_many_particles_100_particles_enabled_interactions_total_energies.pdf}
\caption{Total energy of 100 particles in a Penning trap simulated using the RK4 solver with inter-particle interactions enabled for different time step sizes.}
\label{fig:rk4_many_particles_energy}
\end{figure}
% ===========================================
\onecolumngrid
% \bibliographystyle{apalike}
+196 -25
View File
@@ -106,30 +106,6 @@ The basic idea behind stochastic approximation can be traced back to the Robbins
file = {PDF:/home/lars/Zotero/storage/9H5W9BGC/Bishop - 2006 - Pattern recognition and machine learning.pdf:application/pdf},
}
@online{roskam_supercritical_2025,
title = {Supercritical Fluid Chromatography for Chiral Analysis, Part 1: Theoretical Background {\textbar} {LCGC} International},
url = {https://www.chromatographyonline.com/view/supercritical-fluid-chromatography-for-chiral-analysis-part-1-theoretical-background},
shorttitle = {Supercritical Fluid Chromatography for Chiral Analysis, Part 1},
abstract = {With the substantial developments carried out over the past years in instrumentation, columns, and detector hyphenation, the interest in chiral supercritical fluid chromatography ({SFC}) has been steadily growing in various fields. In the first part of this review article, the theoretical advantages, technological developments, and common practices in chiral {SFC} are discussed.},
author = {Roskam, Gerry and Velde, Bas van de and Gargano, Andrea and Kohler, Isabelle},
urldate = {2025-10-05},
date = {2025-10-05},
langid = {english},
file = {Snapshot:/home/lars/Zotero/storage/LWSHJMVJ/supercritical-fluid-chromatography-for-chiral-analysis-part-1-theoretical-background.html:text/html},
}
@article{furet_first_2022,
title = {The First Class of Small Molecules Potently Disrupting the {YAP}{TEAD} Interaction by Direct Competition},
volume = {17},
doi = {10.1002/cmdc.202200303},
abstract = {Inhibition of the {YAP}{TEAD} proteinprotein interaction is an attractive therapeutic concept under intense investigation with the objective to treat cancers associated with a dysregulation of the Hippo pathway. However, owing to the very extended surface of interaction of the two proteins, the identification of small druglike molecules able to efficiently prevent {YAP} from binding to {TEAD} by direct competition has been elusive so far. We disclose here the discovery of the first class of small molecules potently inhibiting the {YAP}{TEAD} interaction by binding at one of the main interaction sites of {YAP} at the surface of {TEAD}. These inhibitors, providing a path forward to pharmacological intervention in the Hippo pathway, evolved from a weakly active virtual screening hit advanced to high potency by structurebased design.},
journaltitle = {{ChemMedChem}},
shortjournal = {{ChemMedChem}},
author = {Furet, Pascal and Bordas, Vincent and Douget, Mickaël and Salem, Bahaa and Mesrouze, Yannick and ImbachWeese, Patricia and Sellner, Holger and Vögtle, Markus and Soldermann, Nicolas and Chapeau, Emilie and Wartmann, Markus and Scheufler, Clemens and Fernández, César and Kallen, Joerg and Guagnano, Vito and Chene, Patrick and Schmelzle, Tobias},
date = {2022-09-02},
file = {Full Text PDF:/home/lars/Zotero/storage/J399MX84/Furet et al. - 2022 - The First Class of Small Molecules Potently Disrupting the YAPTEAD Interaction by Direct Competitio.pdf:application/pdf},
}
@book{vogel_particle_2024,
location = {Cham},
title = {Particle Confinement in Penning Traps: An Introduction},
@@ -182,6 +158,201 @@ This article is part of the Theo Murphy meeting issue Antiproton physics in t
urldate = {2025-10-09},
date = {2018-02-19},
note = {Publisher: Royal Society},
keywords = {antigravity, antihydrogen, antimatter, {CPT}, gravity, Lorentz invariance},
keywords = {gravity, antigravity, antihydrogen, antimatter, {CPT}, Lorentz invariance},
file = {Full Text PDF:/home/lars/Zotero/storage/7YM83XXD/Bertsche - 2018 - Prospects for comparison of matter and antimatter gravitation with ALPHA-g.pdf:application/pdf},
}
@incollection{dambrosio_runge-kutta_2023,
location = {Cham},
title = {Runge-Kutta Methods},
isbn = {978-3-031-31343-1},
url = {https://doi.org/10.1007/978-3-031-31343-1_4},
abstract = {Order barriers of linear multistep methods are rather severe. In this chapter, we move to a different family of methods, i.e., Runge-Kutta methods, enabling better order and stability barriers. The strategy is novel with respect to that beyond linear multistep methods: indeed, it is no longer of multistep type, but we move to a multistage strategy relying on the information in some additional points, located inside each subinterval of the domain discretization. Order analysis is here presented according to the theory of rooted trees and B-series.},
pages = {109--150},
booktitle = {Numerical Approximation of Ordinary Differential Problems : From Deterministic to Stochastic Numerical Methods},
publisher = {Springer Nature Switzerland},
author = {DAmbrosio, Raffaele},
editor = {D'Ambrosio, Raffaele},
urldate = {2025-10-10},
date = {2023},
langid = {english},
doi = {10.1007/978-3-031-31343-1_4},
file = {Full Text PDF:/home/lars/Zotero/storage/2AHLRIZU/DAmbrosio - 2023 - Runge-Kutta Methods.pdf:application/pdf},
}
@incollection{dambrosio_linear_2023,
location = {Cham},
title = {Linear Multistep Methods},
isbn = {978-3-031-31343-1},
url = {https://doi.org/10.1007/978-3-031-31343-1_3},
abstract = {Even if one-step methods provide the simplest and maybe most intuitive family of step-by-step numerical schemes, enlarging this class with more complex methods could be useful in order to achieve better accuracy and stability properties. For this reason, we present a more general family of methods relying on a multistep structure and provide the analysis of accuracy and stability properties of linear multistep methods.},
pages = {73--107},
booktitle = {Numerical Approximation of Ordinary Differential Problems : From Deterministic to Stochastic Numerical Methods},
publisher = {Springer Nature Switzerland},
author = {DAmbrosio, Raffaele},
editor = {D'Ambrosio, Raffaele},
urldate = {2025-10-10},
date = {2023},
langid = {english},
doi = {10.1007/978-3-031-31343-1_3},
file = {Full Text PDF:/home/lars/Zotero/storage/262EDLAD/DAmbrosio - 2023 - Linear Multistep Methods.pdf:application/pdf},
}
@software{beer_nukesorpueue_2025,
title = {Nukesor/pueue},
rights = {Apache-2.0},
url = {https://github.com/Nukesor/pueue},
abstract = {:stars: Manage your shell commands.},
author = {Beer, Arne Christian},
urldate = {2025-10-16},
date = {2025-10-15},
note = {original-date: 2015-09-04T16:24:23Z},
keywords = {command-line, command-line-tool, daemon, hacktoberfest, queue-manager, queue-tasks, rust, shell-queue},
}
@software{team_pandas-devpandas_2025,
title = {pandas-dev/pandas: Pandas},
url = {https://zenodo.org/records/17229934},
shorttitle = {pandas-dev/pandas},
abstract = {Pandas is a powerful data structures for data analysis, time series, and statistics.},
publisher = {Zenodo},
author = {team, The pandas development},
urldate = {2025-10-16},
date = {2025-09-30},
doi = {10.5281/zenodo.17229934},
keywords = {data science, python},
file = {Snapshot:/home/lars/Zotero/storage/QV289HHN/17229934.html:text/html},
}
@inproceedings{sanderson_armadillo_2025,
title = {Armadillo: An Efficient Framework for Numerical Linear Algebra},
url = {http://arxiv.org/abs/2502.03000},
doi = {10.1109/ICCAE64891.2025.10980539},
shorttitle = {Armadillo},
abstract = {A major challenge in the deployment of scientific software solutions is the adaptation of research prototypes to production-grade code. While high-level languages like {MATLAB} are useful for rapid prototyping, they lack the resource efficiency required for scalable production applications, necessitating translation into lower level languages like C++. Further, for machine learning and signal processing applications, the underlying linear algebra primitives, generally provided by the standard {BLAS} and {LAPACK} libraries, are unwieldy and difficult to use, requiring manual memory management and other tedium. To address this challenge, the Armadillo C++ linear algebra library provides an intuitive interface for writing linear algebra expressions that are easily compiled into efficient production-grade implementations. We describe the expression optimisations we have implemented in Armadillo, exploiting template metaprogramming. We demonstrate that these optimisations result in considerable efficiency gains on a variety of benchmark linear algebra expressions.},
pages = {303--307},
booktitle = {2025 17th International Conference on Computer and Automation Engineering ({ICCAE})},
author = {Sanderson, Conrad and Curtin, Ryan},
urldate = {2025-10-16},
date = {2025-03-20},
eprinttype = {arxiv},
eprint = {2502.03000 [cs]},
keywords = {Computer Science - Mathematical Software},
file = {Preprint PDF:/home/lars/Zotero/storage/UNJD6AR5/Sanderson and Curtin - 2025 - Armadillo An Efficient Framework for Numerical Linear Algebra.pdf:application/pdf;Snapshot:/home/lars/Zotero/storage/RHNN68A2/2502.html:text/html},
}
@article{sanderson_practical_2019,
title = {Practical Sparse Matrices in C++ with Hybrid Storage and Template-Based Expression Optimisation},
volume = {24},
issn = {2297-8747},
url = {http://arxiv.org/abs/1811.08768},
doi = {10.3390/mca24030070},
abstract = {Despite the importance of sparse matrices in numerous fields of science, software implementations remain difficult to use for non-expert users, generally requiring the understanding of underlying details of the chosen sparse matrix storage format. In addition, to achieve good performance, several formats may need to be used in one program, requiring explicit selection and conversion between the formats. This can be both tedious and error-prone, especially for non-expert users. Motivated by these issues, we present a user-friendly and open-source sparse matrix class for the C++ language, with a high-level application programming interface deliberately similar to the widely used {MATLAB} language. This facilitates prototyping directly in C++ and aids the conversion of research code into production environments. The class internally uses two main approaches to achieve efficient execution: (i) a hybrid storage framework, which automatically and seamlessly switches between three underlying storage formats (compressed sparse column, Red-Black tree, coordinate list) depending on which format is best suited and/or available for specific operations, and (ii) a template-based meta-programming framework to automatically detect and optimise execution of common expression patterns. Empirical evaluations on large sparse matrices with various densities of non-zero elements demonstrate the advantages of the hybrid storage framework and the expression optimisation mechanism.},
pages = {70},
number = {3},
journaltitle = {Mathematical and Computational Applications},
shortjournal = {{MCA}},
author = {Sanderson, Conrad and Curtin, Ryan},
urldate = {2025-10-16},
date = {2019-07-19},
eprinttype = {arxiv},
eprint = {1811.08768 [cs]},
keywords = {Computer Science - Mathematical Software},
file = {Preprint PDF:/home/lars/Zotero/storage/PZ5ZIXJU/Sanderson and Curtin - 2019 - Practical Sparse Matrices in C++ with Hybrid Storage and Template-Based Expression Optimisation.pdf:application/pdf;Snapshot:/home/lars/Zotero/storage/CQNT3AKH/1811.html:text/html},
}
@software{pranav_p-ranavargparse_2025,
title = {p-ranav/argparse},
rights = {{MIT}},
url = {https://github.com/p-ranav/argparse},
abstract = {Argument Parser for Modern C++},
author = {Pranav},
urldate = {2025-10-16},
date = {2025-10-15},
note = {original-date: 2019-03-30T22:28:48Z},
keywords = {argument-parser, cpp17, cross-platform, header-only, library, mit-license},
}
@software{ramirez_typer_nodate,
title = {Typer},
url = {https://github.com/fastapi/typer},
author = {Ramírez, Sebastián},
}
@online{noauthor_github_2025,
title = {{GitHub} Copilot · Your {AI} pair programmer},
url = {https://github.com/features/copilot},
abstract = {{GitHub} Copilot works alongside you directly in your editor, suggesting whole lines or entire functions for you.},
titleaddon = {{GitHub}},
urldate = {2025-10-16},
date = {2025},
langid = {english},
file = {Snapshot:/home/lars/Zotero/storage/CZLEGSHZ/copilot.html:text/html},
}
@unpublished{kubar_lecture_2025,
location = {Karlsruhe Institute for Technology, Karlsruhe},
title = {Lecture: Molecular Dynamic Simulations Summer 2025},
type = {Lecture},
howpublished = {Lecture},
author = {Kubar, Tomas and Elstner, Marcus and Kozlowska, Mariana},
date = {2025-05-20},
langid = {german},
}
@article{fjordholm_numerical_nodate,
title = {Numerical methods for {ODEs}},
url = {https://www.uio.no/studier/emner/matnat/math/MAT3110/h24/pensumliste/numerical_methods_tufte.pdf},
author = {Fjordholm, Ulrik Skre},
langid = {english},
file = {PDF:/home/lars/Zotero/storage/P27ZBG42/Fjordholm - Numerical methods for ODEs.pdf:application/pdf},
}
@online{cheever_fourth_2022,
title = {Fourth Order Runge-Kutta},
url = {https://lpsa.swarthmore.edu/NumInt/NumIntFourth.html},
author = {Cheever, Erik},
urldate = {2025-10-16},
date = {2022},
file = {Fourth Order Runge-Kutta:/home/lars/Zotero/storage/UT45E36A/NumIntFourth.html:text/html},
}
@article{noauthor_pdf_2025,
title = {({PDF}) Why is Boris algorithm so good?},
url = {https://www.researchgate.net/publication/258081219_Why_is_Boris_algorithm_so_good},
doi = {10.1063/1.4818428},
abstract = {{PDF} {\textbar} Due to its excellent long term accuracy, the Boris algorithm is the de facto standard for advancing a charged particle. Despite its popularity, up... {\textbar} Find, read and cite all the research you need on {ResearchGate}},
journaltitle = {{ResearchGate}},
urldate = {2025-10-16},
date = {2025-08-06},
langid = {english},
file = {Snapshot:/home/lars/Zotero/storage/RGHADD4H/258081219_Why_is_Boris_algorithm_so_good.html:text/html;Submitted Version:/home/lars/Zotero/storage/IHRBN7XU/2025 - (PDF) Why is Boris algorithm so good.pdf:application/pdf},
}
@article{webb_symplectic_2014,
title = {Symplectic integration of magnetic systems},
volume = {270},
issn = {0021-9991},
url = {https://www.sciencedirect.com/science/article/pii/S0021999114002368},
doi = {10.1016/j.jcp.2014.03.049},
abstract = {Simulation of the long time behavior of systems requires more than just numerical stability to return dependable results it must preserve the underlying geometric structure of the continuous equations. Symplectic integrators are the most common form of geometric integrator, and are therefore of interest in simulating plasmas for many plasma periods, for example. We present here results on generating symplectic integrators for magnetic systems, and in particular show that the algorithms due to Boris and Vay are symplectic.},
pages = {570--576},
journaltitle = {Journal of Computational Physics},
shortjournal = {Journal of Computational Physics},
author = {Webb, Stephen D.},
urldate = {2025-10-16},
date = {2014-08-01},
keywords = {Boris integrator, Magnetic systems, Symplectic integration},
file = {ScienceDirect Full Text PDF:/home/lars/Zotero/storage/G4JCWPPB/Webb - 2014 - Symplectic integration of magnetic systems.pdf:application/pdf;ScienceDirect Snapshot:/home/lars/Zotero/storage/H8YLEJ8C/S0021999114002368.html:text/html},
}
@software{hoppock_iwhoppockboris-algorithm_2025,
title = {iwhoppock/boris-algorithm},
url = {https://github.com/iwhoppock/boris-algorithm},
abstract = {The Boris algorithm for numerically tracing non-relativistic charged particles in electromagnetic fields, written in C, matlab, and python},
author = {Hoppock, Ian},
urldate = {2025-10-16},
date = {2025-09-29},
note = {original-date: 2018-11-15T15:21:28Z},
keywords = {boris, boris-algorithm, particle-tracing, particle-tracking, physics, plasma, plasma-physics, plasma-simulation, plasma-turbulence, single-particle-motion},
}