## Abstract

Biological flows over surfaces and interfaces can result in accumulation hotspots or depleted voids of microorganisms in natural environments. Apprehending the mechanisms that lead to such distributions is essential for understanding biofilm initiation. Using a systematic framework, we resolve the dynamics and statistics of swimming microbes within flowing films, considering the impact of confinement through steric and hydrodynamic interactions, flow and motility, along with Brownian and run–tumble fluctuations. Micro-swimmers can be peeled off the solid wall above a critical flow strength. However, the interplay of flow and fluctuations causes organisms to migrate back towards the wall above a secondary critical value. Hence, faster flows may not always be the most efficacious strategy to discourage biofilm initiation. Moreover, we find run–tumble dynamics commonly used by flagellated microbes to be an intrinsically more successful strategy to escape from boundaries than equivalent levels of enhanced Brownian noise in ciliated organisms.

## 1. Introduction

Surfaces, interfaces and confinements are ubiquitous in microbial environments [1,2]. Living near surfaces can provide a variety of benefits to microbes over life in bulk fluids. Whereas interfaces may be the source of oxygen and sunlight, solid surfaces accumulate sediments including nutrients and offer anchoring points for the formation of extracellular matrices and biofilms. Moreover, no-slip surfaces locally slow flows and may provide peaceful respite from violent mixing. However, an unavoidable consequence of no-slip surfaces embedded in flows is shearing and, though microbes at surfaces may not be subject to large velocities, they are commonly subjected to non-negligible shears [3].

Confinement within films, between a rigid substrate and an interface, is particularly fascinating with respect to microbial life because it offers the immediate presence of two surfaces with differing properties. Intense biological activities and accumulations of swimming cells are often associated with films [4–6]. Indeed, countless species of bacteria secrete their own extracellular polymeric substances in order to form biofilms [7,8]. Films on passive or living substrates allow pathogens to swim or even swarm in order to colonize a wide variety of surfaces including soil, plant leaves, animal tracts or skin [9–11]. Liquid–air interfaces have recently attracted interest because of bioremediation of oil-consuming bacteria at oil spill sites [12–14].

The majority of previous research on swimming in confined environments has focused on investigating the effect of a single solid boundary on swimming dynamics. In particular, the interactions between organisms and surfaces have been studied in detail, both theoretically [15–28] and in experiments [17,20,29–34]. Moreover, biological traits such as nutrient uptake in a quiescent fluid have been numerically investigated for a suspension of spherical model swimmers (squirmers) constrained between a wall and a free surface [35]. The interplay of a flowing fluid and swimming cells has been studied recently for Newtonian [36–44] and non-Newtonian fluids [45–49]. Additionally, biological systems often feature large fluctuations that affect the dynamics of living cells [50–57]. Together, these works emphasize the pivotal roles of confinement, the background flow and noise as determinants of swimmer trajectories in micro-environments. Despite the widespread implications, the combined effects of motility, external flows, hydrodynamics and biological non-determinism remain obscure owing to the complexity of the dynamics.

Here, we present a comprehensive description of the dynamics and statistics of swimming microbes in flowing films between a solid boundary and a free surface. We focus on two classes of model microorganisms: flagellated swimmers, like *Escherichia coli* bacteria, and ciliated swimmers, such as *Volvox carteri* microphytes (§4.2). To model swimming trajectories and the distribution of micro-swimmers within films, we consider the various contributions to a swimmer's equation of motion, first separately then concurrently. We begin by considering only the effects of external flow and steric interactions with the film boundaries (§3) before including detailed hydrodynamic interactions with the two surfaces (§4). Additionally, stochastic effects must also be accounted for. We scrutinize the swimmer distributions that will arise in flowing films, because swimmers are subjected to thermal noise (§5.1). It is well known that the primary source of biological stochasticity in many flagellated microbes is run–tumble dynamics, whereas ciliated organisms are subject to enhanced Brownian fluctuations, e.g. owing to cilia beating out of synchrony. Run–tumble dynamics are seen to prevent boundary accumulation more successfully than equivalent levels of enhanced Brownian noise (§5.2). Our results have implications for the control of cell distributions within flowing films, and highlight the cellular swimming strategies against which defouling schemes must contend.

