English

GRHayL: a modern, infrastructure-agnostic, extensible library for GRMHD simulations

General Relativity and Quantum Cosmology 2026-02-13 v2 High Energy Astrophysical Phenomena

Abstract

Interpreting multimessenger signals from neutron stars and black holes requires reliable general relativistic magnetohydrodynamics (GRMHD) simulations across rapidly evolving high-performance computing platforms, yet key algorithms are routinely rewritten within infrastructure-specific numerical relativity codes, hindering verification and reuse. We present the General Relativistic Hydrodynamics Library (GRHayL), a modular, infrastructure-agnostic GR(M)HD library providing conservative-to-primitive recovery, reconstruction, flux/source and induction operators, equations of state, and neutrino leakage through an intuitive interface. GRHayL refactors and extends the mature IllinoisGRMHD code into reusable point- and stencilwise kernels, enabling rapid development and cross-code validation in diverse frameworks, while easing adoption of new microphysics and future accelerators. We implement the same kernels in the Einstein Toolkit (Carpet and Carpetx) and BlackHoles@Home, demonstrating portability with minimal duplication. Validation combines continuous-integration unit tests with cross-infrastructure comparisons of analytic GRMHD Riemann problems, dynamical Tolman-Oppenheimer-Volkoff evolutions, and binary neutron star mergers, showing comparable or improved behavior over legacy IllinoisGRMHD and established Einstein Toolkit codes.

Keywords

Cite

@article{arxiv.2512.15846,
  title  = {GRHayL: a modern, infrastructure-agnostic, extensible library for GRMHD simulations},
  author = {Samuel Cupp and Leonardo R. Werneck and Terrence Pierre Jacques and Samuel Tootle and Zachariah B. Etienne},
  journal= {arXiv preprint arXiv:2512.15846},
  year   = {2026}
}

Comments

24 pages, 16 figures, matches accepted version

R2 v1 2026-07-01T08:29:56.568Z