1 Introduction

In microfluidics, the channel network is the basic component that transports chemical or biological samples from the inlets to the outlets (Whitesides 2006; Zhao and Yang 2011). The layout of channel networks can be rather simple, with constant width, straight channels, or the layout can be very complex, with multiple splitters, combiners, or even multiple layers. In addition, a suitable design of the width or topology of fluidic channels can modify the resistance of flow so that the channel can be used as functional units, such as valves (Gui et al. 2011; Wang et al. 2016), pumps (Zhang et al. 2007; Wang et al. 2010), droplet generators (Brouzes et al. 2009; Gan et al. 2015; Li et al. 2015; Ralf et al. 2012), micromixers (Qian and Bau 2002; Zhou et al. 2015, 2016a; Kumar et al. 2015) and separators (Liang and Xuan 2012; Lu et al. 2014; Ai and Qian 2011; Zhou et al. 2013, 2016b; Xuan et al. 2010 ).

With the purpose of the minimization of microfluidic devices, the precise control of fluid flow throughout the channel networks has become very important. Thus, it has also become quite challenging to design a suitable channel network based on the user-specified functionality. Given the characteristics of microfluidics, the flow can be categorized as low-Reynolds-number laminar flow, or it may even be simplified as Stokes flow in certain cases (Worner 2012). Therefore, the most commonly used design method is the so-called electric circuit analogy method (Oh et al. 2012). Combining with designer’s experience and intuition, this linear design method has gained success in the last couple of years, but a more rigorous design method must consider the nonlinear property of fluids, which is usually described by the incompressible Navier–Stokes equations.

Because the analytical solution of the Navier–Stokes equations rarely can be obtained, except for rather simple design domains and boundary conditions, the numerical computational method, or the so-called computational fluid dynamics (CFD) method has been used extensively to analyze the performance of the flow inside channel networks (Cao et al. 2012; Li et al. 2013, 2016; Ma et al. 2014; Song et al. 2016; Zhu et al. 2012; Xuan and Li 2015). While the CFD method can answer questions about the performance of fluids inside existing channel networks, it cannot answer the question concerning how to design a channel network in order to fulfill design requirements concerning fluidic properties and the channel’s geometrical aspects. Therefore, a design method naturally incorporates the CFD method with the numerical optimization methodology. This work presents a reasonably fast and flexible design method for designing microfluidic networks using the topology optimization method.

2 Optimization model

The optimization of the topology of fluidic channels was first proposed by Borrvall and Petersson (2003). And then Gersborg-Hansen et al. (2005) and Olesen et al. (2006) extended the optimization of fluidic topology to low and moderate Reynolds number cases. Recently, the topology optimization method has been used to design Tesla valves (Deng et al. 2010; Thompson et al. 2014; Lin et al. 2015), venturi diodes (Liu et al. 2011, 2012), passive micropumps (Deng et al. 2011, 2013) and passive micromixers (Zhou et al. 2015; Andreasen et al. 2009; Deng et al. 2012). In the optimization procedures, one artificial porous medium filled in the design domain and the optimized fluid channel is achieved by evolving the artificial porous medium into two separate phases, i.e., the fluid and solid phases, where the incompressible Navier–Stokes equations with an artificial Darcy term is used to simulate fluid motion in channels (Borrvall and Petersson 2003; Gersborg-Hansen et al. 2005)

$$\begin{aligned} &Re ({\mathbf u} \cdot \nabla ) {\mathbf u} + \nabla \cdot \left[- (\nabla {\mathbf u} + \nabla {\mathbf u}^T) + p {\mathbf I} \right] = - \alpha {\mathbf u} \\ & \nabla \cdot {\mathbf u} = \quad 0 \\ \end{aligned} $$
(1)

where Re is the Reynolds number, \({\mathbf u} \) is the fluid velocity, p is the fluid pressure. Based on the Darcy law, the artificial friction force can be expressed as \( -\alpha (\gamma ) {\mathbf u} \) where \(\alpha \) is the impermeability of the artificial porous medium. The impermeability is controlled by the distribution of the design variable \(\gamma \) representing the topology of the fluid channel

$$\begin{aligned} \begin{aligned} \alpha (\gamma ) = \alpha _{s} q (1- \gamma ) / (q + \gamma ) \\ \end{aligned} \end{aligned}$$
(2)

where \(\alpha _{s}\) is the impermeability of the solid phase, and q is a real and positive optimization parameter used to adjust the convexity of the material interpolation in Eq. (2). The value of \(\gamma \) can vary between zero and one, where \(\gamma = 0\) corresponds to the solid domain and \(\gamma = 1\) to the fluid domain, respectively. For optimizing the topology of a microfluidic channel network, the objective of the optimization can be chosen as the reduction of fluid viscous dissipation (or hydraulic resistance) inside the design domain \(\varOmega \) as (Gersborg-Hansen et al. 2005; Liu et al. 2011)

