Case study 19 / 25Data Science
Self-service spill scenario modeling with physical guardrails
Engineers, not only analysts, now run spill scenarios: 9 solved cases offline instead of 3, every input bounded by physics.
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
- CesiumJS
- Node.js
- OpenStreetMap
- Copernicus DEM
- Headless Microsoft Edge
- Azure App Service
01 · How it works
- TodaytoChanged in this work
- Data flow
What it does
A browser-based 3D twin of a pipeline system and a channel that answers one operational question: if fluid escapes, where does it go, how much and when. It covers a leak through a hole, an overflow over a channel wall and a pond that fills until it spills, runs fully offline and labels every assumption on screen.
Read more
I turned an analyst's instrument into a tool engineering teams can drive themselves.
6 connections· select a part to trace it
- Viewer to Scenario controls: clicks the line, types ratechanged
- Scenario controls to Release model: runs on click or on play
- Release model to Route and runout: released volume per step
- Elevation model to Route and runout: slope per cell, sinks filled
- Route and runout to Precomputed frames: deposit depth per step
- Precomputed frames to Viewer: plays back, also offline
02Results
- R01Higher is better
Solved scenarios playable offline
Before 3, after 9, 3× higher. Higher is better.BeforeAfter - R02Higher is better
Automated physics and consistency checks
Before 594, after 743, +25%. Higher is better.BeforeAfter - R03Higher is better
Scenario inputs a user can set
Before 0, after 4, from zero. Higher is better.BeforeAfter
What it achieved
- Who can run a spill scenario: analysts only, through a hidden URL mode → anyone, with one click on the line or the elevation profile
- Scenario library: 3 → 9 solved cases, each with a 3D preview, all available offline
- User control: none → leak position, release rate and duration, with every assumption labeled
Read more
- Physical guardrail: unbounded solids fraction → capped at 70% in one shared physics module
- Automated checks: 594 → 743, including tests that fail when text and curves disagree
03Decisions and trade-offs
- Constraint
Above about 70% solids the mixture is a paste, yet the engine kept computing.
DecisionCap solids at 70% in one shared physics module.
What it costScenarios above 70% solids are out of reach.
- Constraint
Without a measured flow, downstream dilution would be fabricated.
DecisionLeave dilution out on purpose and document the gap.
What it costResults say nothing about dilution downstream.
- Constraint
One rounding put a pool on the wrong side of its overflow point.
DecisionMake the suite fail whenever the page's text and its curves disagree.
What it costChecks grew from 594 to 743, and every text change now has to pass them.
The challenge
Only an analyst could run it. Placing a leak required a hidden URL mode and a click within a couple of pixels of the line; the duration was fixed and the release rate came from a short list.
The harder problem was keeping the model honest once others could drive it.
Read more
Above roughly 70% solids by mass the mixture behaves as a paste, yet the engine kept computing. Opening the tool meant constraining every input to the range the physics supports, and guaranteeing that what the page states is exactly what the engine computes.
What I learned
Small input choices can flip a result: sampling the elevation model between its grid posts under-counted a pond's capacity by 42%, and anchoring on the posts fixed it. Opening an expert's tool means bounding every input to the range the physics supports and making the page say exactly what the engine computes.
Read more
A documented gap is more defensible than a confident estimate.
Stack
- JavaScript
- CesiumJS
- Node.js
- OpenStreetMap
- Copernicus DEM
- Headless Microsoft Edge
- Azure App Service
Skills
- Geospatial modeling
- Hydraulic modeling
- Interaction design
- Model guardrails
- Test automation

