Microfluidic Mixer Topology Optimization
Overview
Microfluidic devices mix reagents by diffusion, and the layout of the channel walls controls how well two streams interleave. MicrofluidicMixerTopOpt optimizes the fluid layout to minimize a mixing (concentration-variance) objective, driving the flow toward maximum species mixing at the outlet.
using RasmahA mixer channel
Clamp the walls of a channel and let the optimizer carve the layout that best mixes the transported species.
m = tetrahedralize_box(1.0, 1.0, 1.0, 2, 2, 2)
fluid = FluidMaterial(name = "w", density = 1e3, dynamic_viscosity = 0.1)
fixed_u = Int[]
for i in 1:size(m.nodes, 2)
m.nodes[1, i] < 1e-6 && append!(fixed_u, 3i - 2, 3i - 1, 3i)
end
x, hist = solve(MicrofluidicMixerTopOpt(), m, fluid; fixed_u = fixed_u, volfrac = 0.5, max_iter = 10)([0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5 … 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5], [0.0])
Verification — the design stays feasible
The density field is finite and bounded:
println("all densities finite: ", all(isfinite, x))
println("density in [0,1]: ", all(0 .<= x .<= 1))all densities finite: true
density in [0,1]: true
vtk(m; field = x, fieldname = "mixer density", edges = true)Next steps
- Stokes flow — the creeping flow underneath.
- MHD Stokes topology optimization — a magnetically-damped variant.
