kslote commited on
Commit
ebd803c
·
verified ·
1 Parent(s): c1e4159

Update dataset card: 8 problem classes targeting SINDy/EDMD failures

Browse files
Files changed (1) hide show
  1. README.md +115 -102
README.md CHANGED
@@ -10,6 +10,9 @@ tags:
10
  - computational-fluid-dynamics
11
  - scientific-computing
12
  - benchmark
 
 
 
13
  task_categories:
14
  - other
15
  size_categories:
@@ -34,136 +37,178 @@ dataset_info:
34
  - name: ndim
35
  dtype: int32
36
  - name: grid_shape
37
- sequence: int32
 
38
  - name: reynolds_number
39
  dtype: float64
40
  - name: time
41
  dtype: float64
42
  - name: ux_field
43
- sequence: float32
 
44
  - name: uy_field
45
- sequence: float32
 
46
  - name: uz_field
47
- sequence: float32
 
48
  - name: p_field
49
- sequence: float32
 
50
  - name: rho_field
51
- sequence: float32
 
52
  - name: temperature_field
53
- sequence: float32
 
54
  - name: latex_equation
55
  dtype: string
56
- splits:
57
- - name: train
58
- num_bytes: 89782251
59
- num_examples: 277
60
- download_size: 19836997
61
- dataset_size: 89782251
62
  ---
63
 
64
  # Navier-Stokes Analytical Benchmark
65
 
66
- A benchmark dataset of 2D incompressible fluid dynamics problems with **closed-form analytical solutions** on a 64x64 grid. Designed for evaluating **deep-koopman-kan** (Koopman-based lifting) and **KANDy** (equation discovery) pipelines on canonical Navier-Stokes flows.
67
 
68
- Every sample provides velocity (u, v), pressure (p), and temperature (T) fields computed directly from exact or series-expansion solutions -- no numerical solver is involved. The `latex_equation` field serves as the ground-truth reward signal for equation-discovery agents.
69
 
70
  ## Dataset Description
71
 
72
  - **Repository:** [C3S2-Lab/navier-stokes-benchmark](https://huggingface.co/datasets/C3S2-Lab/navier-stokes-benchmark)
73
- - **Size:** 77 samples
74
- - **Grid:** 64 x 64, uniform spacing on [0, 1]^2
75
- - **Fields per sample:** u (horizontal velocity), v (vertical velocity), T (temperature), p (pressure)
76
  - **Format:** Apache Arrow / Parquet
77
 
78
- ## Flow Types
79
 
80
- ### 1. Poiseuille (Channel) Flow -- 24 samples
81
 
82
- Fully-developed pressure-driven flow between parallel plates. Exact parabolic velocity profile.
83
 
84
- $$u(y) = \frac{Re}{2}\left(-\frac{dP}{dx}\right) y(1-y), \quad v = 0, \quad p(x) = \frac{dP}{dx}\, x$$
85
 
86
  | Parameter | Values |
87
  |---|---|
88
- | Re | 1, 10, 50, 100, 200, 500, 1000, 2000 |
89
- | dP/dx | -0.5, -1.0, -2.0 |
 
90
 
91
- ### 2. Lid-Driven Cavity -- 6 samples
92
 
93
- Square cavity with a moving top wall in the Stokes (creeping-flow) limit. Stream function expressed as a truncated Fourier-sinh series (8 terms).
94
 
95
- $$\nabla^4 \psi = 0, \quad \psi = \sum_{n=1}^{N} c_n \frac{\sinh(n\pi y)}{\sinh(n\pi)} \sin(n\pi x)$$
 
 
 
 
 
 
 
 
 
96
 
97
  | Parameter | Values |
98
  |---|---|
99
- | Re | 0.01, 0.1, 1.0, 10.0, 50.0, 100.0 |
100
- | U_lid | 1.0 |
 
101
 
102
- ### 3. Rayleigh-Benard Convection -- 32 samples
103
 
104
- Linear onset eigenmodes of buoyancy-driven convection between heated plates. Critical Rayleigh number Ra_c ~ 1708 for rigid-rigid boundaries.
105
 
106
- $$\frac{\partial \mathbf{u}}{\partial t} + (\mathbf{u}\cdot\nabla)\mathbf{u} = -\nabla p + Pr\,\nabla^2\mathbf{u} + Ra\,Pr\,T\,\hat{z}$$
107
 
108
  | Parameter | Values |
109
  |---|---|
110
- | Ra | 500, 1000, 1708, 2000, 5000, 10000, 50000, 100000 |
111
- | Pr | 0.1, 0.71, 1.0, 7.0 |
 
 
 
 
 
 
 
 
 
 
 
112
 
113
- ### 4. Buoyancy Plume -- 15 samples
114
 
115
- Self-similar Gaussian profile for a laminar free-convection plume above a line heat source.
 
 
 
 
 
116
 
117
- $$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}}$$
118
 
