Fit mercury injection capillary pressure (MICP) curves with a mixture of Generalized Extreme Value (GEV) distributions in log pore-throat radius. Batch-fit many samples, compare the pore-throat size PDF and CDF of one or several curves, animate through a dataset and test which pore-throat parameter predicts permeability best.
OpenPetro community on LinkedIn
Vibe Coding Subsurface
A group for geoscientists, petrophysicists and engineers building subsurface tools with AI. Share what you build, swap ideas and follow new OpenPetro utilities.
The demo is 35 high-pressure mercury injection samples from the Kansas Geological Survey (KGS) core database (Hugoton area, three wells). Load your own file to fit many curves in one go: everything runs in your browser and no data leaves it.
Long: one row per pressure step. Columns are found by name: Sample (or ID, Well), Pc (psia), Sw or SHg (fraction or %), and optional Porosity (%), Permeability (md), Depth, Num pore systems. A file with no sample column is read one sheet per sample.
Sample,Depth,Porosity,Permeability,Pc,SHg 6,2532.1,12.1,3.0,1.64,0 6,2532.1,12.1,3.0,1.80,0.2 ...
Wide (KGS style): labels in the first column (Sample, Depth, Porosity, Permeability, Num Pore Sys), then Pc down the first column and one saturation column per sample. The original KGS workbook loads as is.
Sample,1,2,3 Porosity,19.5,14.5,14.5 Permeability,23.4,41.4,41.4 1.64,100,100,100 1.80,100,100,99.8 ...
Saturations above 1.5 are read as percent. Sw or SHg is taken from the header, or detected from the trend with pressure. Rows with Pc ≤ 0 are dropped.
The fit minimises the misfit between the model CDF and the measured wetting-phase saturation over log10 Rc, the same objective as the published workflow. The Gaussian and Thomeer fits run alongside it for comparison.
Tick up to 8 samples to overlay them. Click a row to make it the focus sample (its components, data and the sliders below follow it). Click a header to sort.
Hover any chart for a readout. Thin dots are the measured curve; solid lines are the GEV model; dashed lines are the focus sample's individual pore systems, and the ticks mark each mode. Play steps through the dataset with the model morphing from sample to sample.
Drag a slider to see how each parameter shapes the PDF and CDF, and how the misfit responds. Your edit is kept and carried into the permeability crossplot; reset returns to the optimiser's best fit.
Every sample's GEV PDF, stacked and colored by permeability. Click a ridge to focus it.
Regress log10k on one predictor at a time. The ranking table shows how well each one does on the loaded samples.
This lab puts into the browser the GEV pore-throat analysis that these collaborators published with OpenPetro founder Chicheng Xu. Our thanks to them for the method, the reference workflow it is checked against, and the MICP expertise behind it.
Lead author · GEV MICP workflow
Lead author of the research behind this lab: fitting MICP curves with GEV mixtures and testing which pore-throat parameter predicts permeability, the comparison this tool reproduces (Raheem et al., SPWLA 2025 (opens in a new tab)).
OpenPetro Distinguished Fellow · Crested Butte Petrophysical Consultants
Co-author. More than 40 years of MICP, rock typing and saturation-height work, including Saudi Aramco's full pore-system characterization from thousands of high-pressure MICP measurements.
Fellow profileLinkedIn (opens in a new tab)GitHub (opens in a new tab)
Professor · The University of Texas at Austin
Co-author, and co-developer with Chicheng Xu of the bimodal Gaussian pore-system model used here as the comparison fit (Mathematical Geosciences, 2013). Directs UT Austin's Research Consortium on Formation Evaluation.
Pore-throat radius. Each pressure step is converted with the Washburn equation, Rc = 2σ|cos θ| / Pc, with Pc in psia converted to dyn/cm² (1 psi = 68,947.6 dyn/cm²). For σ = 480 dyn/cm and θ = 140° this gives Rc (µm) ≈ 106.7 / Pc. The measured wetting-phase saturation Sw = 1 − SHg is then the fraction of pore volume entered through throats smaller than Rc, so Sw as a function of x = log10 Rc is a cumulative distribution.
GEV mixture. Each pore system is a GEV distribution in x, F(x) = exp{−[1 + ξ(x − μ)/s]−1/ξ}, with location μ, scale s and shape ξ. For ξ < 0 the distribution has an upper bound at μ − s/ξ (the largest throat) and a tail towards small throats. The model curve is Sw(x) = Σ wiFi(x) with Σ wi = 1. The mode of each pore system is μ + s[(1 + ξ)−ξ − 1]/ξ, which is μ + 0.586 s for ξ = −0.5. Pore systems are labelled so that system 1 has the larger μ; "Mode 1" is the dominant large-throat mode used as the permeability predictor.
Fitting. The parameters minimise the L2 norm of (model − measured Sw) over all steps with Pc > 0, with bounds w ∈ [0.002, 0.998], μ inside the measured log Rc range, s ∈ [0.01, 5]. The optimiser is a bounded Nelder–Mead simplex restarted from several data-driven starting points, including the starting point of the published Python workflow. ξ is fixed at −0.5 by default, as in that workflow; it can be fitted as one value shared by both systems. "Auto" chooses one or two systems by the Bayesian information criterion. Misfits are reported as RMSE in saturation units (%).
Comparison models. The bimodal Gaussian uses the same mixture with normal distributions in log Rc (Xu and Torres-Verdín, 2013). Thomeer's hyperbola, SHg = SHg∞ exp[−G / log10(Pc/Pd)], is fitted as one pore system; its PDF peaks at Pc = Pd·10G/2.
Permeability. Predictors are regressed as log10k = a + b·X (optionally + c·log10φ). The candidates are GEV Mode 1, the peak of the full GEV PDF, Gaussian μ1, Winland's R35 (read from the measured curve at SHg = 35%), Swanson (1981) k = 339 (Sb/Pc)max1.691 with Sb in % bulk volume, and Thomeer (1983) k = 3.8068 G−1.3334 (Bv∞/Pd)2 with Bv∞ in % bulk volume. Pore-throat classes follow Martin et al. (1997): nano < 0.1, micro 0.1–0.5, meso 0.5–2, macro 2–10, mega > 10 µm, applied to Mode 1.
Demo data and references. KGS HPMI core database (Hugoton area: Youngren J-1H, Youngren K-3A, Flower A-1). On this set the GEV Mode 1 regression gives r² ≈ 0.85, against 0.82 for the Gaussian, matching the published comparison. Raheem, O., Morales, M. M., Saputra, W., Torres-Verdín, C., Phillips, C. and Xu, C. (2025), Universal data-driven permeability estimation by connecting MICP analytics with big data, SPWLA 66th Annual Logging Symposium, SPWLA-2025-0049 (GEV analysis of MICP pore-throat distributions), OnePetro (opens in a new tab); Xu, C. and Torres-Verdín, C. (2013), Pore system characterization and petrophysical rock classification using a bimodal Gaussian density function, Mathematical Geosciences 45; Thomeer, J.H.M. (1960, 1983); Swanson, B.F. (1981), JPT 33; Martin, A.J., Solomon, S.T. and Hartmann, D.J. (1997), AAPG Bulletin 81. The Python version of this workflow is shared through the Open Source Petrophysics community.
Limits. Results depend on closure and conformance corrections applied before upload, on the σ and θ values, and on how many pore systems are allowed. For teaching and screening; check fits against the laboratory report before using them for rock typing.
Need MICP, NMR and core data brought together for rock typing and permeability prediction across a field? OpenPetro AI builds these workflows with you.
Contact usTheory guide
A mercury injection capillary pressure (MICP) curve is a cumulative distribution of pore-throat size. This guide shows how the Washburn equation turns the curve into a pore-throat size distribution, derives the Generalized Extreme Value (GEV) mixture model and its mode, compares it with bimodal Gaussian and Thomeer fits, and works through a permeability prediction on the KGS demo data loaded above.
In an MICP test, mercury is forced into an evacuated core sample in pressure steps. Mercury does not wet the rock, so at each pressure it enters only through throats larger than a critical radius. The fraction of pore volume still free of mercury, Sw = 1 − SHg, is therefore the fraction reached only through smaller throats. Plotted against log throat radius, that is a cumulative distribution function (CDF), and its derivative is the pore-throat size distribution.
Many rocks have more than one pore system, such as intergranular throats and much smaller throats in clays. A parametric model compresses a curve of a hundred or more points into a weight, a position and a width per pore system, which can be compared across samples for rock typing and permeability prediction.
A Gaussian in log radius is symmetric, but measured distributions are often skewed, with a sharp limit at the largest throats and a long tail towards small ones. A GEV distribution with a negative shape parameter has that shape. Raheem et al. (2025), the collaborators credited above with OpenPetro founder Chicheng Xu, fitted GEV mixtures to MICP curves and tested which pore-throat parameter predicts permeability best. This lab reproduces that workflow.
For a cylindrical throat, the Washburn (Young–Laplace) equation gives the radius that mercury enters at pressure Pc:
Rc = 2·σ·|cos θ| / Pc
With σ = 480 dyn/cm, θ = 140° and Pc in psia (1 psi = 68,947.6 dyn/cm²), 2 × 480 × 0.766 / 68,947.6 = 0.01067 cm, so Rc (µm) ≈ 106.7/Pc. The fit works in x = log10 Rc, and the measured Sw(x) rises from its lowest value at the smallest throats to 1 at the largest.
With z = (x − μ)/s, location μ, scale s and shape ξ, the GEV cumulative distribution and density are
F(x) = exp{−[1 + ξ·z]−1/ξ}, f(x) = (1/s)·[1 + ξ·z]−1/ξ − 1·exp{−[1 + ξ·z]−1/ξ}defined where 1 + ξ·z > 0; ξ → 0 gives the Gumbel distribution
For ξ < 0 the condition 1 + ξ·z > 0 means z < −1/ξ, so the distribution has an upper bound at xmax = μ − s/ξ: the largest throat. For ξ = −0.5 that is μ + 2s.
With t = 1 + ξ·z, ln f = −ln s − (1 + 1/ξ)·ln t − t−1/ξ. Because dt/dz = ξ and d(t−1/ξ)/dz = −t−1/ξ − 1,
d(ln f)/dz = [−(1 + ξ) + t−1/ξ] / t = 0 ⇒ t = (1 + ξ)−ξ
xmode = μ + s·[(1 + ξ)−ξ − 1] / ξfor ξ = −0.5: (0.50.5 − 1)/(−0.5) = 0.586, so xmode = μ + 0.586·s
The mode of the large-throat system, Mode 1, is the GEV permeability predictor.
Sw(x) = Σ wi·Fi(x), Σ wi = 1
The fit minimizes the squared misfit in Sw over all pressure steps, with w ∈ [0.002, 0.998], μ inside the measured log Rc range and s ∈ [0.01, 5]. A bounded Nelder–Mead simplex is restarted from several starting points. The system with the larger μ is labelled 1. In Auto mode, one or two systems are chosen by the Bayesian information criterion, BIC = N·ln(SSE/N) + k·ln N, which penalizes the extra parameters of the second system.
Each predictor X, including Winland R35 read from the measured curve, is regressed as log10 k = a + b·X (optionally + c·log10 φ) and ranked by r².
| Class | Rc (µm) | Pc at 480 dyn/cm, 140° (psia) |
|---|---|---|
| Mega | > 10 | < 10.7 |
| Macro | 2–10 | 10.7–53.3 |
| Meso | 0.5–2 | 53.3–213 |
| Micro | 0.1–0.5 | 213–1,067 |
| Nano | < 0.1 | > 1,067 |
The page opens with 35 KGS samples fitted with two systems and ξ = −0.5. The focus sample is sample 6 (Youngren J-1H, 2532.1 ft, φ = 12.1%, k = 3.00 md). Its first step, 1.64 psia, converts to Rc = 106.7/1.64 = 65.0 µm (x = 1.81).
The GEV fit gives w1 = 0.70, μ1 = 0.241, s1 = 0.279 and w2 = 0.30, μ2 = −1.422, s2 = 0.755, with an RMSE of 0.46% in saturation. The two-Gaussian fit has 0.95% and Thomeer 1.48%.
xmode,1 = 0.241 + 0.586 × 0.279 = 0.405 ⇒ Mode 1 = 100.405 = 2.54 µmmacro class; mercury reaches this throat size at 106.7/2.54 ≈ 42 psia
System 1 is bounded at μ1 + 2s1 = 0.799 (6.30 µm). Mode 2 is −0.980, or 0.105 µm (micro). Across all 35 samples, the Mode 1 regression is
log10 k = 0.035 + 1.940 · log10 Rmode,1 ⇒ k = 100.035 + 1.940 × 0.405 ≈ 6.61 mdr² = 0.851, RMSE 0.41 log units, n = 35
Swanson gives 5.66 md and Thomeer (1983) 6.04 md, against 3.00 md measured.
| Predictor | r² |
|---|---|
| Swanson k | 0.925 |
| Thomeer (1983) k | 0.919 |
| Winland R35 (data) | 0.877 |
| Thomeer PDF peak | 0.861 |
| GEV Mode 1 | 0.851 |
| GEV PDF peak | 0.849 |
| Gaussian μ1 | 0.844 |
On this small set the GEV mode predicts slightly better than the Gaussian mode, while Swanson and Thomeer (1983), which include porosity through bulk-volume saturation, rank higher. The GEV fits the curves better: mean RMSE 0.76% against 1.26% for the Gaussian, lower on 34 of 35 samples.
Use the Washburn equation, Rc = 2σ|cos θ|/Pc, with consistent units. For air–mercury with σ = 480 dyn/cm and θ = 140°, and Pc in psia, it simplifies to Rc (µm) ≈ 106.7/Pc. So 10 psia corresponds to about 10.7 µm and 1,000 psia to about 0.107 µm.
A Gaussian in log radius is symmetric, but most measured pore-throat distributions are skewed: they stop sharply at the largest throats and tail off slowly towards small ones. A GEV distribution with a negative shape parameter ξ has an upper bound and a long lower tail, so it fits that shape with one location and one scale per system once ξ is fixed. On the KGS demo set it fits 34 of 35 curves better.
For ξ < 0 the GEV distribution has a finite upper limit at μ − s/ξ, which is μ + 2s for ξ = −0.5. In log pore-throat radius, that limit is the largest throat, close to the entry pressure. The mode then sits at μ + 0.586·s. Fixing ξ for all samples keeps μ and s comparable from sample to sample.
Start with two, which covers most sandstones and carbonates with a macropore and a micropore system. Use one when the curve has a single plateau. If you are unsure, let the Bayesian information criterion decide: it accepts the second system only when the drop in misfit outweighs the three extra parameters.
R35 is the pore-throat radius at 35% mercury saturation, read directly from the MICP curve. The Winland equation published by Kolodzie (1980), log R35 = 0.732 + 0.588·log k − 0.864·log φ, links it to permeability and porosity in percent. The GEV mode is a model parameter. On the demo set R35 gives r² = 0.877 and GEV Mode 1 gives 0.851.
It depends on the dataset, which is why the lab ranks every predictor on the samples you load. Parameters tied to the largest connected throats usually work best, such as GEV Mode 1, Thomeer Pd with G, Swanson's apex and R35. On the 35 KGS demo samples, Swanson and Thomeer (1983) reach r² above 0.9 and the single-radius predictors 0.84 to 0.88.