As discussed in the Lecture, the Riemann Problem is the key pillar of Eulerian hydrodynamics and can not be
solved fully analytically. In the lecture, we solved a special case of it. So, start with this picture
taken from Simulation Techniques for Cosmological Simulations. Now, think about:
Also, remember that we had the equation
with
and
that determines the pressure at the contact discontinuity (the pressure in sectors 3 and 4).
Think about:
Run a small hydro test problem for a jump in pressure and density. With time, a situation similar to shown
above should emerge, where you should be able to clearly identify the 5 regions marked above.

Make the movie of the simulation, similar to last time, and then, compute the solution of the Riemann problem
and overplot them over the time evolution. You can start with the compute pressure P5, and then try
to recompute some other values in the different regions as well.
As in the previous tutorial (This time we start with a 2D setup), get a copy of the code and the configuration file Config.sh. But before compiling, edit the Config.sh file so that it contains:
PERIODIC
NOGRAVITY
WENDLAND_C2_KERNEL
TWODIMS
LONG_X=40
LONG_Y=1
LONG_Z=1
Do not forget the to compile the make -j command before you start the simulation.
As in the first tutorial, copy the parameter file box.param and modify it to a new and reasonable unit system and adapt the times for the outputs according to resonable values:
PeriodicBoundariesOn 1
TimeMax 5.0
TimeBetSnapshot 0.1
UnitLength_in_cm 1.0
UnitMass_in_g 1.0
UnitVelocity_in_cm_per_s 1.0
SofteningGas 0.2
SofteningGasMaxPhys 0.2
Use the prepared ICs to do your simulation:
wget https://www.usm.uni-muenchen.de/~dolag/Lille2026/T03/box.ic
Now run the simulation and look at the result. Note that you can already watch the results from the existing
snapshots while the simulation is still running. You can attach a new command prompt to the running container
by opening a new shel and execute docker exec -it opengadget3_container bash Try to modify your
plotting scripts from the first tutorial T01 to do a simple plot showing the
different values along the x-axis.
As you might realize, the numerical solution looks quite noisy, so you can start to apply what you learned in T03.
WENDLAND_C4_KERNEL
and then the WENDLAND_C6_KERNEL.
Now, as the results look much better, there is blip in the pressure left. Check if it is
already present in snap_000 and if so, think about where it could come from. You can try to run
the simulation switching additional ARTIFICIAL_CONDUCTIVITY on.
Now you can play around with different initial values for left and right values for density and pressure.
Goal of this tutorial is that you
wget https://www.usm.uni-muenchen.de/~dolag/Hydro/Hydro/Python/ic_header wget https://www.usm.uni-muenchen.de/~dolag/Lille2026/T03/setup_grid.py
python3 setup_grid.py
wget https://www.usm.uni-muenchen.de/~dolag/Lille2026/T03/show_simple.py
python3 show_simple.py
As you use a lagrangian scheme, you can follow the fluid elements explicitly. All particles have an unique identifyer ID, so you can use that to color code the particles.
Can you see some interesting details in this plot? Try to see if you can get a intuitve understanding what the interplay of the motion of the featurs and the change of the color of the features mean for the flow of the gas!
docker run -it -v :/mnt --name opengadget3_container opengadget3:XXX
docker exec -it opengadget3_container bash
cp -r ~/OpenGadget3 .
wget https://www.usm.uni-muenchen.de/~dolag/Hydro/Hydro/Config.sh
wget https://www.usm.uni-muenchen.de/~dolag/Hydro/Hydro/box.param
source Build/Container_build.sh
make -j
mpiexec -np 2 OpenGadget3/OpenGadget3 box.param