Journal of Computational Physics vol:231 issue:3 pages:718-744
Relativistic hydro and magnetohydrodynamics provide continuum fluid descriptions for gas and plasma dynamics throughout the visible universe. We present an overview of state-of-the-art modeling in special relativistic regimes, targeting strong shock-dominated flows with speeds approaching the speed of light. Significant progress in its numerical modeling emerged in the last two decades, and we highlight specifically the need for grid-adaptive, shock-capturing treatments found in several contemporary codes in active use and development. Our discussion highlights one such code, MPI-AMRVAC (Message-Passing Interface-Adaptive Mesh Refinement Versatile Advection Code), but includes generic strategies for allowing massively parallel, block-tree adaptive simulations in any dimensionality. We provide implementation details reflecting the underlying data structures as used in MPI-AMRVAC. Parallelization strategies and scaling efficiencies are discussed for representative applications, along with guidelines for data formats suitable for parallel I/O. Refinement strategies available in MPI-AMRVAC are presented, which cover error estimators in use in many modern AMR frameworks. A test suite for relativistic hydro and magnetohydrodynamics is provided, chosen to cover all aspects encountered in high-resolution, shock-governed astrophysical applications. This test suite provides ample examples highlighting the advantages of AMR in relativistic flow problems.