Answers are grounded in this paper and cite their sources.
Smoothed particle hydrodynamics (SPH) simulations are frequently post-processed on Cartesian grids for applications such as radiative transfer calculations, visualisation, and data analysis. While numerous voxelisation algorithms have been proposed, relatively little attention has been paid to the fundamental properties that such algorithms should satisfy. We argue that SPH voxelisation algorithms should accurately reproduce the underlying density field, globally conserve mass, remain consistent under grid refinement, and be computationally efficient. We present a new finite-volume algorithm designed to satisfy these requirements simultaneously. Starting from a finite-volume formulation of the SPH density field, we derived a simple expression for the mass contained in a Cartesian voxel in terms of a cumulative kernel function. The cumulative kernel was tabulated numerically once for any compact-support smoothing kernel, independently of its analytical form, so that the same tabulation and voxelisation machinery applies unchanged to any such kernel. During voxelisation, mass contributions were obtained from interpolated evaluations of this precomputed function at voxel corners, with values at corners shared by neighbouring voxels evaluated only once and reused. Using direct high-order numerical integration as a reference for the voxel densities, we compared the new cumulative-kernel algorithm to nearest-grid-point assignment, centre sampling, regular subsampling, and Monte Carlo integration and implemented it in the 3D Monte Carlo radiative transfer code SKIRT . The cumulative-kernel algorithm reproduces the reference voxel densities substantially more accurately than the sampling-based methods considered. For the adopted 129^3 cumulative-kernel lookup table, the median absolute relative density error is approximately 4 applies to both Cartesian and hierarchical octree and binary-tree grids and accelerates cell-density calculations by approximately a factor of five and hierarchical tree construction by approximately a factor of four compared to the default Monte Carlo approach. and the error decreases approximately quadratically with increasing lookup-table resolution. The method conserves mass and remains consistent under arbitrary grid refinement approximately to machine precision. It is substantially more efficient than the sampling-based methods considered, which account for the finite extent of the smoothing kernel. Its implementation in SKIRT The cumulative-kernel voxelisation algorithm provides an accurate, mass-conservative, refinement-consistent, and computationally efficient method for voxelising SPH particle distributions. The method is independent of the analytical form of the smoothing kernel and can therefore be applied straightforwardly to a wide range of SPH kernels. We advocate its use in radiative transfer post-processing and other voxelisation applications.
No takes yet. Share an insight, caveat, or question.
Baes et al. (2026) studied this question.
Synapse has enriched 10 related papers. Consider them for comparative context: