Main

When they invented irrigation, the ancient civilizations of Egypt and Mesopotamia relied on the first fundamental rule of hydraulics: mass conservation1. In our modern language, we formulate it as Kirchhoff’s first law. In the steady state, the sum of fluxes must vanish at each node of a channel network (∑jΦij = 0, where Φij is the flux from node j to node i). Eight millennia later, Hagen, Poiseuille and Darcy discovered the second law of hydraulics2,3,4. Darcy’s law relates the mass fluxes to pressure gradients: Φij = −Kij(Pi − Pj), where Pi is the fluid pressure and Kij is the hydraulic conductance. Given these two linear relations and a set of boundary conditions, we can predict the viscous flows in any hydraulic network, regardless of their geometrical complexity. Although it can be computationally hard to solve and optimize, viscous hydraulics are deterministic and fully predictable.

However, over the past decade, physicists, chemists and material scientists have complexified this neat picture. They have engineered active fluids that escape the fundamental laws of hydraulics5. Either by hacking biological engines (such as molecular motors and bacteria) or by motorizing synthetic soft materials, we have learned how to power fluids at the scale of their elementary building blocks. When confined, the resulting active materials enjoy spontaneous laminar flows even in the absence of any external drive or boundary motion6,7,8,9,10,11,12. In channels and pipes, active fluids flow in one direction or the other with the same probability, and can even resist opposing pressure gradients13. In other words, they are intrinsically bistable9,13,14. This fundamental deviation from Darcy’s law makes active hydraulics a challenging problem. From a theoretical perspective, the fundamental multistability of active hydraulic flows was realized and the computational power of active fluidic networks (AFNs) based on minimal models was investigated14,15,16,17. From an experimental perspective, the investigation of active hydraulics has been mostly limited to straight channel geometries, closed loops and one-node networks7,9,18. Today, the basic laws of active hydraulics remain to be experimentally tested, confirmed or established, in large-scale networks.

In this Article, we perform large-scale active hydraulics experiments. We show that spontaneous laminar flows are frustrated in networks including nodes with an odd coordination number. Focusing on fully frustrated trivalent networks, we show that the resulting active flows realize dynamical spin ices signalled by extensively degenerate random flow patterns even when the channels are spatially ordered. Unlike passive fluids, and at odds with the current AFN theory, we find that the random geometry of streamlines depends on the aspect ratio of the elementary channels. We explain this polymorphism by combining experiments and numerical simulations, and show that it originates from topological-defect fractionalization at the subchannel level. We then elucidate the self-similar geometry of the flow patterns by mapping them on the frustrated structures of magnetic spin ices and on so-called loop O(n) models19,20,21,22. Altogether, our findings allow us to identify the full set of laws ruling the steady flows of active matter circulating through interconnected channels forming trivalent networks.

To experimentally investigate active hydraulics, we need a model active fluid and model hydraulic networks (Fig. 1). Methods provides all the technical details. In short, our active fluid is a flocking liquid assembled from Quincke rollers6, which features bistable laminar flows in straight channels13. We first confine our active fluid in networks of channels that form a honeycomb structure including up to 3,200 trivalent nodes (Fig. 1a,b). In their early experiments, Wioland et al. showed that active flows can strongly depend on the specific geometry of their boundaries23. We, therefore, consider two different node geometries where the trivalent junctions either include a star-shaped splitter or not (Fig. 1d). We also systematically vary the aspect ratio ϵ = w/ of the roller streams in the channels, by varying their length from 120 to 220 μm (Fig. 1d). The channel width w is kept constant and equal to 200.0 μm, about a hundred times larger than the colloids’ radius (2.4 μm).

Fig. 1: Active hydraulics in trivalent networks.
figure 1

