Datasets:
Languages:
English
Size:
10K - 100K
Update README.md
Browse files
README.md
CHANGED
@@ -59,7 +59,7 @@ Next, we will explain how we tackled the data and the simulation orchestration i
|
|
59 |
## Generating a large quantity of Automobile-like 3D Meshes
|
60 |
Due to the lack of publicly available 3D meshes of automobile objects, we decided to use recent advances in image-to-mesh models to generate meshes from images of automobiles that are freely available.
|
61 |
|
62 |
-
More specifically, we used the InstantMesh model, which is open-source (Apache-2.0) and is currently state-of-the-art in image-to-mesh generation. The automobile-like meshes were generated by running the InstatMesh image-to-mesh model on 1k images from the publicly available (Apache-2.0) Stanford Cars Dataset consisting of 16,185 images of automobiles.
|
63 |
|
64 |
Naturally, running the image-to-mesh model leads to meshes that may have certain defects, such as irregular surfaces, asymmetry issues, holes and disconnected components. Therefore, after running the image-to-mesh model, we run a custom post-processing step where we try to improve the meshes quality. We used PCA to align the mesh with the main axis and we removed disconnected components.
|
65 |
|
@@ -69,9 +69,9 @@ The resulting set of meshes still have little defects, such as presence of "spik
|
|
69 |
## Orchestrating 20k simulations on the cloud (just using Python)
|
70 |
For solving the challenge of orchestrating 20k OpenFOAM simulations, we resorted to the Inductiva API. The Inductiva platform exposes a simple Python API for running simulation workflows on the cloud. Inductiva makes available several popular open-source simulation packages, including OpenFOAM. Here is an example of how to run an OpenFOAM simulation using Inductiva (point to the doc that Paulo is preparing).
|
71 |
|
72 |
-
Using the Inductiva API, it becomes easy to parametrise specific simulation scenarios and run variations of a base case by programatically changing the input parameters and starting conditions of the simulation. Additionally, users can build custom Python classes that wrap parameterized simulation scenarios, allowing them to have a simple Python interface to running simulations without the need to directly interface with the low level simulation packages. We leveraged Inductiva API to create a Python class for the Wind Tunnel scenario
|
73 |
|
74 |
-
For more information on how to transform complex simulation workflows in simple Python classes check this blog post
|
75 |
|
76 |
|
77 |
# How did we generate the dataset?
|
@@ -112,28 +112,60 @@ Here’s a breakdown of the files included in each simulation:
|
|
112 |
|
113 |
|
114 |
### input_mesh.obj
|
115 |
-
|
116 |
-
This mesh was used as the input of the OpenFoam simulation.
|
117 |
|
118 |
-
|
119 |
|
120 |
| **Input Mesh** | **Points Histogram** |
|
121 |
|-------------------------------|------------------------------|
|
122 |
| ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/input_mesh.png) | ![Histogram](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/histogram_of_points_input.png) |
|
123 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
124 |
### openfoam_mesh.obj
|
125 |
-
|
126 |
|
127 |
| **Open Foam Mesh** | **Points Histogram** |
|
128 |
|-------------------------------|------------------------------|
|
129 |
| ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/openfoam_mesh.png) | ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/histogram_of_points_foam.png) |
|
130 |
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
135 |
|
136 |
-
More
|
137 |
|
138 |
| **Pressure Field Mesh** | **Points Histogram** |
|
139 |
|-------------------------------|------------------------------|
|
@@ -141,9 +173,9 @@ More information [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018
|
|
141 |
|
142 |
|
143 |
### streamlines_mesh.ply
|
144 |
-
|
145 |
|
146 |
-
More information [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018531ff05d0d8ef9d63d8c108800f78f/windtunnel/windtunnel_outputs.py#L70).
|
147 |
|
148 |
|
149 |
|
@@ -152,10 +184,7 @@ More information [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018
|
|
152 |
| ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/streamlines_mesh.png) |
|
153 |
|
154 |
### metadata.obj
|
155 |
-
This file contains metadata
|
156 |
-
It consists of input parameters like `wind_speed`, `rotate_angle`, `num_iterations` and `resolution`.
|
157 |
-
It also has output parameters like `drag_coefficient`, `moment_coefficient`, `lift_coefficient`, `front_lift_coefficient`, `rear_lift_coefficient`
|
158 |
-
and the location of the output meshes:
|
159 |
|
160 |
```json
|
161 |
{
|
|
|
59 |
## Generating a large quantity of Automobile-like 3D Meshes
|
60 |
Due to the lack of publicly available 3D meshes of automobile objects, we decided to use recent advances in image-to-mesh models to generate meshes from images of automobiles that are freely available.
|
61 |
|
62 |
+
More specifically, we used the [InstantMesh](https://github.com/TencentARC/InstantMesh) model, which is open-source (Apache-2.0) and is currently state-of-the-art in image-to-mesh generation. The automobile-like meshes were generated by running the InstatMesh image-to-mesh model on 1k images from the publicly available (Apache-2.0) [Stanford Cars Dataset](https://www.kaggle.com/datasets/jessicali9530/stanford-cars-dataset) consisting of 16,185 images of automobiles.
|
63 |
|
64 |
Naturally, running the image-to-mesh model leads to meshes that may have certain defects, such as irregular surfaces, asymmetry issues, holes and disconnected components. Therefore, after running the image-to-mesh model, we run a custom post-processing step where we try to improve the meshes quality. We used PCA to align the mesh with the main axis and we removed disconnected components.
|
65 |
|
|
|
69 |
## Orchestrating 20k simulations on the cloud (just using Python)
|
70 |
For solving the challenge of orchestrating 20k OpenFOAM simulations, we resorted to the Inductiva API. The Inductiva platform exposes a simple Python API for running simulation workflows on the cloud. Inductiva makes available several popular open-source simulation packages, including OpenFOAM. Here is an example of how to run an OpenFOAM simulation using Inductiva (point to the doc that Paulo is preparing).
|
71 |
|
72 |
+
Using the Inductiva API, it becomes easy to parametrise specific simulation scenarios and run variations of a base case by programatically changing the input parameters and starting conditions of the simulation. Additionally, users can build custom Python classes that wrap parameterized simulation scenarios, allowing them to have a simple Python interface to running simulations without the need to directly interface with the low level simulation packages. We leveraged [Inductiva API to create a Python class for the Wind Tunnel scenario](https://github.com/inductiva/wind-tunnel), which we then used to run 20k simulations over a range of input parameters.
|
73 |
|
74 |
+
For more information on how to transform complex simulation workflows in simple Python classes check this [blog post](https://inductiva.ai/blog/article/transform-complex-simulations).
|
75 |
|
76 |
|
77 |
# How did we generate the dataset?
|
|
|
112 |
|
113 |
|
114 |
### input_mesh.obj
|
115 |
+
The input mesh was generated using the Instant Mesh model from images in the Stanford Cars Dataset. This mesh serves as the input for the subsequent OpenFOAM simulation.
|
|
|
116 |
|
117 |
+
Details on the mesh generation process can be found [here](#Generating-a-large-quantity-of-Automobile-like-3D-Meshes).
|
118 |
|
119 |
| **Input Mesh** | **Points Histogram** |
|
120 |
|-------------------------------|------------------------------|
|
121 |
| ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/input_mesh.png) | ![Histogram](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/histogram_of_points_input.png) |
|
122 |
|
123 |
+
|
124 |
+
```python
|
125 |
+
import pyvista as pv
|
126 |
+
|
127 |
+
# Load the mesh
|
128 |
+
mesh_path = "input_mesh.obj"
|
129 |
+
mesh = pv.read(mesh_path)
|
130 |
+
|
131 |
+
# Get the vertices (points)
|
132 |
+
vertices = mesh.points
|
133 |
+
|
134 |
+
# Get the faces (connections)
|
135 |
+
# The faces array contains the number of vertices per face followed by the vertex indices.
|
136 |
+
# For example: [3, v1, v2, v3, 3, v4, v5, v6, ...] where 3 means a triangle.
|
137 |
+
faces = mesh.faces
|
138 |
+
```
|
139 |
+
|
140 |
+
|
141 |
+
|
142 |
### openfoam_mesh.obj
|
143 |
+
This mesh was generated as a 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.
|
144 |
|
145 |
| **Open Foam Mesh** | **Points Histogram** |
|
146 |
|-------------------------------|------------------------------|
|
147 |
| ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/openfoam_mesh.png) | ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/histogram_of_points_foam.png) |
|
148 |
|
149 |
+
```python
|
150 |
+
import pyvista as pv
|
151 |
+
|
152 |
+
# Load the mesh
|
153 |
+
mesh_path = "openfoam_mesh.obj"
|
154 |
+
mesh = pv.read(mesh_path)
|
155 |
+
|
156 |
+
# Get the vertices (points)
|
157 |
+
vertices = mesh.points
|
158 |
+
|
159 |
+
# Get the faces (connections)
|
160 |
+
# The faces array contains the number of vertices per face followed by the vertex indices.
|
161 |
+
# For example: [3, v1, v2, v3, 3, v4, v5, v6, ...] where 3 means a triangle.
|
162 |
+
faces = mesh.faces
|
163 |
+
```
|
164 |
+
|
165 |
+
### pressure_field_mesh.vtk
|
166 |
+
Pressure values were extracted from the `openfoam_mesh.obj` and then 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 distribution of points matches that of the `input_mesh.obj`.
|
167 |
|
168 |
+
More details can be found here [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018531ff05d0d8ef9d63d8c108800f78f/windtunnel/windtunnel_outputs.py#L111).
|
169 |
|
170 |
| **Pressure Field Mesh** | **Points Histogram** |
|
171 |
|-------------------------------|------------------------------|
|
|
|
173 |
|
174 |
|
175 |
### streamlines_mesh.ply
|
176 |
+
Streamlines were generated from the openfoam_mesh.obj, providing a visual representation of the flow characteristics within the simulation.
|
177 |
|
178 |
+
More information can be found [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018531ff05d0d8ef9d63d8c108800f78f/windtunnel/windtunnel_outputs.py#L70).
|
179 |
|
180 |
|
181 |
|
|
|
184 |
| ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/streamlines_mesh.png) |
|
185 |
|
186 |
### metadata.obj
|
187 |
+
This file contains metadata related to the simulation, including input parameters such as `wind_speed`, `rotate_angle`, `num_iterations`, and `resolution`. Additionally, it includes output parameters like `drag_coefficient`, `moment_coefficient`, `lift_coefficient`, `front_lift_coefficient`, and `rear_lift_coefficient`. The file also specifies the locations of the generated output meshes.
|
|
|
|
|
|
|
188 |
|
189 |
```json
|
190 |
{
|