Universitäts-Sternwarte München

Fakultät für Physik der Ludwig-Maximilians-Universität


Gravitational dynamics
Summer semester 2021

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 some effort and lots of experimentation from your side.) 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. You are expected to participate in, and prepare for, these discussions. 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).

You will work on the exercises at home and discuss your results in the tutorials. Note that the later exercises build upon the earlier ones, so you will need to actively work on your programs every week in order to not get left behind. We will provide some example code fragments for each tutorial, which you can use as basis for your own programs if you are stuck.

You will need

  • 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).


Due to the ongoing Corona pandemic it is unlikely that we will be able to conduct regular exams in this semester. For this reason, your grade in this course will be based on a written Hausarbeit to be handed in at the end of the semester (submit to dynamics@usm. . . . ). The general rules for this Hausarbeit are as follows:

  • For each tutorial from T1 through T11, provide a brief summary outlining the physical background of that tutorial’s subject, your solution(s) to the problems posed, and a few plots showing the results of your computations plus a short discussion interpreting your results. (Usually, one or two plots will be sufficient, but sometimes more may be required — this is for you to judge. More does not mean better. Try to make your plots display the information you want to convey as concisely as possible. This is a skill you must learn, and the quality of your plots will affect your grade.)
  • For one tutorial of your choice from T4 through T11, provide an extended analysis of an aspect of the subject of your own design that goes well beyond the general questions we pose as part of the tutorial content. (Assign a separate chapter in your Hausarbeit to this, and clearly label it as such.) Don’t choose a topic based on whether you think it will be easy, but rather choose one that appeals to your curiosity and allows for experimentation. Try to surprise us with some deeper insight into the physics involved.

The general discussions we will have during the tutorials should give you a good idea of what is expected in such a scientific report.

Tutorial session times

Friday, 16:00–18:00 (+ open end for help with programming issues),
online via Zoom.

Tutorial schedule

Tutorial numberContentDate

T0Introduction to the shell and gnuplot 2021-04-16
T1Units and acceleration; first program 2021-04-23
T2Gravitational forces; vectors and loops 2021-04-30
T3Euler integrator 2021-05-07
T4Euler and other integrators 2021-05-14
 T5Kepler fitting 2021-05-21
 T6Multiple (test) particles and extended potentials 2021-05-28
 T7General 3-body problem (ejection, softening) 2021-06-04
 T8Lagrange points (restricted 3-body problem) 2021-06-11
 T9General N-body problem (free-fall collapse) 2021-06-18
T10Dynamical friction 2021-06-25
T11Colliding galaxies 2021-07-02
T12Visualization of galaxies in cosmological simulations2021-07-09

       = content updated since the tutorial class
       = new tutorial online
Letzte Änderung 12. Mai 2021 17:44 UTC durch Webmaster (webmaster@usm.uni-muenchen.de)