We investigated the effect of flow on motile bacteria by tracking them in precisely controlled laminar flows generated in a microfluidic channel (Fig. 1a). To ensure that the dominant velocity gradients occurred in the horizontal observation plane, at the channel mid-depth, we used a microchannel with aspect ratio H/W > 1 (height H = 750 μm; width W = 425 μm). In that plane, the velocity profile, u(y) = U[1 − 4(y/W)2], where U is the flow velocity at the channel centreline, is parabolic, and, thus, the shear rate S(y) = du/dy = −8yU/W2 varies linearly with distance y across the channel and is zero at the centreline (Fig. 1b). In this flow, smooth-swimming Bacillus subtilis bacteria swam unperturbed in straight paths (Fig. 1c) when near the centre of the channel, where the local shear rate was small. Conversely, in high-shear-rate regions, trajectories exhibited frequent loops resulting from rotation of the swimming bacteria by the hydrodynamic torque imparted by the local shear (Fig. 1d). The opposite handedness of the loops on either side of the channel centreline reflects the opposite sign of the shear rate (Fig. 1c, d and Supplementary Movie 1). As shown below, these looping trajectories resulted in bacteria becoming trapped in the high-shear region of the channel.

Figure 1: Trajectories of bacteria in flow and shear-induced depletion.
figure 1

a, Schematic of the serpentine microchannel used for shear-induced depletion experiments (left) and perspective view (right) showing the imaging plane (blue) and the parabolic flow profile (red). b, Parabolic fit of the measured velocity profile (red) and associated linear shear rate (blue) at the channel mid-depth for a mean absolute shear rate . c, Typical trajectories of smooth-swimming B. subtilis cells in flow, beginning at open circles and ending at crosses (time interval between dots = 0.5 s). d, Enlarged view of one trajectory exhibiting a loop. Ellipses, shown at 0.2 s intervals, indicate the cell body orientation (filled part is in the front; cell body not to scale). eh, Time series of phase-contrast images showing the spatial distribution of smooth-swimming B. subtilis cells in an impulsively started flow with . (e) Cells are initially randomly distributed throughout the microchannel (black profile, repeated in fh for reference), then quickly depleted from the central region after flow is initiated (fh). The bacterial concentration, B, was normalized by the concentration in the no-flow case, averaged over the imaging region (− 0.3 < y/W < 0.3). i, In the same flow conditions, dead B. subtilis show no discernible depletion.

At the population scale, this trapping effect resulted in a marked depletion of cells from the central, low-shear region of the flow, and consequently, in an accumulation in the flanking regions of higher shear. When the flow was impulsively started from rest, the initially uniform distribution of cells over the imaging region across the channel width (Fig. 1e) rapidly (5–10 s) evolved into a distribution characterized by considerably fewer cells in the central part of the channel (Fig. 1f–h). The magnitude of the depletion was severe, with local cell concentrations dropping by 70% (Fig. 1h). The absence of depletion in control experiments with dead cells in flow (Fig. 1i) and with motile cells in quiescent fluid (Fig. 1e) confirmed that depletion resulted from the coupling of motility and flow. In particular, it did not require the presence of a nearby surface as evidenced by the uniform bacterial distribution in the absence of flow, in contrast to the known accumulation of motile cells arising from hydrodynamic6 or short-range steric7,8 interactions with boundaries.

Shear-induced trapping is a strong function of the shear rate and is greatest at intermediate shear levels. Over a broad range of mean shear rates, –50 s−1 (the mean of the absolute shear rate across the channel width), the intensity of the depletion grew with the shear rate up to and diminished for larger shear rates (Fig. 2a). The maximal depletion at intermediate shear rates is illustrated by the depletion index, ID (Fig. 2b), and occurred at shear rates, –10 s−1, that are typical for a wide array of environmental, physiological and engineering flows, such as those occurring in the subtidal coastal ocean9, groundwater10, mammalian reproductive tracts11 and catheters12.

Figure 2: Bacterial depletion is maximized for intermediate shear rates.
figure 2

