This is a genuine 2D re-implementation of the same Kelvin-equation physics as the 3D single-pore version, not a flattened camera view: instead of watching one pore fill, this simulates an ensemble of many independent cylindrical pores whose radii are drawn from a log-normal pore-size distribution — a real, statistical-mechanics view of a mesoporous solid like silica gel or MCM-41.
ln(P/P0) = -k·γ·Vm / (r_k·R·T) (each pore, independently)
ensemble fill(P) = Σᵢ fillᵢ(P)·rᵢ² / Σᵢ rᵢ² (volume-weighted)
Each pore condenses/evaporates on its own via the same k=1 (adsorption) / k=2 (desorption) Kelvin branches as the 3D sim, so smaller pores flood and empty at lower P/P₀ than larger ones — sweep the pressure and watch condensation ripple through the grid from small pores to large ones on the way up, and drain back from large to small on the way down.
- Pore grid (top) — each circle is one pore's cross-section, sized by its own radius and colored by its own state (empty / film / condensed).
- Isotherm (middle) — the ensemble's volume-weighted fill fraction vs P/P₀, tracing the adsorption (blue) and desorption (red) branches of the hysteresis loop.
- Recovered PSD (bottom) — a live BJH-style derivative inversion: differentiating the desorption branch and reassigning each increment of desorbed volume to the Kelvin radius active at that pressure (corrected for film thickness) reconstructs a pore-size histogram — dashed line — for direct comparison against the true generating distribution (filled). Sweep pressure all the way up and back down once to populate it.
Real-world relevance: this is literally the BJH method itself — the inversion algorithm real porosimetry instruments run on a measured N₂/Ar isotherm to report a material's pore-size distribution. Verified numerically offline: for a σ=0.32 log-normal ensemble the recovered mass-weighted mean radius lands within ~3% of the true generating mean.