Benchmark designs
Five whole designs, each with its answers worked out by hand, which the engine has to reproduce. They run with the unit tests, so CI fails if a change to the engine moves any of them. The code is in packages/hydraulics/src/benchmarks/, one file per design, and each answer there says how it was worked out.
None has been reviewed by an engineer. Each says so in its review field, which stays empty until someone qualified has checked it. Until then, they show that the engine does what its rules and the cited formulas say, not that those rules are right.
How the answers are worked out
From published formulas and the engine's documented rules, never by running the engine. The formulas are written out again in benchmarks/common.ts rather than imported, so a mistake in the engine can't carry into the answer it's checked against: Manning's equation for a full pipe and the same solved for grade, the drainage coefficient over an area, and a lift station's head as static lift plus friction, fittings and velocity head.
The inputs are idealized so the answers can be worked by hand: even ground, fields and pipes on whole multiples of the 5 m grid service areas are measured on, a 4 in pipe whose nominal size is taken as its inside diameter, as NRCS's own examples do, and NRCS's n of 0.015 for small corrugated drains. The criteria are plausible values rather than any one state's: 3/8 in a day, 4 ft deep, 2 ft of cover, 0.5 ft/s flowing full at least.
To check that they'd catch a mistake, NRCS's least grade was changed from 0.001 to 0.0011 in the engine on 2026-11-08: 8 of the answers failed.
The designs
| Design | What it checks | Answers |
|---|---|---|
| Flat ground | A 400 m lateral on ground falling 0.02% takes NRCS's least grade of 0.001 from its preferred depth, ending 1.54 m deep. Its full velocity, 0.18 m/s, is a sediment caution. | 9 |
| Two soils | Laterals at 20 m and 40 m spacing in two soils each drain their own land, the line between them halfway between laterals, with nothing counted twice or left out, and the outlet carrying the whole field. | 8 |
| Restricted outlet | A ditch measured with low water above the pipe, water above its crown, and less capacity than the flow gives all three outlet findings. The pipe runs full, with the water 199.3178 m at its top. | 6 |
| Several junctions | Flow adds up through four junctions. A main can't start above what feeds it. The last length, carrying all four laterals, steepens from the ground's 0.1% to the 0.1426% it needs. | 11 |
| Pumped outlet | A lift station lifts 1.7692 m from where its pumps cut out to the ditch, needs 1.7786 m at the design inflow, and meets a made-up straight-line pump curve at 2.56 L/s and 2.084 m. | 7 |
The pump in the last one is made up for the benchmark and named as not a real product. The app has no pump curves built in.
Each design also checks that it cites its sources, says it's unreviewed, and gives the same fingerprint every time it's worked out.
When ENGINE_VERSION moved from network-4 to network-5 (plan v3 item 427, burial cover to the outside top of the pipe), all five benchmarks continued to use generic 4 in corrugated plastic with no outside diameter (outsideDiameterM: null). None of their numerical engineering answers moved; only their recorded fingerprints updated for network-5, outsideDiameterM: null, and coverBasis: "inside".
When ENGINE_VERSION moved from network-5 to network-6 (plan v3 item 405, the fingerprint taking the ground along each pipe and the chosen design criteria), the hashes were recorded afresh once, in their own commit. Before that, every result other than the fingerprint, with the quantity takeoff, was compared between the two engines for the five benchmarks and the 28 cells of the layout matrix: 924,452 values, none different.
Pattern regression matrix (item 393)
The five hand-worked hydraulic benchmarks above stay unchanged with the default automatic layout. Beside them, packages/layout/src/pattern-matrix-table.ts and packages/layout/src/pattern-matrix.test.ts record 28 explicit-pattern hashes (parallel, herringbone, curved at a 23 m bend radius, and targeted across three real USGS/SSURGO test fields—fargo-nd, mankato-mn, and brookings-sd in packages/layout/fixtures/real-test-fields/—plus four synthetic fixtures—flat-two-soil, valley, wet-spots, and two-field), together with per-category passed/cautioned/failed check tallies and served shares by field and by soil at network-5. The real fields exercise ~160-acre lidar terrain, multi-unit SSURGO soils, and state NRCS 606 criteria; the four synthetic fixtures remain to pin isolated geometry and multi-field cases (interior no-tile zone, symmetric V-valley, sharp two-soil strip, and 150 m two-field gap). Any change to layout generation, hydraulic checks, soil spacing, or geometric coverage shows up as a diff in pattern-matrix-table.ts that must be explained before updating.
What they don't cover
- Sizing. Every pipe's size is set. Sizing has its own tests, in
sizing.test.ts. - Real fields. The terrain benchmark,
services/gis-worker/tests/test_benchmark_terrain.py, times a real 160-acre field. These are hand-workable designs, not surveys. - A dynamic model. Item 133 runs these through SWMM.