HLRS Vlad: added Project Details, Numerical Methods and Algorithms, Code performance and workflow, Key Personnel

This commit is contained in:
2024-11-26 02:09:15 +01:00
parent a7673ad587
commit 60e6787563
2 changed files with 202 additions and 83 deletions
@@ -1,6 +1,7 @@
\documentclass [a4paper, 11pt]{article}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{epsfig}
\usepackage{graphicx}
\usepackage{times}
@@ -165,6 +166,8 @@ The analysis of the structure of the electric field has shown no special azimuth
Some of the particle species, namely secondary and beta electrons, present in the simulation only had a small particle number which results in a large noise level. 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.
%--> Randschicht aus KARL
%--> Acronym teil aus Jonas PHD
\newpage
@@ -192,20 +195,50 @@ 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.
In fact, the problem itself is a Boltzmann equation
where the collision-term contains inelastic atomic and molecular collision processes and
the beta-term the injection of charged particles through beta-decay.
This equation is coupled to Maxwell's equations,
which describe the propagation and interaction of electromagnetic fields and currents.
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.
Also, the background magnetic field is constant, keeping the particles on their trajectory.
This means all setups are essentially electrostatic and
the problem breaks down to the following system of equations:
\begin{eqnarray}
\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} \\
\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}
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 to cross-check the evolution of electric fields
in a self-consistent way that includes plasma and atomic processes.
The plan is now, to do simulations with different interests/perspectives
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 to be $>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:
\begin{itemize}\setlength{\itemsep}{-2pt}
\item long simulation times
\item longer simulation times (more time steps)
\item high resolution (in velocity space as high as possible)
\item the potential of the rear wall
\end{itemize}
\subsubsection{Simulation times}
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.
@@ -218,50 +251,147 @@ for the development of the plasma potential inside the WGTS.
%\subsubsection{Sub-project 1}
%\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)}
%\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}
%\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}
{\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)!}\\
For this project we are using the Vlad code.
In its essence, it iteratively solves the one-dimensional Vlasov-Poisson system self-consistently
to find the time evolution of the plasmas phase space density and electric field.
\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.}
The 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.
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.
(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.)
The KATRIN WGTS is very long (16\,m) compared to the plasma length scale
that determines the maximum spatial resolution (ca. 0.06\,cm).
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.
With that, 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.
%{\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} Scaling behavior of {\tt LINPACK} on {\tt HAWK/Hunter, JUWELS/JUPITER, SuperMUC-NG} at {\tt HLRS, JSC, LRZ}. This test was performed with $5\cdot 10^6$ particles, absolute timings per time step (s) and relative speedup normalized to 1 core are given.}
@@ -361,60 +491,18 @@ TOTAL & & & & & & & sum of above\\
\end{center}
\end{table}
\begin{table}[H]
\caption{\label{tab_GPU_resources}The following GPU 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/ &
\# host cores/ &
Total \\
&
of run &
size &
&
run &
step [hours] &
run &
[core-h] \\
\hline\hline
Sub-proj. 1 &
MD 1 &
P3 &
R3 &
S3 &
W3 &
C3 &
R3$\cdot$S3$\cdot$W3$\cdot$C3 \\
~ &
MD 2 &
P4 &
R4 &
S4 &
W4 &
C4 &
R4$\cdot$S4$\cdot$W4$\cdot$C4 \\
$\cdots$ &\multicolumn{7}{c}{$\cdots$}\\
\hline\hline
TOTAL & & & & & & & sum of above\\
\end{tabular}
\end{center}
\end{table}
\bigskip
\textit{(0.5 to 1 page)}
%\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)}
%\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 background potential values, maximum azimuthal mode number and particle numbers.
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.}
@@ -436,9 +524,25 @@ TOTAL & & & & & & & sum of above\\
\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{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 was the leader of the working group in Würzburg, where the ACRONYM 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.\\
\textit{(half a page)}
\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 ACRONYM codebase. He
is currently working on implementing the pseudo-2D version of ACRONYM and will run and evaluate
simulations of the KATRIN source tube in the context of this project.
\section{Bibliographic References}
\rule{\textwidth}{0.4pt}\\
+16 -1
View File
@@ -82,4 +82,19 @@ url = {https://www.osti.gov/biblio/4200114},
place = {United States},
year = {1975},
month = {6}
}
}
@article{godunov:hal-01620642,
TITLE = {{Finite difference method for numerical computation of discontinuous solutions of the equations of fluid dynamics}},
AUTHOR = {Godunov, Sergei K. and Bohachevsky, I.},
URL = {https://hal.science/hal-01620642},
JOURNAL = {{Matemati{\v c}eskij sbornik}},
PUBLISHER = {{Steklov Mathematical Institute of Russian Academy of Sciences}},
VOLUME = {47(89)},
NUMBER = {3},
PAGES = {271-306},
YEAR = {1959},
PDF = {https://hal.science/hal-01620642v1/file/SG1959.pdf},
HAL_ID = {hal-01620642},
HAL_VERSION = {v1},
}