This is the 2D companion to the 3D packed-bed sim: instead of averaging each bean down to a single Glueckauf linear-driving-force number, it solves the exact Fick diffusion PDE in spherical coordinates inside a representative bean at every height of the column, and plots the whole thing as one 2D field:
∂C/∂t = (D_e/R_p²)·(1/r'²)·∂/∂r'(r'² ∂C/∂r'), r' = r/R_p ∈ [0,1] (exact PDE, finite-volume in r')
The vertical axis of the grid is bed height (inlet at the bottom, outlet at the top, 14 axial bins matching the packed-bed column). The horizontal axis inside each bin's row is the radial position across one bean, from its center (left) to its surface (right) — so every row is a live radial concentration profile, not a single averaged color. A genuinely 2D field on a 2D domain (height × radius), never a flattened camera view of a 3D scene.
The bean surface exchanges with the passing fluid through a Robin boundary condition using the same pressure-dependent partition coefficient K as the 3D sim:
J_surface = k_m·(K·C_surface − C_fluid) (desorption flux, K = 0 below the CO2 critical pressure)
Fixed a bug found while building this pair: the 3D sim's LDF ODE is dq/dt = −k_LDF·(q − K·C_f); with fresh solvent C_f≈0 that reduces to dq/dt ≈ −k_LDF·q regardless of K, so it keeps extracting caffeine at full rate even at K=0 (subcritical CO2) — contradicting its own on-screen warning that extraction should stall below the critical pressure. This 2D model's boundary flux is proportional to K directly (J ∝ K·C_surface), so K=0 correctly gives zero desorption flux and the bed truly does not extract below 73.8 bar, verified numerically against the classic sphere-diffusion decay rate (π², Dirichlet limit) and against a closed-particle no-flux check.
As fluid flows bin-to-bin up the column each fluid parcel already carries caffeine picked up from bins below, which weakens the driving force further up — producing the same kind of moving extraction front as the 3D sim, but now visibly emerging from an actually-resolved radial profile at each height instead of one number per bin.
- Pressure — sets K (solvating power); zero below the critical point, rising with CO2 density above it.
- Temperature — sets D_e via an Arrhenius factor; hotter CO2 diffuses caffeine out faster, flattening each row's profile sooner.
- Bean radius — the PDE is solved in normalized r' = r/R_p, so D_e/R_p² sets how fast a row's profile flattens; smaller beans equilibrate almost instantly.
- Flow rate — more fresh solvent per unit time dilutes the fluid phase, keeping C_f low and sustaining a steep front longer.