87 lines
2.9 KiB
TeX
87 lines
2.9 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 4}\\
|
|
\end{center}
|
|
\noindent
|
|
%
|
|
\section*{\large Exercise 4: Burgers equation}\vspace*{-0.0cm}
|
|
%
|
|
|
|
As a simple model of a viscosity-free one-dimensional flow, the inviscid \emph{burger equation} can be used:
|
|
|
|
\begin{equation}
|
|
\frac{\partial u}{\partial t} + u \frac{\partial u}{\partial x} = 0
|
|
\end{equation}
|
|
|
|
or in the alternative ``conservation'' form:
|
|
|
|
\begin{equation}
|
|
\frac{\partial u}{\partial t} + \frac{1}{2}\frac{\partial u^2}{\partial x} = 0
|
|
\end{equation}
|
|
|
|
This differential equation tends to form shocks.
|
|
|
|
\bigskip
|
|
|
|
\textbf{a)} Simulate the Burgers equation on a domain $x \in [0,\,L]$ with periodic boundary conditions and the initial condition
|
|
\begin{equation}
|
|
u(x) = \sin\left( \pi \frac{x}{L} \right) + \varepsilon
|
|
\end{equation}
|
|
|
|
(The $\varepsilon$ here is only to prevent a zero pass through numerical inaccuracy).
|
|
|
|
\textbf{b)} The same again, with the start condition
|
|
\begin{equation}
|
|
u(x) = -\sin\left(\pi \frac{x}{L}\right) - \varepsilon
|
|
\end{equation}
|
|
|
|
\bigskip
|
|
For both initial conditions, use left-hand, right-hand and central derivatives in the locus, and compare the results.
|
|
|
|
\vfill
|
|
|
|
In preparing this exercise sheet, no rubber ducks were endangered that did not independently put themselves in danger with a surfboard.
|
|
|
|
\end{document}
|
|
%------------------------------------------------------------------------------
|