Skip to content
All work

Case study 11 / 17Data Science

Self-service spill scenario modeling with physical guardrails

Opened an analyst-only spill model to engineers: nine solved scenarios on real terrain, fully offline, every input bounded by physics.

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
  1. Viewer to Scenario controls: clicks the line, types ratechanged
  2. Scenario controls to Release model: runs on click or on play
  3. Release model to Route and runout: released volume per step
  4. Elevation model to Route and runout: slope per cell, sinks filled
  5. Route and runout to Precomputed frames: deposit depth per step
  6. 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.
    Before
    After
  • R02Higher is better

    Automated physics and consistency checks

    Before 594, after 743, +25%. Higher is better.
    Before
    After
  • R03Higher is better

    Scenario inputs a user can set

    Before 0, after 4, from zero. Higher is better.
    Before
    After

What it achieved

  • Access: analysts only, through a 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

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. One rounding placed a pool on the wrong side of its overflow point, so the page contradicted its own narrative; the suite now fails whenever text and curves disagree. Sampling the elevation model between its grid posts under-counted a pond's capacity by 42%, and anchoring on the posts fixed it.

Read more

I excluded downstream dilution on purpose: without a measured flow it would be fabricated, and 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
Cover picture for Self-service spill scenario modeling with physical guardrailsCover picture for Self-service spill scenario modeling with physical guardrails