## 2. Swimmer dynamics in a film

We consider a motile swimming microbe within a flowing film, with a bottom no-slip wall at and a no-shear top interface at height . The micro-swimmer is modelled as an ellipsoid of semi-major and minor axes *a* and *b* at a position and orientation ** p** (figure 1). It should be noted that we do not account separately for the swimmer's body and flagella, because we assume it is small compared with the flow scale, but we model the swimmer's shape as an ellipsoid with an aspect ratio that includes the flagellar length. Following examples from the literature [25,37,40], we describe the microbe's position and orientation with the equations of motion
2.1and
2.2

The contributions to the motion come from self-propulsion (a swimming velocity ), background flow (characterized by velocity and angular velocity ), steric interactions with the substrate and the interface in a film ( and ), hydrodynamic interactions with the surfaces ( and ) and stochastic dynamics owing to thermal noise ( and ) or run–tumble dynamics (controlled by ). We shall consider each of these in turn.

The translational invariance of equations (2.1)–(2.2) along the directions parallel to the surfaces allows us to consider motion of swimmers in the plane where we take the flow along the *x*-direction. The swimmer orientation is represented in cylindrical coordinates as , where is the angle in the plane, where upstream orientation corresponds to (figure 1). The dynamics of the system can be calculated by solving two coupled equations [37]: and , followed by integrating two further uncoupled equations: and .

## 3. Swimming cell trajectories with steric interactions

We begin by considering the simplified picture that microbes swim in a flowing film where their interactions with the film boundaries are purely steric. Several recent studies have considered pure kinematic interaction of swimmers with solid boundaries in the search for non-hydrodynamic mechanisms of boundary accumulation [58,59]. Neglecting hydrodynamic interactions is expected to give qualitatively relevant conclusions but not quantitative results. In §4 and §5, we characterize the roles of hydrodynamic interactions and noise, respectively, but until then we have only equations (2.1) and (2.2) with

The background fluid flow in the *x*-direction is prescribed in the form of a half-parabolic profile [60]
3.1which has a maximum speed at The flow enacts a drag on a swimmer at position ** r**, which induces the velocity and angular velocity The flow-induced translational and rotational velocities of the force-free and torque-free swimmer are
3.2and
3.3where the geometry factor is a function of the aspect ratio of an elongated swimmer.

Steric interactions with the surfaces are modelled by a repulsive force and torque, resulting in the linear and angular velocities 3.4and 3.5so that a microbe facing a surface would be at equilibrium at the distance of closest approach between the swimmer's body and the boundary [36]. For an elongated swimmer, that distance is The steric torque is derived from the potential [61] so that where is the rotational drag coefficient with units of volume and

The trajectories of a microbial swimmer in a flowing film (without hydrodynamic interactions or noise) are shown in figure 2. The vorticity of the background flow is strongest at the bottom wall but vanishes at the top, turning an upstream-oriented swimmer up towards the film interface. In slowly flowing films, spherical swimmers, such as *Volvox*, remain there while being advected downstream and slowly rotated, until their orientation is sufficiently changed to swim down into the film, where the vorticity is larger. Hence, the swimmer ‘dips’ down but quickly finds itself returned towards the free interface once again, only for the process to repeat (figure 2*a*).

Elongated swimmers, such as *E. coli*, tend to reside at the top surface longer owing to their Jeffery orbits [39] (figure 2*b*). Furthermore, the steric interactions reorient the long bodies parallel to the surface. When an elongated swimmer is oriented in the upstream direction at the top interface, the vorticity and steric torque owing to motility counter each other, leading to a stable fixed point in phase space at (red and green trajectories). The downstream-oriented fixed point is unstable at the top of the film, because the vorticity and steric torque cooperate, so that the swimmer can move away from the top interface (blue trajectory). Conversely, at the bottom wall, the (upsteam-) downstream-orientation fixed point is (unstable) stable, as shown by the red trajectory. Therefore, even without hydrodynamics, steric interactions can cause trapping of elongated swimmers at surfaces, oriented downstream at the bottom wall and upstream at the interface, in agreement with simulations [22] and experiments [20].

