1 Introduction

Microfluidic systems using capillary-controlled pumping and valving have become increasingly sophisticated in recent years. Such systems are attractive for point-of-need-based testing because the passive nature of their operation obviates the need for active valve and pump components. A simple system with capillary-controlled pumping was presented by Juncker et al. [1] in order to detect C-reactive protein (CRP) using a fluorescent-based surface immunoassay. However, their device required 16 sequential, manual (or potentially automated) pipetting steps. Later, using a more advanced design, Gervais and Delamarche [2] demonstrated a fluorescence sandwich immunoassay on a capillary-driven system for measuring CRP concentrations.

More complex capillary-driven microfluidic systems have been enabled by the development of capillary trigger valves, which first appeared in the scientific literature in Siljegovic et al. [3]. Although early trigger valve implementations, such as those presented by Zimmermann et al. [4], suffered from reliability problems, later implementations, reported by Safavieh and Juncker [5], have proved to be more robust. Capillary trigger valves along with retention burst valves allowed Safavieh and Juncker [5] to demonstrate the pre-programmed delivery of multiple reagents to perform a CRP immunoassay.

Development of complex capillary-driven microfluidic networks is challenging without the use of suitable modeling techniques. Computational fluid dynamics (CFD) has been used to model capillary-driven flows in detail using the volume-of-fluid method (VOF) [6,7,8,9]. However, CFD using VOF requires high computational power and is practically intractable for large capillary-driven systems where a fine mesh is often needed to resolve an interface that is moving through the computational domain. Simplified modeling techniques using electric circuit analogy have been shown to offer both a high level of accuracy in predicting the interface position as a function of time and computational efficiency (several orders of magnitude faster than predictions from CFD using VOF) [7, 8, 10,11,12,13]. However, the proposed models using electric circuit analogy are primarily developed for single-phase flow and simplified systems. Furthermore, analytical solutions for two-phase flow inside a complex network using electric circuit analogy would be tedious to establish and difficult to adapt to different system designs.

In light of the limitations of previously detailed two-phase flow models in the literature, additional reporting is warranted for the implementation of a robust, easy-to-use modeling environment for capillary-driven microfluidics. In this work, we present a modeling framework for capillary-driven flow in closed complex microfluidic networks using electric circuit analogy. Validations of this model are carried out by comparison with experimental and analytical results for specific microfluidic structures. A complex fluidic network is also modeled using the proposed framework in order to demonstrate its capabilities.

2 Mathematical framework for complex fluidics

The flow inside a channel is modeled using the electric circuit analogy detailed in Table 1.

Table 1 Electric circuit analogy

The electrical current in a wire is proportional to the voltage applied to its extremities and inversely proportional to its resistance (Ohm’s law). Similarly, for fluid flow in a channel, the volumetric flow rate is proportional to the pressure difference at its extremities and inversely proportional to its hydraulic resistance (Hagen–Poiseuille’s law). It is worth noting that Hagen–Poiseuille’s law is valid for a fully developed, laminar, viscous and incompressible flow [11]. The electric circuit analogy thus allows representing channels with equivalent resistances and the driving pressure by a voltage source. The equivalent circuit model for capillary-driven two-phase flow in a single channel is shown in Fig. 1. Three components are present in the equivalent electrical circuit: a hydraulic resistance for the liquid phase, a pressure jump due to the presence of the liquid–gas interface and a hydraulic resistance for the gas phase.

Fig. 1
figure 1

Channel with a liquid flow inside and its equivalent circuit model when two-phase flow is considered. \(\theta\) is the contact angle between the liquid and the walls of the channel. \(R_l(x)\) is the hydraulic resistance in the liquid phase. \({\Delta}P_c\) is the pressure jump across the liquid–gas interface. \(R_g(x)\) is the hydraulic resistance in the gas phase. \(Q_1\), \(Q_2\) and \(Q_3\) are the flow rates in \(R_l(x)\), at the interface and in \(R_g(x)\), respectively

In this paper, closed complex microfluidic networks are considered. It means that the channels in the network possess top, bottom, right and left walls; these channels are referred to hereafter as closed channels. It can be interesting in a closed network to remove at specific locations the top surface to be able, for example, to image locally inside the network. Channels without a top surface are referred to hereafter as open channels. In this paper, all channels are by default closed unless it is explicitly mentioned that a channel is open. The hydraulic resistance for a closed rectangular channel of width w, height h and length L for a fluid with a viscosity \(\mu\) is calculated using the well-known relation in Cornish [14]:

$$\begin{aligned} R_{{\rm closed}}=\frac{12 \mu L}{w h^3\left( 1-\frac{192 h}{\pi ^5 w}\sum ^\infty _{n=1,3,5}\frac{1}{n^5}\tanh \left( \frac{n\pi w}{2h}\right) \right) } \end{aligned}$$
(3)

For an open channel (absence of a top surface), the resistance is obtained by calculating the resistance for a closed channel with a height 2h and multiplying it by two:

$$\begin{aligned} R_{{\rm open}}=\frac{3 \mu L}{w h^3\left( 1-\frac{384 h}{\pi ^5 w}\sum ^\infty _{n=1,3,5}\frac{1}{n^5}\tanh \left( \frac{n\pi w}{4h}\right) \right) } \end{aligned}$$
(4)

In this work, the driving force is the capillary pressure due to the presence of liquid–gas interfaces. For a closed rectangular channel, the capillary pressure jump across an interface can be estimated using [10]

