Maximum-invasion envelope of a retained current (source code)

= Maximum-invasion envelope of a retained current
{title2=$M_\infty(x)=\max_{t\geq0}h(x,t)$}

For the <triangular current with capillary retention>, the initial trailing face is already the maximum for $0<x<L$. Further upslope, the maximum occurs when the moving crest passes. Hence
$$
M_\infty(x)=\begin{cases}ax,&0<x<L,\\a(2L-sx)/(2-s),&L<x<2L/s,\\0,&\text{otherwise}.\end{cases}
$$
The final trapped phase has saturation $s$ below this envelope. Its volume is $\phi s\int M_\infty\,dx=\phi aL^2$, exactly the initial mobile volume. Maximum invaded thickness is distinct from residual saturation: $s$ multiplies occupied pore volume rather than shrinking the geometrical envelope.