KARL code:
Section "Comparison of results" Rechtschreibkorrekturen Reply to Referee 1: Comparison, Verification
This commit is contained in:
@@ -400,4 +400,12 @@ abstract = {Methods based on Monte Carlo solutions of the transport equation for
|
||||
Volume = {48},
|
||||
Year = {2005},
|
||||
Bdsk-File-1 = {YnBsaXN0MDDSAQIDBFxyZWxhdGl2ZVBhdGhZYWxpYXNEYXRhXxBXLi4vLi4vLi4vLi4vLi4vLi4vUGFwZXJzL05hc3RveWFzaGNoaWkvRWZmZWN0cyBvZiBQbGFzbWEgUGhlbm9tZW5hIG9uIE5ldXRyaW5vIE1hc3MucGRmTxECEgAAAAACEgACAAAMTWFjaW50b3NoIEhEAAAAAAAAAAAAAAAAAAAAAAAAAEJEAAH/////H0VmZmVjdHMgb2YgUGxhc21hICNGRkZGRkZGRi5wZGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP////8AAAAAAAAAAAAAAAAABgADAAAKIGN1AAAAAAAAAAAAAAAAAA1OYXN0b3lhc2hjaGlpAAACAGgvOlVzZXJzOkNocmlzdGlhblJlaWxpbmc6RG9jdW1lbnRzOlBhcGVyczpOYXN0b3lhc2hjaGlpOkVmZmVjdHMgb2YgUGxhc21hIFBoZW5vbWVuYSBvbiBOZXV0cmlubyBNYXNzLnBkZgAOAGIAMABFAGYAZgBlAGMAdABzACAAbwBmACAAUABsAGEAcwBtAGEAIABQAGgAZQBuAG8AbQBlAG4AYQAgAG8AbgAgAE4AZQB1AHQAcgBpAG4AbwAgAE0AYQBzAHMALgBwAGQAZgAPABoADABNAGEAYwBpAG4AdABvAHMAaAAgAEgARAASAGZVc2Vycy9DaHJpc3RpYW5SZWlsaW5nL0RvY3VtZW50cy9QYXBlcnMvTmFzdG95YXNoY2hpaS9FZmZlY3RzIG9mIFBsYXNtYSBQaGVub21lbmEgb24gTmV1dHJpbm8gTWFzcy5wZGYAEwABLwAAFQACABf//wAAAAgADQAaACQAfgAAAAAAAAIBAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAKU},
|
||||
Bdsk-Url-1 = {https://doi.org/10.13182/FST05-A1028}}
|
||||
Bdsk-Url-1 = {https://doi.org/10.13182/FST05-A1028}}
|
||||
|
||||
@MASTERSTHESIS {TUMMC,
|
||||
author = "Leo Lasschinger",
|
||||
title = "Fast Monte Carlo Simulation for Electron Scattering in the KATRIN Tritium Source (dissertation).",
|
||||
school = "Technische Universität München",
|
||||
year = "2024",
|
||||
type = "Master Thesis"
|
||||
}
|
||||
@@ -135,7 +135,7 @@ The code is parallelized using MPI and writes output using HDF5. Input to the si
|
||||
{\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.
|
||||
{\em Licensing provisions:} GNU Public Licence \\ %muss so sein wegen blitz
|
||||
{\em Licensing provisions:} GNU Public License \\ %muss so sein wegen blitz
|
||||
{\em Programming language:} C++ \\
|
||||
{\em Computer:} any workstation or cluster that has a modern C++ compiler (e.g. g++ 8.2 or later) an MPI implementation and the required external libraries \\
|
||||
{\em Operating system:} Linux / Unix \\
|
||||
@@ -272,12 +272,12 @@ where $N^+$ and $N^-$ are the number of particles crossing the faces in positive
|
||||
|
||||
For the simulation, we decided to use C++ as a programming language for several reasons. First, it can be used for object oriented programming. This makes the code easier to read, because the classes were closely modelled after their physical representation. Secondly, the accuracy of the simulation relies on high statistics. Thus, many particle decays need to be simulated, which requires a fast calculation. For the same reason, we decided to employ parallel calculation, see section~\ref{ssec:parallelization}.
|
||||
|
||||
There are three basic building blocks of the simulation. First, the simulation itself is treated as a class, which is responsible for initialization of the simulation environment, see section~\ref{ssec:initialization} and guiding through the flow of the simulation, see Figure~\ref{fig:simulation_flow}. Second, the particle class, which represents the simulated physical particles through their physical position, velocity and type of specie. Third, the specie class, which encapsulates the general behaviour of each particle type (\changed{e.g.} electrons) in the simulation.
|
||||
There are three basic building blocks of the simulation. First, the simulation itself is treated as a class, which is responsible for initialization of the simulation environment, see section~\ref{ssec:initialization} and guiding through the flow of the simulation, see Figure~\ref{fig:simulation_flow}. Second, the particle class, which represents the simulated physical particles through their physical position, velocity and type of specie. Third, the specie class, which encapsulates the general behavior of each particle type (\changed{e.g.} electrons) in the simulation.
|
||||
|
||||
The main feature of the species class is to provide access to the density, velocity distribution and drift velocity of a specific type of particle. All three quantities are used for the calculation of the MFP and the choice of the interaction partner. However, we decided to distinguish between two types of species, those who are tracked throughout the simulation (electrons and ions) and those who act as background (tritium gas). This way, it is more clear which specie fulfils which function, especially in the initialization process.
|
||||
% Additionally, the particle class only accepts the tracked specie class as input, reducing programming errors in the development of new injectors or interactions.
|
||||
|
||||
The tracked specie class is composed of different classes, providing access to the behaviour of each particle type. Hence, each tracked specie can be tailored to the requirements of the user, either for testing, but also for the inclusion of further particles types. Along these lines, the code can be adapted to other experimental environments, provided the knowledge of the interactions and their cross sections. Each of the class members fulfils a special task, which will be described in detail in the following sections.
|
||||
The tracked specie class is composed of different classes, providing access to the behavior of each particle type. Hence, each tracked specie can be tailored to the requirements of the user, either for testing, but also for the inclusion of further particles types. Along these lines, the code can be adapted to other experimental environments, provided the knowledge of the interactions and their cross sections. Each of the class members fulfils a special task, which will be described in detail in the following sections.
|
||||
|
||||
\subsection{Movement}
|
||||
\label{ssec:movement}
|
||||
@@ -447,7 +447,7 @@ The elastic scattering class is initiated using the cross section, the target sp
|
||||
|
||||
During evaluation of the scattering angle, the energy bin is determined and the corresponding angle distribution selected. The scattering angle is then drawn from \changed{this} angle distribution \changed{using a piecewise linear distribution}.
|
||||
|
||||
%Note: Somewhere the struture for input files has to be explained! -> explain in README, short desc. in text here
|
||||
%Note: Somewhere the structure for input files has to be explained! -> explain in README, short desc. in text here
|
||||
|
||||
In some cases, there is not enough data from one source alone, to cover the whole impact energy range. This is the case for the scattering of electrons with tritium molecules. At high energies, the scattering angle distribution is determined from external simulation \citep{Kellerer_2022}, at lower energies isotropic scattering can be assumed. \changed{For these cases, the scattering angle distribution can be composed using the known distributions and a threshold energy defining point of transition between the distributions.}
|
||||
%For these cases, the angle can be determined through the composition of two distributions.
|
||||
@@ -477,7 +477,7 @@ The second type of clustering includes three interaction partners:
|
||||
H^+ + H_2 + H_2 \rightarrow H_3^+ + H_2 \, .
|
||||
\end{equation}
|
||||
Since for both types of reactions only the rate coefficients from \citep{Gerlich.1992,Paul.1995} are available, the cross section itself has to be approximated. This has been explained in \citep{Kellerer2022_1000143868} and the resulting cross sections are shown in Figure~\ref{fig:t3p_interactions}.
|
||||
%Note: if i'm honest, way to little explanation, since rate coefficents themselves are only at a specific temperature etc...
|
||||
%Note: if i'm honest, way to little explanation, since rate coefficients themselves are only at a specific temperature etc...
|
||||
}
|
||||
The clustering class is initiated using these \changed{approximated} cross sections, the target specie and the specie, which is the result of the clustering process. In the interaction itself it is assumed that the new particle follows the direction of movement of the target particle, but with different absolute velocity. The new absolute velocity is calculated from the velocity of a target particle and the new particles mass, since the initial direction is less important due to a high probability of collisions with the neutral gas, which quickly randomizes the velocity direction. The velocity of a target particle is determined \changed{analogous} to its calculation in elastic scattering.
|
||||
|
||||
@@ -559,7 +559,7 @@ The calculation of the density also needs the physical time, see equation~\ref{e
|
||||
|
||||
The current collector is structured similar to the density field class. The difference being, that it holds the crossings in positive and negative direction through the predefined faces in three dimensional arrays for crossings in longitudinal, azimuthal and radial direction instead. The faces can be aligned \changed{with} the segmentation of the density fields, but can in general be set \changed{arbitrarily}.
|
||||
|
||||
% Next sentence is a lie, only the binning of the density field is used, the current collector does not even have the funcitons to perform the corresponding checks
|
||||
% Next sentence is a lie, only the binning of the density field is used, the current collector does not even have the functions to perform the corresponding checks
|
||||
However, the mover uses both the density fields and current collectors to evaluate possible endpoints of movement, see section~\ref{ssec:movement}. Thus, a different segmentation will lead to a longer simulation time.
|
||||
|
||||
|
||||
@@ -591,7 +591,7 @@ The simplicity of the method also produces some drawbacks. First, the load on th
|
||||
The effectiveness of this parallelization strategy can be seen in the scaling graph shown in Figure~\ref{fig:scaling_graph}.
|
||||
\changed{The graph show the weak scaling behaviour of the code, i.e. the number of events per CPU core is kept constant and the number of cores is varied. In an ideal scenario the wallclock time needed until completion depends only on the number of events per CPU core, meaning that the number of events processed per second should increase linearly with the number of tasks. It can be seen that the graph follows this behaviour quite well, except for the first data point, which is slower due to the initialization step that cannot be parallelized.}
|
||||
%The graph illustrates the time it took for the simulation to complete for different numbers of events and CPU cores. As can be seen, the scaling is linear except for the first data point, which is slightly slower. This is due to the initialization of the simulation and the distribution of events to the different CPU cores.
|
||||
Once the simulation is properly initialized, the linear scaling is observed for all subsequent data points. This behaviour is expected and is a common characteristic of parallelized simulations.
|
||||
Once the simulation is properly initialized, the linear scaling is observed for all subsequent data points. This behavior is expected and is a common characteristic of parallelized simulations.
|
||||
|
||||
\begin{figure}[tbp]
|
||||
\centering
|
||||
@@ -669,6 +669,8 @@ In the species section, all relevant information on the species used in the simu
|
||||
|
||||
The queue used in the simulation to keep track of the simulated particles is no queue in the classical sense. Similar to a classical queue, particles are added to the end of the queue, when they are created through injection or by interactions like ionization. However, the next particle to simulate after the old one was deleted is not drawn from the bottom of the queue but at random from all particles in the queue. This decision was made, because the single events can be dependent on each other through the density fields and a bias towards injected particles should be avoided, especially because the injected particles have mostly higher energies than the others. Hence, it was decided to store the particles in a standard library vector \citep{Josuttis.2012}. To save computation time, the vector is initialized with a size of 100 elements, which marks a rough estimate of an upper limit on new particle per particle loop at standard KATRIN conditions.
|
||||
|
||||
|
||||
|
||||
\section{Test cases}
|
||||
\label{sec:test}
|
||||
|
||||
@@ -746,7 +748,7 @@ As can be seen the expectation and the results fit quite well, only showing some
|
||||
\paragraph{Charge Exchange}
|
||||
\changed{The expectation for charge exchange is quite similar as for the case of elastic scattering, namely that the initial population adopts the energy distribution of the background population. The difference being that only one scattering event per particle is needed to thermalize.\\
|
||||
For the simulation monoenergetic T$_2^+$ ions are injected from the left side of the simulation domain with an energy of \SI{10}{eV} and a velocity direction pointing in positive $z$-direction. The neutral density has been set to \SI{1.224e19}{\per\cubic\m} to allow for a short MFP with a temperature of \SI{80}{\kelvin}.\\
|
||||
The energy spectrum for the ions is shown in Figure~\ref{fig:charge_exchange} close to the right side of the simulation domain at $z = \SI{1.44}{\m}$. A peak at \SI{10}{eV} can also be seen, due to unscattered particles. Furhtermore, the Maxwell Boltzmann distribution is not well met. This is however an effect of a non-constant cross section. From the cross section shown in Figure~\ref{fig:t2p_interactions} it becomes apparent that lower energetic ions have a higher likelihood to interact and therefore spending a lower amount of time with their current energy than a particle with a higher energy. Assuming the time to scale inversely with the probability of performing an interaction leads to an additional factor in the Maxwell Boltzmann distribution of $1/\sigma(E)$. This scaled version is also shown in the plot of the results and it is evident that this expectation is met quite well confirming the above discussion.
|
||||
The energy spectrum for the ions is shown in Figure~\ref{fig:charge_exchange} close to the right side of the simulation domain at $z = \SI{1.44}{\m}$. A peak at \SI{10}{eV} can also be seen, due to unscattered particles. Furthermore, the Maxwell Boltzmann distribution is not well met. This is however an effect of a non-constant cross section. From the cross section shown in Figure~\ref{fig:t2p_interactions} it becomes apparent that lower energetic ions have a higher likelihood to interact and therefore spending a lower amount of time with their current energy than a particle with a higher energy. Assuming the time to scale inversely with the probability of performing an interaction leads to an additional factor in the Maxwell Boltzmann distribution of $1/\sigma(E)$. This scaled version is also shown in the plot of the results and it is evident that this expectation is met quite well confirming the above discussion.
|
||||
}
|
||||
\begin{figure}
|
||||
\centering
|
||||
@@ -785,13 +787,28 @@ Thus, we decided to present at this point only a particle spectrum in the center
|
||||
\label{fig:katrin_particle_spectrum}
|
||||
\end{figure}
|
||||
|
||||
It can be seen, that the electron spectrum has a significantly different shape than the spectrum of the ions. It reaches up to values of \SI{18.3}{keV}, while the ion spectra drop of at approximately \SI{0.1}{eV}. This behaviour can be attributed to the different creation mechanism and interactions of the particles \citep{Kellerer_2022}.
|
||||
It can be seen, that the electron spectrum has a significantly different shape than the spectrum of the ions. It reaches up to values of \SI{18.3}{keV}, while the ion spectra drop of at approximately \SI{0.1}{eV}. This behavior can be attributed to the different creation mechanism and interactions of the particles \citep{Kellerer_2022}.
|
||||
|
||||
Electrons are created with energies drawn from the Fermi distribution of $\upbeta$-decay and are then cooled down by ionization and excitation processes. Furthermore electrons can perform elastic scatterings with the neutral gas. The combination of the processes produce the shown spectrum, with the characteristic Fermi distribution at high energies ($> \SI{100}{eV}$), the thermal like distribution at low energies ($< \SI{0.1}{eV}$) and the intermediate distribution including the ionization cutoff at approximately \SI{10}{eV}.
|
||||
|
||||
Ions on the other hand are created with thermal energies of the neutral gas and then perform mostly elastic scatterings, which preserves the Maxwell Boltzmann distribution. The thermal distributions of ions and electrons differ due to different cross sections at lower energies \citep{Kellerer2022_1000143868}. The relative height of the differential density for the different ion species is a result of clustering processes, which will result in the end in T$_3^+$ ions. Clustering is more efficient for T$_2^+$ ions than for T$^+$ ions, which results in a higher density for T$^+$ ions than for T$_2^+$ ions.
|
||||
|
||||
The spectrum shows very clearly that all processes for the particles interact in a non-trivial manner. It is therefore necessary to use a sophisticated tool like KARL to simulate their behaviour inside the KATRIN source.
|
||||
The spectrum shows very clearly that all processes for the particles interact in a non-trivial manner. It is therefore necessary to use a sophisticated tool like KARL to simulate their behavior inside the KATRIN source.
|
||||
|
||||
|
||||
\subsection{Comparison to other Monte Carlo tools}
|
||||
|
||||
To our knowledge KARL is the only freely available Monte Carlo simulation for tritium based experiments. There are however other attempts to model the processes inside the KATRIN experiment. The earliest example is the paper by Nastoyashchii et al. \citep{Nastoyashchii:2005aa}. They follow the idea of a Monte Carlo code where events are generated from the decay of the tritium gas within the source. Most of the elastic and inelastic scattering processes which are implemented in the KARL code are also present in the code by Nastoyashchii et al with recombination being the remarkable exemption. The most striking difference however is the lack of spatial resolution: The only result of the code is the lifetime of particles in the source (and the spectrum derived from that). Due to the extreme inhomogeneity of the tritium density the results produced by this approach are in many cases not applicable. The results of KARL are compared to this approach in Fig. \ref{fig:Nastoyashchii_com}.
|
||||
|
||||
\begin{figure}[tbp]
|
||||
\centering
|
||||
\includegraphics[width=0.8\textwidth]{figures/comprarison_ndE_Nastoyashchii.pdf}
|
||||
\caption{Particle spectra from the KARL code at different positions in the source in comparison with results obtained by \cite{Nastoyashchii:2005aa}. As Nastoyashchii et al only calculate spectra by taking into account the lifetime within the source there is no possibility to derive spectra at a defined position. The spike at around \SI{10}{eV} is due to an incorrect representation of excitation processes. }
|
||||
\label{fig:Nastoyashchii_comp}
|
||||
\end{figure}
|
||||
|
||||
Previously further simulations for the KATRIN experiment have been published \cite{TUMMC}. This code also includes many of the processes included in KARL but lacks the tracing of secondary particles completely and focusses solely on the impact of tritium interactions on the primary particles.
|
||||
|
||||
|
||||
|
||||
\section{Build instructions}
|
||||
|
||||
@@ -21,9 +21,13 @@ development of specific pieces of software. However, as a reader of this journal
|
||||
1. <done>F: The physics underlying the simulations is not laid out in detail, and concepts that seem relevant are not clearly explained.</done>
|
||||
<reply>We have tried to outline the basic concepts and underlying assumptions in the introduction. Along with other changes laid outer later we have attempted to streamline the reasoning of the article </reply>
|
||||
|
||||
2. <fs>F: The advantages of this new code with respect to others Monte Carlo codes already available and which could allow the same quantities to be obtained are not discussed. A more or less systematic comparison with the results obtained with these other Monte Carlo codes is missing. These comparisons have been included neither in this manuscript nor in the authors’ article in J. Inst (Ref. [7]), which is continually used as a reference for this work.</fs>
|
||||
2. <done>F: The advantages of this new code with respect to others Monte Carlo codes already available and which could allow the same quantities to be obtained are not discussed. A more or less systematic comparison with the results obtained with these other Monte Carlo codes is missing. These comparisons have been included neither in this manuscript nor in the authors’ article in J. Inst (Ref. [7]), which is continually used as a reference for this work.</done>
|
||||
|
||||
3. <fs>F:: I find it particularly inappropriate, and unusual, not to analyze in detail different examples that show the advantages of the code presented here. The authors restrict to a single case in which only the elastic scattering is tested. If only this scattering is tested, how the authors can state that this permit to ensure that the whole code can be considered correct?</fs>
|
||||
<reply>We have included a section on the comparison with Monte Carlo codes that address the same physical setup. Unfortunately there is only a handful of codes that do something remotely similar to what we have done here. One could discuss e.g. the application of code frameworks like GEANT for these calculations, but to our understanding the effort to fit our problem into GEANT is about as complex as developing a new code. Should there be other codes out there which we have not taken into consideration we would be grateful for a hint. We would then add further benchmarks. </reply>
|
||||
|
||||
3. <done>I find it particularly inappropriate, and unusual, not to analyze in detail different examples that show the advantages of the code presented here. The authors restrict to a single case in which only the elastic scattering is tested. If only this scattering is tested, how the authors can state that this permit to ensure that the whole code can be considered correct?</done>
|
||||
|
||||
<reply>The paper has now an extensive list of tests of the different processes which are implemented in the code. Together with the expanded discussion of the processes this should allow for a thorough verification and reproduction of the results. </reply>
|
||||
|
||||
Apart from that, I have pointed out several drawbacks, which I list below.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user