Solution (source code)

= Solution

The <shallow-water approximation> requires $h/L\ll1$, a nearly <hydrostatic pressure>, negligible vertical acceleration, and approximately depth-independent horizontal velocity, concentration, and density. The large <Reynolds number> allows viscous stress to be neglected away from thin boundary layers, while the deep ambient is taken to remain stationary.

For unit channel width, <volume conservation>, chemical conservation, and <mass conservation> are respectively
$$
h_t+(uh)_x=w_e-w_d,
$$
$$
(\phi h)_t+(\phi uh)_x=-\phi w_d,
$$
and
$$
(\rho h)_t+(\rho uh)_x=\rho_0w_e-\rho w_d.
$$
Entrained ambient fluid contains no chemical and enters with density $\rho_0$; detrained fluid carries the local concentration and density. The ambient has no horizontal momentum, whereas detrained fluid carries horizontal momentum $\rho u$ per unit volume. The depth-integrated <momentum conservation> law is therefore
$$
\frac{\partial(\rho uh)}{\partial t}
+\frac{\partial}{\partial x}\left(\rho u^2h+\frac12(\rho-\rho_0)gh^2\right)
=\boxed{-\rho u w_d},
$$
so $M=-\rho u w_d$.