Skip to content

inductiva/datasets-generation

Repository files navigation

Wind Tunnel Dataset Generation

This project generates wind tunnel datasets using the wind-tunnel library for simulations.

Installation

To install follow these steps:

  1. Clone the repository:

    $ git clone https://github.com/inductiva/datasets-generation.git
    $ cd datasets-generation
  2. Install the project dependencies:

    $ pip install -r requirements.txt
  3. Install InstantMesh for mesh generation (optional):

    Follow the instructions at https://github.com/TencentARC/InstantMesh.

Mesh Generation

To see how to generate meshes using the InstantMesh model, please refer to generate_meshes.py located in the mesh generation directory.

Files

get_simulations_parameters.py

This file generates the parameters required for wind tunnel simulations, such as rotation angles and wind speed values for a set of objects. The parameters are saved to a JSON file.

Flags:

  • NUM_OBJECTS: Number of objects (default: 100).
  • NUM_WIND_SPEED_VALUES: Number of wind speed values (default: 4).
  • NUM_ROTATION_VALUES: Number of rotation values (default: 5).
  • MIN_WIND_SPEED: Minimum wind speed (default: 10).
  • MAX_WIND_SPEED: Maximum wind speed (default: 50).
  • OBJ_DIR: Directory containing object files (default: data/output/instant-mesh-large/meshes_processed).
  • PARAMS_FILE: Output file for generated parameters (default: data/params.json).

Usage Example:

python get_simulations_parameters.py \
  --NUM_OBJECTS=100 \
  --NUM_WIND_SPEED_VALUES=5 \
  --NUM_ROTATION_VALUES=6 \
  --MIN_WIND_SPEED=15 \
  --MAX_WIND_SPEED=60 \
  --OBJ_DIR="path/to/object_files" \
  --PARAMS_FILE="path/to/output/params.json"

run_simulations.py

This file runs wind tunnel simulations based on the parameters generated by get_simulations_parameters.py. The results, such as wind speed and object rotation, are saved to a JSONL file.

Flags:

  • NUM_ITERATIONS: Number of iterations per simulation (default: 300).
  • RESOLUTION: Simulation resolution (default: 5).
  • MACHINE_GROUP_NAME: Name of the machine group (optional).
  • SUBMISSIONS_FILE: File to save submission results (default: data/submissions.jsonl).
  • PARAMS_FILE: File containing simulation parameters (default: data/params.json).
  • DEBUG: Enable debug mode to visualize the simulation.

Usage Example:

python run_simulations.py \
  --NUM_ITERATIONS=300 \
  --RESOLUTION=5 \
  --MACHINE_GROUP_NAME="machine_group" \
  --SUBMISSIONS_FILE="path/to/output/submissions.jsonl" \
  --PARAMS_FILE="path/to/params.json" \
  --DEBUG=False

File: download_simulations.py

This file downloads and postprocesses the results of the wind tunnel simulations. It gets data such as force coefficients, pressure fields, and streamlines.

Flags:

  • debug: Enable debug mode (default: False).
  • submissions_file: Path to the submissions file containing simulation metadata (default: submissions.jsonl).
  • data_folder: Directory to store postprocessed data (default: data).
  • input_mesh_file: Name of the input mesh file (default: input_mesh.obj).
  • openfoam_mesh_file: Name of the OpenFOAM mesh file (default: openfoam_mesh.obj).
  • pressure_field_mesh_file: Name of the pressure field mesh file (default: pressure_field_mesh.vtk).
  • streamlines_mesh_file: Name of the streamlines mesh file (default: streamlines_mesh.ply).
  • simulation_metadata_file: File for storing simulation metadata (default: simulation_metadata.json).
  • failed_simulations_file: File to log failed simulations (default: failed_simulations.json).

Usage Example:

python download_simulations.py \
  --submissions_file="path/to/submissions.jsonl" \
  --data_folder="path/to/data/folder" \
  --input_mesh_file="input_mesh.obj" \
  --openfoam_mesh_file="openfoam_mesh.obj" \
  --pressure_field_mesh_file="pressure_field_mesh.vtk" \
  --streamlines_mesh_file="streamlines_mesh.ply" \
  --simulation_metadata_file="simulation_metadata.json" \
  --failed_simulations_file="failed_simulations.json" \
  --debug=True

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages