VegasAfterglow: A High-Performance Framework for Gamma-Ray Burst Afterglows
Yihan Wang, Connery Chen, Bing Zhang
TL;DR
VegasAfterglow presents a high-performance, modular C++ framework for GRB afterglow modeling that self-consistently evolves forward and reverse shock dynamics while computing full synchrotron and inverse Compton radiation, including self-absorption and Klein–Nishina corrections. By supporting arbitrary jet structures, magnetization, energy injection histories, and ambient density profiles, the tool enables accurate modeling across relativistic to deep Newtonian regimes and off-axis viewing angles, all with a Python interface for integration into inference workflows. The authors demonstrate near real-time light-curve generation (∼1 ms per frequency on a laptop) and provide a unified, energy-conserving approach to reverse-shock crossing that improves over traditional pressure-balance methods, while revealing that reverse shocks can be systematically weaker in the thin-shell limit than prior analytic estimates. These advances position VegasAfterglow as a powerful platform for interpreting current and future multi-messenger GRB observations and for accelerating Bayesian parameter inference across broad jet, medium, and radiation parameter spaces.
Abstract
Gamma-ray bursts (GRBs) are the most luminous astrophysical transients, known to be associated with core collapse of massive stars or mergers of two compact objects such as two neutron stars. They are followed by multi-wavelength afterglow emission originating from the deceleration of the relativistic jets by the ambient medium. The study of afterglow emission offers crucial insights into the physics of relativistic shocks, the properties of the circumburst environment, the physical and geometrical structure of relativistic jets, as well as the viewing geometry of the observer. We present {\tt VegasAfterglow}, a newly developed, high-performance C++ framework designed for modeling GRB afterglows with flexibility and computational efficiency as key features of design. The framework self-consistently solves forward and reverse shock dynamics and calculates synchrotron (including self-absorption or all spectral regimes) and inverse Compton radiation (including Klein-Nishina corrections); it can handle arbitrary user-defined ambient density profiles, central engine activity histories, viewing angles, and the jet structures of energy, Lorentz factor, and magnetization profiles. It supports both relativistic and non-relativistic regimes and includes lateral jet spreading effects. In this paper, we describe the numerical implementation of the framework and assess its computational performance. Our results demonstrate that {\tt VegasAfterglow} is well-suited for interpreting current and future multi-wavelength observations in the era of multi-messenger astronomy.
