Source file: gvf_backwater.html
Computes a water surface profile (backwater or drawdown curve) between an upstream control depth and a target downstream depth in a prismatic trapezoidal channel, using the Direct Step Method, and plots the resulting profile against the channel bed.
The Direct Step Method computes the distance Δx between two known depths by relating the change in specific energy to the difference between bed slope and friction slope:
Δx = (E₂ − E₁) / (S₀ − S_f)
Where:
- E — specific energy = y + V²/(2g)
- S₀ — channel bed slope
- S_f — friction slope, from Manning's equation: S_f = (n·V / R^(2/3))²
For bed width b, side slope z, depth y:
- Area: A = (b + z·y) × y
- Top width: T = b + 2z·y
- Wetted perimeter: P = b + 2y√(1 + z²)
- Hydraulic radius: R = A / P
| Input | Symbol |
|---|---|
| Discharge | Q (m³/s) |
| Bed width | b (m) |
| Side slope | z |
| Manning's roughness | n |
| Bed slope | S₀ |
| Upstream control depth | y₁ (m) — the known/starting depth |
| Target downstream depth | y₂ (m) — the depth the profile should reach |
y₁ to y₂ is divided into 6 equal increments (dy = (y₂ − y₁) / 6).x = 0 with depth y = y₁, for each successive depth step:
- Compute A, T, P, R, V, S_f, and E at the new depth.
- Average the friction slope between the current and previous step: S_f,avg = (S_f + S_f,prev) / 2.
- Compute the step length: Δx = (E − E_prev) / (S₀ − S_f,avg).
- Accumulate distance: x += |Δx| (absolute value is used to force the profile to always progress forward along the channel, regardless of the sign of the energy/slope difference).x = 0: bedZ = −S₀ × x.bedZ + y.This produces a 7-point profile (i = 0 through 6) of depth, energy, friction slope, and cumulative distance.
y), specific energy (E), friction slope (S_f), and cumulative distance (Δx, m)S₀)Δx between widely spaced depths in strongly varying reaches may be reduced. Finer results would require averaging over more, smaller depth increments.Math.abs(Δx); this ensures a legible plot but means the sign convention (whether the profile is physically a backwater curve heading upstream or downstream) must be tracked by the user based on which end is the control (y₁) and which is the target (y₂).