Proceedings of the 2nd European Conference on Microfluidics - Microfluidics 2010 - Toulouse, December 8-10, 2010 DRAFT µFLU10-95 COMPUTATIONAL OPTIMIZATION OF MICROFLUIDIC DEVICES VIA GENETIC ALGORITHMS Silvia Carlotto*1, Antonino Polimeno1 1 Dipartimento di Scienze Chimiche - Università degli Studi di Padova - 35100 Via Marzolo 1, Padova, Italy silvia.carlotto@unipd.it, antonino.polimeno@unipd.it KEY WORDS Shape optimization, genetic algorithm, microchannels, second order reaction ABSTRACT In this work we discuss the development of new computational strategies based on the application of evolutionary computing algorithms for the in-silico design and optimization of MicroFluidic Devices (MFD) aimed at chemical synthesis. Evolutionary algorithms are stochastic global optimization methods inspired by the biological mechanisms of evolution and heredity. In particular we present an optmization procedure of prototypical microfluidic device which is host to a generic second order chemical reaction A + B C. A heuristic method is applied to the search of the best performing geometry, which assures a high yield in terms of product C ad a fixed exit point of the microcircuit, given initial concentrations and flows of reactants A and B at two inlet points. The microfluidic circuit is represented by a binary code as a succession of empty and filled elementary cells and artificial evolution, based on a standard genetic algorithm, is employed to select the best performing specimen. 1. INTRODUCTION Chemists know that the reactivity of any molecular system is greatly modified by the surrounding environment, most of the times a fluid medium, and an active area of research is nowadays the study of the characterization and description of the influence of flow properties on chemical reactivity. The result of a chemical synthesis is clearly dependent on the reaction conditions: solvent, temperature, catalyst, concentration, the kind of starting materials and functional groups. This is particularly evident in the framework of the exploding research activity in microfluidics, which exploits the benefits of micro-sized apparati relative to systems of conventional size by profiting of controlled characteristics of fluids flow in microchannels [1-5]. Amongst several perspectives we highlight the design of microfluidic devices (MFDs) operating as micro-reactors for chemical synthesis, in which both the kinetic and the selectivity of the reaction can be controlled by tuning the regime of the solvent flow. For example, in case of laminar flow at small Reynolds numbers, the molecular diffusion across fluidic interfaces controls the reaction rate in absence of turbulent mixing. Usage of MFDs with size of the order of few tens of microns would offers the possibility to slowdown and probe ultra-fast reactions, and to directly intervene in the time-scale of the single steps of the reaction mechanisms [6-9]. We discuss in this contribution the development of new computational strategies based on the application of natural or evolutionary computing algorithms for the in-silico design and optimization of MicroFluidic Devices (MFD) aimed at chemical synthesis. Genetic and evolutionary algorithms (GA) provide a framework for sampling large research spaces. They are stochastic global optimization methods [10] inspired by the biological mechanisms of evolution and heredity. In a GA program a number of artificial individuals search over the space of the problem and they compete each other to find the optimal area of the * Corresponding author 1 © SHF 2010 Proceedings of the 2nd European Conference on Microfluidics - Microfluidics 2010 - Toulouse, December 8-10, 2010 research space. The project is part of a general effort towards the computational optimization of MFDs as cost-effective set-ups for complex chemical reactions [11]. In particular, we address here an attempt to devise a simple microfluidic circuit hosting a second order reaction using predictive computational tools based on heuristic searches. When designing a microfluidic MFD the problem of its optimization needs to be addressed. Let us suppose that the purpose of the MFD is to host a chemical reaction or a set of chemical reactions. A MFD circuit is then built by putting together basic elements such has channels (for guiding flows in appointed sections the device), junctions and mixing chambers (e.g. for mixing chemicals and allowing them the time to react). Mixing times and reaction times are relevant variables in determining the performance of the given geometric set-up, which can be determined in terms of yield of a given chemical product (or set of products) given the amount of reactant entering the MFD, in a given time. For complex reaction mechanisms, the presence of several reactants and products can make the design of a well performing (in the sense described above) MFD rather difficult. We therefore would like to develop systematic computational tools for the determination of optimized circuits. To do so, we consider here the application of a heuristic global search aimed at optimizing the MFD without distinguishing basic elements, but rather considering the MFD as a whole. We select for this first test a very simple objective, i.e. to build a MFD hosting a simple second order chemical reaction A + B C in a homogenous phase. To this purpose, we adopt the following methodology: 1) within a basic geometric set-up which comprehend all possible geometries a basic codification of a MFD specimen is given - with given fixed inlet points for reactants A and B e outlet point for product C - in terms of a binary number or genotype; 2) to each phenotype corresponds a unique geometry, whose performance is calculated - via numerical solution of Navier-Stokes equations coupled to reaction-convection-diffusion equations - in terms of product yield at the outlet point (phenotype); 3) a standard genetic algorithm (GA) search [12-14] is applied by creating successive generations of competing specimens, which are allowed to transmit their genotype to descendents according to an artificial evolution scheme. The paper is organized as follows. In Section 2 the simplified geometry allowed for the MFDs are described, and the genotype / phenotype association is clarified. Section 3 is devoted to the description of the GA search. Preliminary results are presented in Section 4. Some brief considerations are summarized in Section 5. 2. THE SYSTEM An example of the system geometrical set-up is described in Fig.1a. A square grid of n n cubic cells of edge l is considered. Each cell can allow the flow of fluid or not, and it therefore assigned a code pq p, q 1, n equal to 1 or 0, according to a binary scheme. Each MFD is completely described by a twelve-ciphers binary number. Three cells have fixed code 1 and corresponds to two inlet positions for reactants A and B and one outlet position. We shall indicate the overall binary code for a given MFD with σ 11 , 12 , nn . a b Figure 1: Basic geometric set-up putting in evidence the constitutive n2 cubic cells (a) and a specimen example, with evidenced inlets and outlet (b). 2 © SHF 2008 Proceedings of the 2nd European Conference on Microfluidics - Microfluidics 2010 - Toulouse, December 8-10, 2010 Reactants A and B enter the MFD in the lower and upper inlet cells respectively on the right (cfr. Fig.1b); collection of the product and excessive reagents happens in lower outlet cell on the left. To evaluate the MFD performance (i.e. to evaluate how each genotype performs) we adopt a standard continuum description based on Navier Stokes equations, for a isothermal uncompressible fluid coupled to an advection-diffusionreaction equation [15] Dui p ˆ 2u , ui 0 i Dt ri ri , (1) Dc ˆ 2c K c c D Dt where ui is the flow velocity along the i axis ( i x, y, z ), is the solution density, is the dynamic viscosity; c is the concentration of species A, B, C and D is the translational diffusion tensor; finally K is the kinetic tensor, which in the case of a simple second order equation is assumed to have the only non-zero components K AAB K ABA K BAB K BBA KCAB KCBA k / 2 , where k is the kinetic rate constant for the reaction. Boundary conditions are chosen as follows: constant flow rate vinlet A vinlet B at the two inlet cells, with fixed unitary concentrations of species A and B; zero normal flow and ˆ 0 of the MFD. Eqns.(1) allow to concentration derivative at each internal surface u nˆ 0 , c n evaluate the concentration fields c and their solution at a given time tmax in a chosen portion of space (e.g. the outlet cell) can be considered a function of the MFD genotype only, i.e. of the binary code σ . 3. HEURISTIC SEARCH The general idea behind a standard GA search is very simple. The GA search is started by an initial collection of individuals (generation). Population members are tested and assigned a fitness value (see below). Individuals with higher fitness value have an higher probability to be selected for the next generation, when a new population is created by mutation and recombination operators. Generations are bred till a maximum number is reached or some termination criterion is satisfied. In our case, an initial set of N genotype specimens is randomly generated for generation 1, σ , σ , 1 1 1 2 , σ1N ; each specimen is tested by solving eqns.(1) in time up to t tmax and it is ranked according to a fitness given by the value assumed by the total concentration of species C in the outlet box at time tmax , s , s , 1 1 1 2 , s1N . For the m -th generation and the j -th specimen the general expression for s mj is s m j drcC r, tmax outlet cell drc A r, 0 , (2) inlet A cell Following a standard GA procedure, we then breed a second generation of specimen by i) intercrossing of specimen genotypes, where a specimen j has ii) a probability to be a parent linearly dependent of rank s1j and iii) random mutations of the new genotypes (recombination + tournament selection + random mutation). 3 © SHF 2010 Proceedings of the 2nd European Conference on Microfluidics - Microfluidics 2010 - Toulouse, December 8-10, 2010 Figure 2: Best performing specimen for the first 9 generations (see text for further details). Probabilities of mutation and crossover are chosen equal to pm 0.05 and pc 0.95 respectively [16]. The second generation σ12 , σ 22 , , σ 2N is tested in the same way and the cycle is repeated for a total of M generations. Notice that, at each new generation breeding, all unconnected specimens (i.e. without links allowing mass transfer among inlets and outlet) are discarded. The whole procedure is implemented in a C code which employs the open source library OpenFoam® [17] for the solution of the Navier-Stokes flow in laminar conditions, and uses a standard iterative solution of the convection-diffusion equations [18]. The following parameters are employed: diffusion coefficients DA DB DC 5.0 109 m 2s -1 , rate constant k 0.1 m6 Kgmol-2s-1 , kinematic viscosity / 1.0 106 m2s-1 , inlet velocities vinlet A vinlet B 1.0 104 ms -1 , unitary initial concentrations of species A (lower inlet) and B (upper inlet). The system dimensions are established choosing the elementary cell edge l 4.0 104 m and the number of cells n 12 ; generations of N 25 specimens are tested with tmax 50 s . The value of the rate constant is a typical value for a diffusion control reaction. In this preliminary battery of tests we choose to explore a limited and fixed number of generations, M 12 . 4. RESULTS The GA search is performed on a single dual core node of the Linux Cluster Avogadro of the University of Padova, for a total of 8 CPU. Each generation is tested in 5 hours. In this first attempt, no particular care is taken for code optimization, although future extensive studies will be conducted to reduce overall CPU time. We present a few selected outcomes. Although the character of this study is exploratory, we can try to draw a few interesting observations, confirming the validity of the global heuristic approach. We start by showing in Fig.2 the best performing specimen for each of the first nine generations, i.e. in essence the artificial ‘evolution’ of the MFD device in time. In general, and within the limited scope of this preliminary investigation, we can observe that mutations play a significant role in the specimen evolution, as can be seen from Fig.3 which shows for the m -th generation the best performance value, i.e. s max s1m , s2m , 4 , sNm . © SHF 2008 Proceedings of the 2nd European Conference on Microfluidics - Microfluidics 2010 - Toulouse, December 8-10, 2010 Figure 3: Increasing performance, measured by index s max s1 , s2 , m m , sNm for m 1, 12 . The best performing specimen selected at the end of the search is shown in Fig.4 and Fig.5. In Fig.4 the geometry is shown on the left and the stationary flow field - which is reached after less than 1 s - on the right. The stationary velocity field shows that the low Reynold number / laminar regime is maintained. In Fig.5 a colormap representation of the concentrations of species A, B and C is used to show separately the amount of the three solutes at tmax . Figure 4: Geometry and stationary flow ( u u ) for the best performing specimen of the last generation (see text for further details). 5 © SHF 2010 Proceedings of the 2nd European Conference on Microfluidics - Microfluidics 2010 - Toulouse, December 8-10, 2010 Figure 5: Concentration of species A, B, C at 4. t tmax in the best performing specimen. CONCLUSIONS Heuristic searches by their very nature do not assure that absolute extremes are found. Termination criterions are not easily defined, and in most cases, in a standard GA search one is content with a limited exploration of sample space, essentially choosing a number of generations as large as possible. The results presented in this communication point out that a global shape optimization procedure can work well for simplified MFDs geometries aimed at hosting chemical reactions. The development procedure is extremely flexible and it would be easy add other important parameters to select the best specimen as for example the shorter exit path. Also the initial constraints, e.g. the number of inlet points, the number of outlet points or the number of reactants, can be varied to devise MFDs with different requirements. Further extensive quantitative comparisons and application to more complex systems (both in terms of complex reaction mechanisms and geometries) need nevertheless to be done to fully exploit this methodology, which we plan to apply to the design of optimized MFDs aimed at hosting Multicomponents Chemical Reactions (MCR) [19]. Multicomponent reactions are convergent reactions, in which three or more starting compounds react to form a product, where basically all or most of the atoms contribute to the newly formed product. In an MCR, a product is assembled according to a cascade of elementary chemical reactions. Thus, there is a network of reactions, usually bimolecular, which all finally flow into an irreversible step yielding the product. The challenge is to conduct an MCR in such a way that the network of pre-equilibrated reactions channel into the main product and do not yield side products. The result is clearly dependent on the reaction conditions: solvent, temperature, catalyst, concentration, the kind of starting materials and functional groups. Such considerations are of particular importance in connection with the design and discovery of novel MCRs, and we intend to combine standard continuum fluid dynamics approaches to flow properties in the MFDs with the search for the best performing arrangement conducted employing evolutionary algorithms and other classes of metaheuristic optimization approaches. ACKNOWLEDGEMENTS Fondazione CARIPARO (MISCHA project, call 2007) and University of Padova PRAT (2007) are gratefully acknowledged for financial support. 6 © SHF 2008 Proceedings of the 2nd European Conference on Microfluidics - Microfluidics 2010 - Toulouse, December 8-10, 2010 REFERENCES AND CITATIONS [1] Boryczko, K., Dzwinel, W., & Yuen, D. A. (2003). Dynamical clustering of red blood cells in capillary vessels. J. Mol. Modeling, 9, 16-33. [2] Dzwinel, W., Boryczko, K., & Yuen, D. A. (2003). A discrete-particle model of blood dynamics in capillary vessels. J. Colloid. Int. Sci., 258, 163-173. [3] Boryczko, K., Dzwinel, W., & Yuen, D. A. (2002). Parallel implementation of the fluid particle model for simulating complex fluids in the mesoscale. Concurrency and computation, practice and experience, 14, 137-161. [4] Dzwinel, W., & Yuen, D. A. (2002). Mesoscopic dispersion of colloidal agglomerate in complex fluid modeled by a hybrid fluid particle model. J. Coll. Int. Science, 247, 463-480. [5] Ramaswamy, S., & Rao, M. (2001). The physics of active membranes. Comptes Rendus De L Academie Des Sciences Serie IV Physique Astrophysique, 2, 817-839. [6] Xia, Y. N., & Whitesides, G. M. (1998). Soft lithography. Annual Rev. Mat. Sci., 28, 153-184. [7] Ho, C. M., & Tai, Y. C. (1998). Micro-electro-mechanical systems (MEMS) and fluid flows. Annu. Rev. Fluid Mech., 30, 579-612. [8] Sharp, K. V., & Adrian, R. J. (2004). Transition from laminar to turbulent flow in liquid-filled microtubes. Exp. Fluids, 36, 741-747. [9] Herwig, H. (2002). Flow and heat transfer in micro systems: is everything different or just smaller? ZAMM-Z Angew Math. Mech., 82, 579-586. [10] Liu, J., Zhong, W., & Jiao, L. (2010). A multiagent evolutionary algorithm for combinatorial optimization problems. IEEE Trans. On System, Man, and Cybernetics-Part B; Cybernetics, 40, 229240. [11] http://www.chimica.unipd.it/mischa [12] Holland, J. (1975). Adaptation in natural and artificial systems. Ann Arbor: University of Michigan Press. [13] Davis, L. D. (1991). Handbook of Genetic Algorithms. Van Nostrand Holland. [14] Liu, J., Zhong, W., & Jiao, L. (2010). A multiagent evolutionary algorithm for combinatorial optimization problems. IEEE Trans. On System, Man, and Cybernetics-Part B; Cybernetics, 40, 229240. [15] Kundu, P. K., & Cohen, I. M. (2008). Fluid Mechanics, IV ed. Elsevier, Holland. [16] Cao, Y. J., & Wu, Q. H. (1999).Teaching genetic algorithm using matlab. J. Elect. Enging. Educ., 36, 139-153. [17] http://www.openfoam.com [18] Press, W. H., Teukolsky, S. A., Vetterling, W. T., & Flannery, B. P. (1995). Numerical Recipes in C, II ed. Cambridge University Press. [19] Zhu, J., & Bienayme, H. (2005). Multicomponents Reactions. Wiley. 7 © SHF 2010