At sufficiently large flow speeds, an additional type of trajectory can be observed: a fast rotation (‘spinning’) of swimmers. Spinning trajectories are confined to the lower regions of the film where, owing to the strong vorticity of the flow, the swimmer is rotated rapidly. Hence, its motility averages to zero, leaving the swimmer vorticity-trapped. For spherical *Volvox*, we see spinning in the lower region of the film without trapping at the bottom wall (figure 2*c*; red trajectory). In the top region, swimmers start ‘dipping’ but interact sterically with the top surface. Therefore, they are forced to follow the trajectory exactly between dipping and spinning in the middle region (blue and green trajectories). This special trajectory is called the separatrix, in which swimmers dip from the top, down to a critical height Elongated *E. coli* also feature dipping and spinning in the middle region (figure 2*d*; blue trajectory), but in the top and bottom regions, they can get trapped close to the surfaces (red and green trajectories). The chance of encountering a surface is smaller when the motility is averaged to zero in rapid rotation, thus the probability of spinning increases with flow speed.

The transition between dipping and spinning is defined by the separatrix in phase space. Dipping trajectories are above this line and spinning trajectories below the separatrix. The lowest point in the film that this special trajectory can reach is the critical height
3.6both for spherical *Volvox* and elongated *E. coli*. Therefore, the separatrix touches the bottom wall at a critical flow rate of Spinning trajectories do not exist below that critical flow. The larger the flow rate, the larger the fraction of phase space taken up by spinning trajectories, and therefore, the probability of finding these trajectories in the lower regions of the film.

In summary, these results show that in the absence of hydrodynamic interactions and noise, the background flow and steric interactions of a micro-swimmer with the film boundaries lead to distinct swimmer trajectories depending critically on background flow speed. Above the critical flow speed a swimmer is likely to be observed spinning near the bottom boundary owing to the trapping in the high-vorticity region, whereas if swimmers tend to reside near the top surface.

## 4. Trajectories of swimming cells with hydrodynamic interactions

In addition to differing size and shape, *Volvox* and *E. coli* have pronouncedly different swimming strategies and consequently have very different hydrodynamic interactions with the bounding surfaces of the film through the swimmer-generated flow field [17]. In order to derive the hydrodynamic interactions, and in equations (2.1) and (2.2), we first compute the swimmer-generated flow field in a film (§4.1). We then use our results to describe the specific hydrodynamic effects on trajectories of our example swimmers (*E. coli* and *Volvox*; §4.2) and study the opposing effects of hydrodynamic boundary accumulation versus peeling of swimmers from the bottom wall by flow (§4.3).

### 4.1. Hydrodynamic interactions with surfaces

To find the flow at the position ** x** produced by a microorganism at , we first require the flow solution of a point force (Stokeslet) in a film. Once the Stokeslet solution is established, we use a multipole expansion to find the flow field generated by a micro-swimmer. Full details can be found in reference [62]. This flow field then allows us to compute the hydrodynamic interactions of the swimmer with the surfaces. For the sake of simplicity, we consider organisms in the dilute limit, and therefore do not include swimmer–swimmer interactions.

In unbounded fluids, the fluid velocity owing to a point force ** f** is
4.1where and is the identity matrix. We account for the presence of the wall and the interface by including auxiliary flow fields, written in terms of image systems. Surfaces are mathematically replaced with a hydrodynamic image system, analogous to the method of images in classical electrostatics. To account for the no-slip wall, we consider an image swimmer located at the position and producing an additional flow field that is given by the Blake tensor [63]. The no-shear interface located at also requires a hydrodynamic image at the position and the flow field produced by this image is a simple direct reflection of the Stokeslet flow (equations (4.1)).

However, a single image for each surface is not sufficient: just as two parallel mirrors create an infinite series of images, so too do two parallel surfaces. These hydrodynamic images are found at the positions and where and The flows produced by each image can be determined by successively repeating reflection operations to produce the appropriate hydrodynamic images for the bottom wall or top interface. The final flow at the point ** x** owing to a Stokeslet at

**in the film is given by 4.2and 4.3where the image tensors and are given explicitly in reference [62]. In practice, the series converges rapidly and is safely truncated after only a few images on each side of the film. In this work, we use four images on each side of the film in all presented text and figures, unless explicitly stated otherwise.**

