py4radiation: a framework for generating heating/cooling functions and ion fractions from custom radiation fields for astrophysical simulations
Daniel Villarruel-Y\'anez, Wladimir E. Banda-Barrag\'an, Benedetta Casavecchia
Key points
From the paper's conclusion- We present a new Python-based, parallelised package that acts as an integration framework, connecting well-established astrophysical codes and models to produce self-consistent heating/cooling functions and ion fractions from custom ionising UV/X-ray backgrounds.
Abstract
Modelling multiphase gas in and around galaxies is key to understanding the baryon cycle in galaxy evolution. Modern simulation codes rely on heating/cooling functions and ion fractions to capture the thermodynamics and chemistry of such gases, but coupling all physical factors remains challenging. We present a new Python-based, parallelised package that acts as an integration framework, connecting well-established astrophysical codes and models to produce self-consistent heating/cooling functions and ion fractions from custom ionising UV/X-ray backgrounds. The package returns multi-dimensional tables that can be readily coupled to hydrodynamic and post-processing codes to study radiative processes and extract observables, as we demonstrate with static cloud simulations. Our simulation suite studies the thermodynamic history of a static circumgalactic cloud with smoothed edges subjected to meta-galactic and starburst heating. We find that the clouds experience damped pulsations regulated by strong cooling-driven inflows and heating-driven outflows that constantly overshoot pressure equilibrium. Meta-galactic heating is weak and produces a confined and dense cloud, while starburst heating is strong and sustains large clouds only a little smaller than those obtained with the standard $10^4\,\rm K$ cooling floor. Starburst radiative heating acts as a damping agent, thereby reducing mixing. py4radiation comes with extensive documentation and a sample catalogue of heating/cooling functions and ion tables for a selected set of input meta-galactic and starburst spectral energy distributions. The code is publicly available and can be easily expanded.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Net Cooling Tables for Cosmological Simulations under Multiple UV/X-ray Background ModelsarXiv · 2026
- PyExoCross 2.0: A Python Framework for LTE and non-LTE Spectra, Cross Sections, and Spectroscopic Post-processing of Atomic and Molecular Line ListsRAS Techniques and Instruments · 2026
- Photoionization models of H II regions: a grid for the next decadeProceedings of the International Astronomical Union · 2026
- SPECWIZARD : A Public Python Framework for Creating Synthetic Absorption Spectra from Hydrodynamical SimulationsMonthly Notices of the Royal Astronomical Society · 2026
- KROME-X: a GPU-ready library for chemistry and microphysics in astrophysical simulationsarXiv · 2026
- The hydrodynamical response of cold circumgalactic clouds to quasar radiationAstronomy and Astrophysics · 2026