From 05b7139e8e9fdb01b24b3fa26260f1c5fdbb85d9 Mon Sep 17 00:00:00 2001 From: hanemile Date: Fri, 9 Feb 2018 13:43:39 +0100 Subject: update the things that happend after the document was handed in --- langfassung/docs/1_kurzfassung.tex | 0 langfassung/docs/2_einleitung.aux | 30 ++++ langfassung/docs/2_einleitung.tex | 0 langfassung/docs/3_hauptteil.aux | 67 +++++++++ langfassung/docs/3_hauptteil.tex | 0 langfassung/docs/4_ergebnisse.aux | 31 +++++ langfassung/docs/4_ergebnisse.tex | 0 langfassung/docs/5_quellen.aux | 32 +++++ langfassung/docs/5_quellen.tex | 2 + langfassung/docs/6_abgabe.tex | 273 +++++++++++++++++++++++++++++++++++++ 10 files changed, 435 insertions(+) mode change 100644 => 100755 langfassung/docs/1_kurzfassung.tex create mode 100644 langfassung/docs/2_einleitung.aux mode change 100644 => 100755 langfassung/docs/2_einleitung.tex create mode 100644 langfassung/docs/3_hauptteil.aux mode change 100644 => 100755 langfassung/docs/3_hauptteil.tex create mode 100644 langfassung/docs/4_ergebnisse.aux mode change 100644 => 100755 langfassung/docs/4_ergebnisse.tex create mode 100644 langfassung/docs/5_quellen.aux mode change 100644 => 100755 langfassung/docs/5_quellen.tex create mode 100755 langfassung/docs/6_abgabe.tex (limited to 'langfassung/docs') diff --git a/langfassung/docs/1_kurzfassung.tex b/langfassung/docs/1_kurzfassung.tex old mode 100644 new mode 100755 diff --git a/langfassung/docs/2_einleitung.aux b/langfassung/docs/2_einleitung.aux new file mode 100644 index 0000000..44243d1 --- /dev/null +++ b/langfassung/docs/2_einleitung.aux @@ -0,0 +1,30 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.1}Themen}{3}{subsection.1.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {1.2}Motivation}{3}{subsection.1.2}} +\@setckpt{docs/2_einleitung}{ +\setcounter{page}{4} +\setcounter{equation}{0} +\setcounter{enumi}{0} +\setcounter{enumii}{0} +\setcounter{enumiii}{0} +\setcounter{enumiv}{0} +\setcounter{footnote}{2} +\setcounter{mpfootnote}{0} +\setcounter{part}{0} +\setcounter{section}{1} +\setcounter{subsection}{2} +\setcounter{subsubsection}{0} +\setcounter{paragraph}{0} +\setcounter{subparagraph}{0} +\setcounter{figure}{1} +\setcounter{table}{0} +\setcounter{parentequation}{0} +\setcounter{Item}{0} +\setcounter{Hfootnote}{2} +\setcounter{bookmark@seq@number}{3} +\setcounter{ContinuedFloat}{0} +\setcounter{lstnumber}{1} +\setcounter{section@level}{2} +\setcounter{lstlisting}{0} +} diff --git a/langfassung/docs/2_einleitung.tex b/langfassung/docs/2_einleitung.tex old mode 100644 new mode 100755 diff --git a/langfassung/docs/3_hauptteil.aux b/langfassung/docs/3_hauptteil.aux new file mode 100644 index 0000000..f598ad5 --- /dev/null +++ b/langfassung/docs/3_hauptteil.aux @@ -0,0 +1,67 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.1}Generierung von elliptischen Galaxien}{5}{subsection.2.1}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.1}Das Navarro-Frenk-White Profil}{5}{subsubsection.2.1.1}} +\newlabel{eq:NFW_profile}{{1}{5}{Das Navarro-Frenk-White Profil}{equation.2.1}{}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.2}Random Sampling}{5}{subsubsection.2.1.2}} +\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Eine mit dem NFW-profil und der Random Sampling Methode generierte Galaxie\relax }}{6}{figure.caption.3}} +\providecommand*\caption@xref[2]{\@setref\relax\@undefined{#1}} +\newlabel{fig:galaxy}{{2}{6}{Eine mit dem NFW-profil und der Random Sampling Methode generierte Galaxie\relax }{figure.caption.3}{}} +\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Die Rho Funktion im Intervall \( [~0~;~10^7 ~] \) geplottet mithilfe von Logarithmischen Achsen. Die x-Achse beschreibt die Entfernung zum Mittelpunkt der Galaxie Die y-Achse beschreibt die Warscheinlichkeit das ein Stern generiert wird \relax }}{6}{figure.caption.4}} +\newlabel{fig:rho}{{3}{6}{Die Rho Funktion im Intervall \( [~0~;~10^7 ~] \) geplottet mithilfe von Logarithmischen Achsen. \\ Die x-Achse beschreibt die Entfernung zum Mittelpunkt der Galaxie \\ Die y-Achse beschreibt die Warscheinlichkeit das ein Stern generiert wird \relax }{figure.caption.4}{}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.1.3}Lookup Tabellen}{7}{subsubsection.2.1.3}} +\newlabel{subsec:lookup}{{2.1.3}{7}{Lookup Tabellen}{subsubsection.2.1.3}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.2}Generierung eines Dunkle-Materie Halos durch Anpassung des NFW-Profils}{7}{subsection.2.2}} +\newlabel{eq:dark_matter}{{3}{7}{Generierung eines Dunkle-Materie Halos durch Anpassung des NFW-Profils}{equation.2.3}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.3}Stauchung und Streckung der Galaxie}{7}{subsection.2.3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.4}Rechenaufwand}{8}{subsection.2.4}} +\newlabel{subsec:big_o}{{2.4}{8}{Rechenaufwand}{subsection.2.4}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.5}Beschleunigung der Generation}{8}{subsection.2.5}} +\newlabel{subsec:speeding_things_up}{{2.5}{8}{Beschleunigung der Generation}{subsection.2.5}{}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.5.1}Lookuptable}{8}{subsubsection.2.5.1}} +\newlabel{subsec:lookuptable}{{2.5.1}{8}{Lookuptable}{subsubsection.2.5.1}{}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.5.2}Mehr Rechenleistung!}{9}{subsubsection.2.5.2}} +\@writefile{toc}{\contentsline {paragraph}{\nonumberline Amazon Web Services}{9}{section*.5}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.5.3}Nichts in der Konsole ausgeben}{9}{subsubsection.2.5.3}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.6}Nutzung eines neuronalen Netzes zum unbeaufsichtigten generieren von Galaxien}{9}{subsection.2.6}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.6.1}Aufbau des neuronalen Netzes}{9}{subsubsection.2.6.1}} +\@writefile{toc}{\contentsline {paragraph}{\nonumberline Neuronen und Synapsen}{10}{section*.6}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.7}Spiralgalaxien}{11}{subsection.2.7}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.7.1}Das n-K\IeC {\"o}rper Problem}{11}{subsubsection.2.7.1}} +\newlabel{eq:n-body-2nd}{{10}{11}{Das n-Körper Problem}{equation.2.10}{}} +\newlabel{eq:hamilton}{{11}{11}{Das n-Körper Problem}{equation.2.11}{}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.7.2}Unterteilung des Vektorraumes in verschiedene Zellen}{12}{subsubsection.2.7.2}} +\@writefile{toc}{\contentsline {subsubsection}{\numberline {2.7.3}Berechnung der wirkenden Kr\IeC {\"a}fte}{12}{subsubsection.2.7.3}} +\newlabel{eq:gravitation_law}{{16}{12}{Berechnung der wirkenden Kräfte}{equation.2.16}{}} +\@writefile{toc}{\contentsline {paragraph}{\nonumberline Masse der Sterne}{12}{section*.7}} +\@writefile{toc}{\contentsline {paragraph}{\nonumberline Abstand der Sterne}{12}{section*.8}} +\newlabel{eq:pytagoras}{{17}{12}{Abstand der Sterne}{equation.2.17}{}} +\@writefile{toc}{\contentsline {subsection}{\numberline {2.8}Weiteres}{12}{subsection.2.8}} +\@writefile{lof}{\contentsline {figure}{\numberline {4}{\ignorespaces Eine Spiralgalaxie generiert mithilfe von Daten aus dem Max-Plank-Institut in Heidelberg\relax }}{13}{figure.caption.9}} +\newlabel{fig:spiralgalaxy}{{4}{13}{Eine Spiralgalaxie generiert mithilfe von Daten aus dem Max-Plank-Institut in Heidelberg\relax }{figure.caption.9}{}} +\@setckpt{docs/3_hauptteil}{ +\setcounter{page}{14} +\setcounter{equation}{17} +\setcounter{enumi}{0} +\setcounter{enumii}{0} +\setcounter{enumiii}{0} +\setcounter{enumiv}{0} +\setcounter{footnote}{3} +\setcounter{mpfootnote}{0} +\setcounter{part}{0} +\setcounter{section}{2} +\setcounter{subsection}{8} +\setcounter{subsubsection}{0} +\setcounter{paragraph}{0} +\setcounter{subparagraph}{0} +\setcounter{figure}{4} +\setcounter{table}{0} +\setcounter{parentequation}{0} +\setcounter{Item}{0} +\setcounter{Hfootnote}{3} +\setcounter{bookmark@seq@number}{22} +\setcounter{ContinuedFloat}{0} +\setcounter{lstnumber}{15} +\setcounter{section@level}{2} +\setcounter{lstlisting}{0} +} diff --git a/langfassung/docs/3_hauptteil.tex b/langfassung/docs/3_hauptteil.tex old mode 100644 new mode 100755 diff --git a/langfassung/docs/4_ergebnisse.aux b/langfassung/docs/4_ergebnisse.aux new file mode 100644 index 0000000..ec4d7a3 --- /dev/null +++ b/langfassung/docs/4_ergebnisse.aux @@ -0,0 +1,31 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.1}Simulations Geschwindigkeit}{15}{subsection.3.1}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Lookuptabellen Geschwindigkeit}{15}{subsection.3.2}} +\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Fazit}{15}{subsection.3.3}} +\@setckpt{docs/4_ergebnisse}{ +\setcounter{page}{16} +\setcounter{equation}{17} +\setcounter{enumi}{0} +\setcounter{enumii}{0} +\setcounter{enumiii}{0} +\setcounter{enumiv}{0} +\setcounter{footnote}{3} +\setcounter{mpfootnote}{0} +\setcounter{part}{0} +\setcounter{section}{3} +\setcounter{subsection}{3} +\setcounter{subsubsection}{0} +\setcounter{paragraph}{0} +\setcounter{subparagraph}{0} +\setcounter{figure}{4} +\setcounter{table}{0} +\setcounter{parentequation}{0} +\setcounter{Item}{0} +\setcounter{Hfootnote}{3} +\setcounter{bookmark@seq@number}{26} +\setcounter{ContinuedFloat}{0} +\setcounter{lstnumber}{15} +\setcounter{section@level}{2} +\setcounter{lstlisting}{0} +} diff --git a/langfassung/docs/4_ergebnisse.tex b/langfassung/docs/4_ergebnisse.tex old mode 100644 new mode 100755 diff --git a/langfassung/docs/5_quellen.aux b/langfassung/docs/5_quellen.aux new file mode 100644 index 0000000..f7e47e9 --- /dev/null +++ b/langfassung/docs/5_quellen.aux @@ -0,0 +1,32 @@ +\relax +\providecommand\hyper@newdestlabel[2]{} +\@writefile{toc}{\contentsline {paragraph}{\nonumberline Herrn J\IeC {\"o}rg Thar}{17}{section*.11}} +\@writefile{toc}{\contentsline {paragraph}{\nonumberline Tim Tugendhat}{17}{section*.12}} +\@writefile{toc}{\contentsline {paragraph}{\nonumberline Konstantin Bosbach}{17}{section*.13}} +\@writefile{toc}{\contentsline {paragraph}{\nonumberline Tilman Hoffbauer}{17}{section*.14}} +\@setckpt{docs/5_quellen}{ +\setcounter{page}{18} +\setcounter{equation}{17} +\setcounter{enumi}{0} +\setcounter{enumii}{0} +\setcounter{enumiii}{0} +\setcounter{enumiv}{0} +\setcounter{footnote}{3} +\setcounter{mpfootnote}{0} +\setcounter{part}{0} +\setcounter{section}{4} +\setcounter{subsection}{0} +\setcounter{subsubsection}{0} +\setcounter{paragraph}{0} +\setcounter{subparagraph}{0} +\setcounter{figure}{4} +\setcounter{table}{0} +\setcounter{parentequation}{0} +\setcounter{Item}{0} +\setcounter{Hfootnote}{3} +\setcounter{bookmark@seq@number}{27} +\setcounter{ContinuedFloat}{0} +\setcounter{lstnumber}{15} +\setcounter{section@level}{4} +\setcounter{lstlisting}{0} +} diff --git a/langfassung/docs/5_quellen.tex b/langfassung/docs/5_quellen.tex old mode 100644 new mode 100755 index 9932028..6219a0a --- a/langfassung/docs/5_quellen.tex +++ b/langfassung/docs/5_quellen.tex @@ -18,3 +18,5 @@ Die Einführung in die Mathematik bekam ich während meines Praktikums im Zentru \centering \vspace{0.5cm} \textbf{Außerdem gilt mein Dank allen, die mich auf jede nur erdenkliche Weise unterstützt haben.} + +\raggedright diff --git a/langfassung/docs/6_abgabe.tex b/langfassung/docs/6_abgabe.tex new file mode 100755 index 0000000..22fe221 --- /dev/null +++ b/langfassung/docs/6_abgabe.tex @@ -0,0 +1,273 @@ +% \subsection{Rotationsmatrizen} +% +% \begin{tabular}{ l | l } +% I & II \\ \hline +% IV & III \\ +% \end{tabular} +% +% \flushleft +% \hfill +% \begin{tabular}{l | l l} +% Clockwise & & \\ \hline +% I & + & + \\ +% II & + & - \\ +% III & - & - \\ +% IV & - & + +% \end{tabular} +% \hfill +% \begin{tabular}{l | l l} +% Anticlockwise & & \\ \hline +% I & - & - \\ +% II & - & + \\ +% III & + & + \\ +% IV & + & - +% \end{tabular} +% \hfill +% +% \subsection{Die Matrizen} +% +% \subsubsection{Rotation um die x-Achse} +% +% \begin{equation} +% R_x (\alpha) = +% \begin{pmatrix} +% 1 & 0 & 0 \\ +% 0 & cos(\alpha) & -sin(\alpha) \\ +% 0 & sin(\alpha) & cos(\alpha) +% \end{pmatrix} +% \end{equation} +% +% \subsubsection{Rotation um die y-Achse} +% +% \begin{equation} +% R_y (\alpha) = +% \begin{pmatrix} +% cos(\alpha) & 0 & sin(\alpha) \\ +% 0 & 1 & 0 \\ +% -sin(\alpha) & 0 & cos(\alpha) +% \end{pmatrix} +% \end{equation} +% +% \subsubsection{Rotation um die z-Achse} +% +% \begin{equation} +% R_z (\alpha) = +% \begin{pmatrix} +% cos(\alpha) & -sin(\alpha) & 0 \\ +% sin(\alpha) & cos(\alpha) & 0 \\ +% 0 & 0 & 1 +% \end{pmatrix} +% \end{equation} + +\subsection{Spiralgalaxien} + +\subsection{Using Object Oriented Programming (OOP) techniques} + +In my case, the objects are galaxies. + +\subsubsection{Initialisation} + +The galaxy is initialised with the following objects: + +\begin{itemize} + \item A list storing the coordinates of each star + \begin{itemize} + \item X Coordinate + \item Y Coordinate + \item Z Coordinate + \end{itemize} + + \item A list storing the individual forces acting on the stars + \begin{itemize} + \item X Force + \item Y Force + \item Z Force + \end{itemize} + + \item A variable storing the number of stars generated in the galaxy + + \item Newtons gravitational constant +\end{itemize} + +\subsection{Generation of new stars} + +The function is given an integer defining the amount of stars that should be +newly generated. + +The newly generated stars are then appended to the list storing the coordinates. + +The counter counting the amount of stars in the galaxy is incremented. + +\subsection{Printing all the coordinates} + +The function cycles through the list storing the star coordinates and prints +them to the command line. + +\subsection{Calculating the Forces acting between the Stars} + +The function recieves two star objects and an axis on which the forces should +be calculated and returns the force acting on the given axis. In case of a +failture (The two given stars have got the same coordiantes), the function +just goes on to the next Star. + +The Forces can be calculated using the equation (\ref{eq:gravitation_law}). + +\subsection{Calculating the forces acting between each star in the galaxy and +each other star} + +To calculate the forces inbetween every star in the galaxy, the function cycles +through every star, looks if the force that should be calculated hat not been +calculated yet and calculates it. This includes testing if the force that should +be calculated is not the force inbetween a star and itself. + +The results of the calculations are stored in a list storinf the forces. + +\subsection{Printing all the individual forces} + +The function is able to print all the forces acting inbetween the stars if no +argument is given. If an argument n is given, the function print out the nth +star in the list. + +\subsection{Spherical cells} + + +\subsubsection{Testing if a point is inside or outside a sphere} + +In order to test is a point is inside a sphere, one just has to test if the +following conditions are all true: + +\begin{equation} + \begin{split} + S_x - S_r \leq P_x \leq S_x + S_r \\ + S_y - S_r \leq P_y \leq S_y + S_r \\ + S_z - S_r \leq P_z \leq S_z + S_r + \end{split} +\end{equation} + +\( P_x \) , \( P_y \) and \( P_z \) are the coordinates of the point to be tested, +\( S_x \) , \( S_y \) and \( S_z \) are the coordinates of the midpoint of the sphere and +\( S_r \) is the radius of the sphere. + +\subsubsection{Testing if a star is inside or outside of a sphere for a whole galaxy} + +While testting if a star is inside a sphere or not, because of the alignment +of the spheres, a point can be in more than one sphere at the same time. +To get rid of this problem, the software cycles over every star and searches +for matches within the spheres. If a match is found, the next star is tested. +This is pretty much as efficient as it can get. + +\begin{equation} + O(n) = n_{stars} \cdot n_{spheres} +\end{equation} + +\subsubsection{Generate the position of the spheres} + +Generating the position of the spheres is accomplished in the following way: +A 3D-grid is generated and the midpoints of the spheres are positioned on the +gridpoints. + +[Include Graphic] + +The distance the spheres have to each other ist defined using the following +function: + +\begin{equation} \label{sphere_distance} + \texttt{sphere\_distance} = \frac{\texttt{galaxy\_range}}{\texttt{sampling\_rate}} +\end{equation} + +The higher the \texttt{sampling\_rate} is, the more spheres get generated. + +The next goal is to find out the ``sweet spot'' generating the spheres. +When using a very low \texttt{sampling\_rate}, the reault gets inacurate, but +when using a high \texttt{sampling\_rate}, the calculations are not affected +in term of speed and efficiency. The Goal is therefor to find a sampling rate +that enables the generation of accurate but fast results. + +By being able to controll the accuracy anf therefor the time, it is possible to +teach the system to generate a galaxy in like one hour and it will automatically +set the sampling rate so low that the simulation will finish perfectly in time. + +\subsubsection{The radius of the spheres} + +The Radius of the spheres is dynamicly allocated to ensure that the whole galaxy +is covered. + +\begin{equation} \label{sphere_radius} + r = \sqrt{\texttt{sphere\_distance}^2 + \texttt{sphere\_distance}^2 + \texttt{sphere\_distance}^2} +\end{equation} + +\begin{equation*} + 1.7320508075688772 = \sqrt{1^2 + 1^2 + 1^2} +\end{equation*} + +The equation (\ref{sphere_radius}) highly depends on the equation +(\ref{sphere_distance}) and it's parameters. + +\begin{figure} + \includegraphics[width=1\textwidth]{figs/sphere_alignment_cc} + \caption{The Alignment of the spheres\\ + Left: The perfect alignment covering the complete space\\ + Right: A previously generated alignment using small spheres to cover the missing space + } + \label{sphere_alignment} +\end{figure} + +\subsubsection{Calculate the forces acting on the spheres} + +In order to reduce the time that is needed to calculate the forces inbetween +the stars, the stars are subdivided in different cells, in this case spheres. +After all the forces acing inside one sphere are calculated, the forces are +combined and applied to the midpoint of the sphere genrating a new coordinate: +the mean force. The mean force inbetween all the cells can be calculated. + +[Include description binary tree] + +[Include graphic binary tree] + +\subsubsection{Calculate the forces acting on all the spheres together} + +This should be 0. + +\subsubsection{Benchmarks} + +\begin{tabular}{l | l | l | l} + Nr of Stars & Sample rate & Galaxy Range & Time (s) \\\hline + + + 100 & 1 & 100 & 0.0814 \\ + 75 & 1 & 100 & 0.0499 \\ + 50 & 1 & 100 & 0.0295 \\ + 25 & 1 & 100 & 0.0116 \\ \hline + + 100 & 1 & 100 & 0.0828 \\ + 100 & 2 & 100 & 0.0909 \\ + 100 & 4 & 100 & 0.1832 \\ + 100 & 8 & 100 & 1.1114 \\ + 100 & 16 & 100 & 7.6944 \\ + 100 & 32 & 100 & 56.5731 \\ + 100 & 64 & 100 & 217.7768 \\ \hline + + 100 & 1 & 1 & 0.0809 \\ + 100 & 1 & 2 & 0.0844 \\ + 100 & 1 & 4 & 0.0782 \\ + 100 & 1 & 8 & 0.0758 \\ + 100 & 1 & 16 & 0.0847 \\ + 100 & 1 & 32 & 0.0815 \\ + 100 & 1 & 64 & 0.0770 \\ + +\end{tabular} + +The sample rate is the factor that influences the time the most. Knowing this, +it (the sample rate) can be used to controll the time in which a galaxy can +be created. +This is usefull in particular when using some very powerfull mashine with +limited time. + +\subsection{Calculate the Position of a Star after a timestep} + +Not to be considered: +\begin{itemize} + \item drag + \item any kind of resistance + \item acceleration +\end{itemize} -- cgit 1.4.1