Solution (source code)

= Solution

The conserved particle volume per unit horizontal area is
$$
\mathcal P=\phi_1(H-z_m)+\phi_2z_m.
$$
The <sediment mass determines final deposit thickness>: with the stipulated deposit <particle volume fraction> $\phi_{\max}=1$, all particle volume becomes bed thickness, so $h_c=\mathcal P$. For $z_m=H/2$,
$$
\boxed{\bar h=h_c=\frac H2(\phi_1+\phi_2),\qquad\bar\phi=\frac1H\int_0^H\phi\,dz=\frac{\phi_1+\phi_2}{2}=\frac{h_c}{H}.}
$$
The final <particle volume fraction> averaged over the entire container remains the initial average: clear fluid occupies $h_c<z<H$ and the deposit occupies $0<z<h_c$. Averaging over the deposit alone would instead give one, which is a different average.