This proof-of-concept visualizes a simple “two-tank” water system that behaves like a real setup: water has a stable mean level in each tank, the surface can slosh, and a pump can move water from one tank to the other through a defined plumbing loop.
What you’re looking at
- Tank A (Source) on the left supplies water to the pump.
- Tank B (Destination) on the right receives pumped water.
- A pump line draws from a low inlet on Tank A and discharges into Tank B near the top (so Tank B “fills from above”).
- A return line connects the bottoms of both tanks and only allows B → A equalization when both return inlets are submerged.
Core mechanics
This simulation intentionally separates two behaviors:
- Mean Level (Volume):
Each tank has a mean water level that represents the actual stored volume.
Pumping moves volume from Tank A to Tank B. Return flow (if enabled) moves volume back from Tank B to Tank A when Tank B is higher. - Surface Waves (Slosh):
The water surface is a capped, smoothed wave model layered on top of the mean level.
It reacts to clicks, drags, and the pump discharge, but it cannot create unrealistic “walls” or cliffs.
Submergence rules (why flow sometimes stops)
This is critical and intentionally enforced:
- The pump only runs if the suction inlet is submerged in Tank A. If Tank A gets too low, the pump starves and stops.
- The return line only flows if both return inlets are submerged. If either side drops below the return inlet, return flow stops.
How to interact
- Click inside a tank: inject a ripple where you clicked.
- Drag left/right inside a tank: shove the surface to create a visible slosh impulse.
What the controls mean
The controls are tuned to stay “game-stable” and readable:
- Pump RPM: increases A → B flow rate (until suction starves or head limits it).
- Pump Valve: a 0–1 throttle on discharge flow.
- Pipe Capacity: overall system capacity factor (acts like pipe diameter / pump size).
- Return Valve: how open the bottom equalization line is (B → A when B is higher).
- Slosh Strength: how fast ripples propagate.
- Damping: how quickly waves die out (higher = calmer).
- Disturb Strength: how strong clicks/drag impulses are.
- Time Scale: speeds up or slows down the whole simulation for testing.
What this POC proves
- Volume transfer between tanks is real and stable (not just a visual trick).
- Surface motion stays bounded and readable while still feeling “alive.”
- The system has realistic failure modes (suction starvation, return line air breaks) without becoming a full CFD sim.