## Abstract

Motility is a fundamental survival strategy of bacteria to navigate porous environments, where they mediate essential biogeochemical processes in quiescent wetlands and sediments. However, a comprehensive understanding of the mechanisms regulating self-transport in the confined interstices of porous media is lacking, and determining the interactions between cells and surfaces of the solid matrix becomes paramount. Here, we precisely track the movement of bacteria (*Magnetococcus marinus*) through a series of microfluidic porous media with broadly varying geometries and show how successive scattering events from solid surfaces decorrelate cell motion. Ordered versus disordered media impact the cells’ motility over short ranges, but their large-scale transport properties are regulated by the cutoff of their persistent motility. An effective mean free path is established as the key geometrical parameter controlling cell transport, and we implement a theoretical model that universally predicts the effective cell diffusion for the diverse geometries studied here. These results aid in our understanding of the physical ecology of swimming cells, and their role in environmental and health hazards in stagnant porous media.

## Introduction

Bacterial communities are abundant in the stagnant waters of wetlands, including swamps, marshes, bogs, and fens, and they play a key role in biogeochemical cycles by functioning as both primary producers and decomposers^{1,2}. Most bacteria swim using thin, actuated flagella^{3,4}, and their resultant self-transport is vital to many of their ecological functions, especially in the stagnant porous sediments in which they live. In bulk fluid, bacteria swim in persistent random walk patterns^{5,6,7}, where otherwise straight-line swimming is decorrelated by flagellar-induced turns and Brownian rotational motion^{8}. However, natural habitats of swimming cells are often characterized by pores that can range in size from that of a single cell to many times larger^{9,10}. In these porous microenvironments, cell motility is further disrupted due to interactions with nearby solid surfaces^{11,12,13,14,15,16,17}. While there has been significant emphasis on understanding the physical origins of cell-surface interactions, a clear consensus of their net effect on the self-transport properties of swimming bacteria in porous media has not been established.

Hydrodynamic and steric forces^{18} can cause bacteria and sperm to bias their motility toward flat substrates^{19,20} and curved obstacles^{21}, and flagellar contact mediates both plankton^{22,23} and bacterial tumbling^{24,25,26} near surfaces. The importance of such boundary-induced reorientation on swimmer migration through porous media has been illustrated by simulations and modeling of individual microswimmer dynamics^{15,27,28,29,30}. In particular, their reorientation dynamics upon contacting a surface (e.g., sliding versus specular reflection) are predicted to have a significant impact on their effective diffusion coefficients^{15}. Recent experiments on bacterial self-transport in disordered 3D packed beds show that small pores comparable to the bacterial body size (≈1–10 μm) result in a cage-hopping behavior between pores^{31}. Measurements of swimming microalgae in ordered microfluidic lattices with larger pores established that increasing the density of solid obstacles reduces the effective diffusion of the cells^{32}. Other diverse transport behaviors have been reported ranging from simulations showing directional locking in ordered media^{33} to experiments demonstrating subdiffusive transport of synthetic active particles in random media^{28}. Determining the pervasiveness of these transport phenomena, and in some cases their applicability to biological microswimmers remains challenging due to the vast landscape of potential pore geometries and swimmer behaviors.

The random walk behavior of swimming cells and active particles has motivated a number of diffusive models for transport in crowded environments^{15,27,28,29,30,34}, many of which are particular to specific propulsion mechanisms, cell-surface interactions, and pore microstructures^{35}. An overarching assumption in describing swimming cell transport in porous media is that their persistent motility is truncated approximately to the mean pore size of the medium, which inspired a general modeling framework for swimmer transport based on gas diffusion^{12,36} and a search for the critical geometrical parameters of porous media that control swimmer behavior^{15,34}. However, these assumptions and models remain largely untested due to a lack of robust experimental measurements of cell trajectories and transport properties.

Here, we investigate the effect of porous microstructure on the self-transport of swimming bacteria (*Magnetococcus marinus*, strain MC-1) through thorough microfluidic experiments (Fig. 1a–f). MC-1 is a coccoid-shaped bacterium with a ≈1–2 μm diameter cell body that is propelled by a pair of flagellar bundles^{37}. High-fidelity cell tracking follows individual cells through ordered and disordered model porous media having a broad range of porosities and pore sizes that span natural cell environments^{9,10,38,39}. Direct measurements of cell motility and scattering angles from solid surfaces connect the micro-scale cell behavior to their large-scale transport coefficients. We show how the persistent random walks of the cells are broken by the porous microstructure, reducing the effective diffusion coefficients across all geometries. From these extensive experimental results, an effective mean free path emerges as a fundamental length scale of the porous media^{12,15,34}, which enables the accurate prediction of cell transport coefficients through a simple statistical model.

## Results

### Cell trajectories rapidly decorrelate despite short-time pore-scale guidance