$$\begin{aligned} \varPhi ({\mathbf u},\gamma ) = \left[ (\nabla {\mathbf u} + \nabla {\mathbf u}^T) :(\nabla {\mathbf u} + \nabla {\mathbf u}^T) + \alpha (\gamma ) {\mathbf u} \cdot {\mathbf u} \right] \end{aligned}$$
(3)

for a fixed driving flow rate at the inlet and zero fluid stress at the outlets. In order to fulfill certain functionalities of microfluidic devices, the user-specified flow rates at the outlets are usually arranged as design constraints. In addition, the volume of the fluid channel also must be limited in order to produce consistent optimized results.

Currently, the aforementioned optimization model has been successfully implemented via advanced optimization algorithm (Gersborg-Hansen et al. 2005; Olesen et al. 2006; Deng et al. 2010; Liu et al. 2011). However, a successful design still depends on the designer’s experience with numerical analysis and optimization. At the same time, most optimization algorithms work more like a gray box, which cannot be understood quickly by a new designer. This situation limits the application of topology optimization method in microfluidics. Based on the authors’ previous works related to hydrodynamic optimization (Liu et al. 2011), a novel and straightforward optimization procedure for designing microfluidic channel networks is proposed as the following steps:

  1. 1.

    Solving incompressible Navier–Stokes equations inside the design domain \(\varOmega \) with the following boundaries conditions: fixed flow rate at the inlet, zero fluid stress at the outlet and no-slip conditions at the other boundaries.

  2. 2.

    Solving the so-called (in this work) reference incompressible Navier–Stokes equations inside the same domain \(\varOmega \) , user-specified flow rates at the outlets, zero fluid stress at inlet and no-slip conditions at the other boundaries. In the reference Liu et al. (2011), the values of the reaction forces at the outlets is calculated as the Lagrange multipliers in order to implement equal constraints of the flow rates of the outlets. The setup of the reference incompressible Navier–Stokes equations insides the design domain \(\varOmega \) has the similar effect as the calculation of artificial reaction force but with much simplified computational setup.

  3. 3.

    The objective of the optimization equations is chosen as the minimization of \(\int _{\varOmega } (\varPhi _{\mathrm{real}} + \varPhi _{\mathrm{ref}}) \,d\varOmega + \beta \int _{\varOmega } |\varPhi _{\mathrm{real}} - \varPhi _{\mathrm{ref}} |\,d\varOmega \), where \(\varPhi _{\mathrm{real}}\) and \(\varPhi _{\mathrm{ref}}\) are the viscous dissipations for the fluidic problem in the aforementioned first and second step, respectively, and \(\beta \) is the scalar number used to penalize the difference between the \(\varPhi _{\mathrm{real}}\) and \(\varPhi _{\mathrm{ref}}\). By this method, the flow rate constraint of outlet in the real model is realized.

  4. 4.

    The sensitivity of the objective of the optimization problem in the third step can be calculated using the adjoint method (Gersborg-Hansen et al. 2005; Olesen et al. 2006; Liu et al. 2011). And the design variable is updated based on the values of the sensitivity vector and the user-specified step size.

The above four steps run iteratively until the value of the optimization objective is minimized and all the flow rate constraints at the outlets are satisfied. The unique characteristic of the proposed method is that the challenging, multiple constrained optimization problems have been transformed into an easy-to-solve, unconstrained, optimization problem. At the same time, the original non-convex optimization problem caused by the flow rate constraints has been relieved in part by choosing the viscous dissipation of the reference flow as the auxiliary objective.

Fig. 1
figure 1

Computational domain and the design domain (gray sub-domain) for the channel network (color figure online)

Fig. 2
figure 2

Results of a the topology optimization and b electric circuit analogy method for the three-outlet channel with the ratio of flow rate 1:4:9

Fig. 3
figure 3

Designed channels with the equal ratio of flow rate at the outlets. a Three-outlet channel with the ratio of flow rate 1:1:1; b four-outlet channel with the ratio of flow rate 1:1:1:1; c five-outlet channel with the ratio of flow rate 1:1:1:1:1

Fig. 4
figure 4

Optimization history of the normalized viscous dissipation (a) and residual of flow rate at the outlets (b) for the three-outlet channel with the equal ratio of flow rate

3 Numerical implementation