$$\begin{aligned} {\Delta}P_c=\gamma \left( \frac{\cos \theta _{{\rm left}}+\cos \theta _{{\rm right}}}{w}+\frac{\cos \theta _{{\rm top}} + \cos \theta _{{\rm bottom}}}{h}\right) \end{aligned}$$
(5)

where \(\gamma\) is the surface tension of the liquid with the gas phase, \(\theta\) is the contact angle of the liquid with different walls of the channel and the subscript indicates which wall is in contact with the liquid. For an open channel, \(\theta _{top}\) is taken to be \(180^\circ\).

From the circuit and the notations of Fig. 1, the following system of equations can be deduced using Kirchhoff’s circuit laws:

$$\left\{ \begin{array}{l} P_1=0\\ P_1-P_2=R_l(x)Q_1,\\ P_3-P_2={\Delta}P_c\\ P_3-P_4=R_g(x)Q_3,\\ P_4=0\\ Q_1=Q_2\\ Q_2=Q_3\\ \end{array} \right.$$
(6)

This system of equations can be solved numerically for a given position x of the liquid–gas interface to find \(Q_1\). From this flow rate and after a spatial discretization of the channel, the new position of the interface and the time necessary to reach it can be calculated. The resistance in the liquid and gas phases can then be adapted and the system solved again. By repeating these steps, the position (and velocity) of the interface is calculated as a function of time along this single channel.

Although gas viscosities are typically much lower than liquid viscosities, the gas phase resistance cannot always be neglected with respect to the liquid phase resistance. This is especially true for cases where the liquid has only propagated a short distance into a long structure or for cases where the cross-sectional channel dimensions are much smaller in the gas-filled sections of the network compared to the liquid-filled sections, as seen by examining Eqs. (3) and (4).

Besides taking into account the effect of the two-phase flow, the purpose of our mathematical framework is to extend the electric circuit analogy to complex fluidic networks consisting of a range of different components. Figure 2 shows the components currently implemented in the modeling framework. Single channels, successive channels of different dimensions, tapered channels, flow splitters or micropillar arrays are self-explanatory. The structure for the mixer consists of a first inlet channel, where the liquid is stopped at the mixer junction, and a second inlet channel, which allows a second liquid to trigger (or restart) the flow and induce the mixing. Additionally, capillary stop valves are considered in this model. For a capillary stop valve, the liquid flow is stopped by an abrupt change of the effective contact angle between the liquid and the inner surfaces of the valve. This change can be induced via geometry like a sudden increase in the cross section of the channel (capillary stop valve) or by a difference in the wettability of the inner surfaces (hydrophobic stop valve). A vent consists of an open channel. The components of Fig. 2 can be combined into different complex networks.

Fig. 2
figure 2

Components that can be modeled in the presented mathematical framework

As an example to describe the implementation of our mathematical framework, the complex microfluidic network of Fig. 3 is considered. It can, for example, be produced by etching channels at two different depths in a silicon substrate and closing it by a hydrophobic tape possessing openings at specific locations. The objective of this network is to mix two liquids, flow the mixture in an open channel where it can be analyzed and dry the rest of the network using a micropillar array. Therefore, a first liquid flows from the bottom left reservoir (inlet 2) into a channel and is stopped at the end of the channel by a capillary stop valve. The capillary stop valve consists in this network of a narrow and shallow channel connected to a deeper and wider channel and covered by a hydrophobic tape. The high contact angle on the top tape and the abrupt change of the geometry for the side walls and bottom surface stop the liquid at the transition between the shallow and deep channels. A second liquid is introduced in the top left reservoir (inlet 1) to trigger the stopped flow. The liquid flows into a branch containing two successive channels of different dimensions. At the end of this branch, the flow is split into the top right and bottom right branches. The top right branch contains a channel followed by an open channel where the mixture can be analyzed. The open channel is followed by a channel, a tapered channel and another narrower channel. The bottom right branch contains a channel followed by a diverging tapered channel connected to a micropillar array. The capillary pressure in this micropillar array is strong enough to dry the inlets and the channels between the inlets and the micropillar array, but not strong enough to dry the top right branch containing the open channel. Indeed, the narrow channel at the end of this branch generates a high capillary pressure that pins the liquid–gas interface to the outlet.

Fig. 3
figure 3

Analyzed complex microfluidic network. Two different depths are used for the channels as detailed afterward in Table 2. Channels without fill represent deep channels, and dashed channels represent shallow channels

Different steps in order to model the liquid flow in the complex microfluidic network of Fig. 3 are detailed hereafter.

2.1 Equivalent electric circuit

First, the equivalent electric circuit is generated for the network of Fig. 3, as shown in Fig. 4. Each resistance corresponds to a (tapered or constant cross section) channel or to a micropillar array. Successive resistances between two junctions are grouped together into a branch. Hereafter, resistances are referred to with a capital letter R and branches with a capital letter B.

Fig. 4
figure 4

Equivalent electric circuit for the network of Fig. 3. Resistances (R) and branches (B) are represented

After a junction, resistances are numerated by branch following a clockwise order. The switch from one branch to the next one happens once the resistances inside this first branch and its downstream branches are numerated. Next to the resistance number, the branches are also numerated, and when a junction is encountered the same method as for the resistances is used.

2.2 Inputs

Inputs to model the flow in the equivalent electric circuit of Fig. 4 are encoded in our framework via four tables providing the geometry and type of channels, the connections between different channels, the physicochemical properties of the liquids in the inlets and the spatial discretization of the branches.

Table 2 Geometry and type of channels for the equivalent electric circuit of Fig. 4

Table 2 contains information related to the channel geometry and type for the equivalent electric circuit of Fig. 4. For each channel, the dimensions, the branch number, the resistance number and the presence of an open channel are provided. A closed channel is characterized in Table 2 by a 0 in the column open/closed and an open channel by a 1. Different types of channels are possible, and the type of channel is characterized via a code in Table 2. For constant cross-sectional channels, code 0 is assigned. Special channels like tapered channel or micropillar arrays can also be added. For a tapered channel (labeled with code 22), the width at the end of the channel is provided too. For a micropillar array (labeled with code 11), the resistance per unit length per unit viscosity and the capillary pressure are provided as additional inputs. These two input parameters are a function of the dimensions and interspacing of the pillars and can be obtained via CFD analysis or experimentally. Based on the channel type and the presence or absence of a top surface, the suitable equations among Eqs. (35) can be used to calculate the resistance and capillary pressure inside this channel. For a tapered channel, the resistance is calculated by discretizing the tapered shape using rectangles along this channel and summing the resistances of all the rectangles. For calculating the capillary pressure in a tapered channel, Eq. (5) is used with the width of the channel at the location of the interface inside the tapered channel and with an adapted contact angle taking into account the slope of the tapered walls. This adapted contact angle is equal to the angle between the interface and the vertical plane parallel to the axis of the tapered channel at the contact point of the interface with the tapered walls.

Table 3 details the connections between different resistances of the equivalent electric circuit of Fig. 4. Each resistance can be preceded or followed by an input/output, one resistance or two resistances. Two numbers are then provided for the preceding resistance(s) and two for the following one(s). For an input/output, these two numbers are 0 0; for one resistance, the resistance number is repeated twice; and for two resistances, the two resistance numbers are provided. For resistance(s) downstream a junction, a special code is provided to distinguish if the junction is a splitter or a mixer. For the splitter, the code is 2 for the two downstream channels. For the mixer, the code is 1 for the downstream channel.

Table 3 Connections and junction codes for the equivalent electric circuit of Fig. 4

Table 4 provides the physicochemical properties of the liquids in the inlets for the equivalent electric circuit of Fig. 4. The model can handle two immiscible fluids. Here we choose to consider different miscible liquid phases in contact with air. As only liquid–gas interfaces will be considered in this paper, they are referred to hereafter as interfaces. The inlet branches and outlet branches are labeled in our model. For each inlet branch, the surface tension of the fluid with air, its viscosity, its volume and its static advancing and static receding contact angles with the solid surfaces are provided as shown in Table 4. In most experiments, the inlet reservoirs are filled in a certain order sequentially. The time of filling as well as the inlet pressure \(P_{{\rm inlet}}\) is given. For the purposes of this manuscript, gauge pressures are presumed. As can be seen in Table 4, the viscosity, the surface tension with air and the contact angles with different solid materials for all the fluids at the inlets are chosen to be identical as the option to have these properties different at the each inlet is not implemented yet in our model. The viscosity of air is 0.01846 mPa s.

Table 4 Inputs for the inlets of the equivalent electric circuit of Fig. 4

Table 5 refers to the spatial discretization for the branches of the equivalent electric circuit of Fig. 4. The spatial discretization is specified via the number of intervals in each branch.

Table 5 Spatial discretization for the branches of the equivalent electric circuit of Fig. 4

2.3 Initialization

Based on the data of Tables 2 and 4 , the resistance per unit length per unit viscosity and the capillary pressure are calculated for all channels using Eqs. (35).

Based on the connections and the codes at the junctions provided in Table 3, the direction of the flow in each branch is evaluated. It is equal to 1 in a branch if the flow is from the resistance j to the resistance \(j+1\) and equal to − 1 if the flow is from the resistance \(j+1\) to the resistance j.

The length of each branch is calculated, and each branch is spatially discretized by dividing its length by the number of intervals provided as input in Table 5.

The interfaces are placed at the beginning of the inlet channels, according to the specified time delay in Table 4.

2.4 Iterative procedure

2.4.1 Generation of the network of components

As described in Fig. 1, whenever an interface is present in a channel, the channel is split into three components: a resistance for the liquid phase, a pressure jump for the interface and a resistance for the gas phase. Starting from Tables 2 and 3, a new network containing all the resistances and interfaces as components is thus created. For each interface, two extra components are thus introduced compared to the equivalent electric circuit of Fig. 4 (one pressure jump and one resistance) and the numbers, lengths and connections of all the components in the network are updated accordingly. It is worth noting that an interface is present when a liquid is advancing in a channel to wet it or receding due the drying of the channel. This network of components is the basis of the iterative method.

2.4.2 System of equations to solve

Once all the interfaces are positioned and the network of components is updated compared to the equivalent electric circuit of Fig. 4, the system of equations to be solved is generated by writing:

  • for each component j in the network corresponding to a resistance:

    $$\begin{aligned} P_j-P_{j+1}=R_jQ_j \text {,} \end{aligned}$$
    (7)

    where \(P_j\) is the pressure at the junction of components \(j-1\) and j, \(P_{j+1}\) is the pressure at the junction of components j and \(j+1\), \(R_j\) is the resistance of component j and \(Q_j\) is the flow rate in component j. For regular closed channels filled with liquid or air and for open channels filled with liquid, the value of the resistance \(R_j\) is calculated from the multiplication of the resistance per unit length per unit viscosity of this channel with its actual length (after creating the interfaces) and the viscosity of the fluid. For tapered channels, \(R_j\) is calculated as described in Sect. 2.2. For open and dry channel, \(R_j\) is equal to 0, as an open and dry channel is equivalent to an outlet;

  • for each component in the network corresponding to an interface:

    $$\begin{aligned} P_{{\rm concave side}}-P_{{\rm convex side}}=|{\Delta}P_c| \text {,} \end{aligned}$$
    (8)

    where \({\Delta}P_c\) is evaluated by Eq. (5) using the dimensions of the channel at the location of this interface, the contact angles of the contained fluid with different solid surfaces, the slope of the tapered channel (if it is encountered) and the surface tension of this fluid with air;

  • next to each inlet in the network:

    $$\begin{aligned} P=P_\text {inlet} \text {;} \end{aligned}$$
    (9)
  • next to each outlet:

    $$\begin{aligned} P=0 \text {;} \end{aligned}$$
    (10)
  • for each component j in the network corresponding to an open and dry resistance:

    $$P_j=0;$$
    (11)
  • for successive closed components \(j-1\) and j:

    $$\begin{aligned} Q_{j-1}=Q_j\text {.} \end{aligned}$$
    (12)

For a junction between components \(j-1\), j and n representing three resistances as shown in Fig. 5, where none of the components is simultaneously open and dry, \(P_n-P_{n+1}=R_nQ_n\), \(Q_{j-1}=Q_j\) and \(Q_{n-1}=Q_n\) are replaced by

$$\begin{aligned} P_j-P_{n+1}=R_nQ_n \text { and } \,Q_{j-1}=Q_j+Q_n \end{aligned}$$
(13)
Fig. 5
figure 5

Junction between components \(j-1\), j and n representing three resistances, where none of the components is simultaneously open and dry

If an open and dry channel is present in the microfluidic network, it acts as a vent and thus as an output. The equations listed above for pressures and flow rates need to be adapted. These modifications are detailed in “Appendix 1”.

If a liquid is stopped in a channel preceding a capillary stop valve, the flow rate is set to zero in this channel as described in “Appendix 2”. Similarly, if during drying, one of the incoming branches of a mixer is dried and not the other one, the flow rate in this dried branch is also set to zero using the same method.

After assembling all the equations described above, we obtain the system of equations

$$\begin{aligned} A*\begin{pmatrix} P\\ Q \end{pmatrix} =B \end{aligned}$$
(14)

where the unknowns are the pressures P adjacent to each component and the flow rates Q in each component and where A and B are well defined.

2.4.3 Resolution of the systems of equations

Equation 14 is solved by inverting the matrix A:

$$\begin{aligned} \begin{pmatrix} P\\ Q \end{pmatrix} =A^{-1}B \end{aligned}$$
(15)

Two restrictions are added to our model. First, if an interface advances or recedes in a branch with a direction opposite to the direction predicted during initialization, its position is frozen and a warning is displayed. The user can thus decide to let the simulation run or to stop it. In order to stop the interface in a given branch, the method described in “Appendix 2” is used to update Eq. (14) and solve it again. The flow rate in this branch is then equal to 0 and all the flow rates in the analyzed network are correctly calculated.

Second, the liquid flow in each branch cannot be opposite to the direction calculated during initialization for a branch when it is filled with liquid and connected to an output. Indeed, the liquid is pinned at the outlet because of the presence of an interface. Similarly, for a branch filled with liquid and connected to a dried inlet, the liquid cannot flow back to the inlet because it is usually a big open reservoir with a low capillary pressure. If one of these two conditions is not respected, the liquid is stopped with a method similar to the one detailed in “Appendix 2” for capillary stop valves in mixers.

2.4.4 Moving interfaces

Each branch was spatially discretized during initialization with the number of intervals given in Table 5. For each branch containing a moving interface, the volume of fluid displaced during one spatial step can be deduced from the dimensions of the channels and the spatial step in this branch. In each of these branches, the time to travel one spatial step can be calculated by dividing the displaced volume by the flow rate obtained in Eq. (15). If during the time evaluated for a given branch, the interface is jumping from one channel to another one, then the spatial step is reduced to the distance until the end of the upstream channel and the time for this branch is calculated based on this distance. Among the interval times for all the branches containing a moving interface, the minimum value is selected as the global time step. Based on this time step, the volumes of liquid displaced by each moving interface can be calculated by multiplying the global time step by the flow rate in each branch containing a moving interface. The new positions of the interfaces can then be deduced from these displaced volumes knowing the dimensions of the channels where the interfaces are located.

The volume of liquid consumed from each inlet during the global time step is evaluated to verify if this inlet reservoir is dried or not. If this consumed volume becomes higher than the volume of liquid injected at the inlet in Table 4, a receding interface is positioned at the beginning of the channel next to this inlet. Receding interfaces are processed in our framework similarly to advancing ones: the interfaces are introduced in the network of components, the flow rates are calculated for the branches containing these interfaces, and then, the interfaces are displaced as described in the previous paragraph.

Once an interface reaches the end of a branch during filling, depending on the code in the downstream branch(es), different situations are possible. If a splitter is reached, the interface is removed from the upstream branch and an advancing interface is placed at the beginning of each of the two downstream branches. The viscosity of the liquid, the advancing static contact angles of the liquid with the solid surfaces and the surface tension of the liquid with air of the incoming branch are copied to the outgoing branches. If a mixer is reached and if the two incoming branches are filled with liquid, the interfaces present in the upstream branches are removed and an advancing interface is placed at the beginning of the downstream branch. If it is not the case, the interface is removed from the branch filled with liquid, this branch is kept blocked (see Sect. 2.4.2), and the resolution of the other incoming branch continues until completion. The viscosity of the liquid, the advancing static contact angles of the liquid with the solid surfaces and the surface tension of the liquid with air of the outgoing branch are copied from the incoming branches.

Similarly, once an interface reaches the end of a branch during drying for a splitter, the interface is removed from the upstream branch and a receding interface is placed at the beginning of each of the two downstream channels. The receding static contact angles as well as the surface tension are copied from the upstream channel to the two downstream channels. It is worth noting that the splitter is supposed to be dimensioned such that liquid cannot flow back from a downstream channel to the other two channels connected to it. Here this condition is implemented by inserting a pinning point at the end of B3 as explained at the beginning of Sect. 2. If an interface reaches the end of a branch during the drying of a mixer and if the two incoming branches are dried, the interfaces present in the upstream branches are removed and a receding interface is placed at beginning of the downstream channel. If it is not the case, the interface is removed from the branch that is completely dried, this branch is kept blocked (see Sect. 2.4.2), and the drying of the other incoming branch continues until completion. The receding contact angles and surface tension of the outgoing branch are copied from the incoming branches.

2.4.5 Calculating dynamic contact angles

After each time step, for each channel containing an advancing interface, the dynamic advancing contact angle \(\theta ^{d}\) is calculated using Bracke’s relation [15]

$$\begin{aligned} \cos \theta ^{d}=\cos \theta ^{SA}-2(1+\cos \theta ^{SA})\text {Ca}^{1/2} \end{aligned}$$
(16)

where \(\theta ^{SA}\) is the static advancing contact angle and \(\text {Ca}\) is the capillary number defined by \(\text {Ca}=\mu V / \gamma\) with \(\mu\) the viscosity of the liquid, V the velocity of the interface and \(\gamma\) the surface tension between the liquid phase and air. In our framework, the calculations are initialized with the static advancing contact angles and dynamic advancing contact angles are used for \(\text {Ca}<0.01\). Thus, for the first moving steps of an interface inside a channel, its velocity is high (leading to \(\text {Ca}\ge 0.01\)) and the static advancing contact angle is used. This approximation concerns only the first steps of the flow inside the channel and the error introduced is supposed here to be negligible. The dynamic contact angle calculated by Eq. (16) will be used to evaluate, with Eq. (5), the capillary pressure jump introduced by each interface in the analyzed network for the next iteration.

For the receding contact angles, only static receding contact angles are used, but dynamic ones can easily be implemented if a relation similar to Eq. (16) is available.

2.4.6 Proceeding to the next iteration or ending the iterative procedure

Once all the interfaces are moved in the analyzed network as described above, the iterative procedure of Sect. 2.4 restarts. The calculations are stopped once all the branches of the network are filled with liquid, dried or blocked.

2.5 Current limitations of the modeling framework

The electric circuit analogy implies that the flow is laminar, viscous and incompressible. This assumption is a reasonable approximation for capillary-driven flow in microfluidic networks, as Reynolds number are much lower than 2300.

The Hagen–Poiseuille’s law is used for channels perfectly straight and infinitely long and is an approximation for turns, especially for small bending radii.

The direction of the flow in each branch is calculated during initialization based on the connections in the microfluidic network. The interfaces have to move along these directions, if not they are blocked. It implies a careful design of the microfluidic network and does not allow to simulate bidirectional motion of an interface in a channel. Similarly, for a channel filled with liquid and connected to an output or for a channel connected to a dried inlet, the directions of the flow are fixed during initialization.

If a branch is not an inlet or outlet branch, two resistances at least are necessary inside this branch. This restriction is present because at each end of this branch, a junction code (see Table 4) can be present depending on the flow direction. This constraint is not difficult to fulfill. Indeed, if only one resistance is present in this type of branch, it is easy to split it into two resistances with half of its original length.

Mixing liquids with different viscosities and/or different contact angles with the solid surfaces and/or different surface tensions with air (or another fluid) is not implemented yet. Additional experimental or numerical data are necessary to establish mixing laws that will describe the evolution of these physicochemical properties during and after mixing.

Open channels can be modeled, but two open channels cannot be adjacent. Evaporation is not considered for open components.

Only few components are detailed in Fig. 2, but other structures can be easily encoded in our model.

3 Validations

Two validations of our model are provided; the data predicted by the model are compared to (1) experimental results of capillary-driven flow in a single channel and (2) analytical results of capillary-driven flow in a mixing structure consisting of two inlet channels connected to a mixing channel via a capillary stop valve.

3.1 Experimental validation

As a first validation, the flow of high purity water (HPW) in a channel etched in silicon and covered by tape is considered (see Fig. 6). In order to have a better control of the contact angle, the silicon substrate is cleaned for 15 min under UV–ozone (UVO cleaner Jelight 144AX-22), prebaked for 2 min at 145 °C and coated with vapor PEG6/9 (250 \(\mu\)l PEG, 2h bake at 145 °C, vacuum). The tape is Thorlabs product number OCA8146-2. The region of interest (ROI) is visualized using a bright field reflected light microscope (Olympus BX-UCB) and the images are recorded by a fast camera (IDT NX4-S2 Camera Gigabites). The images are postprocessed using a routine written in MATLAB that tracks the liquid-air interface using a binarization based on the gray-level scale.

Fig. 6
figure 6

Schematic view of the experiment

The depth of the structures etched in silicon is 112 μm. The width and length of the channel between the inlet and the micropillar array are 50 μm and 110 mm, respectively. The ROI is located at 4.5 mm from the inlet and is 49 mm long. The micropillar array is 6 mm wide and 12 mm long. It consists of pillars with a diameter of 30 μm in a square configuration with an interspacing between the centers of the pillars of 60 μm. The resistance of this micropillar array can be evaluated using the correlation in Taher et al. [16], and its influence on the liquid flow in the ROI is taken into account by adding an extra length of 25.5 mm to the analyzed channel, since this yields the same resistance per unit viscosity as this micropillar array. The channel between the micropillar array and the outlet is 50 μm wide and 3 mm long. Thus, the liquid flow in the ROI of Fig. 6 is modeled here by considering a channel that is 112 μm deep, 50 μm wide and 138.5 mm long. The static advancing contact angles are measured using Dataphysics Contact Angle System with a Hamilton dosing needle of 0.52 mm diameter, and the data analysis is performed with SCA 20 software. The measured values for the PEG6/9-coated silicon and the tape with HPW are \(43.5^\circ \pm 0.3^\circ\) and \(111.9^\circ \pm 9.2^\circ\), respectively. The values used for the surface tension of HPW with air, the viscosity of HPW and the viscosity of air are 0.0728 N/m, 1 mPa s and 0.01846 mPa s, respectively. The channel is spatially discretized in our model using 200 intervals.

Fig. 7
figure 7

Comparison between the experimental data and the data generated by the model for a the velocity and b the position of the interface in the ROI of Fig. 6. 0 corresponds to the starting point of the ROI. Experimental results are plotted every 20 time steps to improve readability

In Fig. 7, the experimental data and the data generated by our model for (a) the velocity and (b) the position of the liquid–gas interface are compared in the ROI of Fig. 6. The velocity of the interface is high at the beginning of the flow, because the flow resistance in the channel is low, but then it decreases with respect to time as this resistance increases. The peaks observed in the experimental results of Fig. 7a are due to the presence of the turns [17], which are not accounted for in the model. The main deviation between the experimental and modeled results of the velocity of the interface is observed during the first time steps (see Fig. 7a). It highlights the need for a model to capture the triggering of the flow from the inlet reservoir after pipetting the liquid inside. Up to now, for the triggering of the flow after pipetting, constant static advancing contact angles are used when \(\text {Ca}\ge 0.01\). The observed deviation can also be explained by the uncertainties on the measurements of the dimensions of the channel and the physicochemical properties of the fluids as well as by the correlation of Eq. (16) used to link the dynamic contact angle to the static one. As the model overestimates the velocity of the interface compared to the experimental results, especially during the first time steps, it does the same for the position of the interface, as shown in Fig. 7b. The agreement between the results generated by the model and the experimental data is overall good.

3.2 Analytical validation

In order to provide a validation against a more complex fluidic network, the mixing structure shown in Fig. 8 has been modeled analytically using a static advancing contact angle and the results have been compared with our numerical model where the option of Sect. 2.4.5 for calculating dynamic advancing contact angles was deactivated. It is assumed that the channels are etched in silicon, PEG6/9-coated and covered by a hydrophobic tape. The dimensions (width x depth x length) of channels 1, 2 and 3 are, respectively, 200 μm x 100 μm x 50 mm, 100 μm x 50 μm x 30 mm and 200 μm x 100 μm x 30 mm. All the other inputs necessary for the model (viscosity, surface tension, etc.) are copied from the first experimental validation. In such a structure, a first liquid flows in channel 2 until it is blocked by a capillary stop valve at the end of channel 2. A second liquid starts flowing in channel 1 (3 s after introduction of liquid into channel 2) and triggers the first liquid at the stop valve. The liquids coming from channels 1 and 2 are then mixed and flow in channel 3. This sequence for the liquid flow is illustrated in Fig. 9 with the results generated using our model at different times.

Fig. 8
figure 8

Schematic of the mixer structure

Fig. 9
figure 9

Schematic illustrating the liquid flow generated at different times using our model: a flow in channel 2; b flow stopped in channel 2, and flow already started in channel 1; c liquids from channels 1 and 2 mixing in channel 3

In the proposed analytical model, as the cross section \(A_{\Sigma }\) of all channels is constant, the position x of an interface inside a channel can be linked to the flow rate Q by

$$\begin{aligned} Q=A_{\Sigma }\frac{{{\rm d}}x}{{{\rm d}}t}=\frac{{\Delta}P}{R_L+\mu _LR^{\prime}x+\mu _GR^{\prime}(L-x)+R_G} \end{aligned}$$
(17)

where, for the analyzed channel, \({\Delta}P\) is the pressure jump across the liquid–gas interface, \(R^{\prime}\) is the resistance per unit length per unit viscosity, \(R_L\) is the total upstream resistance, \(R_G\) is the total downstream resistance, L is the length and \(\mu _L\) and \(\mu _G\) are the liquid and gas viscosities, respectively. In the case of Fig. 8, it leads after integration to

$$\left\{ \begin{array}{l} x_2(t)=-\frac{\mu _GL_2+\frac{\mu _G}{R^{\prime}_2}\frac{R^{\prime}_1L_1*R^{\prime}_3L_3}{R^{\prime}_1L_1+R^{\prime}_3L_3}}{\mu _l-\mu _G}\\ \quad +\sqrt{\left( \frac{\mu _GL_2+\frac{\mu _G}{R^{\prime}_2}\frac{R^{\prime}_1L_1*R^{\prime}_3L_3}{R^{\prime}_1L_1+R^{\prime}_3L_3}}{\mu _l-\mu _G}\right) ^2+\frac{2 {\Delta}P_2 t}{(\mu _L-\mu _G)R^{\prime}_2A_{\Sigma ,2}}} \\ \quad\quad 0\le t\le t_2\\ x_1(t)=-\frac{\mu _GL_1+\frac{\mu _G R^{\prime}_3L_3}{R^{\prime}_1}}{\mu _l-\mu _G}\\ \quad +\sqrt{\left( \frac{\mu _GL_1+\frac{\mu _G R^{\prime}_3L_3}{R^{\prime}_1}}{\mu _l-\mu _G}\right) ^2+\frac{2 {\Delta}P_1 (t-t_{01})}{(\mu _L-\mu _G)R^{\prime}_1A_{\Sigma ,1}}}, \\ \quad\quad t_2\leq t_{01}\le t\le t_1\\ x_3(t)=-\frac{\mu _GL_3+\frac{\mu _L}{R^{\prime}_3}\frac{R^{\prime}_1L_1*R^{\prime}_2L_2}{R^{\prime}_1L_1+R^{\prime}_2L_2}}{\mu _l-\mu _G}\\ \quad +\sqrt{\left( \frac{\mu _GL_3+\frac{\mu _L}{R^{\prime}_3}\frac{R^{\prime}_1L_1*R^{\prime}_2L_2}{R^{\prime}_1L_1+R^{\prime}_2L_2}}{\mu _l-\mu _G}\right) ^2+\frac{2 {\Delta}P_3 (t-t_1)}{(\mu _L-\mu _G)R^{\prime}_3A_{\Sigma ,3}}}\\ \quad\quad t_1\le t\le t_3 \end{array} \right.$$
(18)

where the indexes indicate the channel number, \(t_{01}\) the time when the flow in channel 1 starts, \(t_1\) the time to fill channel 1, \(t_2\) the time to fill channel 2 and \(t_3\) the time to fill channel 3.

In Fig. 10, the data generated by the analytical model of Eq. (18) and by our electrical equivalent model are compared; excellent agreement is obtained.

Fig. 10
figure 10

Comparison between the data generated by the analytical model of Eq. (18) and the data generated by our model. Results are plotted every 20 time steps

During the mixing of the liquids of channels 1 and 2, a constant value of 9.60 is computed for the ratio of the flow rates in channel 1 and channel 2. As expected, it is equal to the ratio of the resistances for channel 2 and channel 1, evaluated using Eq. (3).

4 Results and discussion

This section describes in detail the results of our model for the liquid flow in the microfluidic network of Fig. 3 and the corresponding equivalent electric circuit of Fig. 4. The inputs for the model are the data of Tables 2, 3, 4 and 5 and the viscosity of air equal to 0.01846 mPa s. Three stages can be distinguished for the flow as described in Sect. 2. During the first stage, the two liquids of inlets 1 and 2 are mixed. During the second stage, this mixture splits into branches B3, containing an open channel, and B4, containing a micropillar array. During the third stage, the micropillar array dries inlets 1 and 2 and all the channels between these inlets and itself.

4.1 Mixing stage

In Fig. 11a, the liquid flow is represented in the analyzed network at different times during the mixing stage. Different phases of the flow are distinguished and the position and velocity of each interface are represented as a function of time during these phases in Fig. 11b.

Fig. 11
figure 11

a Schematic illustrating the liquid flow in the microfluidic network of Fig. 3 at different times during the mixing stage. Different phases of the flow are distinguished: P1 = filling of B5 (R12), P2 = filling of B1 (R1) and P3 = filling of B2 (R2 and R3). b Position and velocity of each interface in the branches of the equivalent electric circuit of Fig. 4 represented as a function of time during phases P1, P2 and P3. The position 0 corresponds to the starting point of the analyzed branch. Different phases of the flow are mentioned on the top part of the figure, and the transitions between resistances are indicated in italic. Results are plotted every four time steps

As seen in Fig. 11, during phase P1, liquid is introduced in inlet 2 and the flow starts in B5 with a high velocity of the interface as the resistance due to the liquid is low. Then, when the interface advances, this resistance increases and the velocity of the interface decreases. After B5 is completely filled with liquid and the liquid flow is stopped at the end of B5 by a capillary stop valve, liquid is introduced (at 0.02 s) into inlet 1 to trigger this valve and start the liquid flow in B2. During phase P3, liquids coming from inlets 1 and 2 are mixed and flow into B2. During this phase P3, at around 0.06 s, an abrupt change in the velocity of the interface can be observed in B2. It is explained by the passage of liquid from one channel into another (R2 to R3) in B2, which causes an abrupt change of the driving capillary pressure. The ratio of the flow rates in B1 and B5 during phase P3 is equal to a constant value of 1.95. As expected, it is equal to the ratio of the resistances for B5 and B1.

4.2 Splitting stage

In Fig. 12a, the liquid flow is represented in the analyzed network at different times during the splitting stage. Different phases of the flow are distinguished and the position and velocity of each interface are represented as a function of time during these phases in Fig. 12b.

Fig. 12
figure 12

a Schematic illustrating the liquid flow in the microfluidic network of Fig. 3 at different times during the splitting stage. Different phases of the flow are distinguished: P4 = filling of B3 (R4–R8) and filling of B4 (R9 and R10), P5 = filling of B4 (R10 and R11). b Position and velocity of each interface in the branches of the equivalent electric circuit of Fig. 4 represented as a function of time during phases P4 and P5. The position 0 corresponds to the starting point of the analyzed branch. Different phases of the flow are mentioned on the top part of the figure, and the transitions between resistances are indicated in italic. Results are plotted every four time steps

After B2 is completely filled with liquid, the flow splits into B3 and B4 during phase P4. At the beginning of phase P4, the interface advances faster in B3 (R4) compared to B4 (R9) even though the width and depth of the channels at the beginning of these two branches are identical. It is explained by the presence of an open channel in B3 (R5). So the distance until a vent is shorter for R4 than R9. This highlights the importance to take into account the gas phase resistance for the model. During phase P4, the liquid is flowing in B3 from R4 to R8. Thanks to the presence of the tapered transition between R6 and R8, a continuous evolution of velocity of the interface is observed when the liquid flow passes from R6 to R8 (see phase P4 in Fig. 12b), contrasting to the sudden changes observed in the other transitions during this phase P4 (due to an abrupt change in geometry). After B3 is completely filled, the liquid continues flowing in B4 and reaches the micropillar array, which will subsequently dry inlets 1 and 2. During the transition from the tapered channel (R10) to the micropillar array (R11), even with the presence of a tapered transition, a jump in the velocity of the interface is apparent because of the abrupt change of capillary pressure when going from R10 to R11. Note that the narrow channel at the end of B3 is dimensioned such that it prevents the micropillar array at the end of B4 from drying B3. Indeed, the capillary pressure in the micropillar array is 3 kPa and the pressure necessary to unpin the liquid from B3 (R8) is above 10 kPa.

4.3 Drying stage

In Fig. 13, the liquid flow is represented in the analyzed network at different times during the drying stage. Different phases of the flow are distinguished, and the position and velocity of each interface are represented as a function of time during these phases in Fig. 14.

Fig. 13
figure 13

Schematic illustrating the liquid flow in the microfluidic network of Fig. 3 at different times during the drying stage. Different phases of the flow are distinguished: P6 = filling of B4 (R11) and drying of B1 (R1), P7 = filling of B4 (R11) and drying of B1 (R1) and B5 (R12), P8 = filling of B4 (R11) and drying of B5 (R12), P9 = filling of B4 (R11) and drying of B3 (R2 and R3), P10 = filling of B4 (R11) and drying of B4 (R9 and R10)

Fig. 14
figure 14

Position and velocity of each interface in the branches of the equivalent electric circuit of Fig. 4 represented as a function of time during phases P6, P7, P8, P9 and P10. The position 0 corresponds to the starting point of the analyzed branch. Different phases of the flow are mentioned on the top part of the figure, and the transitions between resistances are indicated in italic. Results are plotted every four time steps

At the beginning of phase P6, inlet 1 is empty and B1 starts drying (a receding interface is now present). As long as inlet 2 contains liquid, the micropillar array will empty this inlet rather than moving the receding interface in B1. Indeed, the pressure gradient between the micropillar array and inlet 2 is higher than the pressure gradient between the micropillar array and the receding interface in B1 as the presence of a receding interface generates a capillary pressure that is in opposition to its capillary motion. After inlet 2 is emptied, B1 and B5 are dried during phase P7. As the channel depth and width in B1 are bigger than in B5, the capillary pressure opposite to the motion of the receding interface [see Eq. (5)] as well as the hydraulic resistance [see Eq. (3)] is both lower for B1 compared to B5. Therefore, B1 is dried before B5 during phase P7. During phase P8, B5 is completely dried, and then, during phase P9, B2 is dried. During phase P10, B4 is dried, and once the receding interface reaches the micropillar array, the flow stops because there is no more capillary pressure gradient between the two ends of the liquid plug in B4.

5 Conclusions and perspectives

In this work, a modeling framework is presented for capillary-driven flow in closed complex microfluidic networks using electric circuit analogy. It was developed to reduce the design time necessary for these networks and to decrease the number of experimental tests necessary to fabricate properly working devices.

The proposed model monitors, in the analyzed complex networks, the position and velocity as function of time for multiple interfaces between two immiscible fluids. Splitters, mixers, micropillar arrays, tapered or open channels, among others, can be modeled and combined to form unique complex networks. Dynamic contact angle models can also be incorporated in the model. This framework only needs a few inputs from the user, and it is applicable to various networks. It is built such that integrating new components can be easily done.

The algorithms are detailed and illustrated in an example that shows the capabilities of the model. The importance to consider the gas phase and not only the liquid phase is highlighted. Drying of microchannels is, to our knowledge, modeled for the first time using electric circuit analogy.

Validations of this framework are carried out by comparison with experimental and analytical results for specific microfluidic structures.

The limitations of our mathematical framework are also discussed; removing these limitations provides new prospects for future work. For example, more fluidic structures and functional components, mixing laws for the mixing of two liquids and laws governing capillary-driven flow upon introduction of liquid into a reservoir can be implemented. These laws will aim to characterize the liquid flow and its properties (viscosity, wettability, etc.) after a mixer or an inlet in microfluidic networks. Another future prospect is the fabrication of the microfluidic network of Fig. 3 to provide an experimental validation of our model for a complex microfluidic network.