
TR-SINDy Version 1.1
This is a windows x64 installer file and tested to work with intel computers running Windows 11
Note: Software provides analysis based on the quality of input data, applicability, settings and other parameters
How to Use Turbulence Realm – SINDy
Follow these steps to analyze fluid flow using the Turbulence Realm – SINDy tool based on pySINDy:
1. Launch the Application
- Run the setup file, install and run the application. Note: Depending on the configuration of the computer, there would be delays in loading the application. You can use the video below to see an example (AI generated fluid flow video file) or use written instructions below.
2. Setup & Processing Tab
- Select Video File:
- Click the “Browse video” button in the “Video File Selection” section.
- Navigate to and select your video file (e.g.,
.mp4
,.avi
,.mov
). The selected file path will appear in the text field.
- Define Region of Interest (ROI) & Calibration:
- Click the “ROI & Calibration” button.
- A new window titled “ROI Selection” will appear, displaying the first frame of your video.
- Draw ROI: Click and drag your mouse to draw a rectangle around the area of the fluid flow you wish to analyze. Release the mouse button to finalize the selection.
- Confirm ROI: Press
Enter
to confirm the ROI. If you need to redraw, pressr
to reset, orq
to quit the selection process. - After confirming the ROI, a new window titled “Calibration” will appear, showing the selected ROI.
- Draw Calibration Line: Click and drag your mouse to draw a line representing a known real-world length within the ROI.
- Enter Real-World Length: A dialog box will prompt you to enter the real-world length (in meters) of the line you just drew. Enter the value and click “OK”.
- The “Calibration” label in the main GUI will update to show the calculated meters per pixel.
- Process Optical Flow:
- Once ROI and calibration are complete, the “Process Optical Flow” button will become enabled. Click it.
- A dialog will ask you to select a filter for the flow (None, Gaussian Blur, Nonlocal Means, Both). Choose an option.
- If you select Gaussian Blur or Nonlocal Means, further dialogs will appear to configure their parameters (e.g., kernel size, sigma for Gaussian; h, template/search window size for NLM).
- The progress bar will show the optical flow computation. A preview window will also appear, showing the flow vectors. You can press
Enter
,ESC
, orq
to close the preview at any time.
- Run SINDy Modeling:
- After optical flow processing, the “Run SINDy Modeling” button will become enabled. Click it.
- You will be prompted to enter the “Polynomial degree” for the SINDy feature library (e.g., 3).
- Next, enter the “STLSQ threshold” for sparse regression (e.g., 0.07).
- Select the appropriate scheme/ parameters.
- The status bar will indicate the SINDy model fitting process.
- Run SINDy Prediction:
- Once SINDy modeling is complete, click the “Run SINDy Prediction” button.
- This step uses the fitted SINDy model to predict the velocity fields. The progress bar will update.
- Show SINDy Equation:
- Click this button to display the mathematical equations discovered by the SINDy algorithm.
3. Visualization & Analysis Tab
- Switch to the “Visualization & Analysis” tab.
- Quiver Comparison:
- Click the “Quiver Comparison” button.
- Enter the desired “Quiver scale” and “Quiver width” in the pop-up dialogs.
- A plot will appear showing actual (blue) and SINDy-predicted (red) velocity vectors.
- Use the slider at the bottom of the plot to navigate through different frames and observe the flow.
- Contour Plot:
- Click the “Contour Plot” button.
- Enter the “Frame index” you want to visualize.
- Select whether to display contours for “Actual”, “SINDy Prediction”, or “Error” velocity magnitudes.
- A contour plot will be displayed.
- Streamline Plot:
- Click the “Streamline Plot” button.
- Enter the “Frame index” for the streamlines.
- Select whether to display streamlines for “Actual”, “SINDy Prediction”, or “Error (diff)” velocity fields.
- A streamline plot will be displayed.
- Error Analysis/Maps:
- Click the “Error Analysis/Maps” button.
- This will display two plots: RMSE and MSE per frame.
- A dialog will then ask for a “Frame for Spatial Error Map”. Enter an index to see a heatmap of per-pixel error for that frame.
4. Export Options Tab
- Switch to the “Export Options” tab.
- Export All Frame CSVs:
- Click the “Export All Frame CSVs” button.
- Select an output directory. The software will export CSV files for each frame, containing actual and predicted u/v velocity components.
- Export Quiver Animation:
- Click the “Export Quiver Animation” button.
- Enter the desired “Quiver scale” and “Quiver width” for the animation.
- Select a file name and location to save the
.mp4
animation. The application will render an animation comparing actual and SINDy-predicted quiver plots over time.