a, Macroscopic picture of a trivalent microfluidic network. It encloses a two-dimensional active fluid made of flocking Quincke rollers. b, Experimental streamlines measured in this active hydraulic network. The streamlines form self-avoiding loops coloured by their handedness. c, Close-up view of the experimental device. We can distinguish steady vortices in a finite fraction of the channels. d, Our results do not depend on the specific geometry of the nodes that connect the microfluidic channels. A node including a star-shaped flow splitter (top). A node with no splitter (bottom). In the steady state, only two of the three channels support laminar flows. The third (horizontal) channel hosts a steady vortex. e, Distribution of the roller density normalized by the average density in the channels. The density is homogeneous in all the experiments, but features fewer fluctuations when the nodes include a star-shaped splitter. f, Distribution of local edge current Φe normalized by Φ0 = 400 s−1. The distribution is trimodal for both node geometries (the sign convention used to define Φe is sketched and explained in Fig. 2a). PDF, probability distribution function.

Source data

We first observe a transient dynamics where the active fluid undergoes strong density and velocity fluctuations over system-spanning scales (Supplementary Video 1). The convergence towards a stable steady state depends on the initial fluctuations in the colloid density and on the system size. However, in typically less than a couple of minutes, we found that the active flows converge towards a quiet steady state where the streamlines form a soup of self-avoiding loops (Fig. 1b). The quantitative characterization and prediction of these random streamline patterns from basic laws is our essential result. We also note that the density of the active fluid is homogeneous across the whole device (Fig. 1e and Supplementary Videos 2 and 3). By contrast, the mass–current distribution in the channels is heterogeneous (Fig. 1f). It is trimodal with two symmetric peaks associated with spontaneous flows at constant speed, and one higher peak that reveals channels with no net current. Although the statistics of the flow pattern remain qualitatively unchanged, we find that the peaks of the density and current distributions are narrower when using the splitter geometry (Fig. 1d). All the results reported below, therefore, correspond to this node geometry. Performing a series of experiments in deformed lattice geometries (Extended Data Fig. 1), we also checked that our results are solely determined by valence of the nodes and not by the C3 symmetry typical of a honeycomb structure (Fig. 1).

Unlike in disconnected straight channels, the active flows are never laminar throughout the sample: at least 40% of the channels host steady vortices and therefore support no net mass flux (Fig. 1d,f). This series of observations stems from the geometrical frustration of active laminar flows in trivalent networks14,17. It can be understood as follows. As in most active fluids, the spontaneous flows of the Quincke rollers operate at constant speed. When the fluid density is homogeneous, the magnitude of the net fluxes Φe measured along all the network edges (e) peaks on a constant value Φ0. The sign of Φe is defined in Fig. 2a. In our experiments, Φ0 = 400 s−1 (Fig. 1e). The active flows are, therefore, frustrated at any node with an odd coordination number. Flowing at constant speed and conserving mass are two incompatible constraints that cannot be simultaneously met in the steady state. Each node accommodates frustration owing to the emergence of vortices in one edge where the flux vanishes (Φe = 0) (Fig. 2b and Supplementary Videos 4 and 5). Irrespective of the channel aspect ratio, the situation where all three fluxes vanish is also possible, yet less probable (Extended Data Fig. 2 and Supplementary Video 6).

Fig. 2: Degeneracy of the streamline patterns.
figure 2

a, Sign convention of edge current Φe. The honeycomb lattice is bipartite. Its unit cell includes two sites, say ‘a’ and ‘b’. Φe is defined to be positive (blue arrow) when the active fluid flows from the a site to the b site and negative otherwise (orange arrow). b, Heat map showing the local value of current Φe. The solid lines indicate the shape of the corresponding streamlines. The data correspond to the region of space shown in Fig. 1c. c, Classification of the seven possible vertices at each node. The colours indicate the sign of the current. Φe is associated to a classical spin-1 variable, namely, Φe {−1, +1, 0} (negative, positive and vanishing net current, respectively). We define another spin variable σ { −1, 0, 1} at the nodes of the network. σ represents the handedness of the three-colour patterns. d, Six realizations of the same experiment (ϵ = 0.7) lead to six different streamline patterns with markedly different geometries. The colour indicates the handedness of the oriented loops. e, Overlap distribution computed over ten independent replicas of the same experiment indicates very little correlations from one replica to another. \({{{{\mathcal{O}}}}}_{\alpha \beta }={\langle 1-| {{{{\boldsymbol{\Phi }}}}}_{\alpha }(e)-{{{{\boldsymbol{\Phi }}}}}_{\beta }(e)| \rangle }_{e}\) quantifies the difference between the flow patterns in replicas α and β (Methods). The typical overlap is 0.2, which is consistent with the value expected for uncorrelated random current fields (\(\langle {{{{\mathcal{O}}}}}_{e}^{\alpha \beta }\rangle \in [0.16-0.25]\)). In the limit case where Φα(e) are uncorrelated, we can perform a crude approximation. Ignoring spatial correlations, we define the probability (1 − 2p) such that Φ(e) = 0 and assume that Φ(e) = ±1 have the same probability p. The average overlap between two random configurations would then be \(\langle {{{{\mathcal{O}}}}}_{e}^{\alpha \beta }\rangle =1-4p(1-p)\). Estimating p from the fraction of edges supporting no net current, we find p [0.25−0.30], which yields \(\langle {{{{\mathcal{O}}}}}_{e}^{\alpha \beta }\rangle \in [0.16-0.25]\).

