Solution (source code)

= Solution

Neglect upstream <speed> and hydraulic losses. If $H$ is the upstream free-surface height above the crest, the <specific energy> at the crest is $H=y+v^2/(2g)$ and flow per unit width is $Q=yv$. At the critical broad-crested control section, extremizing $Q^2=2gy^2(H-y)$ gives $y=2H/3$ and $v^2=gy$. Therefore
$$
\boxed{Q=\sqrt g\left(\frac{2H}{3}\right)^{3/2}.}
$$
Finite approach <speed>, <friction> and contraction introduce measured <Discharge coefficient>[discharge coefficients]; the ideal result assumes a long enough crest for the near-hydrostatic critical-flow approximation.