T3: The Riemann problem:
try it out on your own

Before the tutorials:

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:

During the tutorials:

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.

Simple, 2D example

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:

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:

First Step

Use the prepared ICs to do your simulation:

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.

Second Step

As you might realize, the numerical solution looks quite noisy, so you can start to apply what you learned in T03.

Try to understand why the result improve in each of the steps!

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.

Third Step

Now you can play around with different initial values for left and right values for density and pressure.

Programming goals for T4:

Goal of this tutorial is that you

Solutions

Additional exercise for experts/very interested students (voluntary)

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!

Useful commands