119
  | Parameter | Values |
120
  |---|---|
121
- | Ra | 1000, 5000, 10000, 50000, 100000 |
122
- | Pr | 0.71, 1.0, 7.0 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
 
124
  ## Dataset Schema
125
 
126
  | Field | Type | Description |
127
  |---|---|---|
128
- | `name` | `string` | Unique identifier (e.g. `poiseuille_Re100`) |
129
- | `description` | `string` | Human-readable description of the flow configuration |
130
- | `parameters` | `string` (JSON) | Physical parameters (`Re`, `Ra`, `Pr`, `dpdx`, etc.) |
131
- | `rayleigh_number` | `float64` | Rayleigh number (`null` for isothermal flows) |
132
- | `grid_shape` | `Sequence[int32]` | `[64, 64]` spatial resolution |
133
- | `u_field` | `Sequence[float32]` | Horizontal velocity, flattened (4096 values) |
134
- | `v_field` | `Sequence[float32]` | Vertical velocity, flattened |
135
- | `t_field` | `Sequence[float32]` | Temperature field, flattened (zeros if isothermal) |
 
 
 
136
  | `p_field` | `Sequence[float32]` | Pressure field, flattened |
137
- | `latex_equation` | `string` | LaTeX governing equations / analytical solution |
138
-
139
- All field arrays are stored flat and should be reshaped to `grid_shape` (64 x 64) for use.
140
 
141
  ## Usage
142
 
143
- ### Load from the Hub
144
-
145
  ```python
146
  from datasets import load_dataset
147
 
148
  ds = load_dataset("C3S2-Lab/navier-stokes-benchmark")
149
- ```
150
-
151
- ### Convert to PyTorch tensors
152
 
153
- ```python
154
- ds.set_format("torch", columns=["u_field", "v_field", "t_field", "p_field"])
 
155
 
156
- sample = ds["train"][0]
157
- u = sample["u_field"].reshape(64, 64)
158
- ```
159
-
160
- ### Filter by flow regime
161
-
162
- ```python
163
- # Supercritical Rayleigh-Benard cases only
164
- rb = ds["train"].filter(
165
- lambda x: x["rayleigh_number"] is not None and x["rayleigh_number"] > 1708
166
- )
167
  ```
168
 
169
  ### Generate locally
@@ -171,47 +216,15 @@ rb = ds["train"].filter(
171
  ```bash
172
  pip install numpy datasets
173
  python generate_ns_dataset.py
174
- ```
175
-
176
- This creates `ns_dataset/` (Arrow format) and `ns_dataset.parquet`.
177
-
178
- ### Push to the Hub
179
-
180
- ```bash
181
  python generate_ns_dataset.py --push --repo C3S2-Lab/navier-stokes-benchmark
182
  ```
183
 
184
- | Flag | Default | Description |
185
- |---|---|---|
186
- | `--save` | `ns_dataset` | Local save directory |
187
- | `--push` | off | Push to HuggingFace Hub after generation |
188
- | `--repo` | `C3S2-Lab/navier-stokes-benchmark` | Target HuggingFace repository |
189
-
190
- ## Dataset Creation
191
-
192
- 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:
193
-
194
- - **Poiseuille:** Exact closed-form solution to the steady momentum equation.
195
- - **Lid-driven cavity:** Biharmonic stream function series (Shankar & Deshpande, 2000), valid in the Stokes limit.
196
- - **Rayleigh-Benard:** Linear stability eigenmodes at/near the critical Rayleigh number (rigid-rigid boundaries).
197
- - **Buoyancy plume:** Gebhart similarity solution with Gaussian self-similar profiles.
198
-
199
- 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).
200
-
201
  ## Intended Use
202
 
203
  - Benchmarking agents' fluid mechanics equations discovery.
204
  - Benchmarks are based on the deep-koopman-kan to estimate the lift and KANDy to get the equations.
