  We report on the development of MPI-AMRVAC version 2.0, which is an
open-source framework for parallel, grid-adaptive simulations of hydrodynamic
and magnetohydrodynamic (MHD) astrophysical applications. The framework now
supports radial grid stretching in combination with adaptive mesh refinement
(AMR). The advantages of this combined approach are demonstrated with
one-dimensional, two-dimensional and three-dimensional examples of spherically
symmetric Bondi accretion, steady planar Bondi-Hoyle-Lyttleton flows, and wind
accretion in Supergiant X-ray binaries. Another improvement is support for the
generic splitting of any background magnetic field. We present several tests
relevant for solar physics applications to demonstrate the advantages of field
splitting on accuracy and robustness in extremely low plasma $\beta$
environments: a static magnetic flux rope, a magnetic null-point, and magnetic
reconnection in a current sheet with either uniform or anomalous resistivity.
Our implementation for treating anisotropic thermal conduction in
multi-dimensional MHD applications is also described, which generalizes the
original slope limited symmetric scheme from 2D to 3D. We perform ring
diffusion tests that demonstrate its accuracy and robustness, and show that it
prevents the unphysical thermal flux present in traditional schemes. The
improved parallel scaling of the code is demonstrated with 3D AMR simulations
of solar coronal rain, which show satisfactory strong scaling up to 2000 cores.
Other framework improvements are also reported: the modernization and
reorganization into a library, the handling of automatic regression tests, the
use of inline/online Doxygen documentation, and a new future-proof data format
for input/output
