I built a real-time flood digital twin of a UK river that runs entirely in the browser, GPU and on-device AI included
说明与用途
Don Watch 是一个完全基于浏览器的洪水模拟工具,使用 WebGPU 进行渲染,WebLLM 在本地进行 AI 推理。它支持离线运行,缓存所有资源,并为多佛河洪水事件提供实时决策支持。
问题
Create a serious flood-response tool that runs entirely in a browser tab without a server, providing real-time simulation and decision support for the River Don flood events.
结果
Don Watch delivers a real‑time, decision‑support flood simulation that runs entirely in the browser, leveraging WebGPU for rendering and WebLLM for local AI inference. It operates offline, caches data locally, and provides transparent, deterministic hydrology calculations with AI‑generated briefs.
工作流
- 1. Load static assets (terrain, river geometry, gauge data) via Next.js static export.
- 2. Render terrain and water with three.js WebGPURenderer, using a breadth‑first flood surface algorithm.
- 3. Run an on‑device LLM (1‑2B parameters) via WebLLM to generate plain‑language briefs and risk rankings.
- 4. Coordinate five agents (ingest, forecast, risk, comms, orchestrator) to process gauge, rainfall, and forecast data.
- 5. Stream live reasoning feed and delegation graph to the UI.
- 6. Cache all assets and model in OPFS via service worker for offline use.
- 7. Allow network cut‑off button to test offline functionality.
证据
It rebuilds the Don valley from open LIDAR elevation, drapes the real river over it, and replays the November 2019 Sheffield flood hour by hour from the Environment Agency's own gauge records.
The model, an open model in the 1-to-2-billion range, loads straight into the browser through WebLLM and runs on the visitor's own GPU.
It ships as a Next.js static export and installs as a progressive web app. A service worker caches the shell, the data and the model, so once it has run it runs with the network cut, on a locked‑down laptop or in a field office with no signal.
- 记录日期: 2026-09-21T13:00:33.833Z