sph_density_pressure — DRIVE swarmflow op

• Data kinds: matrix × scalar → table

• Call: import fullseye as fs; fs.ledger.sph_density_pressure(points, h: 'float', mass: 'float' = 1.0, rho0: 'float' = 1.0, c: 'float' = 10.0, box=None) -> 'dict' (to call the implementation directly, import swarmflow; swarmflow.sph_density_pressure(points, h: 'float', mass: 'float' = 1.0, rho0: 'float' = 1.0, c: 'float' = 10.0, box=None) -> 'dict'; from the registry, opsdrive.get("sph_density_pressure"))

Usage

SPH density of a point set ρ_i = Σ_j m W(|x_i − x_j|, h) (including the point itself) and the weakly compressible equation of state p = c² (ρ − ρ₀).

If m = ρ₀ Δ² is set with grid spacing Δ, ρ at interior points is close to ρ₀ (within 0.3 % at h = 1.3Δ —— counted by a gate).

Args:

points: (N, 2) positions [m].

h: smoothing length [m].

mass: mass of one point (for swarms, 1 = number density of individuals).

rho0: rest density.

c: speed of sound [m/s] (stiffness of the pressure).

box: periodic boundary box (Lx, Ly) or None.

Returns:

dict: rho (N,), p (N,), n_neighbors (N,) (number of other points within the support).

References (sample data, literature)

• Sample-data catalog (download URLs / licences) — 2-D uses skimage.data (BSD/public domain) plus synthetic images; 3-D lists download URLs for real data sources (Stanford, PDS, …).

• Operator provenance and references — the sources of the research/methods this op family came from.

• The canonical algorithm (author, year) and its uses are named in the family usage guide above.

Runnable examples (verified samples that actually call this op)

• gallery_drive_soil_tactile — py -3.11 examples/gallery_drive_soil_tactile.py

Ops the type connects to (they accept table as input)

course_layout · course_occupancy · course_contains · world_build · world_camera · world_move · lidar_scan · rss_longitudinal_same

Same category (swarmflow)

sph_kernel · swarm_simulate · swarm_render_overhead · swarm_field_from_tracks · swarm_field_from_piv · potential_flow_cylinder · velocity_deficit_map · stagnation_from_centerline


*Provenance: swarmflow.py — DRIVE operator registry. This per-op note is generated by tools/opdocs.py md (do not hand-edit).*

© 2026 Kazufumi Furuse — Fullseye operator documentation. Licensed under Apache-2.0.