ritter_dam_break — DRIVE swarmflow op

• Data kinds: signal × scalar × scalar → table

• Call: import fullseye as fs; fs.ledger.ritter_dam_break(x, t: 'float', h0: 'float', g: 'float' = 9.81, particle_mass=None) -> 'dict' (to call the implementation directly, import swarmflow; swarmflow.ritter_dam_break(x, t: 'float', h0: 'float', g: 'float' = 9.81, particle_mass=None) -> 'dict'; from the registry, opsdrive.get("ritter_dam_break"))

Usage

Ritter's dam-break solution (shallow-water equations, dry bed, dam at x = 0, water at x < 0).

c₀ = √(g h₀). x ≤ −c₀ t: h = h₀, u = 0 / −c₀ t < x < 2c₀ t: h = (2c₀ − x/t)²/(9g), u = (2/3)(x/t + c₀) / x ≥ 2c₀ t: h = 0.

Near the front h ∝ (x_f − x)², so there is almost no water. The amount of water from the front to δ is ∫₀^δ (s/t)²/(9g) ds = δ³/(27 g t²) (derived). Given the amount per particle m (h₀Δx for 1-D SPH), the location of the foremost particle (where the amount from the front is m/2) x_f − (27 g t² m/2)^{1/3} is returned in lead_particle —— the front of a particle method always appears to lag behind Ritter's front, and the lag can be read from this formula (refining the particles shrinks it only as m^{1/3}).

Returns:

dict: h, u (same shape as x), front = 2c₀ t, rarefaction_head = −c₀ t, c0, lead_particle (when m is given).

Empty input (x with 0 elements) raises ValueError.

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)

• poc_swarm_obstacle_from_flow — py -3.11 examples/poc_swarm_obstacle_from_flow.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 · sph_density_pressure · swarm_simulate · swarm_render_overhead · swarm_field_from_tracks · swarm_field_from_piv · potential_flow_cylinder · velocity_deficit_map


*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.