Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

17. Project: flow, mixing and reaction in a microchannel

School of Engineering, Nazarbayev University

Continuous-flow microchannel chemical reactors and microfluidic chip heat sinks intensify heat and mass transfer by shrinking hydraulic channels to hundreds of micrometers (H∼200–500 μmH \sim 200\text{–}500\,\mu\mathrm{m}). This creates a design conflict: because Reynolds numbers are strictly laminar (Re∼5–80\mathrm{Re} \sim 5\text{–}80), streamlines run parallel without turbulent mixing, while small molecular diffusivities (Dm∼10−9 m2/sD_m \sim 10^{-9}\,\mathrm{m^2/s}) yield large Peclet numbers (Pe≫100\mathrm{Pe} \gg 100) so that little reactant reaches the catalytic walls. Inserting staggered micromixer baffles deflects streamlines transversely to boost wall/bulk conversion, at the expense of steeper hydraulic pressure drop ΔP\Delta P; simultaneously, exothermic reaction heat must conduct safely out through a low-conductivity catalyst washcoat bonded to a silicon chip wall. In this closing project we combine seven engcfd modules (constants, navier_stokes, lattice_boltzmann, convection_diffusion, tvd_advection, grids_fvm, and elliptic_multigrid) in a design study of such a reactor. The geometry, the operating conditions and the material properties are assumed values chosen for illustration, and the way in which stages 3 and 4 represent the effect of the baffles (an effective diffusivity and a cross-flow velocity that grow with the mixing index of stage 2) is an assumed closure, not a result of the lattice Boltzmann calculation. The project shows how the methods of the course fit together; it is not a validated reactor model.

Learning objectives

  1. Evaluate fluid properties (ν,α,Pr\nu, \alpha, \mathrm{Pr}) and dimensionless operating regimes (Re,Pe\mathrm{Re}, \mathrm{Pe}) from constants.FLUIDS_DB and verify baseline planar microchannel hydraulics (ΔP/L=12μUm/H2\Delta P / L = 12\mu U_m / H^2) via navier_stokes.poiseuille_couette_exact.

  2. Quantify transverse mixing enhancement vs. hydraulic permeability penalty in baffled vs. unbaffled microchannels using lattice_boltzmann.simulate_lbm_poiseuille_2d and simulate_lbm_obstacle_flow_2d.

  3. Solve 2-D reactant conversion X(Pe,Da)X(\mathrm{Pe}, \mathrm{Da}) via convection_diffusion.fvm_convection_diffusion_2d_steady alongside bounded transient tracer mixing via tvd_advection.advect_2d_strang_periodic.

  4. Couple exothermic reaction heat release to composite washcoat/silicon wall conduction (grids_fvm.harmonic_interface_conductivity, fvm_diffusion_1d_steady, and elliptic_multigrid.poisson_2d_fast_sine) and map the Conversion vs. Pumping-Power Penalty Pareto frontier.

Time: about 60 min

1. Stage 1: Working-Fluid Selection, Dimensionless Groups & Baseline Hydraulics

Consider a planar catalytic microchannel of height H=400 μmH = 400\,\mu\mathrm{m} (4×10−4 m4 \times 10^{-4}\text{ m}), length Lch=8.0 mmL_{\mathrm{ch}} = 8.0\,\mathrm{mm}, mean inlet velocity Um=0.05 m/sU_m = 0.05\,\mathrm{m/s}, and reactant molecular diffusivity DAB=2.0×10−9 m2/sD_{AB} = 2.0 \times 10^{-9}\,\mathrm{m^2/s}. Three dimensionless groups govern momentum, thermal, and species transport (constants.reynolds_number, constants.peclet_number):

ReH=UmHν,Peth=UmHα=ReHPr,Pem=UmHDAB,∣dPdx∣open=12μUmH2(1.1)\mathrm{Re}_H = \frac{U_m H}{\nu}, \qquad \mathrm{Pe}_{\mathrm{th}} = \frac{U_m H}{\alpha} = \mathrm{Re}_H \mathrm{Pr}, \qquad \mathrm{Pe}_m = \frac{U_m H}{D_{AB}}, \qquad \left|\frac{dP}{dx}\right|_{\mathrm{open}} = \frac{12 \mu U_m}{H^2} \tag{1.1}

