Files
katrin-plasma/docs/antraege/gcs2020/GCS-Template-project-application.tex

724 lines
46 KiB
TeX

\documentclass [a4paper, 12pt]{article}
\usepackage{amssymb}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage{times}
\usepackage{float}
%\usepackage{natbib}
\usepackage[usenames,dvipsnames]{color}
\usepackage{amsmath}
\usepackage{pgf}
\usepackage{siunitx}
\usepackage{floatflt}
\usepackage{changepage}
\textwidth 16 cm
\textheight 23 cm
\setlength{\oddsidemargin}{0.1 cm}
\setlength{\topmargin}{1 cm}
\setlength{\headheight}{0cm}
\setlength{\headsep}{0cm}
\setlength{\footskip}{0.75cm}
\setlength{\parindent}{0cm}
\setlength{\oddsidemargin}{0.1 cm}
\setlength{\itemsep}{10pt}
\bibliographystyle{gcs}
\begin{document}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.45]{Figures/GCS-hlrs-fzj-lrz.jpg}\\
\end{center}
\end{figure}
\begin{center}
{\LARGE \bf Project Proposal for Tier 0/Tier 1 HPC Access} \\
\bigskip
\bigskip
\bigskip
\end{center}
\textbf{Period}\\
\phantom{MM}\textit{05/2020 -- 05/2021}
\bigskip
\textbf{Project title}\\
\phantom{MM}\textit{Particle-in-Cell Simulations for the plasma inside the Windowless
Gaseous Tritium Source of the KATRIN experiment}
\bigskip
\textbf{Type of project}\\
\phantom{MM} \textit{Large scale
}
\bigskip
\textbf{HPC system(s) and corresponding centre(s)}\\
\phantom{MM} \textit{SuperMUC-NG}
\bigskip
\textbf{Project ID or project acronym}\\
\phantom{MM} \textit{WGTSPLASMA}
\bigskip
\textbf{Principal investigator}\\
\phantom{MM} \textit{Dr. Felix Spanier\\
Address: Universit\"at Heidelberg, Institut f\"ur Theoretische Astrophysik, Albert-Ueberle-Str. 2
69120 Heidelberg\\ felix.spanier@uni-heidelberg.de}
\bigskip
\textbf{Project contributor(s)}\\
\phantom{MM} \textit{Jonas Kellerer\\ Address: Karlsruher Institut f\"ur Technologie,
Institut f\"ur Experimentelle Teilchenphysik, Campus Nord, Postfach 36 40, 76021 Karlsruhe\\jonas.kellerer@kit.edu}
%% die ü funktionieren hier nicht
\vfill
%\begin{center}
%\textbf{The length of the project description is restricted to 18 pages (font 12 pt)!}
%\end{center}
\newpage
\vfill
\tableofcontents
\vfill
\newpage
\section{Introduction}
\rule{\textwidth}{0.4pt}
%%TODO Referenz KATRIN Experiment, KATRIN First Light
The Karlsruhe TRitium Neutrino (KATRIN) experiment \cite{collaboration2001katrin}\cite{Kleesiek2019} aims to determine the effective neutrino mass with a sensitivity of $m_\nu = \SI{0.2}{eV/c^2}$ (90\% C.L.) in a direct approach using the $\beta$-decay of molecular tritium and a MAC-E filter spectrometer. The neutrino mass is extracted from a fit of modeled $\beta$-decay spectra to the measured electron spectrum. Hence, a complete investigation of the processes influencing the electron energy is necessary. The starting potential energy of the electrons is set by the electrostatic potential at the position of $\beta$-decay in the windowless gaseous tritium source (WGTS). The source can be described as a large volume filled with Tritium gas that will produce large amounts of electrons from the decay process of Tritium into Helium.
The high activity of the source ensures high statistics for the neutrino mass measurement but it also introduces a new systematic effect for the starting potential of the electrons. It has been noted already by \cite{ferenc2005} that the interaction of primary electrons from the Tritium decay and the Tritium gas produces a large number of secondary electrons. A detailed analysis showed that the density of charged particles is large enough to achieve a collective behavior -- inside the WGTS a plasma is formed.
The electric potential generated by the plasma leads to a change in the electron energy with respect to the detector. It is therefore necessary to determine this electric potential. As the plasma consists of a thermal and a nonthermal component a kinetic description of the plasma is required. Within this project a Particle-in-Cell code will be utilized to model the plasma inside the WGTS. The goal is to determine the plasma potential throughout the WGTS and especially at the rear wall of the experiment. This plasma model will then serve as an important input for the analysis of neutrino data.
%% hier wurde vorher die Rearwall noch nicht erwähnt und was sie ist. Ich überlege mir mal was.
%-------------------------------------------------------------------------------------------------%
\section{Preliminary Work}
%\rule{\textwidth}{0.4pt}
%\textit{Provide a brief summary of your preliminary work in connection with the proposed project, including references.}\\
%
%\textit{(about 1 to 2 pages)}
The physical situation of the WGTS inside the KATRIN experiment is rather intricate: Tritium gas is injected and various pumping mechanisms lead to a strongly inhomogeneous gas density \cite{Priester2015}. The tritium gas then emits primary electrons that will initiate a cascade of electrons through ionization and other atomic and molecular processes. A strong magnetic field \cite{Arenz_2018} will guide the electrons through the WGTS and different materials used in the WGTS will produce a contact potential and subsequently an electric field \cite{Schoenung2016_1000056077}. In various projects these effects have been researched before as will be described below. Additionally a fluid description of the plasma has been tried \cite{Kuckert2016_1000065077}.
%%Gasdichte
\subsection{Neutral gas flow}
Tritium gas is injected in the center of the WGTS and flows to both sides (rear wall and detector), where the gas is pumped off \cite{Grohmann2008}. The general geometry is given in Fig. \ref{fig:wgts_aufbau}. The gas density is dropping off to the ends of the WGTS. Especially behind the pump ports the density is decreasing by orders of magnitude. The collisionality of the gas flow decreases along with the gas density. As a consequence the physical description changes over the length of the WGTS.
\begin{figure}[!htb]
\centering
\begin{minipage}{.48\textwidth}
\centering
\includegraphics[width=\textwidth]{Figures/WGTS_aufbau3.png}
\caption{Sketch of the WGTS, adapted from \cite{KATRINCollaboration2005}}
\label{fig:wgts_aufbau}
\end{minipage}%
\begin{minipage}{0.02\textwidth}
\hspace{0.02\textwidth}
\end{minipage}
\begin{minipage}{0.48\textwidth}
\centering
\includegraphics[width=\textwidth]{Figures/dichte}
\caption{Tritium density along the axis of the WGTS according to \cite{KUCKERT2018195}}
\label{fig:wgts_aufbau2}
\end{minipage}
\end{figure}
\begin{figure}[!htb]
\centering
\begin{minipage}{.48\textwidth}
\centering
\includegraphics[width=0.9\textwidth]{Figures/source_velocity_T2.png}
\caption{Speed of molecular tritium T$_2$ according to \cite{KUCKERT2018195}}
\label{fig:gas_velocity}
\end{minipage}%
\begin{minipage}{0.02\textwidth}
\hspace{0.02\textwidth}
\end{minipage}
\begin{minipage}{0.48\textwidth}
To calculate the primary electron spectrum detailed flow speeds are required. Gas flow simulations have been undertaken by \cite{KUCKERT2018195} and \cite{Sharipov200973}. The main result is presented in Fig. \ref{fig:gas_velocity}, providing the drift velocity of the gas. The average thermal speed of the gas is calculated to \SI{250}{\metre\per\second} by
\begin{align*}
v = \left(\frac{2\cdot E_{\text{temp}}}{m_{T2}}\right)
\end{align*}
Further research has to be done for the flow between the pump ports and the rear wall.
\end{minipage}
\end{figure}
%%KARL code
\subsection{Atomic and molecular processes}
%%TODO JK: Referenz auf Ferenc' Monte Carlo Paper einfügen.
%% ich kenne nur dieses eine, die du auch drinnen hast "ferenc2005", ich habe mal der Rest dazu ergänzt.
The primary electrons from $\beta$-decay alone are not sufficient to maintain the plasma condition within the WGTS. The emission of secondary electrons is the source of the majority of electrons. Within the source electrons and tritium gas interact via various processes - including but not limited to ionization, recombination and elastic scattering.
Using a Monte Carlo simulation \cite{ferenc2005} the spectrum of electrons could be deduced, but only as an average over the whole source. In the course of this project a new Monte Carlo code \emph{KARL} has been developed \cite{reiling}. This new code allows for the calculation of the spectra of all particles within the source at every position and all currents related to those particles (shown for electrons in Fig. \ref{fig:karl_result}).
\begin{figure}
\begin{center}
\pgfimage[width=0.6\textwidth]{Figures/dndE_3D}
\caption{Electron energy spectra over the z-position inside the WGTS as calculated with the KARL code. From \cite{reiling}}
\label{fig:karl_result}
\end{center}
\end{figure}
A prerequisite for the calculation of particle spectra with the KARL code is the knowledge of the electric and magnetic field configuration within the source. Results so far use only the guiding magnetic field and zero electric field as zeroth order approximation. New plasma results from this project will be incorporated into the KARL simulation.
The KARL code also offers the possibility to connect simulations with observations: One observable is the current measured at the rear wall as a function of the rear wall voltage. The code is able to generate this observable.
%%Lauras Arbeit
\subsection{Previous fluid simulations}
\label{sec:laura}
\begin{floatingfigure}[l]{0.5\textwidth}
\begin{center}
\pgfimage[width=0.4\textwidth]{Figures/kuckert}
\caption{Plasma potential in the center of the WGTS. From \cite{KUCKERT2018195}}
\label{fig:kuckert}
\end{center}
\end{floatingfigure}
A recent approach to the plasma problem inside the WGTS was a fluid model assuming drift-diffusion for the electrons. In \cite{KUCKERT2018195} a numerical steady-state solution has been implemented. This model is able to calculate the plasma potential for a given voltage at the rear wall. The input parameters for this model are the fluid velocities and densities (and subsequently the density of electrons). Also the mobility of tritium ions has to be inferred.
The resulting plasma potential is shown in Fig. \ref{fig:kuckert}. The model itself gives a rough idea of the plasma potential and the plasma sheath, but with the assumption of a drift-diffusion equation the physical situation is limited to a thermal electron plasma. This is only in zeroth order correct, especially the plasma sheath is presumably incorrect. Additionally the non-thermal current at the rear wall cannot be explained self-consistently within the fluid model.
%%Arbeit an ACRONYM für die Randbedingungen
%-------------------------------------------------------------------------------------------------%
\section{Description of the Project}
%\rule{\textwidth}{0.4pt}
\subsection{Project Details}
%\textit{Describe your research project in detail, structured in sub-projects, if applicable. Include discussion of the scientific questions that you are planning to address and the overall scientific goals of the project. It is important that you describe the innovative aspects, impact and topicality of the proposal.}
%\begin{itshape}
%\begin{itemize}\setlength{\itemsep}{-2pt}
%\item Scientific questions you want to address
%\item Scientific objectives
%\item Computational objectives
%\item Approach and expected outcome
%\item Expected impact on the research area
%\item Scientific and technical innovation potential, impact and topicality
%\item Progress beyond the state-of-the-art
%\end{itemize}
%\end{itshape}
The key question of this project is the plasma potential within the WGTS of the KATRIN experiment. Within the source tritium decays releasing energetic primary electrons that may ionize the surrounding tritium gas and thus producing a plasma. The plasma itself has an electric potential with respect to the detector of the experiment. Due to this electric potential the detector measures an electron spectrum that is shifted. As the electric potential is non-homogenous the volume integrated electron spectrum is smeared out.
This effect may appear small in first place as the expected values of the electric potential are assumedly small, namely several times the thermal energy (3 meV), but the high uncertainty of the plasma potential and the extreme precision of the experiment ($\SI{0.2}{eV/c^2}$, 90\% C.L.) make better models for the plasma unavoidable. Direct measurements of the plasma potential are not possible due to the intricate design of the WGTS. Only secondary effects can be measured, but the deconvolution of the data needs the shape of the plasma potential as an input.
As pointed out above the detector is observing only a volume integrated spectrum i.e. one cannot use a map of the of the plasma potential to adjust the measured spectrum. But a more precise knowledge of the plasma potential reduces the error budget allocated to plasma effects. In case the approximated error due to plasma effects is too small unphysical negative mass squares for the neutrino will result and thus limiting the overall sensitivity of the KATRIN experiment.
The first calculations for the plasma potential using a fluid model (Sec. \ref{sec:laura}) have been carried out before the first measurement campaign \cite{Aker2019}. With the experience from that campaign the following key questions have been identified:
\begin{itemize}
\item What is the form of the plasma potential? \\This is the overarching question which has to be refined.
\item What is the effect of the voltage applied to the rear wall? Is there an optimal value for the voltage?\\ The external field applied to the plasma is assumed to have consequences on the global plasma potential. This voltage is also the best handle to alter the plasma condition known so far.
\item How can the current at the rear wall be explained?\\ When applying a voltage to the rear wall, a current can be measured. This is not unexpected since the rear wall acts as some sort of Langmuir probe. This measurement is one of the best plasma observables available, but the results are not in line with the expectations from previous models. Since the the electron distribution is nonthermal the fluid model is inherently not suited to explain this observation.
\item Do the dielectric properties of the rear wall change over time?\\ The aforementioned measurements of the current at the rear wall change over the course of days. The plasma times scales are many orders of magnitude faster. It is assumed that tritium condensates on the rear wall changing its dielectric properties. Whether this is an explanation for the change in the current and what effect this has on the plasma is one of the open questions.
\item What is the level of fluctuations and on what is their time scale?
\end{itemize}
With the ongoing measurement campaigns of the KATRIN experiment plasma modeling is an extremely timely business and so far the effect of plasma on the result is the largest unknown error. The previous fluid model is presumably not applicable to the non-thermal electron distribution and will be replaced by a kinetic model.
\newpage
The numerical model for a kinetic plasma description makes the following assumptions:
\begin{itemize}
\item The initial electron distribution can be derived from Monte Carlo simulations of atomic and molecular processes.
\item Ions are considered static, all plasma physics is carried by the fast electrons.
\item The ions are not homogeneous, their distribution and the current they carry can be calculated from the above mentioned Monte Carlo code.
\item Results from the plasma simulation will be used to provide better estimates for the Monte Carlo model. This process will be reiterated until convergence is reached.
\end{itemize}
The plasma simulations are technically more or less simple: A Particle-in-Cell code will be initialized with an electron distribution from the Monte Carlo simulations, boundary conditions and external fields are applied and the simulation is run.
\subsubsection{Plasma potential as a function of the rear wall voltage}
\begin{figure}
\begin{center}
\pgfimage[width=0.75\textwidth]{Figures/rwsetup}
\end{center}
\caption{General setup of the geometry of the WGTS near the rear wall. The rear wall and the sheath of the WGTS are made of different metals resulting in a contact potential and an induced electric field (shown in pink). Plasma i.e. the electron distribution is continuously injected (green arrows). The sketches is simplified especially with regard to the injection of the electrons.}
\label{fig:rwsetup}
\end{figure}
This subproject is the core of the simulations: The general equilibrium solution for the plasma assuming metal walls is researched. Simulations will be performed for various rear wall voltages.
The simulation setup is shown in Fig. \ref{fig:rwsetup}. In a first step the electron distribution and the ion currents will be calculated using the Monte Carlo code KARL. For this the input parameters are the neutral gas flow profiles. The electric field will be assumed to be zero in this step. With ion currents and electron distributions the Particle-in-Cell simulation can be started.
Here the sheath walls are assumed to be grounded. The rear wall is also grounded, but a voltage is applied. Together with the contact potential between the different metals of sheath and rear wall (steel and gold) an electric field arises. This is added to the field of the PiC simulation as an additional component.
The PiC simulations are assuming the inflow of tritium according to the Monte Carlo simulations. Only the motion of electrons is followed, the influence of the ions is limited to the current generated by the ions (also from the Monte Carlo simulations). Electrons are either hitting the wall and are then leaving the simulation or are exiting the simulation box where they entered.
Simulations are running until they reach equilibrium -- i.e. until a stable plasma sheath has established. The resulting electric fields are then fed back into the KARL code. This starts a new round of simulations.
The main change in the Monte Carlo simulations are the loss processes to the walls. For most electron energies the small electric fields do not alter the macroscopic behavior. Convergence is to be expected.
The current at the rear wall can be constructed for various voltages from the Monte Carlo simulations. This yields U-I-curve as it is also measured in the real experiment. Should the observations and the simulations match then the resulting plasma potential map can be handed down to the KATRIN analysis group to construct neutrino masses from that potential.
\subsubsection{Dielectric properties of the rear wall}
The situation modeled in the previous subproject is to some degree idealized: All walls of the WGTS vessel are treated as perfectly conducting metals. This is true as long as the metal surfaces are not covered with other materials. The slow change of plasma properties -- in special the current at the rear wall -- hints at a change of the properties of the rear wall. Plasma time scales are typically on the order of the plasma frequency ($\omega_\text{pe} \sim 10^8$ s$^{-1}$), the observed changes are on the scale of days.
In situ observations of the rear wall are technically not possible, so a plasma model has to be developed to check this hypothesis. The question whether the plasma is influenced by a change in the rear wall properties is of high practical value: Should contamination of the rear wall be an issue, regular cleaning of the rear wall would be required.
The way to test this is to change the boundary conditions of the walls from perfect conductor to a dielectric material. The most probable composition of the rear wall would be gold with some monolayers of tritium -- a material with somewhat unknown electric properties. It is therefore necessary to test different scenarios between pure conductor and perfect insulator for the rear wall.
The rear wall still produces a contact potential that should be unaffected by the coverage with monolayers of tritium as the contact potential arises from the connection of the rear wall with the steel vessel. For the simulation this means that still an external electric field has to be considered.
Simulations will be carried out for three different scenarios with one rear wall voltage ($U_\text{RW}=0$)
\begin{itemize}
\item Perfect insulator. The tritium layer covers the rear wall, charges may stick to the layer, but grounding does no longer work.
\item Dielectric medium. The tritium layer moderates the field between rear wall and plasma. Charges accumulate on the surface.
\item Dielectric medium with grounding. The tritium layer moderates the field between rear wall and plasma. The system is completely grounded.
\end{itemize}
High precision results are not expected from this approach, but a qualitative view of the system will show, whether the alteration of the rear wall has only local or even a global impact on the plasma.
%%TODO
\subsubsection{Time dependent rear wall voltage}
The other subprojects aim at finding an equilibrium solution. It is assumed that any change of the outer parameters -- in first place the rear wall voltage -- will lead to a new equilibrium on time scales of the plasma frequency. For any manual change of the rear wall voltage this assumption can safely be used. The question is, how high-frequency noise influences the effective potential.
Again the time scales of the outer change are too slow to be fully simulated in a kinetic plasma framework. The approach to this problem is therefore differently: For a simulation set in equilibrium taken from the first subproject the rear wall voltage is changed step like with a step size that is in the range of typical voltage fluctuations (0.1 V).
With longer running simulations (5 -- 10 $\omega_\text{pe}^{-1}$) the response of the plasma shall be tested. The question behind this is whether fluctuations like ion-sound waves or other electrostatic phenomena can be seen.
An exact analysis of the exact nature of these fluctuations is not of interest for the experiment. It is far more important to figure out, what the average fields for a fluctuating (i.e. noisy) rear wall voltage looks like. The simulations carried out here are essentially a template for fluctuations. The general idea is to fold the rear wall voltage with this response function to get an estimate for the error in the plasma potential due to the error in the voltage.
%-------------------------------------------------------------------------------------------------%
\subsection{Review Processes}
The KATRIN experiment is a large consortium which has been funded by various institutions including
the Helmholtz Association, Ministry for Education and Research BMBF (5A17PDA, 05A17PM3, 05A17PX3, 05A17VK2, and 05A17WO3), Helmholtz Alliance for Astroparticle Physics (HAP), and Deutsche Forschungsgemeinschaft DFG (Research Training Groups GRK 1694 and GRK 2149, and Graduate School GSC 1085 - KSETA). Funding has only been granted after a rigorous review of the underlying research.
%-------------------------------------------------------------------------------------------------%
\section{Numerical Methods and Algorithms}
\label{chap:numerical}
% 1-2 pages
\subsection{ACRONYM PiC Code}
\label{sec:acronym}
The behavior of (collisionless) plasmas can be modeled by the use of the Vlasov equation -- a partial differential equation, which describes the evolution of a six-dimensional phase space.
The Vlasov equation is coupled to Maxwell's equations, which describe the propagation and interaction of electromagnetic fields and currents.
An exact solution to this non-linearly coupled system of equations exists only for simple cases, but various approximations are readily at hand.
\\
One of the numerical approaches to this problem is the particle-in-cell (PiC) method \cite{hockney_1988}, which uses phase space samples -- so-called macro particles -- to represent charged particles in the plasma.
These macro particles move through electromagnetic fields, which they themselves create.
Currents derived from the motion of macro particles are introduced as a source term for Maxwell's equations, which are solved on a grid storing fields, currents and charge densities.
The PiC method allows for self-consistent simulations of plasmas with -- in principle -- arbitrary initial and boundary conditions and is especially suitable for modeling collisionless space plasmas.
\\
\\
For the proposed project the \textit{ACRONYM} PiC code \cite{kilian_2011} will be used.
\textit{ACRONYM} is an explicit, electromagnetic, fully relativistic PiC code, which has been developed by members of our working group.
It is capable of simulating kinetic, collisionless, magnetized plasmas self-consistently in three spatial dimensions.
\\
The overall design of the code is based on the concept of maintaining second order accuracy in both time and space and computing time evolution explicitly.
To probe and minimize the effect of the discrete grid on plasma wave evolution, the field solver can be tuned to achieve optimal results \cite{vay_2011}.
Different boundary conditions -- periodic, conductive walls, absorbing walls -- can be selected according to the physical problem to be modeled.
Furthermore, the field solver can be switched to electrostatic mode or Darwin approximation.
\subsubsection{Main Algorithms}
\label{sec:algorithms}
PiC codes distinguish between two basic kinds of entities: quantities on the grid (fields and currents) and (macro) particles.
In the \textit{ACRONYM} code each particle is treated as an individual object with certain properties, such as mass, charge, velocity and position.
These properties are stored in arrays of individual particle objects.
\\
Field properties are deposited on discrete grid points, using the Yee scheme \cite{yee_1966}.
This allows for a simple and fast calculation of the curl of electromagnetic fields, which is essential for computing the field evolution efficiently.
The method is second order accurate and furthermore holds the divergence of the magnetic field $\nabla \cdot \vec{B}$ close to zero (within floating point accuracy), satisfying the physical constraint $\nabla \cdot \vec{B} = 0$.
\\
Time evolution is done in four consecutive subroutines per time step.
\\
Starting with given electromagnetic fields at the discrete grid points, the fields are interpolated to the positions of the particles.
Following the overall concept of the code, a second order correct scheme with a triangular shaped cloud (TSC) form factor for particles is used \cite{hockney_1988}.
Different form factors are also available.
\\
In the next step the particles are moved.
The Lorentz force acting on each particle is calculated from the interpolated fields.
Then the particles' velocities and positions are updated, using the Boris push \cite{boris_1970}, as explained in Penn \cite{penn_2003}.
Again, the Boris push is a second order scheme which uses a leap-frogged update in time and which also yields a good preservation of total energy.
\\
From the particles' movement through the grid the currents are calculated and deposited on their respective grid points using the method of Esirkepov\cite{esirkepov_2001}.
The TSC form factor is utilized again for self-consistency.
By doing so, numerical momentum dissipation and unphysical self-forces are prevented.
\\
The last step updates the electromagnetic fields, using a second order leap-frog scheme for the computation of Maxwell's equations.
Only components of the current and the electric and magnetic fields, which are stored on the Yee lattice, are used in this step.
\subsubsection{Parallelization}
\label{sec:parallelization}
%The \textit{ACRONYM} code is parallelized using the message passing interface (MPI) exclusively without internal threading.
%No hybrid parallelization using MPI and OpenMP is being performed, as it would be of no benefit for this kind of code.
The \textit{ACRONYM} code is parallelized using the message passing interface (MPI) exclusively without internal threading and without hybrid parallelization, as it would be of no benefit for this kind of code.
On local computing clusters the OpenMPI implementation is employed, while on SuperMUC the library provided by IBM is utilized.
\\
Parallelization of the code is achieved by splitting up the simulation box and distributing equally sized parts of the total volume to single CPUs.
Each CPU computes one time step for all particles and fields in its domain.
Between time steps, MPI communication has to be carried out only among neighboring CPUs, which keeps communication on a minimal level.
The main part of the communication process is the exchange of particles which have crossed the border of their domain and enter another one.
Output is written fully in parallel, using the same HDF5 file for fields and currents throughout the whole simulation.
Particle output is done via MPI-I/O with one file per output time step.
\subsubsection{Extension to the boundary model of ACRONYM}
%%TODO JK: Hier etwas zu den Vorarbeiten schreiben
The ACRONYM code uses a three dimensional Cartesian grid to store and calculate electromagnetic fields as mentioned above. Thus in the past the boundary conditions were applied to planes parallel to the coordinate planes. In contrast the source of KATRIN has a cylindrical shape. So new boundary algorithms had to be implemented. They were adapted from the Dey-Mittra scheme \cite{Nieter2009}, which was developed for metallic perfectly conductive curved boundaries. The algorithm provides solutions which retain the second order accuracy while keeping the additional computational cost at a minimum. Additionally the particle behavior had to be adapted. So the particles, which hit the cylinder surface are now absorbed.
A major input for the calculation with ACRONYM is the electron energy density distribution of the electrons inside the WGTS. The distribution is determined numerically by the KARL code (see below) and can in general have arbitrary shape. Hence a new injection method was developed to include particles of arbitrary energy distribution.
%-----------------------------------------------------------------------------
\subsection{The KARL code}
The \textbf{KARL} - \textbf{KA}trin WGTS elect\textbf{R}on and ion spectrum Monte Car\textbf{L}o simulation code was developed specifically for this project \cite{reiling}.
The basic concept of the simulation is the repetitive physical simulation of single particles.
The KARL code simulates only one particle at a time. Hence interactions between particles can not be directly simulated but the additional implementation of density fields allows self consistent treatment of particle interactions. The density fields indicate the density for each particle species. They are updated within the physical simulation of each single particle of the respective species.
In general the code follows a standard Monte Carlo scheme: Primary particles are drawn from the electron distribution of tritium beta decay. Those particles are moving along the trajectory given by electric and magnetic fields. Their total scattering cross section and thus the mean free path is calculated and the particle is moved for that distance. After each interaction potential secondary particles will be added to a particle queue. This particle queue will be processed before new primary particles are injected.
The primary particles are drawn from the Fermi distribution of tritium decay electrons. As secondary particles electrons e$^-$, tritium ions T$^{+}$ and clusters of tritium ions T$^{2+}$, T$^{3+}$, and T$^{5+}$ are considered.
Higher order of tritium ion clusters are not implemented as their properties resemble T$^{5+}$. Further particle species can be easily added in further version of KARL if found necessary.
The following processes are integrated in KARL: Elastic scattering of electrons and T$_{2}$ molecules, electron impact ionization of T$_{2}$, electronic excitation of T$_2$ by electrons, rotational and vibrational excitation of T$_2$ by electrons, recombination of electrons with tritium ions, interactions of tritium ions, elastic scattering of T$_2$, ion cluster formation.
For all processes the total cross section (for the probability) and the differential cross section (to calculate the distribution of final particles) are used inside the code.
When particles are followed through the simulation volume (or are created/annihilated) a density field is updated accordingly. This density field is a representation of the 6d phase space density of the particles. The density field is used to model the interaction of particles with each other via proxy. For KATRIN it is especially important to model recombination correctly: The tritium ions are created only through the ionization of tritium. Secondary electrons from that process will eventually recombine with the ions.
Input parameters for the code are the tritium density and electric and magnetic fields. The output consists of particle distributions at various positions in the simulation volume (using a logging barrier method) and the current carried by ions. These can be used in turn as input for the PiC simulation.
The entire KARL code is implemented in C\texttt{++11}. Vector operations and random number generator -- using the Mersenne-Twister 19937 algorithm -- are handled using the Blitz\texttt{++} library. Output is written in HDF5 format using the Table API of the corresponding library. This allows for efficient memory usage and optimized writing speed. Additionally the KARL code buffers output internally to optimize IO-speed. The parallelization strategy of KARL uses a distributed memory system. This is realized using Open MPI, allowing for communication between cores.
\section{Computer Resources}
%\rule{\textwidth}{0.4pt}
%\subsection{Code performance and workflow}
%\textit{Describe \textbf{all} codes, packages or libraries that you need to undertake the project, and how these will enable the research to be achieved. Include for \textbf{\underline{each} code to be used} information about}
%\begin{itshape}
%\begin{itemize}\setlength{\itemsep}{-2pt}
%\item Which code will be used
%\item On which hardware the code will be used (CPUs, GPUs, MICs, etc. or combinations, if applicable)
%\item How the code is parallelized (pure MPI, mixed MPI/OpenMP, Pthreads, CUDA, etc.)
%\item The amount of memory necessary (per core, per node and in total)
%\item Scaling plots \textbf{and} tables with speedup results for runs with typical, parameter sets, problem size, and I/O \textbf{of the planned project} (no general benchmark results are accepted). Scaling data should start with the lowest number of cores possible
%\item Describe architecture, machine/system name, and problem size used for the scaling plots
%\item Current job profile (independent jobs, chained jobs, workflow, etc.)
%\item Describe memory requirements, requirements concerning the High Performance network and I/O requirements
%
%\end{itemize}
%\end{itshape}
%
%{\it \textbf{Important:} please consider the corresponding technical guidelines and requirements (e.g. required minimal code scalability, memory restrictions, etc.) of the chosen machine(s)!}\\
%
%
\subsection{Code performance and workflow}
\label{sec:necessity}
This project uses the Monte Carlo code KARL and the Particle-in-Cell code ACRONYM (as described in the previous section, including the parallelization strategy). Both codes are solely using CPUs. Their memory usage per core is less than 2 GB.
\subsubsection{Packages, Libraries and Compiler}
\label{sec:packs_libs}
The \textit{ACRONYM} code employs the blitz++, fftw2 and HDF5 libraries.
For field output HDF5 is used, for particle output either HDF5 or raw MPI-I/O can be selected.
\\
The code compiles on the Intel Compiler, GCC, clang/LLVM and the compiler used on Cray systems.
For production runs -- also on SuperMUC -- the Intel Compiler \mbox{(10.1 - 14.0)} or GCC \mbox{(4.4 - 4.9)} are used.
The \textit{KARL} code uses the same set of libraries, but requires a C++-11 compliant compiler. KARL has been tested with GCC 7 and newer.
%The extreme scale difference between the microphysical lengths of the plasma and the outer scales of AGN jets, makes full simulations of this system using any kind of kinetic plasma simulation impossible. We have boiled down the physical parameters such, that we can still identify relevant physical processes, while the simulation is still computationally feasible.\\
%Unfortunately a close inspection of the parameters yield a minimum of $10^7$ CPU-hours for a single simulation. In order to achieve a shorter runtime, one would have to assume magnetic fields beyond the observed values, unrealistic temperatures or would have to neglect relativistic electrons. All of these choices lead to physical parameters that are no longer comparable to observations.
\subsubsection{Scaling}
\label{sec:scaling}
\begin{figure}[h!]
\centering
\includegraphics[width=0.65\linewidth]{Figures/extreme_scaling_workshop}
\caption{Weak scaling of the \textit{ACRONYM} code on SuperMUC. With output deselected, the code scales almost linearly up to 131072 cores. A performance increase by a factor of two can be achieved when using GCC instead of the Intel Compiler. Output becomes a bottleneck above 4096 CPUs, but, however, actual production runs show that typical simulations are not as heavy on output as the scaling runs.}
%\caption{Weak scaling of the \textit{ACRONYM} code on various supercomputers. See text for description.}
\label{fig:scaling}
\end{figure}
The \textit{ACRONYM} code has been continuously tested and used on the SuperMUC system during the past few years.
Starting with a test account (\textit{pr45sa}, ``Testing ACRONYM on SuperMIG'') and continuing with a small-scale project (\textit{pr85li}, ``Resonant wave-particle-interaction in kinetic plasma simulations'' see \cite{schreiner_2014_b}) the performance of the code has been monitored and improved.
In its current state, the code scales almost linearly with the number of processes (which is equivalent to the number of cores), as can be seen in figure \ref{fig:scaling}.
For weak scaling we use a standard setup, consisting of domains with \mbox{$48 \times 48 \times 32$} cells per CPU with ten particles per cell.
Scaling simulations run for 100 time steps and can be performed either without or with output (full field and particle output at the beginning and the end of the run).
\\
Recent tests show that \textit{ACRONYM} scales almost linearly up to 131072 cores when output is deselected.
A performance increase by a factor of two can be achieved if GCC is used instead of the Intel Compiler (see fig. \ref{fig:scaling}).
The only true bottleneck is the performance with parallel output, which starts to slow down the code when more than 32768 CPUs are employed.
However, actual production runs are usually not as heavy on output as the scaling runs, as is depicted by a sample of typical simulations with different problem sizes.
Further bottlenecks are not present \cite{kempf_2014}.
\subsection{Justification of resources requested}
Kinetic simulations require the resolution of the Debye length in space and the plasma frequency in time. These requirements make the simulation of real physical systems computationally expensive. For the WGTS system the relevant physical parameters are given in Table \ref{tab:param}.
\begin{table}[htb]
\begin{tabular}{lll}
System length & $L$ & 10 m\\
System radius & $R$ & 0.1 m\\
Plasma frequency & $\omega_\text{pe}$ & $6\times 10^7$ Hz\\
Spatial resolution & $dx$ & 0.0267 cm\\
Temporal resolution & $dt$ & $5.2\times 10^{-13}$ s\\
System size & $nx \times ny \times nz$ & $336\times 336 \times 37415$\\
Particles per cell & $ppc$ & 20\\
Number of time steps & $N_T$ & $4\times 10^4$\\
Total number of particle updated & $N_\text{pups}^\text{total} $ & $3\times 10^{15}$
\end{tabular}
\caption{Physical and numerical parameters for a standard WGTS simulation setup}
\label{tab:param}
\end{table}
These parameters combined with the scaling graphs hint at a run time for one simulation until the system is more or less in equilibrium of approx $10^6$ CPU-h using 32000 cores. It should be noted that the performance of the code is not yet tested on SuperMUC-NG -- a test account was not yet granted at time of writing -- but a comparison with other current systems show a code performance of more than $10^6$ particle updates per core and second, which would cut the required resources.
All PiC runs will have identical system sizes and identical physical times - except for the time evolution runs. In this case "Problem size" refers to multiples of the physical time of the basic simulation. Output is required only for checkpointing and for the final result.
PiC simulations are reiterated with Monte Carlo simulations. Monte Carlo simulations are relatively cheap with typically less than $10^4$ CPU-h per run.
Except for debugging purposes detailed analysis does not have be run on the data. Further analysis steps for the neutrino mass are run on static data of the electric field extracted at the end of the simulation.
\begin{table}[htb]
\caption{\label{tab_CPU_resources}The following CPU resources are requested}
\begin{center}
\setlength{\tabcolsep}{4pt}
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{llcccccc} \hline\hline
Sub-project &
Type &
Problem &
\# runs &
\# steps/ &
Wall time/ &
\# cores/ &
Total \\
&
of run &
size &
&
run &
step [hours] &
run &
[core-h] \\
\hline\hline
RW voltage &
PiC &
1 &
30 &
1 &
12 &
$1.1\times 10^5$ &
$3.96\times 10^7$ \\
~ &
Monte Carlo &
1 &
30 &
1 &
12 &
1024 &
$3.7\times 10^5$ \\\hline
Dielectric &
PiC &
1 &
9 &
1 &
12 &
$1.1\times 10^5$ &
$1.18\times 10^7$ \\
~ &
Monte Carlo &
1 &
9 &
1 &
12 &
1024 &
$1.1\times 10^5$ \\\hline
Temporal &
PiC &
5 &
3 &
1 &
12 &
$1.1\times 10^5$ &
$1.48\times 10^7$ \\
~ &
Monte Carlo &
5 &
3 &
1 &
12 &
1024 &
$1.2\times 10^5$ \\
\hline\hline
TOTAL & & & & & & & $6.68\times 10^7$\\
\end{tabular}
\end{center}
\end{table}
\section{Resource Management and Work Schedule}
%\rule{\textwidth}{0.4pt}
\subsection{Resource management}
Managing the resources is rather straight forward in this project: The different subprojects are very much alike and follow all the same pattern. Since each simulation run consists of a series of Monte Carlo and PiC iterations - each with a fixed simulation size and runtime - the cost of the simulation is rather well pre-defined. After comparing the actual runtime with the allocated runtime further simulations within the parameter space can be added or removed from the queue.
As simulations are only performed by one user allocating resources within the project is also not a problem.
\subsection{Work schedule}
\subsubsection{Rear wall voltage}
The components necessary for the simulation (boundary conditions, initial electron spectrum, ion currents) are ready and ACRONYM has been tested on the old SuperMUC system before. The first set of simulations can therefore be started right away. For $U_\text{rw}=0$ a PiC simulation will be run. The resulting electric potential will be fed into a MC simulation to produce an updated guess on the electron distribution. First tests suggest that after two iterations there will be no further change in the electron distribution.
After finishing the $U_\text{rw}=0$ simulations the voltage is changed by 0.1 V in either direction. MC simulations for the previous voltage are used as a first guess. From a series of simulations with different voltages plasma potential maps are constructed from the PiC simulations and I-U-curves for the rear wall from the MC simulations.
\subsubsection{Dielectric properties}
The boundary conditions implemented right now are purely metallic. Changing this to dielectric/insulator properties has to be done, which is a minor technical problem compared to implementing the geometry of the source. The different runs for the different scenarios (insulator, dielectric) are run in a similar fashion as the rear wall voltage runs: Iteration with PiC and MC simulations are performed. The initial electron distributions may be used from the other subproject.
\subsubsection{Temporal evolution}
The simulations for the temporal evolution also start from rear wall voltage runs. Their main difference is that the runtime is much longer. This will of course lead to simulations exceeding the wallclock limit, but the frequency of output to disk is still minuscule.
\begin{figure}[H]
\begin{flushleft}
\includegraphics[scale=0.75]{Figures/gantt_chart.pdf}
\end{flushleft}
\caption{\label{fig_workschedule}Work schedule for the project.}
\end{figure}
\section{Key Personnel and Experiences}
%\rule{\textwidth}{0.4pt}\\
\textsc{Dr. Felix Spanier} (felix [at] fspanier.de)
\begin{adjustwidth}{10pt}{}
F. Spanier was the leader of the working group in W\"urzburg, where the \textit{ACRONYM} code has been developed initially.
His expertise lies both in theoretical plasma astrophysics and the realization of kinetic plasma simulations.
He is by now working at the Centre for Astrophysics in Heidelberg.
\end{adjustwidth}
\vspace{0.1cm}
\textsc{Jonas Kellerer} (jonas.kellerer [at] kit.edu)
\begin{adjustwidth}{10pt}{}
J. Kellerer has been working for the KATRIN collaboration since his Master's thesis. He is part of the plasma working group at KATRIN and is the main contributor to plasma theory for the experiment. This project is part of his PhD thesis on plasma modeling for the KATRIN experiment. He will carry out the simulations.
\end{adjustwidth}
\vspace{0.1cm}
\textsc{Dr. Patrick Kilian} (pkilian [at] lanl.gov)
\begin{adjustwidth}{10pt}{}
Patrick Kilian is head developer of the ACRONYM code and has more than a decade of experience in modeling kinetic plasmas. He will help in optimizing the code for supercomputer use and adding new features.
\end{adjustwidth}
%-----------------------------------------------------------------------------
\newpage
%-------------------------------- Literatur ----------------------------------
\addcontentsline{toc}{section}{\protect\textbf{Bibliography}}
%\bibliographystyle{natdin}
\bibliography{bib}
\bigskip
\begin{flushright}
{\tiny V1.6-2018DEC19}
\end{flushright}
\end{document}