*r*Knowing the analytic form of the Stokeslet in a film allows us to find the flow field generated by a motile microbe using a multipole expansion [64]. Neutrally buoyant micro-swimmers are force-free and so do not subject their surrounding fluid to a net force but rather to a force dipole and higher-order moments. Hence, the flow generated by the swimmer is
4.4where each term represents a multipole term in the swimmer-generated flow field: is the Stokes dipole, the quadrupole, the source doublet and the rotlet doublet flow. They are related to equation (4.3) by
4.5
4.6
4.7
4.8where the derivatives act on ** r**. The multipole coefficient has units and have units . Note that the infinite image series and the multipole expansion can be used in conjunction because of the linearity of the Stokes equations.

Equations (4.5)–(4.8) account for the generic attributes of micro-swimmers. The dipole models the opposing propulsion and drag forces on the fluid. Pusher-type swimmers drive fluid out along the swimming axis and have whereas pullers have The quadrupole term represents the fore–aft asymmetry of the microorganism with expected for flagellated bacteria, such as *E. coli*. The finite hydrodynamic size of the swimmer is included via the source doublet Ciliated organisms, like *Volvox*, possess positive values, whereas for non-ciliated swimmers The rotlet doublet represents opposing rotation of a swimmer's head and tail.

The Faxén relations couple the translation and rotation of the swimmer ( and ) with the flow (** u**). By solving these relations for the force-free and torque-free swimmer, the surface-induced translational and rotational velocities are found from equation (4.4) as a function of swimmer position and orientation [62]. It must, however, be noted that near-wall swimming might deviate from the predictions of a multipole expansion owing to contact interactions [32,33].

### 4.2. Two specific examples: *Escherichia coli* and *Volvox*

Here we apply our model to two specific example organisms of different classes: the flagellated *E. coli* bacterium and the ciliated *Volvox carteri* microphyte. Many of the micro-swimmers occurring in nature can be classified in one of these two categories. For a detailed list of species, we refer to, e.g. Lighthill [65]. Using experimental data, we estimate the swimming parameters including the multipole coefficients and swimming speed, and use these to calculate the swimming trajectories.

For *E. coli*, we estimate the dimensions as and The dipole strength has been measured as [32]. The source doublet coefficient is expected to be negative for a non-ciliated organism and can be estimated from an approximate hydrodynamic size and swimming speed [66], leading to Similarly, we estimate the quadrupolar coefficient for a flagellated bacterium. The rotlet dipole coefficient can be estimated from experimental measurements of the radius of curvature of swimming trajectories near surfaces [29,67–69]. Using a radius of curvature aspect ratio and swimming height gives where and the minus sign corresponds to swimming in the clockwise direction above the no-slip wall [62]. To emphasize the effects of a relatively thin film, we choose

For *Volvox*, we estimate the dimensions as and for the film height, we choose The primary multipole coefficients have been measured as and as has the swimming velocity [70]. This type of organism is fore–aft symmetric and so and it does not have rotating flagella so we also expect *Volvox* is not always neutrally buoyant and therefore a Stokeslet flow field should be present, but we neglect the effects of gravity here, assuming the sedimentation speed is smaller than the swimming speed. This model would, however, be even more appropriate for the many smaller ciliated microorganisms in nature [65] of which the multipole coefficients have not yet been measured directly.

Figure 3 shows typical trajectories for the two example organisms in the absence of flow. Random initial positions and orientations were chosen to show the diversity of the dynamics. *E. coli*-like organisms tend to accumulate at the surfaces (figure 3*a*), with a small bias towards the bottom wall because of the dipolar hydrodynamic interactions, and they remain tightly bound there because of quadrupolar hydrodynamics, in agreement with earlier calculations [62]. At both surfaces, the swimmers move in clockwise circles, but the radius of curvature of the trajectories at the bottom wall is larger than at the top interface by a factor of owing to the body elongation. *Volvox*-like organisms, in contrast, turn away from the bottom wall but assemble at the top interface (figure 3*b*). The hydrodynamic binding to the top interface is not so strong as that of the bacteria because of the positive source doublet moment. With a small fluctuation, this allows for motion away from the interface into the film, before returning back to the top again.

