Files
proposals/hlrs_vlad_test_2023/KATRIN-WGTS-project-extension.tex
T
2024-11-29 11:47:33 +01:00

771 lines
42 KiB
TeX

\documentclass [a4paper, 11pt]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage{times}
\usepackage{float}
\usepackage[usenames,dvipsnames]{color}
\usepackage{scrlayer-scrpage}
\pagestyle{scrheadings}
\clearpairofpagestyles
\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}
\cfoot{\pagemark}
\ofoot{\tiny V1.9-2024JUL01}
\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{11/2024 - 3/2025}
\bigskip
\textbf{Project title}\\
\phantom{MM}\textit{Simulations of the KATRIN WGTS}
\bigskip
\textbf{Type of project}\\
\phantom{MM} \textit{project extension}
\bigskip
\textbf{HPC system(s) and corresponding centre(s)}\\
\phantom{MM} \textit{HAWK, HLRS}
\bigskip
\textbf{Project ID or project acronym}\\
\phantom{MM} \textit{WGTSPseudo2d}
\bigskip
\textbf{Principal investigator}\\
\phantom{MM} \textit{Dr. Felix Spanier\\\phantom{MMM} Institut für Theoretische Astrophysik, Universität Heidelberg\\\phantom{MMM} Albert-Ueberle-Str. 2, 69120 Heidelberg, Germany\\\phantom{MMM} felix.spanier@uni-heidelberg.de}
\bigskip
\textbf{Project contributor(s)}\\
\phantom{MM} \textit{Anna Josephine Schulze\\\phantom{MMM} Institut für Theoretische Astrophysik, Universität Heidelberg\\\phantom{MMM} Albert-Ueberle-Str. 2, 69120 Heidelberg, Germany\\\phantom{MMM} anna.schulze@stud.uni-heidelberg.de}\\
\phantom{MM} \textit{Christian Matthias Sendlinger\\\phantom{MMM} Institut für Theoretische Astrophysik, Universität Heidelberg\\\phantom{MMM} Albert-Ueberle-Str. 2, 69120 Heidelberg, Germany\\\phantom{MMM} christian.sendlinger@stud.uni-heidelberg.de}
\vfill
\begin{center}
\textbf{The length of the project description is restricted to 18 pages (font 11 pt)!}
\end{center}
\newpage
\vfill
\tableofcontents
\vfill
\newpage
\section{Introduction}
\rule{\textwidth}{0.4pt}
%\textit{Give a short outline of the scientific background of your research, including references.}\\
%\textit{(about 0.5 to 1 page)}
Neutrinos are particles of major scientific interest in different fields of modern physics.
For example, they provide unique ways to do research beyond the standard model of particle physics,
to study structure formation in cosmology and they are sought-after messenger particles in astrophysics.
So far, neutrinos are described by the standard model of particles by being charge neutral, massless
fermions, which are created by the weak interaction in one of the three different leptonic eigenstates
$\nu_e$, $\nu_\mu$ and $\nu_\tau$.
The discovery of neutrino oscillations, i.e. the change of leptonic neutrino flavor during propagation,
by the Sudbury Neutrino Observatory \cite{PhysRevC.88.025501} and Super-Kamiokande \cite{NAKAHATA2000125}
indicates that the standard model description of zero-mass neutrinos is incorrect.
However, the question about the absolute mass scale is still undetermined and actively researched.
One way to infer the mass of neutrinos is by measuring the electron energy spectrum of beta decays.
The decay spectrum can be described by the well-tested Fermi theory of beta decay \cite{Fermi_1934},
which depends on the neutrino mass, especially at its high-energy cutoff.
To successfully measure the neutrino mass, a high enough event rate in the endpoint region
as well as a high energy resolution is needed.
This makes Tritium an ideal candidate for this kind of experiments,
because it has a short half-life of 12.3 years and a low endpoint energy,
as well as the beta decay being super-allowed.
The KArlsruhe TRItium Neutrino (KATRIN) experiment uses exactly this principle
to measure the mass of electron antineutrinos.
In their latest publication, the KATRIN collaboration has shown that the electron antineutrino mass
is below 0.45\,eV \cite{2024arXiv240613516A}.
Yet, the aim of the experiment is to measure the mass with a sensitivity down to 0.2 eV.
To achieve this goal it is necessary to precisely examine the systematic effects of the experiment.
One of these effects is caused by a plasma inside the high luminous tritium source (WGTS).
It is generated by the beta decay of the tritium particles and subsequent ionization
due to collisions with high-energy electrons.
The plasma itself then creates a potential throughout the source,
which can influence the shape of the measured electron spectrum.
The effects can be constrained by calibration, e.g. from $^{83m}$Kr line measurements.
However, these experiments cannot be performed during the neutrino mass measurements
and so the plasma potential can only be extrapolated between two line measurements.
It would therefore be beneficial to gain knowledge about it from other measurable parameters,
which can be monitored permanently.
Using a Monte-Carlo simulation tool named KARL, the electron spectrum was evaluated and
insight into the general conditions within the tritium source was gained.
This tool covers the interactions of electrons and ions with the neutral gas
by a given neutral gas flow and static electromagnetic fields.
From the results of KARL it is clear that the plasma behaves mostly collision-less
except for the region of the highest neutral gas density, where it is partly-collisional \cite{Kellerer2022}.
Therefore, the plasma can be simulated using the particle-in-cell method.
This has been done in a pseudo-2D version of the ACRONYM code,
which operates within the r-z plane and uses an azimuthal decomposition of the electromagnetic fields.
The goal of this project is to model the conditions of the plasma in the source in its whole using this
pseudo-2D method.
Another approach to the problem is a Vlasov solver, which has various advantages over the previous methods.
For example, the data produced by particle-in-cell methods is always associated with some amount of noise
from stochastic sampling, which gets worse when the particle density is low.
This is not the case for Vlasov codes since it deals with a distribution function,
giving the probability of a particle being at a specific place and having a specific velocity.
It is also possible to include atomic and molecular interactions directly into the plasma simulation
by extending it to solve the Boltzmann equation instead.
The drawback here is that the distribution function can get very large easily and use a lot of memory,
which is why Vlasov solver are usually only one dimensional.
This also applies for the solver that was developed here,
but it can also be extended to a pseudo-2D version without requiring too much memory.
\newpage
\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 potential created by the source plasma has been investigated in the PhD-thesis of \cite{Kellerer2022}.
Results from the Monte Carlo code KARL, like energy spectrum of the electrons and their density
have been used as a starting point for 3D kinetic particle in cell simulations.
These used a modified version of the ACRONYM code that incorporates an approximation for the cylindrical boundary.
The analysis of the structure of the electric field has shown no
special azimuthal structure,
which inspired the development of the pseudo-2D approach for the simulations.
Furthermore, the usage of the full 3D simulations required an approximation
of the cylindrical boundary, which also introduces small errors.
These errors are not present in the pseudo-2D version.
A simulation cycle was performed, using the results for the particles from KARL
as starting parameters for ACRONYM to calculate plasma processes.
After that, the electric field gained from this is put back into KARL,
starting the cycle again.
It was hypothesized that this way, the simulations would converge to an equilibrium.
Because of the fast absorption of electrons by the metal wall,
a high electric field developed fast and prevented this hypothesized convergence
to an equilibrium.
\begin{figure}[H]
\label{fig_karl}
\includegraphics{Figures/comparison_density_potential.pdf}
\caption{Different particle densities calculated by KARL for different rear wall potentials. Data and plot from \cite{Kellerer2022}}
\end{figure}
Some of the particle species present in the simulation,
namely secondary and beta electrons,
only had a small part of the total particle number.
This results in a large noise level of the PiC simulation results.
Additionally, the kinematics of the ions were only included as a background current,
since the size of the problem only allowed small times to be simulated.
The above mentioned problems showed the need of a Vlasov solver that combines
the calculation of atomic and molecular processes with plasma processes.
Especially the direct calculation of an electric field is handy
and can be used to compare the results from the two approaches to the problem later.
\newpage
\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 ultimate goal of this project is to simulate the plasma inside the whole WGTS of the KATRIN experiment
with simultaneous injection of beta and secondary electrons.
In detail, we are interested in the time evolution of that plasma on different time scales and its stability.
Also, we want to analyze the role of different atomic and molecular processes like ionization, recombination
and collisions.
In the end, the electric potential generated by that plasma can be calculated so that
its effect on the electron energy distribution measured in the experiment can be investigated.
The behavior of a collisionless plasmas can be modeled by the use of the Vlasov equation
-- a hyperbolic partial differential equation,
which describes the evolution of a six-dimensional phase space density.
Because the background magnetic field is constant and only keeping the particles on their trajectory
straight through the KATRIN WGTS, all setups are essentially electrostatic.
Therefore, the Vlasov equation simplifies to:
\begin{equation}
\label{eq:Vlasov0}
\frac{\partial f_i}{\partial t} + \vec{v} \cdot \frac{\partial f_i}{\partial \vec z} + \frac{q}{m}\vec{E}\cdot\frac{\partial f_i}{\partial \vec v} = 0 \\
\end{equation}
A phase space density $f_i(\vec{x}, \vec{v}, t)$ gives the probability of
a particle $i$ to be at place [$\vec{x}, \vec{x} + d\vec{x}$] and
moving with velocity [$\vec{v}, \vec{v} + d\vec{v}$] at time $t$.
The above equation (\ref{eq:Vlasov0}) is used to calculate
how an arbitrary phase space density develops over time.
Without the third term it would be a simple advection equation.
The third term accounts for the acceleration acting on the particles.
It is caused by the self-consistent electric field created
in the point $\vec{x}$ by all plasma particles.
At the left border of the WGTS is a metal wall,
which absorbs all charged particles hitting it.
The right side of the WGTS is open, leading to the next part of the experiment.
Particles leaving the simulation on this side are assumed not to come back
and just disappear from the simulation after reaching a specific point.
The neutral tritium is injected at the middle of the z-axis
and moves towards both sides of the WGTS.
Since the tritium is pumped out at the sides, a flow equilibrium is adapted
and it appears as if the tritium phase space density does not change at all.
By adding atomic and molecular processes as a collision-term to
the right side of the Vlasov equation, it expands to a Boltzmann equation:
\begin{equation}
\label{eq:Vlasov}
\frac{\partial f_i}{\partial t} + \vec{v} \cdot \frac{\partial f_i}{\partial \vec z} + \frac{q}{m}\vec{E}\cdot\frac{\partial f_i}{\partial \vec v} = \left( \frac{\partial f_i}{\partial t} \right)_\text{coll} + \left( \frac{\partial f_i}{\partial t} \right)_\text{beta} \\
\end{equation}
In fact, the collision-term contains inelastic atomic and molecular collision processes and
the beta-term the injection of charged particles through tritium beta decay.
Currently, three processes have been analyzed and added to the Vlad code.
Beta decay is a necessary process to add charged particles to the simulation.
In the beginning there are only neutral tritium molecules T$_2$,
but they soon decay to Helium-3 ions, beta electrons and anti electron neutrinos.
The energy spectrum of beta electrons can be derived from Fermi's Golden Rule
\cite{Fermi_1934} as in \cite{Otten_2008}, which leads to an energy dependent decay rate
with the famous endpoint energy of 18.6\,keV.
If multiplied by the tritium density, it gives the change in phase space density of beta electrons
$\left( \frac{\partial f_e}{\partial t} \right)_\text{beta}$.
Because the ions are much heavier than electrons, their change in velocity
from beta decay is neglected here.
Adding this effect to the ion phase space function would add minimal value
compared to the computation cost.
Therefore, the ions are assumed to have the same phase space distribution
as the injected tritium molecules multiplied by the tritium decay rate.
Because of the high energy of beta electrons, a second effect sets in.
If a beta electron collides with a molecule from the abundant tritium gas,
it can be able to ionize it, ejecting a secondary electron in the process.
This is called electron impact ionization and also leads to the production of
charged particles.
However, it depends on already existing high-energy electrons from beta decay.
With the model developed by Kim and Rudd \cite{kim1994binary},
the single differential cross-section $\frac{d\sigma}{dE}$ of
electrons can be calculated for this process.
In order to calculate the change in the electrons phase space density per time,
an integration of the tritium phase space density and $f_e$,
weighted with the single differential cross-section has to be done over the tritium velocities
and the electron velocities.
The calculation of this double integral over the velocities is the most expensive part
in terms of computation time for highly resolved velocity distributions.
It is again assumed, that the ions' velocity distribution does not change
compared to the tritium velocity distribution.
This time it can be justified because the non-dissociative ionization channel is far
more likely and the recoil energy transferred to the ion in this process is negligibly small.
The change in ion phase space density per second is thus calculated by
multiplying the tritium velocity distribution with the total rate of the reaction.
The reaction rate is obtained by integrating the single differential cross section
to be consistent in the production of ions and electrons.
Both processes discussed above produce the same number of electrons and ions,
so that the quasi neutrality is fulfilled, which is an important property of a plasma.
Although the beta decay produces mainly $\mathrm{^3_2HeT}^+$ ions and the ionization
produces T$_2^+$ ions, they can still be treated as the same particle type $i$
in the Boltzmann equation because of their similar mass and identical charge.
The third process that has been investigated is the radiative recombination of
an electron and an ion to a neutral particle.
In contrast to the processes discussed before,
this one removes charged particles from the simulation.
The calculation of phase space density change happens equivalent to
the ionization process.
The difference is only a minus sign because the density decreases by this process.
Also, the cross section is different and much smaller than the ionization cross section.
Because of this, recombination has only a small influence on the outcome of most simulations.
For the needed computation time, it makes a big difference
and therefore recombination is rarely switched on in the simulations.
To complete the picture, the Boltzmann (\ref{eq:Vlasov}) or Vlasov (\ref{eq:Vlasov0}) equation
is also coupled to Maxwell's equations.
They describe the propagation and interaction of electromagnetic fields and currents.
The problem breaks down to the following system of equations:
\begin{eqnarray}
\label{eq:Poisson}
\nabla \cdot \vec E &=& 4\pi \rho = - \nabla^2 \phi\\
\label{eq:rho}
\rho &=& \sum_i q_i \int f_i d v
\end{eqnarray}
The total charge density $\rho$ is calculated by the sum
of the charge densities of each particle type $i$.
By solving the Poisson equation (\ref{eq:Poisson}) with this charge density as an input,
it is possible to calculate the self-consistent electric field $\vec{E}$
and the potential $\phi$ of the plasma.
The physical boundaries of the WGTS lead to a Dirichlet boundary condition at the
metal wall on the left side and a Neumann boundary condition at the open end on the right side.
Since the metal wall is usually grounded, $\phi_{left} = 0$ is imposed most of the time.
However, it is also possible to set the potential of the wall to different values,
some of which might improve the plasma stability or lessen the overall plasma potential inside the WGTS.
An exact solution to this non-linearly coupled system of equations exists only for
simple cases, but various approximations for the time evolution of a phase space density $f$ are readily at hand.
Previous combinations of Monte Carlo simulations and Particle-in-Cell simulations
have shown that the generation of electric fields may not be easily split into atomic and plasma processes.
However, the Vlasov solver Vlad does not rely on that separation.
This provides the opportunity to cross-check the evolution of electric fields
in a self-consistent way that includes plasma and atomic processes.
The experiment is symmetric around the z-axis and therefore effectively 2D.
However, because the numerical cost of a 2D Boltzmann solver is not reasonable,
it was decided that a 1D problem is sufficient as a reference.
This decision is justified because although a radial dependence of the plasma potential exists,
it is not as relevant as the z-dependence.
While the Vlad code performs well on average ($\approx 10^6$ phase space cell updates per node-second)
the total cost even for 1D simulations is rather high:
For a KATRIN setup the resolution in $z$-direction has to be around $\Delta z\approx 0.6$ mm.
The number of cells in $v_z$ direction has to be at least $10000$ in order to resolve the thermal plasma and the beta electrons. Typical equilibrium timescales require more than $5\times 10^6$ time steps.
The plan is now to do simulations with focus on different parameters of interest, leading to three
sub-projects.
\subsubsection{Sub-project 1: Simulation time}
There are different time scales on which the plasma evolves.
Initially there are only neutral tritium particles inside the WGTS,
which are injected in the middle.
Over time, they decay and the beta electrons ionize other particles so that a plasma develops.
Since the particles are injected in the middle of the WGTS, which is 16\,m long,
it takes a while until the first particles reach the sides of the tube.
Since electrons reach the metal wall on one of the sides
faster than the heavier ions, more of them get absorbed by it.
Therefore it is expected that the metal wall is crucial
for the development of the plasma potential inside the WGTS.
\subsubsection{Sub-project 2: Velocity resolution}
The maximum particle velocity in the simulation has to be at least
as high as the maximum velocity of beta electrons.
For tritium beta decay the maximum electron energy is 18.6\,keV,
leading to a maximum electron velocity of $8\times 10^9$\,cm/s.
That velocity is rather high and the computation cost for
atomic and molecular processes increases fast with the number of velocity cells.
Therefore, it is favourable to keep the number of velocity cells as small as possible.
This sub-project aims to detect if there are features in the plasmas phase space density
that may be suppressed by a too low velocity resolution.
To keep the needed number of velocity grid cells low and still resolve important features,
it is planned to use a velocity-dependent cell size in the future.
\subsubsection{Sub-project 3: Rear wall potential}
The right side of the experiment is characterized by a metal surface, called the rear wall.
Because electrons move faster than ions and get absorbed by the rear wall,
a plasma potential builds up inside the WGTS.
This is what usually happens when the rear wall is grounded.
However, the rear wall potential can also be set to different values.
The influence of this rear wall potential on the behavior of the plasma as a whole is not known.
Thus it is necessary to investigate its effects on the particle behavior close to the rear wall.
Because of collective plasma behavior and over some time, measurable quantities are influenced
even up until the other end of the source tube.
If set to a fitting value, the rear wall potential can improve the conditions in the source
such that the influence of the plasma is as small as possible.
Therefore it is of great interest to find that value and
investigate the impact of the rear wall potential in general.
%\subsubsection{Sub-project 2}
%\textit{...}\\
%\textit{(1 to 2 pages per sub-project)}
%\subsection{Review Processes}
%\textit{Has the underlying research project already successfully undergone a scientific review process? Is the project funded by public money? If yes, please also provide information about the funding source (e.g. State, BMWi, BMBF, DFG, EU, $\dots$) and the funding time frame. If possible, please provide the corresponding review report and upload it as supplemental material.}
\newpage
\section{Numerical Methods and Algorithms}
\rule{\textwidth}{0.4pt}
%\textit{Describe the numerical methods and algorithms that you are planning to use, improve, or develop.}\\
%\textit{(1 to 2 pages)}
While the previously used ACRONYM code utilized the particle-in-cell (PiC) method
to solve the plasma equations numerically,
the Vlad code integrates the Vlasov equation using the Upwind scheme at its core.
This means treating equation \ref{eq:Vlasov} as if its right side was zero
and therefore ignoring collisions and beta decay at first.
With the Upwind scheme, the Vlasov equation is then discretized using only points on the upwind side
to calculate the derivatives.
It was first proposed by Godunov in 1959 \cite{godunov:hal-01620642} and
makes use of the following the trajectory of phase-space elements.
What the upwind side is can best be explained by looking at equation \ref{eq:Vlasov} without the third term:
Now the equation would describe a wave propagating along the z-axis with velocity $v_z$.
If $v_z$ is positive, the traveling wave solution propagates to the right side,
which is called downwind side in this case. The left side is called upwind side then.
If $v_z$ is negative, the wave travels to the left side and the right side is the upwind side.
This means, that the algorithm differentiates between positive and negative $v_z$ in the discretization.
The same principle can also be applied to the third term in equation \ref{eq:Vlasov},
so that its discretization depends on whether $\frac{q}{m}E_z$ is positive or not.
This scheme is stable if the Courant-Friedrichs-Lewy condition (CFL) is satisfied.
Here, that means the numerical cell size in z-direction $\Delta z$ an in v-direction $\Delta v$
decide how big one simulation step in time $\Delta t$ can be:
\begin{equation}
\label{eq:CFL}
\left| v_z \frac{\Delta t}{ \Delta z} \right| \le 1 \quad \textrm{and} \quad \left|\frac{q}{m} E_z \frac{ \Delta t}{ \Delta v} \right| \le 1
\end{equation}
The accuracy of this scheme is only first order and is vulnerable to false diffusion.
However, false diffusion decreases with decreasing grid size.
Since the grid size is usually very small to resolve the plasmas Debye length
and we do not expect the formation of shocks, false diffusion is not expected to be an issue.
After the change of phase space density during a discrete time step is calculated for all particle species,
the new self-consistent electric field is calculated.
To do this, the particle density $\rho$ is needed.
It can be obtained from the phase space density $f_i$ by integration over the velocity
and then adding that result for all particle types $i$, see equation \ref{eq:rho}.
Next, the numerical integration of the Poisson equation (\ref{eq:Poisson}) can be done.
Because it is numerically easier, the electric potential $\phi$ is calculated first.
Therefore the second derivative is discretized with the central difference scheme.
The resulting matrix equation is solved iteratively using a Krylov subspace method with a multigrid preconditioner.
This ensures that long- as well as short-wavelength modes of the electric potential are taken care of.
In general, the computational cost for this is of order $N^2$ per iteration,
with $N$ being the number of grid cells in z-direction.
Here, it should decrease to the order of $N$ per iteration though,
because the central difference matrix in 1d is very sparse.
The number of iterations needed to solve the Poisson equation this way is $N$ at its maximum,
but usually much smaller.
Especially after the first time step, when the solution from before is used
as a guess for the current solution, it usually takes less than 10 iterations.
After solving the Poisson equation for $\phi$,
it only needs to be numerically differentiated by z to get $E_z$.
This is done using central differences for second order accuracy.
As the last step in one simulation cycle, the atomic and molecular processes are added.
This happens by calculating the change in phase space density $\Delta f_i$
within the time step $\Delta t$ and then adding it to the phase space density $f_i$.
The complex part in this step is to calculate $\Delta f_i$.
It generally depends on the respective process' reaction rate and
calculates the differential cross section for each velocity combination
of the two particles involved in the process.
While this is a very straight-forward and precise way to get $\Delta f_i$,
its computation time grows quadratically with an increase in velocity resolution.
This simulation cycle is repeated until the number of pre-defined time steps is reached.
\bigskip
\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, 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}
For this project we are using the Vlad code.
In its essence, it iteratively solves the one-dimensional Vlasov-Poisson system self-consistently
and adds changes due to atomic and molecular processes
to find the time evolution of the plasmas phase space density and electric field.
Different boundary conditions can be selected to model different physical problems,
like periodic boundaries or any mix of Dirichlet and Neumann boundaries.
The Vlad code utilizes the blitz++, PETSc, HDF5 and jansson libraries.
Output is written fully in parallel, using the same HDF5 file for fields and currents
throughout the whole simulation.
The input can be read from a json file or from a HDF5 file to restart a previous simulation.
Compilation is done using the GCC compiler.
Visualization is done using a short python code with the numpy, matplotlib and h5py packages.
This code only runs on one CPU and does not need much computational resources.
The problem size is mainly determined by the phase space density, which is discretely stored in
a two-dimensional array, holding the density of particles in one spatial and one velocity dimension.
All arrays are managed by the blitz++ library.
Because the KATRIN WGTS is very long (16\,m) compared to the plasma length scale,
that determines the spatial resolution (ca. 0.06\,cm),
the z-direction has to contain at least $3\times10^4$ grid cells.
This made it obvious that a parallelization in the spatial direction is necessary.
It was implemented by using the message passing interface (MPI) exclusively without internal
threading and without hybrid parallelization.
On local computing clusters the OpenMPI implementation is used.
The code has been parallized to not utilize any GPU resources.
However, it is technically possible and planned to do some parts of the calculation on GPUs in the future.
At the moment, all arrays across the space-dimension are cut in equally-sized sub-arrays,
distributed over all CPUs.
The velocity-dimension is not split up by this,
so that each CPU gets a slice over the whole velocity domain, but only a few z-values for 2d arrays.
This minimizes CPU communication to the exchange of ghost cells between the sub-arrays and
allows parallelization of the Vlasov- and Poisson-solver at the same time.
The parallel solution of the Poisson equation is mainly taken care of by the linear PETSc library.
The code has been tested by doing several simulations on the bwForCluster BinAC before.
%(A numeric integration of the pure Vlasov equation without atomic effects
%would then lead to linearly increasing computation time if the spatial or velocity resolution is increased.
%Meanwhile the solution time for the Poisson equation only scales with the number of grid cells in space-direction.
%However, the computation time grows with the order of 2 when the velocity resolution grows,
%if one decides to add of atomic effects like beta decay, ionization and recombination.)
%{\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)!}\\
%\textit{If you use third-party codes, include}
%\begin{itshape}
%\begin{itemize}\setlength{\itemsep}{-2pt}
% \item Name, version, licensing model and conditions
% \item Web page and other references
% \item Contact information of the code developers.
% \item Your relationship to the code (developer, collaborator to main developers, end user, etc.)
%\end{itemize}
%\end{itshape}
%\textit{Here we give an example table and plot for presenting scaling and performance information. The presented scaling should range from a single core to the maximal possible number of cores. If this is not doable, the presented scaling should range from the lowest possible number to the maximal possible number of cores for your case. Please \textbf{replace} the text in {\tt Courier} by the appropriate information.}
\begin{table}[H]
\caption{\label{tab_scaling} Weak scaling behavior of {\tt Vlad} on {\tt HAWK} at {\tt HLRS}. This test was performed with $16\times1000$ cells per CPU, absolute timings per time step (s) and eficiency normalized to 1 core are given.}
\begin{center}
\setlength{\tabcolsep}{10pt}
\renewcommand{\arraystretch}{1.2}
\begin{tabular}{lrrr}
\#cores & absolute timing (s) & efficiency (\%) \\
\hline
1 & 0.2131 & 100\\
2 & 0.2175 & 97.977\\
4 & 0.2179 & 97.797\\
8 & 0.2227 & 95.689\\
16 & 0.2191 & 97.262\\
32 & 0.2208 & 96.513\\
64 & 0.2497 & 85.342\\
128 & 0.2783 & 76.572 \\
256 & 0.2925 & 72.855 \\
512 & 0.2861 & 74.484 \\
1024 & 0.3047 & 69.938 \\
2048 & 0.2955 & 72.115 \\
\end{tabular}
\end{center}
\end{table}
\begin{figure}[H]
\begin{center}
\includegraphics[scale=0.95]{Figures/scaling.png}
\end{center}
\caption{\label{fig_scaling}Weak scaling behavior of {\tt Vlad} on {\tt HAWK} at {\tt HLRS}. This data was obtained with a problem size of {\tt $16\times1000$ cells per CPU}.}
\end{figure}
%\textit{(1 to 2 pages)}
\newpage
\subsection{Justification of resources requested}
%\textit{Outline the amount of resources you request for the current granting period, structured in sub-projects, if applicable.}\\
%\textit{\textbf{If you are requesting different types of resources (e.g. CPUs, GPUs, etc.), please provide the following information and table for \underline{each} type of resource \underline{separately}. If you request resources on several HPC systems or modules, please justify why this is necessary for your project.}}
%\begin{itshape}
%\begin{itemize}\setlength{\itemsep}{-2pt}
% \item Type of run (e.g. pre- /post-processing run, production run, visualization, etc.)
% \item Problem size for planned runs (e.g. \# particles or the like)
% \item Number of runs planned
% \item Number of steps per run
% \item Wall-clock time per run
% \item Number of cores used per run (for GPUs: number of cores of the host CPUs)
% \item Total amount of requested computing time
% \item Resources for data analytics, if applicable
%\end{itemize}
%\end{itshape}
The size of the simulation depends on the physical size of the experiment and
the density of the plasma to simulate.
Since we plan to do only simulations of the KATRIN WGTS plasma here, both parameters are set.
The length of the WGTS is roughly $2.5\times 10^4$ times the plasma Debye length
at the chosen density, which has to be resolved in one cell.
This leads to a number of $2^{15}$ cells in z-direction to be chosen,
so that the whole WGTS can be simulated with a sufficient spatial resolution.
In principle, there is no such criterion for the velocity space.
The highest velocity value of particles injected in the simulation
is the maximum velocity of beta electrons.
How many grid cells are chosen in v-direction is mainly limited by the computation time,
since the atomic and molecular processes are very costly in this regard.
However, a certain number of velocity grid cells are necessary to resolve
characteristics of the plasma evolution, like instabilities in phase space density.
Because the simulations usually start with zero charged particles and
it takes some time for them to emerge from the tritium decay and ionization,
at least $10^6$ time steps are necessary to see some physical developments.
To discover what happens in the long-term,
we are planning to do some runs with even more time steps ($2\times10^7$)
in sub-project 1.
The aim of sub-project 2 is to detect if there are some features
that may be suppressed by a too low velocity resolution.
Since the velocity space is in the foreground here,
it is sufficient to simulate only the left half of the x-domain.
Sub-project 3 is to find out the influence of different boundary conditions
on the plasma potential.
Therefore, different runs with the same problem size are the chosen approach.
All cost-intensive runs to be done on hawk are for data production.
After each production run, the data is immediately visualized
using the python script on one core.
The visualization is calculated on the cluster for pure utility reasons and
takes less than 10 core hours in total.
\begin{table}[H]
\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 [seconds] & run & [core-h] \\
\hline\hline
Sub-proj. 1 & production & $32768\times500$ & 4 & $2\times 10^7$ & 0.086 & 2048 & $3.9\times 10^6$ \\
~ & visualization & $32768\times500$ & 4 & $2000$ & 2.7 & 1 & $6.1$ \\
%~ & 2 & $32768\times1000$ & 2 & $1\times 10^7$ & 0.3456 & 2048 & $3.9\times 10^6$ \\
Sub-proj. 2 & production & $16384\times500$ & 10 & $1\times 10^6$ & 0.086 & 1024 & $2.5\times 10^5$ \\
~ & production & $16384\times1000$ & 2 & $1\times 10^6$ & 0.346 & 1024 & $2.0\times 10^5$ \\
~ & production & $16384\times2000$ & 2 & $1\times 10^6$ & 1.4 & 1024 & $7.9\times 10^5$ \\
~ & visualization & $16384\times500$ & 10 & $100$ & 1.4 & 1 & $0.4$ \\
~ & visualization & $16384\times1000$ & 2 & $100$ & 2.7 & 1 & $0.2$ \\
~ & visualization & $16384\times2000$ & 2 & $100$ & 5.4 & 1 & $0.3$ \\
Sub-proj. 3 & production & $32768\times500$ & 10 & $1\times 10^6$ & 0.086 & 2048 & $4.9\times 10^5$ \\
~ & visualization & $32768\times500$ & 10 & $100$ & 2.7 & 1 & $0.8$ \\
\hline\hline
TOTAL & & & & & & & $5.6\times 10^6$\\
\end{tabular}
\end{center}
\end{table}
\bigskip
%\textit{(0.5 to 1 page)}
\section{Resource Management and Work Schedule}
\rule{\textwidth}{0.4pt}
\subsection{Resource management}
%\textit{Describe how you intend to manage the resources you have requested. This should include a description of the methods you will deploy to monitor progress of the project and how project results are documented.}\\
%\textit{(0.5 to 1 page)}
Due to previous work on other supercomputer the work outline is pretty clear:
Existing parameter files have to be appended for different rear wall potential values, maximum number of timesteps and phase space resolution.
The simulations can be started almost immediately.
\subsection{Work schedule}
%\textit{Provide tables and Gantt charts for a clear presentation of the work schedule, structured in sub-projects, if applicable.}
\subsubsection{Sub-project 1: Simulation time}
This sub-project is carried out first in order to identify
the important time scales for the phase space evolution.
This is done for the smallest velocity resolution in order to
maximize the number of time steps that can be done within a specific wall time.
Afterwards the obtained densities and fields have to be visualized and
then the second sub-project can be started.
\subsubsection{Sub-project 2: Velocity resolution}
The second sub-project does actually not depend on results of the first one.
It will carry out simulations with different velocity resolutions while keeping
the maximum number of time steps constant.
It is planned to do some simulations on the smallest resolution first,
to find the best set-up and test velocity-dependent cell sizes.
After that, fewer simulations are carried out with higher
velocity resolutions on the best simulation set-ups found in the previous simulations.
\subsubsection{Sub-project 3: Rear wall potential}
Here, 10 different potential values are chosen in total,
with 5 positive and 5 negative values, to check different possibilities.
After each run, the results are immediately visualized to adaptively
decide the next promising value of the rear wall potential to be checked.
That way, no computational resources should be wasted of simulations
with a too high potential value and
thus no new physical knowledge to be gained.
\bigskip
%\textit{Example for a Gantt chart:}
\begin{figure}[H]
\begin{flushleft}
\includegraphics[scale=0.6]{Figures/gantt.png}
\end{flushleft}
\caption{\label{fig_workschedule}Work schedule for the project.}
\end{figure}
\section{Key Personnel and Experiences}
\rule{\textwidth}{0.4pt}\\
%\textit{Give a short introduction of the key persons involved in the project and their experience (max 3 persons).}\\
%\textit{(half a page)}
\textsc{PD Dr. Felix Spanier} (felix.spanier@uni-heidelberg.de)\\
F. Spanier is the leader of the working group in Heidelberg, where the Vlad code has been
developed initially. His expertise lies both in theoretical plasma astrophysics and the realization of kinetic
plasma simulations. He has supervised the thesis of Dr. J. Kellerer that precedes this project.\\
\textsc{Anna Josephine Schulze, B.Sc.} (anna.schulze@stud.uni-heidelberg.de)\\
A. J. Schulze has developed the Vlad code and is still improving and implementing new features.
Lately, she added atomic processes like beta decay and ionization to the code
and will continue by adding particle collisions.
She also runs the Vlad simulations and analyzes their results.\\
\textsc{Christian Sendlinger, M.Sc.} (christian.sendlinger@stud.uni-heidelberg.de)\\
C. Sendlinger is heavily involved in the maintenance and improvement of the previously used ACRONYM codebase.
He is currently working on improving the KARL code, that provides some of the input values for Vlad.
He also ran and evaluated simulations of the KATRIN source tube in the context of this project
in the past.
With his knowledge gained from these simulations, he supports and supervises A. J. Schulze.
\newpage
\section{Bibliographic References}
\rule{\textwidth}{0.4pt}\\
%\textit{Provide recent/most important bibliographic references that are relevant to the project.}\\
\bibliography{references.bib}
\bigskip
\end{document}