Case study 10 / 25Data Science
A wear and remaining-life digital twin for a slurry pipeline
Every operating excess now shows its cost to the pipe in days of life, per 100 m segment and minute, instead of one rate for the whole line.
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
- TypeScript
- Node.js
- InfluxDB
- Flux
- Playwright
- Claude Code
- PowerShell
01 · How it works
- TodaytoChanged in this work
- Data flow
What it does
A wear and remaining-life model for a long-distance slurry pipeline that turns what the hydraulic model already computes into what the asset pays: every minute, every 100 m segment is classified into one of seven flow regimes and charged that regime's wear, base inside the agreed operating window and extra outside it, charged to operations in days of life, with corrosion and transient fatigue kept as separate clocks.
Read more
I designed the method and governed the autonomous team of AI agents that built the first version: an engine, a per-segment ledger, an API and a 3D viewer. Then I ran a full plant year through it, rebuilt its screen as a one-screen industrial application and made every number auditable, from the plant data to the value on screen.
5 connections· select a part to trace it
- 1D hydraulic model to Read-only data copy: flow, pressure, batches
- Read-only data copy to Regime + wear engine: one value per minute
- Regime + wear engine to Segment-day ledger: base + extra, in days
- Segment-day ledger to Local read-only API: reproducible, hashed
- Local read-only API to 3D margin viewer: stretch, date compare
02Results
- R01Higher is better
Flow regimes the wear law tells apart
Before 1, after 7, 7× higher. Higher is better.BeforeAfter - R02Higher is better
Days of plant data run through the wear law
Before 0, after 365, from zero. Higher is better.BeforeAfter - R03Higher is better
Outputs with their path drawn, data to screen
Before 0, after 173, from zero. Higher is better.BeforeAfter
What it achieved
- What an overspeed, a dense batch or a slow restart costs the pipe: unknown, one wear rate for the whole line → charged in days of life, across seven flow regimes per segment per minute, base and extra apart, with corrosion and transient fatigue as a second clock; the first to run out governs
- First version: a design document → an engine, a 12-day ledger of 56 fields per segment-day, an API and a 3D viewer, with 546 tests passing, on plain formulas on a CPU instead of a GPU kernel per event
- Plant data through the law: 0 → 365 days, a full year minute by minute; a new pipeline system added in 4 actions on one page instead of 7 by hand
Read more
- The screen: nine stacked panels → five fixed zones of a one-screen industrial application, words at rest 1,105 → 286, and a result of the math read in 0 boxes instead of 17
- Auditability: 0 → 173 outputs and 21 of 21 calculations with their path drawn from the plant data to the screen, 618 code citations checked and 0 broken
- The agent team: 11 ways to write outside the project → 0, behind a fail-closed guardian passing 72 of 72 test cases; 6.7 → 2.4 errors per 100 tool calls, after each denied command was written into the rules as a trap
03Decisions and trade-offs
- Constraint
Wear builds in microns a month, invisible to any single inspection.
DecisionCount it in days of life, which add up and need no thickness measurement.
What it costMillimetres come only after in-line inspection and ultrasonic readings.
- Constraint
The lab server turned out to run a simulation, not the plant.
DecisionBuild on it anyway, with calibration code that refuses simulation ledgers.
What it costNo result counts as the plant's until real data and inspections arrive.
- Constraint
An autonomous team of 30 AI agents built the first version.
DecisionGuardrails over permissions: a fail-closed guardian, with each denied command written into the rules.
What it costDecisions that matter, such as which system and operating ranges, stay with a person.
The challenge
Wear on a slurry pipeline accumulates in microns a month, invisible to any single inspection, so operations never learn what an overspeed, a dense batch, a slow restart or running near the deposition velocity costs the pipe. The initial proposal I reviewed implied a wear rate 1,300 to 4,000 times what steel plausibly loses here, placed each event at the sensor, and fed identical inputs to every point of its GPU kernel.
Read more
The data proved harder than the physics: a field the code promised did not exist live, two system codes had been conflated, and the lab server ran a simulation, not the plant.
Once the first version worked, no one had yet run its law on a day of plant data, and its screen read like a website: nine stacked panels, 1,105 words at rest, and 17 boxes to read one result of the math.
What I learned
Days of life are the right unit before calibration: they add up and make a month of microns readable to operations. Measure the data, not the code: a field the code promised was not there when measured live, and two system codes had been conflated. Running an AI team for days taught me that guardrails beat permissions, and that its reliability improves when every refusal becomes a written rule.
Read more
And a tool that engineers must audit has to show its work: drawing each output's path from the plant data to the screen, each box citing its code, turned trust into something a reviewer can check.
Stack
- TypeScript
- Node.js
- InfluxDB
- Flux
- Playwright
- Claude Code
- PowerShell
Skills
- Slurry hydraulics and wear modeling
- Asset integrity and remaining life
- Fatigue and transient analysis
- AI agent orchestration
- Guardrail and hook design
- Industrial interface design

