Fluid Mechanics &
Transport in Porous Media

Fluids are everywhere: in the atmosphere, in the ocean, in the blood vessels of living things, and in the pore spaces of rock and sand. This learning post builds up fluid mechanics from first principles — from Newton’s viscosity law through the Navier-Stokes equations, turbulence, Bernoulli’s principle, and then into flow through porous media with Darcy’s law, groundwater hydrology, and advection-diffusion transport.

Prerequisites: calculus (gradients, divergence), basic thermodynamics (pressure, temperature), classical mechanics (Newton’s second law). This post follows naturally from Learning #35 (Electromagnetism & Maxwell’s Equations) — many mathematical structures (vector fields, flux, potential theory) carry over directly.

Continuum Hypothesis & Fluid Properties

At macroscopic scales (length scales ≫ molecular spacing ∼ 0.3 nm), a fluid can be treated as a continuous medium characterised by field quantities: density ρ(r,t), velocity u(r,t), pressure p(r,t), and temperature T(r,t). This is the continuum hypothesis, valid when the Knudsen number Kn = λ/L ≪ 1 (λ = mean free path, L = characteristic flow length).

Dynamic viscosity μ quantifies a fluid’s resistance to shearing. Newtonian fluids (water, air, most simple liquids) obey Newton’s viscosity law: shear stress is proportional to shear rate.

τxy = μ · &partial;ux/&partial;y

τ = shear stress [Pa]    μ = dynamic viscosity [Pa·s]
&partial;u/&partial;y = velocity gradient perpendicular to flow

Kinematic viscosity: ν = μ/ρ     [m²/s]
Water at 20°C: μ ≈ 1.0 × 10-3 Pa·s
Air at 20°C: μ ≈ 1.8 × 10-5 Pa·s

Non-Newtonian fluids (blood, polymer melts, ketchup) have viscosity depending on shear rate. Shear-thinning (pseudoplastic) fluids become less viscous under high shear. Shear-thickening (dilatant) fluids become more viscous. Bingham plastics require a yield stress before flowing at all.

Continuity Equation & Mass Conservation

Mass cannot be created or destroyed. In differential form, this gives the continuity equation:

∂ρ/∂t + ∇·(ρu) = 0

Incompressible flow (ρ = const):
∇·u = 0     (divergence-free velocity field)

Mass flux through a surface: ˙m = ∫∫ ρu·n dA
Integral form: d/dt ∫∫∫ ρ dV + ∮ ρu·dA = 0

The incompressibility condition ∇·u = 0 greatly simplifies the equations of motion and is an excellent approximation for liquids and for gas flows with Mach number Ma < 0.3.

Navier-Stokes Equations & Momentum Conservation

Applying Newton’s second law to a fluid parcel in the continuum limit — accounting for pressure gradients, viscous stress, and body forces — yields the Navier-Stokes equations. For incompressible flow:

ρ(∂u/∂t + u·∇u) = −∇p + μ∇²u + ρg

Left side: inertial terms (rate of change + convective acceleration)
−∇p : pressure gradient force
μ∇²u : viscous diffusion of momentum
ρg : body force (gravity; can include Coriolis etc.)

These are a set of 3 equations (x, y, z components) + 1 continuity equation, giving 4 equations for 4 unknowns (u, v, w, p).

Solving the Navier-Stokes equations in full generality is one of the Millennium Prize Problems in mathematics — the existence and smoothness of solutions in 3D is not proven. In practice, engineers use DNS (direct numerical simulation), RANS (Reynolds-averaged), or LES (large-eddy simulation) at different scales of resolution.

🌊

Bénard Convection Simulator solves the 2D Boussinesq Navier-Stokes equations with a buoyancy term. Watch convection cells self-organise as the Rayleigh number Ra crosses the critical value of 1708.

Reynolds Number & the Laminar-Turbulent Transition

The Reynolds number Re is the most important dimensionless group in fluid mechanics. It is the ratio of inertial forces to viscous forces:

Re = ρUL/μ = UL/ν

U = characteristic velocity    L = characteristic length scale

Re < ~2300: laminar pipe flow (parallel streamlines, Re<∼1 for creeping)
2300 < Re < 4000: transitional (intermittent turbulence)
Re > ~4000: turbulent pipe flow (chaotic mixing, eddy cascade)

Flat-plate boundary layer transition: Rex ≈ 5×105

Turbulence involves a cascade of kinetic energy from large eddies (injected at scale L by mean flow shear) down to small Kolmogorov eddies (scale η = (ν³/ε)1/4) where viscosity dissipates energy as heat. The ratio L/η scales as Re3/4, which is why DNS of high-Re flows is computationally crushing.

Bernoulli’s Equation

For steady, incompressible, inviscid flow along a streamline, the Navier-Stokes equations reduce to Bernoulli’s equation:

p + ½ρu² + ρgz = constant    (along a streamline)

p = static pressure    ½ρu² = dynamic pressure
ρgz = hydrostatic pressure    ptotal = p + ½ρu² = stagnation pressure

Venturi effect: A1u1 = A2u2 (continuity)
⇒ p1 − p2 = ½ρ(u2² − u1²)

Bernoulli’s equation explains aircraft lift (pressure difference between upper and lower wing surfaces), the operation of carburettors, aerofoil stall, and the Coandă effect. It fails where viscosity matters (boundary layers, pipe friction) or where there is significant flow unsteadiness.

✈️