We audit candidate working fluids from constants.FLUIDS_DB (water_298K, ethanol_298K, air_298K, liquid_sodium_673K) and cross-verify the aqueous microchannel pressure drop and wall shear stress τw=12H∣dP/dx∣=6μUmH\tau_w = \frac{1}{2}H |dP/dx| = \frac{6\mu U_m}{H} with navier_stokes.poiseuille_couette_exact.


Stage 1: Fluid Screening (FLUIDS_DB) & Planar Microchannel Hydraulic Baseline
=============================================================================
               Fluid |   Pr [-] |   Re_H [-] |  Pe_thermal |  dP/dx [kPa/m]
----------------------------------------------------------------------------
          water_298K |   6.1303 |     22.406 |     137.353 |          3.337
        ethanol_298K |  15.6920 |     14.618 |     229.389 |          4.028
            air_298K |   0.7302 |      1.281 |       0.935 |          0.069
  liquid_sodium_673K |   0.0050 |     60.282 |       0.303 |          1.065

Aqueous microreactor: Re_H = 22.41 (strictly laminar), Mass Peclet Pe_m = 10000.0 (diffusion-limited)
Poiseuille u_mean = 0.05000 m/s, u_max = 0.07500 m/s (exact 1.5*U_m = 0.07500)
Baseline pressure drop Delta_P = 26.700 Pa, wall shear tau_w = 0.6675 Pa

What stage 1 shows. For water, ReH=22.4\mathrm{Re}_H = 22.4, so the flow is laminar, and the pressure drop of the open channel is small (ΔP=26.7 Pa\Delta P = 26.7\text{ Pa} over 8 mm8\text{ mm}). The mass Péclet number is Pem=UmH/DAB=10 000\mathrm{Pe}_m = U_m H / D_{AB} = 10\,000: diffusion across half the channel takes (H/2)2/DAB=20 s(H/2)^2 / D_{AB} = 20\text{ s}, while the fluid leaves the reactor after Lch/Um=0.16 sL_{\mathrm{ch}} / U_m = 0.16\text{ s}. Without transverse flow, most of the reactant in the core of the channel leaves without reaching the wall.


2. Stage 2: D2Q9 LBM Micromixer Baffles & Bounded TVD Tracer Stirring

To break up parallel laminar streamlines, we insert alternating top/bottom staggered micro-baffles of height hbh_b into the channel (lattice_boltzmann.simulate_lbm_obstacle_flow_2d). At constant target flow rate Q=usupNyQ = u_{\mathrm{sup}} N_y, hydraulic resistance scales inversely with Darcy permeability kk:

Pressure-Drop Penalty ΠΔP(hb)≡(ΔP/L)baffled(ΔP/L)open=kopenk(hb)≥1,Transverse Mixing Index My=⟨∣uy∣⟩usup(2.1)\text{Pressure-Drop Penalty } \Pi_{\Delta P}(h_b) \equiv \frac{(\Delta P / L)_{\mathrm{baffled}}}{(\Delta P / L)_{\mathrm{open}}} = \frac{k_{\mathrm{open}}}{k(h_b)} \geq 1, \qquad \text{Transverse Mixing Index } \mathcal{M}_y = \frac{\langle |u_y| \rangle}{u_{\mathrm{sup}}} \tag{2.1}

In parallel, we verify conservative, oscillation-free scalar tracer transport in a shear/cellular velocity field using tvd_advection.advect_2d_strang_periodic (limiter="van_leer").


Stage 2: D2Q9 LBM Staggered-Baffle Micromixer & TVD Strang Scalar Transport
===========================================================================
Baffle height h_b =  0 lu | Pressure-drop penalty dP/dP_0 =   1.00x | Transverse mixing <|u_y|>/u_sup = 0.0000
Baffle height h_b =  2 lu | Pressure-drop penalty dP/dP_0 =   1.24x | Transverse mixing <|u_y|>/u_sup = 0.1005
Baffle height h_b =  4 lu | Pressure-drop penalty dP/dP_0 =   2.00x | Transverse mixing <|u_y|>/u_sup = 0.2400
Baffle height h_b =  6 lu | Pressure-drop penalty dP/dP_0 =   3.93x | Transverse mixing <|u_y|>/u_sup = 0.4048
TVD Strang stirring: mass_drift = 0.000e+00, bounds = [0.000000, 0.999991]
<Figure size 1232x429 with 4 Axes>

