kslote commited on
Commit
90da273
·
verified ·
1 Parent(s): b9d7940

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +196 -16
README.md CHANGED
@@ -1,4 +1,26 @@
1
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  dataset_info:
3
  features:
4
  - name: name
@@ -10,26 +32,184 @@ dataset_info:
10
  - name: rayleigh_number
11
  dtype: float64
12
  - name: grid_shape
13
- sequence: int32
 
14
  - name: u_field
15
- sequence: float32
 
16
  - name: v_field
17
- sequence: float32
 
18
  - name: t_field
19
- sequence: float32
 
20
  - name: p_field
21
- sequence: float32
 
22
  - name: latex_equation
23
  dtype: string
24
- splits:
25
- - name: train
26
- num_bytes: 5085305
27
- num_examples: 77
28
- download_size: 970522
29
- dataset_size: 5085305
30
- configs:
31
- - config_name: default
32
- data_files:
33
- - split: train
34
- path: data/train-*
35
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - en
4
+ license: cc-by-4.0
5
+ pretty_name: Navier-Stokes Analytical Benchmark
6
+ tags:
7
+ - physics
8
+ - fluid-dynamics
9
+ - navier-stokes
10
+ - computational-fluid-dynamics
11
+ - scientific-computing
12
+ - benchmark
13
+ task_categories:
14
+ - other
15
+ size_categories:
16
+ - n<1K
17
+ annotations_creators:
18
+ - expert-generated
19
+ configs:
20
+ - config_name: default
21
+ data_files:
22
+ - split: train
23
+ path: data/train-*
24
  dataset_info:
25
  features:
26
  - name: name
 
32
  - name: rayleigh_number
33
  dtype: float64
34
  - name: grid_shape
35
+ sequence:
36
+ dtype: int32
37
  - name: u_field
38
+ sequence:
39
+ dtype: float32
40
  - name: v_field
41
+ sequence:
42
+ dtype: float32
43
  - name: t_field
44
+ sequence:
45
+ dtype: float32
46
  - name: p_field
47
+ sequence:
48
+ dtype: float32
49
  - name: latex_equation
50
  dtype: string
 
 
 
 
 
 
 
 
 
 
 
51
  ---