In order to demonstrate the effect of the proposed optimization method, channel networks with specified flow rates on three, four and five outlets were optimized for the fixed driving inlet flow rate. In order to limit the volume of the microfluidic channels, the volume of the non-channel part is used as the denominator to construct a composite objective with fluid viscous dissipation. In this work, we restricted our design to the two dimensional flow channels. And the reported method can be extended to the three dimensional case directly. The finite element method was used to solve the nonlinear Navier–Stokes equations. The optimization iterations were stopped when the \(|(fr_i - fr_i^*)/fr_i^* |\) was less than 0.02 at all outlets, where the terms \(fr_i\) and \(fr_i^*\) are the actual and desired values of the flow rate at the \(i\hbox {th}\) outlet, respectively; and the \((\int _{\varOmega } \phi _{\mathrm{real}}^i \,{\mathrm{d}}\varOmega - \int _{\varOmega } \phi _{\mathrm{real}}^{i-1} \,d\varOmega ) / \int _{\varOmega } \phi _{\mathrm{real}}^{\mathrm{ini}}) \,{\mathrm{d}}\varOmega \) was less than 0.005, where the terms \(\phi _{\mathrm{real}}^i\) and \(\phi _{\mathrm{real}}^{i-1}\) are the viscous dissipation on the ith and \((i-1)\hbox {th}\) iterations, and the \(\phi _{\mathrm{real}}^{ini}\) is the viscous dissipation for the initial iteration. The detailed procedure for the proposed optimization method was implemented using the commercial finite element software Comsol version 3.5 with script. The source code for the optimization algorithm is listed in Appendix A. The detailed procedure to set up the domain and boundary conditions in the Comsol graphic user interface is provided step by step in Appendix B.

Fig. 5
figure 5

Designed channels with the linear variation of flow rate at the outlets. a Three-outlet channel with the ratio of flow rate 1:2:3; b four-outlet channel with the ratio of flow rate 1:2:3:4; c five-outlet channel with the ratio of flow rate 1:2:3:4:5

Fig. 6
figure 6

Designed channels with the quadratic variation of flow rate at the outlets. a Three-outlet channel with the ratio of flow rate 1:4:9; b four-outlet channel with the ratio of flow rate 1:4:9:16; c five-outlet channel with the ratio of flow rate 1:4:9:16:25

Fig. 7
figure 7

Streamlines of fluid velocity vector for the designed channels with three outlets. a channels with the equal flow rate at the outlets; b channels with the linear variation of flow rate at the outlets; c channels with the quadratic variation of flow rate at the outlets

In Fig. 1, the computational domain is shown, and the design domain for the channel network is shown as the gray sub-domain. The flow rate constraints are specified at outlets \(\varGamma _1,\ldots , \varGamma _n\), respectively. The design domain is discretized by 130 \(\times \) 80 rectangular elements. The sum of the specified flow rate at the outlets should be equal to the flow rate at the inlet, which satisfies the incompressible property of the fluid.

After the layout of the inlet and outlet is determined, some numerical cases are conducted to show our method. Firstly, we compared the results of the electric circuit analogy method and topology optimization method for the three-outlet channel with the ratio of flow rate 1:4:9, as shown in Fig. 2. In the case that the channel width of the inlet is maintain as the same size, the structure designed by the electric circuit analogy method is consisted a group of channel, which is used to modify the flow resistance. Thus, this structure will take up more space. On the contrary, the channel designed by the topology optimization is relatively compact, which is easy to be connected to other microfluidic component. Furthermore, the structure can be simply fabricated by the photolithography method.

Figure 3 shows the optimized channel in which the ratio of flow rate at the outlets is equal, and the white area represents the fluid channel. Figure 4 shows the optimization history for the value of normalized viscous dissipation of fluid based on the initial value of the design variables and the residual of the flow rate for the three-outlet case. Furthermore, the proposed design method can deal with more general channel network design problems. Figures 5 and 6 show the same design problems but with linear and quadratic variations of the flow rate at the outlets, respectively. Figure 7 shows the streamlines of fluid velocity vector for the designed three-outlet channels with the equal, linear and quadratic variations of flow rate at the outlets.

Compared with other design methods, such as the electric circuit analogy method that the detailed shape of the channel may depend on the designer’s experience and personal preference, the numerical optimization method can simultaneously obtain the optimized topology and shape of the channel network.

Sometimes, the inlet does not have to be set in the center of the structure. So before the channel network optimization is carried out, the relative position structure among the inlet and outlets should be decided by the designer. In this paper, we use the five-outlet channel with the ratio of flow rate 1:4:9:16:25 as the example to discuss the influence of inlet layout to the result. For the five-outlet channel, there are about nine types of the topological configuration, as shown in Fig. 8. In the schematic diagram, the circles represent the typical positions of the inlet. Based on the electric circuit analogy method for the microfluidic channel network, the ideal position is near the outlet with the largest flow rate when the flow rate increase monotonously from the first outlet to the last outlet, for example, 1:4:9:16:25. Otherwise, the total length of channels will increase, causing the waste of the space and manufacture expense. For instance, we design the five-outlet channel with the ratio of flow rate 1:4:9:16:25 based on the electric circuit analogy method theory. If we set \(R6=R7=R8=R9=R\), the total (the longest) channel will be 285.52R, 230.52R, 161.77R, 86.91R, 8.61R (221R, 166R, 111R, 56R, 1R) when the inlet is arranged at 1, 3, 5, 7, 9 position shown in Fig. 8.

