magritte, a modern software library for 3D radiative transfer – II. Adaptive ray-tracing, mesh construction, and reduction

Radiative transfer is a notoriously difficult and computationally demanding problem. Yet, it is an indispensable ingredient in nearly all astrophysical and cosmological simulations. Choosing an appropriate discretization scheme is a crucial part of the simulation, since it not only determines the direct memory cost of the model but also largely determines the computational cost and the achievable accuracy. In this paper, we show how an appropriate choice of directional discretization scheme as well as spatial model mesh can help alleviate the computational cost, while largely retaining the accuracy. First, we discuss the adaptive ray-tracing scheme implemented in our 3D radiative transfer library Magritte, that adapts the rays to the spatial mesh and uses a hierarchical directional discretization based on HEALPix. Second, we demonstrate how the free and open-source software library Gmsh can be used to generate high quality meshes that can be easily tailored for Magritte. In particular, we show how the local element size distribution of the mesh can be used to optimise the sampling of both analytically and numerically defined models. Furthermore, we show that when using the output of hydrodynamics simulations as input for a radiative transfer simulation, the number of elements in the input model can often be reduced by an order of magnitude, without significant loss of accuracy in the radiation field. We demonstrate this for two models based on a hierarchical octree mesh resulting from adaptive mesh refinement (AMR), as well as two models based on smoothed-particle hydrodynamics (SPH) data.

[1]  Joel Nothman,et al.  SciPy 1.0-Fundamental Algorithms for Scientific Computing in Python , 2019, ArXiv.

[2]  I. McDonald,et al.  (Sub)stellar companions shape the winds of evolved stars , 2020, Science.

[3]  Bharat K. Soni,et al.  Handbook of Grid Generation , 1998 .

[4]  K. Gordon,et al.  Using hierarchical octrees in Monte Carlo radiative transfer simulations , 2013, 1304.2896.

[5]  L. Lucy A numerical approach to the testing of the fission hypothesis. , 1977 .

[6]  V. Icke,et al.  Transport on adaptive random lattices. , 2006, Physical review. E, Statistical, nonlinear, and soft matter physics.

[7]  J. Monaghan,et al.  Smoothed particle hydrodynamics: Theory and application to non-spherical stars , 1977 .

[8]  B. Wandelt,et al.  Adaptive ray tracing for radiative transfer around point sources , 2001, astro-ph/0111033.

[9]  M. Baes,et al.  Hierarchical octree and k-d tree grids for 3D radiative transfer simulations , 2013, 1311.0705.

[10]  K. Gorski,et al.  HEALPix: A Framework for High-Resolution Discretization and Fast Analysis of Data Distributed on the Sphere , 2004, astro-ph/0409513.

[11]  Andrew S. Glassner,et al.  An introduction to ray tracing , 1989 .

[12]  L. Auer,et al.  Improved Boundary Conditions for the Feautrier Method , 1967 .

[13]  James Hetherington,et al.  magritte, a modern software library for 3D radiative transfer: I. Non-LTE atomic and molecular line modelling , 2019, 1912.08445.

[14]  S. Viti,et al.  3D-PDR: a new three-dimensional astrochemistry code for treating photodissociation regions , 2012, 1209.1091.

[15]  Paul K. Romano,et al.  OpenMC: A State-of-the-Art Monte Carlo Code for Research and Development , 2014, ICS 2014.

[16]  Daniel J. Price,et al.  Phantom: A Smoothed Particle Hydrodynamics and Magnetohydrodynamics Code for Astrophysics , 2017, Publications of the Astronomical Society of Australia.

[17]  Robin Lombaert,et al.  Simplified models of stellar wind anatomy for interpreting high-resolution data - Analytical approach to embedded spiral geometries , 2015, 1504.04996.

[18]  P. Colella,et al.  Local adaptive mesh refinement for shock hydrodynamics , 1989 .

[19]  L. Auer,et al.  An Hermitian method for the solution of radiative transfer problems , 1976 .

[20]  V. Springel E pur si muove: Galilean-invariant cosmological hydrodynamical simulations on a moving mesh , 2009, 0901.4107.

[21]  J. C. Trama,et al.  TRIPOLI-4®, CEA, EDF and AREVA reference Monte Carlo code , 2015 .

[22]  Roman Kuchkuda,et al.  An introduction to ray tracing , 1993, Comput. Graph..

[23]  I. E. Mellah,et al.  MPI-AMRVAC 2.0 for Solar and Astrophysical Applications , 2017, 1710.06140.

[24]  Maarten Baes,et al.  Using 3D Voronoi grids in radiative transfer simulations , 2013, 1310.1854.

[25]  Christophe Geuzaine,et al.  Gmsh: A 3‐D finite element mesh generator with built‐in pre‐ and post‐processing facilities , 2009 .