52
+
53
+ # Navier-Stokes Analytical Benchmark
54
+
55
+ A dataset of 2D incompressible fluid dynamics problems with **closed-form analytical solutions** on a 64x64 grid. Intended as ground-truth supervision for physics-informed neural networks (PINNs), neural operators (FNO, DeepONet), and other scientific ML models.
56
+
57
+ Every sample provides velocity (u, v), pressure (p), and temperature (T) fields computed directly from exact or series-expansion solutions to the Navier-Stokes and energy equations -- no numerical solver is involved.
58
+
59
+ ## Dataset Description
60
+
61
+ - **Repository:** [C3S2-Lab/navier-stokes-benchmark](https://huggingface.co/datasets/C3S2-Lab/navier-stokes-benchmark)
62
+ - **Size:** 77 samples
63
+ - **Grid:** 64 x 64, uniform spacing on [0, 1]^2
64
+ - **Fields per sample:** u (horizontal velocity), v (vertical velocity), T (temperature), p (pressure)
65
+ - **Format:** Apache Arrow / Parquet
66
+
67
+ ## Flow Types
68
+
69
+ ### 1. Poiseuille (Channel) Flow -- 24 samples
70
+
71
+ Fully-developed pressure-driven flow between parallel plates. Exact parabolic velocity profile.
72
+
73
+ $$u(y) = \frac{Re}{2}\left(-\frac{dP}{dx}\right) y(1-y), \quad v = 0, \quad p(x) = \frac{dP}{dx}\, x$$
74
+
75
+ | Parameter | Values |
76
+ |---|---|
77
+ | Re | 1, 10, 50, 100, 200, 500, 1000, 2000 |
78
+ | dP/dx | -0.5, -1.0, -2.0 |
79
+
80
+ ### 2. Lid-Driven Cavity -- 6 samples
81
+
82
+ Square cavity with a moving top wall in the Stokes (creeping-flow) limit. Stream function expressed as a truncated Fourier-sinh series (8 terms).
83
+
84
+ $$\nabla^4 \psi = 0, \quad \psi = \sum_{n=1}^{N} c_n \frac{\sinh(n\pi y)}{\sinh(n\pi)} \sin(n\pi x)$$
85
+
86
+ | Parameter | Values |
87
+ |---|---|
88
+ | Re | 0.01, 0.1, 1.0, 10.0, 50.0, 100.0 |
89
+ | U_lid | 1.0 |
90
+
91
+ ### 3. Rayleigh-Benard Convection -- 32 samples
92
+
93
+ Linear onset eigenmodes of buoyancy-driven convection between heated plates. Critical Rayleigh number Ra_c ~ 1708 for rigid-rigid boundaries.
94
+
95
+ $$\frac{\partial \mathbf{u}}{\partial t} + (\mathbf{u}\cdot\nabla)\mathbf{u} = -\nabla p + Pr\,\nabla^2\mathbf{u} + Ra\,Pr\,T\,\hat{z}$$
96
+
97
+ | Parameter | Values |
98
+ |---|---|
99
+ | Ra | 500, 1000, 1708, 2000, 5000, 10000, 50000, 100000 |
100
+ | Pr | 0.1, 0.71, 1.0, 7.0 |
101
+
102
+ ### 4. Buoyancy Plume -- 15 samples
103
+
104
+ Self-similar Gaussian profile for a laminar free-convection plume above a line heat source.
105
+
106
+ $$w(\eta) \sim \frac{\sqrt{Ra\,Q}}{x^{1/2}} e^{-\eta^2}, \quad T(\eta) \sim \frac{Q}{x^{3/4}} e^{-Pr\,\eta^2}, \quad \eta = \frac{y}{x^{3/4}}$$
107
+
108
+ | Parameter | Values |
109
+ |---|---|
110
+ | Ra | 1000, 5000, 10000, 50000, 100000 |
111
+ | Pr | 0.71, 1.0, 7.0 |
112
+
113
+ ## Dataset Schema
114
+
115
+ | Field | Type | Description |
116
+ |---|---|---|
117
+ | `name` | `string` | Unique identifier (e.g. `poiseuille_Re100`) |
118
+ | `description` | `string` | Human-readable description of the flow configuration |
119
+ | `parameters` | `string` (JSON) | Physical parameters (`Re`, `Ra`, `Pr`, `dpdx`, etc.) |
120
+ | `rayleigh_number` | `float64` | Rayleigh number (`null` for isothermal flows) |
121
+ | `grid_shape` | `Sequence[int32]` | `[64, 64]` spatial resolution |
122
+ | `u_field` | `Sequence[float32]` | Horizontal velocity, flattened (4096 values) |
123
+ | `v_field` | `Sequence[float32]` | Vertical velocity, flattened |
124
+ | `t_field` | `Sequence[float32]` | Temperature field, flattened (zeros if isothermal) |
125
+ | `p_field` | `Sequence[float32]` | Pressure field, flattened |
126
+ | `latex_equation` | `string` | LaTeX governing equations / analytical solution |
127
+
128
+ All field arrays are stored flat and should be reshaped to `grid_shape` (64 x 64) for use.
129
+
130
+ ## Usage
131
+
132
+ ### Load from the Hub
133
+
134
+ ```python
135
+ from datasets import load_dataset
136
+
137
+ ds = load_dataset("C3S2-Lab/navier-stokes-benchmark")
138
+ ```
139
+
140
+ ### Convert to PyTorch tensors
141
+
142
+ ```python
143
+ ds.set_format("torch", columns=["u_field", "v_field", "t_field", "p_field"])
144
+
145
+ sample = ds["train"][0]
146
+ u = sample["u_field"].reshape(64, 64)
147
+ ```
148
+
149
+ ### Filter by flow regime
150
+
151
+ ```python
152
+ # Supercritical Rayleigh-Benard cases only
153
+ rb = ds["train"].filter(
154
+ lambda x: x["rayleigh_number"] is not None and x["rayleigh_number"] > 1708
155
+ )
156
+ ```
157
+
158
+ ### Generate locally
159
+
160
+ ```bash
161
+ pip install numpy datasets
162
+ python generate_ns_dataset.py
163
+ ```
164
+
165
+ This creates `ns_dataset/` (Arrow format) and `ns_dataset.parquet`.
166
+
167
+ ### Push to the Hub
168
+
169
+ ```bash
170
+ python generate_ns_dataset.py --push --repo C3S2-Lab/navier-stokes-benchmark
171
+ ```
172
+
173
+ | Flag | Default | Description |
174
+ |---|---|---|
175
+ | `--save` | `ns_dataset` | Local save directory |
176
+ | `--push` | off | Push to HuggingFace Hub after generation |
177
+ | `--repo` | `C3S2-Lab/navier-stokes-benchmark` | Target HuggingFace repository |
178
+
179
+ ## Dataset Creation
180
+
181
+ All fields are computed from exact analytical solutions or truncated series expansions of the incompressible Navier-Stokes equations. No numerical PDE solver is used. The solutions cover:
182
+
183
+ - **Poiseuille:** Exact closed-form solution to the steady momentum equation.
184
+ - **Lid-driven cavity:** Biharmonic stream function series (Shankar & Deshpande, 2000), valid in the Stokes limit.
185
+ - **Rayleigh-Benard:** Linear stability eigenmodes at/near the critical Rayleigh number (rigid-rigid boundaries).
186
+ - **Buoyancy plume:** Gebhart similarity solution with Gaussian self-similar profiles.
187
+
188
+ Grid: uniform 64x64 on the unit square [0, 1]^2 (plume domain shifted to x in [0.1, 1.0] to avoid the source singularity).
189
+
190
+ ## Intended Use
191
+
192
+ - Supervised training and validation of physics-informed neural networks (PINNs)
193
+ - Benchmarking neural operator architectures (FNO, DeepONet, etc.)
194
+ - Evaluating equation-discovery and symbolic regression methods (via `latex_equation`)
195
+ - Teaching and educational demonstrations of canonical fluid flows
196
+
197
+ ## Limitations
198
+
199
+ - All solutions are 2D, steady-state, and incompressible.
200
+ - Lid-driven cavity uses a Stokes-limit approximation; accuracy degrades for Re >> 1.
201
+ - Rayleigh-Benard fields are linear-onset eigenmodes, not fully nonlinear convection rolls.
202
+ - The 64x64 resolution is coarse for capturing sharp gradients at high Re or Ra.
203
+ - Temperature fields are zero-filled for isothermal flows (Poiseuille, lid-driven cavity).
204
+
205
+ ## Citation
206
+
207
+ ```bibtex
208
+ @dataset{c3s2lab_navier_stokes_benchmark,
209
+ title = {Navier-Stokes Analytical Benchmark},
210
+ author = {C3S2-Lab},
211
+ year = {2026},
212
+ url = {https://huggingface.co/datasets/C3S2-Lab/navier-stokes-benchmark},
213
+ note = {Analytical solutions for 2D incompressible fluid dynamics}
214
+ }
215
+ ```