Final version of thesis

This commit is contained in:
Christian
2019-12-09 10:29:31 +01:00
parent a855e25194
commit bfdcd9d0ba
48 changed files with 32545 additions and 3388 deletions
@@ -15,29 +15,29 @@
\chapter{Monte Carlo and computation techniques}
\label{ch:mon}
Physical Monte Carlo simulations emulate complex physical problems on computers by dismantling them into their underlying basic processes.
These basic processes follow statistic distributions, which can in general be gained from experiment or theory.
In Physics, Monte Carlo simulations are used to emulate complex physical problems on computers by dismantling them into their underlying basic processes.
These basic processes follow probability distributions, which can in general be gained from experiment or theory.
In Monte Carlo simulations these statical distribution are imitated using random numbers.
In Monte Carlo simulations these probability distributions are imitated using random numbers.
The creation of uniform pseudo random numbers on computers is covered in \autoref{sec:mon:rng}.
The sampling of arbitrary statistical distributions from these uniform random numbers is treated in \autoref{sec:mon:sample}.
In physics Monte Carlo are often used to determine the properties of a complex system by repetitive simulation of single particles in this system.
In physics Monte Carlo simulations are often used to determine the properties of a complex system by repetitive simulation of single particles in this system.
A common approach is a semi-classical Monte Carlo simulation, where particle propagation and interactions between particles is separated.
Particle interactions are treated quantum mechanically and are therefore described by statical distributions.
Particle interactions are treated quantum mechanically and are therefore described by probability distributions.
The statistical description of particle interactions is covered in \autoref{sec:mon:interactions}.
Following an interaction the particle will be deflected by a certain scattering angle.
The calculation of the final direction of motion after an interaction is treated in \autoref{sec:mon:dir}.
Propagation of particles is treated classical in semi classical Monte Carlo simulations and are therefore definite.
Free propagation without external forces is trivial and determined by conversation of momentum.
The trajectory of charged particles in electric and magnetic fields is complex and in general not analytically solvable.
Propagation of particles is treated classically in semi classical Monte Carlo simulations and is therefore definite.
Free propagation without external forces is trivial and determined by conservation of momentum.
The trajectory of charged particles in electric and magnetic fields is complex and usually not analytically solvable.
Two algorithms for numerical trajectory calculation of charged particles in electric and magnetic field are presented in \autoref{sec:mon:boris} and \autoref{sec:mon:drift}.
Analogous to real physical experiments, Monte Carlo simulations need high statistics for good results.
This requires high computation times.
A good way to overcome this problem is parallel computation.
This requires high wall times.
A good way to reduce the computation time is parallel computation.
In section \ref{sec:mon:mpi} the \ac{mpi} for parallel computing is introduced.
\section{Random number generation}
@@ -72,7 +72,7 @@ The seed $x_0$ of the \ac{prng} initializes the sequence explicitly and makes th
The Mersenne-Twister 19937 is a modern \ac{prng} which is commonly used.
The algorithm satisfies for randomness, has a long sequence of $2^{19937}-1$ and the computational effort is very efficient compared to other \ac{prng} algorithms.
For details see \cite{Heidelberger:1998aa, Kolonko:2008aa}.
For details see
\\ \cite{Haghighat:2015aa, Kolonko:2008aa}
\section{Sampling of Random variables}
@@ -108,7 +108,7 @@ x = P^{-1}(\eta) \, .
If the \ac{cdf} $P(x)$ is analytically invertible this approach is the best choice and unmatched in terms of precision and computational effort.
Else $P^{-1}(x)$ can be obtained from numerical inversion of $P(x)$.
Else $P^{-1}(x)$ can be obtained from numerical inversion of $P(x)$.
The \ac{pdf} is split into $N$ bins of equal size $A = \frac{1}{N}$ (\autoref{fig:mon:inv}).
As each bin is equally probable a bin $i_x$ can be sampled by
@@ -122,7 +122,7 @@ x = x_{i_x, \text{low}} + \eta_2 (x_{i_x, \text{up}} - x_{i_x, \text{low}}) \, ,
\end{equation}
where $x_{i_x, \text{low}}$, $x_{i_x, \text{up}}$ are lower and upper bin border of bin $i_x$.
The assumption of values within each bin being constant will leads to divergences from the original $p(x)$.
The assumption of values within each bin being constant will lead to divergences from the original $p(x)$.
This error can be reduced by increasing the number of bins $N$ but will also lead to higher memory requirement and computational effort.
\subsection*{Rejection method}
@@ -143,7 +143,7 @@ y_\mathrm{t} &= \eta_2 \cdot p_\mathrm{max} \, .
The point is accepted if it is within the \ac{pdf}
\begin{equation}
y_\mathrm{t} \leq p(x_\mathrm{t}) \, .
\end{equation}
\end{equation}
Else the test point is rejected and a new test point is created. The algorithm is repeated until the condition is met and a point is accepted.
Thus a random variable following $p(x)$ is created.
@@ -210,7 +210,7 @@ For more than one \ac{ic} the total \ac{mfp} results in
\label{eq:mon:lambda}
\lambda_\mathrm{tot}(E) = \frac{1}{\sum_i \Sigma_i(E)} \, ,
\end{equation}
where the $\Sigma_i(E) = \sigma_\mathrm{i}(E) \cdot n_\mathrm{T,i}$ are the \acp{mcs} of the \acp{ic} and $n_\mathrm{T,i}$ the corresponding target particle densities.
where the $\Sigma_i(E) = \sigma_\mathrm{i}(E) \cdot n_\mathrm{T,i}$ are the \acp{mcs} of the \acp{ic} and $n_\mathrm{T,i}$ the corresponding target particle densities.
\subsection*{Differential cross sections}
Following an interaction the particles can result in various final states.
@@ -223,13 +223,13 @@ w = \frac{1}{\sigma} \cdot \int_a^b \frac{\upd \sigma}{\upd x} \upd x \, ,
\end{equation}
where $\sigma$ is the \ac{tcs} for the specific \ac{ic} and is linked to the \ac{dcs} by
\begin{equation}
\sigma = \int_{x_\text{min}}^{x_\text{max}} \frac{\upd \sigma}{\upd x} \upd x \, .
\sigma = \int_{x_\text{min}}^{x_\text{max}} \frac{\upd \sigma}{\upd x} \upd x \, .
\end{equation}
${x_\text{min}}$ and ${x_\text{max}}$ are lower and upper limit for the observable $x$.
\subsection*{Reaction rates}
For low energetic and rare interactions \acp{tcs} are difficult to measure.
Often only reaction rates are accessible.
These indicate the speed of an interaction.
These indicate the number of interactions per unit of time in dependence to number particles involved in the interaction.
For a two species system with densities $n_\mathrm{I}$ and $n_\mathrm{T}$ the number of interactions within a unit of volume per unit of time is defined by
\begin{equation}
@@ -256,7 +256,7 @@ Thus the \ac{tcs} and the \ac{mcs} results in
\Sigma = \frac{k_3}{v} n_\mathrm{T}^2\, .
\end{align}
\section{Change of particle track by interaction}
\section{Change of particle track by interactions}
\label{sec:mon:dir}
The scattering angle indicates the deflection of the original trajectory caused by an interaction.
It is commonly stated in spherical coordinates with the polar angle $\theta_{0}$ and the azimuthal angle $\varphi_{0}$ in respect to the initial direction of motion $\hat{n}$.
@@ -271,14 +271,14 @@ Let the initial direction of the particle be
where $\hat{x} $, $\hat{y}$ and $\hat{z}$ are unit vectors of the simulation code's coordinate system.
Transformation to a new coordinate system with unit vectors $\hat{x}^{\prime}$, $\hat{y}^{\prime}$, $\hat{z}^{\prime}$, which satisfy for
\begin{align}
\hat{z}^{\prime} &= \hat{n} \, , \\
\hat{z}^{\prime} &= \hat{n} \, , \\
\hat{y}^{\prime} &= \frac{\hat{n} \times \hat{z}} {\mid \hat{n} \times \hat{z} \mid} = \frac{v}{s} \hat{x} - \frac{u}{s} \hat{y} \, , \\
\hat{x}^{\prime} &= \hat{y}^{\prime} \times \hat{z}^{\prime} = \frac{-uw}{s} \hat{x} + \frac{-vw}{s} \hat{y} + s \hat{z} \, , \\
\hat{x}^{\prime} &= \hat{y}^{\prime} \times \hat{z}^{\prime} = \frac{-uw}{s} \hat{x} + \frac{-vw}{s} \hat{y} + s \hat{z} \, , \\
s &= \sqrt{u^{2} + v^{2}} = \sqrt{1-w^{2}}
\end{align}
yields
\begin{equation}
\hat{n}^{\prime} = \sin\theta_{0} \cos\varphi_{0} \hat{x}^{\prime} + \sin\theta_{0} \sin\varphi_{0} \hat{y}^{\prime} + \cos\theta_{0} \hat{z}^{\prime} \, .
\hat{n}^{\prime} = \sin\theta_{0} \cos\varphi_{0} \hat{x}^{\prime} + \sin\theta_{0} \sin\varphi_{0} \hat{y}^{\prime} + \cos\theta_{0} \hat{z}^{\prime} \, .
\end{equation}
Using the nine identities $\hat{i} \cdot \hat{j}^{\prime}$ for $i,j = x,y,z$ and parameterizing $\hat{n}^{\prime}$ in the initial coordinate system as:
\begin{equation}
@@ -297,7 +297,7 @@ which allows for easy computation of final direction of motion in the initial co
\section{Boris Push}
\label{sec:mon:boris}
The Boris Push is the standard algorithm for trajectory calculation of charged particles in arbitrary electric and magnetic fields in full kinetic plasma simulations.
The Boris Push is the standard algorithm for trajectory calculation of charged particles with relativistic gamma factor $\gamma < 100$ in arbitrary electric and magnetic fields in full kinetic plasma simulations .
A particle with charge $q$ and mass $m$ in an electric field $\vec{E}$ and magnetic field $\vec{B}$ will be affected by Coulomb and Lorentz force resulting in a total force of
\begin{equation}
@@ -327,7 +327,7 @@ Equation \ref{eq:mon:vcond} is solved by
\end{equation}
where
\begin{equation}
\vec{v}^{+} = \vec{v}^{-} + (\vec{v}^{-} + \vec{v}^{-} \times \vec{h} ) \times s)
\vec{v}^{+} = \vec{v}^{-} + (\vec{v}^{-} + \vec{v}^{-} \times \vec{h} ) \times s)
\label{eq:mon:rot}
\end{equation}
and
@@ -335,13 +335,14 @@ and
\vec{v}^{-} =& \vec{v}_k + \frac{q}{m} \vec{E}_k \frac{\Delta t}{2} \, ,
\label{eq:mon:boost2}\\
\vec{h} = & \frac{q}{m} \vec{B}_k \frac{\Delta t}{2} \, , \\
\vec{s} =& \frac{2 \vec{h} }{1+h^2} \, .
\vec{s} =& \frac{2 \vec{h} }{1+h^2} \, .
\end{align}
The change of velocity is calculated by two linear boosts caused by the electric field (\autoref{eq:mon:boost1} and \autoref{eq:mon:boost2}) and a rotation between the two boost caused by $\vec{B}$ (\autoref{eq:mon:rot}).
The Boris Push provides a very exact solution for arbitrary electric and magnetic fields if $\Delta t$ is chosen small enough.
The required $\Delta t$ depends on $\vec{E}(\vec{x})$ and $\vec{B}(\vec{x})$ and determines the computational effort needed for the algorithm.
Especially resolving gyro motions in high magnetic fields can limit the efficiency strongly.
Especially resolving gyro motions requires time steps of $\Delta t \approx \frac{1}{20}\frac{1}{\omega_g}$, where $\omega_g$ is the gyro frequency of the particle \cite{Lange:2012aa}.
This can limit efficiency strongly in high magnetic fields.
\\ \cite{Boris:1970aa, Qin:2013aa, Zenitani:2018aa}
\section{Drift Approximation}
@@ -358,7 +359,7 @@ The gyro frequency calculates to
and the motion of a particle with charge $q$ follows
\begin{align}
x(t) = & x_c + \frac{v_\perp}{\omega_g} \cos(\omega_g t) \, , \\
y(t) = & y_c + \mathrm{sign}(q) \cdot \frac{v_\perp}{\omega_g} \sin(\omega_g t) \, , \\
y(t) = & y_c + \mathrm{sign}(q) \cdot \frac{v_\perp}{\omega_g} \sin(\omega_g t) \, , \\
z(t) = & z_0 + v_\parallel \cdot t \, ,
\end{align}
where the magnetic field is aligned along the $z$-axis. $z_0$ is the initial particle's $z$-position at $t=0$ and $(x_c, y_c)$ are the center of the gyro motion.