Tree-based solvers for adaptive mesh refinement code FLASH - I: gravity and optical depths

We describe an OctTree algorithm for the MPI-parallel, adaptive mesh-refinement code {\sc FLASH}, which can be used to calculate the gas self-gravity, and also the angle-averaged local optical depth, for treating ambient diffuse radiation. The algorithm communicates to the different processors only those parts of the tree that are needed to perform the tree walk locally. The advantage of this approach is a relatively low memory requirement, important in particular for the optical depth calculation, which needs to process information from many different directions. This feature also enables a general tree-based radiation transport algorithm that will be described in a subsequent paper, and delivers excellent scaling up to at least 1500 cores. Boundary conditions for gravity can be either isolated or periodic, and they can be specified in each direction independently, using a newly developed generalisation of the Ewald method. The gravity calculation can be accelerated with the {\em adaptive block update} technique by partially re-using the solution from the previous time-step. Comparison with the {\sc Flash} internal multi-grid gravity solver shows that tree based methods provide a competitive alternative, particularly for problems with isolated or mixed boundary conditions. We evaluate several multipole acceptance criteria (MACs) and identify a relatively simple APE MAC which provides high accuracy at low computational cost. The optical depth estimates are found to agree very well with those of the {\sc RADMC-3D} radiation transport code, with the tree solver being much faster. Our algorithm is available in the standard release of the {\sc FLASH} code in version 4.0 and later.

[1]  S. Glover,et al.  Approximations for modelling CO chemistry in GMCs: a comparison of approaches , 2011, 1102.0670.

[2]  Joshua E. Barnes,et al.  A modified tree code: don't laugh; it runs , 1990 .

[3]  Junichiro Makino Comparison of two different tree algorithms , 1990 .

[4]  T. Quinn,et al.  Gasoline: a flexible, parallel implementation of TreeSPH , 2003, astro-ph/0303521.

[5]  R. Klessen,et al.  On the nature of star-forming filaments – I. Filament morphologies , 2014, 1407.6716.

[6]  J. Bagla TreePM: A code for cosmological N-body simulations , 1999, astro-ph/9911025.

[7]  Joachim Stadel,et al.  PKDGRAV3: beyond trillion particle cosmological simulations for the next era of galaxy surveys , 2016, 1609.08621.

[8]  David H. Porter,et al.  A tree code with logarithmic reduction of force terms, hierarchical regularization of all variables, and explicit accuracy controls , 1989 .

[9]  Piet Hut,et al.  A hierarchical O(N log N) force-calculation algorithm , 1986, Nature.

[10]  R. Klessen,et al.  MODELING COLLAPSE AND ACCRETION IN TURBULENT GAS CLOUDS: IMPLEMENTATION AND COMPARISON OF SINK PARTICLES IN AMR AND SPH , 2010, 1001.4456.

[11]  Gunther Lukat,et al.  A GPU accelerated Barnes-Hut Tree Code for FLASH4 , 2015, 1509.07370.

[12]  J. Weingartner,et al.  Dust Grain-Size Distributions and Extinction in the Milky Way, Large Magellanic Cloud, and Small Magellanic Cloud , 2001 .

[13]  P. Ricker A Direct Multigrid Poisson Solver for Oct-Tree Adaptive Meshes , 2007, 0710.4397.

[14]  Richard J. Anderson Tree Data Structures for N-Body Simulation , 1999, SIAM J. Comput..

[15]  S. Glover,et al.  On column density thresholds and the star formation rate , 2013, 1306.5714.

[16]  Tracing the Mass during Low-Mass Star Formation. II. Modeling the Submillimeter Emission from Preprotostellar Cores , 2001 .

[17]  B. Fryxell,et al.  FLASH: An Adaptive Mesh Hydrodynamics Code for Modeling Astrophysical Thermonuclear Flashes , 2000 .

[18]  Guohong Xu A new parallel N body gravity solver: TPM , 1994, astro-ph/9409021.

[19]  R W Hockney,et al.  Computer Simulation Using Particles , 1966 .

[20]  Ralf Klessen GRAPESPH with fully periodic boundary conditions: fragmentation of molecular clouds , 1997 .

[21]  A. Evrard Beyond N-body: 3D cosmological gas dynamics , 1988 .

[22]  Ugo Becciani,et al.  FLY: MPI-2 high resolution code for LSS cosmological simulations , 2007, Comput. Phys. Commun..

[23]  J. Bagla,et al.  A modified TreePM code , 2008, 0802.3215.

[24]  Structure of Stationary Photodissociation Fronts , 1996, astro-ph/9603032.

[25]  V. Springel,et al.  GADGET: a code for collisionless and gasdynamical cosmological simulations , 2000, astro-ph/0003162.

[26]  G. D. Byrne,et al.  VODE: a variable-coefficient ODE solver , 1989 .

