Files
2019-12-09 10:29:31 +01:00

139 lines
9.5 KiB
TeX

% !TEX root = ../thesis.tex
% !TEX useTabs
%% LaTeX2e class for student theses
%% sections/validation.tex
%%
%% Karlsruhe Institute of Technology
%% Institute for Program Structures and Data Organization
%% Chair for Software Design and Quality (SDQ)
%%
%% Dr.-Ing. Erik Burger
%% burger@kit.edu
%%
%% Version 1.3.3, 2018-04-17
\chapter{Analytical tests of the simulation}
\label{ch:tests}
Quantitative experimental validation of the KARL code is only possible in the interplay with the \ac{pic} code (\autoref{sec:cod:intention}).
Since the \ac{pic} code is currently\footnote{as of December 2019} still in development, no experimental tests can be performed.
Yet the KARL code can be tested analytically.
Therefore test cases with a analytical calculable outcome are designed.
These tests have been performed for the most important processes that are implemented in KARL.
In \autoref{sec:tes:inj} the three implemented injection methods are tested.
Elastic scattering is tested in \autoref{sec:tes:ela}, ionization in \autoref{sec:tes:ion} and excitation in \autoref{sec:tes:exc}.
The test of further processes is analytically hardly feasible, but a qualitative analysis is presented in \autoref{ch:res}.
\section{Test of the injection methods} \label{sec:tes:inj}
The KARL code features three different injection methods.
Depending on the INJECTION-parameter the initial electron energy is sampled from different distributions (\autoref{sec:cod:phys}).
The injection methods are tested by disabling all interactions.
Thus it is expected, that immediately after creation the electrons propagate to the \ac{rw}, where they can be observed unaltered.
Hence successful injection tests do not only validate the sampling of the specified energy distributions, but also propagation in absence of interactions.
A corresponding test was performed for delta injection (INJECTION = 1) with energies of \SI{1}{\milli \eV}, \SI{1}{\eV} and \SI{1}{\kilo \eV}.
Delta injection initializes all electrons with exactly the specified energy.
For each energy \num{{}e4} injections have been performed.
In all three test cases exactly \num{{}e4} electrons with the specified energy\footnote{Minor divergences can arise from the floating point of data types in C\texttt{++}} have been observed at the \ac{rw}.
Thus delta injection is properly implemented in the KARL code.
\begin{figure}[tbph]
\centering
\input{pics/tests/tc2.pgf}
\caption{Test of Maxwell Boltzmann Injection (INJECTION = 2) at three different energies:
\SI{1}{\milli \eV} (left), \SI{1}{\eV} (center), \SI{1}{\kilo \eV} (right), which are related to the temperature of the Maxwell Boltzmann distribution by $E = k_\mathrm{B} T$. The red histograms show the observed electron energy spectrum at the \ac{rw}. The solid, black lines shows the expected spectra.}
\label{fig:tes:tc2}
\end{figure}
Analogously Maxwell Boltzmann injection (INJECTION = 2) was test at \SI{1}{\milli \eV}, \SI{1}{\eV}, \SI{1}{\kilo \eV} with \num{{}e5} injections each.
In this context temperatures are specified by the energy-temperature relation $E = k_\mathrm{B} T$.
The observed and expected spectrum at the \ac{rw} are displayed in \autoref{fig:tes:tc2}.
All three tests show good results.
Both the form and the normalization of the spectrum is in very good agreement with the expectation.
Thus sampling Maxwell Boltzmann distributions is successfully validated.
\begin{figure}[tbph]
\centering
\input{pics/tests/tc3.pgf}
\caption{Test of $\upbeta$-injection. The red histogram shows the observed energy spectrum at the \ac{rw}. The solid, black line shows the expected $\upbeta$-spectrum (\autoref{eq:neu:beta}).}
\label{fig:tes:tc3}
\end{figure}
The most important injection method for KARL is the $\upbeta$-injection (INJECTION = 0).
Therefore a test with \num{{}e5} injections was performed.
The results are displayed in \autoref{fig:tes:tc3}.
The expected and observed spectrum are in very good agreement.
Thus the implemented $\upbeta$-spectrum (\autoref{eq:neu:beta}) is validated.
\FloatBarrier
\section{Test of elastic scattering} \label{sec:tes:ela}
\begin{figure}[tbph]
\centering
\input{pics/tests/tc4.pgf}
\caption{Test of elastic scattering. Electrons are injected with constant energy of \SI{5}{\milli \eV} (left) and \SI{0.1}{\milli \eV} (right). The blue, dashed line represents the injection energy. After sufficient number of elastic scattering the electrons are expected to enter the $\SI{1}{\milli \eV} \, (\widehat{=} \SI{11.6}{\kelvin})$ Maxwell Boltzmann distribution of the underlying molecular tritium distribution.
This expected spectrum is represented by the black, solid lines. These are normalized to the number of observed electrons.
The red histograms represent the observed electron spectrum in the center of the \ac{wgts}.}
\label{fig:tes:tc4}
\end{figure}
In thermal region of energies $E = k_\mathrm{B} \cdot \SI{30}{\kelvin} = \SI{2.5}{\milli \eV}$ elastic scattering is the dominant interaction.
In this region elastic scattering is responsible for electrons to enter thermal equilibrium with the tritium molecules.
For testing elastic scattering two tests have been performed.
In both test cases the sub lying molecular tritium distribution was initialized with a non-moving $\SI{1}{\milli \eV} \, (\widehat{=} \SI{11.6}{\kelvin})$ Maxwell Boltzmann distribution.
It is expected that the electrons reach thermal equilibrium after a sufficient large number of interactions.
To observe this effect electrons are initialized with constant energies (INJECTION = 1) of \SI{5}{\milli \eV} and \SI{0.1}{\milli \eV}.
Since electrons need a large number of interactions to reach thermal equilibrium a trade off between computation effort and statistics has to be made.
To overcome this problem, the test case is designed to terminate the electrons after a fixed number of interactions.
For better statistics the spectrum of electrons is observed in the center of the \ac{wgts} at $z = 5$.
The resulting spectra are displayed in \autoref{fig:tes:tc4}.
The expected Maxwell Boltzmann distribution are normalized to the number of electrons observed.
In first order observation and expectation are in good agreement.
Minor divergences have been observed, indicating lower electron temperatures compared to the temperature of the molecular tritium.
Since this effect arises in both tests, where the electrons have been initialization below and above the typical molecular tritium energy, it can not be caused by electrons that have not entered thermal equilibrium.
The divergences arise from a known problem in the integration over all possible momentum vector constellations of both interaction partners during \ac{mcs} calculation.
The problem also arises in the implementation of recombination and is discussed in detail in \autoref{ch:res} and \autoref{ch:out}.
\section{Test of ionization} \label{sec:tes:ion}
\begin{figure}[tbph]
\centering
\input{pics/tests/tc6.pgf}
\caption{Test of ionization. Electrons have been injected with constant energy of \SI{30}{\eV}. The expected energy spectrum is a superposition of secondary electron spectrum and altered primary spectrum.
This expected spectrum is represented by the black, solid lines.
The observed electron spectrum at the \ac{rw} is displayed by the histograms in red.}
\label{fig:tes:tc6}
\end{figure}
Ionization processes between electrons and tritium molecules create the majority of charged particles in the \ac{wgts}.
For testing the ionization all other interactions have been deactivated and the electrons are initialized with a constant energy.
The energy was set to \SI{30}{\eV}, so that electrons can only perform one ionization process and hence the expected spectrum is easily analytically calculable.
If all electrons perform an ionization the expected electron spectrum at the \ac{rw} is a superposition of secondary electron spectrum and altered primary electron spectrum.
The expected altered primary electron spectrum is derived from the expected secondary electron spectrum.
This is unambiguous since the energy of primary electron after ionization calculates from energy of secondary electron and the binding energy.
In \autoref{fig:tes:tc6} the results with \num{{}e4} initialized electrons are displayed.
The observed and expected spectrum are in good agreement in both shape and normalization.
Thus ionization was successfully implemented in the KARL code.
\section{Test of excitation} \label{sec:tes:exc}
\begin{figure}[tbph]
\centering
\input{pics/tests/tc7.pgf}
\caption{Test of excitation. Electrons have been injected with constant energy of \SI{1}{\eV}. The expected energy spectrum consist of scattered electrons with energies of \SI{0.484}{\eV} and unnscatted electron at \SI{1}{\eV}. The observed electron spectrum at the \ac{rw} is displayed by the red histograms.}
\label{fig:tes:tc7}
\end{figure}
Excitation processes are very important for cooling electrons efficiently.
In the KARL code excitation are implemented as constant energy loss.
The energy corresponds exactly to the energy of the excited excitation level.
For testing excitation only the vibrational excitation of tritium\footnote{adapted from \ce{H2}} from its ground state $\nu = 0$ to the first vibrational excitation level $\nu^\prime = 1$ with an energy of \SI{0.516}{\eV} has been activated.
All further interaction channels have been deactivated.
In the test the electrons are injected with a constant energy of \SI{1}{\eV}.
Thus an electron can perform exactly one excitation process.
The results are displayed in \autoref{fig:tes:tc7}.
The observed energy of scattered electrons is exactly at the expected position of \SI{0.484}{\eV}.
Thus excitation processes are implemented successfully in KARL.