Table of Contents
Navigation Bar
Inigenerator
The inigenerator utility is utilized to create the flowVC input files for multiple simulations. The inigenerator utility helps managing the following settings:
- Directory paths (where input data is stored, where outputs go, etc.)
- Mesh bounds for the data (e.g., xmin, xmax, ymin, ymax, zmin, zmax), streaching the mesh slighly to ensure cubic cells as required by flowVC
- Resolution in each dimension (xres, yres, zres) based on the cell size.
- Time direction settings (forward or backward) for the FTLE-related output.
- Name prefixes and other run-time details that go into the final configuration so the output FTLE files are identifiable for each simulation case.
All of the other settings can be set by updating the configuration file located:
/src/config/config.inigenerator.cfg
As the inigenerator creates absolute file paths, it is recomeded that this utility is ran from the directory and computer/server that will be executing the flowVC calculations. If the folder is moved re-run the generator to update filepaths.
If you are using the recomended layout the best way to use this is from the project_root direcory running the following command with the –batch flag enabled.
python -m flowvcutils inigenerator --batch
Options
-d, –directory
This specifies where to run the tool from, with a default being the current directory you are in.
–autorange:
This flag can be utilized to have the tool read the mesh bounds for the DataMesh and FTLEMesh from the simulation results data. To use this flag ensure there is at least one .vtu file in the input_vtu directory. If it is not set whatever is in the configuration file will be utilized.
–cell_size
The cell size for the FTLE mesh with a default of 0.001
–manual_bounds:
This can be utilized to set the min_x, min_y, min_z, max_x, max_y, and max_z for the FTLE mesh. This is useful when attempting to compute the ftle field on a smaller subset (i.e. slice) of the result domain.
–direction:
This can be utilized to specify the computation of an attracting (backward) or repeling (forward) FTLE field.
–batch:
This creates input files for multiple simulation result cases at once. To utilize this ensure your project is organized using the recomended layout
└── project_root
├── case1_
│ ├── input_bin
│ ├── input_vtu
│ │ ├── case1_00000.vtu
│ │ ├── case1_00050.vtu
│ │ └── case2_00100.vtu
│ ├── output_bin
│ └── output_vtk
└── case2_
├── input_bin
├── input_vtu
│ ├── case2_00000.vtu
│ ├── case2_00050.vtu
│ └── case2_00100.vtu
├── output_bin
└── output_vtk
Examples
To generate the FTLE mesh over the entire computation domain for multiple simulation results you can run:
python -m flowvcutils inigenerator --auto_range True --batch
To generate an FTLE field for a slice of the domain at a higher resolution you can run:
python -m flowvcutils inigenerator -cell_size 0.0001 --auto_range True --manual_bounds -0.000976751 0.145677 0.12361 -0.00095 0.203633 0.236885 --batch
It is not critical that the range is perfectly divisible by the cell_size, the tool will increase the mesh bounds max slightly ensuring the cell size remains constant. However notice how in this case the x_min and x_max are far enough apart to generate at least 2 cells in the x-direction. This creates a pseudo-2D ftle mesh slice out of the domain, as the flowVC tool requires 2 cells every direction when a 3D mesh is utilized.