Table of Contents
Fetching ...

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.

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

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 times compared to CPU-based methods, enabling previously prohibitive studies in polarimetric astrophysics.

Paper Structure

This paper contains 13 sections, 17 equations, 7 figures.

Figures (7)

  • Figure 1: Validation of inclination-induced polarization in scattered light. Simulation results for $Q/I$ (black markers) and $U/I$ (red markers) are compared against the analytical solution (black curve). The agreement demonstrates correct implementation of scattering polarization dependencies.
  • Figure 2: Comparison of self-scattering polarization in a dust cylinder. Left: Kratos-polrad simulation showing polarized intensity (heatmap) and orientation (line segments). Middle: Equivalent RADMC-3D results. Right: Polarization fraction profiles along $x=0$ demonstrate code agreement, with boundary differences attributable to periodic conditions in Kratos-polrad.
  • Figure 3: Speed test using the same physical layout described in §\ref{['sec:self-scattering']}, showing the performance of Kratos-polrad with varying numbers of simulated photon packets compared to RADMC-3D. The HIP-CPU case conducts Kratos-polrad calculations using the AMD Ryzen 7950X CPU, which is the same device used by the RADMC-3D tests. Other tests using RTX devices and 7900XTX are conducted on GPUs.
  • Figure 4: Emergent polarization from a slab with twisting magnetic fields. Top panel: Magnetic field configuration showing continuous rotation across the slab. Lower panels: Normalized Stokes parameters $Q/I$, $U/I$, and $V/I$ as functions of generation optical depth. Simulation results (red dots) show excellent agreement with analytical predictions (blue lines). Residual differences (green dots, magnified 50$\times$) demonstrate the accuracy of the polarization transformation implementation.
  • Figure 5: Polarization fraction as a function of optical depth in a uniformly aligned dust slab. Simulation results from Kratos-polrad (red) show excellent agreement with analytical theory (black) up to $\tau \approx 30$, outperforming RADMC-3D (blue) in the high-optical-depth regime. The polarization is reversed at high optical depth in Kratos-polrad results, shown as dashed lines.
  • ...and 2 more figures