Merge branch 'master' of masterduck.fspanier.de:katrin/katrin-plasma into master

This commit is contained in:
2025-01-23 11:30:00 +01:00
+8 -56
View File
@@ -106,7 +106,7 @@
\changed{A new parallelized simulation code is presented, which uses a semi-classical Monte Carlo method to determine particle spectra in the KATRIN source. Reaction chains are generated from the decay of tritium within the source. The code includes all relevant processes: elastic scattering, ionization, excitation (electric, vibrational, rotational), recombination and various clustering processes. The main emphasis of the code is the calculation of particle spectra and particle densities and currents at specific points within the source. It features a new technique to determine these quantities. It also calculates target fields for the interaction of particles with each other as it is needed for recombination processes.\\
The code has been designed for the KATRIN experiment but is easily adaptable for other tritium based experiments like Project 8. Geometry and background tritium gas flow can be given as user input.\\
The code is parallelized using MPI and writes output using HDF5. Input to the simulation is read from a JSON description that provides general information on the simulation (resolution of the simulation domain).% and the various optional features of the code, namely user defined species with their own terminator, interaction types, movers and initialization.
The code is parallelized using MPI and writes output using HDF5. Input to the simulation is read from a JSON description.% that provides general information on the simulation (resolution of the simulation domain).% and the various optional features of the code, namely user defined species with their own terminator, interaction types, movers and initialization.
}
%A new parallelized simulation code is presented, which uses a semi classical Monte Carlo method to determine particle spectra in the KATRIN source by tracking single particles from interaction to interaction. The moved distance is determined from the mean free path (MFP) and subsequently from cross sections and particle densities. Particle densities can be provided by the user, or are calculated during simulation from the movement of the simulated particles. This enables also the inclusion of recombination effects in the calculation. The implemented interaction types include elastic scattering, ionization, clustering and excitation (electric, vibrational, rotational) and recombination. Initial particles are created using the neutral gas density and known $\upbeta$-decay spectrum. The code is optimized for the conditions in the KATRIN source, being able to cope with a large density gradient, neutral gas flow and many different particle species in a Tritium environment.
@@ -442,7 +442,7 @@ During evaluation of the scattering angle, the energy bin is determined and the
%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, \changed{where data for the cross section was only available for low impact energies}. At high energies, the scattering angle distribution is determined from the external simulation Elsepa \citep{Salvat:2005aa}, 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.}
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, \changed{where data for the cross section was only available for low impact energies}. 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.
The cross section of elastic scattering was measured at different experiments in the energy range of \changed{\SI{2e-2}{eV} to \SI{1e2}{eV}}. The results of these experiments were combined by \citep{Tawara.1990} and parameterized by \citep{Yoon.2008}.
@@ -574,9 +574,7 @@ After the injection of particles, the timer class is provided with the time, tha
\subsection{Parallelization}
\label{ssec:parallelization}
\changed{Even physical processes with a small cross section (and consequently low probability) will have an effect on the electron spectrum. In order to account for all processes high statistics is necessary, which may not be feasible on single core systems. Parallelization is therefore}
%In order to obtain reasonable and robust results of the simulation, high statistics is necessary. This is especially the case, if also improbable effects like the excitation by rotation, should be visible in the results. The goal of high statistics can be reached by parallel computation.
An asset of the code is, that the Monte Carlo events of each particle track can be dependent on the other, for example in the case of recombination. In order to obtain this strong point, the number of desired events per CPU core are further subdivided into cycles with a fixed length. After each cycle, a synchronization step between the CPU cores is initiated. During the synchronization step, the data on the density fields is shared among all CPU cores. Since the simulation is set up the same for all CPU cores, this step only needs an additive operation on the array of cumulated times%, see section~\ref{ssec:denstiy_fields},
In order to obtain reasonable and robust results of the simulation, high statistics is necessary. This is especially the case, if also improbable effects like the excitation by rotation, should be visible in the results. The goal of high statistics can be reached by parallel computation. For the code, a simple parallelization strategy was used. The desired number of decays are distributed evenly on the cores, and each CPU core follows the simulation loop (see section~\ref{ssec:general_diagram}) independent from the others. The general setup of the simulation stays the same between CPU cores. However, an asset of the code is, that the Monte Carlo events of each particle track can be dependent on the other, for example in the case of recombination. In order to obtain this strong point, the number of desired events per CPU core are further subdivided into cycles with a fixed length. After each cycle, a synchronization step between the CPU cores is initiated. During the synchronization step, the data on the density fields is shared among all CPU cores. Since the simulation is set up the same for all CPU cores, this step only needs an additive operation on the array of cumulated times%, see section~\ref{ssec:denstiy_fields},
and an additive step, to share the passed time. Additionally to the density field synchronization, also the data of the current borders and deletion loggers are synchronized, which is not strictly necessary, but keeps the data congruent on all CPU cores and makes the output step easier, see section~\ref{ssec:output}.
The benefit of this parallelization scheme lies in its simplicity. It is easy to include more CPU cores for the calculation. Only the synchronization step takes slightly longer. However, the main simulation effort lies in the movement and interaction step. Thus, the synchronization does not play a significant role. Furthermore, there is no need of a CPU core, which directs tasks to the other CPU cores. Hence, little communication and data exchange is necessary between CPU cores, which saves calculation time.
@@ -916,13 +914,14 @@ Figure~\ref{fig:maxInteractions_vs_density_2e22} shows the same plot as before b
\section{Results}
\label{sec:results}
The simulation tool KARL was designed to determine the charged particle distributions inside of the KATRIN source and to investigate influences of external parameters on this spectrum. Some results of charged particle spectra, particle densities and currents at various positions in the source were already presented and discussed in \citep{Kellerer_2022}, including a comparison of results at different source conditions.
The simulation tool KARL was designed to determine the charged particle distributions inside of the KATRIN source and to investigate influences of external parameters on this spectrum. Results of charged particle spectra, particle densities and currents at various positions in the source were already presented and discussed in \citep{Kellerer_2022}, including a comparison of results at different source conditions. The inclined reader is referred to this publication for an in-depth description.
Thus, we decided to present at this point only a particle spectrum in the center of the source, for illustrative purposes only. The spectrum can be found in Figure~\ref{fig:katrin_particle_spectrum}. It was calculated using a factor 10 reduced particle density in the source compared to the simulations in \citep{Kellerer_2022}. The specific input file can be found at $\text{simulation\_config}/\text{parameter}/\text{katrin.json}$.
It was calculated using a factor 10 reduced particle density in the source compared to the simulations in \citep{Kellerer_2022}. The specific input file can be found at $\text{simulation\_config}/\text{parameter}/\text{katrin.json}$. Source parameters for this scenario include the standard geometry $L=\SI{1657}{\centi\meter}$, $R=\SI{4.5}{\centi\meter}$ and a magnetic field of $B=\SI{2.5}{\tesla}$. The maximum neutral tritium density was chosen to be $n_{\text{T}_2}= \SI{6.3E19}{\per\cubic\meter}$. The most important numerical parameters are the maximum interaction number of $10^6$ and a maximal drift distance of $\SI{10^{-3}}{\meter}$
\begin{figure}[tbp]
\centering
\includegraphics[width=0.8\textwidth]{figures/spectrum_at_z=8_at_period=LastSyncPeriod.pdf}
\caption{Particle spectra in the centre of the source. Simulated using a maximum Tritium density of \SI{6.3E19}{\per\cubic\meter} and a constant magnetic background field of \SI{2.5}{T}}
\caption{Particle spectra in the centre of the source. Simulated using a maximum Tritium density of \SI{6.3E19}{m^3} and a constant magnetic background field of \SI{2.5}{T}}
\label{fig:katrin_particle_spectrum}
\end{figure}
@@ -932,9 +931,7 @@ Electrons are created with energies drawn from the Fermi distribution of $\upbet
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.
\changed{The spectrum shows that electrons and ions from the beta-decay undergo a number of processes. Otherwise the existence of different types of tritium ions could not be explained. This makes the use of sophisticated Monte Carlo necessary.}
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}
@@ -950,52 +947,7 @@ To our knowledge KARL is the only freely available Monte Carlo simulation for tr
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.
\subsection{Results beyond other codes}
The KARL code has some features that make it unique compared to previous simulation tools. The main feature it has been developed for is the ability to calculate spectra and densities at any (predefined) point within the source. Due to the extreme inhomogeneity of the tritium density this is a very important feature which may not play such a decisive role in other Monte Carlo tools like GEANT which are primarily used for rather homogenous target materials.
In the context of the KATRIN experiment this has a number of applications: 1) The particle distributions are an input quantity for further plasma simulations that are requiring spatially resolved data. 2) The current through the rear wall is one observable for the experiment. 3) The current through the radial wall may explain missing electrons and scattering processes close to the wall.
The composition of different species with respect to the position along the $z$-axis is one example of the outputs of the KARL code. Fig. \ref{fig:densities_all_vs_z} shows the graph where one can see that the electron density resembles the tritium gas density, while T$^2+$ has a flat distribution. T$^3+$ as a product of clustering has its density maximum also farther out. In general the higher clusters have a much higher density than the one- and two-atomic ions.
\begin{figure}[tbp]
\centering
\includegraphics[width=0.8\textwidth]{figures/densities_all_vs_z.pdf}
\caption{Densities for different species simulated by the KARL code. The densities are measured at predefined interfaces at fixed $z$. The plateaus mark the longitudinal bin width, where the total current flows through. The simulation is using the standard KATRIN scenario as discussed before. }
\label{fig:densities_all_vs_z}
\end{figure}
The longitudinal particle current was determined through 33 virtual planes in longitudinal direction. The planes were aligned in such a way that the first and last longitudinal plane coincide with the rear wall and the passage to the DPS. The corresponding longitudinal current profile can be found in Fig. \ref{fig:tube_current_vs_z}.
The shape of the electron current is as expected. Electrons are reflected at the DPS and the corresponding current is therefore zero. Electrons are most likely to be terminated at the rear wall. Thus, the electron current is the highest here. The electron current decreases continuously from the rear wall towards the DPS. Hence, the electrons can move from the upstream side towards the downstream side and are not hindered from passing by the neutral gas flow.
The ions are created in the center and stream to both sides. There is no driving force of the ions towards the other side of the inlet. Thus, the ion current at the inlet (8m) is zero. The current heading towards the DPS and towards the rear wall is almost identical. The differences can be explained by the accessory tritium gas between the first pump and the rear wall.
\begin{figure}[tbp]
\centering
\includegraphics[width=0.8\textwidth]{figures/tube_current_vs_z.pdf}
\caption{Source tube currents. Absolute radial particle current towards the
beam tube in longitudinal direction. The plateaus mark the longitudinal bin width, where the total current flows through. Standard KATRIN parameters are used.}
\label{fig:tube_current_vs_z}
\end{figure}
The sum of the ion current leaving the source at the DPS and at the rear wall is below the electron current leaving at the rear wall. This can only be explained through an ion current, which is directed towards the beam tube. The orresponding current was detected through a radial virtual plane located at the beam tube walls. The corresponding current can be found in Fig. \ref{fig:comparison_j_n_vs_r}. This current is caused by the change of position of the guiding center after elastic scattering. The difference in position is dependent on the Larmor radius of the particle, which in turn scales with the square root of the mass. Additionally, the cross section of ion scattering is much higher than for electron scattering. Therefore, more collisions occur, which shift the guiding center. Thus, the radial ion current is expected to be significantly higher than the radial electron current.
The absolute current to the tube is also influenced by the density profile of electrons and ions. There is no analytic expression of the radial currents. It can be seen that the shape of the current towards the beam tube is similar to the shape of the neutral particle density. This is caused by the increased elastic scattering probability in the center due to the increased neutral gas density. The $T^+$ current is below the T$^{3+}$ current, which is caused by
the density difference and the different Larmor radius of the two ion species. The current of T$^+$ is in the same order of magnitude than the current of the electrons, even though the masses of both species are significantly different. This behavior is caused by the large difference in density. There is a contribution of $T^{2+}$ to the radial current. This means that there must be a non-negligible amount of charge transfer reactions, or that enough $T^{2+}$
is created close to the beam tube walls. The shape of the T $2+$ current does not coincideperfectly with the tritium density. Thus, it must be assumed in first order that both effects play a role.
\begin{figure}[tbp]
\centering
\includegraphics[width=0.8\textwidth]{figures/comparison_j_n_vs_r.pdf}
\caption{Current in radial direction as a function of radius using the standard KATRIN setup with varying background magnetic fields. }
\label{fig:comparison_j_n_vs_r}
\end{figure}
longitudinal / transversal current
composition by z
\section{Build instructions}
In order to compile the source code of KARL, download the code on a Unix system and follow the instructions in the README file. The necessary dependencies are listed in the REQUIRED file. A sample configuration file (test\_parameter.json) can be found in the KARL folder simulation\_config.