a, Steady-state bacterial concentration profiles of wild-type B. subtilis from experiments (thick lines) and a Langevin model (thin lines) for different mean absolute shear rates, . Model profiles were computed with no fitting parameters by integrating trajectories of cells with aspect ratio q=10, swimming speed V =50 μm s−1, and effective rotational diffusivity DR=1 rad2 s−1, corresponding to measured physical properties of wild-type B. subtilis. The model further predicts no depletion for spherical (q=1) bacteria at any shear rate (shown only for , dashed line). All profiles were measured or computed after more than 60 s of flow and normalized by the mean bacterial concentration in the no-flow case. b, The depletion index, ID (the fraction of bacteria depleted from the central half-width of the microchannel), reveals that maximal depletion occurs at intermediate shear rates, regardless of the bacterial strain tested. The peak in depletion is correctly captured by the Langevin model. Error bars correspond to the standard error of the mean.

Shear-induced trapping occurs in bacteria with diverse motility patterns and flagellation strategies, as demonstrated by comparing identical experiments with smooth-swimming B. subtilis, wild-type B. subtilis and Pseudomonas aeruginosa. Wild-type B. subtilis, which swim with multiple flagella (‘peritrichous’) in a random walk (‘run-and-tumble’) motility pattern by interspersing nearly straight runs with random tumbles (on average every 0.5 s), exhibited a broad peak in the depletion index analogous to the smooth-swimming mutant, albeit with a 50% weaker depletion (ID, MAX = 0.23 compared with 0.34; Fig. 2b). This demonstrates that rotational noise in the cells’ trajectories due to tumbling affords a moderate degree of escape from shear-induced trapping. P. aeruginosa, which in contrast to B. subtilis has a single flagellum (‘monotrichous’) and a run-and-reverse motility pattern, also exhibited strong depletion (ID, MAX = 0.28; Fig. 2b; Supplementary Fig. 1), indicating that trapping is largely independent of the details of the propulsion system and reorientation mechanism.

The broad occurrence of shear-induced trapping among bacteria, and potentially a host of other microorganisms, is supported by a Langevin model of cell motility in flow, which revealed that the mechanism underlying trapping is the preferential alignment of bacteria with the flow direction due to their elongated shape. We modelled bacteria as prolate ellipsoids with aspect ratio q = 10, accounting for the combined hydrodynamic resistance of the cell body and flagellar bundle in B. subtilis13, and swimming speed V directed along the long axis. A cell’s equations of motion in the same parabolic flow as in the experiments are then

where ξR models rotational noise as a Gaussian-distributed angular velocity with mean zero and variance 2DR/Δt, Δt is the elapsed time and DR is the cell’s effective rotational diffusivity. Cell concentration profiles across the channel, computed by integrating 105 trajectories in flow using measured values of V = 50 μm s−1 and DR = 1 rad2 s−1 (Supplementary Fig. 2), are in excellent agreement with experimental profiles (Fig. 2a). In particular, the magnitude of the depletion and the optimal shear rate (2.5–10 s−1) closely match those found in experiments (Fig. 2b). The conclusion that trapping results from the preferential alignment in shear caused by cell elongation is supported by simulations with spherical swimmers (Fig. 2a), which exhibit no depletion.

Intriguingly, the Langevin model predicts only marginal depletion in the absence of rotational noise (DR = 0; Fig. 3a, d). In this limit, cell trajectories are deterministic and a separatrix in yϕ phase space14 segregates cell trajectories into two types: cells outside the separatrix continuously perform loops (Fig. 1d) owing to the high shear, whereas cells inside the separatrix ‘swing’ back and forth across the channel centreline owing to opposite-handed vorticity on either side of the channel, never completing a full loop. Peaks in the cell concentration in phase space closely track the cusps of the separatrix (Fig. 3a), and cell concentration profiles across the channel collapse for all shear rates (Fig. 3d), when cell positions y are rescaled by the width WS of the separatrix14, given by WS/W = C0 (where C0 3.5 is a constant), showing that the separatrix governs trapping when rotational noise is negligible. Real bacteria, however, are always subject to random fluctuations in their orientation, due to rotational Brownian motion or tumbling. The Langevin model shows that, by making cells depart from their deterministic trajectories, rotational noise causes cell trajectories in phase space to cross the separatrix, resulting in their accumulation in the high-shear region (Fig. 3b), in good agreement with observations (Fig. 3c). Shear trapping thus provides a biological realization of a counterintuitive class of systems where stochasticity suppresses transport rather than enhancing it15.

