Gravitational dynamics tutorials
Winter semester 2025 / 2026
Klaus Dolag, Rhea-Silvia Remus, Tadziu Hoffmann
Lecture
Information about the lecture is given on a separate web page.
Tutorials overview
In this class you will be required to write small computer programs to solve physical problems. This will be done incrementally in small steps, so if you have only little programming experience to date you will have the opportunity to pick this up. (Like all important skills, this will require serious effort and lots of experimentation from your side. Do not underestimate the work required for this course.) But keep in mind that programming is not the main aspect of these tutorials — understanding physics is.
Each of the tutorials will involve a general discussion about the goals of the current exercise set and the related physical and numerical issues. Preparation for the exercises and participation in the discussions will be mandatory. The tutorials will also give you the opportunity to discuss particular programming aspects. Do not be afraid to ask questions, out of a mistaken belief that this will make you appear stupid in front of your peers (who are often less knowledgeable than they would like you to believe). If you become stuck in your programming efforts, we will provide example code fragments that demonstrate how to perform certain computational tasks.
Prerequisites
You will need a laptop computer with:
- a C/C++ or Fortran compiler (e.g., gcc or gfortran or the Intel oneAPI toolkit),*
- a text editor (such as emacs or vim),
- a program to produce graphs (for example, gnuplot).
You can also do your calculations (remotely, via ssh) on the computers of the LMU Physik CIP Pool.
Tutorial T0 is intended to give you the chance to set up
your programming environment and gain some experience in using the
command-line tools we will be employing during this course.
Use this opportunity to ask us questions if you need help in
setting up your system.
(*While theoretically the algorithms we will use can be programmed in any programming language, scripting languages such as Python do not have the required performance for the larger problems we will tackle later in this course. Since the tutorials are designed to allow you to incrementally grow your programs, you will benefit most by starting with a compiled language from the very beginning of the course. We offer assistance with C/C++ and Fortran (and IDL and gnuplot for plotting). If you are undecided: what language should I choose?)
Tutorial session times
Monday, 14:00–16:00 (+ after 18:00 for help with programming issues).
Tutorial schedule
Tutorial number | Content | Date |
---|---|---|
T0 | Computer preparation | 2025-10-13 |
T1 | Units and acceleration; first program | 2025-10-20 |
T2 | Gravitational forces; vectors and loops | 2025-10-27 |
T3 | Euler integrator | 2025-11-03 |
T4 | Euler and other integrators | 2025-11-10 |
T5 | Kepler fitting | 2025-11-17 |
T6 | Multiple (test) particles and extended potentials | 2025-11-24 |
T7 | General 3-body problem (ejection, softening) | 2025-12-01 |
T8 | Lagrange points (restricted 3-body problem) | 2025-12-08 |
T9 | General N-body problem (free-fall collapse) | 2025-12-15 |
T10 | Dynamical friction | 2026-01-12 |
T11 | Colliding galaxies | 2026-01-19 |
T12 | Visualization of galaxies in cosmological simulations | 2026-01-26 |
= content updated since the tutorial class | ||
= new tutorial online |