Excitation test case text and image
This commit is contained in:
Binary file not shown.
@@ -406,21 +406,21 @@ In addition to the terminator class, the user can choose to add a deletion logge
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=.9\textwidth]{figures/eT2_overview.pdf}
|
||||
\caption{Cross sections for electron and H$_2$ interactions. The excitation cross sections depicted are the sum over the different excitation states. Image taken from \citep{Kellerer2022_1000143868}.}
|
||||
\caption{Cross sections for electron and H$_2$ interactions. The excitation cross sections depicted are the sum over the different excitation states. Image from \citep{Kellerer2022_1000143868}.}
|
||||
\label{fig:et2_interactions}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=.9\textwidth]{figures/T2Iinteractions.pdf}
|
||||
\caption{Cross sections for H$_2^+$ interactions with H$_2$. The dissociative recombination and excitation cross sections are in relation to the kinetic energy of the electrons in the rest frame of the H$_2^+$ ions. Image taken from \citep{Kellerer2022_1000143868}.}
|
||||
\caption{Cross sections for H$_2^+$ interactions with H$_2$. The dissociative recombination and excitation cross sections are in relation to the kinetic energy of the electrons in the rest frame of the H$_2^+$ ions. Image from \citep{Kellerer2022_1000143868}.}
|
||||
\label{fig:t2p_interactions}
|
||||
\end{figure}
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=.9\textwidth]{figures/T3Iinteractions.pdf}
|
||||
\caption{Cross sections for the formation and destruction of H$_3^+$ within a H$_2$ environment. The dissociative recombination and excitation cross sections are in relation to the kinetic energy of the electrons in the rest frame of the H$_2^+$ ions. Image taken from \citep{Kellerer2022_1000143868}.}
|
||||
\caption{Cross sections for the formation and destruction of H$_3^+$ within a H$_2$ environment. The dissociative recombination and excitation cross sections are in relation to the kinetic energy of the electrons in the rest frame of the H$_2^+$ ions. Image from \citep{Kellerer2022_1000143868}.}
|
||||
\label{fig:t3p_interactions}
|
||||
\end{figure}
|
||||
|
||||
@@ -603,7 +603,10 @@ Once the simulation is properly initialized, the linear scaling is observed for
|
||||
\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. For most use cases the size of the output file is well below 1 gigabyte.
|
||||
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 \changed{an user-specified number of} CPU synchronization \changed{steps}, 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.
|
||||
\changed{Furthermore, the output of the different diagnostics (density field, current collector, deletion logger) can be modified to the specific use case. For each of the three fields the output interval can be set independently. The species for which the specific output should be performed and whether the latest output should be overwritten can be set individually as well.}
|
||||
%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}
|
||||
@@ -618,10 +621,11 @@ For input quantities that have a physical unit attached to them, e.g. the height
|
||||
%If energy or length values are to be input by the user, the corresponding value has to be provided by its value and its unit. An automatic unit conversion will be taken care of by the program. Currently there are conversions available for \SI{}{cm}, \SI{}{mm} and \SI{}{m}, and for \SI{}{J} and \SI{}{eV}.
|
||||
|
||||
\paragraph{Functions}
|
||||
Functions are an integral part of the code, used for example to express cross sections. There are two types of functions implemented: a mapping of $\mathbb{R} \to \mathbb{R}$, called later on 1D-function or a mapping of $\mathbb{R}^3 \to \mathbb{R}$, called later on 3D-function.
|
||||
%Functions are an integral part of the code, used for example to express cross sections.
|
||||
There are two types of functions implemented: a mapping of $\mathbb{R} \to \mathbb{R}$, called later on 1D-function or a mapping of $\mathbb{R}^3 \to \mathbb{R}$, called later on 3D-function.
|
||||
|
||||
\paragraph{Scalar field}
|
||||
Scalar fields represent the idea, that for every point in space a certain value can be assigned. The scalar field can currently only be initiated through one option, namely the \textit{ScalarFieldFunctionInZ}. As the name suggests, it returns values, which are provided through a 3D-function. The general input of coordinates are transformed to cylinder coordinates $(r, \phi, z)$ and the corresponding function value is returned.
|
||||
Scalar fields currently can only be initiated through one option, namely the \textit{ScalarFieldFunctionInZ}. As the name suggests, it returns values, which are provided through a 3D-function. The general input of coordinates are transformed to cylinder coordinates $(r, \phi, z)$ and the corresponding function value is returned.
|
||||
|
||||
\paragraph{Vector field}
|
||||
% Vector fields represent the idea, that for every point in space a certain three dimensional vector can be assigned.
|
||||
@@ -629,13 +633,15 @@ A vector field can be initiated through three different options: \textit{VectorF
|
||||
%For all three types, the general input of coordinates are transformed in the class to cylinder coordinates $(r, \phi, z)$ and the corresponding vector is calculated and returned.
|
||||
|
||||
\begin{itemize}
|
||||
\item \textit{VectorFieldConstant}: The return value of the vector field does not depend on its input and a constant vector is returned.
|
||||
\item \textit{VectorFieldConstant}: \changed{A constant cylinder vector is returned}%The return value of the vector field does not depend on its input and a constant vector is returned.
|
||||
\item \textit{VectorFieldFunctionInZ}: The returned vector only points in z direction. The norm of the vector is provided by a 3D-function.
|
||||
\item \textit{VectorFieldFromArray}: The returned vector is provided by precalculated values in arrays. The option \textit{radius} and \textit{height} is used together with the array size to define a cylindrical binning. The input coordinate is transformed to a bin coordinate, which provides the index in the array. If the given coordinates is outside of the defined binning, a zero vector is returned.
|
||||
\item \textit{VectorFieldFromArray}: The returned vector is provided by precalculated values in arrays. The option \textit{radius} and \textit{height} is used together with the array size to define a cylindrical binning. %The input coordinate is transformed to a bin coordinate, which provides the index in the array.
|
||||
If the given coordinates is outside of the defined binning, a zero vector is returned.
|
||||
\end{itemize}
|
||||
|
||||
\paragraph{Velocity distribution}
|
||||
The velocity distribution represents the idea, that a velocity vector can be sampled for each point in space. Currently there is only one type of distribution implemented, the \textit{VelocityDistributionFromFunction}. However, in cases, where a velocity distribution is needed for a constructor but never will be used a `null' option is also available. For the \textit{VelocityDistributionFromFunction}, the velocity is sampled from a predefined function, the \textit{VelocityDistributionFunction}. Here, two options are available, the \textit{IsotropicDistribution} and the \textit{DirectedDistribution}. Both have in common, that first an energy is sampled from an given energy distribution. However, for the \textit{DirectedDistribution} this energy is used to scale a predefined direction vector using a predefined mass. For the \textit{IsotropicDistribution} the direction of movement is sampled from an isotropic distribution and then scaled to represent the correct energy. The mass can either be derived from a given particle type, or directly given as a \changed{numerical} value.
|
||||
%The velocity distribution represents the idea, that a velocity vector can be sampled for each point in space.
|
||||
Currently there is only one type of distribution implemented, the \textit{VelocityDistributionFromFunction}. However, in cases, where a velocity distribution is needed for a constructor but never will be used a `null' option is also available. For the \textit{VelocityDistributionFromFunction}, the velocity is sampled from a predefined function, the \textit{VelocityDistributionFunction}. Here, two options are available, the \textit{IsotropicDistribution} and the \textit{DirectedDistribution}. Both have in common, that first an energy is sampled from an given energy distribution. However, for the \textit{DirectedDistribution} this energy is used to scale a predefined direction vector using a predefined mass. For the \textit{IsotropicDistribution} the direction of movement is sampled from an isotropic distribution and then scaled to represent the correct energy. The mass can either be derived from a given particle type, or directly given as a \changed{numerical} value.
|
||||
|
||||
There are three different energy distributions available in the code, the electron energy distribution of tritium decay (\textit{TritiumBetaDecay}), the Maxwell Boltzmann distribution (\textit{MaxwellBoltzmann}) and a constant distribution (\textit{Constant}).
|
||||
\begin{itemize}
|
||||
@@ -646,13 +652,14 @@ There are three different energy distributions available in the code, the electr
|
||||
|
||||
\paragraph{Simulation}
|
||||
|
||||
In the simulation section, one can set the number of simulated events over all CPU cores (\textit{SimulatedEvents}). For KATRIN these events symbolize tritium decays. The events are distributed evenly on all CPUs. The parameter \textit{EventStride} is used to define the number of events after which the density field data is synchronized between the CPUs. Also, output could be performed here.
|
||||
In the simulation section, one can set the number of simulated events over all CPU cores (\textit{SimulatedEvents}). For KATRIN these events symbolize tritium decays. The events are distributed evenly on all CPUs. The parameter \textit{EventStride} is used to define the number of events per CPU after which the density field data is synchronized between the CPUs. %Also, output could be performed here.
|
||||
|
||||
\paragraph{Output}
|
||||
In the output section, it is defined, where the output file is stored and with which filename. The folder is given relative to the home folder of the user or can be given as an absolute path. Additionally, the output specifics are defined in this section for each of the simulation data, density fields, current borders and deletion logger.
|
||||
|
||||
\begin{itemize}
|
||||
\item \textit{Interval}: Defines how often an output should occur. This can either be set to \textit{EachSync}, so each time the CPUs are synced the output is performed, or to a positive integer value. This value specifies the rate of output. So the number two would correspond to an output every second CPU synchronization step.
|
||||
\item \textit{Interval}: Defines how often an output should occur \changed{relative to the CPU synchronization step. The value can either be set to \textit{EachSync} or a positive integer value}. %This can either be set to \textit{EachSync}, so each time the CPUs are synced the output is performed, or to a positive integer value. %This value specifies the rate of output.
|
||||
So the number two would correspond to an output every second CPU synchronization step.
|
||||
\item \textit{OverwriteLast}: Defines if each output should be stored on disk, or if each new output overwrites the last.
|
||||
\item \textit{Species}: Defines for which specie the output should be performed. It can either set to \textit{all}, or to a list of species given their specie name in the parameter file, eg. $[\text{electron}, \text{T2+}]$.
|
||||
\end{itemize}
|
||||
@@ -704,30 +711,58 @@ Figure~\ref{fig:ionization_test} shows the electron spectrum at two different $z
|
||||
\end{figure}
|
||||
|
||||
\paragraph{Excitation}
|
||||
\changed{Is currently done test case enough?}
|
||||
\changed{The excitation process is quite similar to the ionization process, in that the interaction requires a minimum amount of energy of the impact particle. The main difference is that no new particles are created. Due to the assumption made on the scattering angle distribution in the excitation process (see section~\ref{ssec:interactions}), it is quite simple to formulate an analytic example if only a single interaction is possible during the propagation of the particle.\\
|
||||
There is a high amount of potential excitation interactions that electrons can have with molecular tritium. However, the only major difference between these different interactions are the energy threshold $E_\text{th}$ and the cross section of the interaction. Therefore it is sufficient to only consider a single implemented excitation process in order to test the validity of the approach.\\
|
||||
Three different simulations were chosen to be performed, all with the same setup. The electrons were injected at the left side of the simulation domain with a specific energy and their velocity directed with the $z$-axis. The neutral density $n_\text{b}$ is chosen to be uniformly distributed within the source starting from a position $z_\text{neutral} > 0$ in order to allow for a distance of free propagation. The value of $n_\text{b}$ is chosen to be \SI{3.21e21}{\per\cubic\m} in order to allow for an appropriate MFP. The used interaction (or rather the specific cross section) has an threshold energy $E_\text{th} = \SI{12.754}{eV}$. Therefore the three energies considered are \SI{12}{eV}, \SI{20}{eV} and \SI{500}{eV}. The first energy was chosen such as to test for the threshold energy, the second one allows for a singular interaction and the third one allows for many interaction. For each case a number of \num{8e5} particles are simulated.\\
|
||||
The density of the injected particles $n_u$ is expected to follow an exponential distribution, depending on the mean free path of the interaction
|
||||
\begin{equation}
|
||||
\label{eq:density_injected}
|
||||
n_u = n_0 \exp\left(-\frac{z - z_\text{neutral}}{\lambda_\text{mfp}(E_\text{inj})}\right) \commaeq
|
||||
\end{equation}
|
||||
with $n_0$ being the density in case no interaction would be performed.
|
||||
This is valid for any injection energy $E_\text{inj}$.\\
|
||||
In case only a single scattering is possible the density of the scattered particles $n_s$ is given by
|
||||
\begin{equation}
|
||||
n_s \propto \left(1-\exp\left(-\frac{z - z_\text{neutral}}{\lambda_\text{mfp}(E_\text{inj})}\right)\right) n_0 \fullstop
|
||||
\end{equation}
|
||||
Due to the predictable change in velocity as well as the conserved direction of movement it is possible to predict the proportionality factor from equation~\ref{eq:target_field_density}. This leads to
|
||||
\begin{equation}
|
||||
\label{eq:density_single_scattering}
|
||||
n_s = \left(1-\exp\left(-\frac{z - z_\text{neutral}}{\lambda_\text{mfp}(E_\text{inj})}\right)\right) \sqrt{\frac{E_\text{inj}}{E_\text{inj} - E_\text{th}}}n_0 \fullstop
|
||||
\end{equation}
|
||||
Adding $n_u$ and $n_s$ yields the expected density profile.\\
|
||||
Similar calculations can be done for the case of a maximum of two interactions, but for higher interaction counts this becomes increasingly more difficult. Therefore only the case for a single scattering are shown in Figure~\ref{fig:excitation_test_densities}. In this plot the \SI{12}{eV} is also shown to indicate the value of $n_0$. Furthermore, the density for the \SI{20}{eV} case has been scaled such that it fits to $n_0$ in the non-interaction region. It can be seen that the data fits the expectation very well, with the relative error being below 0.5\% everywhere, showing the correctness of the implementation.
|
||||
}
|
||||
|
||||
\begin{figure}
|
||||
\centering
|
||||
\includegraphics[width=1\textwidth]{figures/excitation_single_scattering_density.pdf}
|
||||
\caption{Electron densities for two injection energies, one below the threshold of \SI{12.754}{eV} for the interaction and one above. The densities were scaled to be of the same magnitude for $z < 0.5$.}
|
||||
\label{fig:excitation_test_densities}
|
||||
\end{figure}
|
||||
|
||||
\paragraph{Clustering}
|
||||
\changed{In the case of an ion-beam moving with a constant direction and velocity through an background gas, with which it can interact via clustering, it is possible to predict the form of the density of the ion beam
|
||||
\begin{equation}
|
||||
n_\text{ion} \propto \exp\left(-\frac{z}{\lambda_{mfp}}\right) \fullstop
|
||||
n_\text{ion} \propto \exp\left(-\frac{z}{\lambda_{\text{mfp}}}\right) \fullstop
|
||||
\end{equation}
|
||||
Since both the profile of the background gas density, the energy of the ions and the cross section of the interactions are known it is easily possible to check if the simulation corresponds to the analytical values.\\
|
||||
For this test case only the interacting particles are considered, since during the interaction the velocity direction of the products becomes essentially randomized, which makes a prediction more challenging.\\
|
||||
As described in section~\ref{ssec:interactions}, there are two types of clustering: radiative and tertiary. In case of the tertiary process only rate coefficients are known, s.t. the cross section is only approximated. This leads to
|
||||
\begin{equation}
|
||||
\label{eq:clustering_test_tertiary_mfp}
|
||||
\lambda_{mfp, \text{ter}} = \frac{v}{k_\text{ter} n_{\text{T}^2}^2}
|
||||
\lambda_{\text{mfp, ter}} = \frac{v}{k_\text{ter} n_{\text{T}^2}^2}
|
||||
\end{equation}
|
||||
for the mean free path, where $v$ is the velocity of the ion in the rest-frame of the tritium gas, $k_\text{ter}$ is the rate tertiary rate coefficient and $n_{\text{T}^2}$ is the density of the background gas.\\
|
||||
For the radiative clustering there are two types of cross sections, first for T$^+$ only the rate coefficient is known again, while for T$_2^+$ an expression for the actual cross section is known. This means that there are two different expressions for the mean free path:
|
||||
\begin{equation}
|
||||
\label{eq:clustering_test_radiative_rateCoefficient}
|
||||
\lambda_{mfp, \text{rad}} = \frac{v}{k_\text{rad} n_{\text{T}^2}}
|
||||
\lambda_{\text{mfp,rad}} = \frac{v}{k_\text{rad} n_{\text{T}^2}}
|
||||
\end{equation}
|
||||
and
|
||||
\begin{equation}
|
||||
\label{eq:clustering_test_radiative_cross}
|
||||
\lambda_{mfp, \text{rad}} = \frac{1}{\sigma n_{\text{T}^2}} \fullstop
|
||||
\lambda_{\text{mfp,rad}} = \frac{1}{\sigma n_{\text{T}^2}} \fullstop
|
||||
\end{equation}
|
||||
All three cases were simulated using the same setup. The ions were injected on the left side of the simulation domain with an energy of \SI{6.8}{\milli eV} and a direction in positive $z$-direction. The neutral gas was chosen to be uniformly distributed in the simulation domain. A number of 80000 events were chosen to be simulated. Furthermore a strong magnetic field of \SI{2.5}{\tesla} was applied. The difference between the simulations is solely the density of the neutral gas due to the different magnitudes of the MFP. Therefore a density of \SI{1e18}{\per\cubic\m} has been chosen for the reaction T$_2^+$ + T$_2$. The cross section for this reaction has a value of $\sigma = \SI{1.91e-18}{\square\m}$. For the tertiary process a density of \SI{1e22}{\per\cubic\m} was chosen. The value of the rate coefficient at \SI{80}{\kelvin} is $ k_\text{ter} = \SI{2.6e-41}{\m\tothe{6}\per\second}$. And lastly for the radiative process of T$^+$ a density of \SI{2e25}{\per\cubic\m} has been chosen with a radiative association rate coefficient of $k_\text{rad} = \SI{5e-23}{\cubic\m\per\s}$ at \SI{80}{\kelvin}.\\
|
||||
The results of the tree simulations together with the expected result are shown in Figures~\ref{fig:clustering_tp_ter}, \ref{fig:clustering_tp_rad} and \ref{fig:clustering_t2p}.\\
|
||||
@@ -830,12 +865,12 @@ The spectrum shows very clearly that all processes for the particles interact in
|
||||
|
||||
\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_comp}.
|
||||
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_comp}.
|
||||
|
||||
\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 \citep{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. }
|
||||
\caption{Particle spectra from the KARL code at different positions in the source in comparison with results obtained by \citep{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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user