As discussed in the Lecture, in the presence of magnetic fields, several different waves
can be formed. In the lecture, we looked at some special cases. So, start with a classic paper,
Numerical Magnetohydrodynamics in Astrophysics: Algorithm and Tests for One-dimensional Flow,
where the authors provide the numerical solution for 5 different types simple MHD shock tubes and several variations on it. In this tutorial
we will try to reproduce the setup of 5A, so see the corresponding figure and table for the detailed setup:
You can start from a similar setup as used for the Riemann Problem in T04 and collect some different particle distributions.
You can now write a program to set up a long slab (along the x-axis) that represents your initial conditions.
Now you can run the simulation.
PERIODIC
and
NOGRAVITY
again. Also, you have to indicate the non-cubic form
of the simulation domain by setting LONG_X=100
,
LONG_Y=1
and LONG_Z=1
. For the MHD, switch on
MAGNETIC
,
MU0_UNITY
and NO_SHEAR_VISCOSITY_LIMITER
in the Config.sh
file before compiling.
TimeMax 6
,
InitCondFile
,
TimeBetSnapshot 0.2
.
setup_slab.pro
in IDL
show_slab.pro
in IDL
ifx -g -traceback -check all -fpe0 -o slabsetup slabsetup.f90
glass.txt
from T04)
./slabsetup
gnuplot grid.plt
(to check that the particle positions are set up correctly)
PERIODIC
and NOGRAVITY
and with LONG_X=100
, LONG_Y=1
, and LONG_Z=1
.
slab.ic
as the initial conditions file
and BoxSize
= 1TimeMax
= 6, TimeBetSnapshot
= 0.1)
ifx -g -traceback -check all -fpe0 -o readsnap readsnap.f90
for file in snap_???; do ./readsnap $file >$file.txt; done
gnuplot slab.plt
xine -l slab.mp4
We know that the way the numerical equations are formulated we explicitly zeroed any transport of internal energy or magnetic fields, even by numerical error. This leads to non-damping of any oscillations in the solutions (like the pressure blip we remember from the normal shock tube experiment. So we can here explore how the solution is approached if we artificially induce some transport of energy and magnetic fields which might mimic unavoidable microscopic processes of real material.