AlanZee commited on
Commit
051a263
·
verified ·
1 Parent(s): 4fcd3b9

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +74 -94
README.md CHANGED
@@ -1,136 +1,116 @@
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
- ## Files
99
-
100
- | File | Size | Description |
101
- |------|------|-------------|
102
- | `openfoam-reference-data.tar.gz` | 1.24 GB | 232 OpenFOAM v11 reference cases |
103
- | `pyopenfoam-simulation-results.tar.gz` | 47 KB | pyOpenFOAM validation results (34 JSON files) |
104
- | `README.md` | - | This file |
105
-
106
- ## Generation
107
-
108
- Reference data was generated using:
109
-
110
- ```bash
111
- docker run --rm -v $(pwd):/work openfoam/openfoam11-paraview510 \
112
- bash -c "cd /work && ./Allrun"
113
- ```
114
-
115
- Each case was run to convergence with OpenFOAM's native solvers, and the final-time fields were saved.
116
-
117
- ## Related
118
-
119
- - **pyOpenFOAM**: [github.com/AlanZee/pyOpenFOAM](https://github.com/AlanZee/pyOpenFOAM)
120
- - **OpenFOAM**: [openfoam.org](https://openfoam.org)
121
- - **OpenFOAM-13**: [openfoam.org/news/…](https://openfoam.org)
122
-
123
- ## License
124
-
125
- MIT
126
-
127
- ## Citation
128
 
129
  ```bibtex
130
  @software{pyopenfoam2026,
131
  author = {AlanZee},
132
- title = {pyOpenFOAM: Pure Python/PyTorch CFD},
133
  year = {2026},
134
  url = {https://github.com/AlanZee/pyOpenFOAM}
135
  }
136
  ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  language:
3
  - en
4
+ - zh
5
  tags:
6
  - openfoam
7
  - cfd
8
  - computational-fluid-dynamics
9
  - simulation
10
  - reference-data
11
+ - pytorch
12
+ - gpu
13
+ license: gpl-3.0
14
  ---
15
 
16
+ # pyOpenFOAM Reference Data & Validation Results
17
 
18
+ OpenFOAM-13 reference simulation data and pyOpenFOAM validation results for [pyOpenFOAM](https://github.com/AlanZee/pyOpenFOAM) — a pure Python/PyTorch reimplementation of OpenFOAM with GPU acceleration and automatic differentiation.
19
 
20
+ ---
21
+
22
+ ## Dataset Summary / 数据摘要
23
 
24
  | Property | Value |
25
  |----------|-------|
26
+ | **Total reference cases** | 257 |
27
+ | **Validated cases** | 233 (90.7%) |
28
  | **Categories** | 21 |
29
+ | **Source** | OpenFOAM v11/v13 |
30
+ | **Reference data size** | 2.42 GB |
31
+ | **pyOpenFOAM results** | 3.3 MB |
32
+ | **Field files analyzed** | 2,032 |
33
+ | **Unique field types** | 376 |
34
+ | **Validation figures** | 11 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
 
36
+ ## Contents / 内容
37
+
38
+ | File | Size | Description |
39
+ |------|------|-------------|
40
+ | `openfoam-reference-data.tar.gz` | 2.42 GB | 257 OpenFOAM reference cases (96% of v13 tutorials) |
41
+ | `pyopenfoam-simulation-results.tar.gz` | 47 KB | pyOpenFOAM validation results (34 JSON files) |
42
+ | `validation_report.md` | 19 KB | Comprehensive validation report with academic citations |
43
+ | `figures/` | 3.3 MB | 11 validation figures (300 DPI) |
44
+ | `per_case_data/` | 1.1 MB | Per-case analysis for all 257 reference cases |
45
+ | Docker image | 622 MB | OpenFOAM-13 compiled environment (122 libs, 9 binaries) |
46
+
47
+ ## Validation Results / 验证结果
 
 
48
 
49
+ | Metric | Result |
50
+ |--------|--------|
51
+ | Unit tests (CPU) | 17,130 / 17,130 pass |
52
+ | Unit tests (GPU) | 17,082 / 17,085 pass |
53
+ | Differentiable CFD | 42 / 42 pass |
54
+ | Solver E2E verification | 69 / 69 pass |
55
+ | Couette flow error | 0.001% |
56
+ | Poiseuille flow error | 0.02% |
57
+ | Cavity Re=100 (32×32) | 1.0% vs Ghia et al. (1982) |
58
 
59
+ ## Quick Start / 快速开始
60
 
61
  ```python
62
  from huggingface_hub import hf_hub_download
63
  import tarfile
64
 
65
+ # Download reference data
66
  path = hf_hub_download(
67
  repo_id="AlanZee/pyOpenFOAM-reference-data",
68
  filename="openfoam-reference-data.tar.gz",
69
  repo_type="dataset"
70
  )
 
 
71
  with tarfile.open(path, "r:gz") as tar:
72
  tar.extractall("validation/reference/openfoam/")
73
  ```
74
 
75
+ ## Citation / 引用
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
 
77
  ```bibtex
78
  @software{pyopenfoam2026,
79
  author = {AlanZee},
80
+ title = {pyOpenFOAM: Pure Python/PyTorch CFD with GPU Acceleration},
81
  year = {2026},
82
  url = {https://github.com/AlanZee/pyOpenFOAM}
83
  }
84
  ```
85
+
86
+ ## References / 参考文献
87
+
88
+ 1. Ghia, K.N., Ghia, U., Shin, C.T. (1982). "High-Re solutions for incompressible flow." *J. Comput. Phys.*, 48, 387-411.
89
+ 2. Weller, H.G. et al. (1998). "A tensorial approach to computational continuum mechanics." *Computers in Physics*, 12(6), 620-631.
90
+ 3. OpenFOAM Foundation (2025). OpenFOAM-13. https://openfoam.org/
91
+
92
+ ---
93
+
94
+ ## 数据集说明 (中文)
95
+
96
+ 本数据集包含 pyOpenFOAM 项目的所有验证数据:
97
+
98
+ - **参照数据**: 257 个 OpenFOAM-13 官方教程的仿真结果,覆盖 21 个求解器类别
99
+ - **验证结果**: pyOpenFOAM 在所有参照算例上的运行结果和精度对比
100
+ - **分析报告**: 符合学术规范的全量验证报告,含 11 张数据可视化图表
101
+ - **Docker 镜像**: 预编译的 OpenFOAM-13 环境 (Ubuntu 22.04, GCC 10)
102
+
103
+ ### 验证覆盖率
104
+
105
+ | 类别 | 算例数 | 已验证 | 覆盖率 |
106
+ |------|--------|--------|--------|
107
+ | 不可压缩稳态 | 55 | 47 | 85.5% |
108
+ | 不可压缩 VoF | 39 | 33 | 84.6% |
109
+ | 多相 Euler | 26 | 26 | 100% |
110
+ | 通用流体 | 31 | 29 | 93.5% |
111
+ | 多组分反应 | 19 | 18 | 94.7% |
112
+ | 多区域 CHT | 20 | 18 | 90.0% |
113
+ | 可压缩 VoF | 8 | 7 | 87.5% |
114
+ | 可压缩激波 | 8 | 8 | 100% |
115
+ | 其他 (8 类) | 31 | 29 | 93.5% |
116
+ | **总计** | **257** | **233** | **90.7%** |