T11: colliding Galaxis
We are going to use live galaxies and simulate there evolution (e.g. galaxy-galaxy mergers).
Before the tutorials:
Do, think about, and research the following:
- Bring your own program to the level of the example given for the last tutorial,
so that you can start from a clean and working version.
- What are the main components a galaxy ?
- What would be typical values for a collision, e.g. distances and velocities ?
- What do you expect to see when two galaxies collide ?
During the tutorials:
Program it!
Example programs:
These are just examples.
- C/C++:
- F90:
- Simple version (this is sufficient for the moment, but it doesn’t hurt you to start improving it as suggested above):
T10.f90
(colorized),
Makefile
(colorized) (rename to “Makefile” or use with “make -f Makefile_gfortran”)
- More complex version:
(To be added later. We will reorganize the program structure when we get to multiple particles; think about how you would do this on your own.)
Discussion of the results:
Plot your results with gnuplot and plot the behaviour of the systems.
Can you explain what you see ?
Example plots:
Extra programming goals for T11:
Your program now propagates the whole system always at the lowest time-step, which is
dominated by the most dense part of your simulation. How to speed up your program ?
- First think about how to re-structure your program to have the particles on individual
time-steps. It is not to complicated, but you have to adapt the different subroutines.
example2.cc, example2.h
- However, this does not really help, as the drift of the system now has to be called
extremely often (compared to before). So next thing is to introduce integer time-steps,
so that again you group particles at different time-steps. Here it gets even useful to
define integer time-steps as power of two values to even better group your different
time-steps.
example3.cc, example3.h
Further references:
- We used a public available program makegalaxy to setup the galaxies, which can
be downloaded from
here.
- To do more elaborated simulation, you can use a public version of P-Gadget, see
here