Computational Astrophysics

Course content

The course gives an introduction to numerical methods for contemporary computational astrophysics. It covers theory and practice for numerical methods including fluid and particle dynamics, gravitational collapse, and radiative energy transfer. It gives an overview of computational models for microphysical processes, such as cooling, heating, dust dynamics, and astrochemistry. The course exercises introduce and illustrate the methods applying them to concrete examples from astrophysics, and give a “hands-on” feeling for how and in what context they are used. During the course exercises, the students will build a highly modular yet simple core program based on Jupyter notebooks written in python, which includes most of the methods covered in the lectures. The course also touches on technical aspects, such as high performance computing and efficient code development.


MSc Programme in Physics

MSc Programme in Physics with a minor subject

Learning outcome


  • Modeling the dynamics of the interstellar medium, including fluids, magnetic fields, and heating and cooling.
  • Modeling gravitational collapse
  • Solving the radiation transfer equation
  • Using radiative transfer in connection with analysis and modeling of observations
  • Modeling particle dynamics and gas-particle interaction


The student will come to know the fundamental equations that govern astrophysical dynamics, including fluids, magnetic fields, radiative energy transfer and coupled gas-particle interaction, and how to solve them with modern numerical methods. In addition, the student will achieve knowledge of the basic computational techniques used in modern astrophysics including the principles of adaptive mesh refinement techniques and the difference between mesh and particle methods.


The course gives basic competences in numerical modelling, and will establish a foundation for a M.Sc. project based on numerical modelling.

Lectures, exercises and projects work

See Absalon for final course material. The following is an example of expected course literature.


P. Bodenheimer, G. P. Laughlin, M. Rozyczka, T. Plewa, H. W. Yorke: “Numerical Methods in Astrophysics”.  Complemented with lecture notes.

The student is expected to have a basic understanding of astrophysics such as that covered by the Bsc courses “Stars and Planets” and “Extragalactic Astrophysics”. It is required to have some programming experience in Python, such as that acquired in “Introduction to Computing for Physicists”. It is recommended but not required that the student has followed an M.Sc. course on theoretical astrophysics or has some knowledge about fluid dynamics.

Academic qualifications equivalent to a BSc degree is recommended.

The course is identical to the discontinued course NFYK14018U Computational Astrophysics: Star and Planet Formation. Therefore you cannot register for NFYK21004U - Computational Astrophysics, if you have already passed NFYK14018U Computational Astrophysics: Star and Planet Formation.
If you are registered with examination attempts in NFYK14018U Computational Astrophysics: Star and Planet Formation without having passed the course, you have to use your last examination attempts to pass the exam in NFYK21004U - Computational Astrophysics. You have a total of three examination attempts.

7,5 ECTS
Type of assessment
Continuous assessment
Written assignment, 4 days
Type of assessment details
The exam consists of two parts:
The continuous part of the evaluation, wich consists of 2-3 exercises per week, counts for 50% of the final grade. The student must have turned in at least 60% of the weekly exercises.
A written 4-day report (Monday to Thursday) with an oral defense (Friday) counts for 50% of the final grade.
All aids allowed
Marking scale
7-point grading scale
Censorship form
No external censorship
two internal examiners; the course responsible and an internal censor.

The re-exam consists of two parts: A 4-day report (Monday to Thursday) with an oral defense (Friday) counting for 50% of the grade. New solutions to the weekly exercies can be handed in to cover the continuous part of the evaluation (50%) no later than 2 weeks before the start of the 4-day report.

Criteria for exam assessment

see learning outcome

Single subject courses (day)

  • Category
  • Hours
  • Lectures
  • 35
  • Preparation
  • 77
  • Theory exercises
  • 35
  • Exam
  • 59
  • English
  • 206


Course number
7,5 ECTS
Programme level
Full Degree Master

1 block

Block 2
no limitation
The number of seats may be reduced in the late registration period
Study Board of Physics, Chemistry and Nanoscience
Contracting department
  • The Niels Bohr Institute
Contracting faculty
  • Faculty of Science
Course Coordinator
  • Troels Haugbølle   (8-6d667a6c67746a714573676e33707a336970)
Saved on the 28-02-2023

Are you BA- or KA-student?

Are you bachelor- or kandidat-student, then find the course in the course catalog for students:

Courseinformation of students