The resulting trajectories for these different swimmer types could offer important biological implications. Microorganisms such as *E. coli* bacteria might have developed into slender and fairly fore–aft symmetric bodies that tend to accumulate at boundaries, e.g. to facilitate biofilm formation. Likewise, sperm cells could benefit from the ability to swim upstream along the walls of the female reproductive tract. On the other hand, ciliated organisms such as the *Paramecium* protozoa or *Volvox* tend to accrue at the top interface only, which could be beneficial to collect oxygen or to facilitate photosynthesis.

### 4.3. Flow-induced peeling

Next, we re-introduce the external flow to the dynamics of the swimming microbes, in addition to steric and hydrodynamic interactions with the surfaces. The trajectories for swimmers including hydrodynamic interactions (figure 3) are substantially modified because of the additional vorticity of the background flow. They more closely resemble the swimming paths of figure 2 far from the surfaces. However, close to the surfaces, and particularly near the bottom wall where the vorticity is largest, there is a competition between the external flow field and the hydrodynamic interactions with the wall.

The external flow can prevent hydrodynamic interaction-induced boundary accumulation by peeling swimmers off the bottom wall. This detachment from surfaces by imposed flows has been demonstrated recently in experiments [43]. In figure 4, the minimum flow strength required to detach a swimmer from the bottom wall is shown as a function of dipole moment and source doublet moment *σ*. Note the asymmetry—a pusher can be washed off more easily than its equivalent puller. Recall that both *E. coli* and *Volvox* are pushers with Neutral swimmers ( steric interactions only) can accumulate at the surfaces in strong confinement, but can also be detached with small background flows.

We theoretically estimate the critical flow speed required to detach swimmers from the bottom wall by equating the angular velocity of the dipolar interactions ( given in [62]) and of the flow (equation (3.3)). Considering only two images and spherical swimmers, we obtain
4.9where is the critical angle that the swimmer must rotate through to overcome the hydrodynamic barrier. Note that this expression scales linearly with the film height, because the local vorticity decreases with increasing *H*. This equation is straightforwardly generalized to account for elongated swimmers, such as *E. coli*, by replacing the radius *a* with the distance of closest approach between the ellipse and the wall, Furthermore, by defining a dimensionless number that characterizes the degree of detachment by external flows (table 1), equation (4.9) can be recast as which is independent of the swimming speed. Here, corresponds to attachment and to detachment.

For pullers, the equilibrium orientation without flow is pointing towards the wall, . Hence, pullers must turn upwards over the hydrodynamic barrier from to the orientation parallel to the wall, in order to swim away. Inserting this angle and the figure parameters into equation (4.9) gives a prediction for the minimum flow strength required for pullers (red line in figure 4*a*).

Pushers are oriented parallel to the wall at equilibrium, but they must also overcome the attraction towards the bottom wall. Therefore, the angle at which the pushers can swim away, using two image systems, is given by the requirement that 4.10

Inserting the resulting angle into equation (4.9) gives a prediction for the minimum flow strength required for pushers (blue dashed line in figure 4*a*). Because the angle is smaller for pushers than for pullers, the former can escape from the surface more easily.

The inclusion of higher-order multipoles in the hydrodynamic interactions with the surfaces changes the critical flow speed (figure 4*b*). Flagellated swimmers with source doublet moment are more tightly bound to the wall, thus requiring a stronger flow to peel them off. Pushers such as *E. coli* in figure 3*a* with and require compared with when Non-ciliated pullers such as *Chlamydomonas reinhardtii* with both are even more tightly bound. Ciliated swimmers with on the other hand, are much less strongly attracted to the wall (figure 3*b*) and hardly need any flow for detachment.

## 5. Swimmer distributions

Swimmer trajectories in real microbial environments are subject to stochastic fluctuations. Having established the deterministic features of the swimmer trajectories in the presence of flow, steric and hydrodynamic interactions, we now examine the distributions of micro-swimmers if noise, originating from both thermal fluctuations and run–tumble dynamics, is added. This is important, because measuring distributions of swimming cells is easier in many experimental set-ups than following individual trajectories. For the sake of simplicity, in the following, we examine archetypal spherical swimmers with a dominant contribution from dipolar hydrodynamic interactions.

