Solution (source code)

= Solution

Assume nonzero upstream speed, so $F>0$. For steady constant-density flow, <mass conservation> gives the constant volume flux
$$
whu=WHU.
$$
The <Bernoulli equation> states that $u^2/2+p/\rho+gz$ is constant along each streamline of a steady inviscid constant-density flow under gravity. It need not have the same value across unrelated <streamlines> in a general rotational flow. Here uniform upstream <velocity> supplies the same head, and the slowly varying, nearly horizontal channel permits <hydrostatic pressure> $p=p_{\rm atm}+\rho g(h-z)$. Neglecting losses, the <Bernoulli equation> therefore gives
$$
\frac{u^2}{2}+gh=\frac{U^2}{2}+gH.
$$
Substitute $u=UWH/(wh)$ and set $s=h/H$, $F=U^2/(gH)$, the square of the upstream <Froude number>. Rearrangement gives
$$
\boxed{\left(\frac Ww\right)^2=G(s),\qquad
G(s)=\left(1+\frac2F\right)s^2-\frac2F s^3.}
$$
For positive depth, this cubic increases to its maximum at $s_*=(F+2)/3$ and then decreases until it reaches zero at $(F+2)/2$. Its maximum is $G(s_*)=(F+2)^3/(27F)$. Consequently the <critical width of a rectangular open-channel contraction> is
$$
\boxed{w_c=W\sqrt{\frac{27F}{(F+2)^3}},\qquad w(x)\ge w_c.}
$$
At equality the two positive-depth branches coalesce and the local <Froude number> equals one.

When $w>w_c$ everywhere, a smooth solution connected to the upstream state cannot change branch without passing through that coalescence. At $w=W$ the upstream depth is $s=1$, with $G'(1)=2(F-1)/F$. If $F<1$, this point is on the descending, subcritical branch. At a wider location $w>W$, the left-hand side falls below $1=G(1)$, so the depth on that branch must increase: \b[$h>H$ for subcritical upstream flow $F<1$]. If $F>1$, the upstream state is on the ascending, supercritical branch and decreasing the left-hand side decreases $s$: \b[$h<H$ for supercritical upstream flow $F>1$].

For $F=1$, $w_c=W$ and the upstream state is critical. A literally constant-width upstream region then conflicts with the strict assumption $w>w_c$ everywhere. If the upstream state is interpreted only as an asymptotic critical limit, a widened channel has one solution with $h<H$ and one with $h>H$; a further branch condition is required. Merely solving the cubic at one location, without retaining the upstream-connected branch, would not determine the physically continued depth.