[27]  Jeremiah P. Ostriker,et al.  Tree Particle-Mesh: An Adaptive, Efficient, and Parallel Code for Collisionless Cosmological Simulation , 2003 .

[28]  R. Klessen,et al.  The SILCC project - IV. Impact of dissociating and ionizing radiation on the interstellar medium and Hα emission as a tracer of the star formation rate , 2016, 1610.06569.

[29]  Walter Dehnen,et al.  A Hierarchical O(N) Force Calculation Algorithm , 2002 .

[30]  Lyman Spitzer,et al.  The Dynamics of the Interstellar Medium. III. Galactic Distribution. , 1942 .

[31]  F. Bouchet,et al.  Application of the Ewald method to cosmological N-body simulations , 1991 .

[32]  P. P. Ewald Die Berechnung optischer und elektrostatischer Gitterpotentiale , 1921 .

[33]  Andrew F. Nelson,et al.  VINE—A NUMERICAL CODE FOR SIMULATING ASTROPHYSICAL SYSTEMS USING PARTICLES. II. IMPLEMENTATION AND PERFORMANCE CHARACTERISTICS , 2008, 0802.4253.

[34]  D. A. Hubber,et al.  SEREN - A new SPH code for star and planet formation simulations , 2011, 1102.0721.

[35]  R. Klessen,et al.  The SILCC project - III. Regulation of star formation and outflows by stellar winds and supernovae , 2016, 1606.05346.

[36]  John F. Wallin,et al.  A Performance Comparison of Tree Data Structures for N-Body Simulation , 2002 .

[37]  William H. Press,et al.  Techniques and tricks for N-body computation , 1986 .

[38]  R. Klessen,et al.  How long does it take to form a molecular cloud , 2012, 1204.5570.

[39]  R. Klessen,et al.  The SILCC (SImulating the LifeCycle of molecular Clouds) project - II. Dynamical evolution of the supernova-driven ISM and the launching of outflows , 2015, 1508.06646.

[40]  R. Klessen,et al.  The SILCC (SImulating the LifeCycle of molecular Clouds) project – I. Chemical evolution of the supernova-driven ISM , 2014, 1412.2749.

[41]  Jeremiah P. Ostriker,et al.  The Tree-particle-mesh N-body gravity solver , 1999 .

[42]  R. Klessen,et al.  Modelling CO formation in the turbulent interstellar medium , 2009, 0907.4081.

[43]  S. Glover,et al.  Simulating the Formation of Molecular Clouds. I. Slow Formation by Gravitational Collapse from Static Initial Conditions , 2006, astro-ph/0605120.

[44]  Richard I. Klein,et al.  The Jeans Condition: A New Constraint on Spatial Resolution in Simulations of Isothermal Self-Gravitational Hydrodynamics , 1997 .

[45]  John Dubinski A parallel tree code , 1996 .

[46]  William H. Press,et al.  Dynamic mass exchange in doubly degenerate binaries I , 1990 .

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

[48]  W. Bonnar,et al.  Boyle's Law and gravitational instability , 1956 .

[49]  M. Wetzstein,et al.  VINE—A NUMERICAL CODE FOR SIMULATING ASTROPHYSICAL SYSTEMS USING PARTICLES. I. DESCRIPTION OF THE PHYSICS AND THE NUMERICAL METHODS , 2008, 0802.4245.

[50]  J. Ostriker The Equilibrium of Polytropic and Isothermal Cylinders. , 1964 .

[51]  Sang Hwan Lee,et al.  A new treecode for long-range force calculation , 2008, Comput. Phys. Commun..

[52]  D. Hubber,et al.  GANDALF - Graphical Astrophysics code for N-body Dynamics And Lagrangian Fluids , 2016, 1709.04488.

[53]  Michael S. Warren,et al.  Skeletons from the treecode closet , 1994 .

[54]  Jon Louis Bentley,et al.  Multidimensional Binary Search Trees in Database Applications , 1979, IEEE Transactions on Software Engineering.

[55]  R. Klessen,et al.  TreeCol: a novel approach to estimating column densities in astrophysical simulations , 2011, 1109.3861.

[56]  V. Springel The Cosmological simulation code GADGET-2 , 2005, astro-ph/0505010.

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

[58]  J. Jeans,et al.  The Stability of a Spherical Nebula , 1902 .

[59]  D. O. Astronomy,et al.  EvoL: The new Padova T-SPH parallel code for cosmological simulations - I. Basic code: gravity and hydrodynamics , 2009, 0912.1786.

[60]  Dehnen A Very Fast and Momentum-conserving Tree Code. , 2000, The Astrophysical journal.

[61]  Nishikanta Khandai,et al.  The Adaptive TreePM: an adaptive resolution code for cosmological N‐body simulations , 2008, 0811.4228.