test cases in code mentioned

This commit is contained in:
2025-01-21 17:11:13 +01:00
parent 8170d7f800
commit c3f016854c
+3 -2
View File
@@ -679,11 +679,12 @@ The queue used in the simulation to keep track of the simulated particles is no
\section{Test cases}
\label{sec:test}
The code was tested thoroughly, including a comparison of specific simulations with expectations. These expectations were formulated for scenarios where an analytical expression of the simulation output can be derived. For these simulations, each interaction was investigated detached from the others. \changed{More complex test cases, with the influence of multiple interactions at the same time where not performed due to the lack of analytical expectations or experimental data.}
The code was tested thoroughly, including a comparison of specific simulations with expectations. These expectations were formulated for scenarios where an analytical expression of the simulation output can be derived. For these simulations, each interaction was investigated detached from the others. \changed{More complex test cases, with the influence of multiple interactions at the same time where not performed due to the lack of analytical expectations or experimental data. \\
Within the `test\_cases' directory in the code-base a subdirectory for each test case is provided. These subdirectories contain the parameter and plotting files used to obtain the corresponding data presented in this section. The used output files will be provided via an external website.}
%The inclined reader is referred to \citep{Kellerer_2022} for a description of all the tests. Here, only a special test case shall be mentioned, because of its importance: the test of elastic scattering. One can show with this test that the method of density fields, the treatment of interactions in general and movement of particles are implemented correctly because they all are a prerequisite for the correct result.
\paragraph{Elastic scattering}
In this test case, monoenergetic particles are injected into a neutral gas reservoir with a Maxwell-Boltzmann distributed velocity. \changed{The temperature of the neutral gas was set to the same value used in KATRIN, i.e. \SI{80}{\kelvin}. The electrons were injected in the middle of the simulation domain with an energy of \SI{8}{\milli eV} and a velocity direction in positive z-direction. The magnetic field was also set to the same configuration as in the KATRIN case, i.e. uniform with a value of \SI{2.5}{\tesla}. A total of 1600 events were used per simulation.}
In this test case, monoenergetic particles are injected into a neutral gas reservoir with a Maxwell-Boltzmann distributed velocity. \changed{The temperature of the neutral gas was set to \SI{80}{\kelvin}. The electrons were injected in the middle of the simulation domain with an energy of \SI{8}{\milli eV} and a velocity direction in positive z-direction. The magnetic field was also set to be uniform with a value of \SI{2.5}{\tesla}. The neutral tritium background gas was set to be uniformly distributed with a value of \SI{1e22}{\per\cubic\m} A total of 1600 events were used per simulation.}
If elastic scattering is implemented correctly, then these particles will adopt the velocity distribution of the neutral gas independent of the initial energy. The shape can be described by the Maxwell-Boltzmann distribution \citep{peckham.1992}, scaled by the factor $\sqrt{E}$ taking into account the logarithmic binning and the speed of particles leaving the simulation domain. The simulation result and a fit to the data are shown in in Figure~\ref{fig:boltzmann_test}.
It can be seen that the data is well described by the fit with little deviations over a wide range of energies. The deviations can be attributed to the inherent statistical uncertainty of the Monte Carlo method. Simulations with other injection energies resulted in the same distribution (not shown).