\chapter{Particle in Cell Simulation of KATRIN Source} \label{ch:pic_at_katrin} In this chapter, \acs{acronym} will be applied to the simulation of the plasma inside the \acs{katrin} source. The size of the source is large compared to the Debye length. It is therefore imperative to evaluate the needed computational resource before the simulation, which will be described in section~\ref{sec:pic_at_katrin:computational_resources}. The evaluation showed that it is beneficial to segment the source into smaller parts and simulate the plasma in those parts first. One of these parts is a section in front of the rear wall. The interaction of the boundary with the plasma is assumed to be the strongest here due to the movement of the charged particles towards the boundary and subsequent absorption. Currently, there is no conclusive information available, which parameters of the plasma (spectrum, particle currents, etc.) significantly influence the plasma in the rear wall region. Therefore, the second section of this chapter (section~\ref{sec:pic_at_katrin:rearwall_section}) focuses on the simulation of the plasma with varying parameters in this region. Another distinct section of the source is a segment in the center of the \acs{wgts}. This section is the furthest away from the longitudinal boundaries. Therefore, it is used for the investigation of the plasma independent of the longitudinal boundary condition. The investigations are described in the third section of this chapter (section~\ref{sec:pic_at_katrin:central_section}). Lastly, the experiences from the smaller sections are applied to a simulation of the whole \acs{katrin} source, see section~\ref{sec:pic_at_katrin:complete_source}. \section{Estimation of Computational Resources} \label{sec:pic_at_katrin:computational_resources} The estimation of the computation resources for the simulation of the plasma inside the source hinges on four different parameters: the size of the simulated geometry, the cell size $\Delta x$, the timestep length $\Delta t$ and the plasma time scale. These parameters can be used to evaluate the necessary number of cells, the number of timesteps, and the number of macro particles. In the end, the necessarily needed computational resources result from the available number of CPUs and from the performance of the code. The evaluation of each of the different parameters will be described in the following for the conditions inside the \acs{katrin} source to provide an estimate of the necessary computational resources and suggestions for how to proceed with the simulations. The size of the simulated geometry is given by the extends of the \acs{katrin} source. In first approximation, the source is a cylinder with a radius of $R = \SI{4.5}{cm}$ and a height of $H = \SI{16}{m}$. The geometry of the pump ports and the rear wall chamber is neglected here. The cell size is calculated from the Debye length through equation~\ref{eq:acronym:cell_size}. The Debye length in turn is dependent on the electron density and the temperature of the electrons. The \acs{karl} simulations revealed that there is a difference between the electron density and the ion density. Assuming quasineutrality in the source, the larger value of both densities is used as a first approximation on the maximum electron density. The \acs{karl} simulations showed that the ion density is higher than the electron density. It reaches values of up to $n_i \approx \SI{3E6}{cm^{-3}}$. The temperature is assumed to be $T = \SI{80}{K}$, which is also the temperature of the surrounding tritium gas. Thus, the Debye length is $\lambda_D \approx \SI{3.56E-2}{cm}$, and the cell size is $\Delta x \approx \SI{2.52E-2}{cm}$. Both the cell size and the size of the geometry can be used to calculate the number of cells in each direction of the Cartesian simulation domain. The cylinder is assumed to be aligned with the $z$-axis. Thus, the minimal number of cells in $z$-direction calculates to \begin{equation} n_z = \frac{H}{\Delta x} \approx 63506 \fullstop \end{equation} In the other two directions, the simulation domain must be large enough to cover the diameter of the source. Thus, the number of cells in $x$- and $y$-direction must be at least \begin{equation} n_x = n_y = \frac{2R}{\Delta x} \approx 362 \fullstop \end{equation} In total, approximately \num{8.3E9} cells must be simulated. Each cell will be filled with macro particles. The number of macro particles in each cell should be large enough to avoid statistical fluctuations. A rule of thumb are \num{20} particles per cell. This means that if all cells are filled homogeneously, there are $N_p \approx \num{1.66E11}$ particles in the simulation. The number of timesteps $N_t$ is calculated from the plasma frequency and the timestep length $\Delta t$, see equation~\ref{eq:acronym:number_of_timesteps}. The timestep length $\Delta t$ is limited by many factors (gyro frequency, plasma frequency, etc.), see section~\ref{ssec:pic_maxwell_solver}. In the case of the \acs{wgts}, the timestep length is bound by the \acs{cfl} limit, which provides $\Delta t < \SI{4.4E-13}{s}$. With the approximate density of the electrons, the plasma frequency calculates to $\omega_\text{pe} \approx \SI{98}{MHz}$ and the plasma time scale to $t_\text{pe} \approx \SI{10}{ns}$. Therefore, to cover one plasma time scale, the number of timesteps must be at least $N_t \approx 23204$. The \acs{acronym} code is highly paralizable on many CPU cores, see also \citep{Kilian.2015}. The performance of the code can be classified as the number of particle updates, which can be performed simultaneously per second on a given number of CPUs. A rough estimate of the performance of the current version of the code is $P = \num{2.5E5}$ particle updates per second and CPU (with no particle output). This number can be used to calculate the time $t_\text{sim}$ a simulation will take with a given number of CPUs $N_\text{cpu}$ through \begin{equation} t_\text{sim} = \frac{N_p \cdot N_t}{N_\text{cpu} \cdot P} \fullstop \label{eq:pic_at_katrin:simulation_time} \end{equation} Thus, the simulation time scales inversely with the number of CPUs. A small simulation time is preferable, partly because the computational resources are only available for a certain time and partly because the results shall be available at a reasonable time. The simulation time can be reduced by increasing the number of CPUs, by increasing the number of particle updates per second, or by reducing the number of simulated particles or the number of simulated timesteps. The latter two are inherent to the plasma which should be simulated, and can therefore not be reduced. The number of particle updates per second depends mostly on the current deposition step of the \acs{pic} algorithm. Nothing fundamental was changed in the current deposition step from the optimized basic \acs{acronym} code. Therefore, there is not much room for improvement. This means, only the number of CPUs can be increased to reduce the simulation time. The number of CPUs cannot be increased to arbitrarily high values because of the cylinder geometry of the source and the partitioning of the simulation domain. The simulation domain is partitioned into cuboid sections, where each CPU simulates the plasma in its section \citep{Kilian.2015}. Corresponding communication between the CPUs was set up. The total number of CPUs $N_\text{cpu}$ is calculated from the number of CPUs $s_i$ in each spatial direction through \begin{equation} N_\text{cpu} = s_x \cdot s_y \cdot s_z \fullstop \end{equation} The values of $s_i$ can be specified before the simulation. In general, it is preferable that each CPU has the same load. This is the case for the cylindrical geometry of the source if $s_x = s_y = 2$ (division in quarter circles), or if $s_x = s_y = 1$ (no division). This would also mean, that the number of CPUs can only be increased by increasing the partition in $z$-direction. Therefore, this procedure is limited by the minimal number of cells in $z$-direction. Additionally, there is a large magnetic field in $z$-direction. Thus, particles will most likely move in this direction. So, there will be more communication necessary between the CPUs in $z$-direction than in the other two directions. So in total, for each simulation it has to be evaluated if it is preferable to have an uneven load on the CPUs or if more communication steps have to be performed. The simulation time at large-scale computation facilities is granted, in most cases, for the cumulated computation time $t_\text{cum}$ of each single CPU. The typical unit is CPUh, which denotes that one CPU has been used for one hour. If all CPUs are used in parallel then the cumulated computation time is calculated through \begin{equation} t_\text{cum} = t_\text{sim} \cdot N_\text{cpu} \fullstop \end{equation} The simulation time scales inversely with the number of CPUs, compare equation~\ref{eq:pic_at_katrin:simulation_time}. Thus, the cumulated computation time does not scale with the number of CPUs. It can therefore be considered as a hard limit on the necessary computational resources for a specific problem. Following the calculation from above for the total number of particles, the number of timesteps and the performance of the code, the cumulated computation time for one simulation of the \acs{katrin} source is calculated to $t_\text{cum} = \SI{3.25E6}{CPUh}$. In the context of this thesis, it was possible to obtain a grant for $t_\text{cum} = \SI{36E6}{CPUh}$ at the Leibniz Supercomputing Centre. One simulation of the whole source section would take up at least a tenth of this quota. This shows that parameter studies and tests of the new code are not feasible for the simulation of the whole \acs{katrin} source. Hence, it was decided to break down the simulation domain into smaller segments, namely a region in front of the rear wall, see section~\ref{sec:pic_at_katrin:rearwall_section}, and a region in the central part of the tube, see section~\ref{sec:pic_at_katrin:central_section}. This way, the length of the cylinder is reduced, which reduces the number of simulated particles. Additionally, the electron density in front of the rear wall is lower than in the center of the source. Thus, the cell size and timestep length is increased, which reduces the required computational resources further. So, parameter studies can be performed in the rear wall region without any concern of the computation time. \section{Rear Wall Section} \label{sec:pic_at_katrin:rearwall_section} The plasma of the \acs{katrin} source is surrounded by a strong magnetic field, which mostly confines the movement of the charged particles in longitudinal direction. Therefore, interactions of the plasma with a boundary in longitudinal direction are of special interest. The results from \citet{PhDKuckert2016} suggest, that the potential of the rear wall has a significant influence on the fields inside the source. The simulations of \citeauthor{PhDKuckert2016} assumed a collisional plasma throughout the source. This assumption was shown to be invalid in the context of this thesis, especially in the rear wall region, see section~\ref{sec:karl:field_free_simulation}. Therefore, \acs{acronym} is used for the investigation of a collisionless plasma in front of the rear wall. Because there are no previous dynamic simulations available, it is unclear which plasma parameters have a significant influence and are indispensable for a complete model of the plasma. Hence, this section will focus on the investigation of the plasma under the variation of different parameters. The examined parameters will include the electron spectrum, the electron density and the background current. Their extent is obtainable by \acs{karl} simulation. They provide a good starting point for the investigations. The same simulation setup was used in each of the parameters studies in order to obtain results that are as comparable as possible. The setup will be described shortly in the following. The rear wall chamber and the attached beam tube is approximated by a cylinder with radius of $R = \SI{4.5}{cm}$ and a height of $H = \SI{1.5}{m}$. The height corresponds approximately to the distance between the rear wall and the first pump port. The cylinder is closed at one side by the rear wall and is open on the other side, see figure~\ref{fig:Chapter6_Results/RearwallSection/rearwall_cup_sketch.pdf}. The rear wall is considered as a perfectly conducting surface. Hence, it is simulated through a \acs{pec} boundary condition. The open end of the cylinder will be represented by a \acs{pml} boundary. Particles from the bulk of the plasma enter the simulation domain through an injection plane in front of the \acs{pml} boundary. The number of injected particles will be determined by retaining a constant density at the boundary, see section~\ref{sssec:acronym:injection_constant_density}. The tritium density in front of the rear wall is significantly lower than in the center of the source, see section~\ref{sssec:density_distribution}. It can therefore be assumed that no significant amount of beta decays or ionization processes occur here. Thus, there will be no injection of additional particles in the volume after the initial loading. \xfigure{tb}{1.}{Chapter6_Results/RearwallSection/rearwall_cup_sketch.pdf}{Simulation setup for the rear wall section.}{The geometry is approximated as a cylinder with a closed end (rear wall) and with an open end (\acs{pml}). Particles will be injected initially in the volume, and during the simulation at the injection plane.} \subsection{Electron Spectrum} \label{ssec:pic_at_katrin:rearwall_section:dndE} Simulations with \acs{karl}, see section~\ref{ssec:karl:field_free_simulation:electron_spectrum}, show that the electron spectrum can be subdivided into three regions: a thermal region, where the energy follows the Maxwell Boltzmann distribution, a beta region, where the energy follows the Fermi distribution of beta decay and a transitional section between the other region. In this section, it will be investigated how these distributions influence the potential of the rear wall section. Additionally, it will be assessed if the parts of the spectrum are relevant for the solution or if they can be neglected in future simulations. Three different cases were compared: a spectrum with only the thermal region of the spectrum, a spectrum with the thermal region and the beta region, and a spectrum with all three regions. \paragraph{Simulation Setup} Four parameters need to be set prior to the simulation: the background fields, the particle densities, the particle velocity distributions, and the background ion current. Each of these parameters will be described shortly in the following. The background magnetic field was set to $B = \SI{2.5}{T}$ homogeneously distributed over the whole rear wall section. For simplicity, the variation of the field strength in the rear wall chamber and pump ports, see section~\ref{ssec:katrin:B_bg}, was neglected. No electric background field was used. Thus, the contact potential difference between the rear wall and the beam tube wall was assumed to be zero. The total electron density was set to $n_e = \SI{1E5}{cm^{-3}}$, due to the assumption of quasineutrality. Therefore, the density corresponds to the simulated ion density in front of the rear wall and not the simulated electron density. An investigation of the influence of the total electron density on the result can be found in section~\ref{ssec:pic_at_katrin:rearwall_section:density}. The individual electron densities for the different parts of the spectrum were set to a homogeneous value throughout the simulation domain. No longitudinal or radial variation was considered, due to the small variation of the density in the rear wall region, see section~\ref{ssec:karl:field_free_simulation:particle_densities}. The specific values of the densities were determined using two approximations. First, it was assumed that the density of the beta particles is constant in the source, and the simulated value of \acs{karl} can be used directly. This assumption is supported by the results of the \acs{karl} simulation, see section~\ref{ssec:karl:field_free_simulation:electron_spectrum}. Second, it was assumed that the density of the transitional region can be expressed relatively to the density of the thermal segment. Thus, the density of the transitional region can be calculated directly from the density of the thermal region. This is of course only a first approximation, because the simulations with \acs{karl} showed that the density of both regions scales differently with the position in the source. The proportionality constant $a$ was determined from the \acs{karl} data at the position directly in front of the rear wall to $a \approx \num{2E-3}$. The resulting density values used for the simulation can be found in table \ref{tab:Chapter6_Results/energy_distribution.tex}. \xtable{tb}{Chapter6_Results/energy_distribution.tex}{Simulation parameters for spectrum analyis.}{Parameter were determined from a \acs{karl} simulation without background electric field, see section~\ref{sec:karl:field_free_simulation}.} The electron energy was sampled using the methods of section~\ref{sssec:acronym:injection:inital_loading:E_kin}. The energy of the thermal electrons was determined from a Maxwell Boltzmann distribution with a temperature of $T = \SI{80}{K}$. The energy of the beta electrons was rolled from the histogram data of the spectrum of the \acs{karl} simulation directly in front of the rear wall. The minimum energy was set to $E_\text{min} = \SI{100}{eV}$. The energy of the electrons in the transitional region was sampled directly though the histogram data of the spectrum within the energy range of $E_\text{min} = \SI{5E-2}{eV}$ and $E_\text{max} = \SI{100}{eV}$. In the end, the velocity distribution was determined from the sampled energy with an additive drift velocity. The drift velocity was calculated from the simulated particle current, see section~\ref{ssec:karl:field_free_simulation:particle_currents}, through equation~\ref{eq:acronym:drift_velocity}. The corresponding values of the estimated currents and drift velocities can also be found in table \ref{tab:Chapter6_Results/energy_distribution.tex}. The drift in radial direction was neglected, due to the comparably small value of the radial electron current. The longitudinal current of the ions was represented in the simulation as a background current. It was set to a homogeneous value of $j_i = \SI{0.73}{\nano\ampere\per\centi\metre\squared}$ throughout the simulation domain. A radial variation was neglected. An investigation of a radial dependent ion current can be found in section~\ref{ssec:pic_at_katrin:rearwall_section:curret_radial}. \newpage \paragraph{Results} The three simulations were performed for five plasma time scales and the electromagnetic fields, currents and particle distributions were recorded. Because of the strong longitudinal magnetic background field, it is expected that the largest difference between the simulations can be found in the electric field along the central axis of the cylinder. The radial dependency of the plasma will be investigated in more detail in section~\ref{ssec:pic_at_katrin:rearwall_section:curret_radial} together with a radial dependent background current. \xfigure{tb}{1.}{Chapter6_Results/RearwallSection/ComparisonElectronDistribution/potential_comparison_electron_distribution.pdf}{Potential and electric field for varied electron distributions.}{Potential and electric field are evaluated along the longitudinal axis of the cylinder in a simulation with a background magnetic field of $B = \SI{2.5}{T}$ and a background ion current of $j_i = \SI{4E9}{\per\centi\metre\squared\second}$. Three different spectra are compared. (th.): only a thermal region, (th.,beta): thermal spectrum and beta region, (th.,tr.,beta): full spectrum. The density values of the different spectrum regions can be found in table~\ref{tab:Chapter6_Results/energy_distribution.tex}.} The recorded electric field values were transformed into an electrostatic potential through the newly developed Poisson solver, see section~\ref{sec:acronym:poisson}. The electric field $E_z$ and electrostatic potential in the center of the tube of the three simulations can be found in figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonElectronDistribution/potential_comparison_electron_distribution.pdf}. It can be seen that all three simulations show a similar behavior of the potential and electric field. Three distinct regions can be identified: a region directly in front of the rear wall $(z < \SI{20}{cm})$, a region in front of the injection plane $(z > \SI{130}{cm})$, and a region between the other two regions. The following discussion will therefore focus on each of the regions separately. %The electric field values show, that there is a boundary region of at least \SI{20}{cm} length in front of the rear wall. It seems, that the electric field, then fluctuates in the bulk of the plasma around zero. The fluctutation is attributed here to thermal fluctuations. For more information refer to section~\ref{sec:pic_at_katrin:central_section}. In all three simulations, the potential in front of the injection plane, also called injection region, shows a similar behavior. The potential increases initially when moving away from the injection plane. Then the potential decreases towards zero. This feature was, in the context of this thesis, also observed in other simulations which used the \acs{pml} boundary in conjunction with the injection of particles. It can be explained by the numerical injection process itself. The electric field in this region guarantees that only the correct number of particles are inserted into the simulation domain. The height of the potential wall in this region is determined by the current of ions and the current of electrons. In these specific simulations, the current of electrons is higher than the current of ions. Thus, some electrons are reflected by the negative electric field, which reduces the incoming electron current. The height of the potential wall is higher for the simulation with all three electron species activated. This is expected, because each species increases the total electron current. Thus, a stronger electric field is necessary to reflect the electrons. All in all, the injection region is only located at the simulation boundary, and has no significant influence on the rest of the simulation domain. It is therefore not considered further. The region directly in front of the rear wall shows three distinct features: a small positive potential wall in the first centimeter in front of the rear wall, a big negative potential wall of approximately \SI{20}{cm} thickness, and a potential relaxation towards zero. This relaxation can extend over the central region of the simulation domain towards the injection region. The explanation of the origin of these three features will be illustrated in the following. The discussion will be guided by heuristic arguments. These arguments provide a good way to reason about the simulation results. Nevertheless, the behavior of the plasma is more intricate to be fully described by these arguments. The negative potential wall can be explained by the large mass difference between electrons and ions, which lets electrons move faster than ions. Therefore, electrons can reach the rear wall faster, which produces a positive space charge of ions in front of the rear wall. Thus, a negative potential barrier is created, which balances the difference of electrons and ions leaving the source. This reasoning is supported by the simulations of section~\ref{ssec:acronym:validation:boundary_layer_development}, where an electric field has developed to reduce the outgoing thermal electron flux. The height of the negative potential wall depends on the spectrum of the electrons. High-energy electrons of the transitional region and of the beta region can pass the barrier. Thus, a larger electric field is necessary to maintain the balance between ion and electron current. It is noteworthy that the potential barrier increased more, when including electrons of the transitional region than in the case of beta electrons only. This is especially interesting because the mean current was higher in the beta region than in the transitional region, see table~\ref{tab:Chapter6_Results/energy_distribution.tex}. This behavior could be explained by the difference of the density of the two electron species. There are much more electrons in the transitional region than in the beta region, which surpass the potential barrier. The energy difference between the two species does, most likely, not play a role because the beta electrons can leave the source at any potential value. This is not the case for the electrons of the transitional region, and a direct interaction of the potential with the electrons of the transitional region is possible. %In total, a combination of density, energy distribution and current plays a role on the shape of the potential. There is a small positive potential wall in the first few centimeters in front of the rear wall. This wall can be directly linked to the positive electric field at this region, compare figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonElectronDistribution/potential_comparison_electron_distribution.pdf}. It is possible, that this feature is a relic of the fixed ion background current. The true ion movement is influenced on large time scales by the potential generated by the electrons, whereas in the simulation, the ion current is set to a fixed value. This discrepancy is most notable directly in front of the rear wall, where the boundary effects are assumed to be the strongest. The positive electric field suggests, that the ion current is set too high in this region. This hypothesis is discussed in section~\ref{ssec:pic_at_katrin:rearwall_section:curret} and will not be investigated further here. The negative potential wall turns into a region $(z > \SI{20}{cm})$ where a positive potential tends towards zero over a large distance. The positive potential value and the extent of the decrease depends on the used electron species. This behavior could not be observed in the electric field data. Thus, there seems to be an intricate interaction between the radial boundary and the longitudinal potential. No heuristic argument could be found for the origin of the expanded transition towards zero potential. This, however, does not diminish the meaningfulness of the simulation, but rather enhances it. It can be seen, that the used electron species do not only influence the height of the negative potential wall, but also introduce long range effects of the potential. These effects reach well into the bulk of the plasma, and are therefore of specific interest for the \acs{katrin} experiment. There are fluctuations of the electric field throughout the simulation domain. These fluctuations are similar in all three simulations. They also manifest in the fluctuations of the potential. It is assumed that the fluctuations of the electric field originate from thermal fluctuations of the plasma. This hypothesis is underlined by the fact, that they occur in all three simulations. Nevertheless, more investigations are necessary here. In total, it can be concluded from figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonElectronDistribution/potential_comparison_electron_distribution.pdf}, that the specific choice of the electron spectrum has a significant influence on the potential. It can also be seen, that it does not suffice to take only the beta and thermal region into account. The transitional region has a non-negligible effect on the result. In previous simulations of the \acs{katrin} plasma \citep{PhDKuckert2016}, it was assumed that the electron spectrum can solely be described by thermal electrons. The results presented here show that the electron spectrum plays an important role, and the full electron spectrum needs to be considered in the plasma simulations. This claim is further supported by an investigation of the phase space of the electrons, which will be discussed in the following. \xfigure{tb}{1.}{Chapter6_Results/RearwallSection/ComparisonElectronDistribution/phasespace_thermaltransitionalbeta.pdf}{Electron phase space of rear wall region.}{Data used from the simulation with full electron spectrum. Each position $z$ represents a longitudinal slice of the rear wall region of \SI{1.5}{cm} length. The velocity was segmented into \num{100} logarithmic bins. White regions indicate regions with no data entry.} The position and velocity of all the simulated electrons can be recorded at a given timestep. This information can be used in a post-processing step to evaluate the phase space of the electrons. The phase space of the simulation with the complete electron spectrum can be found in figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonElectronDistribution/phasespace_thermaltransitionalbeta.pdf}. Here, only the velocity component along the cylinder axis is considered. It can be seen, that there are electrons with negative, as well as positive velocity. This means, that electrons stream both towards the rear wall and away from it. This behavior is expected for thermal electrons inside a plasma at a conducting boundary. Nevertheless, it can also be seen that there are electrons of the transitional region, which do not solely flow towards the rear wall and are absorbed there, like the beta electrons, but they are also reflected at some point. Therefore, they are not only source of a background current, but they also directly take part in the development of the plasma through their movement. This observation has extensive implications. First, it is apparent, that not all electrons, which reach the rear wall chamber are directly absorbed. There is the possibility, that they are reflected back into the center of the source by the plasma potential. Thus, more interactions of electrons with neutral gas could occur. Only, beta electrons seem to be unaffected by the potential and are absorbed fully at the rear wall. However, this consideration did not include the reflection and multiplication of electrons through scattering at the rear wall material \citep{Forstner2017}. Thus, even more electrons and also beta electrons could be reflected in the real experiment. Secondly, it can no longer be assumed that all particles travel towards the rear wall, which leaves the room open for additional plasma instabilities, foremost the two-stream instability \citep{Chen.1984}. In summary, the description of the plasma needs to take the full spectrum into account. A simplification to a thermal spectrum does not only underestimate possible plasma instabilities, but does also show significant differences in the plasma potential. Therefore, only the full spectrum is used in the following simulations. \subsection{Electron Density} \label{ssec:pic_at_katrin:rearwall_section:density} In the previous section, the total electron density was set to $n_e = \SI{1E5}{cm^{-3}}$ due to the assumption of quasineutrality. This density is significantly higher than the electron density, which is obtained by the \acs{karl} simulations, see section~\ref{sec:karl:field_free_simulation}. In this section, it will be investigated how the total density influences the plasma in front of the rear wall. Three different cases are compared: a simulation, where the electron density is determined by the electron density from the \acs{karl} simulation, a simulation, where the total electron density is determined by the ion density of the \acs{karl} simulation and a simulation, where the electron density is set to the approximate maximum electron density of the \acs{karl} simulation, see table~\ref{tab:Chapter6_Results/electron_density.tex}. \paragraph{Simulation Setup} Similar to the previous section, four parameters needed to be set prior to the simulation: the background fields, the particle densities, the particle velocity distributions, and the background ion current. The background fields and background ion current were set to the same value as before for a good comparability. This means, that the magnetic background field was set to $B = \SI{2.5}{T}$ and the ion background current was set to $j = \SI{0.73}{\nano\ampere\per\centi\metre\squared}$. No electric background field was used. The results from the previous section show that the whole spectrum needs to be taken into account for the simulation of the plasma. Thus, all three simulations were performed with the full spectrum. The same segmentation of the spectrum was used. Only the density and the drift velocity of the segments were changed. The density of the thermal electrons was set to three different values, see table~\ref{tab:Chapter6_Results/electron_density.tex}. The density of the transitional region was determined in dependence on the density of the thermal region through a constant proportionality constant $a \approx \num{2E-3}$ for all three simulations. This way the shape of the spectrum is kept the same for the two regions and the density is the only distinctive feature. It is not expected that the density of the beta segment is influenced by small fields, which reinstate the quasineutrality in the plasma. Therefore, the density of the beta segment was set to a constant value. \xtable{tb}{Chapter6_Results/electron_density.tex}{Density of spectral regions for the density comparison simulations.}{The density of the the thermal region $n_e^\text{th}$ was changed and the density of the transitional region $n_e^\text{tr}$ was scaled through a constant factor. The denstiy of beta electrons $n_e^\beta$ was kept constant.} The drift velocity was determined from the simulated current of the \acs{karl} simulations and the density of the corresponding segment. The current was not adjusted even though the density changed in the simulations. This is motivated by the assumption that the number of particles which are created in the source does not significantly increase, when assuming fields which retain quasineutrality, and that the particles are still mostly absorbed by the rear wall. The specific values of the drift velocity can be found in table~\ref{tab:Chapter6_Results/electron_density_drift_velocity.tex}. It is apparent, that the drift velocity scales inversely with the density. Only the drift velocity of the beta region is kept constant because the density was also kept constant. \xtable{tb}{Chapter6_Results/electron_density_drift_velocity.tex}{Drift velocity for the density comparison simulations.}{The drift velocities of the regions was calculated through equation~\ref{eq:acronym:drift_velocity} from fixed currents, see table~\ref{tab:Chapter6_Results/energy_distribution.tex}, and the corresponding densities, see table~\ref{tab:Chapter6_Results/electron_density.tex}. } \paragraph{Results} The three simulations with different electron densities were performed for five plasma time scales and the electromagnetic fields, currents and particle distributions were recorded. Similar to the simulations of the different electron spectra, it is expected that the largest difference between the simulations can be found in the electric field along the central axis of the cylinder. The recorded electric field values were transformed into an electrostatic potential. A section of the electric field $E_z$ and electrostatic potential in the center of the tube of the three different simulations can be found in figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonDensity/potential_comparison_density.pdf}. It can be seen, that the general shape of the potential coincides with the simulations with variable spectrum. For a detailed description of the shape please refer to the previous section~\ref{ssec:pic_at_katrin:rearwall_section:dndE}. From this point forward, only the differences between the three simulations of variable density are analyzed. First, the differences towards the increased density will be discussed. Secondly, the difference of the reduced density will be investigated. \xfigure{tb}{1.}{Chapter6_Results/RearwallSection/ComparisonDensity/potential_comparison_density.pdf}{Potential and electric field for varied electron densities.}{Potential and electric field are evaluated along the longitudinal axis of the cylinder in a simulation with a background magnetic field of $B = \SI{2.5}{T}$ and a background ion current of $j_i = \SI{0.73}{\nano\ampere\per\centi\metre\squared}$. Three different densities scenarios are compared. (standard): values assumed from quasineutrality, (reduced): electron density directly from \acs{karl} results, (increased): electron densiy similar to the density in the center of the source.} The potential of the simulation with increased density shows larger values than the "standard" simulation. This is evident in an increase of the height of the negative potential wall, the positive potential wall, and also in the height of the potential in the relaxation region. The features of the potential are located at the same position. The origin of this behavior is unknown. Nevertheless, conclusions can be drawn about the plasma, which will be described in the following. In a classical Debye sheath, it would be expected that the depth of the potential barrier is given only by the temperature of the electrons, and that it is independent of the density of the electrons. The simulations show a different behavior. Here the density has an influence on the depth. This is not concerning because, the presented simulation setup differs significantly from the classical Debye sheath, due to the magnetic field and the additional non-thermal part of the spectrum. This also means that additional processes than classical Debye shielding are at work. This assumption is underlined by the observation that the position of the features did not change between the simulations, even though the Debye length changed. The electron density of the beta region is kept constant in all three simulations. In the case of the increased density, it would be expected that the influence of the high-energy electrons is reduced, because their relative density is reduced. Thus, the beta electrons cannot be responsible for the increased potential. This assumption is underlined by the simulations of section~\ref{ssec:pic_at_katrin:rearwall_section:dndE}. It was observed there too, that the beta region has only a minor influence on the development of the potential. The value of current of the three spectral regions is kept constant between the simulations. If the current would dominate the height of the potential wall, it would be expected that the height will stay the same between the simulations. This is not observed in the simulations. In contrast to that assumption, the potential shows even larger values. Thus, other processes must determine the potential height than the current alone. The height of the potential barrier exceeds the thermal energy of $\SI{6.9}{meV}$ and reaches values up to $U \approx \SI{20}{meV}$ in the simulation with increased density. This is remarkable in two ways. First, the test simulations with a thermal electron distribution in a non-magnetized plasma, see section~\ref{ssec:acronym:validation:boundary_layer_development}, showed a lower potential difference than the thermal energy. The additional ion current of this simulation should further reduce the potential wall, as it was observed in the simulation with the thermal part of the spectrum only, see figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonElectronDistribution/potential_comparison_electron_distribution.pdf}. However, an increase over the thermal energy of the potential difference is observed. This indicates that there is a correlation between the potential difference at the boundary and the electron density. Hence, it is of importance to set limits on the electron density as accurately as possible, as well as on the electron spectrum. Second, the observed potential drop is higher than the simulated potential drop of \citet{PhDKuckert2016} ($\Delta U \approx \SI{12}{meV}$). This shows that there is a not unlikely configuration of plasma parameters, where the potential variation is larger than predicted by the previous plasma model. Especially, when considering the uncertainty on the electron density by the \acs{karl} simulation. The simulation with reduced density shows an increase of the height of the negative potential wall. The height of the other features, the small positive potential wall and the relaxation region, are reduced. It seems, that this result contradicts the results of the increased density. However, the results can be interpreted through an evaluation of the additional kinetic energy, which is added through the additive drift velocity in the simulation with reduced density. For the thermal electrons, the drift velocity corresponds to $E_D \approx \SI{3.7}{meV}$ and for the transitional electrons of $E_D \approx \SI{410}{meV}$. Thus, the additional energy is comparable to the initial energy of the particles and the spectrum is shifted significantly to higher energies. Therefore, a higher potential barrier is necessary to compensate for the electrons leaving the source. It stands to reason, that this mechanism is responsible for the increased potential and not the density itself. It is however difficult to evaluate this effect detached from others, and further simulations would be necessary. Nevertheless, the results show, that a precise knowledge of the density and velocity distribution of the electrons is necessary. In total, it can be concluded that a knowledge of the full relative spectrum does not suffice for a description of the plasma. The absolute density values of the spectral regions, as well as the correct drift velocities, play an important role in the development of the potential in front of the rear wall. Again, it was observed that the influence of the rear wall boundary is not only visible a few Debye lengths in front of the rear wall, but reaches well into the bulk of the plasma. The potential shows values comparable to the thermal energy of the particles, but can also show higher values. \subsection{Background Current Value} \label{ssec:pic_at_katrin:rearwall_section:curret} The simulated ion and electron current of the \acs{karl} simulation provide a first insight in the current, which hits the rear wall. In the simulation, the total ion current is approximately $I_z \approx \SI{50}{nA}$. Measurements show that the total current at the rear wall ranges from $I_z \approx $ \SIrange{-30}{250}{\nano\ampere} at different rear wall potentials \citep{PhDFriedel2020}. Thus, it is apparent to investigate the influence of the current on the plasma. Three different scenarios are tested \begin{itemize} \item a scenario, where the ion current is given by the \acs{karl} simulation \item a scenario, where the ion current is increased by a factor of 10 \item a scenario, where the ion current is set to zero \end{itemize} The setup of the simulation is analogue to the simulations with the full spectrum of section~\ref{ssec:pic_at_katrin:rearwall_section:dndE}. Only the background current value was adapted. \paragraph{Results} The three simulations with different background current values were performed for five plasma time scales and the electromagnetic fields, currents and particle distributions were recorded. Again, it is expected that the largest difference between the simulations can be found in the electric field along the central axis of the cylinder. The recorded electric field values were transformed into an electrostatic potential. A section of the electric field $E_z$ and electrostatic potential in the center of the tube of the three different simulations can be found in figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonIonCurrent/potential_comparison_current_amplitude_SI.pdf}. It can be seen, that the background current can have a significant influence on the absolute scale of the potential, as well as on the overall shape of the potential. The specific influence will be discussed in the following. Similar, to section~\ref{ssec:pic_at_katrin:rearwall_section:dndE} heuristic arguments will be presented to provide an explanation of the features. However, it is self-evident that the processes in the plasma are more intricate. The discussion is divided into two parts. At first, it will be investigated how the reduction of the background current influences the plasma. Secondly, it will be explained how an increased ion current shapes the potential. \xfigure{tb}{1.}{Chapter6_Results/RearwallSection/ComparisonIonCurrent/potential_comparison_current_amplitude_SI.pdf}{Potential and electric field for varied current amplitudes.}{Potential and electric field are evaluated along the longitudinal axis of the cylinder in a simulation with a background magnetic field of $B = \SI{2.5}{T}$. Electron densities and drift velocities are taken from table~\ref{tab:Chapter6_Results/energy_distribution.tex}. The background ion current was set to the specified homogeneous value $j_\text{bg}$ throughout the simulation domain.} It can be observed that the negative potential wall in front of the rear wall increases, when the ion current is reduced to zero. Similarly, the potential increases at the inlet of the rear wall region. This behavior is best described through the space charge of electrons and ions. Similar to before, the argumentation hinges on the different speeds of electrons and ions. Electrons reach the rear wall faster. Therefore, a positive space charge builds up in front of the rear wall. A negative potential barrier is generated, to prevent an increasing positive charge buildup. The height of the barrier depends on the number of ions, which reach the rear wall. Thus, if the ion current is lowered, then the height of the potential increases, to reduce the electron current in the same manner. This behavior is also observed in the simulated potential data. Similarly, at the injection site, the incoming electron flux is reduced to match the incoming ion current. The shape of the potential flips, when increasing the background ion current. This behavior can also be explained through space charges. In this case, the ion current is set to larger values than the electron current. Thus, a negative space charge region builds up in front of the rear wall, which reduces the outgoing ion current and increases the electron current. Therefore, there is a positive potential wall observed in the data. Similarly, the potential wall in front of the inlet flips to the negative values. Again, the large ion current drags electrons towards the simulation domain to counter the higher ion current. It is remarkable, that there is no small negative barrier directly in front of the rear wall in the simulation with increased ion current compared to the small positive barrier in other two simulations. In the two previous sections, the existence of this barrier was attributed to the fixed ion current, which cannot react to the change of the potential. In the case of a higher ion current, the potential is already at positive values, which does not need to be compensated. Thus, the simulation results with increased ion current further encourage the explanation attempts of the previous sections. Nevertheless, further investigations will be necessary, to investigate the double structure of the potential. One of these investigations can be found in section~\ref{ssec:pic_at_katrin:rearwall_section:curret_particles}, where the movement of the ions is directly simulated. In total, it can be concluded that the value of the background current can have an influence on the development of the potential in front of the rear wall, depending on the scale of the value. On the one hand, if the value of the current is below the value from the \acs{karl} simulation, then the influence is less pronounced. On the other hand, if the value is above the simulated value, then huge differences are to be expected. \subsection{Radial Dependent Background Current} \label{ssec:pic_at_katrin:rearwall_section:curret_radial} The \acs{acronym} code produces three-dimensional data of the electric field and the potential. In the previous sections, the analysis was focused on the one dimensional data along the central longitudinal axis of the cylinder. This procedure was employed because of the strong longitudinal bias produced by the strong magnetic background field. This way, the observed parameter space was reduced, and simple comparisons of the settings were possible. In this section however, the focus lies on the radial structure of the potential and its implications. Additionally, in the previous simulations, it was assumed that the background ion current is homogeneously distributed throughout the source. Simulations with \acs{karl} show that the ion current has a radial structure, see section~\ref{sssec:karl:field_free_simulation:external_parameters:magnetic}. Therefore, in this section the influence of radial ion current will be also investigated. %The \acs{karl} simulations also show, that the ion density is depdent on the radius, while the electron density is allmost independent on the radius. Because, ions are only integrated so far in the simulation through their contribution to the overall current, a distinction between radially resolved ion current and ion density is obsolete. Two different simulations are compared here: a simulation with the standard settings of section~\ref{ssec:pic_at_katrin:rearwall_section:dndE} and the full electron spectrum of table~\ref{tab:Chapter6_Results/energy_distribution.tex}, and a simulation with the same settings, except that the background ion current has a radial structure. The radial structure was chosen to be a linear function, which decreases from the maximum value in the center towards the beam tube walls. This specific structure was chosen over the direct use of the data from the \acs{karl} simulations, because the simulated radial structure of the current is almost negligible at the rear wall. \paragraph{Results} The two simulations with different background current shape were performed for five plasma time scales and the electromagnetic fields, currents and particle distributions were recorded. The recorded electric field values were transformed into an electrostatic potential. The discussion of the results will be separated into two parts. First, the general two-dimensional structure of the potential will be discussed at the example of the simulation without radial current structure. Second, both simulations are compared in detail. \xfigure{tb}{1.}{Chapter6_Results/RearwallSection/ComparisonIonCurrent/potential_thesis_bigger.pdf}{Two dimensional potential distribution.}{The potential was evaluated after five plasma time scales. The background magnetic field was set to $B = \SI{2.5}{T}$. Electron densities and drift velocities are taken from table~\ref{tab:Chapter6_Results/energy_distribution.tex} (full spectrum). The background ion current was set to a fixed value of $j_\text{bg} \approx \SI{0.73}{\nano\ampere\per\centi\metre\squared}$ throughout the simulation domain.} The two-dimensional structure of the potential for the simulation with the standard settings can be found in figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonIonCurrent/potential_thesis_bigger.pdf}. It can be seen that there is a radial structure of the potential. This radial structure is the most prominent close to the rear wall and at the inlet region. It manifests as a reduction of the potential towards the beam tube wall. In the center of the simulation domain, there is no radial structure discernible (in this form of representation). The specific origin of the radial shape is ambitious to estimate and is therefore not tried here. It can be assumed that there is a unique interaction between the strongly bound movement of the electrons with the electric field and grounded boundaries. The shape of the potential in front of the rear wall reminds of the shape of the potential in an empty source with a rear wall with negative potential, see figure~\ref{fig:Chapter2_KATRIN/ElectricBackgroundField/potential_Er_Ez_combined.pdf}. There, the potential of the beam tube dominates the potential in the source, except in the rear wall region. Nevertheless, a closer look at the potential reveals that there are unique features of the potential, not least the reduction of the potential towards zero at the last few centimeters in front of the rear wall, and the small positive potential wall, which were not present in the empty source. In total, the two-dimensional plot shows, that there is a strong radial structure of the potential, even though the density and current of electrons and ions is distributed homogeneously. This radial structure is significantly different from the plasma simulations without magnetic field, see section~\ref{ssec:acronym:validation:boundary_layer_development}, because of the strong confinement of the movement by the magnetic field. In the future, this radial distribution of the potential can be used, to provide more precise estimations on the charged particle currents and densities by the \acs{karl} simulations. %Thus, the differences between the simulations are difficult to graps in two dimensional plots of the potential. Therefore, a comparison of the resulting potential along the longitudinal axis of the cylinder and along three lines in radial direction can be found in figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonIonCurrent/current_radial_thesis.pdf}. %Nevertheless, the overall structure of the potential of the standard simulation can also be found in figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonIonCurrent/potential_thesis_bigger.pdf} as a two dimensional plot. Up to this point, the ion current was set to a fixed value throughout the simulation domain. The results of section~\ref{ssec:pic_at_katrin:rearwall_section:curret} suggest that there is a dependency of the potential in respect to the absolute value of the current. In the following, it will therefore be investigated how a radially dependent current influences the solution. The differences between the two simulations (with and without radial dependent ion current) are difficult to grasp in two-dimensional plots of the potential. Therefore, a comparison of the potentials along the longitudinal axis of the cylinder, and along three lines in radial direction can be found in figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonIonCurrent/current_radial_thesis.pdf}. It can be seen that the overall shape of the potential does not change significantly between the simulations. Especially, the longitudinal values of the potential agree well with each other. The similarity of the longitudinal potential suggests, that the background current only influences the potential in the near vicinity and does not exert long-range effects. \xfigure{h!}{1.}{Chapter6_Results/RearwallSection/ComparisonIonCurrent/current_radial_thesis.pdf}{Potential comparison for radially linear decreasing and constant background current.}{The potential was evaluated after five plasma time scales. It is displayed for a longitudinal axis along the center of the cylinder, and in radial direction at three different longitudinal positions in the source. The longitudinal positions are marked in the longitudinal plot through vertical lines $Z_i$. The background magnetic field was set to $B = \SI{2.5}{T}$. Electron densities and drift velocities are taken from table~\ref{tab:Chapter6_Results/energy_distribution.tex} (full spectrum). Constant: simulation with fixed background ion current throughout the source ($j_\text{bg} \approx \SI{0.73}{\nano\ampere\per\centi\metre\squared}$). Linear: simulation with radially linearly decreasing background current from a maximum value of $j_\text{bg} \approx \SI{0.73}{\nano\ampere\per\centi\metre\squared}$ towards zero.} \newpage In radial direction there are minor differences visible. These differences are most prominent at the negative potential wall. Here, the potential of the simulation with the radially dependent background current shows slightly lower values than the simulation with fixed current. Heuristically, this behavior can be explained by the velocity differences between electrons and ions. Following the argumentation of section~\ref{ssec:pic_at_katrin:rearwall_section:dndE} the potential is a consequence of initially different electron and ion currents towards the rear wall. Thus, in the simulation with radial dependent current, a larger potential is necessary to maintain an equilibrium between electron and ion current. The differences of the potential between both simulations decreases towards larger radii. This is caused by the adherence of the potential at the grounded beam tube walls, where both simulations must show the same zero potential value. \newpage There are also differences in the potential discernible at the last centimeters in front of the rear wall. Here, the height of the positive potential wall is lower in the simulation with radially dependent background current than for the simulation with fixed background. The difference of the potentials is more pronounced the larger the radius. In the previous two sections, the existence of the positive potential wall was attributed towards the artificially high value of the ion background current. This hypothesis is supported by the current observations. In the simulation with radially dependent background current, the potential wall is less pronounced at larger radii, where also the background current value has lower values. In the simulation with fixed background current, the background current is higher at larger radii. Thus, also the positive potential wall is higher. In total, it can be concluded that the potential is significantly radially dependent. This dependency manifests mostly at the negative potential wall, but it is also present at the small positive potential wall. The comparison of the simulation with radially dependent background current with the simulation with fixed background current showed that the radial dependency of the current has only a minor influence on the potential. However, this conclusion is only valid for a maximum background current value of \SI{0.73}{\nano\ampere\per\centi\metre\squared}. The simulations of section~\ref{ssec:pic_at_katrin:rearwall_section:curret} showed that the absolute value of the current has a significant influence on the solution. It is therefore likely that a radially dependent current which covers a large range of values also shows a significant influence in radial direction. \subsection{Potential at Large Time Scales} \label{ssec:pic_at_katrin:rearwall_section:curret_particles} So far, the potential was analyzed on time scales of the electron movement. The results from the previous sections indicate that the ion movement is significantly influenced by the potential generated by the electrons. This is especially the case close to the rear wall, where the boundary effects are the strongest. Until now, the motion of the ions inside the plasma was reduced to their contribution towards the current. It is apparent that this approximation is only valid for short time scales. At higher time scales, it is necessary to simulate the movement of the ions directly. In this section, it will be therefore investigated how the movement of ions influences the solution. The investigation was subdivided into two parts. At first, two simulations were compared at small time scales, one simulation with background current and one simulation with ion macro particles. In the second part, the simulation with ion macro particles was extended to larger time scales. Ions move much slower than electrons of equal temperature. Thus, the dynamics of the plasma is governed on small time scales by the movement of electrons. In the \acs{acronym} simulations it is not feasible to resolve the true motion of ions due to the necessary computational resources, see section~\ref{sec:pic_at_katrin:computational_resources}. The hindering factor is the large discrepancy between the mass of the electrons and the mass of the ions. In some plasma simulations \citep{Schreiner.2017}, this issue is resolved by artificially reducing the ion mass towards a more manageable level. In the following, the mass of the ion is given relative to the mass of the electron through the mass factor $f_m$. In order to maintain the dynamics of the plasma, it is important that the ion mass is still much larger than the electron mass. A good starting point of the simulations is a mass factor of \begin{equation} f_m \approx \sqrt{m_i/m_e} \comma \end{equation} where $m_i$ is the mass of the ion. In the case of a single tritium ion, the factor is approximately \num{74}. Nevertheless, also smaller factors were tested in the context of this thesis, down to values of $f_m \approx \num{21}$. No significant differences in the solutions were found. The results presented below were calculated with a factor of $f_m \approx \num{74}$. In the first part of the analysis, two simulations were compared, one simulation with background current and one simulation with ion macro particles. The setup of the simulation with background current was equal to the setup of section~\ref{ssec:pic_at_katrin:rearwall_section:dndE} with the full electron spectrum. The corresponding settings can be found in table~\ref{tab:Chapter6_Results/energy_distribution.tex}. In the simulation with ion macro particles, the background current was set to zero, and the current was directly represented by ion macro particles. They were initialized with the same density and number of particles per cell as the thermal electrons ($n_i = \SI{1E5}{cm^{-3}}$, $\text{ppc} = 20$). The velocity distribution of the ion particles were chosen to be a Maxwell-Boltzmann distribution with an additive drift velocity. The drift velocity was calculated from the value of the fixed background current through equation~\ref{eq:acronym:drift_velocity}. The corresponding electric field and potential of both simulations after 5 plasma time scales along the central axis of the cylinder can be found in figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonIonCurrent/potential_current_type.pdf}. It can be seen, that both simulations produce similar results. The difference of the fluctuations can be attributed to the additional noise generated by the ion particles. The similarity of both simulations is not surprising, because the setup of the simulations is similar to the validation simulations of section~\ref{ssec:acronym:validation:background_current}. In the test simulations too, both simulations with and without simulated ions agreed well with each other. Nevertheless, the simulations at hand showed, that the background current approximation is valid for short time scales even with additional boundaries. Additionally, they provide a common starting point of the following investigations of the potential at higher time scales. \xfigure{tb}{1.}{Chapter6_Results/RearwallSection/ComparisonIonCurrent/potential_current_type.pdf}{Potential and electric field for two implementation of the ion current.}{Potential and electric field are evaluated along the longitudinal axis of the cylinder in a simulation with a background magnetic field of $B = \SI{2.5}{T}$ and a ion particle current of $j_i \approx \SI{0.73}{\nano\ampere\per\centi\metre\squared}$ after five plasma time scales. Two different implementations were tested. Background: the ion current is implemented as a fixed background, which is added to the total current. Particles: ions are simulated directly with an additive velocity, which corresponds to the given background current.} \xfigure{tb}{1.}{Chapter6_Results/RearwallSection/ComparisonIonCurrent/comparison_potential_vs_t_1d.pdf}{Temporal evolution of the potential.}{Potential and electric field are evaluated along the longitudinal axis of the cylinder in a simulation with an background magnetic field of $B = \SI{2.5}{T}$ and a ion current of $j_i \approx \SI{0.73}{\nano\ampere\per\centi\metre\squared}$ produced by simulated ions. The potential is evaluated at three different times.} \xfigure{tb}{1.}{Chapter6_Results/RearwallSection/ComparisonIonCurrent/potential_2d_thesis.png}{Radial distribution of potential at large time scales.}{The potential was evaluated at \num{45} plasma time scales for a simulation with a background magnetic field of $B = \SI{2.5}{T}$ and a ion current of $j_i \approx \SI{0.73}{\nano\ampere\per\centi\metre\squared}$ produced by simulated ions.} In a second step, it was tested, how the evolution of the potential changes at larger time scales. This test was performed with the same settings as the simulation before, where ion macro particles were used. In this simulation, the generated potential of the electrons can now influence the motion of the ions, which changes the current generated by the ions. For the ion mass factor of $f_m \approx 74$, the ion plasma frequency calculates to $\omega_\text{pi} \approx 8.6 \,\omega_\text{pe}$. Simulations with a time scale larger than the ion time scale should show some effects generated by the ions. The corresponding potential distribution for three different time scales is depicted in figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonIonCurrent/comparison_potential_vs_t_1d.pdf}. It can be seen, that the potential changes significantly over time, and is evidently different from the potential at small time scales, see figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonIonCurrent/potential_current_type.pdf}. The change of the potential can be noticed as an extension of the negative potential wall in direction of the center, as a development of an additional substructure of the potential wall, and as an extension of the positive potential wall at the inlet of the simulation. The origin of these features is not fully understood yet. The simulations show that the potential is not static on large time scales for this specific set of initial conditions. This behavior can be explained by three different hypotheses. Firstly, the simulation did only reach a quasi-equilibrium state, and the system progresses to the equilibrium state over long term effects. This indicates that the initial parameters of the simulation are significantly different from the real values. The potential mutation is therefore a product of a compensation of these faulty initial conditions. Thus, better initial conditions would have to be found. Secondly, the simulation domain is too small to resolve the true behavior of the plasma. At large enough time scales, the negative potential will stretch over the whole source with an additional substructure, and the positive potential wall is only a relic of the injection of electrons. Thirdly, there is no static potential to be found at the rear wall, and the potential fluctuates on the time scale of the ion plasma frequency. There might be plasma instabilities linked to this behavior. All three hypotheses are viable explanations, and only more elaborate simulations can provide an answer to their applicability. Nevertheless, it is possible to derive other conclusions from the simulation result. \begin{itemize} \item It is noticeable, that the simulated potential of the rear wall extends well into the source. Thus, it can be assumed that the potential of the rear wall also extends well into the source in the experiment. It is up to future simulations to investigate this behavior for different rear wall potentials. These results can then be compared to the results of Kuckert \citep{PhDKuckert2016}, who predicts a dominant role of the rear wall potential on the overall source potential. However, a complete comparison will be difficult, due to the different assumption of the plasma state. Nevertheless, comparisons with measurement data might be possible, where also a dominant role of the rear wall potential was observed, see section~\ref{ssec:pro_katrin_measurements}. \item The overall potential is on the order of the thermal energy $E_\text{th} \approx \SI{6.8}{eV}$. However, this result might change, when using different values of the electron density, compare section~\ref{ssec:pic_at_katrin:rearwall_section:density}. Additionally, it was observed in the test simulations, see section~\ref{ssec:acronym:validation:boundary_layer_development}, that the simulation underestimates the potential towards the boundary. Thus, larger values are expected in reality. \item The variation of the potential inside the negative potential wall is smaller than the thermal energy of the particles. The origin of these features is still unknown. \item The positive potential wall directly in front of the rear wall is increasing over time. The origin of the potential wall was attributed so far to the ion background current. If this assumption is valid, then it is most likely that the simulation is not in an equilibrium state. Thus, even longer simulations would be necessary. \item There is still a large radial dependency of the potential to be found, see figure~\ref{fig:Chapter6_Results/RearwallSection/ComparisonIonCurrent/potential_2d_thesis.png}. The absolute value of the potential decreases towards the beam tube wall. This is the case for the positive as well as for the negative potential values. Thus, the evaluation of the mean longitudinal potential and potential variation is very complex and needs special treatment. \end{itemize} In total, it can be concluded that the simulations with an ion background can be used to describe the plasma at small time scales. At larger time scales, the motion of the ions is changed and produces additional features to the potential. However, this observation paired with the long measurement time at the \acs{katrin} experiment does not necessarily result in the conclusion, that only simulations with ions should be performed. It depends on the specific circumstances. On the one hand, ions collide frequently in the center of the source. Thus, collisions must be taken into account (by the \acs{karl} simulations), which are not reflected in the \acs{acronym} simulations. On the other hand, ions collide infrequently in the rear wall region, which is why they can also be simulated by \acs{acronym}. In summary, the intricate relationship between a non-collisional and partly collisional is currently under investigation in the two-part simulation approach with \acs{acronym} and \acs{karl}. Furthermore, it can be of scientific interest to study the dynamic of electrons detached from ions, in which case computational resources can be saved through the use of the ion background current. \section{Central Section} \label{sec:pic_at_katrin:central_section} In the context of this thesis, a central section is called a section of the beam tube, which is located in the center of the source. It is used to investigate the evolution of the plasma without the influence of the longitudinal boundary of the rear wall. The simulation domain consists of a cylindrical tube with two open ends, where periodic boundary conditions are applied, see also figure~\ref{fig:Chapter6_Results/CentralSection/central_section_sketch.pdf}. Hence, it is assumed that the plasma inside the simulation domain has the same properties as the plasma outside, see also section~\ref{ssec:acronym:boundaries:periodic}. Naturally, this is only the case for small conjoined parts of the source tube because of the massive neutral gas gradient. Nevertheless, it will be used in the following as a first approximation, due to the simplicity of the boundary algorithm, and due to the assumption of a collisionless plasma (in the \acs{acronym} simulations). The use of the periodic boundary condition also means that the injection of particles from the bulk of the plasma can be omitted. This way, less attention has to be paid to the boundary condition itself and the focus can be directed towards the temporal evolution of the particles. \xfigure{tb}{1.}{Chapter6_Results/CentralSection/central_section_sketch.pdf}{Simulation setup for the central section.}{The geometry is approximated as an cylinder with two open ends. The boundary conditions of these ends were chosen to a periodic boundary. Particles are injected initially in the volume only.} \paragraph{Background Current} The current of ions and electrons is a vital parameter for the simulation. This could already be shown in the validation simulations, see section~\ref{ssec:acronym:validation:background_current}, but also in the simulations of the rear wall section, see section~\ref{ssec:pic_at_katrin:rearwall_section:curret}. However, the simulations did also show, that a current value below $j_\text{bg} \approx \SI{0.73}{\nano\ampere\per\centi\metre\squared}$ has no significant influence on the potential in the rear wall region. The ion current in the center of the source is lower than the current at the rear wall, see also figure~\ref{fig:Chapter4_KARL/ZeroElectricFieldCase/Iz_vs_z.pdf}. Hence, at first it was investigated how and if a background current influences the electric field in the central section. For that reason, two simulations were performed, one simulation with a background current and one simulation without background current. The current value was set to a quarter of the maximal value at the rear wall ($j_\text{bg} \approx \SI{0.16}{\nano\ampere\per\centi\metre\squared}$), to address the reduction of the current in the central section. The electrons were initialized with the spectrum calculated from \acs{karl} in the center of the source. The maximal electron density was set to $n_e \approx \SI{5.7}{cm^{-3}}$. The spectrum was dissected into three parts, similar to table~\ref{tab:Chapter6_Results/energy_distribution.tex}, but with $n_\text{th} \approx \SI{5.7E5}{cm^{-3}}$, $n_\text{tr} \approx \SI{4.2}{cm^{-3}}$, and $n_\beta \approx \SI{0.34}{cm^{-3}}$. For simplicity, the bulk velocity of the electrons was set to zero. The potential and electric field of both simulations after two plasma time scales can be found in figure~\ref{fig:Chapter6_Results/CentralSection/comparison_potential_1d.pdf}. It can be seen that the potential and electric field of both simulations fluctuates around zero. The fluctuations of the electric field are larger than in simulation of the plasma in front of the rear wall, see section~\ref{ssec:pic_at_katrin:rearwall_section:dndE} for example. The field values are even larger than the field values directly in front of the rear wall. However, the potential shows values significantly below the thermal energy of the particles, and values below the potential at the rear wall boundary. Thus, no large scale fluctuations of the electric field are observed in the data. It can also be seen that the electric field in the simulation with and without background current shows no significant differences. It must be therefore be concluded that the background current does not play a vital role in the development of the electric field at short time scales. Thus, the results of the simulations of the central section follow the same trend as before, that a small background current can be neglected. \xfigure{tb}{1.}{Chapter6_Results/CentralSection/comparison_potential_1d.pdf}{Potential and electric field for simulations of the central section with and without background ion current.}{The background current of the ions is set to $j_\text{bg} \approx \SI{0.16}{\nano\ampere\per\centi\metre\squared}$ for the simulation with background current. The electron density was set to $n_e \approx \SI{5.7E5}{cm^{-3}}$ and the full spectrum of the \acs{karl} simulations used. The magnetic background field was set to $B = \SI{2.5}{T}$.} \paragraph{Spatial and Temporal Electric Field Distribution} The one dimensional data of electric field and potential seems to fluctuate randomly. This assumption is contradicted qualitatively by a look at the two-dimensional data. In figure~\ref{fig:Chapter6_Results/CentralSection/E2_2d_with_current.png} and figure~\ref{fig:Chapter6_Results/CentralSection/potential_2d_with_current.pdf}, the electric field and potential of the simulation with background current is shown in radial and longitudinal direction. It can be observed that there is a spatial substructure to the potential and the electric field. The size of the substructure features are in longitudinal, as well as in radial direction, on the order of a few millimeters. A more precise assessment of the substructures can be provided by the evaluation of the electric field in relation to the wavenumber $k$ and the frequency $\omega$, also called spectral analysis. This evaluation also opens the possibility to investigate plasma waves and plasma instabilities in the source. \xfigure{tb}{1.}{Chapter6_Results/CentralSection/E2_2d_with_current.png}{Central longitudinal and radial cut of the longitudinal electric field.}{The simulation was performed with ion background current and full electron spectrum. The magnetic background field was set to $B = \SI{2.5}{T}$. Left: cut through the cylinder at the center of the segment. Right: section of the simulated field, cut along the y-axis in the center of the cylinder. Only a fraction of the simulation domain is shown to preserve the aspect ratio.} \xfigure{tb}{1.}{Chapter6_Results/CentralSection/potential_2d_with_current.pdf}{Central longitudial cut of the potential.}{The simulation was performed with ion background current and full electron spectrum. The magnetic background field was set to $B = \SI{2.5}{T}$. Only a fraction of the simulation domain is shown to preserve the aspect ratio.} The spectral analysis of the field was performed similar to Kilian~\citep{Kilian.2015}. It can be summarized in two steps: first, the electric field data is recorded at different timesteps, second, the field data is Fourier transformed to gain a representation in dependence of the wavenumber and frequency. In the context of this thesis, the electric field was collected at multiple timesteps along a specified axis. Contrary to Kilian, the values were not collected as a mean of the field values in perpendicular direction, but used directly from a parallel line to the specified axis. This procedure was chosen, because of the additional cylindrical structure of the simulation domain. Nevertheless, tests could show that this approach produces similar results to Kilian. Similar to Kilian, the field values of each output timestep were stacked to a two-dimensional array. A Fourier analysis was performed in two dimensions, which converted the electric field component in one direction $E_i(z,t)$ towards the spectral field component $\tilde{E}_i(k_z, \omega)$. A Hanning window was applied to reduce spectral leakage. The Fourier transformation can produce imaginary results. Thus, only the absolute value of the Fourier transform was used in the results below. The spectral analysis was applied to a simulation of the central section. The simulation was carried out with the same setup as in the previous paragraph for \num{12} plasma time scales, but the ions and their current were represented directly through macro particles. This change was motivated through the simulation results of section~\ref{ssec:pic_at_katrin:rearwall_section:curret_particles}. They showed, that the movement of the ions is important in the description of the plasma and becomes relevant for larger time scales. The use of ion macro particles did not change the observed structure of figures~\ref{fig:Chapter6_Results/CentralSection/E2_2d_with_current.png} and \ref{fig:Chapter6_Results/CentralSection/potential_2d_with_current.pdf}, but ensures more precise simulation results on longer time scales. This is especially important for the spectral analysis of the field at low frequencies. \xfigure{tb}{1.}{Chapter6_Results/CentralSection/dispersion_Ez_line_3_to_4_omega_pe_thesis_2.png}{Spectral analysis of longitudinal electric field at small times.}{The simulation was performed with ion particles as background and a full electron spectrum at a density of $n_e \approx \SI{5.7E5}{cm^{-3}}$. The analyis was performed for the timesteps between \num{3} and \num{4} plasma time scales, with a selection on the temporal step size of $\Delta t \approx \SI{6.8E-10}{s}$.} The spectral analysis was applied to three time windows, motivated in the following and discussed thereafter. \begin{itemize} \item \num{3} to \num{4} plasma time scales (figure~\ref{fig:Chapter6_Results/CentralSection/dispersion_Ez_line_3_to_4_omega_pe_thesis_2.png}): The total energy of the electric fields has reached a constant value over time. \item \num{11} to \num{12} plasma time scales (figure~\ref{fig:Chapter6_Results/CentralSection/dispersion_Ez_line_11_to_12_omega_pe_thesis_2.png}): The simulations of the rear wall sections showed that the electric field changes its shape after a longer time scale, see section~\ref{ssec:pic_at_katrin:rearwall_section:curret_particles}. \item \num{3} to \num{12} plasma time scales (figure~\ref{fig:Chapter6_Results/CentralSection/dispersion_Ez_line_3_to_12_omega_pe_thesis_low_freq.png}): The lowest frequency of the analysis is given by the length of the window. Thus, the analysis is stretched over the whole available time window, excluding the stabilization window. \end{itemize} The results of the spectral analysis for timesteps between \num{3} and \num{4} plasma time scales, see figure~\ref{fig:Chapter6_Results/CentralSection/dispersion_Ez_line_3_to_4_omega_pe_thesis_2.png}, show that most of the energy of the electric field is contained in oscillations with frequencies at or below the plasma frequency. No plasma mode structure with high frequency is discernible. In other words, the longitudinal electric field does not show a distinct dispersion relation for a plasma mode. This does not mean, that there are no plasma modes, but that this simulation could not resolve the modes because of the limited resolution. The region of small wavenumbers was found to be void of significant amounts of energy. The window of low energy is larger for higher frequencies than for lower frequencies. This means, that there are no large-scale fluctuations observed with frequencies well above the plasma frequency. Most of the energy of the electric field resides in the region of low frequencies, with structure sizes below approximately \num{10} Debye length. This observation is underlined by the 2D representation of the electric field in figure~\ref{fig:Chapter6_Results/CentralSection/E2_2d_with_current.png}, where also small structures of a few Debye lengths are discernible. Larger structures are not visible in the snapshot of the electric field. The origin of the fluctuations is unknown, but analyzed further in the third window between \num{3} and \num{12} plasma time scales, see below. However, long-term changes to the energy distribution will be discussed first. No significant change of the electric field distribution could be found by a direct comparison of the electric field values of the first two windows (3 to 4 and 11 to 12 plasma time scales). Therefore, the spectral analysis method was used to investigate the differences more closely. The corresponding data of timesteps between 11 and 12 plasma time scales can be found in figure~\ref{fig:Chapter6_Results/CentralSection/dispersion_Ez_line_11_to_12_omega_pe_thesis_2.png}. By comparison to figure~\ref{fig:Chapter6_Results/CentralSection/dispersion_Ez_line_3_to_4_omega_pe_thesis_2.png}, it can be seen that the spectral shape did not change significantly after a longer time. Again, most of the energy of the electric field resided in the flow frequency band over a wide range of wavenumbers. Also, a region of low energy density was found at low wavenumbers. Thus, the description from the simulation state at 3 to 4 plasma time scales can also be applied here. \xfigure{tb}{1.}{Chapter6_Results/CentralSection/dispersion_Ez_line_11_to_12_omega_pe_thesis_2.png}{Spectral analysis of longitudinal field at large times.}{The simulation was performed with ion particles as background and a full electron spectrum at a density of $n_e \approx \SI{5.7E5}{cm^{-3}}$. The analyis was performed for the timesteps between \num{11} and \num{12} plasma time scales, with a selection on the temporal step size of $\Delta t \approx \SI{6.8E-10}{s}$.} Nevertheless, it seems that an additional feature emerges in the data between the wavenumbers of $0.05 < |k_z| < 0.2$ (in units of the inverse Debye length). It manifests through an increase in the energy values over a wide range of frequencies. The origin of this additional feature is not understood yet. It is noteworthy, that this feature extends block wise over a wide range of frequencies. It is therefore unlikely that this feature is linked to one specific plasma mode. At this point, it can only be concluded that there are additional effects, which only manifests after 12 plasma time scales. However, most of the energy still resides at low frequencies, which allows for a spectral analysis at low frequencies, presented in the following. The results of the spectral analysis between \num{3} and \num{12} plasma time scales can be found in figure~\ref{fig:Chapter6_Results/CentralSection/dispersion_Ez_line_3_to_12_omega_pe_thesis_low_freq.png}. It can be seen that, even in the prolonged time window, the frequency resolution below the plasma frequency is very low, which is governed by the Nyquist-Shannon sampling theorem. Thus, conclusions on the mode structure are tenuous at best. Longer simulations would be necessary for a better resolution, but were not performed because of the constraints on the computational resources. Nevertheless, a comparison to theoretical modes will be tried here to provide an insight in the capabilities of the method. For simplicity, the modes are calculated from a fluid approach even though it was shown in section~\ref{ssec:characteristic_length_comparison} that a fluid approach is not fully applicable to the source plasma. In longitudinal propagation direction, it is expected that two plasma sound wave exist: electron sound waves and ion sound waves. They are both caused by small variations of the electron and ion density in longitudinal direction with modification by the pressure term \citep{Stroth.2011}. The dispersion relation for the electron sound wave, assuming thermalized electrons only, calculates to \begin{equation} \omega_\mathrm{se} = \sqrt{\omega_\mathrm{pe}^2 + \left(\frac{3 k_b T_e}{m_e} k \right)^2} \comma \label{eq:electron_sound_wave} \end{equation} with the electron temperature $T_e$ and electron mass $m_e$ \citep{Stroth.2011}. The electron temperature $T_e = \SI{80}{k}$ is so low that the mode frequency is nearly indistinguishable from the electron plasma frequency itself ($\omega_\mathrm{se} \approx \omega_\mathrm{pe}$). The dispersion relation is displayed in figure~\ref{fig:Chapter6_Results/CentralSection/dispersion_Ez_line_3_to_12_omega_pe_thesis_low_freq.png} for comparison with the data. It can be seen, that some fluctuations of the plasma lie in the near vicinity of the theoretical dispersion relation. In contrast to that, there is no energy visible at wavenumbers close to zero, which should be the case for electron sound waves, see equation~\ref{eq:electron_sound_wave}. This indicates that electron sound waves are not excited in the plasma. However, more precise data is necessary to verify or deny this claim. The maximum frequency for the ion sound wave is the ion plasma frequency \citep{Stroth.2011}. It is approximately a factor \num{100} lower than the electron plasma frequency. Thus, the dispersion relation of the ion sound waves almost coincides with the wavenumber axis of figure~\ref{fig:Chapter6_Results/CentralSection/dispersion_Ez_line_3_to_12_omega_pe_thesis_low_freq.png}. Nevertheless, the data suggests, that most of the energy is resides at very low frequencies. Hence, ion sound waves can be the cause of this energy deposition. If the ion sound wave should be resolved by future simulations, then the time window should be at least a factor \num{1000} bigger than the current simulation. With the current simulation setup, this target can not be reached, and new simulation methods must be found. It is noteworthy, that the region of low energy coincides with the cone spanned by the dispersion relation of a transversal electromagnetic vacuum mode $(\omega_\mathrm{vac})$, even though the spectral analysis is performed for longitudinal fields. The dispersion relation for vacuum mode acts as the maximum slope on the dispersion relation for ion sound waves (at any temperature) \citep{Stroth.2011}, and the exclusion might therefore be found in the data. However, the exclusion reaches well above the ion plasma frequency. At this point, it can be only be speculated about the origin of this feature, which is not tried here. \xfigure{tb}{1.}{Chapter6_Results/CentralSection/dispersion_Ez_line_3_to_12_omega_pe_thesis_low_freq.png}{Spectral analysis of longitudinal field at low frequenies.}{The simulation was performed with ion particles as background and a full electron spectrum at a density of $n_e \approx \SI{5.7E5}{cm^{-3}}$. The analyis was performed for the timesteps between \num{3} and \num{12} plasma time scales, with a selection on the temporal step size of $\Delta t \approx \SI{6.8E-10}{s}$. Dispersion relation for longitudinal electron sound waves ($\omega_\mathrm{se}$) and transversal vacuum oscillation ($\omega_\mathrm{vac}$) for comparison.} In total, it can be concluded that the electric field shows small-scale features with sizes of a few Debye lengths. The features are visible in radial, as well as in longitudinal direction. The field strength of the electric field in the features is comparable to the field strength at the rear wall boundary. However, the potential shows smaller variations than at the rear wall boundary. The spectral analysis of the electric field revealed that the fluctuations have frequencies near or below the plasma frequency. No specific plasma mode could be found in the data, but also no large-scale fluctuations were discernible. The spectral analysis after larger time scales showed a similar behavior than at lower time scales. However, the data also hinted at an increase of the energy at small wavenumbers over a wide range of frequencies. The spectral analysis over a longer time window revealed that most of the fluctuations have frequencies below the plasma frequency. A comparison to electron and ion sound waves was tried, but ultimately revealed that the frequency resolution is too low for a meaningful investigation. Because most of the energy resides in the lowest frequency bin, it was hypothesized that there might be a connection to ion sound waves. \section{Complete Source Section} \label{sec:pic_at_katrin:complete_source} The goal of the plasma simulations is the evaluation of the potential throughout the whole source tube. However, it is not feasible to simulate the complete source, especially not for parameter studies and large time scales, see section~\ref{sec:pic_at_katrin:computational_resources}. Therefore, in the previous sections, simulations were presented which covered only a fraction of the source tube length (rear wall section and central section). Up to this point, it is unclear how to combine both sections to a coherent source model. This shortcoming was addressed by a simulation of the whole source tube, which will be described in the following. \paragraph{Simulation Setup} The geometry of the source was approximated by a cylindrical tube with the dimensions of the \acs{katrin} source ($H = \SI{16}{m}$, $R = \SI{4.5}{cm}$). The source tube is closed off at one side by the rear wall, which was incorporated in the simulation as a \acs{pec} boundary condition. The tube is open at the other side, which was represented by a \acs{pml} boundary layer, see also figure~\ref{fig:Chapter6_Results/FullKatrinSimulation/full_katrin_sketch.pdf}. Electrons are assumed to be reflected by the potential of the spectrometers and the potential of the dipole electrodes. Thus, they are reflected in the simulation before they cross over to the \acs{pml} region and no injection of electrons at the \acs{pml} boundary was necessary. No decay injection of beta electrons and thermal electrons was used for the simulation because it was aimed for a good comparability with the simulations of the smaller sections. \xfigure{tb}{1.}{Chapter6_Results/FullKatrinSimulation/full_katrin_sketch.pdf}{Simulation setup for the complete source section.}{The geometry is approximated as a cylinder with a closed and an open end. Electrons are reflected, before they cross over to the \acs{pml} region and absorbed at the rear wall or the beam tube walls.} The initial electron distribution was adopted directly from the \acs{karl} simulation, see section~\ref{sec:karl:field_free_simulation}. Three different regions were distinguished in the simulation, a thermal region, a transitional region and a beta region. Electrons of each region were initialized with their own macro factor. The number of particles of each cell are adjusted to the position dependent density of the corresponding region. In the center, the number of particle per cell of the thermal region was set to \num{20}, and for the transitional and beta region to \num{1}. The bulk velocity of the electrons in the transitional and beta region was set to zero. The current of the ions was incorporated through a static background current. This method is justified, because the simulation could only resolve small time scales, due to computational constrains. The position dependent ion current of the \acs{karl} simulations was directly used in the simulation. \xfigure{h!}{0.95}{Chapter6_Results/FullKatrinSimulation/comparison_potential_regions_82000.png}{Longitudinal potential distribution for the complete source section.}{The potential was evaluated after four plasma time scales at the center of the source tube. Top: full view of the potential distribution. Below top: Closeup of the potential distribution marked by colorscale.} \newpage \paragraph{Results} The simulation was performed for four plasma time scales. The potential along the central axis of the cylinder can be found in figure~\ref{fig:Chapter6_Results/FullKatrinSimulation/comparison_potential_regions_82000.png}. It can be seen that the potential shows special features, which are dependent on the longitudinal position in the source. Thus, in the following the description of the potential will be separated into four parts covering a section in front of the rear wall, a section in the center of the source, a section in front of the \acs{dps}, and a section in the near vicinity of the pump fort. In all regions, the potential fluctuates on a small scale. The height of the fluctuation is dependent on the position in the source. It ranges from approximately $\SI{0.2}{meV}$ in the low density regions to approximately $\SI{1}{meV}$ in the high density region in the center. The spatial size of the fluctuations does not exceed a few Debye lengths. This observation coincides with the observation from the simulation of the central section and the rear wall section. Therefore, it can be assumed that the origin of these fluctuations is the same. In the previous analysis, it was assumed that the fluctuations can be identified by thermal fluctuations of the plasma, although no conclusive explanation could be found so far. It is noteworthy, that the height of the fluctuations scales similarly as the electron density. They are higher in regions with higher electron density than with lower density. However, also the number of particles per cell are lower in the regions with lower density. In the region close to the rear wall, the potential fluctuates around zero, and drops to lower values at the last few centimeters before the rear wall. This drop is not as distinct as in the simulations of the rear wall section, see section~\ref{sec:pic_at_katrin:rearwall_section}. Additionally, there is no double structure of a positive and negative potential wall visible. It can be hypothesized, that this behavior is of no physical origin but rather a result of the low particle resolution in the rear wall region. The number of particles in the rear wall region is at least a factor of 100 smaller than in the central region, due to the large density difference between the two regions. In the center, the number of thermal particles was set to 20. Thus, only in every 5th cell, there is a simulated thermal electron, and in only every 100th cell there is an electron of the transitional region. Therefore, fewer interactions of simulated particles with the boundary occur during the simulation time, which could produce a boundary layer. In total, it can be concluded that the boundary layer at the rear wall was not resolved in the simulation of the complete source section due to the large density gradient. This behavior was already anticipated in section~\ref{sssec:acronym:injection:inital_loading:ppc_mf} where a position dependent number of particles per cell was favored over a position dependent macro factor. Thus, future simulations of the complete source sections might use a position dependent macro factor to avoid the shortcomings of the other method. However, future simulations with \acs{karl} might also reveal that the density gradient is less pronounced due to quasineutrality and the current method can be employed. Until now, the boundary layer is best described by targeted simulation of the rear wall region and not in the simulation of the complete source. In the center of the source, the potential is similar to the potential of the simulation of the central section, see section~\ref{sec:pic_at_katrin:central_section}. The fluctuation height as well as the fluctuation size is comparable in both simulations. This observation is supported by comparing the electric field of a central slice, displayed in figure~\ref{fig:Chapter6_Results/FullKatrinSimulation/E_z_center_thesis.pdf}, and the electric field of the central section, see figure~\ref{fig:Chapter6_Results/CentralSection/E2_2d_with_current.png}. It can be seen that the radial distribution of the fluctuations, as well as the height of the fluctuations, coincide. In total, it can be assumed that the simulations of the central section can be used as a good approximation of the central section of the \acs{katrin} source. Thus, the assumption of the periodic boundary condition is valid here. \xfigure{tb}{1.}{Chapter6_Results/FullKatrinSimulation/E_z_center_thesis.pdf}{Central radial cut of the longitudinal electric field.}{The electric field was evaluated after four plasma time scales. The cut was performed in the center of the source (\SI{8}{m} distance to the rear wall).} At the \acs{dps} side of the source, a new feature emerges: a positive potential wall at the reflecting surface. Here, the potential rises from the background fluctuations around zero towards values above \SI{0.5}{meV} over a few centimeters. This potential reflects ions back towards the source, while electrons are accelerated towards the \acs{dps}. However, electrons do not accumulate in this region, due to the reflection of the electrons at the \acs{dps} dipole potential. The origin of the potential wall can be explained by the background current of ions, which leave the source towards the \acs{dps}. Because electrons are not allowed to leave the source in this direction, a repulsive potential builds up to reduce the outgoing ion flux. In the simulation, the height of the potential wall increased over time. It can therefore be assumed that it is still growing, and the final structure could not be determined in this simulation. Dedicated simulations are necessary, to investigate the behavior of electrons and ions in this section. In addition, it needs to be examined how the shape of the \acs{dps} dipole electrode potential and the corresponding reflection behavior influences the shape of the plasma potential. Additional features in the longitudinal potential are visible between \SI{2}{m} and \SI{5}{m}, and between \SI{11}{m} and \SI{14}{m} distance to the rear wall. They manifest in fluctuations of the potential on a larger scale. The fluctuations show a lower wavelength at the rear end than at the front end of the source. Furthermore, the amplitude of the fluctuations is larger at the front than at the rear end. The origin of these fluctuations is not yet understood. They arise both in the two regions, where the electron density increases significantly. Therefore, it can be assumed that the origin of these features are either linked to the increase of the density or to the reduced number of particles per cell. However, they also arise between the central section and the section in front of the \acs{dps}, where the density only drops by a maximum factor of 10. It is therefore more likely that the large scale fluctuations are a product of the reduced density than of the reduced number of particles. Furthermore, it seems that the wavelength of the fluctuations is linked to the relative density difference. In total, further studies are necessary to investigate the behavior of the plasma at large density gradients. Nevertheless, there is a large density difference between electrons and ions in the \acs{karl} simulations. These differences produce electric fields, which will reinforce quasineutrality and might reduce the gradient of the electron density. Thus, fewer effects of large density gradients might govern the potential distribution of the source. In total, the simulation of the complete source section can be summarized by five different observations: First, the potential in front of the rear wall showed significantly different values than in the simulation of the rear wall section. However, it can be assumed that this is no physical effect, but due to the low number of particles per cell. Thus, targeted simulations are better used in this region. Second, the potential and electric field in the center are in good agreement to the simulation of the central section. Thus, the plasma in the center can be approximated by these types of simulations. Third, large scale fluctuations were found in regions with a high electron density gradient. The origin of these fluctuations are not known, and more simulations are necessary here. Fourth, the reflection of electrons at the \acs{dps} side of the source in conjunction with an outgoing ion flux produces an additional potential wall. This wall will reflect ions, which should further reduce the outgoing ion flux. \section{Conclusion} In this chapter, the \acs{acronym} code was used to simulate the plasma inside the \acs{katrin} source. The initial conditions were set corresponding to the results of the \acs{karl} simulations in the field free case. The simulation of the complete source is demanding on computational resources. Therefore, it was decided to simulate sections of the source first: a rear wall section and a central section. In the simulations of the rear wall section, it was investigated how the different parameters of the \acs{karl} simulation influence the boundary layer in front of the rear wall. These parameters include the shape and composition of the spectrum, the absolute density, background ion current and the shape of the current. It could be shown that there is significant influence of the spectral composition on the boundary layer. The greatest impact on the potential had the electrons from the transitional region of the spectrum. This result is contradictory to the assumption of Kuckert \citep{PhDKuckert2016} that the spectrum can be approximated by a thermal spectrum only. For the future, it is therefore of great importance to gain more precise estimations of the spectrum from the \acs{karl} simulations. In the same simulations, it was found that electrons can be reflected by the potential in front of the rear wall. This reflection was not limited to thermal electrons only, but extended also the electrons of the transitional region. This result is contrary to the assumption that all electrons are directly absorbed by the rear wall. The stream of electrons, traveling in opposite direction, might incite additional plasma instabilities in the source (two stream instability). An estimate on the development of instabilities could not be found and is up for future investigations. The simulated density of electrons in front of the rear wall is significantly lower than the density of ions. Assuming quasineutrality of the plasma, it is most likely that the density of the electrons is higher in reality, and that the density of ions is lower than the estimate from the \acs{karl} simulations. It was therefore tested, how the absolute value of the electron density influences the result of the \acs{acronym} simulation. The ratio of the density of the thermal and the transitional region were kept constant. The simulation showed that there is a significant difference of the boundary layer between the different densities. Due to the unknown scaling between the thermal and transitional region, no direct scaling of the boundary could be found. The boundary potential increased above the thermal energy of the electrons ($E_\mathrm{th} \approx \SI{7}{meV}$) in the simulation with increased density ($n_e = \SI{1E6}{cm^{-3}}$) to values above \SI{20}{meV}. This is noteworthy, because the boundary potential in the test simulations was below the thermal energy, but was expected to be higher. Therefore, the estimated boundary potential can be thought of as a lower limit, but more elaborate test simulations are ongoing for a quantification of the reduction and effect of surface charges. Additionally, more precise estimations will be available in the future from \acs{karl} simulations with electric background field, pinpointing the initial density. An important input for the \acs{acronym} simulations is the current of the ions. The absolute value of the current is still under investigation. Hence, it was tested how the value of the background current influences the boundary layer. It could be shown that there is only a small difference between the simulation with no background current and a simulation with a current value gained by the \acs{karl} simulation. However, there is a significant difference of the potential, when increasing the current by a factor of 10. In this case, the shape of the boundary layer changed, and produced a layer, which would reflect ions instead of electrons. The \acs{karl} simulations predict that the background current is dependent on the radius. It was therefore investigated how the radial shape of the current influences the boundary layer. It could be shown that there is no significant difference between a simulation with a constant current and a simulation with a radially linear decreasing current. Nevertheless, the simulation also showed that the height of the boundary layer is dependent on the radius. It is therefore important to use a radial dependent potential in future \acs{karl} simulations. A reduction of the simulation domain to a 1D longitudinal simulation would therefore not describe the properties of the plasma correctly. In some \acs{acronym} simulations, it is assumed that the contribution of the ions to the plasma potential can be reduced to their current. This ion current is influenced on larger time scales by the potential of the boundary layer. Therefore, it was tested how the solution changes in a simulation with ion particles on large time scales. At first, it was observed that the simplification to the ion current produces similar results as a simulation with ion particles on short time scales. However, on large time scales, it could be seen that the shape of the boundary layer changed. The negative potential wall of the boundary extended well into the simulated cylinder section. The extent increased with increasing time. No static solution could be found. The boundary potential at large time scales coincided with the thermal energy of the electrons ($E_\mathrm{th} \approx \SI{7}{meV}$). As mentioned before, through comparison with test simulations, the simulated potential can be though of as a lower limit on the true potential. Furthermore, the true electron density might be higher than implemented, see section~\ref{ssec:karl:with_E_field:rear_wall_field}, which should increase the potential difference further, see section~\ref{ssec:pic_at_katrin:rearwall_section:density}. Additional features with sizes of approximately \SI{10}{cm} emerged in the potential at large time scales. They were not localized directly in front of the rear wall, but extended into the bulk of the plasma. The previous model by \citet{PhDKuckert2016} did not reveal such features, but they are an additional source of uncertainty on the potential variation that go beyond the rear wall boundary potential and overall shift of the potential through the rear wall potential. Thus, they can be of interest for the neutrino mass analysis. However, more elaborate simulations are necessary to investigate the features in more detail. Simulations were also performed for a central section of the source. Periodic boundary conditions were set up to study the plasma independently of the influence of longitudinal boundaries (rear wall). The potential variations were below the fluctuations of the simulations of the rear wall section. Furthermore, no radial potential difference could be found in the data. Thus, the larger potential variations and radial potential structure are directly connected to the longitudinal boundary, and the boundary has to be included in future simulations for a full picture of the potential. However, the simple simulation geometry allowed for an investigation of the spatial and temporal structure of the electric field. The simulation showed that the electric field has structures in radial and longitudinal direction of the size of a few Debye lengths. The structure size is smaller than the radial resolution of the \acs{katrin} detector and can therefore not be measured by the experiment. A spectral analysis of the longitudinal field revealed that most of the energy of the electric field is distributed in fluctuations with frequencies below or on the order of the plasma frequency. No specific plasma mode could be identified in the data. It could also be shown that large scale fluctuations are improbable, especially for higher frequencies. The resolution at low frequencies was too low to identify any plasma modes. Longer simulations would be necessary, but with the current setup longer simulations can not be realized. Thus, new or improved algorithms must be developed. Furthermore, the spectral analysis showed that there might be additional features emerging after longer time scales at wavenumbers between \num{0.05} and \num{0.2} inverse Debye lengths. The origin of these features is unknown, and is under investigation. This observation might hint at additional plasma instabilities, but could not be confirmed so far. Simulations of the complete \SI{16}{m} long source section were performed for small time scales. It could be seen that there are small scale fluctuations of the potential. They already showed in the simulation of the central section, as well as in the simulation of the rear wall section. The electric field fluctuations in the center were found to be in agreement with the simulations of the central section, which justifies the investigation of the central part of the source through a segmentation of the simulation domain. The potential near the rear wall was found to be smaller than in the simulation of the rear wall section. This difference was attributed to the reduced particle resolution in this region. In the future, simulations of the rear wall section with reduced and increased particle resolution, in addition with investigations of the particle density, can provide insight on this hypothesis, and explore the inherent phase space resolution of \acs{pic} simulations. However, the overall potential variation of this simulation was significantly below the thermal energy of the electrons, contrary to expectations from the one dimensional Debye layer, and also the simulations by \citeauthor{PhDKuckert2016}. Thus, the current simulation can only provide an insight into additional features of the potential, but not on the absolute scale, and more targeted simulations are necessary. The simulations of the complete \acs{katrin} source revealed also two additional features to the potential. First, there is a positive potential wall directly in front of the \acs{dps} section. This feature was attributed to the outgoing ion current. This current could not be mimicked by the electron movement because of the reflection of electrons. The height of the wall was found to be increasing over time. Thus, dedicated simulations are necessary in the future to investigate the behavior of the plasma in this region. Second, there were larger scale fluctuations found in the regions with large electron density gradient. The origin of these fluctuations could not be found, but it is hypothesized that they originate from the large electron density gradient. Additional simulations might provide an insight onto this behavior. Future simulations with \acs{karl} and Poisson solver might also provide electron densities, which do not show such large density differences. Thus, these features might only be a relic of the current simulation. Nevertheless, it could be observed that large scale fluctuations can occur in the potential of the plasma, which are not directly connected to the rear wall boundary but stem from the special properties of the source plasma itself.