Kratos-polrad: Novel GPU system for Monte-Carlo simulations with consistent polarization calculations
Haifeng Yang, Lile Wang
TL;DR
Kratos-polrad tackles the computational challenge of polarized radiative transfer by delivering a GPU-accelerated Monte Carlo code that tracks the full Stokes vector with consistent quaternion-based frame transformations. It combines a rigorous polarized RT formulation with an efficient two-step imaging scheme, enabling rapid synthesis of polarized observables. The code is validated across self-scattering, dichroic extinction, and complex magnetic-field configurations, achieving ~10^2× speedups over CPU baselines while preserving physical accuracy. This performance opens up extensive parameter-space exploration and high-resolution polarimetric imaging for dusty, magnetized astrophysical systems and lays the groundwork for time-dependent and multi-physics extensions.
Abstract
Polarized radiation serves as a vital diagnostic tool in astrophysics, providing unique insights into magnetic field geometries, scattering processes, and three-dimensional structures in diverse astrophysical scenarios. To address these applications, we present Kratos-polrad, a novel GPU-accelerated Monte Carlo Radiative Transfer code built upon the heterogeneous computing framework of Kratos, designed for self-consistent and efficient polarization calculations. It utlizes comprehensive treatment of Stokes parameters throughout photon propagation, featuring transforms the grain-lab frame transforms using quaternion algebra and consistent non-linear polarization extinction in cells, which are useful in modeling radiative transfer processes with scatterings by aligned dust grains. The code implements two-step polarimetry imaging that decouples Monte Carlo sampling of scattering physics from imaging geometry, enabling efficient synthesis maximizing the utilization of photon packets. Extensive validation against analytical solutions and established codes demonstrates accurate treatment of diverse polarization phenomena, including self-scattering polarization, dichroic extinction in aligned dust grains, and complex polarization patterns in twisted magnetic field configurations. By leveraging massive GPU parallelism, optimized memory access patterns, and analytical approaches for optically thick cells, Kratos-polrad achieves performance improvements of $\sim 10^{2}$ times compared to CPU-based methods, enabling previously prohibitive studies in polarimetric astrophysics.