205
  - Evaluating equation-discovery and symbolic regression methods (via `latex_equation`)
206
- - Teaching and educational demonstrations of canonical fluid flows
207
-
208
- ## Limitations
209
-
210
- - All solutions are 2D, steady-state, and incompressible.
211
- - Lid-driven cavity uses a Stokes-limit approximation; accuracy degrades for Re >> 1.
212
- - Rayleigh-Benard fields are linear-onset eigenmodes, not fully nonlinear convection rolls.
213
- - The 64x64 resolution is coarse for capturing sharp gradients at high Re or Ra.
214
- - Temperature fields are zero-filled for isothermal flows (Poiseuille, lid-driven cavity).
215
 
216
  ## Citation
217
 
@@ -221,6 +234,6 @@ Grid: uniform 64x64 on the unit square [0, 1]^2 (plume domain shifted to x in [0
221
  author = {C3S2-Lab},
222
  year = {2026},
223
  url = {https://huggingface.co/datasets/C3S2-Lab/navier-stokes-benchmark},
224
- note = {Analytical solutions for 2D incompressible fluid dynamics}
225
  }
226
  ```
 
10
  - computational-fluid-dynamics
11
  - scientific-computing
12
  - benchmark
13
+ - turbulence
14
+ - compressible-flow
15
+ - non-newtonian
16
  task_categories:
17
  - other
18
  size_categories:
 
37
  - name: ndim
38
  dtype: int32
39
  - name: grid_shape
40
+ sequence:
41
+ dtype: int32
42
  - name: reynolds_number
43
  dtype: float64
44
  - name: time
45
  dtype: float64
46
  - name: ux_field
47
+ sequence:
48
+ dtype: float32
49
  - name: uy_field
50
+ sequence:
51
+ dtype: float32
52
  - name: uz_field
53
+ sequence:
54
+ dtype: float32
55
  - name: p_field
56
+ sequence:
57
+ dtype: float32
58
  - name: rho_field
59
+ sequence:
60
+ dtype: float32
61
  - name: temperature_field
62
+ sequence:
63
+ dtype: float32
64
  - name: latex_equation
65
  dtype: string
 
 
 
 
 
 
66
  ---
67
 
68
  # Navier-Stokes Analytical Benchmark
69
 
70
+ A benchmark dataset of fluid dynamics problems with **exact or semi-analytical solutions** that target structural failure modes of SINDy and EDMD. Designed for evaluating **deep-koopman-kan** (Koopman-based lifting) and **KANDy** (equation discovery) pipelines.
71
 
72
+ Each problem class isolates a specific reason why sparse-regression (SINDy) and linear-Koopman (EDMD) methods provably fail on real Navier-Stokes flows. The `latex_equation` field serves as the ground-truth reward signal for equation-discovery agents.
73
 
74
  ## Dataset Description
75
 
76
  - **Repository:** [C3S2-Lab/navier-stokes-benchmark](https://huggingface.co/datasets/C3S2-Lab/navier-stokes-benchmark)
77
+ - **Size:** 277 samples across 8 problem classes
78
+ - **Dimensions:** 1D, 2D, and 3D (variable `grid_shape`)
 
79
  - **Format:** Apache Arrow / Parquet
80
 
81
+ ## Problem Classes
82
 
83
+ ### 1. ABC Beltrami Flow -- 60 samples
84
 
85
+ Tri-periodic box $[0, 2\pi]^3$. Beltrami property ($\nabla \times \mathbf{u} = \mathbf{u}$) makes nonlinearity vanish. Exact exponential viscous decay.
86
 
87
+ $$\mathbf{u}(\mathbf{x}, t) = e^{-\nu t} \mathbf{u}_0(\mathbf{x})$$
88
 
89
  | Parameter | Values |
90
  |---|---|
91
+ | $\nu$ | 0.01, 0.05, 0.1, 0.2 |
92
+ | $(A,B,C)$ | (1,1,1), (1,0.7,1.3), (0.5,1,1.5) |
93
+ | $t$ | 0.0, 0.5, 1.0, 2.0, 3.0 |
94
 
95
+ ### 2. High-Re Synthetic Turbulence -- 9 samples
96
 
97
+ Divergence-free random fields with Kolmogorov $E(k) \sim k^{-5/3}$ energy spectrum on a 3D periodic box. **SINDy fails:** no sparse library exists for cross-scale coupling. **EDMD fails:** Koopman spectrum is continuous and infinite-dimensional.
98
 
99
+ | Parameter | Values |
100
+ |---|---|
101
+ | Re | $10^4$, $5 \times 10^4$, $10^5$ |
102
+ | Seeds | 3 per Re |
103
+
104
+ ### 3. Oscillating Boundary (Stokes' 2nd Problem) -- 72 samples
105
+
106
+ Exact solution for flow above an oscillating flat plate. The Stokes layer penetration depth changes with frequency, breaking fixed-domain assumptions. **SINDy fails:** library defined on a fixed domain. **EDMD fails:** observable space shifts each cycle.
107
+
108
+ $$u(y,t) = U_0 e^{-y\sqrt{\omega/2\nu}} \cos\!\left(\omega t - y\sqrt{\omega/2\nu}\right)$$
109
 
110
  | Parameter | Values |
111
  |---|---|
112
+ | $U_0$ | 1.0, 2.0 |
113
+ | $\omega$ | 1.0, 5.0, 10.0 |
114
+ | $\nu$ | 0.01, 0.05, 0.1 |
115
 
116
+ ### 4. Hopf Bifurcation (Cylinder Wake) -- 40 samples
117
 
118
+ Stuart-Landau model of vortex shedding onset near $Re_c \approx 47$. Dynamics change qualitatively at the bifurcation. **SINDy fails:** coefficients are not constant across the transition. **EDMD fails:** linear Koopman is provably inadequate at subcritical bifurcations.
119
 
120
+ $$\frac{dA}{dt} = \sigma A - l|A|^2 A$$
121
 
122
  | Parameter | Values |
123
  |---|---|
124
+ | Re | 20, 40, 46, 47, 48, 50, 60, 80, 100, 150 |
125
+ | $t$ | 0, 5, 10, 20 |
126
+
127
+ ### 5. Two-Phase Couette Flow -- 18 samples
128
+
129
+ Exact piecewise-linear velocity with a viscosity discontinuity at the interface. **SINDy fails:** library cannot represent phase-dependent coefficients. **EDMD fails:** discontinuities destroy smooth Koopman observables.
130
+
131
+ | Parameter | Values |
132
+ |---|---|
133
+ | Interface position $h_1$ | 0.3, 0.5, 0.7 |
134
+ | Viscosity ratio $\mu_2/\mu_1$ | 0.1, 0.5, 2, 5, 10, 50 |
135
+
136
+ ### 6. Turbulent Channel Flow -- 12 samples
137
 
138
+ Reichardt mean velocity profile with synthetic turbulent fluctuations. **SINDy fails:** $O(10^6)$ state dimension makes regression underdetermined. **EDMD fails:** dictionary must grow exponentially with state dimension.
139
 
140
+ | Parameter | Values |
141
+ |---|---|
142
+ | $Re_\tau$ | 180, 395, 590, 1000 |
143
+ | Seeds | 3 per $Re_\tau$ |
144
+
145
+ ### 7. Power-Law (Non-Newtonian) Poiseuille Flow -- 36 samples
146
 
147
+ Exact analytical solution for shear-thinning and shear-thickening fluids with constitutive law $\tau = K|\dot\gamma|^{n-1}\dot\gamma$. **SINDy fails:** non-polynomial constitutive relation. **EDMD fails:** shear-dependent viscosity breaks linear observable assumption.
148
 
149
  | Parameter | Values |
150
  |---|---|
151
+ | Power-law index $n$ | 0.3, 0.5, 0.7, 1.0, 1.5, 2.0 |
152
+ | Consistency $K$ | 0.1, 1.0, 5.0 |
153
+ | $dP/dx$ | -1.0, -5.0 |
154
+
155
+ ### 8. Sod Shock Tube (Compressible Euler) -- 30 samples
156
+
157
+ Exact Riemann solutions for 1D compressible Euler equations with shocks, contact discontinuities, and rarefaction fans. **SINDy fails:** discontinuities are not polynomial-sparse. **EDMD fails:** Koopman observables diverge at shock surfaces.
158
+
159
+ | Problem | $(\\rho, u, p)_L$ | $(\\rho, u, p)_R$ |
160
+ |---|---|---|
161
+ | Sod | (1, 0, 1) | (0.125, 0, 0.1) |
162
+ | Strong shock | (10, 0, 100) | (1, 0, 1) |
163
+ | Blast | (1, 0, 1000) | (1, 0, 0.01) |
164
+ | Collision | (1, 1, 1) | (1, -1, 1) |
165
+ | Vacuum | (1, -2, 0.4) | (1, 2, 0.4) |
166
+
167
+ ## Summary: Why SINDy and EDMD Fail
168
+
169
+ | Problem class | SINDy failure mode | EDMD failure mode |
170
+ |---|---|---|
171
+ | High-Re turbulence | Library explodes; no sparse representation | Koopman spectrum is continuous/infinite |
172
+ | Moving boundaries | Fixed basis assumption broken | Observable space non-stationary |
173
+ | Bifurcations | Coefficients not constant | Linear Koopman fails near critical points |
174
+ | Multiphase flows | Phase-dependent coefficients intractable | Discontinuities destroy Koopman linearity |
175
+ | 3D wall-bounded turbulence | Curse of dimensionality | Dictionary must grow exponentially |
176
+ | Non-Newtonian fluids | Non-polynomial constitutive law | Shear-dependent viscosity not linear |
177
+ | Compressible shocks | Discontinuities not polynomial-sparse | Koopman observables diverge at shocks |
178
 
179
  ## Dataset Schema
180
 
181
  | Field | Type | Description |
182
  |---|---|---|
183
+ | `problem_class` | `string` | One of 8 problem classes |
184
+ | `name` | `string` | Unique sample identifier |
185
+ | `description` | `string` | Human-readable description including failure modes |
186
+ | `parameters` | `string` (JSON) | All physical parameters |
187
+ | `ndim` | `int32` | Spatial dimensionality (1, 2, or 3) |
188
+ | `grid_shape` | `Sequence[int32]` | Spatial grid dimensions |
189
+ | `reynolds_number` | `float64` | Reynolds number (null if not applicable) |
190
+ | `time` | `float64` | Snapshot time |
191
+ | `ux_field` | `Sequence[float32]` | x-velocity, flattened |
192
+ | `uy_field` | `Sequence[float32]` | y-velocity, flattened (zeros for 1D) |
193
+ | `uz_field` | `Sequence[float32]` | z-velocity, flattened (zeros for 1D/2D) |
194
  | `p_field` | `Sequence[float32]` | Pressure field, flattened |
195
+ | `rho_field` | `Sequence[float32]` | Density (compressible flows; zeros for incompressible) |
196
+ | `temperature_field` | `Sequence[float32]` | Temperature or phase indicator |
197
+ | `latex_equation` | `string` | LaTeX governing equations (reward signal) |
198
 
199
  ## Usage
200
 
 
 
201
  ```python
202
  from datasets import load_dataset
203
 
204
  ds = load_dataset("C3S2-Lab/navier-stokes-benchmark")
 
 
 
205
 
206
+ # Filter by problem class
207
+ shocks = ds["train"].filter(lambda x: x["problem_class"] == "compressible_shock")
208
+ turbulence = ds["train"].filter(lambda x: x["problem_class"] == "high_re_turbulence")
209
 
210
+ # Convert to PyTorch
211
+ ds.set_format("torch", columns=["ux_field", "uy_field", "uz_field", "p_field", "rho_field"])
 
 
 
 
 
 
 
 
 
212
  ```
213
 
214
  ### Generate locally
 
216
  ```bash
217
  pip install numpy datasets
218
  python generate_ns_dataset.py
 
 
 
 
 
 
 
219
  python generate_ns_dataset.py --push --repo C3S2-Lab/navier-stokes-benchmark
220
  ```
221
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
222
  ## Intended Use
223
 
224
  - Benchmarking agents' fluid mechanics equations discovery.
225
  - Benchmarks are based on the deep-koopman-kan to estimate the lift and KANDy to get the equations.
226
  - Evaluating equation-discovery and symbolic regression methods (via `latex_equation`)
227
+ - Demonstrating structural advantages over SINDy and EDMD on hard N-S problems
 
 
 
 
 
 
 
 
228
 
229
  ## Citation
230
 
 
234
  author = {C3S2-Lab},
235
  year = {2026},
236
  url = {https://huggingface.co/datasets/C3S2-Lab/navier-stokes-benchmark},
237
+ note = {Fluid dynamics benchmark targeting SINDy/EDMD failure modes}
238
  }
239
  ```