Datasets:
Languages:
English
Size:
10K - 100K
Update README.md
Browse files
README.md
CHANGED
@@ -23,67 +23,64 @@ tags:
|
|
23 |
</p>
|
24 |
|
25 |
|
26 |
-
# Wind Tunnel
|
27 |
-
The Wind Tunnel Dataset contains 19,812 OpenFOAM simulations of 1,000 unique automobile-like objects placed in a virtual wind tunnel measuring 20 meters
|
28 |
-
|
29 |
-
(0
|
30 |
-
|
31 |
-
To
|
32 |
-
|
|
|
33 |
|
34 |
The data generation process itself was orchestrated using the [Inductiva API](https://inductiva.ai/),
|
35 |
which allowed us to run hundreds of OpenFOAM simulations in parallel on the cloud.
|
36 |
|
37 |
|
38 |
-
|
39 |
-
Recently, there
|
40 |
-
ML methods to accelerate CFD simulations. Research
|
41 |
-
has shown that for well defined CFD simulation scenarios (e.g. a virtual wind tunnel), it is possible to train an ML model capable of “predicting” the end result of the simulation orders of magnitude faster than existing classical simulation methods, while maintaining comparable accuracy levels.
|
42 |
|
43 |
-
|
44 |
-
for their research. We identified two main reasons for that.
|
45 |
|
46 |
-
First, there
|
47 |
-
3D meshes over which we can run CDF simulation. In fact existing 3D object datasets have many limitations: they are either small in size, closed source, or have low quality meshes. The absence of such input data has been a fundamental blocker for any attempt to generate large-scale training data in any realistic CFD scenario, which will naturally involve 3D meshes.
|
48 |
|
49 |
-
Second, even if you had all the 3D meshes you needed,
|
50 |
-
simulations that are required to generate a large and diverse enough dataset for training ML-based CFD methods. For creating such a dataset one has to be
|
51 |
-
able to define an initial simulation scenario (e.g. the windtunnel scenario), and run enough
|
52 |
-
variations of the simulation, with different meshes, different wind speeds, etc to cover a wide enough range of data points to train a generalizable and robust ML model. Now, using most CFD software, running one simulation alone may be difficult enough. Orchestrating thousands of them and managing all the resulting data is a challenge in itself.
|
53 |
|
54 |
-
|
55 |
|
56 |
-
|
57 |
|
|
|
58 |
|
59 |
-
## Generating a
|
60 |
-
|
61 |
|
62 |
-
|
63 |
|
64 |
-
|
65 |
|
66 |
-
The resulting set of meshes still
|
67 |
|
68 |
|
69 |
-
## Orchestrating 20k
|
70 |
-
|
71 |
|
72 |
-
|
73 |
|
74 |
-
|
75 |
|
|
|
76 |
|
77 |
-
# How did we generate the dataset?
|
78 |
-
1. **Generate Input Meshes**: First, input meshes are generated using the InstantMesh model with images from the Stanford Cars Dataset. Post-processing is then applied to these input meshes.
|
79 |
-
2. **Run OpenFOAM Simulations**: The Inductiva API is utilized to run OpenFOAM simulations on the input meshes at various wind speeds and object angles. This process produces an output mesh named `openfoam_mesh.obj`, which contains all relevant simulation information.
|
80 |
-
3. **Post-process OpenFOAM Output**: The OpenFOAM output is post-processed to generate streamlines and pressure map meshes.
|
81 |
|
82 |
-
|
|
|
|
|
|
|
83 |
|
|
|
84 |
|
85 |
|
86 |
-
|
|
|
87 |
```
|
88 |
data
|
89 |
├── train
|
@@ -112,7 +109,7 @@ Here’s a breakdown of the files included in each simulation:
|
|
112 |
|
113 |
|
114 |
### input_mesh.obj
|
115 |
-
The input mesh
|
116 |
|
117 |
Details on the mesh generation process can be found [here](#Generating-a-large-quantity-of-Automobile-like-3D-Meshes).
|
118 |
|
@@ -140,7 +137,7 @@ faces = mesh.faces
|
|
140 |
|
141 |
|
142 |
### openfoam_mesh.obj
|
143 |
-
This mesh
|
144 |
|
145 |
| **OpenFoam Mesh** | **# points of OpenFoam meshes** |
|
146 |
|-------------------------------|------------------------------|
|
@@ -163,7 +160,7 @@ faces = mesh.faces
|
|
163 |
```
|
164 |
|
165 |
### pressure_field_mesh.vtk
|
166 |
-
Pressure values were extracted from the `openfoam_mesh.obj` and
|
167 |
|
168 |
More details can be found here [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018531ff05d0d8ef9d63d8c108800f78f/windtunnel/windtunnel_outputs.py#L111).
|
169 |
|
@@ -192,7 +189,7 @@ pressure_data = mesh.point_data["p"]
|
|
192 |
|
193 |
|
194 |
### streamlines_mesh.ply
|
195 |
-
Streamlines
|
196 |
|
197 |
|
198 |
More information can be found [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018531ff05d0d8ef9d63d8c108800f78f/windtunnel/windtunnel_outputs.py#L70).
|
@@ -228,13 +225,14 @@ This file contains metadata related to the simulation, including input parameter
|
|
228 |
|
229 |
### Dataset Statistics
|
230 |
|
231 |
-
The dataset
|
232 |
-
|
|
|
233 |
|
234 |
|
235 |
## Downloading the Dataset:
|
236 |
|
237 |
-
To download the dataset you
|
238 |
|
239 |
```python
|
240 |
pip install datasets
|
@@ -282,9 +280,9 @@ print("Sample from training set:", sample)
|
|
282 |
|
283 |
## OpenFoam Parameters
|
284 |
|
285 |
-
We used [Inductiva Template Manager](https://tutorials.inductiva.ai/intro_to_api/templating.html) to parameterize the OpenFoam configuration files.
|
286 |
|
287 |
-
Below are snippets from
|
288 |
|
289 |
|
290 |
initialConditions.jinja
|
@@ -357,11 +355,10 @@ locationInMesh ({{ x_min }} {{ y_min }} {{ z_min }});
|
|
357 |
You can find the full OpenFoam configuration on github: [https://github.com/inductiva/wind-tunnel/tree/main/windtunnel/templates](https://github.com/inductiva/wind-tunnel/tree/main/windtunnel/templates)
|
358 |
|
359 |
|
360 |
-
## What's
|
361 |
-
If you
|
362 |
-
|
363 |
-
If you detect any clearly problematic mesh, please let us know so we can correct that issue for the next version of the
|
364 |
-
Windtunnel-20k dataset.
|
365 |
|
|
|
366 |
|
367 |
-
To learn more about how we created this dataset—or how you can generate synthetic datasets for Physics-AI models—
|
|
|
|
23 |
</p>
|
24 |
|
25 |
|
26 |
+
# Wind Tunnel Dataset: 20,000 OpenFOAM Simulations
|
27 |
+
The **Wind Tunnel Dataset** contains **19,812 OpenFOAM simulations** of **1,000 unique automobile-like objects** placed in a virtual wind tunnel measuring **20 meters long, 10 meters wide, and 8 meters high.**
|
28 |
+
|
29 |
+
Each object was tested under **20 different conditions**: 4 random wind speeds ranging from **10 to 50 m/s**, and 5 rotation angles (**0°**, **180°** and **3 random angles**).
|
30 |
+
|
31 |
+
The object meshes were generated using [Instant Mesh](https://github.com/TencentARC/InstantMesh) based on images sourced from the [Stanford Cars Dataset](https://www.kaggle.com/datasets/jessicali9530/stanford-cars-dataset). To make sure the results are stable and reliable, each simulation runs for **300 iterations**.
|
32 |
+
|
33 |
+
The entire dataset is organized into three subsets: **70% for training, 20% for validation, and 10% for testing.**
|
34 |
|
35 |
The data generation process itself was orchestrated using the [Inductiva API](https://inductiva.ai/),
|
36 |
which allowed us to run hundreds of OpenFOAM simulations in parallel on the cloud.
|
37 |
|
38 |
|
39 |
+
## Motivation: Addressing the Data Gap in CFD
|
40 |
+
Recently, there’s been a lot of interest in using **machine learning (ML)** to speed up **CFD simulations**. Research has shown that for well-defined scenarios—like a virtual wind tunnel—you can train an ML model to “predict” the results of a simulation **much faster** than traditional methods, while still keeping the accuracy close to what you’d expect from classical simulations.
|
|
|
|
|
41 |
|
42 |
+
That said, the **ML/CFD communities** are still lacking enough **training data** for their research. We’ve identified two main reasons for this.
|
|
|
43 |
|
44 |
+
First, there’s a shortage of datasets with **high-quality 3D meshes** needed for running CFD simulations. Existing 3D object datasets have a lot of limitations: they’re either too small, closed-source, or have low-quality meshes. Without this input data, it’s been really hard to generate large-scale training datasets for realistic CFD scenarios, which almost always involve 3D meshes.
|
|
|
45 |
|
46 |
+
Second, even if you had all the 3D meshes you needed, setting up and running thousands of **CFD simulations** to generate a large, diverse dataset isn’t easy. To create a dataset like this, you’d need to define an initial simulation scenario (like the wind tunnel setup) and then run enough variations—different meshes, wind speeds, and so on—to cover a wide range of data points for training a robust **ML model**.
|
|
|
|
|
|
|
47 |
|
48 |
+
The problem is, running a single CFD simulation can be tricky enough with most software. Orchestrating **thousands of simulations** and handling all the resulting data? That’s a whole new level of challenge.
|
49 |
|
50 |
+
While both of these problems are difficult to solve in general, we decided to focus on one common CFD scenario: a **virtual wind tunnel** for **static automobiles**. Using the popular **OpenFOAM** simulation package, we produced a large dataset of CFD simulations.
|
51 |
|
52 |
+
Next, we’ll explain how we tackled the challenges of generating the data and orchestrating the simulations.
|
53 |
|
54 |
+
## Generating a Large Quantity of Automobile-like 3D Meshes
|
55 |
+
Since there aren’t many publicly available 3D meshes of automobiles, we decided to use recent image-to-mesh models to generate meshes from freely available car images.
|
56 |
|
57 |
+
We specifically used the open-source [InstantMesh](https://github.com/TencentARC/InstantMesh) model (Apache-2.0), which is currently state-of-the-art in **image-to-mesh generation**. We generated the automobile-like meshes by running Instant Mesh on **1,000 images** from the publicly available [Stanford Cars Dataset](https://www.kaggle.com/datasets/jessicali9530/stanford-cars-dataset) (Apache-2.0), which contains 16,185 images of automobiles.
|
58 |
|
59 |
+
Running the image-to-mesh model naturally results in some defects, like irregular surfaces, asymmetry, holes, and disconnected components. To address these issues, we implemented a custom post-processing step to improve mesh quality. We used **PCA** to align the meshes with the main axes and removed any disconnected components.
|
60 |
|
61 |
+
The resulting set of meshes still contains minor defects, like “spikes” or “cavities” in flat areas, unexpected holes, and asymmetry issues. However, we see these imperfections as valuable features of the dataset. From a machine learning perspective, they bring challenges that can help prevent overfitting and contribute to building more robust and generalizable models.
|
62 |
|
63 |
|
64 |
+
## Orchestrating 20k Cloud Simulations—Using Just Python
|
65 |
+
To tackle the challenge of orchestrating **20,000 OpenFOAM simulations**, we resorted to the **Inductiva API**. The Inductiva platform offers a simple Python API for running simulation workflows in the cloud and supports several popular open-source packages, including **OpenFOAM**. Here’s an example of how to run an OpenFOAM simulation using Inductiva (point to the doc that Paulo is preparing).
|
66 |
|
67 |
+
With the Inductiva API, it’s easy to parameterize specific simulation scenarios and run variations of a base case by programmatically adjusting the input parameters and starting conditions of the simulation. Additionally, users can create custom Python classes that wrap these parameterized simulations, providing a simple Python interface for running simulations—no need to interact directly with the underlying simulation packages.
|
68 |
|
69 |
+
We used the [Inductiva API to create a Python class for the Wind Tunnel scenario](https://github.com/inductiva/wind-tunnel), which allowed us to run **20,000 simulations** across a range of input parameters.
|
70 |
|
71 |
+
For more on how to transform your complex simulation workflows into easy-to-use Python classes, we wrote a [blog post](https://inductiva.ai/blog/article/transform-complex-simulations) all about it.
|
72 |
|
|
|
|
|
|
|
|
|
73 |
|
74 |
+
## How Did We Generate the Dataset?
|
75 |
+
1. **Generate Input Meshes**: We first generated input meshes using the **InstantMesh model** with images from the **Stanford Cars Dataset**, followed by post-processing to improve mesh quality.
|
76 |
+
2. **Run OpenFOAM Simulations**: Using the Inductiva API, we ran OpenFOAM simulations on the input meshes under different wind speeds and angles. The result is an output mesh `openfoam_mesh.obj`that contains all the relevant simulation data.
|
77 |
+
3. **Post-process OpenFOAM Output**: We post-processed the OpenFOAM output to generate streamlines and pressure map meshes.
|
78 |
|
79 |
+
The code we used to generate and post-process the meshes is available on [GitHub](https://github.com/inductiva/datasets-generation/tree/main/windtunnel_dataset).
|
80 |
|
81 |
|
82 |
+
|
83 |
+
## Dataset Structure
|
84 |
```
|
85 |
data
|
86 |
├── train
|
|
|
109 |
|
110 |
|
111 |
### input_mesh.obj
|
112 |
+
The input mesh we generated using the Instant Mesh model from images in the Stanford Cars Dataset, serves as the starting point for the OpenFOAM simulation.
|
113 |
|
114 |
Details on the mesh generation process can be found [here](#Generating-a-large-quantity-of-Automobile-like-3D-Meshes).
|
115 |
|
|
|
137 |
|
138 |
|
139 |
### openfoam_mesh.obj
|
140 |
+
This mesh is the result of the OpenFOAM simulation. The number of points is reduced compared to the `input_mesh.obj` due to mesh refinement and processing steps applied by OpenFOAM during the simulation.
|
141 |
|
142 |
| **OpenFoam Mesh** | **# points of OpenFoam meshes** |
|
143 |
|-------------------------------|------------------------------|
|
|
|
160 |
```
|
161 |
|
162 |
### pressure_field_mesh.vtk
|
163 |
+
Pressure values were extracted from the `openfoam_mesh.obj` and interpolated onto the `input_mesh.obj` using the closest point strategy. This approach allowed us to project the pressure values onto a higher-resolution mesh. As shown in the histogram, the the point distribution matches that of the `input_mesh.obj`.
|
164 |
|
165 |
More details can be found here [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018531ff05d0d8ef9d63d8c108800f78f/windtunnel/windtunnel_outputs.py#L111).
|
166 |
|
|
|
189 |
|
190 |
|
191 |
### streamlines_mesh.ply
|
192 |
+
Streamlines visually represent the flow characteristics within the simulation, illustrating how air flows around the object
|
193 |
|
194 |
|
195 |
More information can be found [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018531ff05d0d8ef9d63d8c108800f78f/windtunnel/windtunnel_outputs.py#L70).
|
|
|
225 |
|
226 |
### Dataset Statistics
|
227 |
|
228 |
+
The dataset includes **19,812 valid samples** out of **20,000 simulations**, with [188 submissions failing](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/failed_tasks.txt) due to numerical errors in OpenFOAM.
|
229 |
+
|
230 |
+
The full dataset requires about **300 GB** of storage, but you can also download smaller portions if needed.
|
231 |
|
232 |
|
233 |
## Downloading the Dataset:
|
234 |
|
235 |
+
To download the dataset, you’ll need to install the [Datasets package](https://huggingface.co/docs/datasets/en/index) from Hugging Face:
|
236 |
|
237 |
```python
|
238 |
pip install datasets
|
|
|
280 |
|
281 |
## OpenFoam Parameters
|
282 |
|
283 |
+
We used the [Inductiva Template Manager](https://tutorials.inductiva.ai/intro_to_api/templating.html) to **parameterize** the OpenFoam configuration files.
|
284 |
|
285 |
+
Below are some snippets from the templates used in the wind tunnel simulations.
|
286 |
|
287 |
|
288 |
initialConditions.jinja
|
|
|
355 |
You can find the full OpenFoam configuration on github: [https://github.com/inductiva/wind-tunnel/tree/main/windtunnel/templates](https://github.com/inductiva/wind-tunnel/tree/main/windtunnel/templates)
|
356 |
|
357 |
|
358 |
+
## What's Next?
|
359 |
+
If you encounter any issues with this dataset, feel free to reach out at [support@intuctiva.ai](support@intuctiva.ai).
|
|
|
|
|
|
|
360 |
|
361 |
+
If you spot any problematic meshes, let us know so we can fix them in the next version of the **Windtunnel-20k dataset**.
|
362 |
|
363 |
+
To learn more about how we created this dataset—or how you can generate synthetic datasets for Physics-AI models—check out our well-tested [4-step recipe for generating synthetic data](https://inductiva.ai/blog/article/supercharge-your-physics-ml-with-inductivas-cloud-based-simulation-api) or discover how to [transform your own complex simulation workflows into easy-to-use Python classes](https://inductiva.ai/blog/article/transform-complex-simulations).
|
364 |
+
Also because mesh resolution is such an import aspect of CFD have a look at our [blog post](https://inductiva.ai/blog/article/5k-points-is-all-you-need) where we study the impact of using different mesh resolutions in a virtual windtunnel simulation results.
|