Solution (source code)

= Solution

Assume quasi-steady saturated <Darcy flow>, hydrostatic pore pressure, a long shallow barrier, isotropic intrinsic <permeability of a porous medium> $k$, an impermeable lined base, and negligible capillarity. Maintain upstream and downstream free-surface heads at $H$ and $\eta<H$. The <Dupuit approximation> neglects vertical velocity except in small entrance/exit regions. Let $\mu$ be the fluid's dynamic viscosity and $K=k\rho g/\mu=k g/\nu$ its hydraulic conductivity.

Since the pressure is $p=\rho g(h(x)-z)$, the superficial <Darcy velocity> is $v_D=-K h_x$, uniform with depth at fixed $x$. Integrating over the printed channel width gives
$$
Q=-K A(h)h_x=-\frac{\alpha K}{3}h^3h_x.
$$
The steady discharge is constant, so integration with the two head boundary values gives <Dupuit flow in a channel with cubic wetted area>:
$$
\boxed{h(x)=\left[H^4-(H^4-\eta^4)\frac xL\right]^{1/4},\qquad
Q=\frac{\alpha k\rho g}{12\mu L}(H^4-\eta^4).}
$$
Here $Q$ is total volume per time, including the changing channel width. The pore-space mean speed is $v_p=v_D/\phi=Q/[\phi A(h)]$. Thus <porosity> affects storage and pore transit time but does not separately multiply this steady discharge when $k$ is the intrinsic permeability in <Darcy's law>. If “permeability” is instead supplied as hydraulic conductivity, use that value directly for $K$. An exact seepage-face/free-boundary calculation near the outlet would go beyond the shallow Dupuit model.