Datasets:
Add dataset README with documentation
Browse files
README.md
ADDED
|
@@ -0,0 +1,128 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
tags:
|
| 5 |
+
- openfoam
|
| 6 |
+
- cfd
|
| 7 |
+
- computational-fluid-dynamics
|
| 8 |
+
- simulation
|
| 9 |
+
- reference-data
|
| 10 |
+
license: mit
|
| 11 |
+
---
|
| 12 |
+
|
| 13 |
+
# pyOpenFOAM Reference Data
|
| 14 |
+
|
| 15 |
+
OpenFOAM-11 reference simulation data for validating [pyOpenFOAM](https://github.com/AlanZee/pyOpenFOAM) — a pure Python/PyTorch reimplementation of OpenFOAM.
|
| 16 |
+
|
| 17 |
+
## Dataset Summary
|
| 18 |
+
|
| 19 |
+
| Property | Value |
|
| 20 |
+
|----------|-------|
|
| 21 |
+
| **Total cases** | 229 |
|
| 22 |
+
| **Categories** | 21 |
|
| 23 |
+
| **Source** | OpenFOAM v11 (Docker) |
|
| 24 |
+
| **Uncompressed size** | 3.2 GB |
|
| 25 |
+
| **Compressed size** | 1.18 GB |
|
| 26 |
+
| **Coverage** | 88.4% of OpenFOAM-13 tutorials (199/225) |
|
| 27 |
+
|
| 28 |
+
## Categories
|
| 29 |
+
|
| 30 |
+
| Category | Count | Description |
|
| 31 |
+
|----------|-------|-------------|
|
| 32 |
+
| `fluid` | ~80 | General incompressible fluid dynamics |
|
| 33 |
+
| `incompressibleFluid` | ~30 | Incompressible flow solvers |
|
| 34 |
+
| `compressibleVoF` | ~15 | Compressible Volume-of-Fluid multiphase |
|
| 35 |
+
| `incompressibleVoF` | ~15 | Incompressible VoF multiphase |
|
| 36 |
+
| `multiphaseEuler` | ~10 | Eulerian multiphase |
|
| 37 |
+
| `incompressibleMultiphaseVoF` | ~10 | Incompressible multiphase VoF |
|
| 38 |
+
| `movingMesh` | ~10 | Dynamic mesh / FSI |
|
| 39 |
+
| `solidDisplacement` | ~8 | Structural mechanics |
|
| 40 |
+
| `shockFluid` | ~8 | Shock-capturing compressible |
|
| 41 |
+
| `multicomponentFluid` | ~8 | Species transport |
|
| 42 |
+
| `film` / `isothermalFilm` | ~6 | Thin film flows |
|
| 43 |
+
| `legacy` | ~5 | Legacy solvers |
|
| 44 |
+
| `potentialFoam` | ~3 | Potential flow |
|
| 45 |
+
| Others | ~15 | XiFluid, drift-flux, buoyant, etc. |
|
| 46 |
+
|
| 47 |
+
## Data Format
|
| 48 |
+
|
| 49 |
+
Each case directory contains the complete OpenFOAM case structure:
|
| 50 |
+
|
| 51 |
+
```
|
| 52 |
+
case_name/
|
| 53 |
+
├── 0/ # Initial/boundary conditions
|
| 54 |
+
│ ├── U # Velocity field
|
| 55 |
+
│ ├── p # Pressure field
|
| 56 |
+
│ └── ... # Other fields (k, epsilon, T, alpha, etc.)
|
| 57 |
+
├── constant/
|
| 58 |
+
│ ├── polyMesh/ # Mesh (points, faces, owner, neighbour, boundary)
|
| 59 |
+
│ └── ... # Physical properties
|
| 60 |
+
└── system/
|
| 61 |
+
├── controlDict # Simulation control
|
| 62 |
+
├── fvSchemes # Discretisation schemes
|
| 63 |
+
└── fvSolution # Solver settings
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
## Usage
|
| 67 |
+
|
| 68 |
+
### Download and Extract
|
| 69 |
+
|
| 70 |
+
```python
|
| 71 |
+
from huggingface_hub import hf_hub_download
|
| 72 |
+
import tarfile
|
| 73 |
+
|
| 74 |
+
# Download
|
| 75 |
+
path = hf_hub_download(
|
| 76 |
+
repo_id="AlanZee/pyOpenFOAM-reference-data",
|
| 77 |
+
filename="openfoam-reference-data.tar.gz",
|
| 78 |
+
repo_type="dataset"
|
| 79 |
+
)
|
| 80 |
+
|
| 81 |
+
# Extract
|
| 82 |
+
with tarfile.open(path, "r:gz") as tar:
|
| 83 |
+
tar.extractall("validation/reference/openfoam/")
|
| 84 |
+
```
|
| 85 |
+
|
| 86 |
+
### Use with pyOpenFOAM
|
| 87 |
+
|
| 88 |
+
```python
|
| 89 |
+
from pyfoam.io.case import Case
|
| 90 |
+
|
| 91 |
+
# Load a reference case
|
| 92 |
+
case = Case("validation/reference/openfoam/fluid_cavity")
|
| 93 |
+
mesh = case.mesh()
|
| 94 |
+
U = case.read_field("U")
|
| 95 |
+
p = case.read_field("p")
|
| 96 |
+
```
|
| 97 |
+
|
| 98 |
+
## Generation
|
| 99 |
+
|
| 100 |
+
Reference data was generated using:
|
| 101 |
+
|
| 102 |
+
```bash
|
| 103 |
+
docker run --rm -v $(pwd):/work openfoam/openfoam11-paraview510 \
|
| 104 |
+
bash -c "cd /work && ./Allrun"
|
| 105 |
+
```
|
| 106 |
+
|
| 107 |
+
Each case was run to convergence with OpenFOAM's native solvers, and the final-time fields were saved.
|
| 108 |
+
|
| 109 |
+
## Related
|
| 110 |
+
|
| 111 |
+
- **pyOpenFOAM**: [github.com/AlanZee/pyOpenFOAM](https://github.com/AlanZee/pyOpenFOAM)
|
| 112 |
+
- **OpenFOAM**: [openfoam.org](https://openfoam.org)
|
| 113 |
+
- **OpenFOAM-13**: [openfoam.org/news/…](https://openfoam.org)
|
| 114 |
+
|
| 115 |
+
## License
|
| 116 |
+
|
| 117 |
+
MIT
|
| 118 |
+
|
| 119 |
+
## Citation
|
| 120 |
+
|
| 121 |
+
```bibtex
|
| 122 |
+
@software{pyopenfoam2026,
|
| 123 |
+
author = {AlanZee},
|
| 124 |
+
title = {pyOpenFOAM: Pure Python/PyTorch CFD},
|
| 125 |
+
year = {2026},
|
| 126 |
+
url = {https://github.com/AlanZee/pyOpenFOAM}
|
| 127 |
+
}
|
| 128 |
+
```
|