Source data

The geometry of the streamlines must, therefore, accommodate the conflicting imperatives set by activity and mass conservation. The resulting local frustration defines a set of seven possible flow rules at the vertices, which are classified in Fig. 2c. From a condensed-matter perspective, they are akin to the spin-ice rules responsible for the ground-state degeneracy of magnetic textures in frustrated magnets19,20,21,22. More specifically, the six-most probable vertices (Fig. 2c) define a three-colouring model on the honeycomb lattice24,25, as evident in Fig. 2b. This first analogy with spin-ice physics explains the vast degeneracy of the flow patterns found in our experiments. Active hydraulic flows are not deterministic. Repeating the same experiment in the same periodic geometry, we observe a plethora of disordered flow patterns. We illustrate them in Fig. 2d and their overlap distribution shows that they hardly feature any correlation (Fig. 2e).

The streamlines form nearly close-packed ensembles of self-avoiding loops. This geometry is a direct consequence of the spin-ice rules (Fig. 2c), where the seven vertices are the generators of the self-avoiding random loops on the honeycomb lattice. Consistently, self-avoiding patterns were already numerically observed in AFN models15 for degree-3-vertex graphs where the flow rules essentially reduce to that shown in Fig. 2c. However the loops’ morphology strongly depends on the aspect ratio of the channels, ϵ (Fig. 3a). Obviously, this polymorphism cannot be explained by the sole spin-ice rule shown in Fig. 2c as it is agnostic to the channel lengths. To explain this, we first quantitatively characterize the loops’ geometry. We find that for all channel aspect ratios, the loops are self-similar: their gyration radius Rg grows algebraically with their length L as RgLν (Fig. 3b). Moreover, for small ϵ values, the loops are collapsed and segregated; by contrast, when ϵ is large, the streamlines are more persistent and form nested structures. We quantify these observations by plotting the exponent of gyration radius ν. We find that it undergoes a sharp increase when ϵ exceeds ϵ* = 0.8 (Fig. 3c).

Fig. 3: Polymorphism of streamlines.
figure 3

