diff --git a/nummeth-ws23/exercises/diode.png b/nummeth-ws23/exercises/diode.png new file mode 100644 index 0000000..ade4d02 Binary files /dev/null and b/nummeth-ws23/exercises/diode.png differ diff --git a/nummeth-ws23/exercises/uebung2.tex b/nummeth-ws23/exercises/uebung2.tex new file mode 100644 index 0000000..a983235 --- /dev/null +++ b/nummeth-ws23/exercises/uebung2.tex @@ -0,0 +1,91 @@ +\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 2}\\ +\end{center} +\noindent +% +\section*{\large Exercise 2: Thermal conduction}\vspace*{-0.0cm} +% + +\emph{Previous experience tells me that a tree-code exercise is too excessive\dots we just look at the Poisson equation instead.} + + + +\medskip +We return to the 2-dimensional Cartesian rubber duck ocean. The mad scientist +and villain Dr. Xilef has the diabolic to to seize world domination world domination, has placed point-shaped immersion heaters in the ocean at several immersion heaters into the ocean, which heat it up with $T=1000K$. The rubber ducks, fearing for their habitat, have then set up refrigerators around the ocean, so that the edge is kept at a comfortable $T_\text{edge}= 300 K$. + +The ocean is slowly heating up according to the thermal conduction equation + +\begin{equation} + \frac{\partial}{\partial t} T(\vec{x}) = a \Delta T(\vec{x}) +\end{equation} + +until it reaches an equilibrium ($\frac{\partial}{\partial +t}T = 0$). + +\bigskip + +Solve the Poisson equation with given boundary conditions for the temperature distribution in the rubber duck ocean. + +\medskip +Use a simple Jacobi iteration + +\bigskip + +\textbf{Bonus material} + +Use an advanced - faster - method (multigrid or FFT). Compare the convergence rate by plotting the average temperature to the last step over the run time. + +Since the FFT method has not been discussed in great detail in the lecture here a short discussion: + +For the Poisson equation +$$\nabla^2 \varphi(x,y) = f(x,y)$$ +on a grid with periodic boundary conditions the Fourier transform yields +$$-(k_x^2+k_y^2) \hat\varphi(k_x,k_y) = \hat f(k_x,k_y)$$ +which can readily be solved and transformed back. Dirichlet or von Neumann boundary conditions can be achieved when using only $\sin$ or $\cos$ (in case of Dirichlet: $\sin$ is 0 on the boundary, the solution is known up to a constant value). Discrete sine/cosine transform are readily available. + + + +\end{document} +%------------------------------------------------------------------------------ diff --git a/nummeth-ws23/exercises/uebung3.tex b/nummeth-ws23/exercises/uebung3.tex new file mode 100644 index 0000000..5bff914 --- /dev/null +++ b/nummeth-ws23/exercises/uebung3.tex @@ -0,0 +1,84 @@ +\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 3}\\ +\end{center} +\noindent +% +\section*{\large Exercise 3: Pierce diode}\vspace*{-0.0cm} +% + +\begin{center} + \includegraphics[width=12cm]{diode.png} +\end{center} + +Given is a one-dimensional vacuum tube (so-called \emph{Pierce diode}), which is provided with electrodes at both ends. The two electrodes are short-circuited and earthed, so that the +electrical potential at the edge is kept at $\Phi(0) = \Phi(L) = 0$. + +From the left electrode, mono-energetic electrons ($E_e$) are injected at a constant rate $n$. If an electron hits one of the two electrodes ($x = 0$ or $x = L$), it is discharged to the ground. + +Due to the motion of the ion background, the gas in the tube is quasi-neutral ($\left<\rho\right> = 0$), thus the mean electric potential $\left<\Phi\right>=0$, and only local fluctuations occur. + +\bigskip +\textbf{a)} Simulate the behaviour of the Pierce diode using an +electrostatic 1D PiC code. Observe how, above a critical +electron injection rate, chaotic behaviour breaks out in the Pierce diode.\\ +It is sufficient to use the CIC scheme to perform the charge assignment. + +\medskip +The electric field can be calculated either by solving Poisson's equation +\begin{equation} + \Delta \phi = - 4 \pi \rho +\end{equation} +or directly by discretisation of +\begin{equation} + \nabla \cdot \vec{E} = 4 \pi \rho +\end{equation} + + +\vspace{7cm} +No rubber ducks were harmed in the making of this exercise. + + + +\end{document} +%------------------------------------------------------------------------------