The long, meandering trajectories of swimming bacteria in bulk fluid (Fig. 1a) are drastically altered by interactions with porous microstructure (Fig. 1b–f). Upon collisions with pillars, cell swimming directions change abruptly (Fig. 1b–f), which leads to highly tortuous swimming paths in random media (Fig. 1c). However, in ordered media, cells can briefly follow paths aligned with the lattice structure (Fig. 1b). Beyond the effects of disorder, the observed random walks qualitatively appear to be diminished or exacerbated as porosity and feature scale vary (Fig. 1d–f), leading to a vast parameter space whose impact on bacterial transport remains poorly understood. These fundamental microstructural parameters were systematically varied (Table 1) to determine their impact on the short- and long-time transport properties of swimming bacteria. For short times, relative to their bulk persistence time (*τ*_{p,0} = 4.6 s), the probability of the cell swimming direction averaged over 1 s, *p*(〈*ϕ*〉_{1s}), is homogeneous in open space (Fig. 1g, i) indicating that the cells swim in random directions (Fig. 1a). However, in ordered media, peaks in the orientation distribution emerge for sufficiently low porosities (Fig. 1g), which indicate that the bacteria align with the hexagonal lattice directions. This short-time guiding effect in ordered media is not dictated solely by porosity as it requires sufficiently small scale of the pore features (Fig. 1h). While alignment to the local pore structures may persist in random media, the swimming directions remain homogeneous across all porosities examined (Fig. 1i) by virtue of the random orientation of pores and throats.

