Modeling the (magneto-)hydrodynamics of astrophysical systems often requires inclusion of self-gravity, which necessitates solution of the Poisson equation along with the MHD conservation laws. We describe the implementation of new self-gravity solvers using the multigrid algorithms in the Athena++ adaptive mesh refinement (AMR) framework. The solvers are built on top of the AMR hierarchy and TaskList framework of Athena++ for efficient parallelization. We adopt a conservative formulation for the Laplacian operator that avoids artificial accelerations at level boundaries. Periodic, fixed, and zero-gradient boundary conditions are implemented, as well as open boundary conditions based on a multipole expansion. We present results of tests demonstrating the accuracy and scaling of the methods. On a uniform grid we show the multigrid solver significantly outperforms methods based on FFTs, and requires only a small fraction of the compute time required by the (highly optimized) magnetohydrodynamic solver in Athena++. As a demonstration of the capabilities of the methods, we present the results of a test calculation of magnetized protostellar collapse on an adaptive mesh.
[Poster PDF File]