Introducing Turbulence Realm – SINDy

“Turbulence Realm – SINDy” is a specialized desktop application designed for the comprehensive analysis of fluid flow from video data. It integrates advanced computer vision (Optical Flow) with data-driven modeling (SINDy) to provide a powerful tool for understanding and predicting fluid dynamics based on pysindy.

The software’s capabilities span the entire analysis pipeline:

  1. Data Acquisition & Preprocessing: Users can load video files, define a specific region of interest, and perform spatial calibration to convert pixel values into real-world physical units. It then processes the video to extract dense optical flow, representing the velocity fields of the fluid, with optional filtering for noise reduction.
  2. Model Discovery & Prediction: The core strength lies in its ability to apply the SINDy algorithm to the extracted velocity data. This allows the software to automatically discover the underlying sparse differential equations that govern the fluid’s behavior. Once a model is fitted, it can predict future fluid states.
  3. Visualization & Analysis: The application offers a rich suite of visualization tools to inspect the actual flow, the SINDy-predicted flow, and the differences (errors) between them. This includes interactive quiver plots, contour maps of velocity magnitude, and streamline plots to visualize flow patterns. Quantitative error analysis provides metrics to assess the model’s accuracy.
  4. Reporting & Export: Users can export the processed velocity data for each frame into CSV files for further external analysis. Additionally, it can generate high-quality animations of the flow, such as quiver animations, for presentations or detailed study.

Key Features of Turbulence Realm – SINDy

  • Interactive GUI : Provides a user-friendly graphical interface for seamless interaction and workflow management.
  • Video Input & ROI Selection: Allows users to load video files and interactively define a specific Region of Interest for focused analysis.
  • Spatial Calibration: Enables conversion of pixel measurements to real-world units (meters) through an interactive calibration process.
  • Optical Flow Computation: Calculates dense optical flow fields (u and v velocity components) from video frames, with options for Gaussian Blur and Nonlocal Means denoising. Dense optical flow using Gunnar FarneBack algorithm has at times performed better flows with particles than using traditional Particle Image Velocimetry methods.
  • SINDy Model Fitting: Implements the Sparse Identification of Nonlinear Dynamics (SINDy) algorithm based on pysindy to discover sparse, interpretable governing equations from the optical flow data.
  • SINDy Prediction & Reconstruction: Generates predicted velocity fields based on the fitted SINDy model, allowing for comparison with actual observed flow.
  • Comprehensive Visualization: Offers various plotting capabilities including:
    • Quiver Plots: Visual comparison of actual vs. SINDy-predicted velocity vectors.
    • Contour Plots: Visualization of velocity magnitude (actual, predicted, or error).
    • Streamline Plots: Visualization of flow patterns (actual, predicted, or error).
  • Error Analysis: Provides quantitative error metrics (RMSE, MSE) per frame and spatial error maps to evaluate model performance.
  • Data Export: Supports exporting processed velocity data for each frame into CSV files and generating MP4 animations of quiver plots.
  • Memory-Efficient Processing: Utilizes Memory-mapped files for handling large video and velocity datasets, optimizing memory usage during intensive computations.

The advantage of seeing the predicted equation, as provided by models like SINDy, instead of relying on black-box machine learning models, lies primarily in interpretability and scientific discovery. When a model provides an explicit equation , it offers direct insight into the physical mechanisms governing the system. This is in stark contrast to black-box models (like deep neural networks) that, while potentially accurate, do not reveal how they arrived at their predictions. The equation allows researchers to understand the relationships between variables and the forces at play.

The discovered equations can serve as new hypotheses for scientific inquiry. Researchers can design experiments to test specific terms or coefficients in the equation, leading to new discoveries and advancements in the field. SINDy, by design, aims for sparse equations, meaning it identifies the simplest possible model that explains the data. This leads to more parsimonious models that are easier to analyze, implement, and computationally less expensive than complex black-box architectures.

I

Leave a Comment

Your email address will not be published. Required fields are marked *