a, Evolution of the streamline morphology. The top row shows the data from the experiments. Two sets of streamlines correspond to ϵ = 0.7 and ϵ = 1.1 (left). Below ϵ* = 0.8, they are crumpled and segregated. Above ϵ*, they are nested and persistent. Corresponding topographic maps (right) (Methods). Below ϵ*, the segregation of streamlines translates in a two-level topography. Above ϵ*, the map features high hills and deep valleys. The bottom row shows data from the numerical simulations. Streamlines and topographic maps are predicted by the equilibrium configurations of the Hamiltonian defined by equation (1) for JC = −2 and JC = +2. The qualitative agreement between the simulations and experiments confirms the relevance of our active hydraulics laws. JC is a good proxy for the channel aspect ratio. b, Characterization of the streamline geometries: experiments, simulations and theory. All the simulations are performed on a honeycomb graph having the same size and boundary conditions as in the experiments. In the first column, for all the values of ϵ (experiments) and JC (simulations), Rg grows algebraically with the length of the streamlines L: Rg ≈ ν. The orange dashed lines indicate the theoretical predictions based on the loop O(1) model (Supplementary Information). The second column shows the variations in ν with aspect ratio ϵ (experiments) and JC (simulations). The orange hexagons indicate the honeycomb lattices. The dark rectangle and bow-tie symbol indicate the experiments performed in the brick and deformed honeycomb lattices (Supplementary Fig. 1). The dash–dotted line shows the exact prediction in the small JC and large JA limit (closely packed loop O(1) model). As per the dashed line, when JC = 0 and JA 1 limit (closely packed loop O(2) model), our experiments and numerical data are consistent with the theoretical prediction ν = 2/3. The third column shows the nesting level quantified by the maximum height difference on the topographic maps (average over ten realizations). The nesting level jumps at ϵ = ϵ* (experiments) and JC = 0 (simulations). The fourth column shows C(r), the probability of finding two nodes at distance r within the same loop. When ϵ > ϵ*, this pair correlation decays much faster than when ϵ < ϵ*. In the simulations, the plots clearly collapse on two distinct master curves when JC ≠ 0. The dash–dotted line shows the exact prediction in the limit JC 0 and the dashed line, the exact prediction for JC = 0. Each experiment has been repeated ten times. The error bars correspond to the 95% confidence interval. Each simulation has been repeated 50 times.

Source data

The transition from segregated to nested loops occurs at the same value of ϵ*. To see this, we classically identify the orientated streamlines with the contour lines of the height fields h of rough landscapes26. Figure 3a shows the topographic maps h corresponding to two streamline patterns (Methods). We then quantify the level of nesting by the maximum height difference Δh, which increases sharply at ϵ* (Fig. 3b).

These observations prompt us to deeply investigate the orientational interactions between the streamlines. To do so, we measure the fraction of parallel configurations when two adjacent streamlines are separated by a channel supporting no net flux (Fig. 4b). To measure this quantity, we note that it is given by 〈1 + σ1σ2〉/2 where spin variables σi measure the handedness of the vertices (Figs. 2c and 4a).

Fig. 4: Orientational interactions between adjacent streamlines and topological-defect fractionalization.
figure 4

a, Close-up view of the flow field in two adjacent streamlines separated by a channel that supports no net flux. Below ϵ*, the central channel hosts a single vortex. Above ϵ*, the central channel hosts two vortices. When two vortices rotate in the same direction, the flow field includes one topological charge of −1 and two charges of +1. When the two vortices rotate in opposite directions, the −1 charge is fractionalized into two −1/2 defects bound to the channel walls. b, Fraction of parallel contacts across the channels supporting no net flow. The fraction of parallel contacts is given by \(\frac{1}{2}(1+{\sigma }_{1}{\sigma }_{2})\). The orange hexagons indicate honeycomb lattices. The dark rectangles and bow-tie symbols indicate experiments performed in the brick and deformed honeycomb lattices, respectively (Supplementary Fig. 1). The flow couplings are mostly antiparallel below ϵ* and mostly parallel above. Each experiment has been repeated ten times. c, Numerical resolution of the Toner–Tu equations in cigar-shaped boxes (Supplementary Information). We define the aspect ratio of the boxes as ϵ = /w, where w is the width of the simulation box and is the length of the straight line joining the half-circles. Increasing the aspect ratio results in a transition from a flow field with a single +1 defect to flow fields hosting two vortices either separated by a +1 defect or two −1/2 defects. Each simulation has been repeated 50 times. As shown in b, the error bars correspond to the 95% confidence interval. d, Steady states where the right-most (v2) and left-most (v1) flows are parallel and prevail in boxes with large aspect ratios. The transition from antiferromagnetic to ferromagnetic contacts are not specific to colloidal rollers but generic to flocking matter (Toner–Tu fluids). e, Close-up view of the experimental streamlines measured in a channel where ϵ < ϵ*. The green arrow indicates the local orientation of the flows. The antiferromagnetic couplings between adjacent streamlines promote crumpled and segregated streamlines. f, Same data as in e, but for ϵ > ϵ*. The ferromagnetic couplings promote persistent and nested streamlines.

Source data

