more changes

This commit is contained in:
2024-12-09 16:14:08 +01:00
parent dce3a3b10b
commit 2f6d54043d
3 changed files with 42 additions and 34 deletions
+29 -22
View File
@@ -152,7 +152,12 @@ A new parallelized simulation code is presented, which uses a semi classical Mon
The KATRIN experiment is designed to measure the electron anti-neutrino mass to unprecedented sensitivity down to \SI{0.2}{eV} \citep{KATRIN2005}. At the experiment, the mass is inferred from the shape of the $\upbeta$-decay spectrum of tritium. The contribution of the mass on the shape is most dominant in the endpoint region. The experiment can be divided into two parts: the source section and the detector section. In the source section, tritium gas is circulated which provides a high luminosity stream of beta electrons. These electrons are magnetically guided to the detector section. There they are separated by their kinetic energy: one small stream being recorded by the detector, the other larger one reflected back to the source.
Both the initial and reflected stream of electrons interact with the gas in the source. For high energy electrons these interactions include mostly elastic scattering, but also ionization. Hence, many more electrons, and therefore also ions, are created in the source than from beta decay alone. The charged particle density is high enough, that a plasma forms in the source \citep{Kuckert.2016}. \changed{This plasma influences the high energy spectrum through its self generated inhomogeneous electric potential.} A precise knowledge of the electron and ion energy spectrum and density is necessary for any plasma analysis.
Both the initial and reflected stream of electrons interact with the gas in the source.
\changed{These interactions include among others elastic scattering, ionization and excitation processes. For electrons below \SI{100}{eV} elastic scattering is the dominant process, while for electrons above that energy ionization becomes dominant. This can lead to a large amount of electrons being created if the neutral gas density is high enough.}
%For high energy electrons these interactions include mostly elastic scattering, but also ionization. Hence, many more electrons, and therefore also ions, are created in the source than from beta decay alone.
The charged particle density is high enough, that a plasma forms in the source \citep{Kuckert.2016}. \changed{This plasma influences the high energy spectrum through its self generated inhomogeneous electric potential.} A precise knowledge of the electron and ion energy spectrum and density is necessary for any plasma analysis.
The incident electron spectrum originating from tritium beta decay before any scattering 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 chain of events, with further branching event chains. First, new particles are created through ionization. \changed{Ionization produces two indistinguishable electrons with energies between 0 eV and the impact energy.} 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.
@@ -162,7 +167,7 @@ The incident electron spectrum originating from tritium beta decay before any sc
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}. \changed{The first method impresses with a high resolution in space and velocity but is very computational intensive, especially with many different interaction types and species. A comparison with Monte Carlo type simulations is complicated: Since this would not be a statistical method the noise is negligble, but the requirements to save the phase-space distribution (specifically for high velocities) are extremely high. 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. \changed{It can therefore also be used to calculate the MFP of interactions between simulated particles, e.g. for recombination of electrons with any of the present ions.}
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. \changed{It can therefore also be used to calculate the MFP of interactions between simulated particle species, e.g. for recombination of electrons with ions.}
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.
@@ -183,10 +188,11 @@ For each movement step, the mean free path $\lambda_\text{mfp}$ of the correspon
\end{equation}
where $E$ is the kinetic energy of the particle in the lab frame, $\sigma_i$ is the cross section of a specific interaction, and $n_i$ the particle number density of the interaction partner. In the lab frame, the neutral gas has a non-zero drift velocity. The cross sections are evaluated from predefined functions. The particle number density of the interaction partner is calculated either from a predefined function for background species, or from the density field for tracked species, see section~\ref{ssec:denstiy_fields} and \ref{sec:implementation} for more information. The actual moved distance $d$ is a statistical quantity, which can be derived from the MFP through
\changed{
\begin{equation}
d = \lambda_\text{mfp} \cdot \log \frac{1}{\eta} \commaeq
d = -\lambda_\text{mfp} \cdot \log \eta \commaeq
\label{eq:distance_from_mfp}
\end{equation}
\end{equation}}
where $\eta \in (0, 1]$ is an uniform random number. This is due to an assumed Poisson random process, that results in an exponential probability distribution. The particle is then moved by this distance $d$ in dependence on the electromagnetic fields inside the source, see section~\ref{ssec:movement}. During this step the density fields of the corresponding specie are updated.
After the movement step it is evaluated if the particle needs to be terminated, which is mainly a check if the particle has left the simulation domain, or has hit a wall, see~\ref{ssec:termination}. If the particle is still alive, a random interaction is selected from the list of available interactions, weighted by its probability to occur. The probability scales with the cross section of that interaction and the interaction partner particle density. The corresponding interaction is performed and the interaction products, which are not the current particle are added to the particle queue. If the particle does no longer exist after the interaction (through recombination or clustering) it is terminated, otherwise the next movement step is performed.
@@ -238,7 +244,8 @@ For the simulation, we decided to use C++ as a programming language for several
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 (like 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 particles 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 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 particles 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.
@@ -269,59 +276,59 @@ The drift mover is based on the description of the movement of the particle thro
In the drift mover, the movement is subdivided into smaller steps, given by the smaller value of the maximal step length $d_\text{max}$ (provided by the user) and the leftover distance the particle has still to move. The movement is ended, when the leftover distance is zero. Each movement step follows the same procedure. It can be subdivided into the change of the particle position and the change of the velocity, both described in the following.
The position change is described by the movement around the gyrocenter $\Delta \vec{x}_\text{c}$, the movement of the gyrocenter parallel to the magnetic field $\Delta \vec{x}_\parallel$ and the drift movement of the gyrocenter $\Delta \vec{x}_\text{D}$.
The position change is described by the movement around the gyrocenter $\Delta \mathbf{x}_\text{c}$, the movement of the gyrocenter parallel to the magnetic field $\Delta \mathbf{x}_\parallel$ and the drift movement of the gyrocenter $\Delta \mathbf{x}_\text{D}$.
The drift movement of the gyrocenter is calculated from the $E \times B$ drift velocity
\begin{equation}
\vec{v}_\text{D} = \frac{\vec{E}\times \vec{B}}{\abs{\vec{B}}^2}
\mathbf{v}_\text{D} = \frac{\mathbf{E}\times \mathbf{B}}{\abs{\mathbf{B}}^2}
\end{equation}
and the timestep length $\Delta t$
\begin{equation}
\Delta t = \frac{\Delta x}{\abs{\vec{v}_\parallel} + \abs{\vec{v}_\perp} + \abs{\vec{v}_\text{D}}} \commaeq
\Delta t = \frac{\Delta x}{\abs{\mathbf{v}_\parallel} + \abs{\mathbf{v}_\perp} + \abs{\mathbf{v}_\text{D}}} \commaeq
\end{equation}
where $\Delta x$ is the step length of the movement step and $\vec{v}_\parallel$ and $\vec{v}_\perp$ the velocity parallel and perpendicular to the magnetic field. The moved distance through the drift motion evaluates the to
where $\Delta x$ is the step length of the movement step and $\mathbf{v}_\parallel$ and $\mathbf{v}_\perp$ the velocity parallel and perpendicular to the magnetic field. The moved distance through the drift motion evaluates the to
\begin{equation}
\Delta \vec{x}_\text{D} = \Delta t \cdot \vec{v}_\text{D} \fullstop
\Delta \mathbf{x}_\text{D} = \Delta t \cdot \mathbf{v}_\text{D} \fullstop
\end{equation}
The movement of the gyrocenter parallel to the magnetic field is calculated from
\begin{equation}
\Delta \vec{x}_\parallel = \Delta t \cdot \vec{v}_\parallel \fullstop
\Delta \mathbf{x}_\parallel = \Delta t \cdot \mathbf{v}_\parallel \fullstop
\end{equation}
The position change around the gyrocenter is calculated in three steps. First, the gyro radius is determined
\begin{equation}
r_\text{g} = \frac{m \abs{\vec{v}_\perp}}{q \abs{\vec{B}}} \commaeq
r_\text{g} = \frac{m \abs{\mathbf{v}_\perp}}{q \abs{\mathbf{B}}} \commaeq
\end{equation}
from the magnitude of the perpendicular velocity, the particle mass $m$ and charge $q$, which in turn is then used to determine the vector from the particle to the gyrocenter $\vec{x}_\text{pc}$
from the magnitude of the perpendicular velocity, the particle mass $m$ and charge $q$, which in turn is then used to determine the vector from the particle to the gyrocenter $\mathbf{x}_\text{pc}$
\begin{equation}
\vec{x}_\text{pc} = - r_\text{g} \frac{\vec{v}_\parallel \times \vec{v}_\perp}{\abs{\vec{v}_\parallel \times \vec{v}_\perp}} \fullstop
\mathbf{x}_\text{pc} = - r_\text{g} \frac{\mathbf{v}_\parallel \times \mathbf{v}_\perp}{\abs{\mathbf{v}_\parallel \times \mathbf{v}_\perp}} \fullstop
\end{equation}
Second, the gyro frequency is calculated through
\begin{equation}
\omega_\text{g} = \frac{q \cdot \abs{\vec{B}}}{m} \fullstop
\omega_\text{g} = \frac{q \cdot \abs{\mathbf{B}}}{m} \fullstop
\end{equation}
The gyro frequency is then used to calculate the relative pitch angle change towards the gyrocenter
\begin{equation}
\Delta \theta = \Delta t \cdot \omega_\text{g} \fullstop
\end{equation}
Third, the movement of the gyrocenter is calculated by the rotation of $\vec{x}_\text{pc}$ around $\vec{v}_\parallel$ with the angle of rotation $\Delta \theta$ through Rodriges' rotation formula. In total, the position changes calculates to
Third, the movement of the gyrocenter is calculated by the rotation of $\mathbf{x}_\text{pc}$ around $\mathbf{v}_\parallel$ with the angle of rotation $\Delta \theta$ through Rodriges' rotation formula. In total, the position changes calculates to
\begin{equation}
\Delta \vec{x} = \Delta \vec{x}_\text{c} + \Delta \vec{x}_\parallel + \Delta \vec{x}_\text{D} \fullstop
\Delta \mathbf{x} = \Delta \mathbf{x}_\text{c} + \Delta \mathbf{x}_\parallel + \Delta \mathbf{x}_\text{D} \fullstop
\end{equation}
The velocity after movement is determined by the acceleration of the particle through the electric field $\Delta \vec{v}_\text{E}$, through the rotation of the perpendicular velocity around the gyrocenter $\vec{v}_{\perp,\text{rot}}$ and the initial parallel velocity
The velocity after movement is determined by the acceleration of the particle through the electric field $\Delta \mathbf{v}_\text{E}$, through the rotation of the perpendicular velocity around the gyrocenter $\mathbf{v}_{\perp,\text{rot}}$ and the initial parallel velocity
\begin{equation}
\Delta \vec{v} = \vec{v}_\parallel + \Delta \vec{v}_\text{E} + \vec{v}_{\perp,\text{rot}} \fullstop
\Delta \mathbf{v} = \mathbf{v}_\parallel + \Delta \mathbf{v}_\text{E} + \mathbf{v}_{\perp,\text{rot}} \fullstop
\end{equation}
The acceleration through the electric fields calculates to
\begin{equation}
\Delta \vec{v}_\text{E} = \Delta t \frac{q \vec{E}_\parallel}{m} \commaeq
\Delta \mathbf{v}_\text{E} = \Delta t \frac{q \mathbf{E}_\parallel}{m} \commaeq
\end{equation}
where $\vec{E}_\parallel$ is the electric field parallel to the magnetic field.
where $\mathbf{E}_\parallel$ is the electric field parallel to the magnetic field.
The rotation of the perpendicular velocity is again calculated using Rodriges' rotation formula with the axis of rotation $\vec{v}_\parallel$ and angle of rotation $\Delta \theta$.
The rotation of the perpendicular velocity is again calculated using Rodriges' rotation formula with the axis of rotation $\mathbf{v}_\parallel$ and angle of rotation $\Delta \theta$.
\subsection{Termination}
\label{ssec:termination}