In the same manner, the position of the inlet should be arranged at the corresponding position of the outlet with the highest flow rate. For the five-outlet channel with the ratio of flow rate 1:4:9:16:25, the optimization results for the cases with different inlet positions are shown in Fig. 9. The result indicates that the channel is getting much smooth when the inlet moves near the outlet with the largest flow rate. Besides, the structure will be compact as the elbow pipe is reduced. Therefore, the inlet layouts still obey the principle of the electric circuit analogy method. However, the inlet will be chosen at the center of the whole unit, in order to connect the upstream part conveniently, which is similar as the cases shown in this paper.

Fig. 8
figure 8

Nine types of the topological structure for the five-outlet channel. Here the line with red and black circle is shown as the possible position for inlet (color figure online)

Fig. 9
figure 9

Designed results of the five-outlet channel with the ratio of flow rate 1:4:9:16:25 for different inlet positions

4 Comments and conclusions

A flexible optimization method is proposed to design channel networks with constraints of flow rates at the user-specified outlets and a fixed driving flow rate at the inlet. Compared with the widely used electric circuit analogy method, the proposed numerical method has the following advantages and disadvantages:

  1. 1.

    The proposed design method considers the nonlinear property of the fluid. This makes the optimization results more reasonable to cases for which the fluid property cannot be simplified according the Stokes flow.

  2. 2.

    The proposed method can deal with irregular design domains. Therefore, a channel network can be compactly designed for microfluidic devices. This is a marked characteristic when the numerical discretization method, such as the finite element method, instead of the analytical type method, is used to design the microfluidic channel networks.

  3. 3.

    Designers have the flexibility to specify the relative positions of the inlet and the outlets, and the distribution of flow rate at the outlets. The optimization algorithm can search automatically for local optimal results. This makes the design task depend less on the experience of the designer.

  4. 4.

    The boundary conditions for the inlets and outlets are specified as the flow rate conditions rather than as fixed velocity profiles. Therefore, the designed channel networks can be connected directly with other microfluidic functional units. In addition, it is possible to combine the commonly used analytical design method with the proposed numerical design method in order to design large-scale microfluidic devices.

  5. 5.

    Currently, this method discussed the design of a microfluidic channel for only one fluid. For the mixing functional unit that deal with more than one fluid, one can design channels which have predefined outlet flow rates separately for each fluid that exists in multiple layers.

  6. 6.

    Because both the incompressible Navier–Stokes fluid problem and the numerical optimization problem are nonlinear problems, it is not surprising that the optimized results might converge to different local optimal results when different optimization parameters are chosen. In order to obtain a reasonable design, it is necessary to try different optimization parameters and then compare the results that are obtained. In the attached computer code, the default values of the optimization parameters have been listed for the numerical examples in Figs. 5, 6 and 7. For the case that the variation of the flow rate at the outlets is not large, the default values of optimization parameters work quite robust. Otherwise, one must increase the value of penalty parameter \(\beta \) in order to obtain a converged result.

  7. 7.

    In this work, we only considered the optimization of a single objective. In order to improve the robustness of the designed channel that can tolerate variations in the design conditions, such as the ratio of flow rate at the outlets has limited variation when the flow rate at the inlet changes slightly, one must consider optimization for multiple objectives. This kind of design task can be extended based on the current optimization method.

  8. 8.

    For the design method used in this paper, the smoothness of the boundary of the channel depends significantly on the number of design variables used to express the topology of the channel network. Therefore, designers must balance the quality of their design results and the computational time required for a design procedure.

  9. 9.

    The optimization cost depend on the accuracy of the discretization, such as the number of elements used to discretize the design domain, and the order of interpolation used to discretize fluid velocity and pressure. For the numerical examples in Fig. 1, the time cost for an optimization procedure was less than seven minutes on a personal computer with an Intel i5 2.66 GHz CPU and 4 GB RAM. Currently, this is a standard hardware setup for personal computers. Based on the Moore’s law pertaining to transistors in integrated circuits, it is optimistic to forecast that the proposed method can be used for the design of large-scale, multiple-layer channel networks in the immediate future.

In conclusion, we have demonstrated the capability of the topology optimization method for the design of microfluidic channel network. We hope this work makes the computational fluid dynamics-based design of channel networks for microfluidic devices more straightforward and efficient.