A multiphase theory for spreading microbial swarms and films

Bacterial swarming and biofilm formation are collective multicellular phenomena through which diverse microbial species colonize and spread over water-permeable tissue. During both modes of surface translocation, fluid uptake and transport play a key role in shaping the overall morphology and spreading dynamics. Here we develop a generalized two-phase thin-film model that couples bacterial growth, extracellular matrix swelling, fluid flow, and nutrient transport to describe the expansion of both highly motile bacterial swarms, and sessile bacterial biofilms. We show that swarm expansion corresponds to steady-state solutions in a nutrient-rich, capillarity dominated regime. In contrast, biofilm colony growth is described by transient solutions associated with a nutrient-limited, extracellular polymer stress driven limit. We apply our unified framework to explain a range of recent experimental observations of steady and unsteady expansion of microbial swarms and biofilms. Our results demonstrate how the physics of flow and transport in slender geometries serve to constrain biological organization in microbial communities.


Introduction
Bacteria employ sophisticated surface translocation machinery to actively swarm, twitch, glide or slide over solid surfaces (Kearns, 2010;Mattick, 2002;Spormann, 1999;Hö lscher and Kovács, 2017). Collectively, they also aggregate into multicellular communities on hydrated surfaces and exhibit large-scale coordinated movement (Verstraeten et al., 2008). Surface motility in macroscopic colonies on hydrated surfaces such as gels occurs primarily via two distinct modes: either by rapid flagella-mediated swarming expansion (Harshey, 1994;Harshey, 2003), or alternatively by slow biofilm expansion driven by extracellular polymer matrix production (Hall-Stoodley et al., 2004). In both cases, an interplay between mechanical constraints and biological organization sets limits on the overall colony morphology and expansion dynamics (Persat et al., 2015). The forces driving colony expansion are generated by non-homogeneous patterns of biological activity, originating from spatial localizations in cell growth and division (Hamouche et al., 2017), extracellular polymer matrix production (Seminara et al., 2012;Yan et al., 2017;Srinivasan et al., 2018), osmolyte secretion (Ping et al., 2014) and active stresses (Farrell et al., 2013;Delarue et al., 2016). Conversely, the formation of localized biologically active zones is tightly coupled to the heterogeneity of the environment, including the diffusion and transport of nutrients (Wang et al., 2017), accumulation of metabolic by-products (Liu et al., 2015;Gozzi et al., 2017) and presence of quorum sensing and signaling agents that regulate cell-differentiation and development.
Consequently, the dynamics of colony growth requires a mechanistic description that accounts for spatiotemporal inhomogeneities in biological activity, emergent forces, and flows that transport metabolic agents. In bacterial swarming, cells within the colony are actively propelled by the rotation of flagella in a thin layer of fluid extracted from the underlying soft tissue or gel (Kearns, 2010). In contrast, bacterial biofilms are surface aggregates of sessile bacteria embedded in a self-generated extracellular polymer matrix (Flemming and Wingender, 2010). Despite marked differences in regulatory genetic pathways, morphology and cell function (Verstraeten et al., 2008), physical characteristics such as the fluidization of the substrate/tissue, gradients in nutrient availability, the low-aspectratio geometry and the existence of multiple phases (i.e. cells, biopolymer and fluid) are common to both bacterial film and swarm colonies. Motivated by these similarities, we present a unified multiphase framework that couples mechanics, hydrodynamics and transport to explain the dynamics of bacterial swarm and film expansion.

Experimental background Bacterial swarms
Experiments on swarming colonies of E. coli (Darnton et al., 2010;Wu and Berg, 2012;Ping et al., 2014), S. enterica (Harshey and Matsuyama, 1994;Butler et al., 2010;Kalai Chelvam et al., 2014;Chen et al., 2007) and P. aeruginosa (Yang et al., 2017) reveal certain reproducible features associated with this modality of collective behavior. For example, E. coli swarms on agarose gels have a steady front shape that propagates radially at a uniform speed (Wu and Berg, 2012). In these swarms, measurements of the osmotic pressure profiles were found to be consistent with the active secretion of wetting agents in regions of high cell density that serve to fluidize the swarm by extracting water from the underlying tissue, thus allowing it to spread (Ping et al., 2014). These observations are not unique to E. coli; indeed our experiments with B. subtilis swarms, following (Kearns and Losick, 2003), indicate the same phenomena, that is a steady-state front shape and eLife digest Bacteria can grow and thrive in many different environments. Although we usually think of bacteria as single-celled organisms, they are not always solitary; they can also form groups containing large numbers of individuals. These aggregates work together as one super-colony, allowing the bacteria to feed and protect themselves more efficiently than they could as isolated cells.
These colonies move and grow in characteristic patterns as they respond to their environment. They can form swarms, like insects, or biofilms, which are thin, flat structures containing both cells and a film-like substance that the cells secrete. Availability of food and water influences the way colonies spread; however, since movement and growth are accompanied by mechanical forces, physical constraints are also important. These include the ability of the bacteria to change the water balance and their local mechanical environment, and the forces they create as they grow and move.
Previous research has used a variety of experimental and theoretical approaches to explain the dynamics of bacterial swarms and biofilms as separate phenomena. However, while they do differ biologically, they also share many physical characteristics. Srinivasan et al. wanted to exploit these similarities, and use them to predict the growth and shape of biofilms and bacterial swarms under different conditions. To do this, a unified mathematical model for the growth of both swarms and biofilms was created. The model accounted for various factors, such as the transport of nutrients into the colony, the movement of water between the colony and the surface on which it grew, and mechanical changes in the environment (e.g. swelling/ softening). The theoretical results were then compared with results from experimental measurements of different bacterial aggregates grown on a soft, hydrated gel. For both swarms and biofilms, the model correctly predicted how fast the colony expanded overall, as well as the shape and location of actively growing regions.
Biofilms and other bacterial aggregates can cause diseases and increase inflammation in tissues, and also hinder industrial processes by damage to submerged surfaces, such as ships and waterpipes. The results described here may open up new approaches to restrict the spreading of bacterial aggregates by focusing on their physical constraints. speed, as shown in Figure 1A-1E. Close to the spreading front, we observe a multilayer region of width W = 195 mm ± 35 mm, indicated by the dashed white lines in Figure 1B and 1C. The multilayer region correlates with increased colony thickness and local bacterial density (Wu and Berg, 2012). At the edge, and in the interior, there is just a monolayer of cells. The swarm radial expansion velocity is constant at V = 2 mm/hr (see Figure 1D) and the swarm front maintains a steady-state profile during expansion (see Figure 1E). These observations raise a number of natural questions associated with the steady-state velocity and profile of the swarm colony. Given the observations of osmotic gradient-driven flow in the vicinity of the growing front (Ping et al., 2014), coupled with variations in the thickness and activity of bacteria, any framework to explain these requires a consideration of a dynamic bacterial population interacting with ambient fluid, necessitating a multiphase description.