Figure 4b shows that antiparallel contacts (σ1σ2 = −1) prevail when ϵ < ϵ*, whereas most of the contacts are parallel (σ1σ2 = +1) when ϵ > ϵ*. This central result indicates that active hydraulic flows are not only shaped by the spin-ice rules but also by short-range orientational interactions between adjacent streamlines. To elucidate their nature, we investigate the morphology of the vortical flows at the subchannel scale (Fig. 4a). We find a clear structural change at ϵ*. Below ϵ*, the channels with no net flux (Φe = 0) host a single vortex. This vortex couples the adjacent channels as a gear would couple two circulators. The continuity of the flow field then favours antiparallel couplings between neighbouring streamlines. This short-range coupling is consistent with collapsed streamline loops including a number of hairpins (Fig. 4e).

The situation for ϵ > ϵ* is more subtle. We find that the zero-flux channels host two vortices (Fig. 4a). In most channels, they rotate in opposite directions (Fig. 4b). The continuity of the flow field, therefore, promotes parallel couplings, which explains the emergence of a nested structure of streamlines, as evident in Fig. 4f. However, in Fig. 4a, we can also see configurations with two co-rotating vortices, which promote antiparallel couplings. We now need to understand whether the dominance of counter-rotating vortices is specific to our experiments or generic to polar active fluids. We address this question numerically. We model the active flows using Toner–Tu hydrodynamics of polar active matter27,28, and solve these generic equations using a finite-element solver (Methods). We consider the simple geometry of an anisotropic cigar-shaped chamber with tangent boundary conditions (Fig. 4c). A systematic investigation would go beyond the scope of this Article; therefore, we focus on a single set of material parameters consistent with earlier measurements in Quincke roller fluids29,30. As the channel aspect ratio increases, we observe a clear transition between one-vortex and two-vortex configurations. The velocity field around a point vortex hosts a topological charge of +1. Therefore, when two point vortices coexist, an additional stagnation point of charge −1 must emerge to conserve the overall topological charge of +1 (ref. 30). Remarkably, we find that the most probable configuration does not correspond to the coexistence of +1 and −1 charges (Fig. 4d). By contrast, we observe a fractionalization of the −1 charge into two singularities of −1/2 (Fig. 4c). The fractional charges corresponding to stagnation points are bound to the channel walls and stabilize the counter-rotation of the two vortices of +1. This numerical result is in excellent agreement with our experimental findings (Fig. 4a). We, therefore, conclude that the prevalence of ferromagnetic couplings between the macroscopic streamlines (Fig. 4b) originates from defect fractionalization in the flow field at the subchannel scale. This consistent observation does not rely on the specifics of Quincke roller experiments.

We are now equipped to state the laws of active hydraulics in trivalent networks and map them on a double-spin model. This mapping will allow us to predict the self-similar geometry of the streamlines, their gyration radius, degree of nesting and pair correlation. The four laws are as follows.

  1. (i)

    The fluid activity constrains the current Φij on the edge e = (i, j) to take only three different values, namely, Φij/Φ0 { −1, 0, +1}.

  2. (ii)

    In straight channels, the stability of laminar active flows penalizes the state where Φij = 0.

  3. (iii)

    At every node i, mass conservation imposes the spin-ice constraint: ∑jΦij = 0. This constraint frustrates the law stated in (ii).

  4. (iv)

    The topological defects of the flow field in channels hosting no net current impose effective ferromagnetic, or antiferromagnetic, interactions between adjacent streamlines. The sign of the interactions is set by the channel aspect ratio.

The first three laws above define the spin-ice rules shown in Fig. 2c and are akin to the AFN model discussed elsewhere14,15,17. They must be complemented by the law in (iv) above to explain the polymorphism of streamlines observed in all our experiments and quantified in Fig. 3.

We now build a model to quantitatively account for these four elementary laws. To do so, we introduce an effective Hamiltonian \({{{\mathcal{H}}}}\) that couples two classical spin-1 variables. The edge spins Φij = ±1, 0 model the local fluxes, and the node spins σi = ±1, 0 encode the handedness of the ith node (Fig. 2c). This Hamiltonian takes the compact form:

