rvalerio commited on
Commit
c712aae
1 Parent(s): 83176eb

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +106 -11
README.md CHANGED
@@ -35,7 +35,7 @@ The data generation process itself was orchestrated using the [Inductiva API](ht
35
  which allowed us to run hundreds of OpenFOAM simulations in parallel on the cloud.
36
 
37
 
38
- # Why
39
  Existing object datasets have many limitations: they are either small in size, closed source, or have low quality meshes.
40
  Hence, we decided to generate a new dataset using the [InstantMesh](https://github.com/TencentARC/InstantMesh) model,
41
  which is open-source (Apache-2.0) and is currently state-of-the-art in image-to-mesh generation.
@@ -54,8 +54,7 @@ point of view of the learning problem, they bring challenges to the model that w
54
  and generalizable models.
55
 
56
 
57
- # How did we generate the dataset
58
-
59
  1. Generating Input Meshes, using InstantMesh on Standord Cars Dataset and postprocess the input meshes.
60
  2. Running OpenFoam on the Input Meshes with the Inductiva API.
61
  We ran OpenFoam simulations with different wind speeds and object angles on the input meshes.
@@ -87,33 +86,52 @@ data
87
  ## Dataset Files
88
  Each simulation in the Wind Tunnel Dataset is accompanied by several key files that provide both the input and the output data of the simulations.
89
  Here’s a breakdown of the files included in each simulation:
90
- - **[input_mesh.obj](#input_meshobj)**: OBJ file with the input mesh. These were generated using the InstantMesh model by the process described in section link.
91
- - **[openfoam_mesh.obj](#openfoam_meshobj)**: OBJ file with the OpenFOAM mesh. (explicar)
92
- - **[pressure_field_mesh.vtk](#pressure_field_meshvtk)**: VTK file with the pressure field data. (explicar)
93
- - **[streamlines_mesh.ply](#streamlines_meshply)**: PLY file with the streamlines. (posprocessing)
94
  - **[metadata.json](#metadatajson)**: JSON with metadata about the input parameters and about some output results such as the force coefficients (obtained via simulation) and the path of the output files.
95
 
96
 
97
  ### input_mesh.obj
 
 
 
 
98
 
99
  | **Input Mesh** | **Points Histogram** |
100
  |-------------------------------|------------------------------|
101
  | ![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) |
102
 
103
  ### openfoam_mesh.obj
 
 
104
  | **Open Foam Mesh** | **Points Histogram** |
105
  |-------------------------------|------------------------------|
106
- | ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/input_mesh.png) | ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/histogram_of_points_foam.png) |
107
 
108
  ### pressure_field_mesh.obj
 
 
 
 
 
 
109
  | **Pressure Field Mesh** | **Points Histogram** |
110
  |-------------------------------|------------------------------|
111
- | ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/input_mesh.png) | ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/histogram_of_points_input.png)) |
 
112
 
113
  ### streamlines_mesh.ply
 
 
 
 
 
 
114
  | **Streamlines Mesh** |
115
  |-------------------------------|
116
- | ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/input_mesh.png) |
117
 
118
  ### metadata.obj
119
  ```json
@@ -193,9 +211,86 @@ print("Sample from training set:", sample)
193
 
194
  ## OpenFoam Parameters
195
 
196
- You can find the OpenFoam configuration files on github: [https://github.com/inductiva/wind-tunnel/tree/main/windtunnel/templates](https://github.com/inductiva/wind-tunnel/tree/main/windtunnel/templates)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
198
 
 
 
 
199
 
200
 
201
  ## What's next?
 
35
  which allowed us to run hundreds of OpenFOAM simulations in parallel on the cloud.
36
 
37
 
38
+ # Why?
39
  Existing object datasets have many limitations: they are either small in size, closed source, or have low quality meshes.
40
  Hence, we decided to generate a new dataset using the [InstantMesh](https://github.com/TencentARC/InstantMesh) model,
41
  which is open-source (Apache-2.0) and is currently state-of-the-art in image-to-mesh generation.
 
54
  and generalizable models.
55
 
56
 
57
+ # How did we generate the dataset?
 
58
  1. Generating Input Meshes, using InstantMesh on Standord Cars Dataset and postprocess the input meshes.
59
  2. Running OpenFoam on the Input Meshes with the Inductiva API.
60
  We ran OpenFoam simulations with different wind speeds and object angles on the input meshes.
 
86
  ## Dataset Files
87
  Each simulation in the Wind Tunnel Dataset is accompanied by several key files that provide both the input and the output data of the simulations.
88
  Here’s a breakdown of the files included in each simulation:
89
+ - **[input_mesh.obj](#input_meshobj)**: OBJ file with the input mesh.
90
+ - **[openfoam_mesh.obj](#openfoam_meshobj)**: OBJ file with the OpenFOAM mesh.
91
+ - **[pressure_field_mesh.vtk](#pressure_field_meshvtk)**: VTK file with the pressure field data.
92
+ - **[streamlines_mesh.ply](#streamlines_meshply)**: PLY file with the streamlines.
93
  - **[metadata.json](#metadatajson)**: JSON with metadata about the input parameters and about some output results such as the force coefficients (obtained via simulation) and the path of the output files.
94
 
95
 
96
  ### input_mesh.obj
97
+ Input mesh generated with InstantMesh model from images of the Stanford Cars Dataset.
98
+ This mesh was used as the input of the OpenFoam simulation.
99
+
100
+ The mesh generation process is described [here](#Why).
101
 
102
  | **Input Mesh** | **Points Histogram** |
103
  |-------------------------------|------------------------------|
104
  | ![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) |
105
 
106
  ### openfoam_mesh.obj
107
+ Output mesh obtained from the OpenFoam simulation. The number of points is smaller than `input_mesh` due to internal OpenFoam processing.
108
+
109
  | **Open Foam Mesh** | **Points Histogram** |
110
  |-------------------------------|------------------------------|
111
+ | ![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) |
112
 
113
  ### pressure_field_mesh.obj
114
+ We extracted pressure values from the `openfoam_mesh.obj`.
115
+ Then we interpolated the pressure values with closest_point strategy on the `input_mesh.obj` so that we have a higher resolution mesh.
116
+ As can be seen on the histogram, the distribution of points is the same as the input_mesh.obj.
117
+
118
+ More information [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018531ff05d0d8ef9d63d8c108800f78f/windtunnel/windtunnel_outputs.py#L111).
119
+
120
  | **Pressure Field Mesh** | **Points Histogram** |
121
  |-------------------------------|------------------------------|
122
+ | ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/pressure_field_mesh.png) | ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/histogram_of_points_input.png)) |
123
+
124
 
125
  ### streamlines_mesh.ply
126
+ We generated streamlines from the `openfoam_mesh.obj`.
127
+
128
+ More information [here](https://github.com/inductiva/wind-tunnel/blob/deab68a018531ff05d0d8ef9d63d8c108800f78f/windtunnel/windtunnel_outputs.py#L70).
129
+
130
+
131
+
132
  | **Streamlines Mesh** |
133
  |-------------------------------|
134
+ | ![Input Mesh](https://huggingface.co/datasets/inductiva/windtunnel/resolve/main/assets/streamlines_mesh.png) |
135
 
136
  ### metadata.obj
137
  ```json
 
211
 
212
  ## OpenFoam Parameters
213
 
214
+ We used [Inductiva Template Manager](https://tutorials.inductiva.ai/intro_to_api/templating.html) to parameterize the OpenFoam configuration files.
215
+
216
+ Need a better way to do this:
217
+ ```
218
+ flowVelocity ({{ wind_speed }} 0 0);
219
+
220
+ vertices
221
+ (
222
+ ({{ x_min }} {{ y_min }} {{ z_min }})
223
+ ({{ x_max }} {{ y_min }} {{ z_min }})
224
+ ({{ x_max }} {{ y_max }} {{ z_min }})
225
+ ({{ x_min }} {{ y_max }} {{ z_min }})
226
+ ({{ x_min }} {{ y_min }} {{ z_max }})
227
+ ({{ x_max }} {{ y_min }} {{ z_max }})
228
+ ({{ x_max }} {{ y_max }} {{ z_max }})
229
+ ({{ x_min }} {{ y_max }} {{ z_max }})
230
+ );
231
+
232
+ endTime {{ num_iterations }};
233
+
234
+ magUInf {{ wind_speed }};
235
+ lRef {{ length }}; // Wheelbase length
236
+ Aref {{ area }}; // Estimated
237
+
238
+ geometry
239
+ {
240
+ object
241
+ {
242
+ type triSurfaceMesh;
243
+ file "object.obj";
244
+ }
245
+
246
+ refinementBox
247
+ {
248
+ type searchableBox;
249
+ min ({{ x_min }} {{ y_min }} {{ z_min }});
250
+ max ({{ x_max }} {{ y_max }} {{ z_max }});
251
+ }
252
+ };
253
+
254
+ features
255
+ (
256
+ {
257
+ file "object.eMesh";
258
+ level {{ resolution + 1 }};
259
+ }
260
+ );
261
+
262
 
263
+ refinementSurfaces
264
+ {
265
+ object
266
+ {
267
+ // Surface-wise min and max refinement level
268
+ level ({{ resolution }} {{ resolution + 1 }});
269
+
270
+ // Optional specification of patch type (default is wall). No
271
+ // constraint types (cyclic, symmetry) etc. are allowed.
272
+ patchInfo
273
+ {
274
+ type wall;
275
+ inGroups (objectGroup);
276
+ }
277
+ }
278
+ }
279
+
280
+ refinementRegions
281
+ {
282
+ refinementBox
283
+ {
284
+ mode inside;
285
+ levels ((1E15 {{ resolution - 1 }}));
286
+ }
287
+ }
288
+
289
+ locationInMesh ({{ x_min }} {{ y_min }} {{ z_min }});
290
 
291
+ ```
292
+
293
+ You can find the OpenFoam configuration files on github: [https://github.com/inductiva/wind-tunnel/tree/main/windtunnel/templates](https://github.com/inductiva/wind-tunnel/tree/main/windtunnel/templates)
294
 
295
 
296
  ## What's next?