Bacterial films
In contrast with bacterial swarms, the spreading of bacterial biofilms is faciliated by the extracellular polymeric substance (EPS) matrix that expands via osmotic fluid influx, for example in B. subtilis Intensity (a.u (Seminara et al., 2012) and V. cholerae (Yan et al., 2017) biofilm colonies. However, EPS synthesis is not homogeneous, and depends on the local nutrient concentration and environmental heterogeneities experienced by cells within the same biofilm (Vlamakis et al., 2008;Berk et al., 2012).
Recently, it was shown that the EPS matrix production is localized to cells in the propagating front of B. subtilis biofilms (Srinivasan et al., 2018). In Figure 1F-1J, we show the results of repeating these experiments, but now focusing on a peripheral region of a biofilm colony using a B. subtilis strain (MTC832) that harbors the P tapA À cfp construct as a reporter for matrix production activity (Wang et al., 2016;Srinivasan et al., 2018). This highlights a~1 mm zone of matrix production activity at the periphery, seen in Figure 1G and H; indeed plots of averaged matrix production reporter intensity exhibit a distinct peak at the periphery, as shown in Figure 1J. The dynamics of radial expansion shows the existence of an initial acceleration regime followed by a transition to a second regime characterized by a monotonic decrease in expansion velocity, as plotted in Figure 1I. This transient mode of biofilm spreading driven by EPS production and swelling is quite different from that of bacterial swarming, and suggests that we might need a fundamentally different way to address its origins. However, if we now consider the EPS matrix and fluid as distinct phases (Cogan and Keener, 2004;Cogan and Keener, 2005;Winstanley et al., 2011;Seminara et al., 2012), with the bacterial population being relatively small, we are again led to a multiphase description of the system, but with a different dominant balance relative to that seen in bacterial swarms, which we now turn to.

Theoretical framework
Recent theoretical approaches have considered specific physical factors such as the wettability of the biofilm (Trinschek et al., 2016;Trinschek et al., 2017), osmotic pressure in the EPS matrix (Winstanley et al., 2011;Seminara et al., 2012), or Marangoni stresses associated with the swarm fluid (Fauvart et al., 2012), as reviewed by Allen and Waclaw (2019). However, a description that captures the experimental observations described in Figure 1 remains lacking. Here, given the similarities between the bacterial swarming and biofilm systems, we provide a unified description of their spreading dynamics by recognizing that in both cases we need to consider large slender microbial colonies with H=R ( 1, where H is the colony thickness and R is the radius. This approximation results in a quasi-2-dimensional, two-phase model (assuming axisymmetry) of a colony that spreads along the x-axis, with a varying thickness, as shown in Figure 2. The subscript i = (1,2) denotes the actively growing phase and passive phase, respectively. Within the swarm colonies, the highly motile cells constitute the actively growing phase whereas the fluid comprises the passive phase. Similarly, in biofilms, the EPS matrix constitutes the active phase, and the aqueous fluid is the passive phase. In both cases, colony growth occurs over a semipermeable soft gel substrate, as shown in Figure 2. We develop a continuous description of colony expansion in terms of variables which are coarse-grained depth integrated averages (Drew, 1983;Ishii and Hibiki, 2011), The averaged height of the colony interface is hðx; tÞ, the volume fraction of the active phase (i.e., swarmer cells or polymer matrix) is f 1 ¼ fðx; tÞ and the volume fraction of the fluid phase is f 2 ¼ 1 À fðx; tÞ. The 1-D substrate depth-averaged nutrient concentration field within the substrate is cðx; tÞ. As detailed in Appendix 2, combining mass and momentum balances yields the following generalized set of partial differential equations that governs the dynamics of both expanding swarms and biofilms, (2) c t À Dc xx ¼ g 2 ðh; f; cÞ: ( where, Á ð Þ x ¼ q Á ð Þ=qx, etc. Here, Q 1 ðxÞ is the horizontal flux in the active phase, Q 2 ðxÞ is the horizontal flux in the fluid phase and V 0 ðxÞ is the osmotically-driven net vertical fluid influx per unit length across the permeable substrate. Furthermore, g 1 ðh; c; fÞ is the depth integrated active phase growth rate within the bacterial colony, and g 2 ðh; c; fÞ is the depth integrated nutrient uptake rate. The dynamics of swarms and biofilms differ in the details of the expressions for Q 1 ; Q 2 , V 0 , which are provided in Table 1. While a full derivation of each term is provided in Appendix 2, a direct comparison of the swarm: nutrient rich, capillary pressure dominated biofilm: nutrient limited, osmotic pressure dominated In both cases, the total thickness of the microbial colony is hðx; tÞ, the averaged nutrient concentration field is cðx; tÞ, the volume fraction of the active phase is fðx; tÞ, the volume fraction of the fluid phase is 1 À fðx; tÞ, and the fluid influx across the agar/colony interface is denoted by V 0 ðx; tÞ. As shown on the bottom panel, the active phase constitutes swarmer cells in the microbial swarm, and secreted EPS polymer matrix in the biofilm. The pressure in the fluid phase is p f and the effective averaged pressure in the active phase is P. In the swarm cell phase, P ¼ p f , while the EPS phase effective pressure is P ¼ p f þ fÉðfÞ, where ÉðfÞ is the swelling pressure and is related to Flory-Huggins osmotic polymer stress (see Equation A28). The momentum exchange between the two phases is denoted by M, which includes the sum of an interfacial drag term and an interphase term as detailed in Equation (A11) in the Appendix. DOI: https://doi.org/10.7554/eLife.42697.005 Table 1. Definitions of fluxes for swarms and films Definitions of the active phase horizontal flux Q 1 , the fluid phase horizontal flux Q 2 , active phase growth term g 1 ðh; f; cÞ, osmotic influx term V 0 ðxÞ, and nutrient consumption term g 2 ðh; f; cÞ for bacterial swarms and films in the generalized thin film evolution equations described by Equations (1-3). Here, 1 is the biofilm viscosity, 2 is the fluid viscosity, p f is the fluid phase pressure, P is the effective pressure in the active phase, g 0 is effective swarmer cell growth rate, G is the EPS production rate, G is the nutrient consumption rate per unit concentration, K is the nutrient half-velocity constant and d is the thickness of the substrate. For swarms, the active phase corresponds to the swarmer cell phase, and for biofilms, the active phase is the EPS polymer matrix.

Variables
Swarms Biofilms Nutrient uptake g 2 ðh; c; fÞ -terms listed in Table 1 reveals a number of structural similarities and differences.

Nutrient uptake
For both swarms and biofilms, the active phase (i.e., swarm cells or the EPS matrix) is generated within the bacterial colony by converting nutrient in the underlying substrate to biomass. The rate of change of nutrient concentration within the substrate depends on diffusion and nutrient uptake (see Equation (3) and Equation (A2)), and is derived in Appendix 2. When the substrate concentration is scaled by the initial concentration c 0 , the nutrient depletion rate depends on G=c 0 , the ratio of the specific nutrient consumption rate to the initial concentration. Bacterial swarming is typically associated with nutrient rich conditions, where c 0 ) G. As a result, the nutrient uptake term can be neglected in bacterial swarming as g 2 ! 0, and the concentration c » c 0 throughout swarm expansion. In contrast, biofilm growth occurs under nutrient limited conditions where G=c 0~O ð1Þ, resulting in a corresponding uptake term shown in Table 1. Therefore, biofilm expansion is necessarily unsteady and driven by the dynamics of the transient nutrient field.

Growth
In both swarms and biofilms, the generation of the active phase drives colony expansion and is described by the growth term in Equation (1) using a logistic function g 1 ¼ g 0 hfð1 À hf=ðHf 0 ÞÞ to model the active phase growth, where Hf 0 is the limiting thickness, and g 0 indicates a specific growth rate. In bacterial swarms, g 0 is independent of the nutrient concentration (as c » c 0 during swarm expansion). Therefore, the spreading swarm films have a steady-state structure that exhibits a central spatial plateau about hf ¼ Hf 0 . In contrast, biofilm growth corresponds to a nutrient poor environment. We model the biofilm growth dependence on nutrient concentration via a minimal Michaelis-Menten form g 0 ¼ Gc=ðK þ cÞ, . Unlike in nutrient rich conditions associated with swarms, this implies that biofilm growth is fundamentally transient; once the nutrient field at the interior is depleted as c ! 0, biofilm growth term in that region is arrested and g 1 ! 0 independently of the vertical thickness (i.e., even if hf 6 ¼ Hf 0 ). As a result, the biofilm does not give form a central plateau and the dynamics of the biofilm rim is fixed by the dynamics of nutrient depletion. Eventually the effect of the finite-size of the system (the petri dish) also becomes important it determines the overall dynamics of nutrient depletion.

Active and passive fluxes
The terms Q 1 ðxÞ and Q 2 ðxÞ that represent the horizontal flux of the active and passive phases are obtained by depth integrating the momentum balance equations in the thin-film lubrication limit, as described in Appendix 2 (c.f. Equations (A9)-(A11)). Within bacterial swarms, the passive aqeuous fluid phase is modeled as a Newtonian liquid with viscosity 2 . The first term of Q 1 ðxÞ and Q 2 ðxÞ in Table 1 for swarms is generated by viscous and capillary stresses within the swarm fluid. The active swarmer cells are treated as inviscid and subjected to a hydrodynamic frictional drag force. Specifically, we assume that individual bacteria within the swarm are undergoing a random walk process with zero net displacement (upon averaging over sufficiently large time-intervals). Even though there is no overall displacement, there is a net time-averaged drift that arises from viscous stokes drag interaction between the fluid and the active bacteria. The second term for Q 1 ðxÞ in Table 1 represents this timeaveraged drift arising from frictional drag interaction of the bacteria with the swarm fluid. In biofilms, the EPS matrix phase constitutes an active viscous hydrogel network with viscosity 1 , whereas the passive aqueous fluid phase is treated as a solvent with viscosity 2 . The dominant stress within the EPS phase in the biofilm model arises from a Flory-Huggins swelling pressure in the polymer chains (Cogan and Guy, 2010;Winstanley et al., 2011). In the fluid phase, the pressure p f is set by surface tension and curvature of the swarm fluid. Both these stresses contribute to the effective EPS phase pressure term PðxÞ, as described in Appendix 2. Consequently, the first term for Q 1 ðxÞ and Q 2 ðxÞ in Table 1 for biofilms is related to the gradient of the effective pressure. Moreover, following Winstanley et al. (2011), we assume that the capillary and viscous stresses in the swarm fluid are negligible when compared to the frictional drag due to flow between water and the EPS polymer chain network in the biofilm model. Therefore, the second term for Q 2 ðxÞ in Table 1 represents a Darcy-type flow of the aqueous phase within the EPS matrix. The osmotic influx terms are considered separately in the following sections when describing the equations governing swarm and biofilm expansion.

Bacterial swarms
Species of bacteria that swarm on hydrated surfaces are known to secrete distinct wetting agents. For example, B. subtilis secretes the lipopeptide surfactin, whereas P. aeruginosa secrets rhamnolipids as the wetting agent. Consequently, existing thin-film models to describe bacterial swarming assume that gradients in wetting agent activity generate Marangoni stresses that drives swarming motility (Fauvart et al., 2012;Trinschek et al., 2018). However, E. coli exhibits swarming behavior despite the absence of lipopeptides or other agents that act as surfactants. Moreover, recent experiments (Yang et al., 2017) demonstrates that P. aeruginosa swarms robustly even after exogenously eliminating gradients in surfactant concentration within the swarm fluid, eliminating Marangoni flows as the principal mechanism that drives swarming. Here, we take a different approach based on experiments that show that steady-state swarm colony expansion maybe mediated by secretion of agents that are osmotically active (Wu and Berg, 2012). As we will see, this leads to fluid being extracted from the substrate near the front, then driven into the colony by capillary and viscous stresses, and eventually returns into the substrate in the interior of the swarm.
Within the bacterial swarms, the dominant phases are the swarmer cell phase, and the viscous aqueous phase, as shown in the bottom panel of Figure 2A. Fluid uptake from the substrate is regulated by the secretion of osmotically active agents by the swarmer cells (Ping et al., 2014). We represent the osmotic agent in the fluid by a concentration field, c osm ðfÞ that is proportional to the local volume fraction of cells such that c / f=ð1 À fÞ, and gives rise to an osmotic pressure described by van't Hoff's law as (van't Hoff, 1887), DÉ ¼ É 0 f=ð1 À fÞ À É eq À Á , that drives the fluid intake. Here, É 0 is the osmotic pressure scale in the swarm fluid and É eq is the equilibrium osmotic pressure within the underlying tissue/gel substrate. Away from the front, in the interior of the swarm colony, there is no net fluid influx (Ping et al., 2014). Therefore, the equilibirium volume fraction of the swarm cells at the interior is, f 0 ¼ É eq =ðÉ 0 þ É eq Þ. At the front itself, the difference in osmotic pressure results in a net Darcy-type fluid influx into the swarm, V 0 ðxÞ, expressed as, where Q 0 is a velocity scale associated with fluid inflow from the substrate. Measurements of cell replication within swarms reveals that growth is restricted to swarmer cells at the periphery (Hamouche et al., 2017), which we model using a modified logistic growth term g 1 ðh; fÞ as listed in Table 1, that localizes all cell division to the periphery. Here, Hf 0 is the limiting thickness of the swarmer-cell phase at the interior, and g 0 is an effective specific growth rate, related to true specific cell growth rate by a geometric factor (see discussion in Appendix. [2]).

Parameters and scaling laws for bacterial swarms
To make sense of the scales in the problem, we use the dimensionless variablesx ¼ x=L,ẑ ¼ z=H and t ¼ tg 0 where H is the vertical length scale, L is a horizontal length scale and 1=g 0 is the time-scale associated with bacterial growth. The resultant horizontal velocity scale in the swarm colony is U ¼ Lg 0 . Swarm expansion is fluid driven, and therefore balancing the viscous stresses generated in the swarm fluid, with the curvature pressure due to surface tension (Levich and Landau, 1942) results in 2 U=H 2~g H=L 3 , where 2 is the viscosity and g is the surface tension of the aqueous phase. As a result, the natural horizontal length scale is L ¼ HðCaÞ À1=3 , where Ca ¼ ð 2 U =gÞ is a capillary number associated with the microbial swarm fluid. Consequently, in our model the expansion speed of the swarm colony, V ¼ dR=dt, is determined by the product of the horizontal length scale and an effective growth rate, and is predicted to scale as, whereas, the swarm front itself is analogous to a capillary ridge in thin fluid film with a width W that is predicted to scale as, where, C 1 and C 2 are dimensionless prefactors that require a detailed numerical calculation, and are discussed later. There are two important dimensionless parameters that describe swarm colony expansion. The first dimensionless parameter, a 1 , relates the magnitude of capillary forces to the viscous drag acting on cells within the swarm and is defined as a 1 ¼ ðgH=L 2 Þ=ðzLUÞ. Here, z ¼ z c =V c where z c is the friction coefficient of a single swarmer cell and V c is its volume. The second dimensionless parameter a 2 is defined as the ratio of a vertical fluid influx velocity Q 0 , to a thickness velocity scale Hg 0 associated with bacterial growth as a 2 ¼ Q 0 =ðHg 0 Þ. The vertical length scale and equilibrium fluid volume fraction are estimated from the interior monolayer region as H = 0.5 mm and f 0 ¼ 0:5 (Wu and Berg, 2012). We assume values of 2 ¼ 10 À3 Pa.s for the (aqeuous) swarm fluid viscosity, and g ¼ 10 À2 N/m as its surface tension. The friction coefficient of a single cell is estimated from Stokes law as z c ¼ 3p 2 a, and its volume is approximated as V c ¼ pa 3 =6, where a = 1 mm is the cell diameter. Therefore, the friction coefficient is z ¼ z c =V c » 18 2 =a 2 . As a result of substituting the values of known parameters above, the dimensionless parameter a 1 reduces to a constant geometric ratio, a 1 » 2a 2 =H 2 » 2=9 » 0:22.
The value of a 2 depends on the ratio Q 0 =g 0 . Direct experimental measurements of the vertical influx fluid velocity profile V 0 ðxÞ and the spatial profiles of cell division in swarm colonies remain scarce (Hamouche et al., 2017). In order to make progress in validating our model with real experimental data, the vertical fluid influx velocity scale is chosen as Q 0 ¼ 10 À2 m/s. Consequently, we have chosen g 0 as the only fitting parameter in our study, as detailed in Appendix 2. As an example, in the following section we will show that a choice of g 0 ¼ 0:013 s -1 in our model reproduces the experimental swarm expansion speed shown in Figure 1D, and leads to a horizontal length scale of L ¼ HðCaÞ À1=3 ¼ 100 m, velocity scale of U ¼ Lg 0 ¼ 1:3 m s -1 , Ca ¼ 1:3 Â 10 À7 and a value of a 2 » 1:5. A complete set of parameters for three experimental measurements of swarm expansion in B. subtilis, and two existing measurements in E. coli previously reported by Darnton et al. (2010) and Wu and Berg (2012) are summarized in Appendix 2.

Steady state swarms
With these assumptions, and assuming that the nutrient concentration is constant, Equations (1-3) reduce to the following scaled equations in the swarming limit, To complete the formulation of the problem, we need five boundary conditions which arê hxð0Þ ¼ĥxðR P Þ ¼ 0,ĥxxxð0Þ ¼ĥxxxðR P Þ ¼ 0, and fð0Þ ¼ f 0 , where R P is the dimensionless size of the petri-dish and is set much larger than the colony size (R ¼ 150) in our simulations. The initial condition corresponds to a circularly inoculated swarm colony, along with a thin pre-wetting film where no bacterial growth occurs (see Appendix 3-figure 1). Solving Equations (7) and (8) with the prescribed initial and boundary conditions numerically results in a steady state solution that advances at a constant speed (see Figure 3). In Figure 3, we plot a representative steady state solution in the frame of the advancing front for a 1 ¼ 0:2, a 2 ¼ 1:5 and f 0 ¼ 0:5. At the interior of the swarm, the average cell volume fraction is f » f 0 . Near the leading edge of the swarm, there is a region of enhanced thickness as indicated by the red line in Figure 3A. Immediately behind the leading edge, where the cell concentration is highest, so is the osmolyte concentration leading to fluid extraction from the substrate, while further behind, fluid is reabsorbed, as indicated by the arrows in Figure 3A. In Figure 3B, we show the steady-state osmotic flow solution and see that it correlates well with the experimentally measured osmotic pressure profile by Ping et al. (2014) in E. coli swarms. As shown in Appendix 3-figure 3, our numerical horizontal flow profiles are also consistent the scaled radial fluid velocity measurements of Wu and Berg (2012). In Figure 3C, we see that the radial expansion velocity scales as Hg 0 and shows quantitative agreement with experiments and is insensitive to the fluid influx velocity scale when Q 0 ) g 0 H. Note that our model uses a coarse-graining procedure and represents the swarm thickness field using a continuum approximation. As a consequence, we are not able to quantitatively capture the decreasing height of the swarm (i.e., of the order of a few cells), that is experimentally observed over hundreds of micron towards the interior (see Figure 1E).
Furthermore, we corroborate our scaling law in Equation (5) by fitting our model to five independent experimental measurements of swarm expansion velocities for different systems, as shown in Figure 3D. These include measurements in B. subtilis swarms in this work, and in E. coli swarms previously reported by Darnton et al. (2010) and Wu and Berg (2012) that are summarized in Table  A2 in Appendix 2. The expansion velocity follows the À1=3 exponent predicted by Equation (5) for Ca varying from~5 Â 10 -8 to 10 -6 . For each experiment, we have fit our theoretical model using the effective growth rate g 0 as the fitting parameter and find that the numerical prefactor C 1 » 0:42. However, as shown in Appendix 3- figure 5 in the Appendix, the measured multi-layer width does not follow the predicted scaling. From an experimental point of view, the width of the multi-layer region is not sharply defined in Figure 1E, and will depend on the choice of threshold. However, our multi-  (4). On the right axis are experimental measurements of the steady-state osmotic pressure within an expanding E. coli swarm (filled circles), reproduced from Ping et al. (2014), with the baseline reference value shifted to zero, and with distances normalized by L = 50 mm. (C) Predicted steady-state radial colony expansion speeds within the swarm for values of a 2 ¼ Q 0 =ðHg 0 Þ ¼ 1, 10 and 100 respectively. The data points are expansion speeds in B. subtilis swarms measured over 20 min, and scaled using U = 1.3 mms À1 and g 0 0.013 s -1 . (D) Comparison between the swarm expansion velocities dR=dt measured for five separate colonies (see Appendix 2) and the estimated capillary number. For each experiment, g 0 was obtained by fitting the steady state solution of Equations (7) and (8)  phase model is able to describe the zone of cellular and osmolyte activity near the leading edge that drives the advancing swarm front. This leads to a picture wherein the combination of a fluid-filled substrate and swarm front work together like a localized active circulatory system, quantitatively rationalizing the experimental observations of Wu and Berg (2012) and Ping et al. (2014).

Bacterial films
In bacterial biofilms, the EPS matrix secreted by bacteria constitutes the active phase and undergoes swelling, drawing in the fluid that acts as the passive phase. As shown in Figure 2B, the EPS is initially synthesized in a partially swollen, out-of-equilibrium state at the periphery. The polymer chains gradually relax to an equilibrium fully-swollen configuration by the generation of a swelling pressure É within the biofilm, and via fluid uptake V 0 ðxÞ from the substrate. As discussed in Appendix 2, the swelling pressure is ÉðfÞ ¼ ðfÞ=f, where ðfÞ ¼ 0 Â f 3 is the osmotic pressure in the EPS matrix using the Flory-Huggins model for a polymer network in a -solvent (Rubinstein and Colby, 2003), where 0 ¼ kT=ðb 3 Þ is the osmotic pressure scale, kT is the product of the Boltzmann constant with the temperature and b is the approximate size of the monomer unit. The net effective pressure term driving biofilm expansion is, P ¼ 0 f 3 þ p f , where p f is the capillary pressure, so that the water influx across the substrate is where Q 0 is the influx fluid velocity scale, f 0 ¼ ðÉ eq =É 0 Þ 1=3 is the fully-swollen EPS polymer volume fraction and É eq is the osmotic pressure of the substrate over which the colony grows. Finally, nutrient uptake is modeled by a Monod growth law, while the synthesis of the EPS matrix is modeled by a logistic term as listed in Table 1.

Parameters and scaling estimates for bacterial films
where H is now the maximum biofilm thickness, G is the rate of EPS production, and c 0 is the initial nutrient concentration in the substrate. As biofilm growth is nutrient limited (Liu et al., 2015), the dimensionless length scale is determined from Equation (3) and is expected to scale as L ¼ ðD=GÞ 1=2 and the corresponding velocity scale is U ¼ ðDGÞ 1=2 . Using these scales, we can define the ratio of osmotic stresses relative to viscous stress in the EPS phase in terms of the dimensionless parameter, b 1 ¼ ðÉ 0 =LÞ=ð 1 U=H 2 Þ, the ratio of capillary stresses relative to the EPS viscous stress in terms of another parameter, b 2 ¼ ðgH=L 3 Þ ð 1 U=H 2 Þ, the ratio of capillary stress to the interfacial drag in the aqueous fluid phase, b 3 ¼ ðgH=L 2 Þ ðzULÞ, and the ratio of the fluid influx velocity to the EPS swelling velocity, b 4 ¼ Q 0 =ðHGÞ. As shown in Appendix 2, the effective nutrient uptake rate is S ¼ ðGHf 0 Þ=ðc 0 dÞ, where G is the nutrient consumption rate per unit concentration and d is the substrate thickness. Consequently, we define b 5 ¼ S=G as the ratio of the effective nutrient uptake rate to the EPS production rate.
We set the EPS production time-scale as G ¼ 1=40 min À1 , resulting in a horizontal length scale of L ¼ ðD=GÞ 1=2 ¼ 1:1 mm and velocity scale U ¼ ðDGÞ 1=2 ¼ 0:5 m/s. The effective nutrient uptake rate is estimated as S ¼ 1=25 min À1 , where we have taken d ¼ 7 mm as the substrate thickness (Srinivasan et al., 2018), G ¼ 10 À2 mM/s as the nutrient uptake rate (Zhang et al., 2010), and c 0 ¼ 35 mM as the initial concentration of the carbon source. The friction coefficient is z~ 2 = 2 , where the EPS mesh size is ¼ 50 nm (Yan et al., 2017). Using measured estimates of the biofilm viscosity 1 ¼ 10 5 Pa.s (Stoodley et al., 2002;Lau et al., 2009), fluid phase viscosity 2 ¼ 10 À3 Pa.s, surface tension g ¼ 10 À2 N/m, an osmotic scale É 0 ¼ 2100 Pa (Yan et al., 2017) (i.e., f 0 ¼ 0:04), biofilm thickness H ¼ 400 m, and nutrient diffusivity in agarose gels of D ¼ 5 Â 10 À10 /s (Zhang et al., 2010) implies that b 1 » 7, b 2 » 0:01, b 3 » 0:02, b 4 » 1 and b 5 » 2. Consequently, within the context of our model, it is evident that osmotic stresses, fluid influx and biomass growth are the dominant forces that drive colony expansion. Moreover, in the nutrient limited regime, our model predicts the transient maximum biofilm expansion velocity to scale as, whereas, the width of the propagating fronts of EPS production experimentally observed by Srinivasan et al. (2018) is predicted to scale according to, where C 3 and C 4 are once again dimensionless prefactors that require a detailed numerical calculation, as discussed later.
Unlike in the case of swarms, the solutions to Equations (12)-(14) are transient, and exhibit two distinct expansion regimes: initial acceleration phase untilt c ¼ 5, followed by a decelerating phase beyond. Fort <t c , colony expansion arises as the microbes rapidly consumes locally available nutrient at the interior and synthesize fresh EPS matrix, generating spatial gradients in nutrient availability (see Figure 4A). In Figure 4B, we show that the newly synthesized EPS generates a large osmotic pressure differential between the biofilm and the substrate, and osmotic fluid influx gradually relaxes the biofilm matrix to a swollen configuration. For t > t c , the localized zone of EPS production near the film front propagates with a fixed shape as shown in Figure 4C, consistent with the observed spatial localization in tapA gene activity (see Figure 1J and Srinivasan et al., 2018). Moreover, the radial colony expansion profile in Figure 4D is also consistent with the non-monotonic front speed observed experimentally (Srinivasan et al., 2018). For the specific experimental conditions we consider, our detailed theory allows us to estimate the prefactors in the scaling laws Equations (10)-(11) so that C 3 » 0:2 and C 4 » 1:8.
These results are hallmarks of a transition from a bulk to an edge biofilm growth mode, triggered by nutrient limitation (Pirt, 1967). In the deceleration regime, diffusive transport of nutrients from a region external to the colony continues to sustain EPS production at the biofilm periphery, analogous to Stefan-like problems in solidification. Our generalized multiphase model is thus able to quantitatively rationalize the expansion curves, transition time and localized biological activity observed experimentally, and demonstrates that nutrient availability and diffusive transport governs the dynamics of Bacillus subtilis macrocolonies grown on agar.

Discussion
Analysis of collective microbial expansion in thin film geometries often prioritizes biological mechanisms, such as genetic regulation, developmental programs and cellular signaling/competition, over the role of the heterogeneous physical micro-environments. Here we have presented a multi-phase theory that quantitatively describes the expansion dynamics of microbial swarms and biofilms and considers variations in the colony thickness, an aspect of colony expansion that has often been overlooked in many theories (Korolev et al., 2012;Ghosh et al., 2015;Wang et al., 2017). The resulting unified description of both steady-state swarms and transient biofilm spreading leads to simple estimates and scaling laws for the colony expansion rate that are validated via comparison with experimental measurements for different systems. In swarms, exudation of water from the permeable substrate via bacterial osmolyte secretion facilitates steady state colony expansion. Numerical solutions of our model demonstrate that the shape of the swarm front is determined by capillarity, and its expansion speed by cell-division and growth, leading to scaling laws validated by comparison with previous experiments. In contrast, transient biofilm macrocolony expansion on agar is driven by osmotic polymer stresses generated via EPS matrix production in a spatially localized zone at the periphery. Nutrient transport and depletion leads to the formation of these heterogenous zones, and results in two regimes in biofilm expansion.
However our depth-integrated theory also has certain limitations. For example, we are unable to capture discrete thickness variations of the order of a few cells, which might require an agent-based approach. For bacterial swarms, our model is unable to quantitatively account for the region of enhanced thickness (i.e., the multilayer region in Figure 1C and E), likely because the multilayer width is difficult to experimentally ascertain, owing to the large tail distribution seen in the mean intensity trace in Figure 1E, and the arbitrariness in the choice of threshold in Appendix 3- figure  5. Similarly, in the context of biofilm colony expansion, our model does not account for sliding and frictional contact between the cells/EPS matrix and the substrate (Farrell et al., 2013). More generally, our mean-field picture neglects fluctuation-driven effects during colony expansion, such as the formation multicellular raft structures (Kearns, 2010) and synchronized long-range interactions (Chen et al., 2017). Natural next steps of our approach include (i) adding three-dimensional effects by allowing for spatial variations in the mechanical stresses, flows and nutrient fields in the vertical direction, (ii) accounting for orientational order in the bacterial swarms and films, and (iii) accounting for interfacial tension on the stability of the growing swarm/biofilm-fluid interface, especially in the context of fingering instabilities in microbial colonies Trinschek et al. (2018).
A rigorous multi-phase approach may also be relevant in revisiting pattern formation phenomena in microbial colony expansion (Matsushita et al., 1999), that so far been addressed primarily using various non-linear diffusion models (Golding et al., 1998;Allen and Waclaw, 2019) that ignore the third dimension. Finally, from an experimental and theoretical perspective, our results naturally raise the question of controlling biofilm and swarm expansion by manipulating water and nutrient availability, complementing the better studied approaches of manipulating colonies by the genetic regulation of EPS production, cell division, and chemical signaling in microbial colonies. The funders had no role in study design, data collection and interpretation, or the decision to submit the work for publication.

Experiment Strains
In this study, we used two B. subtilis strains, MTC822 and MTC832, that were both previously constructed from a wild-type NCIB 3610 B. subtilis strain using a standard transformation protocol (Sinha, 2013). The MTC822 strain is used for fluorescence visualization in the swarming experiment, where the mkate2 red fluorescent protein reports on the activity of the constitutive hyperspank promotor via the amyE::Phyperspank-mkate2 construct. The MTC832 strain was used in the biofilm experiments in order to visualize localized matrix production activity and harbors the amyE::PtapA-cfp construct. In the MTC832 strain, the cfp cyan fluorescent protein reports on the activity of the tapA gene that is associated with exopolysaccharide production activity.

Materials and methods
Swarm plates were prepared using 0.5 wt% agarose gel (A1296, Sigma) infused with 25 ml of Luria-Bertani (Miller) medium (i.e. 10 g/L Tryptone 10 g/L NaCl 5 g/L Yeast Extract, Sigma) and 25 mg/ml Chloramphenicol. Biofilm plates were prepared using 1.5 wt% agarose gel (A1296, Sigma) infused with the standard MSgg biofilm-inducing growth medium (Branda et al., 2001) (i.e. 50 mM MnCl 2 , 5 mM KH 2 PO 4 , 1 mM ZnCl 2 , 50 mM FeCl 3 , 2 mM MgCl 2 , 700 mM CaCl 2 , 50 mg/ml threonine, 50 mg/ml tryptophan, 50 mg/ml phenylalanine, 0.5 wt% glutamate, 0.5 wt% glycerol, 2 mM thiamine and 100 mM MOPS (pH 7)) and 50 mg/ml Spectinomycin. Note that all plates underwent an identical drying protocol prior to use. Freshly poured plates were initially dried with the lid open under a laminar flow hood for 15 min. Subsequently, the lid was closed and the dish was cooled at 25 C overnight for a period of 10 hr. All strains were initially grown in fresh Luria-Bertani (Miller) broth medium (Sigma) until mid-exponential phase in a shaker/ incubator at 37C. The cultures were diluted to OD 650 ¼ 0:1 and~1 l drop was deposited onto the corresponding swarm (for MTC822) or biofilm (for MTC832) plates. The petri-plates were transfered to a 30C incubator chamber during growth. Fluorescence imaging was performed using a Zeiss Axiozoom.V16 microscope with a PlanNeoFluar Z 1.0x objective (NA 0.25), with a Zeiss 63 HE filter to image the red mkate2 protein, and a Zeiss 47 HE filter to image the cyan cfp protein. For swarm profile measurements, images of the advancing swarm front were captured every 10 s over a period of 10 min. For biofilm colonies, expansion velocities were measured every 10 min over a period of 72 hr following the protocol described in Srinivasan et al. (2018).
g 1 ðh; f; cÞ ¼ g 0 f 1 À hf Hf 0 ; where H is the swarm colony thickness at the interior, and g 0 is an effective growth rate that accounts for spatial localization in cell division. More specifically, if LðxÞ describes the spatial profile of cell growth within a swarm colony, then g 0 ¼ R R 0 LðxÞdx= R R 0 f½1 À ðhf=ðHf 0 ÞÞdx, where R is the radius of the swarm colony. Measurements of the spatial distribution of cell growth rates within the colony during swarming remain lacking. Consequently, in our model, we determine the value of g 0 by fitting it to the experimental data. We use a nonlinear leastsquares solver to match steady-state expansion speeds obtained from solving Equations (A21)-(A22) to the experimental data for steady-state B. subtilis swarms (see Figure 1D in main text).

Swarm equations
Combining Equations (A5)-(A8) with Equations (A17)-(A19) results in the dimensional thickness averaged equations for swarm colonies, biofilm and swarm simulations respectively. We use quintic Lagrange basis functions with element sizes below 0.04 and use the general form PDE solver. To handle the moving contact line, we introduce a precursor film of thickness h p =H = 0.0125, where H is the vertical length scale (see Appendix 3-figure 1). We follow the regularization described in Trinschek et al. (2016) to introduce a minimum threshold for growth and a stable fixed point in the precursor film. Specifically, the growth terms in (A2), (A20) and (A32) are multiplied by a factor F ¼ ½1 À exp 5ĥ p Àĥf Â 1 Àĥ p =ðĥfÞ , where F » 1 everywhere except near the precursor film where F ¼ 0.

Experimental data
Appendix 2-table 2. Summary of the comparision between the experimental data and model. The experimentally measured quantities are the colony expansion speed V ¼ dR=dt and multilayer region thickness W. The value of a 2 is determined by fitting Equations (7)-(8) to the expansion velocity, leading to estimates of the effective growth rate g 0 , the horizontal length scale L and the capillary number Ca.