BHAC (the Black Hole Accretion Code) is a multidimensional general relativistic magnetohydrodynamics code based on the MPI-AMRVAC framework. BHAC solves the equations of ideal general relativistic magnetohydrodynamics in one, two or three dimensions on arbitrary stationary space-times, using an efficient block based approach.

Created by Oliver Porth and the BHAC development team
Hector Olivares, Yosuke Mizuno, Ziri Younsi, Luciano Rezzolla, Elias Most, Lukas Weih, Bart Ripperda and Fabio Bacchini
at Goethe University Frankfurt within the ERC Synergy grant “BlackHoleCam: Imaging the Event Horizon of Black Holes” (Grant No. 610058), PI: H. Falcke, M. Kramer, L. Rezzolla.

This public version will receive frequent updates and improvements from the private development repository. There can still be bugs and issues. It is the users’ responsibility to guarantee quality and correctness of the results. Any feedback and contributions are welcome, but please understand that we may not be able to respond to all of them because of limited resources.

Usage instructions

If you make use of this software release, you are morally obliged to cite the following papers in scientific communications:

  • Porth, O., Olivares, H., Mizuno, Y., Younsi, Z., Rezzolla, L., Moscibrodzka, M., Falcke, H., Kramer, M. (2017). The Black Hole Accretion Code. Computational Astrophysics and Cosmology, 4(1), 1.
  • Olivares, H., Porth, O., Davelaar, J., Most, E. R., Fromm, C. M., Mizuno, Y., Younsi, Z., Rezzolla, L. (2019). Constrained transport and adaptive mesh refinement in the Black Hole Accretion Code. Astronomy & Astrophysics, 629, A61.

When using the resistive GRMHD module, you should additionally cite:

  • Ripperda, B., Bacchini, F., Porth, O., Most, E. R., Olivares, H., Nathanail, A., Rezzolla, L., Teunissen, J., Keppens, R. (2019). General-relativistic Resistive Magnetohydrodynamics with Robust Primitive-variable Recovery for Accretion Disk Simulations. The Astrophysical Journal Supplement Series, Volume 244, Issue 1, article id. 10, 19 pp.

We consider it a courtesy that you notify us (contact below) of your intended use.
If you make useful additions to this software, we kindly ask you to contact the main developers, so upgrades can be made available to the wider community.

Most importantly: have fun using BHAC and do great science!


Please refer to the online documentation for usage instructions.

Reporting bugs

If BHAC behaves in a different way than expected from the documentation and you believe this might be due to a bug, please get in contact with one of the developers. It is possible that the bug has already been found by another user and we are already working on it. In this case it will appear in the list of known issues.


For general inquiries: Oliver Porth, Luciano Rezzolla, Hector Olivares