Figure 17.1. (a) Transverse velocity, relative to the superficial velocity, in the channel with baffles of height 4 lattice units; the solid nodes are white. (b) Mixing index (left axis) and pressure drop relative to the open channel (right axis) against the baffle height.

What stage 2 shows. Baffles of height hb=4 luh_b = 4\text{ lu} give a mean transverse velocity of 0.24 usup0.24\,u_{\mathrm{sup}} and double the pressure drop (ΔP/ΔP0=2.00\Delta P / \Delta P_0 = 2.00). Baffles of height hb=6 luh_b = 6\text{ lu} give 0.40 usup0.40\,u_{\mathrm{sup}} at 3.93 times the pressure drop of the open channel. The tracer test conserves mass exactly and keeps the concentration between 0 and 1.


3. Stage 3: 2-D FVM Convection–Diffusion–Reaction & Damköhler Conversion

Inside the catalytic reactor domain [0,Lx]×[0,Ly][0, L_x] \times [0, L_y], steady reactant concentration C(x,y)C(x, y) (normalized by Cin=1C_{\mathrm{in}} = 1, catalytic absorbing walls Ctop=Cbottom=0C_{\mathrm{top}} = C_{\mathrm{bottom}} = 0) obeys:

ueff∂C∂x+vmix∂C∂y=Deff(∂2C∂x2+∂2C∂y2)−krxnC,Da=krxnLxueff(3.1)u_{\mathrm{eff}}\frac{\partial C}{\partial x} + v_{\mathrm{mix}}\frac{\partial C}{\partial y} = D_{\mathrm{eff}}\left(\frac{\partial^2 C}{\partial x^2} + \frac{\partial^2 C}{\partial y^2}\right) - k_{\mathrm{rxn}} C, \qquad \mathrm{Da} = \frac{k_{\mathrm{rxn}} L_x}{u_{\mathrm{eff}}} \tag{3.1}

Using the bounded "power_law" discretization in convection_diffusion.fvm_convection_diffusion_2d_steady, we map how bulk Damköhler number Da\mathrm{Da} and baffle-enhanced effective dispersion/cross-flow govern reactor conversion X=1−Cˉexit/CinX = 1 - \bar{C}_{\mathrm{exit}} / C_{\mathrm{in}}.


Stage 3: 2-D FVM Convection-Diffusion-Reaction — Damkohler & Mixing Conversion Map
==================================================================================
Damkohler Da | Unmixed Conversion X | Baffle-Mixed Conversion X
----------------------------------------------------------------
        0.00 |               0.7372 |                    0.9828
        0.60 |               0.8443 |                    0.9887
        1.50 |               0.9278 |                    0.9938
        3.00 |               0.9791 |                    0.9977
<Figure size 1232x440 with 3 Axes>

Figure 17.2. (a) Reactant concentration in the model reactor for Da=0.8\mathrm{Da} = 0.8 with absorbing walls. (b) Conversion against the Damköhler number for the two sets of assumed transport coefficients.

What stage 3 shows. With the assumed transport coefficients, the channel without cross-flow (Γ=0.008\Gamma = 0.008, v=0v = 0) converts 73.7%73.7\% of the reactant at Da=0\mathrm{Da} = 0, where the reactant is consumed at the walls only, and the channel with the enhanced coefficients (Γ=0.030\Gamma = 0.030, v=0.12v = 0.12) converts 98.3%98.3\%. A bulk reaction raises both values: at Da=3\mathrm{Da} = 3 they are 97.9%97.9\% and 99.8%99.8\%, so the benefit of mixing is largest when the reaction at the wall controls the conversion.


4. Stage 4: Conjugate Composite-Wall Heat Removal & Multi-Objective Pareto Design

