NumMeth Winter 22: Chapter 3 beginning

This commit is contained in:
2022-10-27 12:59:24 +02:00
parent c58054f9dc
commit 7d3d754780
2 changed files with 58 additions and 0 deletions
Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

+58
View File
@@ -991,6 +991,64 @@ In, e.g., Active Galactic Nuclei (AGN) jets are launched from black holes. These
\chapter{N-body codes and general ideas of numerical methods}
In the previous chapter we have introduced a number of different concepts for the description of plasmas. From a physics viewpoint the main distinction here is between kinetic and fluid descriptions. Both descriptions can be cast into a hyperbolic conservation law (the prime example for this is the Navier-Stokes equation - a fluid description).
In terms of fluid dynamics two different viewpoints for the equations have been established:
\begin{itemize}
\item Lagrange picture: We follow a fluid element and changes are given by the material derivative
\item Euler picture: We look at a fixed point in space and a fluid flows through the volume.
\end{itemize}
\begin{figure}
\begin{center}
\pgfimage[width=.9\textwidth]{fig_chapter2/euler-lagrange}
\end{center}
\end{figure}
The derivatives are linked to each other like this
\begin{align}
\diffp{}{t} + \vec v \cdot \nabla = \frac{D}{D t}
\end{align}
For essentially any numerical scheme describing actual fluids the Euler picture is used. If we go back to our different descriptions of plasmas we see that kinetic descriptions of a plasma can be given as single particles. This would be the Lagrangian viewpoint!
The distinction in plasma physical simulations is more on the line of particle- and mesh-methods. The main branches are pure mesh methods (e.g., MHD simulations) and particle-mesh methods (e.g., particle-in-cell).
In first place we will now focus on pure particle methods. This is typically not used for plasma simulations. The reason behind this is simple: In pure particle methods the interaction is calculated between each particle with every other, but plasmas actually shield long range interactions. A typical application are \emph{N-body codes} used for gravitational simulations.
In order to discuss some general ideas and concepts, we will look into these N-body codes anyway!
\section{Simple approach to N-body}
We want to calculate the evolution of a system of particles that interact with each other through gravity.
A very naive interpretation of an N-body code looks like this
\begin{itemize}
\item Build a list of particles with mass, position and velocity
\item Iterate through the particle list
\item Calculate the distance to each other particle and the associated force
\item Update the velocity from the force
\item Update the position from the velocity
\end{itemize}
This looks nice since it's a very simple approach, but actually everything's bad. The algorithm is $\mathcal{O}(N^2)$ with respect to the particle number and it is numerically unstable.
We are actually using a ``forward Euler'' scheme here
\begin{align}
\vec{r}_i^{n+1} &= \vec{r}_i^n+\Delta t\cdot \vec{v}_i^{n}\\
\vec{v}_i^{n+1} &= \vec{v}_i^n+\Delta t\cdot \vec{a}_i^{n}\\
\vec{a}_i^n &= \sum_{j\neq i}G \frac{m_i m_j}{m_i} \frac{\vec{r}_i^n - \vec{r}_j^n}{|\vec{r}_i^n - \vec{r}_j^n|^3}
\end{align}
The Euler scheme requires very small time steps (this is bad\dots)
A first improvement to such a scheme is the so called \emph{Leapfrog}: We define positions at time $t^n, t^{n+1}, t^{n+2},\dots$ and velocities at $t^{n-1/2}, t^{n+1/2}, t^{n+3/2},\dots$
\begin{align}
\vec{r}^n &= \vec{r}^{n-1}+\Delta t \cdot
\end{align}
- N-Body
- Stabilität, Genauigkeit, Konvergenz
- Fast Multipole