diff --git a/nummeth-ws22/fig_chapter5/cweno4.pdf b/nummeth-ws22/fig_chapter5/cweno4.pdf new file mode 100644 index 0000000..41cf8a5 Binary files /dev/null and b/nummeth-ws22/fig_chapter5/cweno4.pdf differ diff --git a/nummeth-ws22/skript.tex b/nummeth-ws22/skript.tex index 342c2b5..fc18b5d 100644 --- a/nummeth-ws22/skript.tex +++ b/nummeth-ws22/skript.tex @@ -3824,6 +3824,1476 @@ where $a_\text{min}$ and $a_\text{max}$ are the minimum and maximum propagation \end{align} in order for the construction of $\hat{u}^n(x,t)$ described above to work, but once we determine the corresponding flux function this can be relaxed to require only $|ak/h<1|$ as in Godunov's method with the exact Riemann solution. +\subsection{Modified conservation law} + +One natural way to $\hat w(x/t)$ is to compute the exact Riemann solution to some modified conservation law $\partial_t \hat u +\partial_x \hat f(\hat u) = 0$, with a flux function $\hat f(u)$ that is presumably easier to work with than the original flux $f(u)$. By using the integral form of this conservation law, we see that +\begin{align} + \hat f(u_r) - \hat f(u_l) = f(u_r) - f(u_l) + \label{eq:leveque14.13} +\end{align} +The resulting numerical flux function is then given by +\begin{align} + F(u_l,u_r) = \hat f(\hat w(0)) + f(u_r) - \hat f(u_r) +\end{align} + +\subsection{Roe's approximate Riemann solver} + +One of the most popular Riemann solvers currently in use is due to Roe. The idea is +to determine $\hat u(x, t)$ by solving a constant coefficient linear system of conservation laws +instead of the original nonlinear system, i.e., we solve a modified conservation law as +described above with flux $\hat f(u) = \hat Au$. Of course the coefficient matrix used to define this linear system must depend on the $u_l$ and $u_r$, in order for \eqref{eq:leveque14.13} to be satisfied, so we will write the linear system for $\hat u$ as +\begin{align} + \partial_t \hat u + \hat A(u_l,u_r)\partial_x \hat u = 0 +\end{align} +This linear Riemann problem is relatively easy to solve. If $\hat A$ has eigenvalues $\hat{\lambda}_i$ and eigenvectors $\hat{r}_i$ and if we decompose +\begin{align} + u_r - u_l = \sum_p \alpha_p \hat{r}_p +\end{align} +then +\begin{align} + \hat w(\zeta) = u_l + \sum_{\hat{\lambda}_p < \zeta} \alpha_p \hat{r}_p +\end{align} +We still have the problem of determining $\hat A(u_l, u_r)$ in a reasonable way. Roe suggested +that the following conditions should be imposed on $\hat A$: +\begin{enumerate} +\item $\hat A(u_l, u_r)(u_r-u_l) = f(u_r) - f(u_l)$ +\item $\hat A(u_l, u_r)$ is diagonalizable with real eigenvalues +\item $\hat A(u_l, u_r) \to f^\prime(\hat u)$ smoothly as $u_l,u_r \to u$. +\end{enumerate} + +\section{Semi-discrete Methods} + +The methods discussed so far have all been fully discrete methods, discretized in both +space and time. At times it is useful to consider the discretization process in two stages, +first discretizing only in space, leaving the problem continuous in time. This leads to +a system of ordinary differential equations in time, called the ``semi-discrete equations''. +We then discretize in time using any standard numerical method for systems of ordinary +differential equations. This approach of reducing a PDE to a system of ODEs, to which +we then apply an ODE solver, is often called the method of lines. + +This approach is particularly useful in developing methods with order of accuracy +greater than 2, since it allows us to decouple the issues of spatial and temporal accuracy. +We can define high order approximations to the flux at a cell boundary at one instant +in time using high order interpolation in space, and then achieve high order temporal +accuracy by applying any of the wide variety of high order ODE solvers. + +\subsection{Evolution equations for the cell averages} + +Let $U_j(t)$ represent a discrete approximation to the cell average of $u$ over the $j$th cell at time $t$, i.e., +\begin{align} + U_j(t) \approx \bar{u}_j(t) = \frac{1}{h} \int_{x_{j-1/2}}^{x_{j+1/2}} \dd x u(x,t) +\end{align} +We know from the integral form of the conservation law that the cell average $\bar{u}_j (t)$ evolves according to +\begin{align} + \bar{u}^\prime_j(t) = -\frac{1}{h}\left[ f(u(x_{j+1/2},t)) - f(u(x_{j-1/2},t)) \right] = H(u(\cdot,t);j) +\end{align} +We now let $\mathcal{F}(U(t);j)$ represent an approximation to $f(u(x_{j+1/2},t))$, obtained from the discrete data $U(t) = \{U_j(t)\}$. For example, we might solve the Riemann problem with data $U_j(t)$ and $U_{j+1}(t)$ for the intermediate state $u^*(U_j(t),U_{j+1}(t))$ and then set +\begin{align} + \mathcal{F}(U(t);j) = f(u^*(U_j(t),U_{j+1}(t))) + \label{eq:leveque17.3} +\end{align} +Replacing the true fluxes by $\mathcal{F}$ and the cell average $\bar{u}_j(t)$ by $U_j(t)$, we obtain a discrete system of ordinary differential equations for the $U_j(t)$ +\begin{align} + U_j^\prime(t) = -\frac{1}{h} \left[ \mathcal{F}(U(t);j) - \mathcal{F}(U(t);j-1) \right] = \mathcal{H}(U(t);j) + \label{eq:leveque17.4} +\end{align} +Note that this is a coupled system of equations since each of the fluxes $\mathcal{F}$ depends on two or more of the $U_j(t)$. + +We can now discretize in time. For example, if we discretize \eqref{eq:leveque17.4} using Euler's +method with time step $k$, and let $U_j^n$ now represent our fully-discrete approximation to +$U_j(t^n)$, then we obtain +\begin{align} + U_j^{n+1} &= U_j^n + k \mathcal{H}(U(t);j)\\ + &= U_j^n -\frac{k}{h} \left[ \mathcal{F}(U(t);j) - \mathcal{F}(U(t);j-1) \right] +\end{align} +which is in the familiar form of a conservative method. In particular, if $\mathcal{F}$ is given by \eqref{eq:leveque17.3}, then this is simply Godunov's method. More generally, however, $\mathcal{F}(U(t);j)$ represents an approximation to the value of f(u(xj+1/2i1)) at one point in time, whereas the standard numerical flux $F(U; j) $used before has always represented an approximation to the average of $f (u(x_{j+1/2}, t))$ over the time interval $[t^n, t^{n+1}]$. In Codunov's method these are the same, since $u(x_{j+1/2}, t)$ is constant in time in the Riemann solution. + +To obtain higher order accuracy, we must make two improvements: the value $\mathcal{F}$ obtained by piecewise constant approximations in \eqref{eq:leveque17.3} must be improved, and the first +order accurate Euler method must be replaced by a higher order time-stepping method. +One advantage of the method of lines approach is that the spatial and temporal accuracy +are decoupled, and can be considered separately. This is particularly useful in several +space dimensions. + +One way to obtain greater spatial accuaracy is to use a piecewise linear approximation +in defining F. From the data $\{U_j(t)\}$ we can construct a piecewise linear function $\tilde u(x)$ using slope limiters. Then at the interface $x_{j+1/2}$ we have values on the left and right from the two linear approximations in each of the neighboring cells. Denote these values by +\begin{align} + U_{j+1/2}^L &= U_j + \frac{h}{2} \sigma_j \\ + U_{j+1/2}^R &= U_{j+1} - \frac{h}{2} \sigma_{j+1} +\end{align} +A second order accurate approximation to the flux at this cell boundary at time $t$ is then +obtained by solving the Riemann problem with left and right states given by these two +values, and setting +\begin{align} + \mathcal{F}(U;j) = f(u^*(U_{j+1/2}^L,U_{j+1/2}^R)) +\end{align} + + +\subsection{ENO schemes} + + + +Many of the problems addressed in the previous section can be solved with CWENO. +with CWENO (\textbf{C}entral \textbf{w}eighted \textbf{e}ssential \textbf{n}on\textbf{o}sscillatory) schemes, which was first described by Kurganov and Levy +(\cite{kurganov-levy:2000}). The CWENO method is +a solution method for hyperbolic DGLs with third-order accuracy in smooth domains +order accuracy in smooth domains and separate treatment of shocks. + +\subsection{Structure of the method} +Starting from a hyperbolic DGL +\begin{align} +\diffp{}{t}u(x,t) + \diffp{}{x}f(u(x,t)) = 0 +\end{align} +mean values are defined over the cells and put into a flow representation. +flow representation. From this follows +\begin{align} +\bar u(x,t) &= \frac{1}{\delta x}\int_{x-1/2}^{x+1/2}u(\xi,t)\ d\xi\\ +\bar u_{j+1/2}^{n+1} &= \bar u_{j+1/2}^{n} + \int_t^{t+1}\left(f(u_{j+1},\tau)-f(u_{j},\tau)\right)\ d\tau +\end{align} +In the next step, with the help of the cell averages, the function +$u$ polynomially reconstructed in the cells. With the help of the polynomials +can then be used to determine values at arbitrary points in the cell +can be determined. When determining the polynomials, not only the cells themselves are taken into account, but also the respective cells themselves, but also the left and right neighbouring cells. +\begin{align} +P_j(x) = w_L P_L(x) + w_C P_C(x) + w_R P_R(x) +\end{align} +$P_C$ is a quadratic polynomial that obtains the central cell mean value +whereas the other two polynomials are linear and obtain the +left or right mean value. +\begin{align} +P_L(x) &= \bar u_j^n + \frac{\bar u_{j+1}^n-\bar u_j^n}{\delta x}(x_j-x)\\ +P_R(x) &= \bar u_j^n + \frac{\bar u_j^n-\bar u_{j-1}^n}{\Delta x}(x_j-x)\ +P_C(x) &= \bar u_j^n + \frac{1}{12}(\bar u_{j+1}^n - 2\bar u_j^n +\bar u_{j-1}^n) \nonumber \ +& & +\frac{\bar u_{j+1}^n-\bar u_{j-1}^n}{2\Delta x}(x_j-x) + \frac{\bar u_{j+1}^n - 2\bar u_j^n +\bar u_{j-1}^n}{(\Delta x)^2}(x_j-x)^2 +\end{align} +The parabola in the centre is clearly chosen so that it satisfies the following +equation +\begin{align} +P_{\textrm{Exact}}(x) = c_R P_R(x) + c_C P_C(x) +c_L P_L(x) +\end{align} +$P_\textrm{Exact}$ is the unique parabola that obtains all three +cell mean values. It is given by +\begin{align} +P_{\textrm{Exact}}(x) = u^n_j+u_j'(x-x_j) +\frac{1}{2}u_j''(x-x_j)^2 +\end{align} + +The values of the constants $c$ were chosen as $c_L=c_R=1/4$ and $c_C=1/2$ +respectively. Kurganov and Levy show that without loss of accuracy +any other symmetrical combination of $c_i$ with $\sum_i c_i=1$ +can be chosen. From $c_i$ the weights are later calculated +$w_i$ for the CWENO method. + +In the reconstruction it should be noted that this is only valid in the +one-dimensional case. In the multidimensional case, in $P_C$ the +multidimensional Laplace operator must be used in $P_C$. + +Many deThe next step in the CWENO procedure is now to determine the +weighting $w_i$ (with $i +\in \{ L,C,R \}$). These are to be chosen in such a way that in smooth +the maximum accuracy is achieved in smooth areas. At shocks, however +the ideal one-sided derivative should be chosen (to avoid oscillations). +oscillations). The weights are defined as follows +\begin{align} +\label{eq:weights} +w_i &= \frac{\alpha_i}{\sum_m \alpha_m}\\ +\alpha_i &= \frac{c_i}{(IS_i + \epsilon)^p} +\end{align} +The constant $\epsilon$ prevents the denominator from becoming zero and has the value +has the value $10^{-6}$ (the influence of $\epsilon$ is negligible). +negligible). When choosing $\epsilon$ it must be noted that +the constant is small against values of $IS$. $p$ was chosen by Kurganov +and Levy as $2$, with this parameter one can choose between +high accuracy and good shock resolution. $IS_i$ is an +``smoothness'' indicator that searches for shocks and is defined as follows +defined as follows +\begin{align} +IS_i &= \sum_{l=1}^2\int_{x_j-1/2}^{x_j+1/2}(\delta x)^{2l-1}(P_i^{(l)}(x))^2 dx\\ +\Rightarrow IS_L &=& (\bar u_j^n - \bar u_{j-1}^n)^2\\ +IS_R &=(\bar u_j^n - \bar u_{j+1}^n)^2\\ +IS_C &= \frac{13}{3}(\bar u_{j+1}^n - 2 \bar u_j^n + \bar u_{j-1}^n)^2 + \frac{1}{4}(u_{j+1}^n-u_{j-1}^n)^2 +\end{align} + +It makes sense to introduce the following abbreviations +\begin{align} +P_j(x) &= A_j + B_j (x-x_j) + \frac{1}{2}C_j(x-x_j)^2\\ +A_j &= \bar u_j^n -\frac{w_c}{12}\left(\bar u_{j+1}^n -2 \bar u_j^n+\bar u_{j-1}^n\right)\\ +B_j &= \frac{1}{\Delta x}\left(w_r(\bar u_{j+1}^n - \bar u_j^n) + w_c \frac{\bar u_{j+1}^n- \bar u_{j-1}^n}{2} + w_l (\bar u_j^n - \bar u_{j-1}^n)\right)\\ +C_j &= 2 w_c \frac{\bar u_{j+1}^n - 2\bar u_j^n + \bar u_{j-1}^n}{(\delta x)^2} +\end{align} + + +\begin{figure} + \begin{center} + \pgfimage[width=.6\textwidth]{fig_chapter5/cweno4.pdf} + \end{center} + \caption{schematic drawing of the CWENO procedure} + \label{fig:cweno4.pdf} +\end{figure} + + +Based on these considerations about the reconstruction in the +grid cells, the time step can now be developed. The +basic procedure is shown in fig. \ref{fig:cweno4.pdf}. + +At this point a distinction is made between the fully discrete scheme, in which the +time derivative is discretised and the semi-discrete scheme, in which only the +only the spatial derivative is discretised. + +In the full-discrete scheme, in each cell, the +propagation velocities of the discontinuities are determined in each cell. +\begin{align} +a_{j+1/2}^n = max\left(\diffp{f}{u}(u_{j+1/2}^-),\diffp{f}{u}(u_{j+1/2}^+)\right) +\end{align} +Accordingly, areas are determined in which the discontinuity is +spreads as well as areas which have a smooth solution. (``$+$'' refers +refers to the right side of the discontinuity, ``$-$'' to the left). +For the exact calculation of $w_j$ I would like to refer here to Kurganov and Levy +and instead refer directly to the semi-discrete scheme, which is actually +which is actually used here. + +In the semi-discrete limit case, the time step goes towards zero, which means that the +radii of the discontinuities also converge towards zero. +converge. With this limit, the values of $u$ from the +reconstruction on the left and right sides, so that the flux can also be determined. +flux can be determined. +\begin{align} +u_{j+1/2}^+(t) &= A_{j+1} - \frac{\delta x}{2} B_{j+1} + \frac{(\delta x)^2}{8} C_{j+1} \\ +u_{j+1/2}^-(t) &= A_{j} + \frac{\delta x}{2} B_{j} + \frac{(\delta x)^2}{8} C_{j} \\ +\Rightarrow \frac{d\bar u_j}{dt} &= -\frac{1}{2\delta x} \left( f(u_{j+1/2}^+(t)) + f(u_{j+1/2}^-(t)) - f(u_{j-1/2}^+(t)) - f(u_{j-1/2}^-(t))\right) \nonumber\\ +&+\frac{a_{j+1/2}^+}{2\delta x}\left(u_{j+1/2}^+(t) - u_{j+1/2}^-(t)\right)-\frac{a_{j-1/2}^+}{2\delta x}\left(u_{j-1/2}^+(t) - u_{j-1/2}^-(t)\right) +\end{align} + +It is easy to see that the expression formed in this way can be put into flow form. +can be put into flow form. + +\subsection{Advantages of the method} + +As already described above, the central advantage of the +CWENO method compared to classical difference schemes is that +CWENO does not tend to oscillate at shocks and still has third-order accuracy in smooth areas. +third-order accuracy in smooth areas. As a result, CWENO +also shows less numerical dissipation than other methods that limit at +limit on shocks. Moreover, there is no need for a Riemann solver, which for each +the Jacobi determinant for each point and determines the eigenvectors. +eigenvectors. This makes the method considerably less +more time-consuming than other approaches. + + +\chapter{MHD equations} + + + + +\section{MHD Equations and Properties} + +\label{sec:1_chp1} + +Most of the visible universe is in the plasma state where the kinetic +energy of charged particles is much larger than their potential energy. +Examples in our own solar system are the atmosphere of our sun and +the stream of charged particles from the sun called solar wind which +interacts with unmagnetized and magnetized bodies in the solar system. +In the latter case this creates planetary magnetospheres of which +our own terrestrial magnetosphere is the best studied example. At +large distances from the sun the solar wind interacts with the interstellar +neutral and charged material. + +In general, properties and evolution of a plasma involves electromagnetic +interaction and is much more complicated than that of a hydrodynamic +system. Particularly on small spatial scales, aspects of charge neutrality +and gyro motion of charged particles complicate the plasma dynamics. +Fortunately, many systems such as solar magnetic structures and most +planetary magnetospheres are much larger than typical kinetic scales. +For instance, the terrestrial magnetosphere has typical scales of +10s of Earth radii (1$R_{E}\approx$ 6400 km) while ion gyro scales +are a few 100 km and electron scales are much smaller. This argument +does not imply that kinetic physics can be ignored, but rather that +errors due to kinetic physics on the much larger magnetospheric scales +are often small. Therefore, many large scale plasma systems can be +understood in terms of a collective fluid plasma description called +magnetohydrodynamics. The formulation of the magnetohydrodynamic (MHD) +equations by Alfv\'en, Schl\"uter and others enabled the theoretical understanding +of many plasma systems such as magnetospheres, solar atmospheric structures, +and laboratory applications from the 1950s. + +Plasma fluid equations can be systematically derived by integrating +the moments of the Boltzmann equation in velocity space which yields +equations for mass, momentum, and energy density in space for electrons +and each ion species. Assuming a single ion species only and charge +neutrality, and defining a total mass density $\rho$ and average +bulk velocity $\mathbf{u}$ through $\rho=n(m_{i}+m_{e})$ and $\rho\mathbf{u}=n(m_{i}\mathbf{u}_{i}+m_{e}\mathbf{u}_{e})$, +where $m_{e}$ and $m_{i}$ are electron and ion mass, $n$ is number +density and $\mathbf{u}_{e}$ and $\mathbf{u}_{i}$ are electron and +ion bulk velocity, the plasma fluid continuity and momentum equations +become +\begin{eqnarray} +\frac{\partial\rho}{\partial t}+\nabla\cdot\rho\mathbf{u} & = & 0\\ +\frac{\partial\rho\mathbf{u}}{\partial t}+\nabla\cdot(\rho\mathbf{uu})+\frac{m_{e}m_{i}}{e^{2}}\nabla\cdot(\frac{1}{\rho}\mathbf{jj}) & = & -\nabla p+\mathbf{j}\times\mathbf{B}\\ +\mathbf{E}+\mathbf{u}\times\mathbf{B}-\frac{m_{e}m_{i}}{e^{2}\rho}\left[\frac{\partial\mathbf{j}}{\partial t}+\nabla\cdot\left(\mathbf{uj}+\mathbf{ju}\right)\right] & = & -\frac{M}{e\rho}\nabla p_{e}+\frac{m_{i}}{e\rho}\mathbf{j}\times\mathbf{B}+\eta\mathbf{j} +\end{eqnarray} +(e.g. \cite{krall83}). Here $e$ represents the elementary +charge, $\mathbf{j}$ current density, $p$ the sum of electron and +ion pressure, $\mathbf{B}$ the magnetic field, $\mathbf{E}$ the +electric field, $M=m_{e}+m_{i}$, and $\eta$ resistivity. The first +equation represents the continuity equation for mass, the second is +the equation for the bulk momentum, and the third is an equation for +the current density or electron momentum better known as generalized +Ohm's law. Applying scaling laws in equation (3), the term in square +brackets scales with the electron inertial scale $\lambda_{e}^{2}/L_{0}^{2}$ +where $\lambda_{e}=c/\omega_{pe}$ represents the electron inertial +scale, $\omega_{pe}$ the electron plasma frequency, and $L_{0}$ +a typical scale length of the plasma system under consideration. The +first two terms on the right side of generalized Ohm's law (3) scale +with the ion inertial scale $\lambda_{i}/L_{0}$ with $\lambda_{i}=c/\omega_{pi}$ +where the $\mathbf{j\times B}$ term is addressed as the Hall term. +For the solar corona $\lambda_{e}$ is a few cm or less and for the +magnetosphere $\lambda_{e}$ is of the order of several 100 m to a +few km such that for almost all applications the corresponding term +can be ignored in generalized Ohm's law. This is the case also for +the $\mathbf{jj}$ term in the momentum equation which scales with +the electron inertial length and provides the electron contribution +to the bulk momentum equation. Although the ion inertia scale is much +larger than the corresponding electron scale $\lambda_{i}^{2}/\lambda_{e}^{2}=m_{i}/m_{e}$, +it is often still much smaller than typical scales of the system, +particularly for solar applications. Note also that the electron velocity +can be expressed as $\mathbf{u}_{e}=\mathbf{u}-\mathbf{j}/ne$ where +the current density term scales with $\lambda_{i}/L_{0}$ such that +the electron velocity can be significantly different from the ion +of bulk plasma velocity when the ion inertial scale is important (Hall +physics). + +Ignoring the electron and ion inertial terms on sufficiently large +scales, equation (3) becomes the well known resistive Ohm's law. The +three equations are complemented by equations for energy density of +electrons and ions and Maxwell's equations for a neutral medium. Strictly +the pressure terms in equations (2) and (3) should be the divergence +of the corresponding pressure tensors. However, to lowest order these +pressure terms just represent the trace of the respective pressure +tensor or thermal energy. With plasma isotropy and neglecting kinetic +and inertial plasma scales the fluid equations are the so-called MHD +equations +\begin{eqnarray} +\frac{\partial\rho}{\partial t}+\nabla\cdot\rho\mathbf{u} & = & 0\\ +\frac{\partial\rho\mathbf{u}}{\partial t}+\nabla\cdot(\rho\mathbf{uu}) & = & -\nabla p+\mathbf{j}\times\mathbf{B}\\ +\mathbf{E}+\mathbf{u}\times\mathbf{B} & = & \eta\mathbf{j}\\ +\frac{1}{\gamma-1}\left(\frac{\partial}{\partial t}p+\nabla\cdot p\mathbf{u}\right) & = & -p\nabla\cdot\mathbf{u}+\eta\mathbf{j}^{2} +\end{eqnarray} +(e.g. \cite{alfven:63,chan61}). Sometimes the last equation +for pressure or thermal energy is replaced by an equation for total +energy density for strict local energy conservation. The assumption +of isotropy strictly requires either a sufficient number of collisions +or an unmagnetized plasma. However, for many macro-scale problems +local mass, momentum, and energy conservation seem more important +on sufficiently large scales than plasma isotropy. The equations are +complemented by Ampere's law and the induction equation +\begin{eqnarray} +\nabla\times\mathbf{B} & = & \mu_{0}\mathbf{j}\\ +\nabla\times\mathbf{E}+\frac{\partial\mathbf{B}}{\partial t} & = & 0 +\end{eqnarray} +where the displacement current is ignored for non-relativistic applications. +Here $\nabla\cdot\mathbf{B}=0$ is introduced through the initial +conditions and the induction equation insures that it should be satisfied +for all times. + +It is worth noting that ideal Ohm's law $\mathbf{E}+\mathbf{u}\times\mathbf{B}=0$ +implies the so-called frozen-in condition, i.e., for any closed contour +which moves with the bulk velocity $\mathbf{u}$, the amount of magnetic +flux through this contour does not change with time (e.g., \cite{prie87}). +This condition can also be expressed in a different manner, specifically, +if two fluid elements that move with the velocity $\mathbf{u}$ are +connected through a magnetic field line at one time they are connected +through a field line at all times as illustrated in Fig.~\ref{fig:1_chp1}. +Note that on sufficiently small scales with the Hall term included, +ideal Ohm's law is $\mathbf{E}+\mathbf{u}_{e}\times\mathbf{B}=0$ +such that the frozen-in condition applies to the electron fluid velocity +$\mathbf{u}_{e}$ instead of the bulk velocity $\mathbf{u}$. +\begin{figure}[b] +\begin{center} +\includegraphics[scale=0.4]{./01-MHD/fig1} +\par\end{center} +\caption{Illustration of magnetic line conservation for +fluid elements $f_{1}$ and $f_{2}$.} +\label{fig:1_chp1} % Give a unique label +\end{figure} +In addition to this concept of magnetic flux conservation there are +a number of basic conserved quantities which are mass, momentum, and +energy conservation. These conservation laws can be expressed in a +straightforward manner where the spatial derivatives are expressed +as gradients or the divergence of tensor quantities. +\begin{eqnarray} +\frac{\partial\rho}{\partial t} & = & -\nabla\cdot\rho\mathbf{u}\\ +\frac{\partial\rho\mathbf{u}}{\partial t} & = & -\nabla\cdot\left[\rho\mathbf{uu}+\left(p+\frac{B^{2}}{2\mu_{0}}\right)\underline{\underline{1}}-\frac{1}{\mu_{0}}\mathbf{BB}\right]\\ +\frac{\partial w_{tot}}{\partial t} & = & -\nabla\cdot\left[\left(\frac{1}{2}\rho u^{2}+\frac{\gamma p}{\gamma-1}+\frac{1}{\mu_{0}}B^{2}\right)\mathbf{u}-\frac{\mathbf{u}\cdot\mathbf{B}}{\mu_{0}}\mathbf{B}+\frac{\eta}{\mu_{0}}\mathbf{j}\times\mathbf{B}\right] +\end{eqnarray} +with +\[ +w_{tot}=\frac{1}{2}\rho u^{2}+\frac{p}{\gamma-1}+\frac{1}{2\mu_{0}}B^{2} +\] +For instance mass for any fixed finite volume $V_{0}$ where with +mass $M=\int_{V_{0}}\rho d^{3}r$ is then expressed as $dM/dt=\ointclockwise^{\delta V}\rho\mathbf{u}\cdot d\sigma$ +where $d\sigma$ is a surface element of the boundary $\delta V$ +of the volume V. This illustrates that changes in density can occur +only with momentum density flux through the surface of the chosen +volume and require a component of the velocity normal to that surface. +This also implies that mass is conserved in any volume moving with +the fluid. Similar conclusions subject also to the magnetic field +orientation at the boundary can be reached for momentum and energy +conservation. + +Note, that the substitution $p=h^{\gamma}$ in the pressure equation +(7) generates a continuity equation which is exactly satisfied for +ideal conditions ($\eta=0$) +\begin{equation} +\frac{\partial h}{\partial t}+\nabla\cdot h\mathbf{u}=\frac{\gamma-1}{\gamma}h^{1-\gamma}\eta\mathbf{j}^{2} +\end{equation} +However, this formulation requires a continuous and differentiable +value of the pressure and is violated for the case of shocks and MHD +discontinuities. It still provides an interesting test as an ideal +conservation law. + +Conservation laws and particularly the frozen-in condition for ideal +MHD are of major importance for any plasma simulation. Most space +plasma systems are collisionless such that collisional resistivity +is really 0. However, at very thin boundaries with strong currents, +collective processes can exchange ion and electron momentum yielding +an effective resistivity or some other term in generalized Ohm's law +which violates the frozen-in condition. It should be emphasized that +this violation occurs in a very small and limited volume with extreme +gradients while almost everywhere the frozen-in condition is satisfied. +This is important because, in some way, many space plasma problem +address the transport of magnetic flux or mass, momentum, and energy +across boundaries. This transport requires the local violation of +the frozen-in condition. Therefore, any significant violation due +to numerical errors can easily invalidate the results from numerical +simulations (not only in MHD systems). + +\section{Basic Considerations for the Numerical Solution of MHD Systems} + +\label{sec:2_chp1} + +The set of MHD equations (4) - (9) represents a set of coupled partial +differential equations (PDE's). A few special problems may have analytic +solutions but most other applications require a numerical treatment +including a discretization of these equations, which typically generates +a set of algebraic equations, and requires a method to solve the discretized +equations (e.g., \cite{pott73,Fletcher}). It is obvious that +the algebraic equations are not the same as the original PDE's and +therefore their solution must be expected to be different. However, +a necessary condition for any chosen discretization must be consistency +with the PDE's with increasing accuracy of the discretization. In +other words, in the limit where grid element sizes and time step size +goes to 0, the original PDE's must be recovered from the algebraic +equations. Otherwise it cannot be expected that the numerical solution +converges to the exact solution of the PDE's. + +There is a large range of different discretization methods such as +finite difference, finite volume, finite element, or spectral methods, +all of which attempting to minimize errors from the spatial discretization +or decomposition into base functions. Specifically, spectral methods +use certain (appropriate) classes of base functions to discretize +PDE's. Finite element methods decompose the simulation domain into +many smaller, geometrically adequate subdomains and use base functions +in these subdomains to represent the PDE's. Similarly finite volume +methods use many smaller sub-volumes to represent derivatives and +fluxes associated with the PDE's in these sub-volumes to minimize +numerical errors in the sub-volumes. Finite difference methods use +many grid points in a structured or unstructured grid to represent +spatial derivatives in PDE's. Note that each of these different approaches +has advantages and disadvantages that depend on the choice of the +application, geometry etc. For instance, particularly the finite element +and finite volume methods have advantages when the physics involves +a particularly complicated shape of the simulations domain, for instance +flow around a specific obstacle and associated thin boundary layer +regions. However, because of the limited scope and because of their +frequent use, this article will focus mostly on finite difference +methods. + +In general, the numerical solution of PDE's depends very much on the +type of the PDE's. Sufficiently simple systems of PDE's can be classified +into 3 groups which are elliptic, parabolic, and hyperbolic (e.g., +\cite{Fletcher}). A typical example for elliptic PDE's is the +poisson equation and applications that generate elliptic PDE's are +for instance equilibrium problems or supersonic flow. There is no +temporal evolution and a small change of the boundary conditions or +of the sources has an influence on the solution in the entire domain. +The solution is often found through iterative methods and involves +the inversion of a large matrix representing the system of equations. +An example for parabolic equations is the diffusion equation and applications +usually address problems where diffusion and viscosity are dominant +for a problem. Again changes in a small domain at the boundary or +in the diffusion coefficients have an instant influence on the entire +system. Most common, particularly for the MHD equations, are hyperbolic +PDE's. These equations are typically time dependent, involve the transport +of information with a finite velocity, and have a number of different +wave modes, such as sound waves in the case of hydrodynamics, that +propagate along so-called characteristic surfaces, which for linear +problems can be used to construct the exact solution for proper initial +and boundary conditions. + +Ideal MHD has 3 different basic wave modes (fast, slow, and Alfven +waves) along which information (and momentum and energy) can be transported. +Note also, that equation (13) in combination with the continuity equation +can be used to show that the quantity $s=p/\rho^{\gamma}$ can be +expressed as $\partial s/\partial t+\mathbf{u}\cdot\nabla s=0$ in +ideal MHD where $s$ is regarded as an entropy measure. Therefore, +this entropy measure is conserved in the frame advecting with the +fluid which is sometimes addressed as an entropy wave. Similarly, +transport associated with magnetic flux conservation as discussed +in relation to Fig.~\ref{fig:1_chp1} can be regarded as a 'magnetic flux mode'. +However, it should be emphasized that the basic classification into +three types is an over-simplification. For instance, the MHD equations +can contain aspects of elliptic or parabolic PDE's although they are +mostly and for most applications hyperbolic. + +Particularly for hyperbolic and parabolic PDE's, but also for iterative +solutions of elliptic PDE's, a critical property for the solution +is stability (e.g., \cite{pott73,Fletcher}). To illustrate +this concept, consider a simple transport or advection equation $\partial f/\partial t+u\partial f/\partial x=0$ +with a prescribed constant value of the velocity $u$. Consider a +simple finite difference scheme $f_{j}^{n+1}=f_{j}^{n-1}-u\Delta t/\Delta x\left(f_{j+1}^{n}-f_{j-1}^{n}\right)$ +where the upper index $n$ describes a time index with time levels +separated by $\Delta t$ and the lower index is a grid index for the +$x$ direction with $\Delta x$ as the separation of grid points. +In other words the temporal update uses the time step and the spatial +finite difference between points adjacent to grid point $j$. Any +perturbation of $f$ propagates with velocity $u$ and takes the time +$\tau_{grid}=\Delta x/u$ to travel a single grid spacing. Therefore, +if $\Delta t>\tau_{grid}$ information at grid index $j$ must have +arrived from beyond the adjacent grid points which, however, is not +considered in the equation for the update (using only next neighbor +information). Therefore a time step $\Delta t>\tau_{grid}$ must generate +a meaningless and erroneous result which is reflected in this scheme +becoming unstable for $\Delta t>O\left(\tau_{grid}\right)$ leading +to exponential growth of any perturbation. This concept is formalized +in a stability analysis where the growth or damping of a perturbation +is analyzed for the chosen numerical method. + +Although there is no general proof that consistency of the discretization +and stability of the method insure that the numerical solution converges +to the exact solution of the system of PDE's, they are strong arguments +for a sound methodology. Also, convergence of the numerical solution +to a singly solution for successive refinements of the grid and time +steps can be used to demonstrate convergence to the actual solution. +There are a few more pitfalls that one should be aware of for MHD +simulations: Time independency and diffusion/viscosity is part of +MHD so the methodology must be appropriate to solve not only the hyperbolic +aspects of the MHD equations part also the steady state and dissipative +aspects of the MHD equations in a stable manner. Here, complications +for nonlinear steady state problems include multiple solutions for +given boundary conditions, or for slowly changing boundary conditions. +Also solutions may approach bifurcation points where they can cease +to exist and/or develop singularities. Furthermore, even small modifications +such as the inclusion of the Hall terms can require very small integration +steps, in this case because the Hall term enables the fast propagating +Whistler wave. Similarly, modifications of the basic equations that +include elliptic terms can require very small iteration steps to generate +a solution, a property that is addressed as stiffness. + +Additional insight on properties of a discretization can be obtained +through an expansion of the discretized algebraic equations which +in the case of the advection equation assume a general form $\partial f/\partial t+u\partial f/\partial x=\sum_{i=1}c_{i}\Delta x^{i-1}\partial^{i}f/\partial x^{i}$. +Clearly consistency requires $c_{1}=0$ otherwise the equation is +altered from the original PDE. However, the expansion demonstrates +the presence of 2nd and higher order even derivatives that act as +numerical dissipation (diffusion). Similarly odd order derivatives +cause numerical dispersion. Both effects are largest on the grid scale +and are more strongly localized for higher order accurate schemes, +i.e., where $c_{i}=0$ for a range of low values of i. In general, +more accurate discretizations do not eliminate issues with numerical +diffusion and dispersion. Although numerical diffusion is bad because +it diffuses structures and widens plasma boundaries, numerical diffusion +is unavoidable and acceptable if it is sufficiently localized. In +fact, numerical diffusion is required to balance effects of numerical +dispersion. Numerical dispersion of sharp plasma boundaries leads +to large and growing oscillations on the grid scale. Such oscillations +can easily cause the termination of any simulation because of locally +negative density or pressure. Such grid oscillations are avoided if +numerical diffusion is present to suppress them. Therefore, numerical +diffusion should be a lower order error than the dispersion. This +principle is actually employed in so-called flux corrected transport +(fct) schemes which attempt to avoid issues that can occur with the +presence or evolution of shocks. Since shocks develop as real discontinuities +in ideal MHD, they can never be resolved with a finite grid. Therefore +fct schemes typically use a multistep discretization where a low order +finite difference approach is combined with a high order scheme. The +low order discretization is retained and applied in locations where +the high order scheme generates large dispersion errors due to discontinuous +plasma conditions (e.g., \cite{Fletcher}). + +There are many tests that can be used to examine any particular MHD +simulation scheme. Clearly wave propagation of different MHD waves +(slow, fast and Alfven waves) provides an important test. A similarly +interesting test is the simulation of the corresponding MHD discontinuities +and shocks. Particularly fast shocks are important for the interaction +of the super fast solar wind plasma with the magnetosphere. Slow shocks +and rotational discontinuities are of important for problems of magnetic +reconnection where much of the plasma acceleration but also dissipation +can occur at slow shock structures. + +In order to examine more general properties of simulations concerning +nonlinear MHD physics, a number of macroscopic instabilities are sufficiently +well understood to serve as test cases for MHD simulations. Specifically, +instabilities based on strong velocity shear (Kelvin Helmholtz modes), +magnetic shear (tearing modes and reconnection), and gravity driven +plasma interchange (Rayleigh-Taylor modes) are quite well understood +(e.g., \cite{chan61,otto91a,Otto_fairfield2000}) and can be +used to examine properties and behavior of MHD simulations. + +Particularly for problems involving magnetic flux, mass, momentum, +and energy transport, tests using the general conservation properties +of MHD equations can be instructive. For instance, tests may evaluate +the change of total mass, momentum and energy considering the actual +flux at the the boundary of the respective domain. For ideal MHD, +magnetic line conservation (or the frozen-in condition) can be examined +by using tracers that move with the simulated fluid velocity and that +originally started on the same field line. Their separation after +any finite time and travel distance can provide a measure of how well +fluid elements are frozen to a particular magnetic field line. Magnetic +flux tube properties can also be used to examine mass conservation +in a moving geometry. Since magnetic field lines move by necessity +with the fluid in ideal MHD, the mass on a flux tube with a differential +cross section can alter only due to in- or outflow at the ends of +a field line. The mass of a differential flux tube is expressed as +the integral $M_{B}=\int_{B}nds/B$ along a magnetic field line between +fixed points $a$ and $b$ where $n$ is number or mass density, $ds$ +is the line element along the field line, and $B$ is the magnitude +of the local magnetic field. By considering in- and out-flow we can +determine how well flux tube mass is conserved. With these definitions +we can address the quantity $V_{B}=\int_{B}ds/B$ as the differential +flux tube volume of a field line between two points $a$ and $b$ +along this field line. + +Conservation of $M_{B}$ can be demonstrated using the continuity +equation for $n$. By the same notion it can be demonstrated that +$S_{B}=\int_{B}\left(p^{1/\gamma}\right)ds/B$ is conserved in the +absence of in- or outflow at the ends of a field lines (for ideal +MHD). If velocities are small such that the system is in an approximate +equilibrium, pressure $p$ is approximately constant along the field +line such that $S_{B}=p^{1/\gamma}V$ can be considered as a flux +tube entropy measure which is conserved in ideal MHD. As mentioned +before a local measure of this quantity is $s\equiv p^{1/\gamma}/n$ +which is constant along the the path of a fluid element in ideal MHD +and provides an easy test for mass and entropy conservation in MHD +simulations. Obviously, all of these conservation laws are not exactly +satisfied in numerical simulations. However, they have to be satisfied +sufficiently well on the time scale of a simulation such that a numerical +solution can distinguish between actual transport through reconnection +or diffusion and numerical violation of conservation laws. + +Finally, it is important to understand that the ideal MHD equations +have no intrinsic scale. They are valid from galactic down to small +laboratory scales such that the actual evolution of a system is scale +independent. Therefore the MHD equations are often solved in a normalized +form, where magnetic field, density, and length scales are measured +in typical values, i.e., $B_{0}$, $n_{0}$, and $L_{0}$. With this +choice the natural scale for velocity and pressure become $u_{0}=B_{0}/\sqrt{\mu_{0}m_{0}n_{0}}$ +and $p_{0}=B_{0}^{2}/\mu_{0}$. + +\section{Initial and Boundary Conditions} + +\label{sec:3_chp1} + +Boundary conditions for MHD simulations are notoriously difficult. +Boundary conditions depend on the particular application and initial +conditions. Particularly a boundary with non-uniform plasma conditions +can be challenging. Also the question of whether there is a plasma +in- or outflow plays a major role. Sometimes it is claimed that a +boundary uses so-called open boundary conditions, implying that it +allows in- or outflow just as the system demands. It should be noted +that in case of nonuniform boundaries there is no simple open boundary +condition. Strictly plasma out- and inflow that is caused by dynamics +within the simulation domain can be computed through the characteristics +of the system. They determine where and how perturbations from within +the simulation demand in- or outflow at the boundaries. However, while +this is can be done in principle, MHD has 3 different anisotropic +wave modes, such that this approach is extremely difficult in two- +or three-dimensional MHD. Therefore, such boundary conditions often +represents a guess that when it works, is likely the best one can +achieve for a boundary condition. Sometimes it may be necessary to +choose boundary locations far from the actual physical process to +insure that the boundary has no influence on the evolution of this +process. + +In the following we will introduce and discuss boundary and initial +conditions for several applications of numerical simulations presented +in Section 4. Specifically, we consider 3 different applications. +An example of a relatively simple and periodic instability is the +Kelvin-Helmholtz (KH) instability provided in Sections 4.1. Shock +physics is addressed in in section 4.2 with an example that applies +to Hot Flow Anomalies (HFAs) at the bow show. A more involved boundary +is introduced in section 4.3 presenting a magnetotail simulation of +current sheet thinning. The corresponding initial and boundary conditions +are summarized in the next subsections. + +\subsection{Kelvin Helmholtz Instability} + +\label{subsec:KH1} + +The first magnetopause application is the Kelvin-Helmholtz wave, a +straightforward and well understood instability driven by sufficiently +fast shear flow across a plasma boundary. The instability has been +studied extensively in two and three dimensions (e.g., \cite{miur82,Otto_fairfield2000,Nykyri_otto2001,Hasegawa_fujimoto2004,ma2014a}). +This instability operates in two dimensions and our geometry uses +the $x$ direction normal to the boundary, and $y$ along the boundary. +The initial conditions use for the velocity +\[ +u_{y}\left(x\right)=u_{0}\tanh x/L_{0} +\] +and $u_{x}=u_{z}=0$, for density $\rho=\rho_{0}$, for the magnetic +field components $b_{x}=0$, \textbf{$b_{y}=b_{y0}$}, $b_{z}=b_{z0}$, +and for pressure $p=p_{0}$, where all quantities with an index 0 +are assumed constant. Note that instead of a constant magnetic field +along $y$ and $z$ we could have chosen some $x$ dependent profiles +with the only condition that pressure has to be chosen such that $p+b_{y}^{2}+b_{z}^{2}=const$ +such that the configuration is in a steady (time independent) state. +For the results in section 4 we have chosen $\rho_{0}=1$, $p_{0}=1$, +$u_{0}=1$, $b_{y0}=0.1$, $b_{z0}=1$, and $L_{0}=1$. None of these +values is critical except that the Alfven speed associated with $b_{y0}$ +must be smaller than $u_{0}$ for the instability to operate. + +The most reliable and straightforward boundary conditions for MHD +applications are given by symmetry conditions or configurations that +are periodic in space. Simple applications where periodic conditions +can be applied are for instance macro-instabilities, such as magnetic +tearing modes, or flow driven Kelvin-Helmholtz modes. Therefore the +simulation here uses periodic conditions along the $y$ direction. + +The method used for the applications here is 2nd order accurate and +uses 3 grid points to evaluate 1st and 2nd order derivatives. Therefore, +our simulation grid only requires one layer of guard cells around +the physical cell boundaries to apply von Neumann derivative boundary +conditions, such that $j=2$ and $j=n_{y}-1$ correspond to physical +boundary cells and $j=1$ and $j=n_{y}$ to the mathematic boundary +cell to apply boundary conditions. Thus periodicity at the y minimum +boundary implies $f_{j=1}=f_{j=n_{y}-2}$, and $f_{j=2}=f_{j=n_{y}-1}$ +for all $x$ indices $i$. + +Boundary condition at $x_{min}$ and $x_{max}$ use all 0 derivatives +normal to the boundary, which explicitly implies for instance at the +$x_{min}$ boundary$f_{i=1}=f_{i=3}$ for all quantities with one +exception. The normal magnetic field derivative that determines $b_{x,i=1}$ +and $b_{x,i=n_{x}}$ computes these values using the tangential field +and $\nabla\cdot\mathbf{b}=0$. Note that $\nabla\cdot\mathbf{b}=0$ +is required for the initial configuration and should be conserved +through the integration method. However, it still leaves the possibility +that a nonzero divergence is carried into the system through boundaries. +This is avoided by employing $\nabla\cdot\mathbf{b}=0$ at the boundaries +where possible. + +A zero normal derivative boundary condition is used for the tangential +velocity, density, and pressure because they are non-zero in the initial +condition at the $x$ boundaries (and almost constant). The normal +velocity component can use the same conditions or make use of a $\nabla\cdot\mathbf{v}=0$. +Finally, we note that the conditions at the $x$ boundaries is not +an exact symmetry situation and it is difficult to formulate a condition +that represents truly free flow for this boundary. Therefore, the +actual location of the x boundary is chosen at a large distance from +the location of the instability such that the detailed boundary conditions +do not have a significant influence on the instability. This can be +numerically slightly more expensive but the applied scheme uses a +nonuniform grid with larger grid spacing away from the $x=0$ plane +where the KH instability operates. + +\subsection{Fast Shock Simulation} + +\label{subsec:BS1} + +This 2nd application examines the interaction of a fast shock with +a magnetic flux tube with a lower density than the surrounding upstream +plasma. The physical motivation for this set up is the occasional +observation of HFAs upstream of the Earth's bow shock, during which +the plasma is strongly (and non-adiabatically) heated and strongly +decelerated, sometimes so much that it is actually streaming sunward. +Observations of so-called density cavities show that the upstream +plasma contains sometimes flux tubes with much lower density than +the ambient material. Such flux tubes must cause large perturbations +at the bow shock of the Earth. These simulations are also two-dimensional. +Here $x$ is the direction normal to the original fast shock into +the downstream region and $y$ is the transverse direction. Fast shock +simulations with application to HFAs have been conducted with hybrid +simulations (e.g., \cite{thomw91a,liny97,omids07}). + +The initial state is the superposition of two configurations. First +the simulation uses the solution to the fast shock jump conditions +as given by +\begin{eqnarray*} +\left(u_{u}^{2}-Xu_{A}^{2}\right)^{2}\left[Xc_{s}^{2}+\frac{1}{2}u_{u}^{2}\cos^{2}\theta\left\{ X\left(\gamma-1\right)-\left(\gamma+1\right)\right\} \right]\\ ++\frac{1}{2}u_{A}^{2}u_{u}^{2}X\sin^{2}\theta\left[\left(\gamma+X\left(2-\gamma\right)\right)u_{u}^{2}-Xu_{A}^{2}\left(\left(\gamma+1\right)-X\left(\gamma-1\right)\right)\right] & = & 0 +\end{eqnarray*} +(e.g., \cite{prie87}) where $X=\rho_{d}/\rho_{u}$ is the +shock compression, $u_{u}$ is the upstream velocity, $u_{A}$ and +$c_{s}$ are the upstream Alfven- and Sound speed, $\theta$ is the +angle of the upstream magnetic field with the shock normal, and $\gamma=5/3$ +is the ration of specific heats. The resulting initial condition can +be expressed as +\begin{equation} +f=f_{u}+0.5\Delta_{f}\left[1+\tanh\left(x/\delta\right)\right] +\end{equation} +with $f$ representing density $\rho$, velocity components $u_{x}$ +and $u_{y}$, magnetic field component $b_{y}$, and pressure $p$. +Here $\Delta_{f}=f_{d}-f_{u}$ represents the jump from the down to +the upstream value, for instance, $\Delta_{\rho}=\text{\ensuremath{\rho_{d}-\rho_{u}=\rho_{u}\left(X-1\right)}}$. +Note this choice centers the fast shock at $x=0$ and the width of +the step function $\delta$ adjusts itself immediately after turning +on the simulation because it really is determined by the dissipation +either of a physical resistivity and viscosity or a corresponding +numerical dissipation. In order to examine the interaction of a density +depleted flux tube with such a shock we superpose a density depletion +with a shape of $\rho_{\delta}=1-0.5\rho_{\delta0}\left[\tanh\left(\left(y_{2}-y\right)/\delta_{y}\right)+\tanh\left(\left(y-y_{1}\right)/\delta_{y}\right)\right]$. +For $\delta_{y}>0$ and $y_{2}-y_{1}>2\delta_{y}$, this function +is 1 everywhere except between $y_{1}$ and $y_{2}$ where it assumes +a value of $1-\rho_{\delta}$. So by multiplying the initial condition +(13) with $\rho_{\delta}$ in the upstream region we can generate +a reduced density region between $y_{1}$ and $y_{2}$. Note that +$y_{1}$ and $y_{2}$ are dependent on the $x$ coordinate because +we need the depleted density region within a flux tube which is inclined +with the boundary normal by an angle $\theta_{bn}$. Note that basic +free parameters for this type of study are the shock Mach number, +the plasma $\beta$, and the angle of the incident magnetic field +with the shock normal. Other parameters that can be adjusted are the +relative magnitude of the density depletion and the width of the density +depleted flux tube. + +Initial conditions for this case are relatively straightforward for +the boundaries in $x$. Since $x$ points into the downstream direction, +the boundary conditions at the $x_{min}$ boundary are given by Dirichlet +conditions where all boundary values are set to the respective upstream +region values defined in the initial conditions. One exception is +density where the boundary values are computed from the superposition +of upstream density and depleted flux tube values. Note that in the +normal incident frame where $u_{y}$ in the upstream region is 0, +a flux tube marked by a lower density moves along the $y$ direction +when observed at a fixed $x$ coordinate. Therefore the depleted density +region must move along $y$ at the $x_{min}$ boundary with a speed +that depends on the upstream velocity and the angle $\theta_{bn}$ +of the magnetic field. Boundary conditions in the downstream region +can be chosen in a similar manner, i.e., as Dirichlet conditions based +on the analytic values from the shock jump conditions. There will +always be some reflection because one has to expect at least small +deviations of the numerical shock solution from the exact analytic +values. However, worse are the conditions caused by the interaction +of the low density flux tube with the shock. These represent large +perturbations relative to the original Dirichlet conditions. Therefore +the downstream system size is chosen large enough that these perturbations +cannot travel back to the shock region on the considered time scales. +Since truly free boundary conditions are very difficult to achieve, +the boundary conditions in the $y$ direction are assumed periodic. +The density depleted flux tube size is small compared to the system +size in $y$, such that periodic conditions in $y$ should be close +to open boundary conditions. + +\subsection{Magnetotail Simulation} + +\label{subsec:Tail1} + +This is an example of a three-dimensional simulation of a section +of the Earth's magnetotail. The physical motivation for this simulation +is the examination of the formation of very thin current sheets in +the near Earth tail region. Such current sheets can be associated +with the onset of major instabilities that release large amounts of +stored magnetic energy and cause geomagnetic substorms and the associated +aurora. Different from the prior two examples this simulation does +not strictly use an analytic initial condition. Rather it uses an +initial condition that is based on a typical magnetic field of the +magnetotail. This magnetic field is used with a numerical relaxation +to obtain force balance and to generate a three-dimensional magnetotail +equilibrium. Coordinates used for this simulation are so-called GSM +(general solar magnetic) coordinates with $x$ pointing sunward, $z$ +northward, and $y$ along the cross tail direction. + +It has been hypothesized that different from a compression of the +magnetotail lobes, also the removal of closed magnetic flux in the +near Earth tail can lead to the formation of strong current sheets. +In order to test and demonstrate this hypothesis it is required to +use a sufficiently realistic magnetic field of the near Earth tail +and apply convection from the nigh- to the dayside. We use a meso-scale +section of the magnetotail extending from $x=-5$ $R_{E}$ to about +$x=-50$ $R_{e}$ on the tailward side. In order to apply this convection +we need to modify the Earthward boundary to enable sunward flow in +the tail region. As mentioned such boundary conditions can be very +tedious. Our system extends from $z=0$ (equatorial plane) to $z=20$ +(lobes) where units are in Earth radii $R_{e}$, and symmetry is used +such that only the northern half of the magnetotail is simulated. +In the $y$ direction the system extends from $y=-20$ to $y=20$ +such that the boundary does not cross the magnetopause where flow +becomes fast. + +Note that the sunward outflow condition has to be applied not only +at $z=0$ but everywhere at our Earthward boundary. Assuming that +magnetic field lines must be transported smoothly through this boundary +we actually integrate magnetic field lines from each boundary coordinate +into the system and determine the location where they cross the equatorial +plane. We can then assume a hypothetical smooth convection profile +in the near Earth equatorial plane and associate each field line with +such a convection, i.e., map the assumed convection from the equatorial +plane to the Earthward boundary. The physical motivation for this +shape of convection is that magnetic flux transport should follow +approximately contours of constant flux tube entropy, i.e., be mostly +azimuthal. Various test of this approach indicate that the exact details +do not play an important role. Assuming that flux tubes are sort of +rigidly convected, i.e., with a constant angular velocity, their azimuthal +velocity is given by the mapped velocity and radial distance of the +respective boundary point. Thus it is possible to determine a unique +value for the $x$ and $y$ velocity components of each point at the +Earthward boundary. Note that the hypothetical equatorial convection +is used only to compute flow at the Earthward boundary and not applied +in the equatorial plane where plasma motion develops selfconsistently. +The assumed connvectionn pattern and the resulting flow in the equatorial +plane are illustrated in Fig.~\ref{fig:2_chp1} This boundary condition for +slow adiabatic convection proved quite +stable and reliable to generated the desired sunward outflow. Several +simulation studies have addressed this problem of a slow evolution +of the near Earth tail \cite{hsieo14,hsieo15,ottoh15} + +\begin{figure}[b] +\begin{center} +\includegraphics[scale=0.3]{./01-MHD/fig2a}\includegraphics[scale=0.58]{./01-MHD/fig2b} +\par\end{center} +\caption{ Left: Illustration of the assumed equatorial +convection in order to compute flow conditions at the Earthward (right) +simulation boundary indicated in red. Right: Convection in the equatorial +plane in response to the applied Earthward boundary condition in the +simulation.} +\label{fig:2_chp1} % Give a unique label +\end{figure} + +Finally, the boundary condition in the equatorial plane at $z=0$ +is an excellent example of a symmetry condition which uses the symmetry +of the northern and southern hemisphere. Note, that this applies only +if the $y$ component of the magnetic field in the equatorial plane +is 0. The specific conditions used are symmetry $f\left(i_{z}=1\right)=f\left(i_{z}=3\right)$ +for density $\rho,$ pressure $p$ magnetic field component $b_{z}$, +and velocity components $u_{x}$ and $u_{y}$, and antisymmetry (zero +derivative) $f\left(i_{z}=1\right)=-f\left(i_{z}=3\right)$ for the +magnetic field components $b_{x}$ and $b_{y}$, and the velocity +component $u_{z}$. The remaining conditions at the lateral boundaries +in $y$, at the lobe boundary at $z_{max}$, and the tailward boundary +at $x_{min}$ use symmetry $f\left(i=i_{b}+1\right)=f\left(i=i_{b}-1\right)$ +or Dirichlet conditions and allow flow tangential to the respective +boundary. The normal magnetic field component is again used to satisfy +$\nabla\cdot\mathbf{b}=0$. + +\section{Examples of MHD Simulations} + +\label{sec:4_chp1} + +The used simulation code for the following examples employs a leapfrog +and DuFort-Frankel scheme using a finite difference approximation. +This finite difference approximation is of 2nd order accuracy and +a small 2nd order diffusion term is applied where numerical dispersion +can occur. The finite difference leapfrog approximation is also subject +to a time step limitation similar to the one described in section +2, however, it is noted that this limitation is also required for +sufficient accuracy. A time step longer than allowed by the stability +condition would imply a low accuracy for the propagation of the respective +MHD waves. + +\subsection{Kelvin Helmholtz Simulations} + +\label{subsec:KH2} + +The KH instability has also the advantage that the linear evolution +for sufficiently simple situations is reasonably well understood by +analytic models in the limit of incompressible flow. The mode is unstable +for sufficiently large flow shear compared to the stabilizing influence +of the magnetic field aligned with the k vector of the mode, i.e., +\[ +\left[\left(\mathbf{u}_{1}-\mathbf{u}_{2}\right)\cdot\mathbf{k}\right]^{2}>\frac{\rho_{1}+\rho_{2}}{\mu_{0}\rho_{1}\rho_{2}}\left[\left(\mathbf{u}_{A1}\cdot\mathbf{k}\right)+\alpha_{2}\left(\mathbf{u}_{A2}\cdot\mathbf{k}\right)\right] +\] +\cite{chan61} where the indices 1 and 2 indicate the two sides of +the boundary and $\mathbf{u}_{A}$ refers to the Alfven speed. The +setup for the initial and boundary conditions for KH simulations as +described in section 3 is quite straightforward. Therefore, the KH +mode is a good test case for numerical simulations. The simulations +can actually be conducted by two-dimensional and fairly low resolution +models. The results shown in Fig.~\ref{fig:3_chp1} use a resolution +of 203 by 203 grid points, however, a few 10 grid points in each direction +are sufficient to resolve the early evolution. Higher resolution allows +for more details and longer accurate simulation later in the nonlinear +evolution although boundaries within the nonlinear KH wave become +eventually arbitrary thin within a finite time limiting also high +resolution simulations. + +\begin{figure}[b] +\begin{center} +\includegraphics[scale=0.38]{./01-MHD/fig3a}\includegraphics[scale=0.38]{./01-MHD/fig3b}\includegraphics[scale=0.38]{./01-MHD/fig3c} +\par\end{center} +\caption{ Results from two-dimensional KH simulations. +From left to right the figures show magnetic field, density and velocity +arrows, and current density.} +\label{fig:3_chp1} % Give a unique label +\end{figure} +Fig.~\ref{fig:3_chp1} illustrates that the magnetic field which was +initially uniform is strongly twisted within a few turnover times +causing large changes of the magnetic field both in the simulation +plane and perpendicular to it. Density boundaries become very thin, +and the strong magnetic field deformation causes very large local +current densities even for an initially uniform magnetic field. Any +initial current is strongly modulated and amplified, and the nonlinear +evolution can cause magnetic reconnection at the strong current layers +within the KH vortex. More detailed results for two-dimensional KH +studies and comparisons with observations can be found in the respective +literature (e.g., \cite{miur84,Otto_fairfield2000,Nykyri_otto2001,Nykyri_otto2006,nakaf06}). + +The nonlinear and three-dimensional evolution have provided interesting +new results for the transport of plasma and magnetic flux at the magnetospheric +boundaries over the past two decades. The nonlinear KH mode provides +a number of different mechanisms for this transport. In a simple two +dimensional approach the nonlinear KH wave generates a very strong +current layer associated with the strong twisting of the magnetic +field. Similarly, the nonlinear KH can modify and intensify a pre-existing +current layer. These very thin and strong current layers are easily +tearing mode unstable and can undergo magnetic reconnection which +causes direct plasma transport across the boundary. This very small +width enables ions to easily cross these boundaries causing enhance +mixing and diffusion. Another potential mechanism is the excitation +of kinetic or inertial Alfven waves through mode conversion which +again can cause significant plasma transport across such boundaries +(e.g., \cite{Wing_johnson2015}). + +In three dimensions the evolution of the KH mode depends on the variation +along the direction perpendicular to the plane shown in Fig.~\ref{fig:3_chp1}. +For instance, the magnetospheric boundary is KH unstable in the equatorial +plane for strongly northward interplanetary magnetic field (IMF) as +illustrated in Fig.~\ref{fig:4_chp1}. + +\begin{figure} +\begin{center} +\includegraphics[scale=0.5]{./01-MHD/fig4a}\includegraphics[scale=0.6]{./01-MHD/fig4b} +\par\end{center} +\caption{Sketch of the KH associated magnetic field twisting +in the equatorial (left) and parallel current and electric field for +a locally unstable KH wave (integrated along the direction of the +velocity shear).} +\label{fig:4_chp1} % Give a unique label +\end{figure} + +However, the field geometry renders +the mode stable in the northern and southern hemisphere at sufficient +distance from the equatorial plane. Therefore twisting is expected +to occur only locally similar to a candy-wrapper. This implies that +very large currents form at the boundaries of the KH unstable regions. +These currents have a predominant orientation such that the associated +parallel electric field (in the presence of resistivity) tends to +decouple the magnetic field as illustrated in Fig.~\ref{fig:4_chp1}. +It has been demonstrated that this provides a powerful transport mechanism +that can quantitatively explain the plasma transport during extended +periods of northward \cite{Ma_delamere2017} and southward IMF \cite{ma2014a,ma2014b}. + +Recent new satellite observations from high temporal resolution particle +measurements by the magnetospheric multi-scale mission (MMS) indeed +show evidence of multiple reconnection processes at locations consistent +with the reconnection sites from simulations, i.e., close to the equatorial +plane, and in the northern and southern hemispheres \cite{Eriksson_lavraud2016,Li_andre2016}. +Nonlinear KH modes may also be the dominant instability mechanisms +at the boundaries of the fast rotating giant magnetospheres \cite{Ma_stauffer2015,Zhang_delamere2018}. + +\subsection{Simulations of Sunward Moving Plasma at the Earth's Bow Shock} +\label{subsec:bs2} +Although KH simulations can include some shock physics for sufficiently +fast jetting plasma, typically shocks associated with KH modes are +weak. However, shock physics is important for bow shock transients +such as hot flow anomalies (HFAs). For many applications such as KH +simulations or slow magnetotail evolution the MHD equations can be +closed using an energy equation like the form of equation (13). This +has the additional advantage that entropy is explicitly conserved +by this formulation in ideal MHD. However, for the fast shock simulations +illustrated here, the MHD equations must use total energy conservation +presented in equation (12) because otherwise properties of strong +shocks will not be correctly addressed in the simulation. This also +applies to slow shocks in cases of very low plasma $\beta$. + +HFAs are events upstream of the Earth's bow shock and are characterized +by a very hot plasma that is streaming much slower than the solar +wind or sometimes has a velocity component toward the sun. Originally +HFAs were addressed as diamagnetic cavities \cite{schwc85,thomg86,thomg88,pasch88} +and believed to be associated with a TD in the interplanetary magnetic +field (e.g., \cite{schwk88,schws95}). This was expressed by +the original terminology 'active current sheet', but found support +also through early hybrid simulation studies \cite{thomb88,thomw91a}. +However, frequently HFAs can occur without the presence of a TD, and +often HFAs do not show a motional electric field toward the TD as +predicted by hybrid simulations \cite{zhans13a,zhaoz15,zhaoz17}. + +\begin{figure} +\begin{center} +\includegraphics[scale=0.31]{./01-MHD/fig5a}\includegraphics[scale=0.31]{./01-MHD/fig5b}\includegraphics[scale=0.31]{./01-MHD/fig5c} +\par\end{center} +\caption{Time sequence of the interaction of a density +depleted magnetic flux tube with a fast shock. The top plots show +velocity (arrows, temperature (color) and magnetic field (lines), +and the bottom plots show density.} +\label{fig:5_chp1} % Give a unique label +\end{figure} + +One of the most surprising properties of HFAs is their strong deflection +of the solar wind momentum. In shock physics such a deflection can +easily occur if upstream conditions change this momentum, for instance, +through a significantly lower density. Lower density regions are actually +observed and associated with the foreshock regions. These density +depletions are termed foreshock cavities. The example in Fig.~\ref{fig:5_chp1} +illustrates the evolution if a low density flux tube interacts with +a fast shock. Since the fast mode speed is much higher in the low +density medium, the effective mach number based on the original shock +conditions is much lower for the low density region. This implies +that there must a new shock forming, which moves rapidly into the +upstream direction as illustrated by the results shown in Fig.~\ref{fig:5_chp1}. + +The resulting structure is an excellent example of shock physics. +At the leading edge the new fast shock is heating the material to +temperatures higher than the magnetosheath. In the new structure the +pressure is higher than ion the solar wind but lower than in the original +magnetosheath. Therefore the structure expands into the solar wind +yielding a wedge-like shape. Material from the magnetosheath is streaming +into the structure from behind as illustrated in the sketch in Fig.~\ref{fig:6_chp1}. +The Figure also illustrates the evolution of strong current sheets +in the newly formed structure and regions of different entropy. Note +that the different colored entropy regions are all resulting from +fast shocks. The upstream region just represents the original solar +wind and the density depleted flux tube. The downstream regions have +the original magnetosheath (colored in cyan), the shocked plasma at +the forward edge of the wedge (yellow), and two shoulders with a moderately +increased entropy (red), because the expansion into the solar wind +generates also fast shocks. + +\begin{figure} +\begin{center} +\includegraphics[scale=0.37]{./01-MHD/fig6a}\includegraphics[scale=0.37]{./01-MHD/fig6b}\includegraphics[scale=0.37]{./01-MHD/fig6c} +\par\end{center} +\caption{From left to right the plots show a sketch of +the newly formed shock structure caused by the low density flux tube, +plot of the velocity (arrows) current density (color) and field lines +of the newly formed structure, and plot of the entropy as defined +as $p^{1/\gamma}/\rho$.} +\label{fig:6_chp1} % Give a unique label +\end{figure} + +The structure in Fig.~\ref{fig:5_chp1} appears stationary because the +simulation is in the deHoffmann-Teller frame where the electric field +is 0, i.e., convection is magnetic field-aligned. In the normal incident +frame the structure is moving into the negative $z$ direction with +a velocity that depends on $\theta_{bn}$, i.e., the angle of the +magnetic field with the shock normal and on the magnitude of the solar +wind (upstream velocity). It is worth noting that these simulation +results suggest larger and slower moving structures for small $\theta_{bn}$, +i.e., quasi parallel shock conditions. +Note, however, that particularly for parallel conditions MHD is not + +a good approximation for fast shocks. Nevertheless one would expect + +that some basic properties from the MHD simulations should be observable. + +In any case, it is remarkable that the MHD simulations seem to capture + +a number of the observed HFA properties quite well. + +\subsection{Earth's Magnetotail Simulations} + +\label{subsec:Tail2} + +The final example addresses the slow evolution of a three-dimensional + +system that is close to equilibrium sometime also addressed as quasi-static + +evolution indicating that the system satisfies force balance at all + +times. This type of evolution is important to understand the transition + +from a stable configuration to an unstable state. Examples for such + +an evolution include solar prominences and, in the present case, the + +magnetotail during the growth phase of a substorm \cite{schib82,schib93,birnh98}. + +It is well established that the onset of a substorm involves very + +thin current layers in the near Earth tail \cite{sergt90,ohtat92,sergn14}. + +These current sheets can be generated by various mechanisms, for instance + +instabilities and other dynamics processes as illustrated by the prior + +examples. In terms of a quasi-static evolution it has been suggested + +that a slow compression of the lobes of the magnetotail can cause + +thin current sheet formation. Boundary conditions for this type of + +evolution play a somewhat different role than in the other examples. + +While in the other examples boundary conditions just need to be consistent + +with the initial conditions and the evolutions, here boundary conditions + +provide a major constraint and a slow driver for the change of the + +equilibrium. So in this example boundary conditions cause the evolution + +of the system which is slow up to the point where some critical state + +is reached. + +\begin{figure} + +\begin{center} + +\includegraphics[scale=0.41]{./01-MHD/fig7a}\includegraphics[scale=0.4]{./01-MHD/fig7b}\includegraphics[scale=0.36]{./01-MHD/fig7c} + +\par\end{center} + +\caption{Evolution of the magnetic field component $B_{z}$ + +in the near Earth equatorial plane shown at times 0 and 50 minutes + +into the evolution and cross tail current density component $j_{y}$ + +at time = 50 min. In the chosen normalization, length units correspond + +to 1 Earth radius and magnetic field is normalized to 20 nT.} + +\label{fig:7_chp1} % Give a unique label + +\end{figure} + +The simulation results in Fig.~\ref{fig:7_chp1} use a magnetic flux + +transport rate of about 50 kV well comparable to a typical cross polar + +cap potential during the growth phase of a substorm. The initial magnetic + +field $B_{z}$ component in the equatorial plane represents a typical + +magnetotail field because it is based on the Tsyganenko model magnetic + +field \cite{tsyg96}. During 50 minutes of sunward convection out + +of the near Earth magnetotail, the closed magnetic field in the near + +Earth region is strongly reduced in some regions to values below 1 + +nT. The larger values close to the Earthward boundary at $z=-6R_{E}$ + +are close to 100 nT initially and are reduced to about 60 nT after + +50 minutes of slow convection. The last plot in Fig.~\ref{fig:7_chp1} + +presents the cross tail current density component in the equatorial + +plane at time = 50 min. It illustrates a concentrated and amplified + +current density in the region where the magnetic field $B_{z}$ is + +reduced. + +\begin{figure} + +\begin{center} + +\includegraphics[scale=0.5]{./01-MHD/fig8a} + +\par\end{center} + +\begin{center} + +\includegraphics[scale=0.5]{./01-MHD/fig8b} + +\par\end{center} + +\caption{Illustration of the cross tail current density + +at times 0 and 50 minutes corresponding to the times shown in Fig.~\ref{fig:7_chp1} + +for the equatorial $B_{z}$.} + +\label{fig:8_chp1} % Give a unique label + +\end{figure} + +In order to demonstrate that the evolution is quasi-static, i.e. a + +sequence of equilibrium configurations, we have run tests with higher + +and lower values of the magnetic flux transport rate. The evolution + +was almost identical but faster for higher potential and slower for + +lower potential. The state of the near Earth magnetosphere was determined + +by the amount of magnetic flux that was removed from the region and + +not by the flux removal rate or by the specific time of the evolution. + +More details and other results on this type of simulation are provided + +by \cite{hsieo14,hsieo15,ottoh15}. Note that very similar results + +have been obtained using the rice convection model \cite{zhoua09} + +and global simulations \cite{gords17b}. + +Fig.~\ref{fig:8_chp1} presents the cross tail current density in the + +midnight meridian in order to demonstrate that the quasi-static evolution + +in this example indeed leads to very thin and strong current layers. + +The current density in this region is as high as 10 $nA/m^{2}$ and + +about an order of magnitude larger than typical equilibrium current + +densities. The process that is illustrated here has been termed current + +sheet formation through magnetic flux depletion in order to distinguish + +it from the typical assumption that current sheet formation is caused + +by lobe compression due to additional magnetic flux in the lobe region + +of the magnetotail. Note that during a typical growth phase both processes + +should operate. Dayside reconnection generates open magnetic flux + +that is convected to the nightside and added to the lobes. Dayside + +reconnection also causes a reduction of flux on the dayside that is + +compensated by convection from the night side as can be seen from + +typical polar cap convection patterns. We also note that observations + +of current sheets agree well with the presented model results \cite{petrb09,petra15,artea16b}. + +\section{Summary and Conclusions} + +\label{sec:5_chp1} + +The examples illustrated here demonstrate various aspects of numeric + +simulations of the MHD equations. It is emphasized that all numerical + +solutions to the MHD have errors that in many cases can be addressed + +as numerical diffusion or dispersion. These errors limit the validity + +of numerical simulations and in general any application has to insure + +that numerical errors are sufficiently small in order to identify + +the important physics in a numerical simulation. We have illustrated + +a number of tests such as magnetic line conservation as well as mass, + +momentum, energy, and entropy conservation. The conservation laws + +can be employed in different ways to test numerical MHD simulations. + +Further tests can be conducted using known analytic properties, such + +as the growth rate of instabilities, e.g., the KH wave, or the jump + +conditions associated with fast or slow shocks. Note that this approach + +is somewhat different from tests of global simulations which frequently + +use observed magnetospheric states and ask the question of how well + +a given simulation can reproduce the observed properties. + +Local or meso-scale MHD simulations are frequently used to examine + +clearly defined local processes and instabilities. They have the advantage + +of providing much higher resolution and are ideally suited to examine + +a sensitive dependence on plasma or boundary conditions for a physical + +process. Because of their much higher resolution, local models often + +provide better conservation laws than global processes where by necessity + +a KH mode or magnetic reconnection are only resolved by a very limited + +number of grid points or nodes. Typical applications of local MHD + +but also kinetic models frequently address processes at the magnetospheric + +boundaries, at the bow shock, and in the magnetototail of planetary + +magnetospheres similar to the examples and references provided in + +this chapter. Similar local or mesoscale simulations are used in solar + +and astrophysical simulations (e.g., \cite{ottob07,sant11,adamb13}). + +Usually it is assumed that higher order approximations are better + +than low order approximations. This is in general true, particularly, + +if higher order derivatives are important in the basic equations. + +However, this advantage truly applies only if the grid resolution + +is similar for higher and lower order approximations. We note that + +1st order approximations are generally not acceptable because of the + +large numerical diffusion. Given that it is more complicated to formulate + +a higher order scheme and that it is much more involved to formulated + +consistent boundary conditions, it really depends on the application + +which type of scheme is advantageous. + +A similar remark applies to implicit schemes. Implicit schemes are + +great because they may remove or reduce time step limitations and + +can improve stability. However, it should also be kept in mind that + +the choice of a time step must also consider accuracy, and for many + +applications accuracy and stability imply a very similar choice of + +the time step for explicit codes. Numerical techniques in space physics + +include a large number of finite difference (e.g., the examples and + +references provided here) and finite volume methods (e.g., \cite{gords17b,merks15,Zhang_2019}). + +In contrast finite element seem to play no role space plasma MHD simulation, + +and spectral or pseudo-spectral methods are relatively rare (e.g., + +\cite{kus97}). Finite element methods have the advantage that + +they are particularly useful to model more complicated shapes of obstacles + +or the system domain. Spectral methods suffer from the difficulty + +of the formulation of boundary conditions which need to be consistent + +with the chosen base functions. The difficulty of formulating boundary + +conditions has been illustrated particularly by our example 3. + +Finally, numerical simulations are sometimes used like a black box, + +i.e., without consideration of the numerical limitations for a code + +in a given application. Clearly when this happens, there can be little + +confidence in the results. Any applications of a numerical simulations + +should keep in mind the capabilities of the simulation method and + +use consistency checks to generate confidence in the results. Further + +reading and additional information on MHD simulations and methods + +is provided also in the respective chapters of this volume on 'Adaptive + +Global MHD Simulations' and 'Higher-order magnetohydrodynamic numerics'. + %- Finite Differenzen