$${{{\mathcal{H}}}}=-{J}_{{{{\rm{A}}}}}\mathop{\sum}\limits_{(i,\,j)}{\Phi }_{ij}^{2}-{J}_{{{{\rm{C}}}}}\mathop{\sum}\limits_{(i,\,j)}{\delta }_{{\Phi }_{ij},0}{\sigma }_{i}{\sigma }_{j},$$
(1)

where both sums are taken over the edges of the network. The first term reflects the activity of the fluid. JA is a positive constant that penalizes the states of vanishing flows (law (ii) above). The second term reflects the interactions between adjacent streamlines (law (iv)) and JC is a proxy for the channel aspect ratio. JC < 0 corresponds to antiferromagnetic couplings, that is, channels where ϵ < ϵ*. JC > 0 corresponds to ferromagnetic couplings, that is, channels where ϵ > ϵ* (Fig. 4a,e,f). We stress that JC only couples nodes connected by channels where the flux vanishes. This property is accounted for by the \({\delta }_{{\Phi }_{ij},0}\) term. The geometry and handedness of the streamline loops map on the ensembles of connected edge spins in the states that minimize \({{{\mathcal{H}}}}\). To find these states, we note that the Φij and σi variables are not independent and use a Monte Carlo worm algorithm31 that samples only the Φij configurations compatible with the mass-conservation constraint expressed by law (iii).

We compare our numerical and experimental findings in Fig. 3b. The excellent agreement between the computed and measured structural properties confirms the predictive power of our active hydraulic laws.

We can now gain a deeper insight by investigating three asymptotic limits: JC 0 (strong ferromagnetic interactions), JC 0 (strong antiferromagnetic interactions) and JC = 0 (uncoupled streamlines). Remarkably, in the antiferromagnetic and non-interacting limits, quantitative analogies with a series of statistical field theories allow us to predict the exact scaling laws for the gyration radius and pair correlation functions of the streamline patterns.

Strong ferromagnetic interactions, namely, trivalent networks of long channels

This geometry, which corresponds to ϵ > ϵ*, is modelled by Hamiltonians where JC 0. They are the most difficult to analyse. This difficulty stems from the subextensive degeneracy of the ground states. This observation was first made on the three-colouring model32, which maps on equation (1) (Supplementary Information and Fig. 2b). The ground-state configurations of \({{{\mathcal{H}}}}\) indeed correspond to patterns of edge spins that uniformly minimize the ferromagnetic interactions. Back to the active hydraulic problem, we expect the ferromagnetic interaction to be minimized by fully nested streamlines. We never observe such configurations, neither in our experiments nor in our simulations. The reason is that we only probe metastable states of nested clusters (Fig. 3a), for which no exact prediction is currently available. We, however, fully characterize the geometry of the metastable states in finite-size systems (Supplementary Information). Despite their non-universal nature, Fig. 3b shows that our model correctly accounts for the measured gyration radius and pair correlations.

Strong antiferromagnetic interactions, namely, trivalent networks of short channels

In the limit of ϵϵ*, we can unambiguously define a net circulation around each face of the honeycomb lattice (Supplementary Fig. 9b). The handedness of the circulation around each face defines yet another classical spin variable, namely, Ω = ±1, which measures the local height h of the topographic map (Fig. 3a,b): Ω = 2h − 1. Altogether, the constraints imposed by strong activity (JA 0) and strong antiferromagnetic interactions (JC 0) translate into antiferromagnetic couplings between adjacent Ω spins. As a result, in this regime, the streamlines are nothing else but the domain walls between regions of opposite magnetization in the ground states of a frustrated Ising antiferromagnet (Supplementary Fig. 9b). We use this equivalence to exactly compute the nesting level Δh, gyration radius exponent ν and the pair correlation function C(r), that is, the probability to find two edges at a distance r in the same loop (Fig. 3b). The domain walls of the Ising antiferromagnet are obviously segregated and the nesting level is given by Δh = 1 (ref. 32). The exact predictions of the gyration radius exponent and the decay of C(r) are more complex to compute. They rely on the mapping of antiferromagnetic Ising models on the loop O(1) theory33 (Supplementary Information). Using this mapping, we find ν = 4/7 (refs. 34,35) and C(r) ≈ r−1/2. These three exact predictions agree with our experimental findings and numerical simulations in the limit ϵ < ϵ* (JC 0) (Fig. 3b and Supplementary Information).