We model the thermal/Brownian noise as drawn from a Gaussian distribution, so that the mean-squared displacement and angular displacement are and in the large-time limit, where *D* and are the translational and rotational Brownian diffusion coefficients, respectively. For typical micrometre-sized swimmers, we approximate the thermal diffusion coefficients as and We assume that these diffusion coefficients are isotropic and remain constant as a function of film height. To be concrete, we consider a narrow film of height and organisms of dimensions and swimming velocity

When only thermal noise is considered, the swimmers' trajectories are deterministic over a timescale of crossing the film. Once they reach a surface, there is a competition between the noise, flow and hydrodynamic interactions. Using only the dipolar contribution from the first image system ( given in reference [62]), we define translational and rotational hydrodynamic interactions Péclet numbers to be 4.11and 4.12

With a dipole strength of we estimate and Because both thermal noise is not sufficient to allow swimmers to overcome hydrodynamic attraction to the surfaces, in the absence of a background flow. Experiments have shown that flagellated bacteria have smaller passive rotational diffusion coefficients than unflagellated cells [32,54], so represents a conservative estimate. Consequently, other mechanisms must be employed by swimming cells to prevent boundary accumulation within films.

In §5.1, we first study the combined effect of Brownian noise and external flow on distributions of archetypal micro-swimmers, i.e. *neutral* swimmers, *pushers* and *pullers*. In §5.2, we add non-thermal fluctuations and investigate the impact of the nature of this noise by comparing swimmers subject to run-and-tumble dynamics (*tumblers*) and enhanced Brownian noise (*drifters*).

### 5.1. Prevention of boundary accumulation by external flow

Section 3 describes the effect of flow on steric swimmers without noise. In §4, we include hydrodynamic interactions with the surfaces, but still exclude noise. In this section, we investigate the combined effects of steric and hydrodynamic interaction, film flow and thermal noise.

The accumulation of swimmers at the surfaces is evaluated using the swimmer density distribution normalized such that This distribution is established by solving equations (2.1)–(2.2) numerically for a population of 10^{4} swimmers that are initially distributed at random positions and orientations The simulation is continued until the distribution reaches a steady state. Subsequently, the spatial distribution is found by integrating over the angular coordinates, and similarly for the orientational distribution, The fraction of swimmers at the bottom wall and top interface are evaluated as and where to allow for small fluctuations.

Figure 5 shows distributions of swimmer positions and orientations as a function of the background flow for *neutral* swimmers (), *pushers* () and *pullers* (), while subject to thermal diffusion. In the absence of a background flow, the swimmers accumulate at the two surfaces owing to steric and hydrodynamic interactions, with a small bias towards the bottom wall for the pushers and pullers owing to the stronger hydrodynamic dipolar interactions near no-slip surfaces (figure 5*a*; first window). Once trapped, the equilibrium orientation for pushers is parallel to both surfaces (figure 5*b*, orange peaks at ). Pullers are bound more strongly, because their equilibrium orientation is perpendicular to the surface (blue peaks at ). Indeed, Schaar *et al.* [71] have shown that the detention times of pullers in the absence of external flow can be several orders of magnitudes larger than those of pusher or source doublet swimmers.

Introduction of a small flow is enough to drive the majority of neutral swimmers towards the top surface (figure 5*a*; second window). The transition to free interface accumulation is a general trend for all swimmer types, but occurs at different flow speeds for each. The fraction of neutral swimmers at the bottom wall () drops rapidly to zero around and at the top interface the fraction () rises to unity (figure 5*c*; green circles). Pushers start to get detached from the bottom wall around (orange squares), which is a bit smaller than the value predicted in §4.3 for deterministic swimmers (figure 4*a*; at ). This is because the noise occasionally kicks microbes away from the wall. By (figure 5*a*; third window), the majority of pushers have accumulated at the top interface. Pullers remain attached until a flow of strength is applied (blue diamonds), also a bit smaller than the deterministic equivalent The distributions across the film show this in more detail (figure 5*a*,*b*; windows 2, 3 and 4 for the three swimmer types, respectively).

