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.

Solutions · 16. Flow past obstacles and the permeability of porous media

School of Engineering, Nazarbayev University

Worked solutions to the three exercises of Lecture 16. Each solution is computed here and checked with assert statements against an exact identity or an independent calculation. The first code cell sets up the notebook and runs Demonstration 1 of the lecture without showing its output, because some of the solutions use its variables.

Exercise 1

Problem. On a 4×124 \times 12 lattice at τ=12+34\tau = \frac{1}{2} + \frac{\sqrt{3}}{4}, construct masks for M∈{1,2,4}M \in \{1, 2, 4\} identical parallel slit pores of aperture hM=8/M∈{8,4,2} luh_M = 8 / M \in \{8, 4, 2\}\text{ lu} so all three masks share identical porosity ε=8/12=2/3\varepsilon = 8 / 12 = 2/3. Verify via simulate_lbm_obstacle_flow_2d that each permeability matches the exact discrete midpoint parabola identity kM,disc=ε(hM2+1/2)12k_{M,\mathrm{disc}} = \frac{\varepsilon(h_M^2 + 1/2)}{12} to < 0.2%.


Exercise 1: Pore-Aperture Scaling k_disc = eps * (h_p^2 + 1/2) / 12 at Identical Porosity eps = 2/3
===================================================================================================
M=1 pores (h_p= 8 lu, eps=0.6667) | k_LBM =  3.5829 | disc-exact =  3.5833 (cont =  3.5556)
M=2 pores (h_p= 4 lu, eps=0.6667) | k_LBM =  0.9167 | disc-exact =  0.9167 (cont =  0.8889)
M=4 pores (h_p= 2 lu, eps=0.6667) | k_LBM =  0.2500 | disc-exact =  0.2500 (cont =  0.2222)

Explanation. Porosity ε\varepsilon alone never uniquely determines permeability. Splitting one 8-lu8\text{-lu} fracture into four 2-lu2\text{-lu} micro-pores preserves void fraction ε=2/3\varepsilon = 2/3 identically, yet quadruples the wetted no-slip wall surface area and reduces permeability by (82+0.5)/(22+0.5)=14.33×(8^2 + 0.5)/(2^2 + 0.5) = 14.33\times (where the +1/2+1/2 reflects exact midpoint summation ∑j=1h(j−12)(h−j+12)=h(h2+1/2)6\sum_{j=1}^h (j - \frac{1}{2})(h - j + \frac{1}{2}) = \frac{h(h^2 + 1/2)}{6}).


Exercise 2

Problem. Verify that simulate_lbm_obstacle_flow_2d raises ValueError for an all-solid mask, a 1-D mask, or tau <= 0.5, and compare body_force_x = 1e-5 vs 3e-3 through a constricted pore throat (20 x 16 domain) to show how violating Ma≪1\mathrm{Ma} \ll 1 produces >6%> 6\% artificial density compression.


Exercise 2: Obstacle Mask Validation Guards & High-Mach Orifice Compressibility check
=====================================================================================
Low forcing  (F=1e-5): Ma_max = 0.0018, delta_rho/rho0 = 5.3823e-04
High forcing (F=3e-3): Ma_max = 0.5138, delta_rho/rho0 = 0.1876 (> 6% compressibility artifact)

Explanation. Because isothermal LBM links pressure to density via p=ρcs2p = \rho c_s^2, driving a large pressure drop Δp\Delta p across a tight orifice creates a density variation Δρ=Δp/cs2\Delta \rho = \Delta p / c_s^2, which reaches 19%19\% at the larger force. Keeping umax⁡≲0.08 lu/tsu_{\max} \lesssim 0.08\text{ lu/ts} (Ma≲0.14\mathrm{Ma} \lesssim 0.14) holds compressibility error below ∼1\sim 1–2%2\%.


Exercise 3

Problem. Implement analyze_porous_fibrous_bed(mask, tau=0.80, fx=1.2e-5, n_steps=220) returning porosity, u_interstitial, tortuosity, and darcy_k. Compare a straight slit channel against a staggered 4-fiber bed on 24 x 24, verifying T=1.000000T = 1.000000 for the straight slit and T>1.05T > 1.05 for the staggered fiber bed.


Exercise 3: Implement It Yourself — Tortuosity & Interstitial Velocity Analyzer for Fibrous Media
=================================================================================================
Straight slit   : eps=0.833, T=1.00000000, k=6.1604 lu^2
Staggered fibers: eps=0.743, T=1.092615, k=1.5546 lu^2

Summary. Digital rock physics and electrode microstructure design rely on this exact workflow: voxelize 2-D/3-D tomography into boolean masks, run low-Mach Stokes LBM, and extract (k,ε,T)(k, \varepsilon, T) directly without generating unstructured meshes. Lecture 17 combines these tools with the finite-volume and multigrid solvers of the earlier lectures in a closing project.