Particle Image Velocimetry (PIV) analysis of a small-scale experimental debris flow with Matlab. These experiments were performed at the Sorby Environmental Fluid Dynamics Labority at the University of Leeds. This work is detailed in Spatial and temporal evolution of an experimental debris flow, exhibiting coupled fluid and particulate phases
-
Obtaining the PIV data The data necessary to recreate the figures in the above paper are stored on google drive (https://drive.google.com/drive/folders/1IVwKy6NcONNRE73yw8iySk3GIFxqOspi?usp=sharing). This consists of a .mat file (PIV_data.mat) containing the instantaneous flow velocity (in the x and y directions) for three experimental runs, jpegs of the flow corresponding to 12 different snapshots in time, and a scale image to convert from pixels to material coordinates. It also includes PIV_flow.mat which contains the processed PIV data for the 12 different flow times. To use this data with the Matlab codes provided, download it and store it in the directory named data within the working directory.
-
Process the instantaneous PIV data
wrangle_PIV_data.m processes the raw PIV data. It loads PIV_data.mat, time averages the data, and extracts the flow free surface at specified flow times. The PIV data is cropped at the free surface, and the processed data is stored and saved in PIV_flow.mat. The free surface extraction requires the user to select the free surface by clicking on the image and approximating it as a straight line. -
Plotting the PIV vectors on top of the flow snapshot
PIV_vector_plots.m plots the processed PIV vectors on top of the flow snapshots at specified times.
- Contours of velocity and standard deviation
vel_SD_contours.m produces contour plots of horizontal velocity and standard deviation. For example, the following plot shows velocity contours at a flow time of t = 0.6 s, where red denotes highest velocities.
- Vertical profiles of velocity
velocity_profiles.m produces plots of horizontal velocity against the vertical coordinate:
It also plots analytical profiles on top of the experimental profiles, that derived by making assumptions on the flow rheology:
- Vertical profiles of shear
shear_profiles.m approximates the horizontal component of the shear rate, and plots the profile against the vertical coordinate: