Solving Manning's Normal Depth by Bisection Client-Side
The Problem
Manning's equation is the workhorse of gravity-flow hydraulics: give it a channel section, a slope, and a roughness and it hands back flow and velocity. Going that direction — depth to flow — is a plug-and-chug. Going the other direction — design flow to the depth it runs at — is the question you actually have standing at a manhole, and it has no closed-form answer for a partially full pipe. That is the gap this tool fills.
The Approach
Forward, it is just Manning's in customary units:
Q = (1.486/n)·A·R^(2/3)·S^(1/2)
with velocity V = Q/A. The geometry is where the bookkeeping lives. For a circular pipe at depth y and diameter D, the central angle is θ = 2·acos(1 − 2y/D), and from there A = (D²/8)(θ − sinθ), wetted perimeter P = Dθ/2, hydraulic radius R = A/P. Rectangular and trapezoidal sections are handled too.
The bisection solver
Because Q(y) can't be inverted for depth in these sections, the reverse mode brackets the answer and bisects: evaluate flow at the midpoint of a depth interval, compare to the target, and halve toward it. Forty iterations gets you to machine precision in a few microseconds — there is no reason to be clever about it. Bisection is bulletproof here because Q(y) is monotonic over the range the solver searches.
That last qualifier matters, and it is the one genuinely interesting wrinkle. In a circular pipe, discharge does not increase all the way to full — it peaks at about d/D ≈ 0.94 and then falls off, because that last sliver of depth adds wetted perimeter faster than it adds area. So the solver only searches up to the peak; ask for a flow above it and the tool reports that you have exceeded gravity capacity and the pipe would surcharge, rather than quietly returning a bogus near-full depth [1][3].
It also reports the Froude number, Fr = V/√(g·A/T), and flags subcritical vs. supercritical flow. The band between about 0.9 and 1.1 is where the water surface goes unstable and wavy, and the tool calls that out — depth readings in that range are unreliable and designers avoid it.
Field notes the tool bakes in
- Most sewer specs want ≥2.0 ft/s at design flow for self-cleansing (Ten-State). The tool flags anything slower.
- Measure depth off the invert, not the top of a grit or grease layer — and if there's a layer, your effective geometry isn't the design geometry.
- Use the constructed invert slope between structures, not the ground surface.
- Manning's off a single depth reading is ±10–20% at best — good enough to catch a pump running or an I&I problem, not good enough to bill anyone.
Single file, vanilla JS, no dependencies, inputs persisted in localStorage.
The tool: Manning's Open-Channel Flow Calculator.
References
- [1] Chow, Open-Channel Hydraulics — Manning's equation and section geometry.
- [2] Recommended Standards for Wastewater Facilities (“Ten-State Standards”) — minimum velocity and design n. https://www.broadagencyannouncement.com/ten-states-standards/ (verify current host)
- [3] FHWA HDS-4, Introduction to Highway Hydraulics — normal depth and Froude number reference.