Abstract

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 optimized by only updating gravity on a time-scale dictated by the already determined maximum time-step for accurate gravity integration Δtgrav, while staying well within the typical error budget of hydro schemes and gravity solvers. Our implementation in the gizmo code uses the time-scale derived from the tidal tensor $t_{\rm tidal} = \Vert \mathbf {T}\Vert ^{-1/2}$ to determine Δtgrav and the force update frequency in turn, and uses the rate of change of acceleration 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 standard scheme while evaluating far fewer gravity forces, optimizing the simulations. We also demonstrate a $\sim 70{{\ \rm per\ cent}}$ speed-up in an example simulation of a giant molecular cloud. 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.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.