KROME-X: a GPU-ready library for chemistry and microphysics in astrophysical simulations

arXiv:2610.28917 · astro-ph.GA, astro-ph.IM · Submitted 2026-10-20 · Read on arXiv

astro-ph.GA, astro-ph.IM

Submitted: 2026-10-20

Updated: 2026-10-20

Comments: 12 pages (+ 7 of appendix), 14 figures, submitted to A&A

License: http://creativecommons.org/licenses/by/4.0/

The gist: KROME is a Python pre-processor that writes a complete Fortran solver of chemistry and microphysics for each chemical network, widely used in astrophysical simulations.

Abstract

KROME is a Python pre-processor that writes a complete Fortran solver of chemistry and microphysics for each chemical network, widely used in astrophysical simulations. We introduce here KROME-X, a complete rewrite of KROME in modern C++, which incorporates updated physics. A code generator translates a declarative network description into a compact core (rates, right-hand side, analytic Jacobian, thermal terms, and tables), which a fixed, header-only runtime integrates with a C++ port of the `backward differentiation formula' method of CVODE (SUNDIALS). The physics is validated against legacy KROME and independent references. On the legacy test cases KROME-X reproduces legacy KROME to the accuracy of the solvers, wherever the physics is the same, and is up to 13.5 times faster at equal tolerance. On NVIDIA A100 GPUs, it can outperform its share of a computing node from a few thousand cells per call, with the highest throughput (5 to 30) obtained for 10 5 cells per batch. Networks of hundreds of species still run faster on the CPU due to the GPU's limited memory capacity. The new version also includes, among other changes, on-the-fly co-evolution of a photon field alongside chemistry, which conserves photons exactly; the secondary ionizations using the photoelectron energy of each absorption; dust evolution in size and temperature with a true grain energy equation; line cooling rates rebuilt from current atomic and molecular data, and incorporating optical thickness effects. KROME-X therefore represents the natural successor of KROME and provides a portable, extensible framework for astrochemical kinetics on both CPUs and GPUs for future hydrodynamic simulations.

Related papers