SADHANA
A block structured adaptive mesh framework for astrophysics and beyond
SADHANA is designed to provide a computational framework capable of simulating theoretical and real-world
applications for astrophysical problems and beyond.
It is equipped with structured adaptive mesh refinement (AMR) facility and can efficiently solve multidimensional
hyperbolic partial differential equations. By utilizing Hilbert space-filling curves for dynamic load balancing and
modified block boundary definitions for simplified neighbor search, SADHANA offers a flexible and high-
performance solution for simulating complex physics problems.
We have successfully implemented physics models to solve hydrodynamics and magnetohydrodynamics
equations within this framework, employing second-order accurate numerical schemes.
The technical details are described in Bandopadhyay & Shang(APJS, 2022) paper
- Can solve 1D, 2D or 3D problems using both isotropic and anisotropic blocks for refinement
- MPI based parallelization
- Supports HD and MHD Physics, viscous (HD) and resistive(MHD) terms can be integrated in source terms
- Currently, supports Cartesian coordinate system only
- MHD is modeled with the Generalized Lagrange Multiplier(GLM) approach following Dedner et. al. (JCP, 2002)
- Has second order RK2 for time integration with MUSCL for interpolation of states at cell-interfaces
- Uses approximate Riemann solvers (e.g. HLLC for HD and HLLD for GLM-MHD)
- Apart from predefined periodic, open, reflective and outflow, it can have user defined boundary condition
- SADHANA utilizes a doubly linked list data structure to efficiently handle the dynamic connectivity of locally refined mesh configurations.
- Variants of Hilbert space-filling curves are constructed iteratively, ensuring efficient traversal and load balancing of the adaptive mesh.
- Specific sequences, called "base patterns," represent the connectivity among child blocks during refinement and support the self-similar property of Hilbert curves.
- The tabulated list-based approach and base patterns enable dynamic mesh refinement based on the evolving solution while maintaining computational efficiency and scalabilit
- The doubly linked list seamlessly integrates the mesh refinement process with numerical solvers, providing a robust and flexible solution for simulating complex multidimensional physics problems.
- SADHANA introduces a novel approach to block boundary definitions, simplifying the neighbor search process in adaptive mesh refinement compared to traditional methods.
- Block boundaries are divided into multiple sub-boundaries based on the relative positions of neighboring blocks (8 sub-boundaries for 2D AMR, 24 sub-boundaries for 3D AMR).
- Modified block boundary definitions enable direct connectivity between blocks of different refinement levels, eliminating the need for explicit tree-based data structures.
- This approach efficiently tracks relationships between adjacent blocks using the modified block boundary definitions, reducing computational overhead in managing the adaptive mesh hierarchy.
- The modified block boundary definition enhances overall efficiency and scalability by simplifying the neighbor search process and minimizing computational costs associated with AMR operations.