Numerical Methods 23/24: Exercise 5
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
\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 2023/24 \hfill Exercise 5}\\
|
||||
\end{center}
|
||||
\noindent
|
||||
%
|
||||
\section*{\large Exercise 5: Sod shock tube}\vspace*{-0.0cm}
|
||||
%
|
||||
|
||||
After we have learned in the last exercise that some methods are better suited to simulate
|
||||
are better suited to simulating shocks than others, let's approach the problem a little more realistically.
|
||||
|
||||
Let us assume a one-dimensional pipe filled with an ideal gas, which is defined by
|
||||
the parameters $\rho$ (density), $P$ (pressure) and $u$ (flow).
|
||||
are described. They behave according to the Euler equation (in
|
||||
conservation form):
|
||||
|
||||
\begin{equation}
|
||||
\frac{\partial}{\partial t}
|
||||
\left( \begin{array}{c} \rho \\ \rho u\\ \frac{1}{2}\rho u^2 \end{array} \right)
|
||||
+ \frac{\partial}{\partial x} \left( \begin{array}{c} \rho u\\ P + \rho u^2 \\ (P+ \frac{1}{2}\rho u^2) u\end{array} \right) = 0
|
||||
\end{equation}
|
||||
|
||||
(Where the adiabatic equation $P = \rho^\gamma$ with $\gamma = \frac{5}{3}$ closes the system of equations).
|
||||
|
||||
\medskip
|
||||
Let fixed values for these parameters be given at the left and right ends of the pipe.
|
||||
|
||||
\begin{equation}
|
||||
\left( \begin{array}{c}\rho_L\\P_L\\u_L\end{array}\right)
|
||||
=
|
||||
\left( \begin{array}{c}1.0\\1.0\\0.0\end{array} \right)
|
||||
, \quad
|
||||
\left( \begin{array}{c}\rho_R\\P_R\\u_R\end{array}\right)
|
||||
=
|
||||
\left( \begin{array}{c}0.125\\0.1\\0.0\end{array}\right)
|
||||
\end{equation}
|
||||
|
||||
At the beginning of the simulation, let the entire left or right half of the tube be
|
||||
is filled with the respective state and separated by a membrane, which is
|
||||
suddenly removed - a shock is formed.
|
||||
|
||||
\bigskip
|
||||
|
||||
\textbf{a)} Linearise the Euler equation so that it has the form
|
||||
|
||||
\begin{equation}
|
||||
\frac{\partial \vec{s}}{\partial t} + \mathbf{A}(s) \frac{\partial \vec{s}}{\partial x} = 0
|
||||
\end{equation}
|
||||
|
||||
with the state vector $\vec{s} = \left( \begin{array}{c} \rho\\ \rho u\\ \frac{1}{2}\rho u^2\end{array} \right)$ assumes.
|
||||
|
||||
\bigskip
|
||||
\textbf{b)} Simulate the Sod Shock Tube scenario with Upwind,
|
||||
Lax-Wendroff and Leapfrog methods. Compare numerical diffusivity
|
||||
and stability.
|
||||
|
||||
\vfill
|
||||
|
||||
No rubber ducks were endangered in the preparation of this exercise sheet. Except
|
||||
the ones that were already in the tube. What are they looking for? For real.
|
||||
|
||||
|
||||
\end{document}
|
||||
%------------------------------------------------------------------------------
|
||||
Reference in New Issue
Block a user