\documentclass[../main.tex]{subfiles}
\graphicspath{{\subfix{../images/}}}

\begin{document}

\section{Results and Discussion}
% Single particle
We simulated the movement of particles confined in a Penning trap. All simulations used the initial conditions for particle 1 and 2 given in table \ref{tab:initial_condition_particles}. 

First we simulated a single particle for $50 \mu s$, approximating the particle's motion using the RK4 method. In addition we compared the motion of particle 1 with the analytical solution in figure \ref{fig:single_particle}. What we see is a complete overlap of the analytical solution completely overlap the approximated, suggest that the simulation result is good.
% Add something about why the simulated result is good, cos(wt) when w is
% 
\begin{table}[H]
    \centering
        \begin{tabular}[c]{lll}
            Particle & Position & Velocity \\
            \hline
            $p_{1}$ & $(20, 0, 20) \mu m$ & $(0, 25, 0) \mu m/ \mu s$ \\
            $p_{2}$ & $(25, 25, 0) \mu m$ & $(0, 40, 5) \mu m/ \mu s$ \\
            \hline
        \end{tabular}
    \caption{Initial position and velocity of particle 1 ($p_{1}$) particle 2 ($p_{2}$), where the analytical solution is given by $z(t) = z_{0} \cos (\omega_{z} t)$}
    \label{tab:initial_condition_particles}
\end{table}
\begin{figure}[H]
    \centering
    \includegraphics[width=\linewidth]{images/single_particle.pdf}
    \caption{A single particle in the Penning trap, approximated and analytical motion in z-direction.}
    \label{fig:single_particle}
\end{figure}
% Add equations of motion for particle with interaction eq. (18, 19, 20)
% Multiple particles
% Add initial condition of Penning trap
We will now consider the Penning trap with initial conditions given in table \ref{tab:initial_condition_penning}, and simulate using one or two particles. In addition, we simulate two particles both with and without interactions, the result is found in figure \ref{fig:two_particles}. When we add interaction between the particles, they both still follow the same inherent path. However, we observe a small shift in both particle's movement.
\begin{table}[H]
    \centering
    \begin{tabular}{lll}
        $B_0$ & $V_{0}$ & $d$ \\
        \hline
    \end{tabular}
    \caption{Caption}
    \label{tab:initial_condition_penning}
\end{table}
%
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/plot_2_particles_xy.pdf}
    \caption{Movement of two particles in the xy-plane. $\hat{p}_{1}$ and $\hat{p}_{2}$ include particle interaction, whereas $p_{1}$ and $p_{2}$ does not include particle interaction.}
    \label{fig:two_particles}
\end{figure}
% Phase space plot
When we simulate two particles, we can see the effect of interaction between the particles in the xy-plane in fig. \ref{fig:phase_space_2x} and in the z-direction in fig. \ref{fig:phase_space_2z}. What we observe is a very small shift in position for particle 1 in x-direction, whereas particle 2 does not have a visible shift. In the z-direction, however, the oscillation of particle 2 experience a greater shift. Particle 2 experience the force of particle 1 such that particle 2 moves larger distance.
%
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/phase_space_2_particles_x.pdf}
    \caption{Phase space plot of two particles in x-direction.}
    \label{fig:phase_space_2x}
\end{figure}
%
\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/phase_space_2_particles_z.pdf}
    \caption{Phase space plot of two particles in z-direction.}
    \label{fig:phase_space_2z}
\end{figure}

\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/3d_plot.pdf}
    \caption{3D plot of particles-}
    \label{fig:3d_particles}
\end{figure}

\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/phase_space_2_particles.pdf}
    \caption{Phase space plot of two particles.}
    \label{fig:phase_space_2}
\end{figure}


\begin{figure}
    \centering
    \includegraphics[width=\linewidth]{images/particles_left.pdf}
    \caption{Fraction of particles left in the Penning trap, with a given amplitude $f$.}
    \label{fig:particles_left}
\end{figure}
\end{document}