Skip to main content
QUICK REVIEW

[Paper Review] SPH to Grid: a new integral conserving method

Bernhard Röttgers, Alexander Arth|arXiv (Cornell University)|Mar 9, 2018
Fluid Dynamics Simulations and InteractionsEngineering42 references11 citations
TL;DR

This paper proposes S-normed SPH binning (SNSB), a novel integral-conserving method to convert Smoothed Particle Hydrodynamics (SPH) data to grid-based representations while preserving mass and fluid property conservation. By computing kernel integrals on the grid and correcting for non-intersecting particles, SNSB reduces relative mass errors to 10⁻⁵ on coarse grids—dramatically improving accuracy over classical methods, especially in dense regions.

ABSTRACT

Analysing data from Smoothed Particle Hydrodynamics (SPH) simulations is about understanding global fluid properties rather than individual fluid elements. Therefore, in order to properly understand the outcome of such simulations it is crucial to transition from a particle to a grid based picture. In this paper we briefly summarise different methods of calculating a representative volume discretisation from SPH data and propose an improved version of commonly used techniques. We present a possibility to generate accurate 2D data directly without the CPU time and memory consuming detour over a 3D grid. We lay out the importance of an accurate algorithm to conserve integral fluid properties and to properly treat small scale structures using a typical galaxy simulation snapshot. For demonstration purposes we additionally calculate velocity power spectra and as expected find the main differences on small scales. Finally we propose two new multi-purpose analysis packages which utilise the new algorithms: Pygad and SPHMapper.

Motivation & Objective

  • Address the critical need for accurate post-processing of SPH simulation data, as particle-based outputs obscure global fluid properties.
  • Identify shortcomings in classical SPH-to-grid binning methods, particularly mass loss and poor convergence in dense regions.
  • Develop a method that conserves integral fluid properties (e.g., mass) while preserving spatial resolution and minimizing computational cost.
  • Enable efficient 2D visualization and analysis by reducing dimensionality through intrinsic 2D projection integration.
  • Create open-source tools (Pygad and SPHMapper) to integrate the new method into standard astrophysical data analysis workflows.

Proposed method

  • Propose S-normed SPH binning (SNSB), which computes the kernel integral on the grid to ensure integral conservation of fluid properties.
  • Correct for particles not intersecting grid cells by calculating the cell-particle volume ratio, preventing mass loss in sparse or high-density regions.
  • Introduce a 2D projection technique using tabulated integrals to pre-integrate one dimension, reducing memory and runtime while improving convergence.
  • Implement the method in C++ for high performance, exposing it via Python frontends in Pygad and SPHMapper for interactive and scalable analysis.
  • Use a cubic spline kernel with 32 neighbors for testing, ensuring consistency with typical SPH simulation setups.
  • Apply the method to a real galaxy simulation snapshot to validate performance and accuracy against classical binning techniques.

Experimental results

Research questions

  • RQ1How can SPH-to-grid conversion be made integral-conserving, especially in regions with high particle density and small smoothing lengths?
  • RQ2What is the impact of classical binning methods on mass conservation, particularly when grid resolution is coarse?
  • RQ3Can a 2D projection approach reduce computational cost and improve convergence without sacrificing accuracy?
  • RQ4How do different binning techniques affect the calculation of derived quantities like velocity power spectra?
  • RQ5To what extent does enforcing the unity condition (constant field maps to constant SPH field) improve consistency in post-processing?

Key findings

  • SNSB reduces relative mass error in integrated mass to 10⁻⁵ on coarse grids, compared to classical methods that reach errors in the percent range.
  • Particles in over-dense regions—where smoothing lengths are small relative to grid cell size—contribute most to mass loss in classical binning, and are most effectively corrected by SNSB.
  • Approximately 10% of total mass is lost in classical binning due to non-intersecting particles, a problem largely resolved by SNSB’s volume ratio correction.
  • The 2D projection method reduces memory footprint and runtime while improving convergence, especially by minimizing particle 'jumping' between grid cells.
  • Velocity power spectra show that differences between methods are most pronounced at small scales, confirming SNSB’s superior small-scale accuracy.
  • The unity condition is satisfied in SNSB, ensuring that constant fields map to constant SPH fields, a key consistency requirement for reliable analysis.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.