Ivana Kundacina‡
*a,
Ognjen Kundacina‡b,
Dragisa Miskovicb and
Vasa Radonica
aUniversity of Novi Sad, BioSense Institute, Dr Zorana Djindjica 1, 21000 Novi Sad, Serbia. E-mail: ivana.kundacina@biosense.rs
bThe Institute for Artificial Intelligence Research and Development of Serbia, Fruskogorska 1, 21000 Novi Sad, Serbia
First published on 31st January 2025
Microfluidic technology, which involves the manipulation of fluids in microchannels, faces challenges in channel design and performance optimization due to its complex, multi-parameter nature. Traditional design and optimization approaches usually rely on time-consuming numerical simulations, or on trial-and-error methods, which entail high costs associated with experimental evaluations. Additionally, commonly used optimization methods require many numerical simulations, and to avoid excessive computation time, they approximate simulation results with faster surrogate models. Alternatively, machine learning (ML) is becoming increasingly significant in microfluidics and technology in general, enabling advancements in data analysis, automation, and system optimization. Among ML methods, Bayesian optimization (BO) stands out by systematically exploring the design space, usually using Gaussian processes (GP) to model the objective function and guide the search for optimal designs. In this paper, we demonstrate the application of BO in the design optimization of the microfluidic systems, by enhancing the mixing performance of a micromixer with parallelogram barriers and a Tesla micromixer modified with parallelogram barriers. Micromixer models were made using Comsol Multiphysics software® and their geometric parameters were optimized using BO. The presented approach minimizes the number of required simulations to reach the optimal design, thus eliminating the need for developing a separate surrogate model for approximation of the simulation results. The results showed the effectiveness of using BO for design optimization, both in terms of the execution speed and reaching the optimum of the objective function. The optimal geometries for efficient mixing were achieved at least an order of magnitude faster compared to state-of-the-art optimization methods for microfluidic design. In addition, the presented approach can be widely applied to other microfluidic devices, such as droplet generators, particle separators, etc.
The designing methods of micromixers often rely on passive mixing strategies, with microchannels enriched with different geometric features like herringbone structures,16,17 or staggered obstacles18,19 to induce chaotic advection and enhance mixing. Another approach enables mixing by increasing the contact area between fluids using suitable channel geometry – serpentines,20,21 twisted channels,22 zigzag channels,23 etc. One of the common examples of passive micromixers is the Tesla micromixer, which utilizes specially designed channel structures to direct fluid flow and create vortices that enhance mixing.24 Modified Tesla micromixers are frequently encountered in the literature due to their versatility and efficiency. These modifications often aim to optimize mixing performance by adjusting geometric parameters, making them suitable for a wide range of applications and flow conditions.25,26 On the other hand, active mixing strategies involve acoustic waves,27,28 electric and magnetic fields29,30 or electro- and magneto-hydrodynamic forces,31,32 as an external mixing actuator. However, although active mixers enable faster mixing and shorter mixer length than passive ones, their integration into complex systems is a challenging task. Recent studies are focused on finding a suitable compact geometry for a microfluidic mixer that will enable efficient mixing performances and easy integration into miniaturized systems.33,34
Machine learning (ML) is a promising tool to enhance the design and operation of microfluidic components, while also improving success rates and accelerating their commercialization.35–38 Recent studies propose different ML-based solutions for applications in droplet microfluidics39 such as convolutional autoencoders for droplet stability prediction,40 deep neural networks (DNNs) for modeling droplet flow,41 and convolutional neural networks for mixing characterization in binary-coalesced droplets.42 Various types of DNNs were used for bubble detection in channels of microfluidic devices for point-of-care diagnostics,43 for gas bubble detection and tracking in microfluidic chips studying CO2 displacement and gas–liquid exchange processes,44 and for predicting the response time of a rotating microfluidic biosensor designed to detect complex reactive proteins.45 Another application of ML is proposed in the field of nanoparticle synthesis in microfluidics where decision trees were used to optimize synthesis parameters.46 Additionally, tree-based ensemble methods were adopted to predict viscous fingering phenomena in Hele-Shaw cells, providing accurate predictions of flow instabilities.47 ML can also contribute to achieving uniform operation across different devices, reducing the need for manual intervention. In that sense, reinforcement learning was applied for flow control of continuous and segmented flow microfluidic systems.48 Beyond conventional ML-based techniques, Bayesian decision-making has been applied to microfluidic chip design to model uncertainty in the design space and select the most reliable configuration, as demonstrated in a routing-based digital microfluidic biochip synthesis method.49
Even though there is a significant interest in experimental applications, a large part of the field is focused on ML-based surrogate models that approximate computationally demanding computational fluid dynamics (CFD) simulations. For example, various types of DNNs were used to reduce the computational complexity of simulations that determine the mixing index of micromixers,50 velocity field and concentration profile of mixers,51 swirling flow pattern in cyclone separators,52 and concentrations in microfluidic concentration gradient generators.53 The end goal of these approaches is to utilize the DNN-based simulation approximations to increase the speed of manual optimization of design parameters.
To automate the design optimization process, there is an increasing number of approaches that employ various optimization algorithms to find the best set of design parameters. Similar to manual optimization, these approaches attempt to accelerate the process by incorporating ML-based surrogate models that approximate the simulations. For instance, a genetic algorithm with a DNN surrogate was proposed to optimize the mixer geometry.54 In ref. 55, a DNN surrogate is used to predict the droplet generation outcomes, while the device design is refined through a coordinate descent-like optimization procedure. A similar concept is proposed for the design optimization of single and double emulsion droplet generators,56 utilizing DNNs and boosted decision trees to predict droplet size and stability. Design optimization of micromixers with a Cantor fractal baffle, proposed in ref. 57, uses the simulated annealing optimization algorithm with a response surface analysis surrogate model. Additionally, reinforcement learning was explored for microfluidic mixer optimization, with a DNN as an efficient surrogate, allowing for the exploration of vast design spaces.58 Multi-objective optimization techniques, like the NSGA-II variant of the genetic algorithm, were used for fractal-based micromixer designs, to balance the objectives like mixing efficiency, pressure drop, and energy costs.59 NSGA-II with a Kriging interpolation surrogate model was used to minimize the required pumping power while maximizing the mixing efficiency of a mechanical micromixer.60 Similarly, ref. 61 proposes the optimization of a Cantor fractal-based AC electric micromixer in a multi-objective setting, using a response surface analysis-based surrogate. Despite these advancements in leveraging DNNs and other ML techniques to speed up optimization, there are remaining challenges related to approximation errors and the extensive simulations required for training. More specifically, using ML based surrogate models introduces approximation errors, introducing the mismatch between the function being optimized, and the real optimization goal. Additionally, a large number of simulations are required for creating a dataset for ML model training. The number of simulations required to establish the datasets for DNN/ML model training varies from 1890 and 56700 for Newtonian and non-Newtonian fluids in a micromixer, respectively, in ref. 50; 20000 for a concentration gradient generator in ref. 53; 10513 images for a velocity field and concentration profile in ref. 51; 10000 for micromixers in ref. 58; 888 and 998 for flow-focusing droplet generation in ref. 55; etc. On the other hand, using the exact CFD simulations within optimization algorithms is highly demanding, since they require a large number of objective function evaluations. For example, the approach in ref. 54 requires 600000 simulations, while the approach in ref. 59 requires 40000 simulations for micromixer design optimization. In this study, we focus on maximizing precision by using exact simulations while minimizing their number to improve efficiency. This strategic balance ensures an optimization process that is both highly accurate and resource efficient.
To address the shortcomings of the mentioned optimization algorithms, Bayesian optimization (BO) has emerged as a powerful alternative for sequential optimization of complex, computationally intensive functions requiring minimal evaluations by using a probabilistic model to guide the search for optimal solutions.62 When combined with Gaussian processes (GP),63 it efficiently models the underlying function and identifies the most promising points for evaluation, leading to a more strategic exploration of the search space. This approach avoids the need to separately train a surrogate model, which is crucial for preventing unnecessary simulations and the associated risks of approximation errors and overfitting. Recent studies use BO for a wide range of applications such as microneedle design for biologic fluid sampling,64 chemical design,65 detector design in particle physics,66 etc.
In this paper, we propose an ML-based tool for designing a micromixer using BO combined with GP. The micromixer model is created using Comsol Multiphysics®, while the BO algorithm is implemented in Python. First, we demonstrate the applicability of BO using a micromixer with parallelogram barriers, focusing on the optimization of four geometric parameters. To illustrate a higher-dimensional example, we apply the method to a Tesla micromixer modified with parallelogram barriers, optimizing nine parameters. In both cases, significant improvements in mixing performance are achieved through geometric optimization. Even though the presented study is focused on using the exact CFD simulations for design optimization, this approach can also use a surrogate model as an approximative model, further reducing the computational complexity. To showcase the effectiveness in reducing the number of required simulations, we provide a comparison of the proposed approach with state-of-the art evolutionary algorithms. The stability of BO is demonstrated through repeated experiments, confirming its consistent convergence despite small variability in the convergence speed.
max f(x), for x ∈ A, | (1) |
BO starts with an initial probability distribution, known as the prior of the GP model, which represents assumptions about the properties of the objective function before observing any data. After observing new data points, GP regression updates the posterior probability distribution of the objective function. The posterior distribution is a concept from Bayesian statistics, representing an updated belief about a function based on its prior distribution and the newly observed data. The posterior at each point f(x) is characterized by a mean function μ(x) and a variance σ2(x), representing the predicted objective function value and the predictive uncertainty, respectively. The posterior mean interpolates previously observed points, while the variance determines the width of the confidence intervals, typically expressed as μ(x) ± 1.96 σ(x), which contains the true function value f(x) with 95% probability. The variance is zero at observed points and increases as we move away from them, reflecting the model's confidence at points where data is available and its growing uncertainty in unexplored regions of the parameter space.
When making predictions and quantifying uncertainty, the GP model relies on a covariance matrix, which contains the covariances between pairs of observed points, quantifying how changes in one observed point are expected to relate to changes in another. The elements of this matrix are determined by evaluating a kernel function Σ(xi, xj) at each pair of points (xi, xj). The kernel function is a mathematical tool which computes the similarity between two points, ensuring that points close to each other in input space exhibit strong correlations. This function also reflects the underlying assumption of the GP model about the smoothness of the objective function, which dictates how gradually the function is expected to change as the input parameters vary. Commonly used kernels in GP models include the linear kernel, the rational quadratic kernel, the Gaussian or radial basis function (RBF) kernel, and the Matérn kernel,69 used in our approach. The Matérn kernel is particularly suitable for modeling functions with moderate smoothness, offering more flexibility than the other mentioned kernels that assume higher degrees of smoothness. Since microfluidic flows often exhibit moderate smoothness due to laminar flow conditions and diffusion processes, the Matérn kernel enables the GP model to capture essential variations in mixing performance without overfitting to noise. For the specific case where the smoothness parameter is set to 5/2, which we used in our work, the Matérn kernel is given by eqn (2):
(2) |
Once the kernel function is specified, a GP regression model can be formulated. Given a set of n observed data points X = [x1, x2,…,xn] ∈ m×n with corresponding objective function values y = [y1, y2,…,yn] ∈ n, the GP provides a posterior distribution over possible functions that fit the data. The mean μ(x) and variance σ2(x) predictions at a new point x are given by eqn (3) and (4):
μ(x) = k(x, X)TK(X, X)−1y, | (3) |
σ2(x) = ∑(x, x) − k(x, X)TK(X, X)−1k(x, X), | (4) |
Acquisition functions guide the input space search of the optimization process to the most promising regions by determining the next point to be evaluated and observed. These functions use the mean and variance predictions from the GP model to balance the exploration of uncertain areas and the exploitation of regions where the objective function is expected to be high. Exploration refers to investigating areas with high uncertainty to learn more about the objective function, while exploitation focuses on refining the GP model only in regions already known to perform well. Common acquisition functions include expected improvement (EI), probability of improvement, and upper confidence bound. In our work, we employed the EI acquisition function, which prioritizes selecting points with the highest expected gain over the current best observation x* (ref. 62) The EI formula for a potential next point x is presented with eqn (5):
(5) |
In summary, BO uses past data and statistical modeling to identify the most efficient way to explore and optimize challenging problems, by ensuring that the search focuses on the most promising regions. It operates through an iterative process fitting a GP model to observed data available at the current iteration to approximate the objective function. An acquisition function utilizes the model's predictions to balance exploration of new areas and exploitation of known promising regions, selecting the next point to evaluate. The objective function is evaluated at this new point, and the resulting data is added to the existing observed data. This updated dataset is used to refine the model, and the cycle continues until a stopping criterion is met, such as reaching a maximum number of iterations or achieving convergence in the objective function value. In the following sections, the potential of the BO approach in microfluidics will be examined on the example of improving the mixing performance of a micromixer with parallelogram barriers and a high-dimensional scenario will be examined on the example of a Tesla micromixer with parallelogram barriers.
Fig. 1 Layout of the micromixer with parallelogram barriers. Blue color presents a microchannel with mixing liquids. |
Fig. 2 Tesla mixer modified with parallelogram barriers and parameters used in BO. Blue color presents a microchannel with mixing liquids. |
The fluid was modeled as water, incorporating temperature-dependent density and dynamic viscosity functions available in Comsol. The Reynolds' number (Re) was calculated according to eqn (6):71
(6) |
MI = 1 − σ/σ0, | (7) |
Fig. 3 Mesh convergence test. Parameters of the micromixer with parallelogram barriers: α = 45 deg, l = 250 μm, p = 500 μm, d = 1500 μm, and Re = 1. |
Fig. 4 Schematic representation of the BO workflow. Iterative design and evaluation of micromixers in Comsol Multiphysics® to achieve optimal design and mixing performance. |
The proposed workflow is primarily implemented in Python using open-source tools, except for proprietary Comsol Multiphysics® software used for microfluidic simulations. Specifically, we utilized the Scikit-Optimize library for BO,73 which provides essential BO building blocks such as kernel and acquisition function implementations, tell function for evaluating new observations and updating the GP model, and ask function for determining the next parameters to evaluate.
To integrate Python with Comsol Multiphysics®, we employed the MPh library.74 This library includes features such as the start function to initialize the Comsol Multiphysics® software and the load function to read a Comsol model file containing the desired microfluidic design. The entire optimization process is automated and iterates for a predefined number of cycles. In each iteration, Scikit-Optimize's ask function suggests a new set of parameters that maximize the acquisition function, balancing the exploitation and exploration of the parameter space. The MPh library then modifies the Comsol model accordingly using the parameter function. The updated Comsol model is simulated using the build and solve functions, and the results are exported to a CSV file using the export function. Our Python program reads this file, computes the MI according to eqn (7), and sends this value, along with the corresponding parameters, as a new observation to Scikit-Optimize's tell function to update the GP model. Finally, the Comsol software is reset to its original state using the clear and reset functions from the MPh library, preparing it for the next iteration. After the optimization process, the optimal solution is retrieved using the get_result function from the Scikit-Optimize library.
This workflow can also be adapted for other numerical solvers, whether open-source or proprietary, as long as an integration interface is available or can be developed to perform functions similar to those in the MPh library.
The results in Fig. 5 show BO results after 14 executed iterations, upon which the optimal MI is achieved. The graph displays the GP model representing the underlying objective function with its variance, estimated from 14 observations of the MI for different angle values. The green line represents the mean of the GP model for the parameter α, with green areas indicating the 95% confidence intervals. The red dots mark the observed values, while the blue line represents the values of the EI acquisition function. The blue dot indicates the maximum of the EI function, which corresponds to the next parameter value to be evaluated in the optimization process. Although the confidence intervals are wider for multiple angle values between 20 and 140 degrees, the selected point has the highest EI due to its larger expected MI value, despite a narrower confidence interval, exemplifying a balance between exploration and exploitation. We observe that the confidence intervals approach zero near the previously observed parameter values, making these regions less favorable for exploration, as reflected by the low values of the EI function.
From the microfluidic point of view, in the case of Re = 5, the results show that as the α increases, the mixing performance decreases until approx. 30 deg, after which α does not influence the mixing performance. Afterward, the MI increases again for values larger than 140 deg. Additionally, it can be seen that there is a slight difference in mixing performance depending on the barrier orientation. For sharper angles, where the barrier is aligned with the flow direction, the resulting mixing is slightly better. Other geometric parameters of the micromixer with parallelogram barriers also significantly influence micromixing performance. The barrier width p shows a linear dependence on mixing efficiency, with larger values leading to better mixing. Similarly, greater barrier height l exhibits an exponential increase in mixing efficiency, while the greater distance between barriers d results in a linear decline in mixing performance. Results of one-parameter optimization for parameters p, l and d are presented in Fig. S1–S3.†
Fig. 6 Comparison of BO performance using different kernel functions (linear, Matérn, rational quadratic, and RBF) for optimizing four design parameters at Re = 5 (RBF = radial basis function). |
The BO process produces a GP model of the MI for each of the mentioned Re values, mapping the 4D input parameter space to a 1D output space. While a full representation of this GP model would require a 5D plot, which is not practical for visualization, the optimization results are instead visualized using two 3D surface plots for each Re value. In these plots, MI is presented as a function of two geometric parameters, with the other two parameters kept fixed, and the plot values are calculated directly from the GP model. The optimal solution is marked with a red dot. Fig. 7a, c, e and g illustrate the relationship between α and l (with parameters p and d fixed to the optimal values obtained in the optimization process), while Fig. 7b, d, f and h present the surface for parameters p and d (with values of α and l fixed), corresponding to Re = 1, 5, 10 and 100, respectively. The case of Re = 0.1 is not discussed, since complete mixing occurred across all parameter sets (driven entirely by molecular diffusion), implying that the barrier geometry had no impact on mixing performance at such low Re.
In the case of Re equal to 1, Fig. 7a shows that optimal MI values, close to 1, are achieved with α values around 10 deg, and with l close to 500 μm. As α increases beyond 100 deg or l deviates from 500 μm, the mixing performance declines significantly. On the other hand, optimal MI values are achieved when p is close to 1000 μm and d is between 1200 and 1500 μm, Fig. 7b. At Re = 1 the flow is highly laminar with no turbulence or chaotic advection occurring. Mixing primarily occurs through molecular diffusion, which is a slow process, and it is often insufficient for efficient mixing, especially over short distances. The role of the barrier geometry becomes important because these features can induce localized disruptions in the smooth, laminar flow. The barriers enhance mixing by stretching and folding the fluid flow, which increases the contact area between different fluid streams and accelerates the diffusion process between them.
At Re = 5, Fig. 7c and d indicate that optimal mixing occurs with α near 10 deg and l around 500 μm, while p and d values near 1000 μm and 1100 μm, respectively, yield the highest MI values. Although the flow remains laminar, advection becomes more influential in the mixing process. The barriers introduce disturbances that create recirculation zones and stretch the fluid interfaces, promoting enhanced mixing by intensifying diffusion through advective motion.
For Re = 10, Fig. 7e and f show similar trends, with optimal mixing achieved at α close to 10 deg and l around 500 μm. The best MI values are found with p near 1000 μm and d around 1300 μm. Though the flow is still laminar, advection plays an even stronger role. The barrier geometry amplifies recirculation and the stretching of fluid layers, significantly boosting the efficiency of diffusion. Moreover, as it can be seen in Fig. 7e, the MI function is particularly nonlinear for Re = 5, highlighting the need for using the efficient optimization algorithms such as BO.
Finally, for the case when Re is equal to 100, the analysis shows that l values close to 500 μm result in optimal performance when the barrier angle α approaches 170 deg, Fig. 7g. At higher Re, the barrier's orientation opposite to the flow direction further enhances mixing efficiency by generating stronger vortices and more chaotic flow patterns. For the parameters p and d, the analysis indicates that the optimal mixing performance occurs when d is close to 1200 μm for all values of p, Fig. 7h. In this case, the dominant mixing mechanism shifts from diffusion to advection and inertial effects, driven by the high flow velocities.
Table 1 summarizes the sets of optimal parameters proposed by BO for different Re, along with the calculated pressure drop for each case. As it was previously discussed, the results indicate a decrease in mixing performance as Re increases due to the shift from diffusion to advection and inertial effects in mixing mechanisms at higher Re. Although some studies focus on further optimizing the pressure drop to minimize resistance, in this case, the values remain significantly below the critical thresholds59,60,75 that would create substantial flow resistance within the micromixer, and it will not be further discussed.
Re | α [deg] | l [μm] | p [μm] | d [μm] | Δp [Pa] | MI |
---|---|---|---|---|---|---|
0.1 | 13 | 394.54 | 739.66 | 1697.39 | 0.00018 | 0.99 |
1 | 10 | 500 | 840.49 | 1242.75 | 0.23 | 0.99 |
5 | 10 | 500 | 1000 | 1299.00 | 2.1 | 0.82 |
10 | 10 | 500 | 1000 | 1100 | 39.1 | 0.60 |
100 | 170 | 500 | 1000 | 1100 | 656.1 | 0.54 |
In order to better illustrate the BO process, we have selected four representative iterations and displayed concentration profiles in the micromixer for different sets of geometric parameters, Fig. 8. The simulation results present the mixing of concentrations 0 and 1 mol m−3 for Re = 5. These results show the progress of the BO process through four iterations, beginning with the randomly chosen initial set of parameters and concluding with the optimal set of parameters. In the first iteration, the micromixer shows poor performance with MI = 0.17, indicating ineffective mixing, Fig. 8a. As BO iteratively refines the parameter selection, subsequent figures reveal gradual improvements in the MI, increasing to 0.43 and 0.61, Fig. 8b and c, respectively. By the final iteration, the optimization converges on the best configuration, Fig. 8d, achieving a significantly higher mixing index, MI = 0.82 and demonstrating the effectiveness of BO in navigating complex design spaces and improving micromixer performance.
Finally, we performed a sensitivity analysis over the parameter space to identify the parameters with the greatest influence on the resulting MI, providing deeper insights into design optimization. Namely, the plots in Fig. 7 cannot fully represent the GP model of MI, as they require fixing two parameters for visualization in 3D. Instead of focusing on a specific set of input conditions or local effects, we conducted a global sensitivity analysis for each Re value, offering a comprehensive metric that captures how much each parameter influences the MI estimated by the GP model, across the entire parameter space.
We employed Sobol sensitivity analysis,76 which quantifies the contributions of individual parameters and their interactions to the variance of the output. Firstly, we generated 81920 samples of four design parameters using quasi-random Sobol sampling, systematically varying one parameter at a time while holding the others constant. Next, we calculated the MI for each sampled parameter set using the trained GP model. Finally, we applied Sobol sensitivity analysis over the created dataset, utilizing the variance decomposition procedure to estimate sensitivity indices.
In Table 2 we present the total sensitivity indices for each parameter at different Re values. These indices quantify the influence of each parameter on the resulting MI, either directly or through interactions with other parameters. Higher sensitivity indices indicate a greater overall impact of the parameter on the outcome. For Re = 1, the influence of barrier length l dominates, accounting for 0.76 of the variance, as diffusion is the primary mixing mechanism. As Re increases to 5 and 10, the significance of α grows (0.42 and 0.36, respectively), reflecting its role in shaping flow patterns for moderate advection-driven mixing. For Re = 100, α and p become dominant, emphasizing their impact on chaotic advection and flow disruption at higher velocities. In addition, parameter d shows the lowest influence on the mixing performance for all Re.
Re | α | l | p | d |
---|---|---|---|---|
1 | 0.15 | 0.76 | 0.05 | 0.06 |
5 | 0.42 | 0.79 | 0.15 | 0.06 |
10 | 0.36 | 0.86 | 0.19 | 0.05 |
100 | 0.63 | 0.40 | 0.55 | 0.10 |
During the execution of each algorithm, MI encountered during Comsol simulations were recorded to track the progress. Unlike existing studies that rely on trained surrogate models to reduce computational costs, we employed direct simulations for a more accurate comparison. Fig. 9 presents the cumulative maximum MI achieved by each algorithm over the number of performed simulations. BO reached the optimal solution after 33 simulations, significantly outperforming the other methods. None of the evolutionary algorithms achieved the optimal MI within 100 simulations, although all showed a steady increase over time. When we allowed all algorithms to continue running until they reached the solution proposed by BO, PSO required 289 simulations, DE needed 580, while GA and ES did not achieve the optimal solution within 1000 simulations. These results highlight the advantages of BO in terms of convergence speed and efficiency, especially in scenarios involving computationally expensive evaluations.
The primary reason for the superiority of BO over evolutionary algorithms in terms of convergence speed is that BO leverages the GP model to predict the objective function and guide the optimization process more effectively.62 This allows BO to identify promising regions of the parameter space and converge to the optimal solution in far fewer iterations compared to evolutionary algorithms, which rely on stochastic population-based search strategies. Evolutionary algorithms excel at exploring large, high-dimensional, and complex search spaces, particularly when the global optimum lies in a small region of the parameter space. However, they lack a probabilistic model to effectively narrow down the search space.81 Consequently, these algorithms require significantly more iterations to achieve comparable solutions, making them less efficient for problems where objective function evaluations are computationally expensive.
Theoretical computational complexities of BO and evolutionary algorithms are based on fundamentally different factors (e.g., generation and population sizes for evolutionary algorithms in contrast to the number of observed points in BO). To address this, we experimentally compare their time and memory complexities. We note that the experiments were conducted using a laptop computer with an AMD Ryzen 74700 U processor running at 2.00 GHz and 16 GB of RAM. Table 3 presents additional metrics for comparing the performance of BO and evolutionary algorithms.
Metric | BO | DE | ES | GA | PSO |
---|---|---|---|---|---|
Iterations to optimum | 33 | 580 | >1000 | >1000 | 289 |
Time to optimum [s] | 1219 | 19134 | >32261 | >33019 | 9727 |
MI at 33rd iteration | 0.82 | 0.27 | 0.24 | 0.38 | 0.20 |
Time to 100 iterations [s] | 3510 | 3245 | 3137 | 3211 | 3335 |
Algo. time [s] (100 iter.) | 604 | 4.67 | 7.33 | 3.61 | 3.14 |
Sim. time [s] (100 iter.) | 2906 | 3241 | 3130 | 3207 | 3332 |
Peak memory usage [MB] | 3048 | 2626 | 2644 | 2633 | 2663 |
• The first row of the table provides a reference to the previously discussed results by showing the number of iterations (i.e., simulations) required by each algorithm to reach the optimal solution.
• The second row displays the total time to reach the optimum, a critical metric of practical interest. This time is expectedly correlated with the number of iterations required to reach the optimum for each algorithm. BO demonstrates the best performance for this metric, achieving the optimum in the shortest total time.
• The third row introduces an alternative comparison metric: the objective function value at a specific iteration, in this case, the 33rd iteration, when BO first reached the optimum. Here as well, BO demonstrates the best performance, achieving a significantly higher objective function value compared to the evolutionary algorithms.
• To compare computational efficiency per iteration, the fourth row includes the execution time required for 100 iterations of each algorithm. The results show that the times are relatively similar, with BO exhibiting higher times. To better understand this, the execution time is decomposed into two components: the time required for the algorithm itself, and the simulation time required for 100 Comsol simulations. These are detailed in the subsequent rows, followed by the peak RAM memory usage of each algorithm. A key observation is that simulation time overwhelmingly dominates algorithm execution time, which is expected given the computational cost of running simulations. Notably, algorithm execution time is independent of simulation complexity. For more complex Comsol models, this difference would become even more pronounced. As anticipated, the algorithm time for BO is higher than for evolutionary algorithms. This is because BO involves training a GP model on the observed data and maximizing the acquisition function to guide optimization, while evolutionary algorithms focus on devising a broad search strategy during their execution. As discussed, this guidance explains the faster convergence of BO. Despite being higher, the algorithm time for BO is still significantly lower than the simulation time, highlighting that the computational overhead introduced by BO remains relatively negligible compared to the cost of running simulations. Similarly, peak memory usage is higher for BO due to the additional resources needed for GP model training. In contrast, evolutionary algorithms have similar memory usage, as most of the memory is consumed by the Comsol model and the Python libraries, which are shared across implementations. It is worth noting that all the displayed memory usages are well within the capacity of computational hardware configurations of standard laptop computers, and do not pose a bottleneck.
• Lastly, the slightly lower simulation time for BO during 100 iterations can be attributed to its tendency to explore parameter values similar to the optimal ones after reaching the 33rd iteration. By chance, the simulation of these parameter combinations happens to be faster than the more diverse combinations proposed by evolutionary algorithms. However, this does not strictly imply that simulation times for BO will always be lower, as they depend on the specific parameter combinations and their associated simulation costs.
Re/Param. | K [μm] | G [μm] | P [μm] | α [deg] | β [deg] | p [μm] | l [μm] | γ [deg] | d [μm] | MI |
---|---|---|---|---|---|---|---|---|---|---|
Re = 1 | 700 | 460.66 | 1200 | 40 | 7.87 | 20 | 180 | 150 | 474.35 | 0.97 |
Re = 5 | 673.59 | 223.6 | 536.27 | 35.24 | 14.13 | 96.77 | 166.29 | 137.85 | 448.85 | 0.96 |
Re = 10 | 700 | 600 | 546.93 | 10.49 | 5 | 187.17 | 180 | 141.23 | 435.59 | 0.92 |
Re = 100 | 679.6 | 596.62 | 488.96 | 31.23 | 14.42 | 92.14 | 147.44 | 143.79 | 268 | 0.85 |
The results highlight the non-linear nature of the objective function, as evidenced by the fact that the optimal parameter values predominantly fall within the interior of the parameter intervals rather than at their boundaries. This suggests a complex interplay between parameters, where the optimal solution emerges from a balance of influences rather than being constrained by extreme values.
The model successfully converged within 70 iterations for the nine-parameter micromixer optimized using BO, indicating that the convergence properties did not significantly change with the increase in dimensionality.
Fig. 10 presents the concentration profiles of Tesla mixers modified with parallelogram barriers after BO for Re = 1, 5, 10 and 100.
Fig. 10 Concentration profiles of Telsa micromixers modified with parallelogram barriers optimized using BO for different Re (a) Re = 1; (b) Re = 5; (c) Re = 10; (d) Re = 100. |
In addition, results of the Sobol method for global sensitivity analysis are presented in Table 5. Namely, for Re = 1, the barrier width p plays a dominant role in enhancing mixing (1.01), together with the length of the vortex zone P (0.7) and the moderate impact of barrier length l (0.39). Other parameters have negligible effects on average because global sensitivity analysis evaluates the impact of each parameter by averaging its influence over the entire parameter space. Parameters with localized effects in specific regions may appear to have little to no influence when assessed across the full range of possible values. For Re = 5, the barrier length l (0.70) and barrier inclination angle γ (0.57) emerge as the most influential parameters. This indicates that at low-to-moderate flow rates, the interplay between barrier geometry and flow direction becomes critical for enhancing mixing. For Re = 10, the barrier length l (0.78) and angle of barrier inclination γ (0.46) were shown as the most influential parameters. This suggests that at moderate flow rates, parallelogram barriers dominantly influence mixing performance. Other parameters remain insignificant on average. For Re = 100, the barrier length l (0.79) and barrier inclination angle γ (0.60) continue to dominate, reflecting their importance also under high flow conditions. Notably, the distance between the wall and divider G (0.07) becomes more significant, likely due to stronger inertial effects and increased flow complexity. Parameters like the channel inclination α, divider angle β, and distance between barriers d and divider length K remain negligible on average across all Re.
Re | K | G | P | α | β | p | l | γ | d |
---|---|---|---|---|---|---|---|---|---|
1 | 0.01 | ≈0 | 0.70 | ≈0 | ≈0 | 1.01 | 0.39 | 0.03 | ≈0 |
5 | ≈0 | 0.01 | 0.04 | ≈0 | 0.05 | ≈0 | 0.70 | 0.57 | ≈0 |
10 | 0.02 | 0.01 | ≈0 | ≈0 | 0.04 | 0.09 | 0.78 | 0.46 | ≈0 |
100 | ≈0 | 0.07 | ≈0 | ≈0 | ≈0 | ≈0 | 0.79 | 0.60 | ≈0 |
In practice, material properties such as surface roughness, hydrophilicity and hydrophobicity as well as fabrication accuracy and temperature affect the mixing performance, thus, including these factors can improve simulation accuracy.
In that sense, BO can play a significant role in the post-fabrication process. Simulations can evaluate how specific parameter variations affect mixing performance, offering valuable insights into how manufacturing imperfections influence the outcome. This capability not only refines the design process but also makes the approach more accessible and practical for experimental applications. In order to prove the applicability of BO for different scenarios and illustrate the importance of an accurate simulation model, the influence of material properties, fabrication accuracy and temperature on mixing performance is examined and presented below.
The optimization was done for Re = 5 and results are presented in Table 6. In the case of hydrophilic walls (no-slip boundary condition), the optimized design achieves a MI of 0.82, indicating better mixing efficiency in comparison with hydrophobic walls (slip boundary condition) where the MI is 0.71. This outcome can be attributed to the stronger fluid–wall interaction, which promotes layered streamlines necessary for effective diffusive mixing. However, this leads to a higher pressure drop (Δp = 2.1 Pa), as the no-slip condition increases resistance to flow. On the other hand, for hydrophobic walls (slip condition), the optimized design results in a lower MI, reflecting reduced mixing efficiency. This is likely due to the weaker interaction between the fluid and the channel walls. Nevertheless, the slip condition reduces the pressure drop to Δp = 0.1 Pa, demonstrating smoother and faster flow with lower resistance.
Boundary condition/parameters | α [deg] | l [μm] | p [μm] | d [μm] | Δp [Pa] | MI |
---|---|---|---|---|---|---|
No-slip | 10 | 500 | 1000 | 1299 | 2.1 | 0.82 |
Slip | 10 | 482.3 | 1000 | 1800 | 0.1 | 0.71 |
Parameters | α [deg] | l [μm] | p [μm] | d [μm] | MI |
---|---|---|---|---|---|
Optimized model | 10 | 500 | 1000 | 1299 | 0.82 |
Deviation of α | 9.5 | 500 | 1000 | 1299 | 0.74 |
Deviation of l | 10 | 475 | 1000 | 1299 | 0.60 |
Deviation of p | 10 | 500 | 950 | 1299 | 0.79 |
Deviation of d | 10 | 500 | 1000 | 1234 | 0.82 |
Deviation (Δ = 5%) | 9.5 | 475 | 950 | 1299 | 0.56 |
Fig. 11 Examining the temperature influence on the MI for different inflow velocities. Results of optimization for 4, 20 and 80 °C. |
It is evident from results that temperature, inflow rates and boundary conditions have a significant impact on the mixing index. Therefore, before the optimization itself it is necessary to know the manufacturing technology, the materials that will be used, the operating temperature and expected inlet flows and to include them as initial conditions in the model.
Another potential limitation involves the selection of the kernel function and its hyperparameters. Although the Matérn kernel function performed well in our study with minor adjustments to the length-scale hyperparameter, selecting the appropriate kernel and fine-tuning its hyperparameters is necessary for highly nonlinear and rapidly changing objective functions. For example, when using the Matérn kernel, a smaller length-scale hyperparameter allows the model to capture rapid changes in the objective function between closely spaced points, with increasing uncertainty as the distance from observed data points grows. This complexity can further increase if the rate of change of the objective function differs significantly across different axes, as this may require using distinct length-scale hyperparameters for each parameter being optimized to accurately model variations along different dimensions. Generally, this process requires iterative optimization and some familiarity with the function being modeled.
Additionally, while multi-objective optimization is not necessary for our specific case, it is crucial in certain microfluidic design problems such as simultaneous optimization of mixing efficiency, pressure drop, and energy costs for fractal-based micromixers,59 or minimization of required pumping power while maximizing mixing efficiency for mechanical micromixers.60 Multi-objective BO is used to maximize several objectives at the same time. However, in microfluidic design, it is common to encounter objectives that compete with each other. For instance, one might aim to maximize mixing efficiency while minimizing pressure drop. To handle such competing objectives uniformly within the multi-objective BO framework, we typically reframe them for consistent treatment. For example, objectives that need to be minimized, like pressure drop, are transformed into maximization problems by negating their values. This approach ensures that all objectives fit within the standard framework of maximizing multiple outcomes simultaneously. A naive approach to implement this would be to optimize the sum of multiple objective functions using the proposed BO approach, but this can lead to suboptimal solutions where trade-offs between objectives are not properly managed. Researching multi-objective BO tailored for microfluidic design could therefore be a promising topic for further investigation. Similarly, handling constraints directly in the optimization process is not currently considered and could also be explored in future studies.
Footnotes |
† Electronic supplementary information (ESI) available. See DOI: https://doi.org/10.1039/d4lc00872c |
‡ Authors equally contributed. |
This journal is © The Royal Society of Chemistry 2025 |