The Dataset Viewer has been disabled on this dataset.

PoreML V1 — pore-scale multiphase flow trajectories

Drainage: invading phase entering a sphere pack
drainage — capillary-dominated invasion of a rock; here a generated sphere pack at 256³, the front still compact
Trapping: disconnected ganglia left behind by a flood
trapping — a flood strands disconnected ganglia; predicting which blobs survive is the hard part
GDL: water in a fibrous gas-diffusion layer
GDL — water transport through a fuel-cell gas-diffusion layer, a thin high-porosity fibrous slab
Underfill: a front sweeping past solder bumps
underfill — capillary underfill of a flip-chip package, a coherent front sweeping past solder bumps

Blue is the invading phase, grey the solid. One stored frame per campaign, at roughly 70 % of the trajectory.

560 lattice-Boltzmann simulations of two-phase flow through porous media — 158,546 stored 3-D frames, 3.32 TB. Four campaigns, seven geometry families, real micro-CT rock alongside procedurally generated media, at two spatial resolutions. Every run carries the solver's own metadata, so a trajectory can be traced back to the geometry, the capillary number and the contact angle that produced it.

The dataset is the benchmark behind poreml, and it is published whole rather than as a curated subset, so that training, held-out evaluation and transfer tests can all be drawn from the same 560 runs.


At a glance

campaign families runs frames size domain (D × H × W) what it is
drainage bentheimer, buffberea, castlegate (µCT) · blob, poly, sphere (generated) 176 69,473 1,046 GB 128×128×161 · 256×256×289 capillary-dominated invasion of a rock, inlet reservoir → rock → porous plate → outlet
GDL gdl_ct, gdl_ct_20, gdl_ct_40 (µCT) · fiber (generated) 176 53,654 1,080 GB 128×128×77 · 256×256×141 water transport in fuel-cell gas-diffusion layers, a thin high-porosity fibrous slab
trapping bentheimer, buffberea, castlegate (µCT) · blob, poly, sphere (generated) 176 23,040 390 GB 128×128×144 · 256×256×272 two-stage: equilibration, then a flood that strands disconnected ganglia
underfill flipchip (generated) 32 12,379 808 GB 22–48 × 482 × 432–476 capillary underfill of a flip-chip package, a wide thin domain around solder bumps
total 560 158,546 3,324 GB

Each campaign exists at a 128-class resolution and, except underfill, a 256-class resolution — 16 runs per campaign, the same geometry families at twice the linear size.


Download

The repository is the dataset directory. Clone it straight into data/case and the paths line up with the benchmark's default data.root with nothing to move:

pip install huggingface_hub hdf5plugin h5py
hf download PoreML/PoreML_V1 --repo-type dataset --local-dir data/case

One campaign, or one family, is a glob away — useful, since the full set is 3.3 TB:

# just the 128-class GDL runs (~476 GB)
hf download PoreML/PoreML_V1 --repo-type dataset --local-dir data/case \
  --include "GDL/runs/*/128x128x64/*"

# a single run (~3.2 GB)
hf download PoreML/PoreML_V1 --repo-type dataset --local-dir data/case \
  --include "drainage/runs/blob/128/drain_blob128_0000_128_M1_th140_b99/*"
from huggingface_hub import snapshot_download
snapshot_download("PoreML/PoreML_V1", repo_type="dataset", local_dir="data/case",
                  allow_patterns=["trapping/runs/sphere/128/*"])

hdf5plugin is not optional. Every trajectory is Zstandard-compressed (HDF5 filter id 32015). import hdf5plugin before h5py.File(...) or HDF5 reports the filter as unavailable and the read fails. For h5ls / h5dump, point HDF5_PLUGIN_PATH at hdf5plugin's plugin directory.


Layout

Every run is one directory, at <campaign>/runs/<family>/<size>/<run_id>/. <size> is the geometry's shape (128, 128x128x64, 256, 256x256x128, 26x482x476); the simulated domain is longer along the flow axis, see below.

drainage and GDL — one stage, one trajectory:

<run_id>.h5                 the trajectory — zstd-3 HDF5
<run_id>.xdmf               ParaView index over the .h5 (relative paths)
run_meta.json               solver, geometry, environment, progress, protocol (`extra`)
metrics.csv                 the solver's own per-block scalars (saturation, front position, pressures)
report.md                   the solver's one-page run summary
<run_id>.conversion.json    how this copy was produced: encoding, sizes and checksums

trapping — two stages, and note there is no plain run_meta.json. The stored trajectory is the second (flood) stage; the equilibration that preceded it is described but not stored:

flood_<run_id>.h5           the flood trajectory — the only .h5 in the directory
flood_<run_id>.xdmf
run_meta_flood.json         the flood stage: its `status` / `finish_type` describe the .h5
run_meta_stab.json          the preceding equilibration stage (no trajectory kept)
metrics_flood.csv           per-block scalars, one file per stage
metrics_stab.csv
flood_report.md
stab_report.md
<run_id>.conversion.json

underfill — the HDF5 carries a uf_ prefix, and the geometry is generated, so its parameters travel with it:

