Kratos-polrad: Novel GPU system for Monte-Carlo simulations with consistent polarization calculations

Haifeng Yang (杨海峰), Lile Wang (王力乐) · 2025

Read Kratos-polrad: Novel GPU system for Monte-Carlo simulations with consistent polarization calculations by Haifeng Yang (杨海峰), Lile Wang (王力乐) (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2512-01283.txt.

Introduction

Haifeng Yang and Lile Wang present a new code for tracking light in space. Light can be polarized, which means its waves line up in a set way. That pattern can reveal the shape of gas, dust, and fields around stars and black holes.

Their code, Kratos-polrad, runs on graphics cards to gain speed. It sends many test rays through a model scene and tracks how each ray bends and twists. The code keeps the twist of the light correct at each step. Fast and correct runs like this help teams test ideas about what a scope should see.

Catalog record

CREATORHaifeng Yang (杨海峰), Lile Wang (王力乐)
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE45 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2512-01283

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Kratos-polrad: Novel GPU system for Monte-Carlo simulations with consistent polarization calculations Haifeng Yang (杨海峰), Lile Wang (王力乐) 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 ∼ 10 2 \sim 10^{2} times compared to CPU-based methods, enabling previously prohibitive studies in polarimetric astrophysics. I Introduction Polarized radiation serves as a powerful diagnostic tool across virtually all domains of astrophysics, from the scattering atmospheres of exoplanets, ( S. Seager et al. 2000 ; T. Stolker et al. 2017 ) , circumstellar disks ( M. Benisty et al. 2023 ; I. W. Stephens et al. 2023 , e.g.) , AGB outflows ( S. Ramstedt et al. 2011 ) , through the complex environments of active galactic nuclei ( J. F. Kartje 1995 ; F. Marin et al. 2015 ) and supernova remnants ( M. Bocchio et al. 2016 ) . The polarization state of photons encodes unique information about magnetic field geometries, scattering optical depths, and the three-dimensional structure of emitting regions that cannot be accessed through intensity measurements alone. As observational facilities with polarimetric capabilities continue to advance, including SPHERE/ZIMPOL ( H. M. Schmid et al. 2018 ) , and future instruments like the Origins Space Telescope ( A. Cooray et al. 2019 ) , the demand for sophisticated theoretical models capable of predicting detailed polarization signatures has never been more urgent. The fundamental challenge in modeling polarized radiation lies in solving the vector radiative transfer equation, which tracks not just photon intensities but also the full Stokes parameters (I,Q,U,V) that characterize the polarization state ( S. Chandrasekhar 1960 ) . For astrophysical environments characterized by multiple scattering events and complex geometries, Monte Carlo methods have emerged as the approach of choice ( B. A. Whitney et al. 2013 ) . These methods stochastically sample photon paths and scattering events, naturally handling three-dimensional geometries, arbitrary optical depth distributions, and multiple scattering without the limitations of diffusion approximations. However, traditional Monte Carlo radiative transfer (MCRT) codes face severe computational limitations when applied to polarimetric problems. Each scattering event modifies the Stokes vector according to Mueller matrices that depend on scattering angles and local properties, requiring extensive calculations of directional sampling and polarization state tracking. Furthermore, synthesizing observables such as images and polarization maps demands Monte Carlo sampling of the entire radiation field, often requiring 10^{8} – 10^{10} photon packets for convergence in complex geometries ( P. Camps & M. Baes 2015 , e.g.) . The computational demands of polarized MCRT have historically restricted its application to simplified geometries or limited parameter explorations. While several highly optimized codes exist—including RADMC-3D ( C. P. Dullemond et al. 2012 ) , MCFOST ( C. Pinte et al. 2006 ) , POLARIS ( S. Reissl et al. 2016 ) , SKIRT ( P. Camps & M. Baes 2015 ; P. Camps & M. Baes 2020 ) , and Hyperion ( T. P. Robitaille 2011 ) —most rely on CPU-based architectures that struggle to meet the computational requirements of modern polarimetric studies. The emergence of heterogeneous computing architectures, particularly Graphics Processing Units (GPUs), offers a transformative solution. Recent efforts to port radiative transfer to GPUs have demonstrated remarkable speedups ( M. Malik et al. 2017 ; C. Byrohl & D. Nelson 2025 , e.g.) . However, these GPU implementations have largely focused on scalar intensity calculations, with polarization support remaining limited or completely absent. In diverse astrophysical environments, from molecular clouds to protoplanetary disks, interstellar dust grains frequently exhibit non-random alignment relative to local physical fields ( J. S. Hall 1949 ; W. A. Hiltner 1949 ) . The prevailing alignment mechanism in most scenarios involves relaxation that orients grains with their short axes parallel to magnetic field lines ( B.-G. Andersson et al. 2015 , and references therein). This magnetic alignment paradigm provides a powerful tool for studying cosmic magnetic fields through their imprint on polarized radiation. Notable exceptions exist, particularly at small scales such as the dense mid-planes of protoplanetary disks where large grains may experience alignment through radiative torques ( A. Lazarian & T. Hoang 2007 ; R. Tazaki et al. 2017 ) or dust-gas differential motions ( H. Yang et al. 2019 ; Z.-Y. D. Lin et al. 2024a ) rather than magnetic fields. Understanding these competing alignment mechanisms is crucial for interpreting polarization observations across different astrophysical contexts. Scattering by aligned dust grains produces distinctive polarization signatures that can potentially serve as powerful diagnostics of embedded magnetic field geometries. At near-infrared wavelengths, magnetically aligned grains produce deviation from oft-adopted azimuthal orientations on order of 10^{\circ} , or even perpendicular direction in extreme cases (large toroidal magnetic field component with high inclination angle) ( H. Yang & Z.-Y. Li 2022 ) . At millimeter and submillimeter wavelengths, accessible with facilities like ALMA (Atacama Large Millimeter/submillimeter Array), the light source becomes dust thermal emission, instead of stellar illumination. At these longer wavelengths, both emission from aligned grains and scattering contributions can produce significant polarization, with their relative importance depending on grain properties, optical depth, and source geometry ( H. Yang et al. 2016b ; Z.-Y. D. Lin et al. 2022 ; Z.-Y. D. Lin et al. 2024b ) . Understanding this transition is essential for correctly interpreting polarization maps that probe the dust grain properties, as well as magnetic fields and/or gas dynamic environments, where planets form. Despite the astrophysical importance of polarized scattering by aligned grains, the radiative transfer community currently lacks comprehensive tools capable of self-consistently modeling these effects. In this paper, we present Kratos-polrad 1 1 1 https://github.com/wll745881210/kratos_polrad.git , a polarization-informed Monte Carlo radiative transfer module built upon the Kratos framework. The Kratos Framework ( L. Wang 2025a ) represents a GPU-optimized astrophysical simulation system designed for heterogeneous computing architectures across CUDA, HIP, and CPU platforms. The modular architecture separates mesh management from physical solvers, enabling straightforward extension to the desired radiative transfer polarimetry calculations desired. Our implementation features full treatment of Stokes parameters throughout photon propagation and scattering, and efficient imaging synthesis using scattering source functions. This paper presents the methodology, verification, and performance characteristics of Kratos-polrad. § II details our Monte Carlo algorithm for polarized transport, the scattering source function formalism, and GPU-specific optimizations. § III validates the code through standard

Read the complete text