The 3D version of this sim moves boluses by simple kinematics — a wave position advances at a fixed speed and the readout panel reports transport as a closed-form formula. This 2D companion instead treats the ureter as a real distensible-tube flow network and solves for the flow every frame: the traveling contraction still prescribes the wall shape (same frequency/amplitude/speed you tune), but the resulting pressure and net transport are emergent outputs of continuity plus Hagen–Poiseuille resistance, exactly the lubrication-theory approach used in real peristaltic-pumping analyses (Shapiro, Jaffrin & Weinberg, 1969).
Continuity (mass conservation): ∂A/∂t + ∂Q/∂x = 0
Momentum (lubrication/Poiseuille): ∂P/∂x = −8μ·Q / (π·a(x,t)⁴)
Combining and integrating along the tube gives ONE scalar unknown per
frame — the inlet flow Q₀ — solved directly from the pressure balance:
Q₀ = ( ΔP_total + Σ Rᵢ·Sᵢ ) / Σ Rᵢ
ΔP_total = P_renal − P_bladder (fixed boundary pressures)
Rᵢ = 8μ·dx / (π·rᵢ⁴) (Poiseuille resistance, per segment)
Sᵢ = Σₖ (∂Aₖ/∂t)·dx (volume the wave itself displaces)
Because Sᵢ is driven purely by the traveling wall motion (∂A/∂t), the model reproduces the defining signature of real peristalsis: it pumps fluid forward even when the pressure difference across the tube is zero or adverse — something a pressure-driven pipe flow alone can never do. The ureterovesical junction (UVJ) is modeled as a genuine check valve: its resistance is normal (Poiseuille, from local geometry) while forward, but jumps ~60× higher to block backflow — unless bladder pressure exceeds the junction's closing pressure, which rises with how tightly the terminal segment is contracted. Push the bladder-pressure slider past that point and reflux appears as a real sign-reversal of the solved flow, not a scripted event.
- Frequency — how often a new contraction launches from the renal pelvis; sets how often a fresh volume-displacement pulse enters the network.
- Amplitude — how completely the wave closes the local lumen; because resistance scales as 1/r⁴, only near-complete closure meaningfully changes the pressure network, so transport rises smoothly rather than switching on at a hard cutoff.
- Propagation speed — how fast the occlusion sweeps distally, which sets both the wave transit time and how quickly ∂A/∂t (and hence the displaced-volume source term) is generated at each point.
- Bladder back-pressure — raise it past the UVJ's closing pressure and the solved network flow itself goes negative: real emergent vesicoureteral reflux.