Solution (source code)

= Solution

Define the concentration-dependent <reduced gravity>
$$
g'(\phi)=\frac g{\rho_0}(R_1\phi+R_2\phi^2),
\qquad
g'_\phi=\frac g{\rho_0}(R_1+2R_2\phi).
$$
Under the <Boussinesq approximation>, the three <shallow water equations> can be written in advective form as
$$
\phi_t+u\phi_x=-\frac{\phi w_e}{h},
$$
$$
h_t+uh_x+hu_x=w_e-w_d,
$$
$$
u_t+uu_x+g'h_x+\frac h2g'_\phi\phi_x=-\frac{uw_e}{h}.
$$
The coefficient matrix of this <quasilinear system> has <characteristic speeds>
$$
\boxed{\lambda_0=u,\qquad \lambda_\pm=u\pm\sqrt{g'h}.}
$$
Thus this is a <hyperbolic system> when $g'h>0$. Along the intermediate <characteristic curve> $dx/dt=u$, the concentration obeys
$$
\boxed{\frac{D\phi}{Dt}=\phi_t+u\phi_x=-\frac{\phi w_e}{h}.}
$$
It decreases because ambient entrainment dilutes the chemical; detrainment does not change the concentration of a well-mixed parcel.