T5:
Supernova explosion:
simulating a blast wave
Before the tutorials:
Think about:
- What happens when a star explodes?
- How does a setup to simulate this would look like?
- Re-think the general solution we had in the lectures!
During the tutorials:
You can run the experiments of a blast wave (as discussed in the lecture).
A simple blast wave
- Create a 3D grid with uniform distribution (say, 100×100×100) and a certain density (say 0.125).
Do not forget how last time we used a glass to construct an other geometry from it!
- Assume low pressure (say 1e-20) and zero velocities.
- Give a handful of particles in the central part a very large pressure (say 1).
Think about how to select the particles and what could be important here?
- When compiling the code, do not forget to enable
NOGRAVITY and PERIODIC
and to switch off LONG_X, LONG_Y and LONG_Z as you now deal with a cubic setup.
- Now choose a proper end time and spacing of the snapshots in the
box.param. Also set a useful value for
ArtBulkViscConst. As it is a strong shock, maybe start wit a value like 1.5.
Now we can perform the simulation and analyze it.
- Try to explain what is happening in the simulation?
- Can you indicate in the plots what would be the expected solution?
- Have you checked the geometry of how you deployed the energy? What should you check there?
- Try to have a look at the temperature of the gas.
- How would the results look like if we set a smaller value for
ArtBulkViscConst as last time ?
Solutions
A simple example
- some example initial conditions to start with:
wget https://www.usm.uni-muenchen.de/~dolag/Lille2026/T05/box.ic
- As the simulation this time takes quite a while, you can download one example snap file to start to do the analysis:
wget https://www.usm.uni-muenchen.de/~dolag/Lille2026/T05/snap_010
Setup your own initial conditions
- Again, extending previous setup script, we can first create a 100×100×100 cube and then dump enormous energy in the center.
wget https://www.usm.uni-muenchen.de/~dolag/Hydro/Hydro/glass_10x10x10
wget https://www.usm.uni-muenchen.de/~dolag/Hydro/Hydro/Python/ic_header
(if not already done before)
wget https://www.usm.uni-muenchen.de/~dolag/Lille2026/T05/setup_blast_3D.py
python3 setup_blast.py
- You should now have a setup which looks like the following, where wqe highlighted the box center and the particles which get initially the large pressure.
Example for analyzing the simulation
- Again, modify your plotting scripts from previous tutorials
- Remember the solutions for the problem we discussed in the lectures (scalings with time!)
- How can you overplot them in the time evolution?
wget https://www.usm.uni-muenchen.de/~dolag/Lille2026/T05/show_blast.py
python3 show_blast.py
- You should be able to obtain an animation like this and identify all the phenomena discussed in the lectures:
Useful commands
- More informations on the OpenGadget3 containers
- Start your docker session:
docker run -it -v :/mnt --name opengadget3_container opengadget3:XXX
- Connect from a second shell to a running docker session:
docker exec -it opengadget3_container bash
- Get the simulation code:
cp -r ~/OpenGadget3 .
- Copy the config file:
wget https://www.usm.uni-muenchen.de/~dolag/Hydro/Hydro/Config.sh
- Copy the parameter file:
wget https://www.usm.uni-muenchen.de/~dolag/Hydro/Hydro/box.param
- Setup the environment for compiling the code:
source Build/Container_build.sh
- Compile the code:
make -j
- Run a simulation:
mpiexec -np 2 OpenGadget3/OpenGadget3 box.param