Context. We present VENICE, an operator-splitting algorithm to integrate a numerical model on a hierarchy of timescales. Aims. VENICE allows a wide variety of different physical processes operating on different scales to be coupled on individual and adaptive time-steps. It therewith mediates the development of complex multi-scale and multi-physics simulation environments with a wide variety of independent components. Methods. The coupling between various physical models and scales is dynamic, and realised through (Strang) operators splitting using adaptive time-steps. Results. We demonstrate the functionality and performance of this algorithm using astrophysical models of a stellar cluster, first coupling gravitational dynamics and stellar evolution, then coupling internal gravitational dynamics with dynamics within a galactic background potential, and finally combining these models while also introducing dwarf galaxy-like perturbers. These tests show numerical convergence for decreasing coupling timescales, demonstrate how VENICE can improve the performance of a simulation by shortening coupling timescales when appropriate, and provide a case study of how VENICE can be used to gradually build up and tune a complex multi-physics model. Although the examples provided here couple dedicated numerical models, VENICE can also be used to efficiently solve systems of stiff differential equations.
Read full abstract