Figure 3: Bacterial elongation and rotational-noise-control shear-induced trapping.
figure 3

a, Langevin model results of the normalized cell concentration in phase space (yϕ) for elongated (q=10) self-propelled (V =50 μm s−1) cells in a parabolic flow, for a mean absolute shear rate in the absence of rotational noise (DR=0), showing accumulation near the cusps of the theoretically determined separatrix14 (solid white line). b, Langevin model results for noisy swimmers (DR=1 rad2 s−1). Other conditions as in a. c, Experimental quantification of the normalized cell concentration in phase space (yϕ) for wild-type B. subtilisunder similar conditions to b (, DR ≈ 1 rad2 s−1), exhibiting good agreement with the Langevin model (b). d, Distribution of cells across the channel obtained from the Langevin model for different mean shear rates, , in the absence of rotational noise (DR=0). Inset: same quantity, rescaled by the width of the separatrix, WS (a). e, The depletion index, ID, as a function of the rotational Péclet number, , for different DR. The thick dashed grey line shows results from a Fokker–Planck model of the cell concentration, confirming the scaling IDPe2 for small Pe predicted by the Langevin model. Thin solid lines denote the decrease of ID with Pe, , predicted from the analytical width of the separatrix, which governs depletion at large Pe (d). f, Probability distribution of the cell orientation at three locations across the channel (y/W=0,0.15,0.3), determined experimentally (thick lines; data from c) and with the Fokker–Planck model (dashed lines).

The maximum in cell depletion, observed experimentally and confirmed by the Langevin model (Fig. 2b), can be understood by considering the effect of spatial segregation by the separatrix at high shear rates, and, conversely, the competition between shear-induced alignment and rotational noise at low shear rates. When the mean-channel shear is large compared with noise—that is, for a large rotational Péclet number, —cell depletion is limited to the low-shear region defined by the distance between the separatrix cusps (Fig. 3d), WS. As the depletion index, ID, is proportional to the width of the depleted region, and the separatrix width decreases with increasing shear rate14 as , we predict that for large Pe, which is in good agreement with the Langevin model (Fig. 3e).

When the mean-channel shear rate is small compared with rotational noise—that is, Pe 1—trapping is governed by the competition between shear-induced alignment with the flow and randomization of the cell orientation due to rotational noise. To gain physical insight into the increase in depletion with increasing Pe obtained for both experiments and Langevin simulations (Fig. 3e), we considered the steady-state Fokker–Planck equation describing the distribution p(ϕ; y) of the local cell orientation ϕ at a fixed position y in the microchannel,

The distribution p(ϕ; y) obtained by numerical integration of equation 1 is in good agreement with that obtained by quantifying cell orientation across the channel experimentally (Fig. 3f). This signifies that the fundamental mechanism underlying cell depletion is correctly captured by the Fokker–Planck formulation: where the torque imparted by the local shear overcomes rotational noise, elongated swimmers become aligned more strongly with the flow direction and their mobility across the channel plummets. As self-propelled particles are far-from-equilibrium systems, cells can accumulate in regions where the ensemble-averaged (‘effective’) swimming speed across the channel, VEFF(y) = ∫ 0πV sinϕ p(ϕ; y)dϕ, is small, resulting in a non-uniform cell concentration across the channel, B(y) = B(0)VEFF(0)/VEFF(y) (Ref. 16). In the small Pe regime, results from both the Langevin and the Fokker–Planck models predict ID Pe2 (Fig. 3e), a scaling that is confirmed by a perturbation analysis for p(ϕ; y) in the limit Pe 1 (Supplementary Information). The Fokker–Planck model thus provides a simple, continuum description of shear-induced trapping and supports the physical argument that trapping is caused by preferential alignment vis-à-vis rotational noise.

