Gridless SPH-MCRT Implementation
- Gridless SPH-MCRT is a computational technique that applies Monte Carlo radiative transfer directly to ungridded SPH density fields, preserving adaptive resolution and simulation accuracy.
- It leverages an octree-based acceleration structure to efficiently compute ray–sphere intersections and trace photon packet interactions through SPH smoothing volumes.
- The method synthesizes realistic telescope images and datacubes by mapping photon packet weights with support for scattering, absorption, and thermal equilibrium.
A gridless SPH-MCRT implementation is a computational technique that applies Monte Carlo Radiative Transfer (MCRT) directly to Smoothed Particle Hydrodynamics (SPH) density fields without gridding, thus maintaining the fully adaptive nature of SPH and preserving the original simulation’s accuracy. Photon packets are propagated, absorbed, or scattered within the continuous, particle-based fluid representation, generating synthetic telescope images and datacubes that directly reflect the physical and spatial characteristics of the original SPH dataset (Forgan et al., 2010).
1. Algorithm Structure and Workflow
The gridless SPH-MCRT workflow comprises five fundamental phases:
- Initialization:
- SPH simulation snapshots are ingested, providing particle positions , masses , densities , smoothing lengths , and temperatures .
- An acceleration structure (typically an octree) is constructed over all SPH particles. Each node stores an axis-aligned bounding box (AABB) that encapsulates the smoothing volumes (radius ) of all its particles.
- Emission sources (point sources such as stars and/or diffuse emission from SPH particles) are specified. The total photon packet count , viewing angles , image plane size, and resolution are defined.
- Photon Packet Emission:
- The photon budget per source is allocated according to .
- Each packet’s wavelength is sampled from the emission spectrum (e.g., blackbody ). The initial direction is sampled isotropically unless otherwise specified. For diffuse emission, packets are emitted from with probability proportional to .
- Packet Propagation and Interaction:
- Each photon packet is traced along its path until its weight drops below a threshold or it escapes.
- The interaction optical depth is sampled as with uniform in .
- Along the ray, all SPH particles intersected (as determined by the octree) are identified and traversed in order.
- The incremental optical depth is accumulated for each intersected smoothing sphere .
- When the total optical depth meets or exceeds , the precise interaction point is located by bisection to solve .
- At the interaction, packets are scattered (probability ) or absorbed and re-emitted.
- Image-Plane Capture:
- Exiting photon packets have their rays intersected with a 2D image plane, using the specified geometry.
- The spatial intersection is mapped to pixel indices, and the photon weight is accumulated in intensity arrays , forming a 2D image or 3D datacube depending on spectral binning.
- Postprocessing:
- The final image can be smoothed to simulate telescope point spreads with a Gaussian PSF matching the instrument beam.
This entire workflow operates without transforming SPH data onto any grid, thus eliminating re-gridding errors and capturing the full adaptivity of the original hydrodynamical simulation (Forgan et al., 2010).
2. SPH Density Field Representation
SPH density at any spatial location is evaluated as a continuous sum over neighboring particles: where is the cubic-spline kernel with compact support: with and each adaptively set so its sphere of radius contains neighbors. Neighbor search and ray–sphere intersection both use the octree's AABBs for efficient spatial queries. This maintains the full accuracy and adaptivity of the particle distribution for radiative transfer and imaging.
3. Monte Carlo Radiative Transfer in SPH Fields
Photon packet propagation uses MCRT principles applied natively to the SPH field:
- Optical Depth Integration: Along a path , the cumulative optical depth is
- Interaction Sampling: For each photon, the interaction length is sampled by solving where , .
- Scatter vs. Absorption: The single scattering albedo is , dictating the probabilistic outcome at each interaction.
- Scattering Phase Function: The Henyey–Greenstein function,
with anisotropy parameter , models the angular distribution of scattered photons.
- Weight Attenuation: The packet’s weight decays between interactions as .
- Polarization: Packet Stokes vectors are updated via the local Mueller matrix at each scattering.
For absorption, the possibility of radiative equilibrium (immediate re-emission at the updated local temperature) is supported.
4. Ray Traversal and Optical Depth Calculation
Photon–SPH interaction is governed by precise ray traversal:
- Acceleration Structure Usage: Rays traverse the octree hierarchy using the slab method to find intersecting AABBs; only leaf nodes are further checked for SPH particle intersections (spheres of radius ).
- Ray–Sphere Intersection: For each intersected sphere, the segment within the kernel support is determined, and the incremental optical depth is
The cubic-spline kernel's analytic form allows these integrals to be precomputed or reduced to a 1D lookup.
- Interaction Point Localization: Within the final intersected smoothing volume, the path length to reach is found by recursively bisecting the segment until the solution is within tolerance.
Photon packets that exit the system without interaction are projected onto the image plane.
5. Image and Datacube Synthesis
Synthetic images are assembled by accumulating escaping photon packet weights onto a user-defined pixel grid. The final image properties are governed by:
- Image Grid: A grid of size encompasses the modeled field of view, resolution matching that of the desired observational setup. Photon impacts binned as form either 2D images (broadband) or 3D datacubes (if spectral binning is applied).
- Spectral Binning: If included, photon wavelengths are accumulated in discrete bins to generate spectrally resolved maps.
- Postprocessing: Gaussian point spread functions can be applied to match telescope angular resolution (FWHM equal to the instrument beam).
This enables the generation of synthetic observations that faithfully reproduce the spatial and spectral features of the simulated physical system.
6. Performance Characteristics and Resolution
The computational cost is approximately
where is the mean number of smoothing volumes intersected per ray, and . for a uniform sphere is roughly , and in optically thin fields .
For typical parameters (, ), wall times are CPU-hours. The adaptive nature concentrates computational effort where mass and opacity are high, and no grid artifacts occur. Compared to grid-based MCRT with instead of , gridless SPH-MCRT preserves or improves accuracy, while incurring a higher per-ray cost if many small smoothing volumes are intersected.
7. Extensions and Radiative Equilibrium
Radiative equilibrium is implemented via immediate re-emission (the Bjorkman–Wood scheme), depositing at each absorption site, then re-emitting the absorbed packet at the updated local temperature. In SPH terms, temperature at each particle is interpolated as: After absorption, particle temperature increments can be apportioned with
where , as , and the normalization is
Alternatively, adopting Lucy’s path-length method, each smoothing volume accumulates the total path length of all photon segments passing through, with the basic constraint
Parameters controlling the physical model include (typically –), , smoothing lengths so encloses , (–), and optical depths per packet sampled from the exponential distribution .
This approach allows for gridless, fully adaptive radiative transfer imaging with support for absorption, scattering, polarization, and thermal equilibrium, utilizing the SPH field at its native resolution (Forgan et al., 2010).