Intermediate phd status. Chapter 4 half done.

This commit is contained in:
Jonas Kellerer
2021-06-17 15:24:49 +02:00
parent 45aa784a1f
commit 9fca30d66e
24 changed files with 11135 additions and 269 deletions
+66 -1
View File
@@ -2,7 +2,7 @@
\chapter{Simulation of Particle Distributions with KARL}
\label{ch:karl}
\todo{change all align to equation}
The density and its energy distribution of all species defines the plasma in the \acs{katrin} source. The specific density distribution is dependent on the cross section of each interaction, the particle movement and the geometry of the source. Initially only beta electrons are created. Subsequent interactions with the surrounding gas create multiple other electrons and ions with varriing energy. This scenario ist best simulated using the Monte Carlo technique. This technique was implemented in the newly developed \ac{karl} code. The code was developed in collaboration with C. Reiling in his master thesis \cite{MasterReiling2019} and extended together with Rupp in his master thesis \todo{Cite: MA Joachim}. The code and its first results will be presented in this chapter.
\section{Simulation Method}
@@ -192,13 +192,78 @@ The density and its energy distribution of all species defines the plasma in the
\newpage
\section{Electromagnetic Field-Free Simulation}
\label{sec:karl:field_free_simulation}
\xfigure{h}{1.}{Chapter4_KARL/ZeroElectricFieldCase/density.pdf}{Density distribution}{}
\xfigure{h}{1.}{Chapter4_KARL/ZeroElectricFieldCase/current.pdf}{current distribution}{}
\xfigure{h}{1.}{Chapter4_KARL/ZeroElectricFieldCase/energy_density.pdf}{Energy density distribution}{}
\xfigure{h}{1.}{Chapter4_KARL/ZeroElectricFieldCase/density_vs_z.pdf}{Density in z}{}
\subsection{Poisson Solver}
\label{ssec:karl:poisson_solver}
The density data of the \acs{karl} simulation can be used to solve for the electrostatic potential $U$ in the source through the Poisson equation (cgs)
\begin{equation}
\nabla^2 U = - 4 \pi \rho \fullstop
\label{eq:karl:poisson_equation}
\end{equation}
The charge density $\rho$ is directly calculated from the number densities
\begin{equation}
\rho = e\cdot (n_i - n_e) \fullstop
\end{equation}
It is assumed that the potential has an azimutal symmetry. The Poisson equation in cylinder coordinates then reads as
\begin{equation}
\frac{1}{r} \frac{\partial U}{\partial r} + \frac{\partial^2 U}{\partial r^2} + \frac{\partial^2 U}{\partial r^2} = -4 \pi \rho \fullstop
\end{equation}
This equation can be used for all cases, where the radius is non zero. In the limit of zero radius the first summand reads
\begin{equation}
\lim_{r\to 0} \frac{1}{r} \frac{\partial U}{\partial r} = \frac{\partial^2 U}{\partial r^2} \comma
\end{equation}
through the use of L'Hôpital's rule \todo{cite paper}.
The \acs{karl} simulation provides the density at discrete bins. In the following it is assumed that the density of these bins is located in the center of the bins, see figure \todo{figure}. So the Poisson equation has to be transformed into discrete corrdinates
\begin{eqnarray}
r &= i \Delta r \comma \\
z &= j \Delta z \comma
\end{eqnarray}
with the step size $\Delta r$ and $\Delta z$ in radial and longitudinal direction.
\xfigure{h}{1.}{Chapter4_KARL/PoissonSolver/coordinates_poisson_solver.pdf}{Indexing of Discrete Values}{}
The method of central differences is used for both cases from above. The potential can then be expressed through the iterative approach
\begin{eqnarray}
U_{i,j} =& \frac{
4 \pi \rho_{i,j}
+ \frac{U_{i+1,j}}{\Delta r^2} \left( 1 + \frac{1}{2i} \right)
+ \frac{U_{i-1,j}}{\Delta r^2} \left( 1 - \frac{1}{2i} \right)
+ \frac{1}{\Delta z^2} \left( U_{i,j-1} - U_{i,j+1}\right)
}{\frac{2}{\Delta r^2} + \frac{2}{\Delta z^2}} \comma
\label{eq:karl:poisson_solver_r}
\\
U_{0,j} =& \frac{
4 \pi \rho_{0,j}
+ \frac{4}{\Delta r^2} U_{1,j}
+ \frac{1}{\Delta z^2} \left( U_{0,j-1} + U_{0,j+1}\right)
}{\frac{4}{\Delta r^2} + \frac{2}{\Delta z^2}} \fullstop
\label{eq:karl:poisson_solver_r0}
\end{eqnarray}
The solution of this iterative approach needs boundary conditions. Two major conditions are used here: the Dirichlet boundary and the Neumann boundary \todo{citation}. The Dirichlet boundary is used, when the potential at specific points are known. In the following it is assumed that the potential of the source tube is set to zero and the potential of the rear wall has an distinct value position independend value $U_{\text{rw}}$. The Neumann boundary is used, when the first derivative of the potential is known, namely the electric field. The electric field is in general not known for the source tube. Nevertheless it can be assumed that the electric field at large distances from the source is zero. Thus this boundary is used at the \acs{dps} boundary.
Equations \ref{eq:karl:poisson_solver_r} and \ref{eq:karl:poisson_solver_r0} describe the potential at positions $i,j$ in dependence of the neighboring field values and the density. Thus for the final solution an iterative approach is used to determine the potential values from a given density input. The approach is summarized by the following steps
\begin{enumerate}
\item Initiate the potential to zero.
\item Set the corresponding values of the Dirichlet boundary condition to the specified values.
\item Loop over all possible inner potential values and determine their values through equations \ref{eq:karl:poisson_solver_r} and \ref{eq:karl:poisson_solver_r0}.
\item Redo step 3 a specified number of times.
\item Determine the difference between of the calculated potential with the density through equation~\ref{eq:karl:poisson_equation} for all positions.
\item If the sum of the absolute differences is below a certain threshold return the calculated potential array. Otherwise go to step 3.
\end{enumerate}
The value density of the \acs{karl} simulation is assumed to be known at the center of the bins. The potential values of the rear wall and the tube wall is given at the corners of the bins. For simplicity of the algorithm it was decided to extrapolate the denisty to the bin corners.
For the density at the bins corners $(i,j)$, which are surrounded by four cells, was calculated through the mean of the surrounding cells $(i^\prime,j^\prime)$. The density at the corners with $i = 0$ was calculated from the mean of the two adjacent bins. The density at the boundaries of the simulation domain was set to the mean of the two surrounding bins.
The potential of this poisson solver provides a first insight in the potential in the source from the \acs{karl} simulation without the need of the \acs{acronym} simulations. Nevertheless the particle densities of electrons and ions differ greatly. This produces a large electric field, which will influence the particle motion of the \acs{karl} simulation. To avoid the computation intensive \acs{acronym} simulation it was decided to use the potential of a previous \acs{karl} simulation as an input of another \acs{karl} simulation. Nevertheless the \acs{karl} simulation only takes the electric field as an input. Thus the electric field was calculated from the potential in a post processing step. The radial and longitudinal electric field are calculated at different positions $(i,j)$, see \ref{fig:Chapter4_KARL/PoissonSolver/coordinates_poisson_solver.pdf}, to simplify the calculation. These field values are then extrapolated onto the position $(i^\prime,j^\prime)$ in the center of the bins. The extrapolation provides directly the eletric field, which can be used an an input for the \acs{karl} simulation. Nevertheless it introduces an error because the field is not calculated using Maxwell's equations. In the following this error is ignored. Later on the \acs{acronym} simulation will provide a more precise calculation of the field.
%\subsection{Energy Density Distribution of Electrons}
%\subsection{Current Density Distribution of Ions}