Shear-induced trapping severely curtails the ability of bacteria to follow chemical signals (chemotaxis), a fundamental strategy4 used by bacteria to find nutrients17, colonize and infect hosts18, or evade noxious substances19. Focusing on oxygen as the chemical signal (‘aerotaxis’; ref. 20), we devised a microfluidic channel to simultaneously expose wild-type B. subtilis to fluid flow and to a linearly varying oxygen concentration profile (Fig. 4a). Under quiescent conditions, B. subtilis strongly accumulated in the oxygen-rich region of the microchannel (Fig. 4b). In the presence of flow, the cells’ chemotactic response to the same oxygen gradient was stifled (Fig. 4b). The chemotactic ability of the cells decreased with increasing mean shear rate, as demonstrated by the declining chemotactic index, IC (Fig. 4b, inset). An analysis of the bacterial distribution profiles relative to the case without an oxygen gradient (Supplementary Fig. 3) clearly shows that the deterioration of the chemotactic performance is primarily due to shear-induced trapping, particularly at low shear rates (≤10 s−1; Fig. 4b). A further process that may have acted in concert with trapping is the degradation of chemosensory dynamics in shear, previously predicted by mathematical modelling21. At the highest shear rate tested, , shear almost entirely suppressed chemotaxis, with IC dropping by 85%.

Figure 4: Shear-trapping stifles chemotaxis and promotes surface attachment.
figure 4

a, Schematic layout (left) and cross-sectional view (right) of the microfluidic device used to measure the effects of shear-induced trapping on aerotaxis. Oxygen diffuses through the PDMS walls and through the medium in the central channel, generating a steady, linear oxygen profile, as verified experimentally by imaging an oxygen-sensitive fluorescent dye (orange line). b, Concentration profiles of wild-type B. subtilis transverse to the flow for different mean shear rates, . Inset: the chemotactic index, IC, as a function of was computed as the relative difference in the mean cell concentration between the high-oxygen half-width (y > 0) and the low-oxygen half-width (y < 0), normalized by the same difference in the no-flow case. Results are shown for the same range of shear rates as in Fig. 2a (for clarity, not all measured profiles are shown in the main figure). c, Schematic layout of the 7-channel microfluidic device (left) used to measure the effect of shear-induced trapping on bacterial surface attachment at 5 different shear rates simultaneously (plus two no-shear controls) and a perspective view (right) of the imaging plane (lower glass surface of the channel; blue) and the parabolic flow profile (vertical; red). d, Time series of the area coverage of P. aeruginosa PA14 on the glass surface for different mean shear rates. Each curve represents the mean of 5 replicate experiments performed under identical conditions and normalized by the mean bacterial surface coverage after 1 h (Supplementary Fig. 4). Error bars represent the standard error of the mean and are shown only on the last data point for clarity. Inset: the surface coverage index for P. aeruginosa, IS (the amount of bacteria attached to the surface after 1 h, normalized by its no-shear counterpart), increases with increasing mean shear.

In contrast to its negative effect on chemotaxis, shear-induced trapping has a positive effect on bacterial surface attachment, a precursor of biofilm formation. Solid surfaces exposed to fluid flow always generate locally enhanced shear rates, which, we reasoned, can lead to cell accumulation by shear-induced trapping and, thus, to higher encounter and attachment rates of cells on the surface. We tested this hypothesis by measuring the attachment of P. aeruginosa PA14 to a glass surface in shallow (58 μm depth) microfluidic channels at five different shear rates (Fig. 4c). The surface coverage increased with increasing shear rate (Fig. 4d), causing a 125% increase in attachment for compared with quiescent conditions. The correspondence of the shear rates (5–25 s−1) at which both increased attachment (Fig. 4d, inset) and increased depletion (Fig. 2b) of P. aeruginosa were observed, suggests that the enhanced surface colonization was promoted by shear, which induced cell accumulation in close proximity of the surface. Whereas previous research on surface attachment focused on the effects of high shear rates (103–105 s−1; ref. 22) and post-attachment dynamics including surface residence time23 and catch-bond adhesion strength24, our results demonstrate that attachment can be enhanced by lower, commonly occurring shear rates with a mechanism virtually independent from specific adhesion properties. For example, P. aeruginosa biofilms are a frequent cause of infection in catheters3, where typical shear rates are of the order of 15 s−1 (ref. 12), indicating that flow effects must be carefully considered in the design of these and other biomedical devices.

