From 617cfb93b1f470c9acd04720b7ffa9d8a8c1f12f Mon Sep 17 00:00:00 2001 From: Felix Spanier Date: Tue, 15 Nov 2022 23:34:40 +0100 Subject: [PATCH] NumMeth 22: Exercise 4 --- nummeth-ws22/exercises/uebung4.tex | 86 ++++++++++++++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 nummeth-ws22/exercises/uebung4.tex diff --git a/nummeth-ws22/exercises/uebung4.tex b/nummeth-ws22/exercises/uebung4.tex new file mode 100644 index 0000000..1abe358 --- /dev/null +++ b/nummeth-ws22/exercises/uebung4.tex @@ -0,0 +1,86 @@ +\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} +%------------------------------------------------------------------------------