Vanishing edge-spin interactions, namely, uncoupled streamlines

Finally, when the coupling between adjacent edge spins vanishes (JC = 0), our model reduces to Baxter’s three-colouring model24. It consists of colouring the edges of a honeycomb lattice (Fig. 2c). Baxter’s model maps on an exactly solvable statistical model of interacting loops known as the loop O(2) model (Supplementary Information). The loops of this model identify to the streamlines of the active fluid. Using this second powerful analogy, we find that the gyration radius exponent should be ν0 = 2/3 (ref. 35), and that C(r) ≈ r−1. Remarkably, these two exact predictions agree with the values measured in our experiments and simulations at the crossover between the ferromagnetic and antiferromagnetic regimes (Fig. 3c).

Altogether, the agreement between our experiments and theories establish the predictive power of our spin model, which accurately describes the random geometry of frustrated active hydraulics flows.

As a final remark, we stress that the four local laws of active hydraulics apply broadly, beyond the specifics of periodic lattices and polar active matter. They should describe the flows of any form of active fluid animated by spontaneous laminar flows in complex trivalent networks, from cell tissues to bacteria suspensions to active gels and liquid crystals.

We, therefore, expect our findings to provide a robust set of design rules for active microfluidic devices and offer new insights into the dynamics of groups of living cells and animals in heterogeneous environments and complex habitats36,37,38.

Methods

Quincke roller fluids

The experimental setup is described elsewhere39,40. In short, we use polystyrene colloids with a radius of 2.4 μm (Thermo Scientific G0500) dispersed in a solution of hexadecane including 5.5 × 10−2 wt% of dioctyl sulfosuccinate sodium salt. The microfluidic devices are made of two electrodes spaced by a 25-μm-thick double-sided tape. We pattern the bottom surface of the device with channel networks. They are made of a 2-μm-thick layer of insulating photoresist resin (Microposit S1818) patterned by means of standard ultraviolet lithography39. In all our experiments, the networks have the shape of a honeycomb structure. The width of the channels is 200 μm and we vary their lengths from 120 to 220 μm. The overall size of the channel network is in the order of 1.5 × 1.5 cm2.

The electrodes are glass slides coated with indium tin oxide (Solems, ITOSOL30; thickness, 80 nm). We start the experiments by homogeneously filling the microfluidic chambers with the colloidal solution. Then, we let the colloids sediment on the bottom electrode. The average packing fraction of the colloidal monolayer is approximately equal to 30% in all our experiments. We operate at this packing fraction to make sure that our active fluid remains in the polar liquid state, far from the flocking-transition threshold. Within our experimental conditions, homogeneous polar fluids form when the packing fraction exceeds ~10% (ref. 6). We then apply a d.c. voltage of 110 V to trigger the Quincke instability and cause the colloids to roll at a constant speed of v0 ≈ 0.8 mm s−1 on the bottom electrode. Each experiment is repeated from six to ten times.

Measurement of velocity fields

Once the active flow reaches a steady state, we image the whole network for 5 s with a Nikon AZ100 microscope. We record the videos with a Luxima LUX160 camera (Ximea) at a frame rate of 200 fps. To measure the velocity field v, we use a conventional particle imaging velocimetry (PIV) instrument. In practice, we use the PIVlab MATLAB R2019b package41. The PIV box size is 48 × 48 μm2, and the PIV boxes overlap over a half of their size (Extended Data Fig. 3a,b). In all our measurements, we find that the boundary condition of the velocity field close to the confining wall of the channels is a full-slip condition, in agreement with all the previous experiments on colloidal roller fluids.

Before constructing the streamlines, we average the velocity field over the width of each channel (Extended Data Fig. 3). We define the average velocity in each channel as a scalar quantity. We use the bipartite geometry of the honeycomb lattice to define its sign. Our sign convention is more easily explained using the sketch shown in Extended Data Fig. 3c. Denoting the two sublattices by ‘a’ and ‘b’ in this figure, we choose to assign a ‘+’ sign (blue colour) to the velocity when the fluid flows from the a node to the b node and a ‘−’ sign (orange colour) when the fluid flows from the b node to the a node.

