diff --git a/docs/paper/the-karl-code/paper.tex b/docs/paper/the-karl-code/paper.tex index 7c12473..9ab9203 100755 --- a/docs/paper/the-karl-code/paper.tex +++ b/docs/paper/the-karl-code/paper.tex @@ -120,7 +120,7 @@ A new parallelized simulation code is presented, which uses a semi classical Mon \begin{small} \noindent {\em Manuscript Title:} KARL - A Monte Carlo model for atomic and molecular processes in the tritium atmosphere of the KATRIN experiment \\ - {\em Authors:} Jonas Kellerer, Christian Reiling, Felix Spanier \\ % Reiling hier drinnen lassen, auch wenn code nicht mehr von ihm enthalten ist? + {\em Authors:} Jonas Kellerer, Christian Sendlinger, Felix Spanier \\ % Reiling hier drinnen lassen, auch wenn code nicht mehr von ihm enthalten ist? {\em Program Title:} KARL - \textbf{KA}trin WGTS elect\textbf{R}on and ion spectrum Monte Car\textbf{L}o \\ {\em Journal Reference:} \\ %Leave blank, supplied by Elsevier. {\em Catalogue identifier:} \\ %Leave blank, supplied by Elsevier. @@ -151,9 +151,9 @@ Both the initial and reflected stream of electrons interact with the gas in the The electron spectrum for high energy electrons is comparably simple to describe, as it follows the Fermi statistics of beta decay \citep{Fermi:1934aa}. However, it is much more complicated to describe for secondary electrons, leading to a Markov chain of events, with further branching event chains. First, new particles are created through ionization on the whole energy range. This creates a multitude of new possible branches with their own characteristics. Also other interactions become more dominant at lower energies, namely elastic scattering and excitation processes of the tritium molecules through electronic, rotational and vibrational excitation. All of these interactions create new branches with feedback to the initial branches. Additionally, electrons can also recombine with the existing ions in the source. This process is not only dependent on the electron spectrum, but the ion spectrum as well. There are many different types of ions, which are created by clustering processes with the neutral gas. The neutral gas density, which is the dominant interaction partner for both electrons and ions, is not constant in the source, but ranges over more than three orders of magnitude over \SI{16}{m} \citep{Kuckert.2018}. Additionally, it has a position dependent mean drift velocity, also covering two orders of magnitude \citep{Kuckert.2018}. -Two different methods of descriptions seem obvious: a description through the temporal evolution of phasespace elements and a description through the Monte Carlo method by tracking of single particles \citep{MOBUS2001519}. The first method impresses with a high resolution but is very computational intensive, especially with many different interaction types and species. Thus, it was rejected for the simulation of the problem at hand. The Monte Carlo method seems preferable, but in a classical Monte Carlo scheme each of the simulated events is independent on the others. This is not the case for events for electron and ions tracks because of recombination. This problem is addressed in the KARL code, which is presented in the following paper. +Two different methods of descriptions seem obvious: a description through the temporal evolution of phasespace elements and a description through the Monte Carlo method by tracking of single particles \citep{MOBUS2001519}. The first method impresses with a high resolution but is very computational intensive, especially with many different interaction types and species. Thus, it was rejected for the simulation of the problem at hand. The Monte Carlo method seems preferable, but in a classical Monte Carlo scheme each of the simulated events is independent on the others. This is not the case for events for electron and ions tracks because of recombination. This problem is addressed in the KARL code, which is presented in the this paper. -In the KARL code, single particles are tracked through the source from one interaction to another. The moved distance between interactions is determined from the mean free path. The performed interactions are drawn from a list of available interactions. During movement it is recorded how long a particle stays within a predefined segment of the source. The density of the particle specie in this segment is then proportional to the cumulated time in that segment. Thus, the density can be determined during simulation. It can therefore also be used to evaluated the likeliness of recombination. +In the KARL code, single particles are tracked through the source from one interaction to another. The moved distance between interactions is determined from the mean free path. The performed interactions are drawn from a list of available interactions. During movement it is recorded how long a particle stays within a predefined segment of the source. The density of the particle specie in this segment is then proportional to the cumulated time in that segment. Thus, the density can be determined during simulation. It can therefore also be used to evaluate the likeliness of recombination. The KARL code is customized to the special conditions in the KATRIN source. Hence, special care is taken to ensure correct movement of particles through the large density gradient. Additionally, all relevant interactions in a tritium gas atmosphere are included for both electrons and ions. @@ -413,7 +413,7 @@ The simulation code used for this study was parallelized to improve the efficien \subsection{Output} \label{ssec:output} -The output of the simulation is written to a single HDF5 file \citep{hdf5}, which allows for extendable, structured data storage. Output is performed in two different modes. First, it is enacted after the initialization phase of the simulation to write non-changing data to the file for each of the tracked specie. This includes for example, the mass and charge of the species, the volumes and surface areas of the segmentation and the number of bins. Second, the output is performed to write the simulated data (from density fields, current collector, deletion logger) to file. This step is performed after each CPU synchronization, see section~\ref{ssec:parallelization}. In general, only the last output is of interest for the user. However, the steps in between can be used for debugging. Additionally, if the user has not set the correct wall time at the computing cluster an intermediate result is available. Thus, the user can decide for each specie and output type (density field, current collector, deletion logger) the output interval and if the new data of the step should be saved separately or if the data of the old step should be overwritten. The latter saves disk space. Nevertheless, the size of the output file is comparably small, since it holds only derived properties; Depending of course on the number of segments chosen by the user. +The output of the simulation is written to a single HDF5 file \citep{hdf5}, which allows for extendable, structured data storage. Output is performed in two different modes. First, it is enacted after the initialization phase of the simulation to write non-changing data to the file for each of the tracked specie. This includes for example, the mass and charge of the species, the volumes and surface areas of the segmentation and the number of bins. Second, the output is performed to write the simulated data (from density fields, current collector, deletion logger) to file. This step is performed after each CPU synchronization, see section~\ref{ssec:parallelization}. In general, only the last output is of interest for the user. However, the steps in between can be used for debugging. Additionally, if the user has not set the correct wall time at the computing cluster an intermediate result is available. Thus, the user can decide for each specie and output type (density field, current collector, deletion logger) the output interval and if the new data of the step should be saved separately or if the data of the old step should be overwritten. The latter saves disk space. Nevertheless, the size of the output file is comparably small, since it holds only derived properties; Depending of course on the number of segments chosen by the user. For most use cases the size of the output file is well below 1 gigabyte. \subsection{Initialization} \label{ssec:initialization} @@ -485,7 +485,7 @@ It can be seen that the data is well described by the fit with little deviations \begin{figure}[tbp] \centering \includegraphics[width=0.8\textwidth]{figures/fit_boltzmann_errorbars.pdf} - \caption{Electron spectrum and fit. Monoenergetic electrons are injected with energies of $E_\text{inj.} = \SI{8}{meV}$ into a neutral gas reservoir with a Maxwell-Boltzmann distributed velocity $(T = \SI{80}{K}$). No other interactions are activated than elastic scattering and the cross section of elastic scattering is set to a constant value. The data is fitted by a scaled Maxwell-Boltzmann distribution ($T_\text{fit} = \SI{80.40 \pm 0.08}{K}$). The error bars are calculated by using six simulations with different random seeds.} + \caption{Electron spectrum and fit. Monoenergetic electrons are injected with energies of $E_\text{inj.} = \SI{8}{meV}$ into a neutral gas reservoir with a Maxwell-Boltzmann distributed velocity $(T = \SI{80}{K}$). No other interactions are activated than elastic scattering and the cross section of elastic scattering is set to a constant value. The data from the numerical experiment is fitted by a scaled Maxwell-Boltzmann distribution ($T_\text{fit} = \SI{80.40 \pm 0.08}{K}$). The error bars are calculated by using six simulations with different random seeds.} \label{fig:boltzmann_test} \end{figure} @@ -524,6 +524,8 @@ J.K. acknowledges the support of the Ministry for Education and Research BMBF (5 F.S. acknowledges the support of the Deutsche Forschungsgemeinschaft through grant SP 1124/9. +The authors would like to thank Christian Reiling for his work on earlier versions of the KARL code. + % ? %MPI 1.1 support was provided by the Open MPI implementation under the BSD-new license. Design and implementation of the MPI standard by OpenMPI is described in \cite{Gabriel_2004}.