  We present the black hole accretion code (BHAC), a new multidimensional
general-relativistic magnetohydrodynamics module for the MPI-AMRVAC framework.
BHAC has been designed to solve the equations of ideal general-relativistic
magnetohydrodynamics in arbitrary spacetimes and exploits adaptive mesh
refinement techniques with an efficient block-based approach. Several
spacetimes have already been implemented and tested. We demonstrate the
validity of BHAC by means of various one-, two-, and three-dimensional test
problems, as well as through a close comparison with the HARM3D code in the
case of a torus accreting onto a black hole. The convergence of a turbulent
accretion scenario is investigated with several diagnostics and we find
accretion rates and horizon-penetrating fluxes to be convergent to within a few
percent when the problem is run in three dimensions. Our analysis also involves
the study of the corresponding thermal synchrotron emission, which is performed
by means of a new general-relativistic radiative transfer code, BHOSS. The
resulting synthetic intensity maps of accretion onto black holes are found to
be convergent with increasing resolution and are anticipated to play a crucial
role in the interpretation of horizon-scale images resulting from upcoming
radio observations of the source at the Galactic Center.
