Motile and driven particles confined in microfluidic channels exhibit
interesting emergent behavior from propagating density bands to density shock
waves. A deeper understanding of the physical mechanisms responsible for these
emergent structures is relevant to a number of physical and biomedical
applications. Here, we study the formation of density shock waves in the
context of an idealized model of microswimmers confined in a narrow channel and
subject to a uniform external flow. Interestingly, these density shock waves
exhibit a transition from `subsonic' with compression at the back to
`supersonic' with compression at the front of the population as the intensity
of the external flow increases. This behavior is the result of a non-trivial
interplay between hydrodynamic interactions and geometric confinement, and is
confirmed by a novel quasilinear wave model that properly captures the
dependence of the shock formation on the external flow. These findings can be
used to guide the development of novel mechanisms for controlling the emergent
density distribution and average population speed, with potentially profound
implications on various processes in industry and biotechnology such as the
transport and sorting of cells in flow channels