Despite the observed sensitivity of the short-time swimming direction to the geometry, cells randomize their swimming direction after a finite persistent time, *τ*_{p}. For all the inspected geometries, the correlation functions of the swimming direction exponentially decay, according to \(C(t)=\langle {{{{{{{\bf{p}}}}}}}}(t+{t}_{0})\cdot {{{{{{{\bf{p}}}}}}}}({t}_{0})\rangle ={e}^{-t/{\tau }_{p}}\) (Fig. 2a), where **p** is a unit vector describing the instantaneous cell swimming direction, obtained from their reconstructed trajectories. Strikingly, the combined effects of the intrinsic noise in the swimmer orientation (Fig. 2a, open) and discrete scattering encounters with the microstructure are simply characterized by a single decorrelation rate of the swimming direction, 1/*τ*_{p}. As the porosity is decreased, the rate of such encounters is increased and the swimming direction of the cells decorrelates faster (Fig. 2a). Taken together, these observations suggest that the pore size—rather than porosity, feature size scale, or the geometric order alone—regulates bacterial self transport (Supplementary Fig. 3). A microscopic viewpoint is required to fully understand how bacterial encounters with solid surfaces modify their trajectories and regulate the decorrelation process.

### Bacterial scattering is independent of pillar size and cell swimming speed

Robust cell trajectories from experiments enable us to quantify the bacterial scattering angle upon collision with a pillar surface (Fig. 2b). Focusing on hexagonal lattices, cell collisions with individual pillars were identified by defining an impact region within 2.5 μm from the pillar surface (comparable to the cell size). From the cell trajectories, the incident, *θ*_{in}, and outgoing, *θ*_{out}, angles of the cells relative to the pillar surface normal (Fig. 2b) were measured^{23} by fitting straight lines to the cell position over seven frames just prior to entering and just after exiting the impact region, respectively. The scattering angle, *α*, characterizes the total change in cell orientation angle due to a collision with a pillar (Fig. 2b) and empirically appears to depend on their relative incident angles, *θ*_{in}, prior to impact (Fig. 2c). While body shape and flagellation can impact cell interactions with surfaces^{40}, ultimately, the statistics of the net bacterial scattering angle from an obstacle encapsulate the details of the hydrodynamic and steric interactions^{15} and are a primary determinant of transport^{8}. Our results show that, when a cell approaches a pillar surface at a glancing, tangent angle (*θ*_{in} ≈ 90^{∘}), the cell’s orientation generally exhibits little change, and it leaves the surface oriented in approximately the same direction compared to its incident angle (*α* ≈ 0^{∘}; Fig. 2c). However, when a bacterium approaches perpendicular to the pillar surface (*θ*_{in} ≈ 0^{∘}), it is strongly scattered with a significant reorientation of the cell trajectory (*α* ≈ 120^{∘}). The scattering angle decreases approximately linearly with incident angle (Fig. 2c), and the scattering properties likely vary across microbial species due to flagellation, swimming style, and body shape and size^{23}. The cell scattering measurements were performed in situ across all pillar diameters tested (Table 1) and three different cell swimming speed ranges (Supplementary Fig. 1). Ultimately, the ensemble average scattering angle, \(\tilde{\alpha }\), for the bacteria studied here was found to be independent of both the pillar diameter and the cell swimming speed (Fig. 2d). These measurements not only illustrate how cell scattering from pillar surfaces acts as the primary decorrelation mechanism in porous media, but also provide key quantitative scattering statistics necessary to model cell transport in such microstructured environments.

### Porous microstructure hinders cell transport

In order to quantify the effects of porous media on the transport properties of swimming bacteria, we analyze the mean squared displacements (MSDs) of the cells across a wide range of pore structures. For short times (*t* ≪ *τ*_{p}), the MSDs universally overlap and grow as ~*t*^{2} due to ballistic cell swimming motility, prior to scattering from pillars or reorienting due to flagellar noise and rotational Brownian motion (Fig. 3). The MSD scaling eventually transitions to ~*t* at large times (*t* ≫ *τ*_{p}) for all geometries, which indicates diffusive transport and stems from the decorrelation of the cell swimming trajectories (Fig. 2a). The MSDs from the measured 2D swimming cell trajectories are well characterized by an analytical fit (see “Methods”; Fig. 3a–c, dashed black curves)^{35,41,42}, which provides the effective translational diffusion coefficient, *D*, as well as the persistent swimming time, *τ*_{p}, of the cells (Fig. 4). The persistence times measured using this method closely correspond to those measured from the exponential decay of the swimming direction correlation functions, confirming the robustness of the analysis (Supplementary Fig. 2). While the MSDs of the swimming cells coincide for short times, a decrease in the porosity or scale decreases the size of the pore space and causes a more rapid decorrelation of cell motility. This effect is indicated by the earlier transition time of the MSD slope and accompanied by a decreased growth rate of the MSDs for *t* ≫ *τ*_{p}. These observations are universal across all geometries and bacterial swimming speed ranges (Fig. 3) and indicate that the porous microstructure hinders the diffusive transport of the cells, even in the ordered hexagonal geometries that promote short-time preferential swimming directions (Fig. 1g, h).

### Effective pore size sets the effective cell diffusion

The effective cell diffusion coefficients decrease markedly by more than 500% across the porous geometries investigated (Supplementary Fig. 4). For their persistent random walk in 2D, the long-time diffusion coefficient of the cells is \(D={V}_{s}^{2}{\tau }_{p}/2\), which can alternatively be expressed in terms their persistent swimming length *l*_{p} = *V*_{s}*τ*_{p} as *D* = *V*_{s}*l*_{p}/2 (Supplementary Fig. 5). Accordingly, cell populations with higher swimming speeds exhibit higher diffusion coefficients across all of the geometries examined (Supplementary Fig. 4). Swimming speed, *V*_{s}, is an intrinsic property of the cells and does not vary with changes in geometry. However, the bulk persistent swimming length, *l*_{p,0} = *V*_{s}*τ*_{p,0}, sets a length scale below which we expect the porous media to dictate *l*_{p} (Fig. 4a; Supplementary Fig. 3). Our experiments clearly illustrate that ordered versus disordered porous media only marginally affect bacterial transport coefficients (Fig. 4a, Supplementary Fig. 4). Therefore, the effective pore size is the key parameter in determining the persistent swimming length (Fig. 4a) and transport coefficients (Supplementary Fig. 4) of the cells, rather than the porosity, scale, or order of the media alone.

Apart from random reorientations due to Brownian rotation and self-propulsion noise, motile bacteria in porous media generally swim in straight trajectories prior to interacting with a solid surface. The mean pore size, *d*_{p}, is a common geometric measure of the typical distance between such surfaces, and it is often quantified by the mean of the largest circle diameter, *d*_{p}, that can be inscribed in the void space (Table 1; “Methods”)^{43,44,45,46}. As the mean pore size decreases, reorientations due to cell-surface interactions becomes more prominent and decrease the measured persistent swimming length (Fig. 4a) and time (Supplementary Fig. 3). While the persistence length might be expected to be governed by *l*_{p} = *d*_{p} (Fig. 4a, dashed line), cells with higher swimming speeds exhibit persistence lengths that greatly exceed the pore size, especially for larger *d*_{p}. In the case of highly porous materials with large *d*_{p}, the probability of interacting with a small obstacle, *d*, compared to a relatively large obstacle separation, *c*, diminishes, allowing cells to transit multiple pores before scattering. Thus, we introduce an alternative characteristic length scale, stemming solely from the porous media geometry.

The effective mean free path, *l*_{f}, is defined here as the average value of randomly-sampled, theoretical straight paths between circular obstacles (Fig. 4c, d; see also Supplementary Methods), and it is akin to swimming cell trajectories with high persistence. The effective mean free path relative to the mean pore size increases monotonically with *c*/*d*, and *l*_{f}/*d*_{p} > 1 for both the ordered and disordered media explored here under a range of surface scattering conditions (Fig. 4e; see also Supplementary Methods).

While related metrics have been proposed separately in theoretical^{15} and simulation^{34} works their relevance across disorder, scale, and porosity is not known, nor have they been rigorously vetted through experiments. Related to the mean free path, the maximal chord length of 3D media has been used to accurately describe the transport of active polymers in simulations, but only for disordered media with relatively low porosity^{34}. Separately, the Santalo equation, *π**A*/*P*, describes the theoretical mean free path (void area, *A*; wetted perimeter, and *P*). However, it strictly applies only for reflective surface scattering^{47}, and its applicability has only been explored in theoretical studies of swimmers in 2D ordered media^{15}. Despite the formal restrictions on this expression, a comparison of the measured *π**A*/*P* for our ordered and disordered media empirically shows very good agreement with our computed *l*_{f} (Supplementary Fig. 6). This provides a simple approach to quantify the effective mean free path, and thus, we take *l*_{f} = *π**A*/*P* going forward for both the ordered and disordered media studied here. Below, we show that *l*_{f} is an intuitive quantity that is adept at describing and predicting the transport of swimming cells in porous media (Fig. 4b, f).

### Additive decorrelation rates dictate the self-transport in porous media

