mirror of
https://github.com/Findus23/BachelorsThesis.git
synced 20240827 19:52:12 +02:00
88 lines
6.3 KiB
TeX
88 lines
6.3 KiB
TeX
% !TeX spellcheck = en_US


\chapter{Simulations}


\label{chapter:simulations}


\section{Model}




For a realistic model of two gravitationally colliding bodies the smooth particle hydrodynamics (\texttt{SPH}) code \texttt{miluphCUDA} as explained in \cite{Schaefer2016} and \cite{miluphaCode} is used. It is able to simulate brittle failure and the interaction between multiple materials.




In the simulation two celestial bodies are placed far enough apart so that tidal forces can affect the collision (5 times the sum of the radii). Both objects consist of a core with the physical properties of basalt rocks and an outer mantle made of water ice. These twobodycollisions are similar to those that happen between protoplanets or the collision that created the Earth's Moon.\footcite{dvorakMoon}




To keep the simulation time short and make it possible to do many simulations with varying parameters, 20k SPH particles are used and each simulation is run for 12 hours in which every 144~seconds the current state is saved.




\section{Parameters}


\label{sec:parameters}




Six parameters have been identified that have a major influence on the result of a twobody collision. All selected parameter ranges are inspired by the physical properties that occurred in collisions in a simulation of an early solar system.\footcite{CollisionParameters} (Table \ref{tab:first_simulation_parameters})




\subsection{Impact velocity}




The collision velocity $v_0$ is defined in units of the mutual escape velocity $v_{esc}$ of the projectile and the target.\footcite{MaindlSummary} Simulations have been made from $v_0=1$ to $v_0=5$. As one expects, a higher velocity results in a stronger collision and more and smaller fragments.


\begin{equation}


v_{esc}=\sqrt{\frac{2G(M_p+M_t)}{r_p+r_t}}


\end{equation}




\subsection{Impact angle}




The impact angle is defined in a way that $\alpha=\ang{0}$ corresponds to a headon collision and higher angles increase the chance of a hitandrun encounter. The simulation parameters range from $\alpha=\ang{0}$ to $\alpha=\ang{60}$




\subsection{Target and projectile mass}




The total masses in these simulations range from about two Ceres masses (\SI{1.88e+21}{\kilogram}) to about two earth masses (\SI{1.19e+25}{\kilogram}). In addition to the total mass $m$, the mass fraction between projectile and target $\gamma$ is defined. As the whole setup is symmetrical between the two bodies, only mass fractions below and equal to one have been considered.




\subsection{Water fraction of target and projectile}




The last two parameters are the mass fraction of the ice to the total mass of each of the bodies. To keep the numbers of parameter combinations and therefore required simulations low, only \SI{10}{\percent} and \SI{20}{\percent} are simulated in the first simulation set.






\begin{table}


\centering


\begin{tabular}{rSSSSS}


$v_0$ & 1 & 1.5 & 2&3 & 5 \\


$\alpha$ & \ang{0} & \ang{20} & \ang{40} & \ang{60} &\\


$m$ &\SI{e21}{\kilogram} & \SI{e23}{\kilogram} & \SI{e24}{\kilogram} & \SI{e25}{\kilogram} &\\


$\gamma$ & 0.1 & 0.5 & 1 &&\\


water fraction target & \SI{10}{\percent} & \SI{20}{\percent} &&&\\


water fraction projectile & \SI{10}{\percent} & \SI{20}{\percent} &&&\\


\end{tabular}


\caption{parameter set of the first simulation run}


\label{tab:first_simulation_parameters}


\end{table}




\section{Execution}




In the first simulation run for every parameter combination from Table \ref{tab:first_simulation_parameters} a separate simulation has been started. First, the parameters and other configuration options are written in a \mbox{\texttt{simulation.input}} text file. Afterwards the relaxation program described in \cite[24\psqq]{Burger2018} generates relaxed initial conditions for all 20k particles and saves their state to \texttt{impact.0000}. Finally, \texttt{miluphcuda} can be executed with the following arguments to simulate starting from this initial condition for 300 timesteps which each will be saved in a \texttt{impact.XXXX} file.




\begin{lstlisting}[language=bash,flexiblecolumns=false]


miluphcuda N 20000 I rk2_adaptive Q 1e4 n 300 a 0.5 H t 144.0 f impact.0000 m material.cfg s g


\end{lstlisting}




This simulation ran on the \texttt{amanki} server using a \texttt{Nvidia GTX 1080} taking about \SI{30}{\minute} per simulation as the \texttt{Nvidia GTX 1080} is the fastest consumer GPU for this simulation set in a comparison of 13 tested GPUs.\footcite{Dorninger} Of these 960 simulations, 822 succeed and were used in the analysis.






\section{Postprocessing}


\label{sec:postprocessing}




After the simulation the properties of the SPH particles needs to be analyzed. To do this, the \texttt{identify\_fragments} C program by Christoph Burger (part of the postprocessing tools of \texttt{miluphCUDA}) uses a friendsoffriends algorithm to group the final particles into fragments. Afterwards \texttt{calc\_aggregates} calculates the mass of the two largest fragments together with their gravitationally bound fragments and its output is written into a simple text file (\texttt{aggregates.txt}).






\section{Resimulation}


\label{sec:resimulation}




To increase the amount of available data and especially reduce the errors caused by the gridbased parameter choices (Table \ref{tab:first_simulation_parameters}), a second simulation run has been started. All source code and initial parameters have been left the same apart from the six main input parameters described above. These are set to a random value in the range listed in Table \ref{tab:resimulationparameters} apart from the initial water fractions. As they seem to have little impact on the outcome (see Section \ref{sec:cov}), they are set to \SI{15}{\percent} to simplify the parameter space.




This way, an additional \num{553} simulations have been calculated on \texttt{Nvidia Tesla P100} graphics cards on \texttt{Google Cloud}. (Of which 100 simulations are only used for comparison in Chapter \ref{sec:comparison})




\begin{table}[hb]


\centering


\begin{tabular}{rSS}


& min&max\\\hline


$v_0$ & 1 & 5 \\


$\alpha$ & \ang{0} & \ang{60} \\


$m$ &\SI{1.88e+21}{\kilogram} & \SI{1.19e+25}{\kilogram}\\


$\gamma$ & 0.1& 1 \\


water fraction target & \SI{15}{\percent} & \SI{15}{\percent} \\


water fraction projectile & \SI{15}{\percent} & \SI{15}{\percent} \\


\end{tabular}


\caption{parameter ranges for the resimulation}


\label{tab:resimulationparameters}


\end{table}