Interestingly, by further increasing the flow speed, swimmers can again get trapped near the bottom wall. This is not due to hydrodynamic interactions but rather is directly related to the ‘spinning’ trajectories in high-vorticity flows that were described in §3. Consequently, at high flow rates, swimmers do not accumulate in the regions of smaller vorticity near the top interface. This is consistent with earlier findings of shear-trapping by Rusconi *et al*. [40]. It occurs because, whereas the vorticity alone is too small at the top surface to reinject swimmers into the film at a significant rate, small thermal fluctuations can lead swimmers to the high-vorticity region where they get trapped. Therefore, the number density of swimmers in the film is again larger near the bottom wall for flow rates and the accumulation at the top surface is suppressed entirely at large flow rates (figure 5*c* and 5*a*,*b*; last two windows).

In summary, the results show that in the absence of the background flow the swimmers accumulate at the top and bottom surfaces. Introducing flow and thermal Brownian noise can substantially modify distributions of swimming microbes in the film (figure 5*d*). For moderate flow rates, swimmers are peeled off the bottom wall and accumulate at the top interface. However, for large flow rates, the swimmers can get vorticity-trapped near the bottom wall again. This counterintuitive result suggests that faster flow rates are not always the best strategy to discourage wall accumulation and the consequent initiation of biofilms. Instead, there is a finite range of intermediate flows within which the top-accumulation is optimized.

### 5.2. Prevention of boundary accumulation by run–tumble dynamics

Typical microbial swimmers do not rely solely on thermal noise to prevent boundary accumulation—the HI Péclet numbers (equations (4.11)–(4.12)) are much too large. Many microorganisms have developed different mechanisms to actively change their orientation at a given moment. This could be an effective enhanced rotational Brownian noise, e.g. owing to cilia that temporarily beat out of synchrony [55,56,72–74] or to inhomogeneous external influences [57]. Moreover, many microbial species make use of a ‘tumbling’ mechanism that allows them to suddenly change their orientation, rather than slowly decorrelating over time [75]. Various tumbling mechanisms have been observed, including ones based on flagellar unbundling [76,77] and flagellar buckling instabilities [78] for bacteria. Such strategies are not limited to flagellated bacteria but are also employed by ciliated organisms such as *Paramecium* that suddenly eject trichocysts [79].

In this section, we measure the extent to which such mechanisms cause boundary detachment by comparing swimmers with run–tumble dynamics (*tumblers*) to swimmers subject to a Gaussian-distributed enhanced Brownian noise (*drifters*) of the same effective rotational diffusion coefficient.

Figure 6 shows the fraction of tumblers and drifters at the film surfaces for a given run time between tumble events, This range corresponds to because the effective rotational diffusion coefficient is In agreement with the expectations, microbes of all swimmer types are seen to accumulate at the two surfaces at large HI Péclet numbers.

Tumblers can detach fairly easily from the surfaces when the HI Péclet number is reduced (figure 6*a*), because sudden decorrelating tumbling events are momentarily sufficient to overcome the hydrodynamic attraction. With increasing tumbling rate, there is a gradual crossover from surface accumulation to residence in the bulk of the film. Interestingly, we find that the hydrodynamic swimmer-type has little effect on this crossover. This is an important observation as it indicates that hydrodynamic interactions are not a dominant factor when run-and-tumble dynamics are present, as in *E. coli*.

Neutral drifters (swimmers subject to enhanced Brownian noise) can also escape from the surfaces with ease. However, drifters with hydrodynamic interactions remain attached to the surfaces at much lower HI Péclet numbers (figure 6*b*). Moreover, the escape crossover is much sharper. This difference arises, because the slowly accumulating Brownian noise is continuously countered by hydrodynamic and steric interactions, and therefore, a certain threshold must be exceeded before swimmers can escape from a surface. The level of critical noise is for pusher drifters and for puller drifters. Also note that the attraction towards the bottom wall is a factor of 3/2 larger for pushers [62], and therefore, the fraction of pushers at the bottom wall peaks before decaying with decreasing HI Péclet number.