Density and current fields

To measure the local current fields j(r) ≡ ρ(r)v(r), we measure the density and velocity field in two different videos of the same experiment. For both measurements, we use a Hamamatsu ORCA-Quest qCMOS camera mounted on a Nikon AZ100 microscope with a ×2 objective. As we cannot image the whole network at once, we perform multiple acquisitions and stitch our images, which is always possible in the steady state. To measure the density field, we perform epifluorescence imaging at 10 fps, and use the local fluorescence intensity as a proxy for the colloid density. Extended Data Fig. 4a shows that, as expected, both quantities are proportional to one another. The calibration was performed on static images using a higher magnification and using a conventional particle detection algorithm (ImageJ 1.52a).

We then use bright-field imaging and record at a higher frame rate (200 fps) to perform our PIV analysis. The PIV box size is 24 × 24 μm2. We then average both density ρ and velocity fields v over time and we multiply them to reconstruct the local current field j (Extended Data Fig. 4b–d). Finally, we measure the average current Φij along the edges of the network by averaging j over the channel joining nodes i and j.

Construction of streamlines

In this section, we detail how we analyse our data. We use the same methods and algorithms for our experimental and numerical data.

To construct the streamlines, we first define a discrete current field Φe on edge e connecting the nodes i and j. Φe can take three different values: ±1 in channels that support a net current and 0 in channel hosting vortices. In practice, we construct the Φe field as follows. We measure the average scalar product between the local velocity and unit vector pointing in the direction of a channel. The average is performed over the channel area. When this quantity is larger than 0.5, we set Φe = +1; when it is smaller than −0.5, we set Φe = −1, and Φe = 0 otherwise. In our simulations Φ = ±1, 0 by definition.

Once the Φe values are defined, we can unambiguously construct the oriented streamlines along the principal axis of the honeycomb lattice. We then use a depth-first search algorithm to detect and label each individual loop in the streamlines soup42.

Once the individual loops are identified, we can readily measure their gyration radius and the probability C(r) that two edges of the lattice separated by distance r belong to the same loop (Supplementary Section IV.B).

Constructing a topographic map from an ensemble of oriented streamlines

We now explain how to quantify the nesting of streamlines. To do so, we first convert the ensemble of oriented loops into a topographic map. We denote \({{{\mathcal{F}}}}\) as the ensemble of hexagonal faces of the honeycomb network. Considering a configuration {Φe} of the current field on the edges, we define a height field hf on the faces.

Once the loops are oriented, we can define the winding number of each loop around a given face f: it is equal to ±1 when the face is lassoed by the loop, and 0 otherwise. The height field of the topographic map is then defined at a face of the network as the sum of the winding numbers of all the loops winding around this point. As a reference, the height is taken to be zero outside the network.

In practice, we recursively measure the height field hf. The procedure is easily understood from the sketch of the algorithm shown in Extended Data Fig. 5a. In short, starting from face f associated with height h, we move to the neighbouring face f′ by crossing an edge e. If e hosts a spin pointing towards the right-hand (left-hand) side, we assign the value h′ = h – 1 (h′ = h + 1). The right and left directions are defined with respect to the vector connecting the centres of f and f′. When the edge hosts no current (Φe = 0), then h′ = h. The resulting height field does not depend on the way the network is explored. This procedure is very similar to the standard mapping of loop O(n) models to solid-on-solid models26.

The reason why we introduce this mapping is twofold. First, the height amplitude \(\Delta h={\max }_{{{{\mathcal{F}}}}}{h}_{{\rm{f}}}-{\min }_{{{{\mathcal{F}}}}}{h}_{{\rm{f}}}\) is one of our key observables. It quantifies the nesting of the streamlines and distinguishes between the two phases observed in both experiments and simulations (Fig. 3 and Supplementary Section IV.B). Second, this mapping allows us to map the streamlines of the crumpled phase to the domain walls of the antiferromagnetic Ising model on the triangular lattice of faces \({{{\mathcal{F}}}}\) (Supplementary Section V.B).

Reporting summary

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