Case study 09 / 25Data Science
A verifiable 3D spill-simulation twin for pipelines and channels
Water a release reaches is now drawn and counted on 29 of 34 hillside reaches instead of 0, and all 21 mesh-sensitive cases are flagged.
My roleDesigned it and led a team of up to 3: set its standards, mentored it, agreed the roadmap with operations and the client, presented to leadership.
Stack
- JavaScript
- Node.js
- CesiumJS
- WebGL
- Copernicus DEM
- OpenStreetMap
- Chrome DevTools Protocol
- Azure App Service
01 · How it works
- TodaytoChanged in this work
- Data flow
What it does
A browser-based 3D digital twin of a pipeline system and a channel that carry a dense, solids-laden fluid. It answers the operational question behind any release: where the fluid travels over real terrain, how far and how deep it settles, how much stays on the ground, how much reaches water, and when.
Read more
As its engineer, I extended the physics to account for water entry, deposit shape and walls, matched it to a real release, made numerical uncertainty visible, and built the instruments that verify the engine.
7 connections· select a part to trace it
- Leak or overflow to Runout engine: release rate and volume
- Terrain + water map to Runout engine: slope per cell, water
- Runout engine to Ground / water split: ground until it meets water
- Runout engine to Mesh + yield bands: reruns at ½× and 2× step
- Runout engine to Verification checks: 20 formulas, cell by cell
- Ground / water split to 3D map: deposit + river reached
- Mesh + yield bands to 3D map: range beside the value
02Results
- R01Higher is better
Hillside reaches with the ground/water split shown (of 34)
Before 0, after 29, from zero. Higher is better.BeforeAfter - R02Higher is better
Mesh-sensitive cases flagged on screen (of 21)
Before 0, after 21, from zero. Higher is better.BeforeAfter - R03Higher is better
Share of a real release held behind a roadside wall
Before 0%, after 96%, from zero. Higher is better.BeforeAfter
What it achieved
- How much of a release reaches water: unreported, 95% in the default hillside case, drawn and counted on 0 of 34 reaches → 29 of 34, with the ground/water split and the river followed downstream
- A real release, matched: 0% held behind a roadside wall → 96%, as in the photographs, with walls entered as data; the overflow runs as two short tongues of 32 m and 25 m instead of one of 96 m
- Long releases: the right path in 1 of 4 test cases → 4 of 4, along the valley floor; volume left unplaced 67% → 0%, with depressions filling and overflowing and the mass closing in 488 of 488 hours
Read more
- Deposit shape on open slopes: 9 of 34 reaches stretched to the width cap → 0, through a fan rule measured outside the engine before it was built
- Trust in the numbers: mesh-sensitive results flagged on 0 of 21 cases → 21 of 21, shown as a band beside the yield-stress band; a one-off script → 20 hand-derived formulas, cell-by-cell checks and repeatability fingerprints, where a +2% mutant engine fails 3 of 20
- Leak-level view and instrumentation: none → a camera standing on the drawn ground at the leak, looking down the path, on both pages; 2 of 8 pages with a ready mark and 6 of 95 controls tracked → 8 of 8 and 95 of 95, with zero new dependencies
03Decisions and trade-offs
- Constraint
On a 30 m elevation model, 21 of 56 cases moved over 10% with the step halved or doubled.
DecisionShow a band; the result itself stays on the default mesh.
What it costUsers see a range, not one number, for those cases.
- Constraint
Matching the arrest formula proves the engine, not that the assumed yield stress fits the fluid.
DecisionKeep that value badged as an assumption, with its own band.
What it costResults show two bands side by side: the grid's and the yield stress's.
- Constraint
An earlier claim that the pipe cases converged came from three cases.
DecisionMeasure all nineteen and correct the record.
What it costSix did not converge; the claim was corrected.
The challenge
A what-if tool earns trust only if its numbers hold up, and measurements showed where they did not. On hillsides a release seemed to stop growing after one to three hours; in fact it was reaching water the page neither drew nor counted: 95% of the default hillside case entered a river unreported, and 25 of the 34 reaches that meet water sent more than half to it.
Read more
On open slopes the deposit was a sheet a few millimetres thick, stretched to the engine's width cap.
On a 30 m elevation model, 21 of 56 cases moved runout or area by more than 10% when the marching step was halved or doubled. And when the model met a real event, it ignored the low wall beside a road that had held almost all of the release, and sent everything 198 m downhill.
What I learned
Verification is not validation: matching a formula cell by cell proves the engine computes what it claims, not that its assumptions fit the fluid. A what-if tool earns trust only if its numbers hold up, so I built instruments to check them: 20 hand-derived formulas, and a +2% mutant engine that fails 3 of them.
Read more
I also refused to count noise as progress: load-time drops during the work were logged as machine variance, not wins. And a real event is the best test: a low roadside wall, invisible on a 30 m terrain, decided where almost all of the release stopped, so walls now enter the model as data.
Stack
- JavaScript
- Node.js
- CesiumJS
- WebGL
- Copernicus DEM
- OpenStreetMap
- Chrome DevTools Protocol
- Azure App Service
Skills
- Physics-based simulation
- Geospatial modeling
- Numerical verification
- Uncertainty quantification
- Performance instrumentation

