Optimization of microcircuits for chemical mechanisms
Mauro Torsello
Universit`a degli studi di Padova Dipartimento di Scienze Chimiche
9 maggio 2017
Problem: simulate MFDs prototype systems for chemical reactions in homogeneous phases (micro-reactors) via continuum methods (CM)
General efficient procedure for optimization of micro-reactors complex reaction mechanisms in ‘structured’ channel
Answer: global search algorithms → Genetic Algorithms (GA) Implementation: NS + convection/diffusion model + GA search
Open source library (NS) Convection/diffusion routines Efficient search routines Parallelized implementation
Simulation and geometry optimization of microreactors
Methods: CFD + genetic algorithms CFD:
1 finite differences
2 spectral elements
3 finite elements
4 finite volumes Why microreactors?
efficient heat dissipation (e.g. strongly exothermic reactions) fast mixing (small channel sections)
low volume of solvents
Very simple industrial scale-up → number-up
Given a generic complex chemical reaction, in liquid phase, we know:
1 All the elementary stage of the entire process (stoichiometric mechanism, is not necessary to know the intimate mechanism)
2 All the diffusion coefficients of the involved species (related to the used solvent) We solve the NS (with the OpenFOAM libraries) and the ADR equations until steady state
Simulation and geometry optimization of microreactors
Methods: CFD + genetic algorithms CFD:
1 finite differences
2 spectral elements
3 finite elements
4 finite volumes Why microreactors?
efficient heat dissipation (e.g. strongly exothermic reactions) fast mixing (small channel sections)
low volume of solvents
Very simple industrial scale-up → number-up
Given a generic complex chemical reaction, in liquid phase, we know:
1 All the elementary stage of the entire process (stoichiometric mechanism, is not necessary to know the intimate mechanism)
2 All the diffusion coefficients of the involved species (related to the used solvent) We solve the NS (with the OpenFOAM libraries) and the ADR equations until steady state
Microreactors as miniaturized artificial ’life-forms’
Fluid motion and chemical transport-reaction decoupled
Solve the Navier-Stokes for the fluid
∂v
∂t + v · ∇v = ν∇2v − ∇π, ∇ · v = 0 Solve the Advection Diffusion Reaction for the chemical species
∂ci
∂t + v · ∇c = D∇2c + R(ci), i = 1, 2, ..., N whith N total number of reagents
transport and reaction phenomena
1 cell centered finite differences (x , y , z; t) → (xi, yj, zk; tn)
2 operator splitting approach: Advection, Diffusion, Reaction treated separately
Define the bidimensional map of the device Create the related mesh
Apply the boundary conditions (for NS)
v = 0, ∇np = 0,vn= vin, ∇np = 0,∇nv = 0, p = 0 Solve Navier-Stokes equations
∂v
∂t + v · ∇v = ν∇2v − ∇π, ∇ · v = 0 Apply boundary conditions (for ADR) jn= 0,jn= jin,outflow Solve Advection-Diffusion-Reaction equations
∂ci
∂t + v · ∇c = D∇2c + R(ci), i = 1, 2, ..., N
Define the bidimensional map of the device Create the related mesh
Apply the boundary conditions (for NS)
v = 0, ∇np = 0,vn= vin, ∇np = 0,∇nv = 0, p = 0 Solve Navier-Stokes equations
∂v
∂t + v · ∇v = ν∇2v − ∇π, ∇ · v = 0 Apply boundary conditions (for ADR) jn= 0,jn= jin,outflow Solve Advection-Diffusion-Reaction equations
∂ci
∂t + v · ∇c = D∇2c + R(ci), i = 1, 2, ..., N
Define the bidimensional map of the device Create the related mesh
Apply the boundary conditions (for NS)
v = 0, ∇np = 0,vn= vin, ∇np = 0,∇nv = 0, p = 0 Solve Navier-Stokes equations
∂v
∂t + v · ∇v = ν∇2v − ∇π, ∇ · v = 0 Apply boundary conditions (for ADR) jn= 0,jn= jin,outflow Solve Advection-Diffusion-Reaction equations
∂ci
∂t + v · ∇c = D∇2c + R(ci), i = 1, 2, ..., N
Define the bidimensional map of the device Create the related mesh
Apply the boundary conditions (for NS)
v = 0, ∇np = 0,vn= vin, ∇np = 0,∇nv = 0, p = 0 Solve Navier-Stokes equations
∂v
∂t + v · ∇v = ν∇2v − ∇π, ∇ · v = 0 Apply boundary conditions (for ADR) jn= 0,jn= jin,outflow Solve Advection-Diffusion-Reaction equations
∂ci
∂t + v · ∇c = D∇2c + R(ci), i = 1, 2, ..., N
Define the bidimensional map of the device Create the related mesh
Apply the boundary conditions (for NS)
v = 0, ∇np = 0,vn= vin, ∇np = 0,∇nv = 0, p = 0 Solve Navier-Stokes equations
∂v
∂t + v · ∇v = ν∇2v − ∇π, ∇ · v = 0 Apply boundary conditions (for ADR) jn= 0,jn= jin,outflow Solve Advection-Diffusion-Reaction equations
∂ci
∂t + v · ∇c = D∇2c + R(ci), i = 1, 2, ..., N
Define the bidimensional map of the device Create the related mesh
Apply the boundary conditions (for NS)
v = 0, ∇np = 0,vn= vin, ∇np = 0,∇nv = 0, p = 0 Solve Navier-Stokes equations
∂v
∂t + v · ∇v = ν∇2v − ∇π, ∇ · v = 0 Apply boundary conditions (for ADR) jn= 0,jn= jin,outflow Solve Advection-Diffusion-Reaction equations
∂ci
∂t + v · ∇c = D∇2c + R(ci), i = 1, 2, ..., N
ADR equations
∂c
∂t + ∇ · j = 0
R
, Continuity equation (1)
jA= cv, jD= −D∇c, Fluxes
(2)
j = jA+ jD, ∂c
∂t + ∇ · (cv) − ∇ · (D∇c) = R, ∇ · v = 0, D = const
(3)
∂c
∂t + v · ∇c = D∇2c + R
(4)
Reaction
∂ci
∂t = R(ci)
(5)
The reaction term (aka source/sink term in the heat equation) does not depend on spatial derivatives (∇) but it couples different ci
Advection-Diffusion-Reaction
∂ci
∂t + v · ∇ci = D∇2ci+ R(ci), i = 1, 2, ..., N
(6)
How to deal with the whole problem? → Operator splitting
ADR equations
∂c
∂t + ∇ · j =
0
R, Continuity equation (1)
jA= cv, jD= −D∇c, Fluxes
(2)
j = jA+ jD, ∂c
∂t + ∇ · (cv) − ∇ · (D∇c) = R, ∇ · v = 0, D = const
(3)
∂c
∂t + v · ∇c = D∇2c + R
(4)
Reaction
∂ci
∂t = R(ci)
(5)
The reaction term (aka source/sink term in the heat equation) does not depend on spatial derivatives (∇) but it couples different ci
Advection-Diffusion-Reaction
∂ci
∂t + v · ∇ci = D∇2ci+ R(ci), i = 1, 2, ..., N
(6)
How to deal with the whole problem? → Operator splitting
ADR equations
∂c
∂t + ∇ · j =
0
R, Continuity equation (1)
jA= cv, jD= −D∇c, Fluxes (2)
j = jA+ jD, ∂c
∂t + ∇ · (cv) − ∇ · (D∇c) = R, ∇ · v = 0, D = const
(3)
∂c
∂t + v · ∇c = D∇2c + R
(4)
Reaction
∂ci
∂t = R(ci)
(5)
The reaction term (aka source/sink term in the heat equation) does not depend on spatial derivatives (∇) but it couples different ci
Advection-Diffusion-Reaction
∂ci
∂t + v · ∇ci = D∇2ci+ R(ci), i = 1, 2, ..., N
(6)
How to deal with the whole problem? → Operator splitting
ADR equations
∂c
∂t + ∇ · j =
0
R, Continuity equation (1)
jA= cv, jD= −D∇c, Fluxes (2)
j = jA+ jD,
∂c
∂t + ∇ · (cv) − ∇ · (D∇c) = R, ∇ · v = 0, D = const
(3)
∂c
∂t + v · ∇c = D∇2c + R
(4)
Reaction
∂ci
∂t = R(ci)
(5)
The reaction term (aka source/sink term in the heat equation) does not depend on spatial derivatives (∇) but it couples different ci
Advection-Diffusion-Reaction
∂ci
∂t + v · ∇ci = D∇2ci+ R(ci), i = 1, 2, ..., N
(6)
How to deal with the whole problem? → Operator splitting
ADR equations
∂c
∂t + ∇ · j =
0
R, Continuity equation (1)
jA= cv, jD= −D∇c, Fluxes (2)
j = jA+ jD, ∂c
∂t + ∇ · (cv) − ∇ · (D∇c) = R,
∇ · v = 0, D = const
(3)
∂c
∂t + v · ∇c = D∇2c + R
(4)
Reaction
∂ci
∂t = R(ci)
(5)
The reaction term (aka source/sink term in the heat equation) does not depend on spatial derivatives (∇) but it couples different ci
Advection-Diffusion-Reaction
∂ci
∂t + v · ∇ci = D∇2ci+ R(ci), i = 1, 2, ..., N
(6)
How to deal with the whole problem? → Operator splitting
ADR equations
∂c
∂t + ∇ · j =
0
R, Continuity equation (1)
jA= cv, jD= −D∇c, Fluxes (2)
j = jA+ jD, ∂c
∂t + ∇ · (cv) − ∇ · (D∇c) = R, ∇ · v = 0, D = const (3)
∂c
∂t + v · ∇c = D∇2c + R
(4)
Reaction
∂ci
∂t = R(ci)
(5)
The reaction term (aka source/sink term in the heat equation) does not depend on spatial derivatives (∇) but it couples different ci
Advection-Diffusion-Reaction
∂ci
∂t + v · ∇ci = D∇2ci+ R(ci), i = 1, 2, ..., N
(6)
How to deal with the whole problem? → Operator splitting
ADR equations
∂c
∂t + ∇ · j =
0
R, Continuity equation (1)
jA= cv, jD= −D∇c, Fluxes (2)
j = jA+ jD, ∂c
∂t + ∇ · (cv) − ∇ · (D∇c) = R, ∇ · v = 0, D = const (3)
∂c
∂t + v · ∇c = D∇2c + R (4)
Reaction
∂ci
∂t = R(ci)
(5)
The reaction term (aka source/sink term in the heat equation) does not depend on spatial derivatives (∇) but it couples different ci
Advection-Diffusion-Reaction
∂ci
∂t + v · ∇ci = D∇2ci+ R(ci), i = 1, 2, ..., N
(6)
How to deal with the whole problem? → Operator splitting
ADR equations
∂c
∂t + ∇ · j =
0
R, Continuity equation (1)
jA= cv, jD= −D∇c, Fluxes (2)
j = jA+ jD, ∂c
∂t + ∇ · (cv) − ∇ · (D∇c) = R, ∇ · v = 0, D = const (3)
∂c
∂t + v · ∇c = D∇2c + R (4)
Reaction
∂ci
∂t = R(ci) (5)
The reaction term (aka source/sink term in the heat equation) does not depend on spatial derivatives (∇) but it couples different ci
Advection-Diffusion-Reaction
∂ci
∂t + v · ∇ci = D∇2ci+ R(ci), i = 1, 2, ..., N
(6)
How to deal with the whole problem? → Operator splitting
ADR equations
∂c
∂t + ∇ · j =
0
R, Continuity equation (1)
jA= cv, jD= −D∇c, Fluxes (2)
j = jA+ jD, ∂c
∂t + ∇ · (cv) − ∇ · (D∇c) = R, ∇ · v = 0, D = const (3)
∂c
∂t + v · ∇c = D∇2c + R (4)
Reaction
∂ci
∂t = R(ci) (5)
The reaction term (aka source/sink term in the heat equation) does not depend on spatial derivatives (∇) but it couples different ci
Advection-Diffusion-Reaction
∂ci
∂t + v · ∇ci = D∇2ci+ R(ci), i = 1, 2, ..., N (6)
How to deal with the whole problem? → Operator splitting
ADR equations
∂c
∂t + ∇ · j =
0
R, Continuity equation (1)
jA= cv, jD= −D∇c, Fluxes (2)
j = jA+ jD, ∂c
∂t + ∇ · (cv) − ∇ · (D∇c) = R, ∇ · v = 0, D = const (3)
∂c
∂t + v · ∇c = D∇2c + R (4)
Reaction
∂ci
∂t = R(ci) (5)
The reaction term (aka source/sink term in the heat equation) does not depend on spatial derivatives (∇) but it couples different ci
Advection-Diffusion-Reaction
∂ci
∂t + v · ∇ci = D∇2ci+ R(ci), i = 1, 2, ..., N (6)
Numerical solution of ADR equation
Operator splitting: Strang splitting
Advection operator: symmetrized dimensionally-split scheme [Kuchar´ık]
Diffusion operator: alternate direction implicit [Douglas]
Reaction operator: multistep Backward differentiation formula, variable order variable step
Properties of the numerical algorithm
second order accurate (in both time and space)
the required number of operations is ∝ N, where N is the number of mesh points (non-stiff cases)
the required amount of memory is also ∝ N (non-stiff cases)
Genetic algorithms Selection Crossover Mutation Elitis´
FITNESS: reaction yield (i.e. product average
Genetic algorithm and neural network
Learn vertical walk
https://dl.dropboxusercontent.com/u/51621154/MIORSOFT/Projects.html
Geometry ⇐⇒ bit Matrix (i.e. bidimensional chromosome)
⇐⇒
1 1 0 1 1 1 1 1 1 1 1
0 1 0 1 1 1 1 1 1 1 1
0 1 0 1 1 1 0 1 1 1 1
1 1 0 1 1 0 1 1 1 1 1
1 0 1 1 1 1 1 0 1 1 1
1 1 0 1 1 1 1 1 0 1 1
0 1 0 0 1 0 1 1 1 1 1
1 1 0 0 0 1 1 0 1 0 1
1 0 0 0 1 1 0 1 0 1 1
1 0 0 1 1 0 1 1 0 1 0
1 1 1 1 0 0 1 1 0 1 1
Geometry ⇐⇒ bit Matrix (i.e. bidimensional chromosome)
⇐⇒
1 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1
1 1 1 1 1 1 1 1
Genetic algorithms Selection Crossover Mutation Elitism´
Genetic algorithms Selection Crossover Mutation Elitism´
Genetic algorithms Selection Crossover Mutation Elitism´
Genetic algorithms Selection Crossover Mutation Elitism´
Genetic algorithms Selection Crossover Mutation Elitism´
Genetic algorithms Selection Crossover Mutation Elitism´
Genetic algorithms Selection Crossover Mutation Elitism´
Genetic algorithms Selection Crossover Mutation Elitism´
A+B → C Reaction
Generation 0
Maximum fitness: f = jCoutlet
jAinlet1
Squares number ∝ search space Structures similar polyominoes
possible number of polyominoes with 56 cells is exactly known
A+B → C Reaction
Generation 1
Maximum fitness: f = jCoutlet
jAinlet1
Squares number ∝ search space Structures similar polyominoes
possible number of polyominoes with 56 cells is exactly known
A+B → C Reaction
Generation 2
Maximum fitness: f = jCoutlet
jAinlet1
Squares number ∝ search space Structures similar polyominoes
possible number of polyominoes with 56 cells is exactly known
A+B → C Reaction
Generation 3
Maximum fitness: f = jCoutlet
jAinlet1
Squares number ∝ search space Structures similar polyominoes
possible number of polyominoes with 56 cells is exactly known
A+B → C Reaction
Generation 4
Maximum fitness: f = jCoutlet
jAinlet1
Squares number ∝ search space Structures similar polyominoes
possible number of polyominoes with 56 cells is exactly known
A+B → C Reaction
Generation 1299
Maximum fitness: f = jCoutlet
jAinlet1
Squares number ∝ search space Structures similar polyominoes
possible number of polyominoes with 56 cells is exactly known
Reaction 1: A+B → C
Fitness: : f =j
outlet C jAinlet1
fitness optimized by the genetic algorithm fitness of the serpentine microdevice
Reaction 1: A+B → C
a) concentration profile of C in the best GA microdevice b) concentration profile of C in the serpentine microdevice c) velocity magnitude in the best GA microdevice d) velocity magnitude in the serpentine microdevice
Reaction 2
8 species 3 stages mechanism
A + B−→ Ck (7)
C + D−→ E + Fk (8)
F + G−→ Hk (9)
Reaction 2
Fitness: : f =j
outlet2 H jAinlet1
fitness optimized by the genetic algorithm fitness of the serpentine microdevice
Reaction 2
8 species 3 stages mechanism
a) concentration profile of H in the best GA microdevice b) concentration profile of H in the serpentine microdevice c) velocity magnitude in the best GA microdevice d) velocity magnitude in the serpentine microdevice
Reaction 3
11 species 9 stages mechanism
P1 − + − P2−−k−→ P1 − P2−F (10)
P1 − + − P3−k−→ P1 − P3F (11)
−P2 − + − P2−−→ −P2 − P2−kS (12)
−P2 − + − P3−→ −P2 − P3kS (13)
P1 − + − P2 − P2−−k−→ P1 − P2 − P2−F (14) P1 − + − P2 − P3−k−→ P1 − P2 − P3F (15) P1 − P2 − + − P3−→ P1 − P2 − P3kS (16) P1 − P2 − + − P2−−→ P1 − P2 − P2−kS (17)
−P2 − P2 − + − P2−−→ −P2 − P2 − P2−kS (18)
Reaction 3
Fitness: : f =j
outlet2 P1−P2−P3
jP1−inlet1
fitness optimized by the genetic algorithm fitness of the serpentine microdevice
Reaction 3
8 species 3 stages mechanism
a) concentration profile of H in the best GA microdevice b) concentration profile of H in the serpentine microdevice c) velocity magnitude in the best GA microdevice d) velocity magnitude in the serpentine microdevice