ttricco / sarracen

A Python library for smoothed particle hydrodynamics (SPH) analysis and visualization.
https://sarracen.readthedocs.io
GNU General Public License v3.0
15 stars 18 forks source link

Minimum smoothing length based on grid size #56

Closed ttricco closed 1 year ago

ttricco commented 1 year ago

Option added to render and interpolation to impose a minimum smoothing length based on the grid size.

This addresses the problem of particles not contributing to any grid cell if their smoothing length is small enough. Guarantees particles will contribute to at least one grid cell.

The minimum smoothing length is chosen to be 0.5 * grid cell size (max between x/y if aspect ratio is not 1:1).