SADHANA

A block structured adaptive mesh framework for astrophysics and beyond


About SADHANA

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

Main Features :
  • 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
Second Order Accuracy : SADHA has second order accuracy for both HD and MHD
SADHA has second order accuracy for HD
Name : HD Case, Isentropic-vortex test
SADHA has second order accuracy for MHD
Name : MHD Case, Isodensity-vortex test
Shock Capturing Facilities : We demonstrate the shock capturing abilities of SHANA here.
SADHA has second order accuracy for MHD
Name: Shu-Osher shocktube test(HD)
SADHA has second order accuracy for MHD
Name: Brio-Wu shocktube test(MHD)
AMR Implementation :
  • 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.
AMR Implementation
Modified Boundaries and Connectivity :
  • 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.
modified definition of AMR boundaries
Isotropic(square) and Anisotropic(rectangular) Blocks for refinement : We use the classical Double-Mach-Reflection (HD) test to show isotropic/anisotropic mesh refinement capabilities for hydrodynamics
Isotropic(square) Blocks for refinement
Anisotropic(rectangular) Blocks for refinement
Isotropic(square) and Anisotropic(rectangular) Blocks for refinement : We use Cloud-Shock-Interaction (MHD) test to show isotropic/anisotropic mesh refinement capabilities for magnetohydrodynamics
Isotropic(square) Blocks for refinement
Anisotropic(rectangular) Blocks for refinement