uf_<run_id>.h5
uf_<run_id>.xdmf
run_meta.json
metrics.csv
report.md
<run_id>_geometry.json      the generated flip-chip geometry's parameters
<run_id>.npy                the solid mask as bool — identical to `/rock` in the .h5, kept for convenience
<run_id>.conversion.json

A reader should glob for the single *.h5 in a run directory rather than assume the file is named after the run, and should fall back to run_meta_flood.json where run_meta.json is absent.

Reading one frame

import glob, json
import h5py, hdf5plugin  # noqa: F401 — registers the Zstandard filter
import numpy as np

run = "data/case/drainage/runs/blob/128/drain_blob128_0000_128_M1_th140_b99"
meta = json.load(open(f"{run}/run_meta.json"))
lo, hi = meta["extra"]["regions"]["rock"]          # score the rock, not the buffers
M, theta = meta["extra"]["M"], meta["solver"]["theta"]

with h5py.File(glob.glob(f"{run}/*.h5")[0], "r") as f:
    solid = f["rock"][..., lo:hi].astype(bool)     # 1 = solid
    steps = sorted(f["steps"])
    phi = f[f"steps/{steps[len(steps) // 2]}/phi"][..., lo:hi]

pore = ~solid
phi = np.where(pore, phi, -1.0)                    # phi is NaN inside solid
saturation = (phi[pore] > 0).mean()                # non-wetting fraction of the pore space

print(f"{len(steps)} frames | M={M} theta={theta} | rock {solid.shape} "
      f"porosity={pore.mean():.3f} | S_nw={saturation:.3f}")
# 380 frames | M=1.0 theta=140.0 | rock (128, 128, 128) porosity=0.283 | S_nw=0.305

Inside a trajectory

/rock                     (D, H, W)    uint8     1 = solid
/steps/<step:09d>/phi     (D, H, W)    float32   phase field; > 0 non-wetting, < 0 wetting, NaN in solid
/steps/<step:09d>/p       (D, H, W)    float32   pressure
/steps/<step:09d>/u       (D, H, W, 3) float32   velocity

Root attributes carry fields (phi,p,u), dtype, shape, the run conditions — M (viscosity ratio), ca (capillary number), theta (contact angle, degrees), sigma, nu0, chi, cs2 = 1/3, u_in — and run_meta, a JSON snapshot of the metadata taken while the run was writing. Frames are stored every 5,000 lattice steps in drainage, GDL and the trapping flood, and every 1,000 in underfill and the trapping equilibration stage (extra.block).

Three things bite readers who treat the arrays naively:

  1. phi is NaN inside the solid, not zero. Fill it before it reaches a model or a loss (poreml uses −1.0) and mask it out of any metric.
  2. The domain is longer than the rock along the last axis. extra.regions in the metadata gives the half-open spans: drainage has inbuf, rock, plate, outbuf (e.g. {"inbuf": [0,7], "rock": [7,135], "plate": [135,155], "outbuf": [155,161]}), GDL and trapping have inbuf, rock, outbuf, and underfill records no regions because it has no buffers. Saturation computed over the whole domain will not agree with the solver's own metrics.csv: the inlet buffer is always fully invaded and the plate is a boundary device, so score the rock span.
  3. The last spatial axis is the flow axis, inlet at index 0, outlet at −1.

rho and umag are not stored. Both were exact functions of what is here — rho = p / cs2 and umag = ‖u‖ — and together cost 32 % of the bytes, so they were dropped in a 2026-09-13 repack. Recompute them if you need them.


Physics and sampling

Colour-gradient lattice Boltzmann, D3Q19, immiscible two-phase, β = 0.99. Each campaign sweeps a grid of viscosity ratio M against contact angle theta:

campaign M theta ca
drainage 0.05, 0.1, 0.2, 1 120°, 130°, 140°, 150° 1 × 10⁻⁵
GDL 1, 5, 10, 20 120°, 130°, 140°, 150° 1 × 10⁻⁵
trapping 0.05, 0.1, 0.2, 1 120°, 130°, 140°, 150° not recorded
underfill 5, 10, 20, 30 30°, 40°, 50° not recorded

Contact angles above 90° make the invading phase non-wetting (drainage); the underfill campaign is the wetting-invasion case. The capillary number is held fixed and low in the two campaigns that record it, so those runs are capillary-dominated. M and theta are the only two conditions the benchmark conditions its models on — trapping and underfill record no ca, so it is the one parameter that cannot span every campaign.

Runs stop on their own terms and record why in status / finish_type — breakthrough, pore-volume cap, immobilisation of the invading phase, or a filled package. Trajectory length therefore varies a great deal (17 to 1,266 stored frames), which is why any aggregate over this dataset should average per run first, then over runs; otherwise the long runs dominate.


Citation

@misc{poreml_v1,
  title  = {PoreML V1: pore-scale multiphase flow trajectories for machine-learning benchmarks},
  author = {PoreML},
  year   = {2026},
  howpublished = {\url{https://huggingface.co/datasets/PoreML/PoreML_V1}}
}

Released under the MIT licence.

Downloads last month
170

Models trained or fine-tuned on PoreML/PoreML_data