Files
teaching/nummeth-ws22/exercises/uebung1.tex
T
2022-10-27 17:46:21 +02:00

85 lines
3.2 KiB
TeX

\documentclass[12pt,a4paper]{uebungen}
\usepackage{german}
\usepackage[utf8]{inputenc}
\usepackage{epsfig}
\usepackage[amssymb]{SIunits}
\usepackage{wrapfig}
\usepackage{graphics}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{pgf}
\usepackage{listings}
\lstset{language=[ANSI]C++,basicstyle=\ttfamily,commentstyle=\itshape,
keywordstyle=\bfseries,extendedchars=true,backgroundcolor=\color{gray}}
%------------------------------------------------------------------------------
%\graphicspath{{../../../GALLERY/}}
%------------------------------------------------------------------------------
\setlength{\topmargin}{-2.5cm}
\setlength{\textheight}{26.0cm}
\setlength{\textwidth}{17cm}
\setlength{\oddsidemargin}{-0.5cm}
\setlength{\evensidemargin}{-0.5cm}
\setlength{\parskip}{0pt}
\setlength{\parindent}{0pt}
\pagestyle{empty}
%------------------------------------------------------------------------------
\newcommand{\vt}[1]{\vec{#1}}
\newcommand{\mt}[1]{\underline{\underline{#1}}}
\newcommand{\dt}[1]{\left\vert\underline{\underline{#1}}\right\vert}
\newcommand{\mo}{\!\!\!\!\!-1}
%------------------------------------------------------------------------------
\def\bbbr{{\rm I\!R}}
%------------------------------------------------------------------------------
\begin{document}
%------------------------------------------------------------------------------
\thispagestyle{myheadings}
\begin{center}
{\bf \underline{\Large Exercises in ``Numerical Methods in Plasma Astrophysics''}}\\
%\hfill\\
%{\bf \large }\\
\hfill\\
{\bf \large Winter 2022/23 \hfill Exercise 1}\\
\end{center}
\noindent
%
\section*{\large Exercise 1: N-Body Rubber Ducks}\vspace*{-0.0cm}
%
On the infinitely large, two-dimensional rubber duck ocean there thousands and thousands of rubber ducks swimming along happily. Each rubber duck can be described completely by its position $\vec{x} = (x_0, x_1)$ and velocity $\vec{v} = (v_0, v_1)$.
The interaction two rubber ducks is described by the 6-12- potential
\begin{equation}
V(r) =\left(\frac{r_m}{r}\right)^{12} - 2 \left(\frac{r_m}{r}\right)^6
\end{equation}
The equilibrium distance $r_m$ is the optimal psychological balance between
claustrophobia and loneliness of the rubber ducks.
\bigskip
\textbf{a)} Simulate the development of the rubber duck population on a rectangular part
of the rubber duck ocean (periodic boundary conditions!) with a homogeneous spatial distribution and a
normal velocity distribution.
Plot the 2D distribution of the rubber ducks and analyse their behaviour depending
on the ``Temperature'' $<|\vec{v}|^2>$.
\medskip
\textbf{b)}
How is the total energy (kinetic + potential energy) developing for the Euler and Leapfrog scheme?
\medskip
\textbf{c)}
In case of cooling (e.g., using a velocity dependent friction term) how are the rubber ducks arranging?
\medskip
\textbf{d)} Plot the runtime for Euler and Leapfrog scheme depending on the number of rubber ducks in the system.
\vfill
Please hand in the solutions via Moodle. Please include the source code. You may use whatever programming language (or hardware\dots) you like
\end{document}
%------------------------------------------------------------------------------