This crossover from boundary accumulation to detachment is particularly relevant in many typical micro-environments. For *E. coli*-like with (), the total fraction at both surfaces is However, for longer run times near surfaces [34], (), the fraction almost doubles to

In summary, the tumbling mechanism is more effective in preventing surface accumulation than Brownian noise of equivalent strength, particularly at the HI Péclet numbers relevant in nature. Flagellated organisms such as *E. coli* bacteria could employ this to their advantage, using hydrodynamic interactions to get close to surfaces (§4) and then tumbling to escape them. We have demonstrated that hydrodynamic interactions with confining walls break the equivalence between active Brownian motion and run–tumble dynamics. While it is commonly true that active Brownian motion and run–tumble dynamics are equivalent, this is not always the case [51]. Recent research that did not account for hydrodynamic interactions has shown that run-and-tumble dynamics lead to different density distributions near surfaces than simple active Brownian particles [50]. Our results support this previous finding and further demonstrate that run–tumble dynamics dominate over hydrodynamic interactions that can probably be safely neglected in future studies of bacteria.

## 6. Conclusion and discussion

We have presented a comprehensive description of the dynamics and statistics of swimming cells in flowing films, demonstrating that swimmer trajectories show distinct behaviours depending on the swimming mechanism of the organism. We focus on two classes of model organisms, flagellated (*E. coli*-like) and ciliated (*Volvox*-like) swimmers, with parameters tuned to experiments. Flagellated swimmers accumulate at surfaces owing to hydrodynamic interactions, whereas ciliated organisms can avoid surfaces.

We have shown that swimmers can be detached from the bottom wall above a critical flow strength, which we predict analytically and obtain numerically for dipolar and higher-order hydrodynamic interactions. Conversely, we see that steric interactions with the surfaces and background film flow favours wall (interface) accumulation above (below) a critical flow speed, owing to a vorticity-trapping mechanism. Therefore, boundary accumulation is not always prevented by imposing stronger flows. Instead, there is a finite range of intermediate flows for which microbes do not accumulate at the bottom wall. Our work predicts the extent of this range for both pusher and puller swimmers in terms of three dimensionless numbers (table 1). The flow-controlled crossover from surface accumulation to interface accumulation may have important implications for biofouling.

In addition, we demonstrate that run-and-tumble dynamics can act as a mechanism that organisms, such as *E. coli*, could employ to prevent boundary accumulation at surfaces, whereas enhanced Brownian noise requires much smaller Péclet numbers (greater noise) to achieve this goal. Whereas hydrodynamic interactions are important for systems with enhanced Brownian noise, we find that they have little impact on the swimmer distributions for the run–tumble dynamics expected for microorganisms such as *E. coli*. This conclusion has ramifications for future theoretical and computational investigations as it implies that computationally expensive and theoretically cumbersome hydrodynamic interactions may be neglected in biologically relevant scenarios if experimentally significant run–tumble noise is accounted for.

Our results provide a number of testable predictions with implications for biofilm initiation. Genetic modification of *E. coli* can alter run-and-tumble dynamics [75]. *E. coli* modified in this way is predicted to have markedly different distributions within flowing films compared with unmutated samples. Likewise, different motile microbes, such as *Volvox*, are expected to reside at different points in the flowing film owing to their different swimming strategies. The fraction of swimmers at the no-slip wall compared with the number at the no-shear interface could be measured. Measuring such fractions as a function of flow rate would provide direct experimental verification of the predictions made here. The rate of biofilm initiation at the solid surface is expected to correlate with the fraction of swimmers at the wall, and so our work suggests a non-monotonic dependence of the initiation rate on the film flow velocity, with a maximum at moderate flow strengths.

## Author contributions

All authors contributed to conceiving the study, interpreting the results and writing the paper. A.J.T.M.M. carried out the simulations and analytical calculations.

## Competing interests

We declare we have no competing interests.

## Funding

This work was supported through funding from the ERC Advanced grant no. (291234 MiCE) and we acknowledge EMBO funding to T.N.S. (ALTF181-2013).

- Received October 27, 2015.
- Accepted January 11, 2016.

- © 2016 The Author(s)

Published by the Royal Society. All rights reserved.