--- license: cdla-permissive-2.0 task_categories: - other tags: - cfd - fluid-dynamics - surface-mesh - vtk - pressure - wss --- # Hemolab Bench A dataset of parameterized 3-D CFD surface meshes (UNSTRUCTURED_GRID, triangulated) with per-vertex **pressure** and **wall shear stress (WSS)** fields. Each sample corresponds to a distinct geometry generated from a 17-parameter family (curvature, twist, taper, Reynolds number, Taylor number). The dataset contains **49,660 samples**, all sharing the same triangulation topology (9,600 triangles, 25,600 vertices). ## Train / Validation / Test split The dataset ships with pre-built splits so experiments are reproducible without re-implementing the shuffle logic. | Split | Fraction | Approx. samples | |-------|----------|-----------------| | `train` | 80 % | ~40 000 | | `validation` | 10 % | ~5 000 | | `test` | 10 % | ~5 000 | Splits are assigned by a deterministic shuffle of all CSV ids: ```python import torch all_ids = sorted(full_csv_ids) # all ids, sorted ascending g = torch.Generator().manual_seed(42) perm = torch.randperm(len(all_ids), generator=g).tolist() shuffled = [all_ids[i] for i in perm] n = len(shuffled) train_ids = shuffled[:int(n * 0.8)] validation_ids = shuffled[int(n * 0.8):int(n * 0.9)] test_ids = shuffled[int(n * 0.9):] ``` ## Test-set band labels Two categorical columns (`alpha_split`, `reynold_split`) are populated **only for `test`-split rows** (they are `null` in train and validation). They indicate which distribution region each test sample belongs to, enabling per-regime evaluation. ### `alpha_split` Bands are symmetric around zero (checked on |alpha|): | Label | |alpha| range | |-------|--------------| | `IR2` | [0.000, 0.013] | | `IR1` | (0.013, 0.040) | | `ID` | [0.040, 0.120) | | `OD1` | [0.120, 0.160) | | `OD2` | [0.160, 0.200] | ### `reynold_split` | Label | Reynolds range | |-------|----------------| | `OD` | [100, 150) ∪ (450, 500] | | `ID` | [150, 250) ∪ [350, 450] | | `IR` | [250, 350) | ## Usage ```python from datasets import load_dataset # Full dataset ds = load_dataset("ibm-research/hemolab-bench") ds_train = ds["train"] ds_val = ds["validation"] ds_test = ds["test"] print(f"{len(ds_train)} train | {len(ds_val)} val | {len(ds_test)} test") # Single split ds_train = load_dataset("ibm-research/hemolab-bench", split="train") ``` Access a sample: ```python sample = ds_train[0] import numpy as np points = np.array(sample["points"]).reshape(25600, 3) # (N, 3) xyz pressure = np.array(sample["pressure"]) # (N,) wss = np.array(sample["wss"]).reshape(25600, 3) # (N, 3) vector print(sample["reynolds"], sample["alpha"]) ``` Access band labels (test split only): ```python sample = ds_test[0] print(sample["alpha_split"], sample["reynold_split"]) # e.g. "ID", "IR" ``` The shared mesh topology (cell connectivity) is stored once in `topology.parquet` at the dataset root: ```python import pandas as pd topology = pd.read_parquet( "hf://datasets/ibm-research/hemolab-bench/topology.parquet" ) cells = topology["cells"].to_numpy().reshape(-1, 4) # (9600, 4) quad indices ``` ## Dataset schema | Column | Type | Shape | Description | |--------|------|-------|-------------| | `id` | int32 | — | Sample identifier (0-based) | | `points` | float32 | 76800 (= 25600×3, flattened) | Vertex coordinates | | `pressure` | float32 | 25600 | Per-vertex pressure | | `wss` | float32 | 76800 (= 25600×3, flattened) | Per-vertex wall shear stress vector | | `alpha` | float64 | — | Geometry parameter | | `gammaY0`..`gammaY3` | float64 | — | Y-curvature parameters | | `gammaZ0`..`gammaZ3` | float64 | — | Z-curvature parameters | | `beta0`..`beta3` | float64 | — | Taper parameters | | `noise` | float64 | — | Geometry noise level | | `iseed` | int64 | — | Random seed used for geometry generation | | `reynolds` | float64 | — | Reynolds number | | `taylor` | float64 | — | Taylor number | | `alpha_split` | string | — | Alpha band label (test rows only; `null` elsewhere) | | `reynold_split` | string | — | Reynolds band label (test rows only; `null` elsewhere) | ## Citation > TBD — paper/preprint forthcoming. ## License [CDLA Permissive 2.0](https://cdla.dev/permissive-2-0/)