KROME-X: a GPU-ready library for chemistry and microphysics 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 105 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
- Charged-current neutrino opacity within the relativistic Hartree-Fock framework for astrophysical simulations of core-collapse supernovae and binary neutron star mergers
- Towards a coupled activity-fallback model for comets I) 67P/Churyumov-Gerasimenko's water activity from a microphysics model with dynamic dust-depth
- Towards a coupled activity-fallback model for comets I) 67P/Churyumov-Gerasimenko’s water activity from a microphysics model with dynamic dust-depth
- Collider Probes of Dark Energy Microphysics
- Beta-Particle Transport and Thermalization in Kilonova Ejecta with Detailed Atomic Microphysics
BibTeX
@misc{lupi2026kromex,
title = {{KROME-X: a GPU-ready library for chemistry and microphysics in astrophysical simulations}},
author = {Alessandro Lupi and Tommaso Grassi and Stefano Bovino},
howpublished = {arXiv},
year = {2026},
month = oct,
doi = {10.48550/arxiv.2610.28917},
eprint = {2610.28917},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2610.28917},
note = {CC BY 4.0},
}
RIS
TY - UNPB
TI - KROME-X: a GPU-ready library for chemistry and microphysics in astrophysical simulations
AU - Alessandro Lupi
AU - Tommaso Grassi
AU - Stefano Bovino
PY - 2026
DA - 2026/10/20
PB - arXiv
DO - 10.48550/arxiv.2610.28917
UR - https://arxiv.org/abs/2610.28917
AB - 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.
ER -