A spatially varying shear rate of the appropriate magnitude is the only requirement for a flow to generate trapping, indicating that this phenomenon is likely to occur in a very broad range of flow environments. Thus, we expect shear-induced trapping of bacteria to occur not only in pipe, boundary layer and porous media flows, but also potentially in unbounded flows (Supplementary Fig. 5), including turbulence in lakes and oceans. A distinguishing feature of shear-induced trapping is the fast timescale of cell accumulation (Fig. 1 and Supplementary Fig. 6). In the fluid dynamical regime of bacteria, mechanisms including inertia, buoyancy and deformation that otherwise lead to the accumulation of particles25, bubbles26 or red blood cells27, are insignificant or exceedingly slow (Supplementary Information). Instead, shear-induced trapping occurs as a result of self-propulsion, which drives cell accumulations within a timescale governed by the swimming speed and the flow length scale.

We have demonstrated a common yet hitherto neglected interplay between cell motility, cell elongation—a nearly universal feature of flagellated cells including bacteria and spermatozoa—and hydrodynamic shear, which results in the trapping and accumulation of bacteria in high-shear regions. Our results suggest that flow, ubiquitous in microbial habitats yet rarely considered in biological and physical studies of microbes, encourages sessile over free-swimming lifestyles, because the pursuit of chemical signals by planktonic microbes is hampered by flow, whereas attachment to surfaces is favoured. This fundamental interaction between motility and shear, and the subtle role of rotational noise, are thus expected to affect microbial transport in a myriad of applications, from groundwater remediation10, to microfiltration28, to the design of micro-robots as therapeutic agents for drug delivery29.


Bacterial cultures.

The bacterial strains used in this work were Bacillus subtilis wild-type strain OI1085 and smooth-swimming strain OI4139, and Pseudomonas aeruginosa strain PA14, and were cultured using standard protocols (Supplementary Information). To ensure a high percentage of motile bacteria in experiments, non-motile and dead cells were gently removed from bacterial suspensions using sterile cell culture inserts incorporating a 3 − μm-pore-size membrane.

Microfluidic assays.

For shear-induced trapping and chemotaxis experiments, we fabricated a microchannel with a 532-mm-long serpentine pattern (Fig. 1a) to ensure a minimum of 60 s exposure time to shear of the bacteria for all flow rates. For chemotaxis experiments, two parallel channels flanking either side of the original (‘test’) channel, and separated from it by 350 μm-thick polydimethylsiloxane (PDMS) walls, carried flowing oxygen and nitrogen, respectively, to generate a steady, linear oxygen concentration profile (2.5 mM mm−1; Fig. 4a) within the test channel through diffusion. For surface attachment experiments, we fabricated a microfluidic device consisting of 7 separate channels (58 μm high, ranging from 0.25 to 5.0 mm in width), to measure the surface coverage of cells for 5 shear rates simultaneously (plus 2 no-flow controls) on a single chip (Fig. 4c). Potential confounding factors stemming from cell growth, cell–cell signalling, extracellular matrix production and variability among cultures were minimized by focusing on early attachment (<1 h), performing experiments at different shear rates in parallel using a single cell culture, and ensuring that the same number of cells per unit surface area flowed in each microchannel.

Cell imaging and tracking.

Long bacterial trajectories (Fig. 1c, d), were acquired using dark-field microscopy (×6 magnification, 70.57 frames per second) and by moving the microscope stage in synchrony with the mean flow in the channel, at 500 μm s−1. Spatial distributions of bacteria in flow were obtained using phase-contrast microscopy (×15 magnification, 60 frames per second) with a stationary stage. All image analysis was performed in Matlab (the Mathworks) using in-house cell tracking and identification algorithms.

Langevin simulation.

The equations of motion (1) were integrated numerically for 105 cells using a fourth-order Runge–Kutta scheme implemented in Matlab. We used anti-symmetric periodic boundary conditions at y = ±W/2, so that the parabolic flow profile repeats periodically with alternating sign and modelling cell–surface interactions becomes unnecessary. We tested that the integration time step, Δt = 4 ms, was sufficiently small to ensure independence of the solution from further reductions in Δt. Physical parameters controlling simulated cell dynamics including flow speed, cell swimming speed, elongation and rotational noise were all measured experimentally or calculated for the same conditions as in the experiments (Supplementary Information).