On-the-Fly Radiative Transfer
- On-the-fly radiative transfer is a computational approach that integrates radiation calculations directly into dynamic simulations, updating state variables in real time.
- It employs diverse numerical methods—such as moment methods, short-characteristics, and reverse ray tracing—to solve RT equations while coupling with chemistry and hydrodynamics.
- The technique leverages modern accelerations including GPU-based implementations and surrogate models to improve efficiency and fidelity in cosmological, galactic, and atmospheric applications.
On-the-fly radiative transfer (RT) denotes the solution of the radiative transfer problem during the evolution of a larger calculation rather than in post-processing, so that radiation fields, photoionization rates, heating, cooling, chemistry, and sometimes momentum exchange are updated on the same evolving state as hydrodynamics, MHD, or iterative atmosphere construction (Zier et al., 2024, Katz, 2022, Davis et al., 2012, Atanackovic-Vukmanovic, 2011). In current practice, the term covers a broad numerical spectrum: moment-based radiation hydrodynamics, short-characteristics solvers, adaptive and reverse ray tracing, non-LTE iterative schemes embedded inside atmospheric calculations, and accelerator-oriented surrogates or reduced-order models intended to reduce RT from a dominant cost to a sub-dominant one (Wadsley et al., 2023, Rost et al., 11 Nov 2025, Liu et al., 20 Mar 2026).
1. Definition and scope
In cosmological and galaxy-formation simulations, on-the-fly RT means that the RT solution is computed during each hydrodynamical timestep, and that ionization states, temperatures, and molecular abundances feed back into the dynamics and chemistry immediately rather than being reconstructed afterward (Zier et al., 2024). In RAMSES-RTZ, this coupling is explicit: the ionisation states of individual metals are coupled to the radiation hydrodynamics solver present in RAMSES-RT, and the network follows radiative recombination, dielectronic recombination, collisional ionisation, photoionisation, and charge transfer while using the ionisation states to compute non-equilibrium optically-thin metal-line cooling (Katz, 2022). In Athena, the RT module is combined with the standard MHD integrators using operator-splitting and is used to calculate heating and cooling source terms in the MHD equations when radiation pressure is small compared with gas pressure (Davis et al., 2012).
The same expression is also used in broader RT contexts. In non-LTE line formation, FBILI was presented as a method intended to make radiative transfer cheap enough to be embedded “on the fly” in more complex calculations because it retains the simplicity of classical -iteration while achieving convergence rates comparable to sophisticated ALI schemes without heavy matrix machinery (Atanackovic-Vukmanovic, 2011). The improved implicit integral method was likewise framed around repeated RT solves inside larger structural or dynamical computations, emphasizing robustness and low numerical noise in a 1D plane-parallel, static setting (Simonneau et al., 2011). In planetary atmosphere retrieval, the forward radiative transfer model is repeatedly executed inside inversion or retrieval, so RT efficiency becomes a critical issue even when the dynamics are not evolved concurrently (Rengel et al., 2023).
This suggests that on-the-fly RT is best understood as a mode of integration inside a larger algorithmic loop, not as a single closure, discretization, or transport approximation.
2. Principal numerical formulations
A major branch of on-the-fly RT uses moment methods. AREPO-RT employs a moment-based RT scheme with M1 closure on a moving Voronoi mesh, evolving group-wise radiation energy and flux as a photon fluid and coupling them to a non-equilibrium H/He chemical network (Zier et al., 2024). This formulation avoids explicit ray tracing and angular discretization, but it inherits the usual moment-method dependence on closure quality and stiff RT time-stepping.
A second branch uses characteristic methods. The Athena RT module solves the time-independent, multi-frequency RT equation on multidimensional Cartesian simulation domains, including scattering and non-LTE effects, and is based on short characteristics, accelerated Lambda iteration, and domain decomposition (Davis et al., 2012). In classical atmosphere-oriented formulations, the source function is written as
and the numerical problem becomes the iterative evaluation of the non-local -operator or an implicit surrogate for it (Atanackovic-Vukmanovic, 2011, Davis et al., 2012). The improved implicit integral method instead formulates the problem as integral relations between neighboring depth points and adopts a cubic spline representation of the source function to impose continuity of , which is explicitly described as highly stabilizing the numerical process (Simonneau et al., 2011).
A third branch uses explicit rays with hierarchical acceleration. TREVR2 is a tree-based reverse ray-tracing algorithm suitable for both particle and mesh codes, designed to self-consistently evolve chemistry for zoomed-in astrophysical simulations with both internal sources and prescribed background radiation (Wadsley et al., 2023). Its defining feature is that it searches outward from receiving gas in discrete directions set by the HEALPIX algorithm, accumulating optical depth and adding flux due to sources combined into progressively larger tree cells with distance; it demonstrates execution time with absorption and many sources (Wadsley et al., 2023). FlexRT also lies in this branch, combining adaptive ray tracing with a highly flexible treatment of the intergalactic ionizing opacity and explicit finite-speed-of-light evolution for reionization problems (Cain et al., 2024).
Deterministic and Monte Carlo line-transfer solvers are another important subfamily. LOC is based on ray-tracing and standard accelerated lambda iteration, works on 1D and 3D grids, and uses octree grids in 3D to enable calculations with large models at low memory usage (Juvela, 2020). THOR is a GPU-accelerated and MPI-parallel radiative transfer code focused initially on resonant emission lines, with multiple grid-based and gridless data structures and distributed-memory Monte Carlo transport for Ly, Mg II, the circumgalactic medium, and the Ly forest (Byrohl et al., 15 Jul 2025). Ray-trax represents a differentiable variant of the ray-based family: a GPU-oriented 3D ray tracer written in JAX that solves the time-dependent emission–absorption problem on turbulent gas fields and exposes end-to-end gradients (Branca et al., 12 Nov 2025).
3. Coupling to chemistry, cooling, and embedded physics
The main scientific motivation for on-the-fly RT is not transport alone but self-consistent coupling. In RAMSES-RTZ, photon group densities from RAMSES-RT provide the photoionisation rates for the metal network, while the resulting ion fractions feed non-equilibrium optically-thin metal-line cooling and line emissivities (Katz, 2022). The fiducial model solves for the ionisation states of C, N, O, Mg, Si, S, Fe, and Ne in addition to H, He, and H, and the code was benchmarked to reproduce CLOUDY when equilibrium is reached (Katz, 2022). In the isolated-galaxy example, the code was used to translate directly between simulation outputs and observables such as [O II], [O III], H, H, and ionisation correction factors without the use of idealised photoionisation models (Katz, 2022).
AREPO-RT uses the same general pattern in a different closure. Radiation fields are evolved in three photon groups relevant for H I, He I, and He II ionization, and thermochemistry is advanced consistently with the radiation field in each RT step (Zier et al., 2024). The practical consequence is that gas cooling rates, star formation, feedback effectiveness, and the ionization and temperature state are modified by the evolving local radiation field rather than by a fixed meta-galactic background (Zier et al., 2024).
In operator-split characteristic schemes, the coupling is often expressed through source terms rather than a full radiation momentum sector. The Athena module computes radiative heating and cooling source terms from the short-characteristics solution and inserts them into the gas energy equation, while the companion VET formulation uses the same RT solution to compute a variable Eddington tensor for full radiation MHD (Davis et al., 2012). In NLTE atmosphere work, the same embedded-RT logic appears in a different guise: FBILI constructs local implicit relations of the form 0 and solves them together with the statistical equilibrium equations layer by layer, thereby making repeated RT solves feasible inside more complex non-LTE calculations (Atanackovic-Vukmanovic, 2011).
This suggests that the defining coupling pattern of on-the-fly RT is recursive: the current state determines opacities, emissivities, and sources; RT updates the radiation field; chemistry and cooling consume that field; and the updated state changes the next RT solve.
4. Computational scaling and acceleration
Because RT is nonlocal, high-dimensional, and often limited by the speed of light, on-the-fly use has historically been constrained by runtime. Much of the recent literature is therefore about changing the cost model rather than the physics. TREVR2 demonstrates 1 scaling with absorption and many sources, making multi-band RT costs comparable to tree-based gravity and hydrodynamics and preserving the usual speed-up when active particles evolve on individual timesteps (Wadsley et al., 2023). AREPO-RT explicitly targets exascale hardware: by transitioning all RT-related calculations to GPUs and redesigning communication, it achieves a significant computational speedup of around 15 for standard benchmarks compared to the original CPU implementation, and in a THESAN-like cosmological case RT becomes sub-dominant, yielding an overall threefold improvement in efficiency (Zier et al., 2024).
Line-transfer codes show the same trend. LOC reports agreement with other RT codes to within 2, while runs were by up to a factor 3 faster on a GPU than on a single CPU core in 1D and showed up to 4 speed-up for 3D octree models (Juvela, 2020). THOR yields large 5-506 speed-ups compared to previous CPU-only codes while remaining MPI-parallel and multi-target across CPUs, GPUs, and other accelerators (Byrohl et al., 15 Jul 2025). Ray-trax emphasizes differentiability and accelerator efficiency rather than full scattering physics, but it still reports a 3D benchmark in which a 7 grid with 8 directions per source and 9 sources is propagated across the full domain in 0 s on a single NVIDIA H200 GPU, with memory footprint scaling as 1 (Branca et al., 12 Nov 2025).
A separate acceleration track replaces parts of the RT solve by learned or reduced models. The ROM-based acceleration of SI-DSA is fully offline-free, constructs ROMs on the fly during time marching, and reports 2 to 3 speedup over classical SI-DSA with only marginal overhead for ROM construction and updates (Liu et al., 20 Mar 2026). The U-FNO surrogate for three-dimensional, monochromatic, time-dependent radiative transfer in absorption-emission approximation reports speedups of more than 2 orders of magnitude while maintaining an average relative error below 4, with the explicit goal of serving as a drop-in replacement for on-the-fly radiative transfer solvers in hydrodynamic simulations (Rost et al., 11 Nov 2025). In a different numerical tradition, the 3D anisotropic-scattering contrail solver achieves an iterative core of 5 through hierarchical matrices, indicating that quasi-linear complexity is also attainable in integral-equation formulations (Pironneau et al., 2023).
5. Validation regimes and scientific applications
Validation for on-the-fly RT is typically organized around transport test problems, chemistry-front tests, and fully coupled astrophysical applications. TREVR2 demonstrates overall performance with a set of astrophysical test problems and explicitly targets zoomed-in cosmological galaxies with both internal sources and prescribed background radiation (Wadsley et al., 2023). FlexRT is validated against standard tests from the Cosmological Radiative Transfer Comparison Project and then compared to an existing adaptive ray tracing code in a cosmological reionization simulation, showing broad agreement in all of these tests (Cain et al., 2024). The AREPO-RT exascale work uses cosmological radiation-hydrodynamics simulations of the Epoch of Reionization employing a setup similar to the THESAN project and shows that the accelerated RT remains faithful while substantially reducing cost (Zier et al., 2024).
Fully coupled radiation–chemistry applications underline why on-the-fly treatment changes the answer. RAMSES-RTZ shows that local radiation and non-equilibrium metal chemistry materially alter oxygen ion fractions, line luminosities, BPT positions, and ionisation correction factors in an isolated galaxy simulation (Katz, 2022). Athena’s short-characteristics module is validated on static RT problems and on dynamical problems that include radiative heating and cooling, including linear radiative waves and radiative shocks, demonstrating that the operator-split method is stable, convergent, and efficient for the targeted regime (Davis et al., 2012).
In line transfer and synthetic observables, LOC is intended for large interstellar-medium models and can handle models with hundreds of millions of cells on personal computers, while THOR demonstrates resonant-line RT from simple shell models to 6 galaxy simulations, circumgalactic Mg II and Ly7 halos, large-scale cosmic-web emission, and Ly8-forest absorption spectra (Juvela, 2020, Byrohl et al., 15 Jul 2025). In atmospheric and retrieval settings, the practical application is repeated forward modelling: synthetic spectra are calculated via a radiative transfer forward model and then iteratively compared against observations in inversion or retrieval, making RT throughput a central algorithmic concern rather than a post-processing luxury (Rengel et al., 2023).
6. Limitations, misconceptions, and emerging directions
On-the-fly RT does not eliminate the classical RT difficulties; it relocates them into a coupled, time-dependent setting. TREVR2 states directly that sources embedded in non-homogeneous absorbing material introduce systematic errors and proposes transmission averaging instead of absorption averaging to dramatically reduce these systematic effects; it also outlines other ways to address systematics, including an explicit complex source model (Wadsley et al., 2023). FlexRT distinguishes between a Standard Mode, which resolves hydrogen chemistry explicitly per cell, and a Generalized Opacity Mode, which encodes unresolved absorber physics in an effective opacity; this makes the code flexible, but it also makes accuracy contingent on the quality of the adopted opacity model (Cain et al., 2024).
A persistent controversy concerns approximate reionization schemes. The comparison between semi-numerical models and full RT finds that schemes that mark the entire sphere as ionized when the ionization criterion is fulfilled result in significantly accelerated reionization compared to the RT simulation, whereas schemes that flag only the central cell yield very similar but slightly delayed redshift evolution, with up to 9 ionizing photons lost (Hutter, 2018). The paper concludes that constraining ionizing-emissivity-sensitive parameters from semi-numerical galaxy formation–reionization models is subject to photon nonconservation (Hutter, 2018). This makes clear that “on-the-fly” does not guarantee photon conservation, angular fidelity, or correct front propagation by itself.
Hardware-oriented accelerations carry their own caveats. In AREPO-RT, strong scaling breaks down at high node counts because tasks have too few cells to saturate the GPUs, especially in the smallest time bins with few active cells (Zier et al., 2024). The U-FNO surrogate is trained on a fixed 0 grid, neglects scattering, omits angular dependence, and is not yet a full radiation-hydrodynamics implementation despite being designed as a drop-in replacement (Rost et al., 11 Nov 2025). Ray-trax intentionally restricts itself to the time-dependent emission–absorption problem and currently does not include explicit scattering (Branca et al., 12 Nov 2025). THOR, although architecturally on-the-fly ready, still treats gas as static during photon transport in its current science demonstrations and identifies gas-state updates, atomic operations, and task-based scheduling as future work for genuine radiation-hydrodynamics coupling (Byrohl et al., 15 Jul 2025). The improved implicit integral method remains 1D plane-parallel, and FBILI, despite its very fast convergence, is primarily demonstrated on two-level, partial redistribution, multilevel, and spherical atmosphere problems rather than on fully 3D radiation-hydrodynamics (Simonneau et al., 2011, Atanackovic-Vukmanovic, 2011).
The emerging direction is therefore twofold. One line pushes classical RT solvers toward exascale hardware, adaptive trees, hierarchical matrices, and lower-overhead iteration (Wadsley et al., 2023, Zier et al., 2024, Pironneau et al., 2023). The other line exploits temporal low-rank structure, neural-operator surrogates, and differentiable ray tracing to reduce cost while retaining enough fidelity for coupling inside hydrodynamics, inverse problems, and observational forward modelling (Liu et al., 20 Mar 2026, Rost et al., 11 Nov 2025, Branca et al., 12 Nov 2025). This suggests that the future of on-the-fly RT will remain plural: exact transport, approximate closures, and learned accelerators are likely to coexist, with the choice determined by which failure mode—cost, angular error, spectral fidelity, or coupling bias—is least tolerable in a given problem.