Exothermic reaction releases volumetric heat qrxn′′′q_{\mathrm{rxn}}''' inside a porous γ-Al2O3\gamma\text{-Al}_2\text{O}_3 catalyst washcoat (L1=150 μmL_1 = 150\,\mu\mathrm{m}, low conductivity k1=1.6 W/(m⋅K)k_1 = 1.6\,\mathrm{W/(m\cdot K)}) bonded to a silicon microreactor substrate (L2=350 μmL_2 = 350\,\mu\mathrm{m}, high conductivity k2=148 W/(m⋅K)k_2 = 148\,\mathrm{W/(m\cdot K)}) cooled externally at Tcool=300 KT_{\mathrm{cool}} = 300\,\mathrm{K} while the inner washcoat face is adiabatic (∂yT=0\partial_y T = 0).

  1. 1-D Transverse Conjugate Conduction (grids_fvm.fvm_diffusion_1d_steady + harmonic_interface_conductivity): exact series thermal resistance across the 92.5×92.5\times conductivity jump.

  2. 2-D Silicon Chip Hot-Spot Spread (elliptic_multigrid.poisson_2d_fast_sine): 2-D lateral heat spreading around a localized reaction hot spot.

  3. System Pareto Frontier: Sweeping baffle height hb∈{0,2,4,6,8,10} luh_b \in \{0, 2, 4, 6, 8, 10\}\text{ lu} maps Reactant Conversion XX against Hydraulic Pressure-Drop Penalty ΔP/ΔP0\Delta P / \Delta P_0.


Stage 4: Conjugate Washcoat/Silicon Cooling & Conversion vs Pressure-Drop Pareto Frontier
=========================================================================================
Composite wall heat flux q'' = 12.00 kW/m^2 | Balance residual = 3.365e-07
Inner catalyst T(xc[0]) = 300.590878 K vs Exact continuum = 300.586972 K
2-D Silicon substrate lateral hot-spot peak rise dT_si,2D = 0.2983 K (< 1 K thanks to k_Si = 148 W/mK)
Baffle height h_b = 0 lu | dP/dP_0 =  1.00 | conversion X = 0.811
Baffle height h_b = 2 lu | dP/dP_0 =  1.23 | conversion X = 0.929
Baffle height h_b = 4 lu | dP/dP_0 =  1.94 | conversion X = 0.979
Baffle height h_b = 5 lu | dP/dP_0 =  2.63 | conversion X = 0.989
Baffle height h_b = 6 lu | dP/dP_0 =  3.73 | conversion X = 0.994
<Figure size 1232x451 with 2 Axes>

Figure 17.3. (a) Temperature rise across the washcoat and the silicon wall; the dashed line is the interface. (b) Conversion against the pressure drop relative to the open channel for five baffle heights.

Inside the algorithm

What stage 4 shows.

  1. In panel (a), the temperature rise across the wall is 0.59 K0.59\text{ K}, and about 95%95\% of it occurs inside the 150 μm150\,\mu\text{m} washcoat (k1=1.6k_1 = 1.6); the 350 μm350\,\mu\text{m} silicon wall (k2=148k_2 = 148) is nearly isothermal. The finite-volume temperature at the first cell center differs from the analytical value by 0.004 K0.004\text{ K} on the 20-cell mesh.

  2. In panel (b), raising hbh_b from 0 to 4 lu4\text{ lu} raises the conversion from 81.1%81.1\% to 97.9%97.9\% at 1.94 times the pressure drop. Raising hbh_b further to 6 lu6\text{ lu} adds only 1.5 percentage points (99.4%99.4\%) and nearly doubles the pressure drop again (3.73 times that of the open channel). Within this model, hb≈4 luh_b \approx 4\text{ lu} is the reasonable choice; the conclusion depends on the assumed closure between the mixing index and the transport coefficients.

Below we inspect harmonic_interface_conductivity and fvm_convection_diffusion_2d_steady, and verify global flux conservation across the composite interface.

Check against the library


Inside the Algorithm: Harmonic Interface Conductance & 2-D FVM Scalar Conservation
==================================================================================
def harmonic_interface_conductivity(
    k_cells: np.ndarray,
    volumes: np.ndarray,
) -> np.ndarray:
    """Compute exact series-resistance harmonic face conductivities k_{i+1/2} across interior FVM faces."""
    kc = np.asarray(k_cells, dtype=float).ravel()
    vols = np.asarray(volumes, dtype=float).ravel()
    if kc.size != vols.size or kc.size < 2 or np.any(kc <= 0.0):
        raise ValueError("k_cells and volumes must match in size >= 2 with k_cells > 0.")
    dl = 0.5 * vols[:-1]
    dr = 0.5 * vols[1:]
    return (dl + dr) / (dl / kc[:-1] + dr / kc[1:])

def fvm_convection_diffusion_2d_steady(
    nx: int,
    ny: int,
    Lx: float,
    Ly: float,
    u_vel: float,
    v_vel: float,
    Gamma: float,
    source: float | np.ndarray = 0.0,
    k_react: float = 0.0,
    bc_walls: dict | None = None,
    scheme: str = "power_law",
    tol: float = 1e-10,
    max_iter: int = 5000,
) -> dict:
    """Solve 2-D steady FVM convection-diffusion-reaction u*phi_x + v*phi_y = Gamma*lap(phi) - k*phi + S."""
    if nx < 3 or ny < 3 or Lx <= 0.0 or Ly <= 0.0 or Gamma <= 0.0 or k_react < 0.0:
        raise ValueError("Require nx, ny >= 3, Lx, Ly, Gamma > 0, and k_react >= 0.")
    dx = float(Lx) / int(nx)
    dy = float(Ly) / int(ny)
    xc = (np.arange(nx, dtype=float) + 0.5) * dx
    yc = (np.arange(ny, dtype=float) + 0.5) * dy

    bcs = {"left": 0.0, "right": 0.0, "bottom": 0.0, "top": 0.0}
    if bc_walls is not None:
        bcs.update(bc_walls)

    fx = float(u_vel) * dy
    fy = float(v_vel) * dx
    dx_cond = float(Gamma) * dy / dx
    dy_cond = float(Gamma) * dx / dy

    ax_wt = _peclet_weighting_A(abs(fx / dx_cond), scheme)
    ay_wt = _peclet_weighting_A(abs(fy / dy_cond), scheme)
    aw = dx_cond * ax_wt + max(fx, 0.0)
    ae = dx_cond * ax_wt + max(-fx, 0.0)
    as_s = dy_cond * ay_wt + max(fy, 0.0)
    an = dy_cond * ay_wt + max(-fy, 0.0)

    # Boundary half-cell conductances:
    ax_b = _peclet_weighting_A(0.5 * abs(fx / dx_cond), scheme)
    ay_b = _peclet_weighting_A(0.5 * abs(fy / dy_cond), scheme)
    aw_b = 2.0 * dx_cond * ax_b + max(fx, 0.0)
    ae_b = 2.0 * dx_cond * ax_b + max(-fx, 0.0)
    as_b = 2.0 * dy_cond * ay_b + max(fy, 0.0)
    an_b = 2.0 * dy_cond * ay_b + max(-fy, 0.0)

    src = np.full((nx, ny), float(source), dtype=float) if np.ndim(source) == 0 else np.asarray(source, dtype=float)
    vol = dx * dy

    aw_mat = np.full((nx, ny), aw, dtype=float)
    ae_mat = np.full((nx, ny), ae, dtype=float)
    as_mat = np.full((nx, ny), as_s, dtype=float)
    an_mat = np.full((nx, ny), an, dtype=float)
    aw_mat[0, :] = 0.0
    ae_mat[-1, :] = 0.0
    as_mat[:, 0] = 0.0
    an_mat[:, -1] = 0.0

    ap_mat = aw_mat + ae_mat + as_mat + an_mat + float(k_react) * vol
    b_rhs = src * vol
    ap_mat[0, :] += aw_b
    b_rhs[0, :] += aw_b * float(bcs["left"])
    ap_mat[-1, :] += ae_b
    b_rhs[-1, :] += ae_b * float(bcs["right"])
    ap_mat[:, 0] += as_b
    b_rhs[:, 0] += as_b * float(bcs["bottom"])
    ap_mat[:, -1] += an_b
    b_rhs[:, -1] += an_b * float(bcs["top"])

    phi = np.zeros((nx, ny), dtype=float)
    ii, jj = np.meshgrid(np.arange(nx), np.arange(ny), indexing="ij")
    red = (ii + jj) % 2 == 0
    black = ~red
    omega = 1.35

    res_hist = []
    for it in range(1, max_iter + 1):
        for mask in (red, black):
            nb_sum = np.zeros_like(phi)
            nb_sum[1:, :] += aw_mat[1:, :] * phi[:-1, :]
            nb_sum[:-1, :] += ae_mat[:-1, :] * phi[1:, :]
            nb_sum[:, 1:] += as_mat[:, 1:] * phi[:, :-1]
            nb_sum[:, :-1] += an_mat[:, :-1] * phi[:, 1:]
            phi_gs = (nb_sum + b_rhs) / ap_mat
            phi[mask] = (1.0 - omega) * phi[mask] + omega * phi_gs[mask]
        if it % 20 == 0 or it == 1:
            nb_all = np.zeros_like(phi)
            nb_all[1:, :] += aw_mat[1:, :] * phi[:-1, :]
            nb_all[:-1, :] += ae_mat[:-1, :] * phi[1:, :]
            nb_all[:, 1:] += as_mat[:, 1:] * phi[:, :-1]
            nb_all[:, :-1] += an_mat[:, :-1] * phi[:, 1:]
            res = float(np.max(np.abs(ap_mat * phi - nb_all - b_rhs)))
            res_hist.append(res)
            if res < tol:
                break

    return {
        "xc": xc,
        "yc": yc,
        "phi": phi,
        "iterations": it,
        "residual_history": np.array(res_hist, dtype=float),
    }

Washcoat/Silicon interface k_face: Harmonic = 3.1658 W/(m*K) vs Arithmetic mean = 74.8000 W/(m*K) (23.6x overestimate)

Exercises

Worked solutions are in 17_solutions.ipynb. The cell below the list is a short self-check to start from.

  1. Verify a result. Verify cross-module analytical consistency across three engcfd solvers: (a) fvm_convection_diffusion_1d(..., scheme='exponential') vs 'power_law' at Pe=40\mathrm{Pe} = 40 (n_cells=20), (b) simulate_lbm_poiseuille_2d at τmagic=12+34\tau_{\mathrm{magic}} = \frac{1}{2} + \frac{\sqrt{3}}{4} vs poiseuille_couette_exact, and (c) poisson_2d_multigrid_vcycle vs poisson_2d_fast_sine on a 33×3333 \times 33 chip cooling Poisson problem.

  2. Find how it fails. Demonstrate numerically two high-consequence reactor modeling errors: (a) on a 2-cell composite wall (x_faces = [0, 1e-4, 2e-4], k = [1.5, 150.0], left flux J_in = 15,000 W/m^2, right T = 300 K), compare exact harmonic FVM (fvm_diffusion_1d_steady) against naive arithmetic face conductivity (k1+k2)/2(k_1+k_2)/2 to show a >25%> 25\% error in predicted catalyst temperature rise ΔT\Delta T; and (b) show that scheme='central' in fvm_convection_diffusion_1d (n_cells=10, L=1.0, u=1.0, Gamma=0.02, PeΔx=5\mathrm{Pe}_{\Delta x} = 5) produces negative concentrations C<0C < 0 (bounded_no_overshoot == False) while scheme='power_law' preserves 0≤C≤10 \leq C \leq 1.

  3. Implement it yourself. Implement design_conjugate_microreactor(baffle_heights, da_rxn=0.35, q_full_conv=1.2e8) combining simulate_lbm_obstacle_flow_2d, fvm_convection_diffusion_2d_steady, and fvm_diffusion_1d_steady over baffle_heights = [0, 2, 4, 5, 7] on a 32 x 16 channel. Select the optimal baffle height maximizing conversion XX subject to ΔP/ΔP0≤4.0\Delta P / \Delta P_0 \leq 4.0 and peak wall temperature rise ΔTmax⁡≤1.5 K\Delta T_{\max} \leq 1.5\text{ K}, and verify all constraints programmatically.


Self-check for the exercises
============================
Pe=40 exponential max_error = 5.551e-17 | power_law max_error = 3.384e-03
Pe_cell=5.0 central bounded = False (min phi = -0.1111 < 0)
All checks passed.