Aerofoil Simulator computes potential flow around a symmetric or cambered aerofoil using conformal mapping (Joukowski transform), plotting pressure distribution and the lift coefficient CL as a function of angle of attack.

Darcy’s Law & Flow in Porous Media

At small Reynolds numbers (Re < 1 based on grain size), viscosity completely dominates inertial forces. Flow through porous media (sand, gravel, rock) at these conditions obeys Darcy’s empirical law (1856):

q = −(K/μ) ∇p    (general form)

q = −K ∇h     (saturated flow, K absorbs μ and ρg)

q = Darcy flux (specific discharge, m/s)
K = hydraulic conductivity (m/s)     h = hydraulic head (m)

Average pore velocity: v = q / n     n = porosity
Intrinsic permeability: k = Kμ/(ρg)     [m²]

Hydraulic head h = z + p/(ρg) combines elevation head and pressure head. Flow always goes from high head to low head, regardless of whether this corresponds to high or low elevation. Hydraulic conductivity K spans 13 orders of magnitude: from 10-13 m/s in intact granite to 100 m/s in coarse gravel.

Groundwater Flow Equations

Combining Darcy’s law with the continuity equation gives the groundwater flow equation:

Ss &partial;h/&partial;t = ∇·(K ∇h) + Q

Ss = specific storage (m-1)
K = hydraulic conductivity tensor (m/s)
Q = source/sink term (pumping wells, recharge)

Steady-state: ∇·(K ∇h) = 0  (Laplace equation when K uniform)

Dupuit-Theis pumping well drawdown:
s(r,t) = (Q/4πT) · W(u)     u = r²S/(4Tt)
T = hydraulic transmissivity = K ċ b    b = aquifer thickness
W(u) = −Ei(−u) = Theis well function

The Theis solution assumes a uniform, isotropic, infinite confined aquifer. Real aquifers show anisotropy (Kx ≠ Ky), heterogeneity, unconfined conditions (free surface moves with pumping), and complex boundary conditions. Numerical models (MODFLOW, FEFLOW) are used for practical wellfield design.

🌊

Groundwater Flow Simulator solves the 2D steady-state groundwater flow equation on a 100×60 grid using successive over-relaxation. Inject pumping or injection wells, adjust hydraulic conductivity zones, and watch head contours and Darcy flux arrows update in real time.

Advection-Diffusion & the Péclet Number

Once we know the velocity field, we can calculate how a dissolved contaminant or tracer spreads. Transport is governed by two competing processes:

  • Advection: transport by the mean flow velocity (directional, conserves mass).
  • Diffusion/Dispersion: spreading by molecular diffusion + mechanical dispersion from pore-scale velocity variability.
&partial;C/&partial;t + u·∇C = ∇·(D ∇C) + R

C = concentration    D = dispersion tensor    R = reaction term

Péclet number: Pe = uL/D
Pe ≪ 1: diffusion-dominated (spreading isotropic)
Pe ≫ 1: advection-dominated (sharp fronts)

1D breakthrough curve (solute arriving at depth L):
C(t)/C0 = ½ erfc[(L/v − t)/(2√(Dt/v²L0))]

Mechanical dispersion Dm = αL v (longitudinal dispersivity αL ∼ 0.1–100 m depending on heterogeneity scale). In aquifer remediation, advection-diffusion modelling predicts contaminant plume extent and pump-and-treat efficiency.

Boundary Layer Theory & Internal Flows

Near a solid surface, viscosity matters even at high Re: the boundary layer is a thin region where the flow transitions from zero velocity at the wall (no-slip condition) to the free-stream velocity U. The boundary layer thickness δ grows along the plate:

Laminar (Blasius, flat plate):
δ/x ≈ 5.0 / √Rex     Rex = Ux/ν

Drag coefficient: CD = 1.328 / √ReL   (laminar)
CD ≈ 0.074 ReL-1/5   (turbulent, ReL up to 107)

Skin friction: τw = μ (&partial;u/&partial;y)|y=0 = 0.332 μ U √(U/(νx))

Hagen-Poiseuille (laminar pipe flow, Re < 2300):
Q = πR4Δp / (8μL)     u(r) = (R²−r²)Δp/(4μL)   (parabolic profile)

The Hagen-Poiseuille result shows that flow resistance scales as R4 — halving a pipe’s radius increases resistance 16-fold. This has profound implications for blood flow in the cardiovascular system: small arterioles contribute most of the total vascular resistance despite carrying little of the total volume.

♥️

Blood Flow Simulator visualises Hagen-Poiseuille flow in a network of vessels. Adjust vessel diameter to see how resistance and flow rates rebalance throughout the network. Includes Fahraeus-Lindqvist effect for red blood cell margination.

Connecting the Concepts

The threads of fluid mechanics tie together across the platform:

Summary: Key Dimensionless Groups

Fluid mechanics dimensionless numbers

Re = UL/ν — Reynolds: inertia/viscosity; laminar vs turbulent
Fr = U/√(gL) — Froude: inertia/gravity; sub- vs supercritical
Ma = U/c — Mach: flow speed/sound speed; compressibility
Pe = UL/D — Péclet: advection/diffusion; sharp vs diffuse fronts
Pr = ν/κ — Prandtl: momentum/thermal diffusivity
Ra = gβΔTL³/(νκ) — Rayleigh: buoyancy/viscous-diffusive; convection onset
Kn = λ/L — Knudsen: molecular/continuum regime boundary
← Learning #35: Electromagnetism & Maxwell