Accelerating self-gravitating hydrodynamics simulations with adaptive force updates
arXiv:2010.13792 · doi:10.1093/mnras/stab2208
Abstract
Many astrophysical hydrodynamics simulations must account for gravity, and evaluating the gravitational field at the positions of all resolution elements can incur significant cost. Typical algorithms update the gravitational field at the position of each resolution element every time the element is updated hydrodynamically, but the actual required update frequencies for hydrodynamics and gravity can be different in general. We show that the gravity calculation in hydrodynamics simulations can be optimised by only updating gravity on a timescale dictated by the already-determined maximum timestep for accurate gravity integration , while staying well within the typical error budget of hydro schemes and gravity solvers. Our implementation in the GIZMO code uses the tidal timescale introduced in Grudić & Hopkins 2020 to determine and the force update frequency in turn, and uses the jerk evaluated by the gravity solver to construct a predictor of the acceleration for use between updates. We test the scheme on standard self-gravitating hydrodynamics test problems, finding solutions very close to the naïve scheme while evaluating far fewer gravity forces, optimising the simulations. We also demonstrate a speedup in a STARFORGE MHD GMC simulation, with larger gains likely in higher-resolution runs. In general, this scheme introduces a new tunable parameter for obtaining an optimal compromise between accuracy and computational cost, in conjunction with e.g. time-step tolerance, numerical resolution, and gravity solver tolerance.
arXiv comment8 pages, 6 figures. Resubmitted to MNRAS with revisions, including new merging polytropes test in 3.2
References in corpus (25)
- The cosmological simulation code GADGET-2
- E pur si muove: Galiliean-invariant cosmological hydrodynamical simulations on a moving mesh
- GIZMO: A New Class of Accurate, Mesh-Free Hydrodynamic Simulation Methods
- The Inner Structure of LambdaCDM Halos I: A Numerical Convergence Study
- Gasoline: An adaptable implementation of TreeSPH
- The Universality of the Stellar IMF
- A General Class of Lagrangian Smoothed Particle Hydrodynamics Methods and Implications for Fluid Mixing Problems
- Simulating cosmic structure formation with the GADGET-4 code
- An energy-conserving formalism for adaptive gravitational force softening in SPH and N-body codes
- The impact of magnetic fields on single and binary star formation
- A Very Fast and Momentum-Conserving Tree Code
- Smoothed Particle Hydrodynamics with particle splitting, applied to self-gravitating collapse
- STARFORGE: Toward a comprehensive numerical model of star cluster formation and feedback
- N-body simulations of gravitational dynamics
- Variable Smoothing Lengths and Energy Conservation in Smoothed Particle Hydrodynamics
- Parallel TreeSPH
- An Excursion-Set Model for the Structure of GMCs and the ISM
- Astrophysical Weighted Particle Magnetohydrodynamics
- A model for the formation of stellar associations and clusters from giant molecular clouds
- The stellar IMF from Isothermal MHD Turbulence
- STARFORGE: The effects of protostellar outflows on the IMF
- The Effects of Magnetic Fields and Protostellar Feedback on Low-mass Cluster Formation
- The observable prestellar phase of the IMF
- Can magnetized turbulence set the mass scale of stars?
- A general-purpose timestep criterion for simulations with gravity
Cited by in corpus (5)
- The dynamics and outcome of star formation with jets, radiation, winds, and supernovae in concert
- Less wrong: a more realistic initial condition for simulations of turbulent molecular clouds
- Novel Conservative Methods for Adaptive Force Softening in Collisionless and Multi-Species N-Body Simulations
- A self-gravity module for the PLUTO code
- Early Stages of Dusty Tori: The First Infrared Spectra from a Highly Multiscale Quasar Simulation