Based on classic models for gas diffusion^{36}, a general statistical framework for modeling the decorrelation of cell motility in porous media has been suggested^{12}, but not rigorously explored experimentally. Here, we reinterpret this model through the lens of our extensive experimental measurements: The effective mean free path is established as the relevant length scale that regulates the decorrelation of bacterial motility and thus their large scale transport in porous media. The total decorrelation rate of the bacterial swimming direction in porous media arises from the sum of two independent processes:

The first process is the natural decorrelation rate, 1/*τ*_{p,0}, due to rotational Brownian diffusion and flagellar noise, which is related to the effective diffusion coefficient and persistence length in the bulk by \({D}_{0}={V}_{s}^{2}{\tau }_{p,0}/2={V}_{s}{l}_{p,0}/2\), and measured directly from experiments (Fig. 4f). The second process stems from bacterial scattering events due to interactions with solid surfaces:

It is mathematically equivalent to a run-and-tumble random walk^{8} and depends upon the cell swimming speed, *V*_{s}, and the average surface scattering angle, \(\langle \cos (\alpha )\rangle\). Both of these parameters are measured directly from experiments, where we previously showed that the scattering statistics are independent of obstacle size (Fig. 2). This decorrelation rate is also a strong function of the effective pore size of the media, *l*_{m}, which dictates the typical distance that a cell can swim unimpeded. The resulting effective diffusion coefficient, *D*, is thus expressed as

shown in normalized form in Fig. 4b (dashed line).

The mean pore size is a typical choice for the relevant physical length scale of the media, *l*_{m} = *d*_{p}: Indeed, it yields a partial collapse of the data (Fig. 4b, gray markers) and is captured by the model (Eq. (1)) at small pore sizes, where cell-surface interactions are frequent. However, this local measure fails to predict effective diffusivity for relatively larger pore sizes. In highly porous environments, motile cells can travel several pores prior to interacting with small or sparse obstacles. Rather, the effective mean free path, *l*_{f}, computed purely from the geometry of the medium (Fig. 4c–e), provides a more relevant physical length scale, especially for swimmers with high bulk persistence (*l*_{p,0} ≥ *d*_{p}). Choosing the effective pore size as *l*_{m} = *l*_{f} shows excellent quantitative agreement of the model with experiments across the broad ranges of porosities, pore sizes, order/disorder, and cell swimming speeds examined (Fig. 4b, colored markers; Fig. 4f). Thus, these results establish a comprehensive framework for predicting the transport coefficients of swimming cells in porous media with minimal parameters, including: (i) the cell motility in bulk fluid, *V*_{s} and *τ*_{p,0}, (ii) the average cell deflection from solid surfaces, \(\langle \cos (\alpha )\rangle\), and (iii) the effective mean free path of the porous medium geometry, *l*_{f}.

## Discussion

Our thorough microfluidic experiments illustrate how porous microstructure universally hinders the effective diffusion of the swimming bacteria MC-1, and they establish the essential parameters required to model and predict cell transport in stagnant saturated porous media. Varying the geometry, including porosity, scale, and disorder, revealed that the reduction of persistence length is the key mechanism hindering transport, and the effective mean free path of the medium (Fig. 4c–e) is the primary geometric scale that dictates bacterial transport coefficients. Precise measurements of cell-surface interactions were crucial to understanding long-time transport by revealing that MC-1 scattering is independent of pillar diameter. Subsequent scattering events reduced the effective cell diffusion coefficients, whereby the fastest cells experienced the most significant reduction as predicted by a modified Bosanquet model^{12}. The agreement of this model with extensive experimental evidence illustrates a reliable approach to forecast cell transport properties in porous media. Together with other recent works, our results solidify the effective mean free path as the critical length scale governing cell transport^{15,34}. With no fitting parameters, this model only requires knowledge of the cell swimming speed, bulk persistence time, mean surface scattering angle, and the effective mean free path, each of which are easily measured or calculated.

Microbes display a host of different behaviors mediated by steric, hydrodynamic, and flagellar interactions with surfaces, including a surprising bouncing-like motion in the case of MC-1 and MO-1^{16}. A natural extension of the present work will be to determine how the transport of diverse microbial species with unique swimming strategies and surface behaviors^{17} are affected by porous microstructure through the framework established here. While our results for MC-1 are highly consistent with recent models of strongly scattering active swimmers in porous media^{15}, previous simulations in ordered media have reported enhanced transport along preferential swimming directions in the case of weak surface scattering and strong persistence^{15,33}. We envision that the approach described here may be used to investigate a range of micro-swimmers with different surface scattering properties in combination with various ordered geometries and pillar shapes to determine the precise conditions under which preferential swimming paths might form and amplify transport. The effect of directed motility on cell transport through porous microstructures is highly relevant to microbial ecology in sediments and soils, and this approach may provide new insights into magnetotaxis^{48} and chemotaxis^{49} in porous media. Although the present experiments and modeling were restricted to quasi-2D microfluidic geometries, recently developed experimental approaches^{50} could extend this work to model the naturally occurring 3D environments of swimming microbes.

## Methods

### Cell culturing

*Magnetococcus marinus* (strain MC-1) were grown in a semi-solid medium as previously described^{37,51}. A stock solution was prepared containing the following chemicals and solutions per liter: NaCl, 16.43 g; MgCl_{2} ⋅ 6H_{2}O, 3.5 g; Na_{2}SO_{4}, 2.8 g; KCl, 0.5 g; CaCl_{2} ⋅ 2H_{2}O, 1 g; HEPES, 2 g; NH_{4}Cl, 0.3 g; Wolfe’s mineral elixir^{52}, 5 mL; 0.2% (w/v) aqueous resazurin, 0.6 mL; 0.01 M FeSO_{4}, 3 mL; 0.5 M KHPO_{4} buffer with pH 6.9, 1.8 mL. The pH of the premade stock solution was adjusted to 7.0 using a 5% (w/v) NaOH solution, 1.6 g of noble agar (Difco) was added and mixed, and the stock solution was autoclaved, which fully dissolved the agar. After autoclaving, the stock solution was allowed to cool to approximately 45^{ ∘}C. The following solutions and chemicals were then added to the stock solution (per liter) to make the final cell growth medium: L-cysteine hydrate, 400 mg; vitamin solution^{52}, 0.65 mL; 40% sodium thiosulfate pentahydrate solution (i.e., 10 mM of energy source), 5.6 mL; and 0.8 M NaHCO_{3} (autoclaved dry; sterile water added after autoclaving to make the fresh stock solution), 2.8 mL.

For cell cultures, 10 mL of the medium was dispensed into sterile, 15 mm diameter and 125 mm long screw-capped autoclaved glass test tubes. The glass tubes with the medium were tightly capped and refrigerated over night allowing the agar to semi-solidify. During this time, the L-cysteine reduced the oxygen in the medium and formed an oxygen gradient relative to the air trapped at the top of the tube. The oxic-anoxic interface was evident by the transition from a pink hue to a transparent medium. 100 μL of cells from a previous culture was pipetted at the oxic-anoxic interface to inoculate the medium. All cultures were incubated at room temperature, and after approximately three days, a microaerobic band of bacteria formed at the oxic-anoxic interface of the tubes. For the microfluidic experiments, the cells were re-suspended in a swimming medium that is similar to the growth medium, except that it does not contain agar, HEPES, resazurin, vitamins, L-cysteine, and NaHCO_{3}.

### Microfluidic devices and experiments

Model porous microfluidic devices were fabricated using standard soft-lithography techniques^{53}. The devices consisted of circular pillars in otherwise rectangular cross-section channels with various pillar arrangements (hexagonal order or random disorder), porosities, and sizes (Fig. 1a–f and Table 1). The devices had an inlet and an outlet to fill the chambers with swimming media and bacteria. In the ordered porous media, two different approaches were used to vary the lattice constant (*c*) and the pillar diameters (*d*): (i) varying the porosity (*σ* = 0.90, 0.81, 0.69, 0.55, 0.37) by keeping the lattice spacing constant (*c* = 120 μm) and changing the pillar diameters (*d* = 40, 55, 70, 85, 100 μm), and (ii) varying the scale (*s* = 0.5, 0.75, 1, 1.5, 2) by scaling all the dimensions up or down (*c* = 60, 90, 120, 180, 240 μm) at a constant porosity (*σ* = 0.55). The disordered porous media were generated by randomly displacing the cylindrical pillar locations from an originally hexagonal lattice. The new pillar locations were randomly sampled inside a hexagon with a circumradius of 0.9*c* centered at the original pillar location^{54}. Because this approach allows for overlapping pillars, the statistical properties of the resulting porous geometries were computed directly from computer-generated pillar arrangements using MATLAB. Specifically, for both the ordered and disordered media, the mean lattice spacing (*c*) and pore size (*d*_{p}), were measured using Delaunay triangulation, while the porosity (*σ*), void area (*A*), and wetted perimeter (*P*) were measured using polyshape objects. Standard theoretical relations for the ordered hexagonal media (non-overlapping) served to benchmark this approach (e.g., \({d}_{p}=2c/\sqrt{3}-d\)) and were in excellent agreement with measured values (see Table 1).

For experiments, five different patches of pillar arrangements (2.6-mm long each) were located inside of a main channel having a total length of 25 mm, width of 2.2 mm, and depth of 10 μm. The channel depth was approximately one order of magnitude larger that the cell body size to ensure that cell interactions with obstacles were not artificially screened. Open spaces devoid of pillars (*σ* = 1) were located near the inlet and outlet of the channel for control experiments. The devices were filled with swimming media, and the channel outlet was subsequently sealed with wax to eliminate residual flows. 1 μL of cell suspension was taken from the oxic-anoxic transition interface of the glass culture tube, and pipetted into the channel inlet. North-seeking magnetotactic cells were guided into the channel using a hand held magnet, until the cell concentration reached about 50–100 cells/mm^{2} by visual inspection. The remaining cells at the inlet were removed via pipette to avoid changes in cell concentration during the experiment.

### Cell imaging and tracking

Imaging was performed at the center of each porous section (far from the side walls) within the main channel, as well as in the open channel section devoid of porous geometry (*σ* = 1). Cells were imaged using phase-contrast microscopy on an inverted microscope (Nikon Ti-E) with a ×4 magnification objective (0.13 NA). For each porous geometry, a 3600 frame video was recorded at 45 fps (5MP; Blackfly S camera, FLIR). This optical arrangement provided a large depth of focus relative to the channel depth and reduced light scattering around cylindrical pillars; it also enabled robust tracking of the ≈1 μm diameter bacteria throughout the depth of the microfluidic device and during collisions with pillar walls. Bacteria were tracked using a custom Kalman filter particle tracking algorithm (MATLAB, MathWorks)^{55}, yielding ≈ 2000 cell trajectories per video.

### Statistical analysis of cell transport

The swimming speed of individual cells varies widely among the cell population and is in the range of 20 ≤ *V*_{s} ≤ 110 μm/s (Supplementary Fig. 1), where *V*_{s} is the mean swimming speed of a single cell averaged over its trajectory. Variations in the distribution of cell swimming speed significantly affect the perceived transport coefficients due to the strong dependence on *V*_{s}. For example, the effective diffusion coefficient that characterizes the random walk for swimming cells with a persistence time, *τ*_{p}, is \(D={V}_{s}^{2}{\tau }_{p}/2\). In order to isolate the effect of swimming speeds from the effects of porous microstructure on cell transport, cell trajectories were separated into three sub-populations (Supplementary Fig. 1) having relatively narrow swimming speed ranges: 20–50 μm/s, 50–80 μm/s, and 80–110 μm/s. We primarily focus on the cells with swimming speeds in the range of 50–80 μm/s, unless stated otherwise.

The time correlation function of the cell swimming direction was computed as *C*(*t*) = 〈**p**(*t* + *t*_{0}) ⋅ **p**(*t*_{0})〉, where **p** is a unit vector describing the instantaneous cell swimming direction obtained from their reconstructed trajectories. The correlation functions decay exponentially, \(C(t)={e}^{-t/{\tau }_{p}}\), marking the finite persistence time, *τ*_{p}, of their random walk motility (Fig. 2). Mean squared displacements (MSDs) were determined from cell trajectories by dividing tracks into non-overlapping, equal-time segments (*t*), and computed as \(MSD(t)=\langle {(x(t+{t}_{0})-x({t}_{0}))}^{2}+{(\,y(t+{t}_{0})-y({t}_{0}))}^{2}\rangle\). For a constant speed swimmer with a decorrelation rate 1/*τ*_{p}, the exact form of the MSD^{41} is \(MSD(t)=4D[t-{\tau }_{p}(1-{e}^{-t/{\tau }_{p}})]\) with \(D={V}_{s}^{2}{\tau }_{p}/2\). For simplicity, measured MSDs (Fig. 3) were fitted with the approximate form \(MSD(t)\approx 4Dt(1-{e}^{-t/2{\tau }_{p}})\), which is asymptotically equivalent for both short and long times^{42,56} (see also Supplementary Methods). Fitting yielded the effective diffusion coefficient, *D*, and the persistent time, *τ*_{p}, where the latter was in excellent agreement with *τ*_{p} measured from the correlation functions (Fig. 2 and Supplementary Fig. 2). The ensemble mean swimming speed, *V*_{s}, was computed by fitting the first 10 points of the MSDs in the ballistic regime (*t* ≤ 0.2 s), where \(MSD={V}_{s}^{2}{t}^{2}\).

### Reporting summary

Further information on research design is available in the Nature Portfolio Reporting Summary linked to this article.

## Data availability

The figure source data files generated in this study have been deposited in the Harvard Dataverse database https://doi.org/10.7910/DVN/XVWLJT. Other (raw) experimental data are available from the corresponding authors upon reasonable request.

## Code availability

The codes associated with figure source data generated in this study have been deposited in the Harvard Dataverse database https://doi.org/10.7910/DVN/XVWLJT. All other codes used in this study are available from the corresponding authors upon reasonable request.

## References

Upadhyay, A. K., Singh, N. K., Bankoti, N. S. & Rai, U. N. Designing and construction of simulated constructed wetland for treatment of sewage containing metals.

*Environ. Technol.***38**, 2691–2699 (2017).Singh, A., Singh, P., Wang, W. & Shrivastava, A. In

*Microbes Biology: Microbes in Wetland and Bioprospection of Microbes*(eds Upadhyay, A., Singh, R. & Singh, D.) 87–99 (Springer, 2020).Moens, S. & Vanderleyden, J. Functions of bacterial flagella.

*Crit. Rev. Microbiol.***22**, 67–100 (1996).Soutourina, O. A., Semenova, E. A., Parfenova, V. V., Danchin, A. & Bertin, P. Control of bacterial motility by environmental factors in polarly flagellated and peritrichous bacteria isolated from Lake Baikal.

*Appl. Environ. Microbiol.***67**, 3852–3859 (2001).Berg, H. C. & Brown, D. A. Chemotaxis in

*Escherichia coli*analysed by three-dimensional tracking.*Nature***239**, 500–504 (1972).Polin, M., Tuval, I., Drescher, K., Gollub, J. P. & Goldstein, R. E. Chlamydomonas swims with two gears.

*Science***325**, 487–490 (2009).Taktikos, J., Stark, H. & Zaburdaev, V. How the motility pattern of bacteria affects their dispersal and chemotaxis.

*PLoS ONE***8**, e81936 (2013).Berg, H. C.

*Random Walks in Biology*2nd edn (Princeton University Press, 1993).Minagawa, H. et al. Characterization of sand sediment by pore size distribution and permeability using proton nuclear magnetic resonance measurement.

*J. Geophys. Res. Solid Earth***113**, B07210 (2008).Yamamoto, T. & Turgut, A. Acoustic wave propagation through porous media with arbitrary pore size distributions.

*J. Acoust. Soc. Am.***83**, 1744–1751 (1988).Lanning, L. M. & Ford, R. M. Glass micromodel study of bacterial dispersion in spatially periodic porous networks.

*Biotechnol. Bioeng.***78**, 556–566 (2002).Ford, R. M. & Harvey, R. W. Role of chemotaxis in the transport of bacteria through saturated porous media.

*Adv. Water Resour.***30**, 1608–1617 (2007).Rismani Yazdi, S., Nosrati, R., Stevens, C. A., Vogel, D. & Escobedo, C. Migration of magnetotactic bacteria in porous media.

*Biomicrofluidics***12**, 011101 (2018).Bertrand, T., Zhao, Y., Bénichou, O., Tailleur, J. & Voituriez, R. Optimized diffusion of run-and-tumble particles in crowded environments.

*Phys. Rev. Lett.***120**, 198103 (2018).Jakuszeit, T., Croze, O. A. & Bell, S. Diffusion of active particles in a complex environment: role of surface scattering.

*Phys. Rev. E***99**, 012610 (2019).Zhang, S. D. et al. Swimming behaviour and magnetotaxis function of the marine bacterium strain MO-1.

*Environ. Microbiol. Rep.***6**, 14–20 (2014).Tokárová, V. et al. Patterns of bacterial motility in microfluidics-confining environments.

*Proc. Natl. Acad. Sci. USA***118**, e2013925118 (2021).Lauga, E. & Powers, T. R. The hydrodynamics of swimming microorganisms.

*Reports Prog. Phys.***72**, 096601 (2009).Rothschild, L. Non-random distribution of bull spermatozoa in a drop of sperm suspension.

*Nature***198**, 1221–1222 (1963).Berke, A. P., Turner, L., Berg, H. C. & Lauga, E. Hydrodynamic attraction of swimming microorganisms by surfaces.

*Phys. Rev. Lett.***101**, 038102 (2008).Sipos, O., Nagy, K., Di Leonardo, R. & Galajda, P. Hydrodynamic trapping of swimming bacteria by convex walls.

*Phys. Rev. Lett.***114**, 258104 (2015).Kantsler, V., Dunkel, J., Blayney, M. & Goldstein, R. E. Rheotaxis facilitates upstream navigation of mammalian sperm cells.

*Elife***3**, e02403 (2014).Contino, M., Lushi, E., Tuval, I., Kantsler, V. & Polin, M. Microalgae scatter off solid surfaces by hydrodynamic and contact forces.

*Phys. Rev. Lett.***115**, 258102 (2015).Li, G. & Tang, J. Accumulation of microswimmers near a surface mediated by collision and rotational Brownian motion.

*Phys. Rev. Lett.***103**, 078101 (2009).Molaei, M., Barry, M., Stocker, R. & Sheng, J. Failed escape: solid surfaces prevent tumbling of

*Escherichia col*i.*Phys. Rev. Lett.***113**, 068103 (2014).Kühn, M. J., Schmidt, F. K., Eckhardt, B. & Thormann, K. M. Bacteria exploit a polymorphic instability of the flagellar filament to escape from traps.

*Proc. Natl. Acad. Sci. USA***114**, 6340–6345 (2017).Chepizhko, O. & Peruani, F. Diffusion, subdiffusion, and trapping of active particles in heterogeneous media.

*Phys. Rev. Lett.***111**, 160604 (2013).Morin, A., Desreumaux, N., Caussin, J. B. & Bartolo, D. Distortion and destruction of colloidal flocks in disordered environments.

*Nat. Phys.***13**, 63–67 (2017).Weber, A. et al. Rectification of bacterial diffusion in microfluidic labyrinths.

*Front. Phys.***7**, 148 (2019).Dhar, A., Burada, P. S. & Sekhar, G. P. Hydrodynamics of active particles confined in a periodically tapered channel.

*Phys. Fluids***32**, 102005 (2020).Bhattacharjee, T. & Datta, S. S. Confinement and activity regulate bacterial motion in porous media.

*Soft Matter***15**, 9920–9930 (2019).Brun-Cosme-Bruny, M., Bertin, E., Coasne, B., Peyla, P. & Rafaï, S. Effective diffusivity of microswimmers in a crowded environment.

*J. Chem. Phys.***150**, 104901 (2019).Reichhardt, C. & Reichhardt, C. J. Directional locking effects for active matter particles coupled to a periodic substrate.

*Phys. Rev. E***102**, 042616 (2020).Kurzthaler, C. et al. A geometric criterion for the optimal spreading of active polymers in porous media.

*Nat. Commun.***12**, 7088 (2021).Bechinger, C., Leonardo, R. D., Reichhardt, C. & Volpe, G. Active particles in complex and crowded environments.

*Rev. Mod. Phys.***88**, 045006 (2016).Pollard, W. G. & Present, R. D. On gaseous self-diffusion in long capillary tubes.

*Phys. Rev.***73**, 762–774 (1948).Bazylinski, D. A. et al.

*Magnetococcus marinus*gen. nov., sp. nov., a marine, magnetotactic bacterium that represents a novel lineage (*Magnetococcaceae*fam. nov.,*Magnetococcales*ord. nov.) at the base of the Alphaproteobacteria.*Int. J. Syst. Evol. Microbiol.***63**, 801–808 (2013).Al-Raoush, R. I. & Willson, C. S. Extraction of physically realistic pore network properties from three-dimensional synchrotron X-ray microtomography images of unconsolidated porous media systems.

*J. Hydrol.***300**, 44–64 (2005).Schnaar, G. & Brusseau, M. L. Characterizing pore-scale dissolution of organic immiscible liquid in natural porous media using synchrotron X-ray microtomography.

*Environ. Sci. Technol.***40**, 6622–6629 (2006).Wysocki, A., Elgeti, J. & Gompper, G. Giant adsorption of microswimmers: duality of shape asymmetry and wall curvature.

*Phys. Rev. E***91**, 050302 (2015).Martens, K., Angelani, L., Di Leonardo, R. & Bocquet, L. Probability distributions for the run-and-tumble bacterial dynamics: An analogy to the Lorentz model.

*Eur. Phys. J. E***35**, 84 (2012).Patteson, A. E., Gopinath, A., Goulian, M. & Arratia, P. E. Running and tumbling with

*E. coli*in polymeric solutions.*Sci. Rep.***5**, 15761 (2015).Bhattacharya, S. & Gubbins, K. E. Fast method for computing pore size distributions of model materials.

*Langmuir***22**, 7726–7731 (2006).Roozbahani, M. M., Borela, R. & Frost, J. D. Pore size distribution in granular material microstructure.

*Materials***10**, 1237 (2017).Chiang, M. Y. et al. Local thickness and anisotropy approaches to characterize pore size distribution of three-dimensional porous networks.

*Tissue Eng. - Part C Methods***15**, 65–76 (2009).Nishiyama, N. & Yokoyama, T. Permeability of porous media: role of the critical pore size.

*J. Geophys. Res. Solid Earth***122**, 6955–6971 (2017).Chernov, N. Entropy, Lyapunov exponents, and mean free path for billiards.

*J. Stat. Phys.***88**, 1–29 (1997).Waisbord, N., Dehkharghani, A. & Guasto, J. S. Fluidic bacterial diodes rectify magnetotactic cell motility in porous environments.

*Nat. Commun.***12**, 5949 (2021).de Anna, P., Pahlavan, A. A., Yawata, Y., Stocker, R. & Juanes, R. Chemotaxis under flow disorder shapes microbial dispersion in porous media.

*Nat. Phys.***17**, 68–73 (2021).Bhattacharjee, T. & Datta, S. S. Bacterial hopping and trapping in porous media.

*Nat. Commun.***10**, 2075 (2019).Waisbord, N., Lefèvre, C. T., Bocquet, L., Ybert, C. & Cottin-Bizonne, C. Destabilization of a flow focused suspension of magnetotactic bacteria.

*Phys. Rev. Fluids***1**, 053203 (2016).Frankel, R. B., Bazylinski, D. A., Johnson, M. S. & Taylor, B. L. Magneto-aerotaxis in marine coccoid bacteria.

*Biophys. J.***73**, 994–1000 (1997).Whitesides, G. M. The origins and the future of microfluidics.

*Nature***442**, 368–73 (2006).Dehkharghani, A., Waisbord, N., Dunkel, J. & Guasto, J. S. Bacterial scattering in microfluidic crystal flows reveals giant active Taylor - Aris dispersion.

*Proc. Natl. Acad. Sci. USA***116**, 11119–11124 (2019).Kalman, R. E. A new approach to linear filtering and prediction problems.

*J. Fluids Eng. Trans. ASME***82**, 35–45 (1960).Wu, X.-l & Libchaber, A. Particle diffusion in a quasi-two-dimensional bacterial bath.

*Phys. Rev. Lett.***84**, 3017–3020 (2000).

## Acknowledgements

We thank Thomas Coons for assistance with preliminary experiments. This work was supported by National Science Foundation awards CBET-1511340, CAREER-1554095, CBET-1701392, OCE-1829827, and CMMI-2027410 (to J.S.G.), and MicroMix MSCA-IF-898575 (to N.W.).

## Author information

### Authors and Affiliations

### Contributions

A.D., N.W., and J.S.G. designed the research, developed theoretical analysis, analyzed the experimental data, and wrote the paper. A.D. performed the experiments.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declare no competing interests.

## Peer review

### Peer review information

*Communication Physics* thanks the anonymous reviewers for their contribution to the peer review of this work.

## Additional information

**Publisher’s note** Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Supplementary information

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons license, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons license, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons license and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this license, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

Dehkharghani, A., Waisbord, N. & Guasto, J.S. Self-transport of swimming bacteria is impaired by porous microstructure.
*Commun Phys* **6**, 18 (2023). https://doi.org/10.1038/s42005-023-01136-w

Received:

Accepted:

Published:

DOI: https://doi.org/10.1038/s42005-023-01136-w

## Comments

By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.