14th International Symposium on Particle Image Velocimetry – ISPIV 2021 Chicago, USA, August 1-4, 2021 Adjustable interogation window for 2D PIV estimation based on local Lagrangian coherency Ali Rahimi Khojasteh1∗, Dominique Heitz1, Yin Yang1 1 INRAE, OPAALE, F-35044, Rennes, France ∗ correspondent author: ali.rahimi-khojasteh@inrae.fr Abstract We present a novel approach to adjust shapes of the interrogation windows (IW) in Particle Image Velocime- try (PIV) measurements as a function of temporal and spatial local coherent motions. Lagrangian Coherent Structures (LCS) has been widely utilized to determine local flow boundaries. We propose using Finite-Time Lyapunov Exponent (FTLE) to quantify LCS separatrix boundaries (i.e. ridges) and adjust the interrogation window. We integrated the proposed method with a local optical flow PIV algorithm. The evaluation was performed using synthetic particle images of 2D homogeneous isotropic turbulence obtained from Direct Numerical Simulation (DNS). The results showed significant improvements in regions with complex flow behaviours, particularly shear, vortex and hyperbolic motions. We studied improvements of the velocity estimation in a real experiment of the wake flow behind a cylinder at Reynolds number equal to 3900. It was found that optical flow featured by coherency based interrogation window (coherent optical flow) reveals detailed vector field estimations in regions with complex behaviours inside the wake flow. 1 Introduction In Particle Image Velocimetry (PIV) algorithms, both correlation-based and local optical flow techniques rely on the interrogation windows. The importance of interrogation window has been studied widely for obtaining effective methods of adapting the window size and shape, which directly impacts the spatial accu- racy of velocity estimation [1, 2, 3]. Since the flow behaviour inside the interrogation window has clusters of small and large scale coherent motions, PIV techniques involve window size reduction to avoid those non-coherent areas and increase the maximum achievable spatial resolution. Generally, the interrogation window size is gradually reduced based on empirical precalculations and tunings, while this empirical ap- proach can be adjusted by temporal and local spatial information. This means flow behaviour in different times and spaces would result in different interrogation window shapes, which is the main objective of this paper. To demonstrate the performance of the proposed method, we integrated the adjustable interrogation window with the local optical flow PIV algorithm. In the local optical flow approach, all pixels inside the window are considered for calculating a single-pixel velocity at the centre of the window. However, to es- timate more accurate motions, it is crucial to ignore areas that are non-coherent with the centre pixel. This study seeks to adjust the interrogation window shape in motion estimation by calculating locally coherent and non-coherent areas. We propose performing Lagrangian Coherent Structures (LCS) by looking for the local separatrix ridges that divide the flow field into clusters of coherent regions [4]. The idea of applying LCS in Particle Image Velocimetry (PIV) / Particle Tracking Velocimetry (PTV) algorithms was demon- strated by Khojasteh et al. [5]. To this end, all neighbour pixels inside the interrogation window must be classified as coherent or non-coherent with the centre pixel. Similar interrogation window adjustment can be implemented in cross correlation-based PIV techniques. 2 Local optical flow Classic optical flow works under the intensity consistency assumption of the acquired images that is inspired by Horn and Schunck [6] formulation. It can be also written in terms of the Optical Flow Constraint Equation (OFCE) as following, Target pixel Coherent pixels Non-coherent pixels Coherent Vector Field non-Coherent Vector Field Attracting LCS Repelling LCS Figure 1: Schematic of Window adjusting based on Lagrangian coherency to calculate velocity for a centre pixel (dark grey pixel), attracting and repelling separatrix lines, grey pixels are coherent with the centre pixel and coherent pixels d f dt = +υ.∇ f , (1) where v is the desired velocity of one time step and f is the image intensity. The operator ∆ denotes gradient over 2D area. On the other hand, we try to minimise the energy function with intensity consistency assump- tion. However, real PIV images are featured with temporal changes of intensity between consecutive images due to illumination and trigger setup. So this assumption can be violated in PIV applications. Schuster et al. [7] improved the intensity inconsistency problem by introducing stochastic optical flow formulation. In the stochastic approach, the Eulerian flow velocity field is decomposed into a large-scale smooth component and a small-scale turbulent component. In the present study, we use the same stochastic approach imple- mented into the Lucas-Kanade optical flow estimator [7]. In theory, optical flow provides one velocity vector for each pixel of two consecutive images based on spatial and temporal variations of the image intensities. While cross correlation based PIV techniques result in coarse resolution estimation. Therefore, optical flow PIV techniques might provide more details of the flow behaviour in turbulent flows. 3 Coherent interrogation window Lagrangian Coherent Structures (LCS) divide the local flow field into regions of coherent motions [4]. LCS is also known as the skeleton of flow that can be utilised as a deterministic criterion to shape the interro- gation window. We computed the LCS separatrix ridges using Finite-Time Lyapunov Exponent (FTLE) by employing modified versions of two open-access codes named LCS kit [8] and LCS tool [9]. FTLE is a scalar value that measures the amount of spatial stretching over a finite time. In this study, the spatial region is determined by the interrogation window to compute the FTLE value locally. Khojasteh et al. [10] showed that using FTLE in the local spatial regions over sparse neighbour particles can reveal signs of local ridges that can be employed in the velocimetry algorithms. FTLE analysis provides spatial and temporal flow field behaviour. We propose to adjust the interrogation window based on separatrix ridges, resulting in different window shapes in space and time. The window shape will not change if the area is entirely coherent. On the other hand, the shape of the interrogation window does not change if all pixels are coherent with the target pixel. The major problem happens when the interrogation window consists of multi-scale dynamics. Figure 1 is a classic example of hyperbolic flow when two or more vortices interact with each other in 2D turbulent flows. Forward and backward FTLE calculations determine two attracting and repelling lines, where flow Optical Flow 1 128 256 1 128 256 P ix el 0 0.12 R M S er ro r Coherent Optical Flow 1 128 256 1 128 256 Coherent Optical Flow 1 128 256 Pixel 1 128 256 0 9 A n gu la r er ro r Optical Flow 1 128 256 Pixel 1 128 256 P ix el Optical Flow 1 128 256 1 128 256 P ix el 0 0.05 V or ti ci ty er ro r Coherent Optical Flow 1 128 256 1 128 256 Figure 2: Angular error comparison between local optical flow with and without coherent adjustable win- dow in three scenarios locally selected from 2D homogeneous isotropic turbulence: a), vortex flow; b), shear flow; c), hyperbolic flow. Only high values of angular error are shown. Figure 3: Angular error comparison between local optical flow with and without coherent adjustable win- dow in three scenarios locally selected from 2D isotropic homogeneous turbulence: a), vortex flow; b), shear flow; c), hyperbolic flow. Only high values of angular error are shown. particles do not cross these lines. Flow motions in between these boundaries have coherent motions. De- pending on the centre location, coherent flow motions (in the blue vector field) and regions (in yellow pixels) are on one side of these lines (see Figure 1). Any pixel inside the coherent region is considered for the spatial and temporal gradient of intensity computation. We need to have prior knowledge about the velocity field to compute the FTLE map. The minimisation process in the optical flow is an iterative approach. We found that it is unnecessary to compute the whole iterative process with additional LCS computations since it is costly in time. Therefore, we introduce the LCS computation in the last three iterations of the minimisation process. In this way, we provide near to the final solution vector field for the first Lagrangian separatrices computation. 4 Results and evaluation 4.1 Synthetic evaluation We performed synthetic analyses to examine the performance of the proposed technique. The synthetic PIV images were generated from Direct Numerical Simulation (DNS) of a 2D homogeneous isotropic turbulent flow. The boundary condition of each side of the domain was set at periodic. The DNS resolution was 256×256 mesh cells. We created the synthetic particle trajectories using linear Euler transport function in time and linear velocity interpolation in space. More details of the DNS simulation can be found in [11]. We assessed improvements of using coherent interrogation window in velocity estimation results of local optical flow technique. As a result, three terms, including RMS (representing the magnitude of velocity estimation), vorticity, and angular errors, were defined to quantify the local and overall performances of the proposed technique. In an overall view, as shown in Figure 2, we gained around 5% global increase in accuracy of velocity estimation compared with the classic local optical flow. However, it should be noted that the main objective here was to increase the resolution and accuracy around separation and non-coherent areas. Without using adjustable windows, cross-correlation and optical flow techniques would result in up to 50% false estimation at those separation and non-coherent areas. In detail view, Figure 3 shows improvements in three specific flow behaviours, vortex, shear and hyperbolic flows selected locally from 2D synthetic data. These three regions are intentionally picked to illustrate differences in detailed motions. We found that local optical flow with square IW suffers from inaccurate angular estimation compared with the DNS reference in the core vortex regions when the interrogation scale is larger than the vortex scale. Disagreement hits over 7 degrees of angular vector field misestimation, with over 50% angular error. Figure 3 shows significant 1 500 1000 Pixel 1 500 1000 P ix el -2.5 -1.5 -0.5 0 0.5 1.5 2.5 V el o ci ty er ro r (P ix el / d t) Figure 4: Angular error comparison between local optical flow with and without coherent adjustable win- dow in three scenarios locally selected from 2D isotropic homogeneous turbulence: a), vortex flow; b), shear flow; c) hyperbolic flow. Only high values of angular error are shown. local improvements in such a region if an adjustment is performed. Similar motion refinements were also observed when high shear or hyperbolic behaviour occurs. We found that coherent optical flow has better velocity estimation in complex local regions. These local improvements impact the overall assessment of the technique in a global view as well. 4.2 Experiment case study We performed a 2D2C PIV experiment of the wake behind a cylinder in the wind tunnel to study the ca- pability of the proposed technique on real experiment images. The Reynolds number corresponding to the cylinder with 12 mm diameter was set at 3900. An sCMOS camera with 2560×2160 pixels was employed to acquire images in 49.2 HZ frequency. The measurement plane was illuminated using a 200 mJ laser (EverGreen from Quantel). The disparity of the velocity estimation between optical flow with and without adjustable interrogation window of the current experiment is shown in Figure 4. As mentioned in Section 3, the window shape stays unchanged if the flow motion is coherent inside the interrogation window. This means that disparity should be almost zero in the majority of freestream regions. In agreement with the synthetic analysis, coherent adjustable window only refined velocity estimations of complex motions such as shear, wake, and mixing regions (see Figure 4). We, therefore, compared our proposed technique with the cross-correlation results obtained from Davis software (10.1.2 version). A snapshot of the instantaneous vorticity and vector fields are shown in Figure 5 that is illustrating the existence of complex mixing and vortex generations downstream of the cylinder. The vorticity field shows signs of strong shears in two sidewards of the wake immediately downstream of the cylinder (x/D< 4). These regions are featured by high velocity and acceleration gradients. We compared the cross-correlation results with coherent optical flow, knowing that the synthetic analysis showed significant misestimation in such regions (see Figure 5.a). A 2D sliding average filter was used for both techniques for the image pretreatment. The cross-correlation final spatial resolution was 16 pixels with multi-pass vector calculations starting from 64×64 down to 16×16 and 75% overlap. As mentioned in Section 2, the resolved resolution of coherent optical flow is the same as the camera resolution. Therefore, the comparison was performed between high resolution coherent optical flow and coarse resolution cross-correlation results. The vector field estimations of coherent optical flow and cross-correlation PIV techniques captured shear 1 1280 2560 Pixel 1 1080 2160 P ix el -0.75 -0.5 -0.2 0 0.2 0.5 0.75 #103 V or ti ci ty (1 /s ) Coherent Optical Flow Davisa b c a c b Figure 5: Instantaneous snapshot of vorticity and vector fields obtained from the PIV experiment at a Reynolds number equal to 3900: a), Local view of the vector field estimation comparison between coherent optical flow and Davis cross correlation in high shear region; b), Comparison of vector estimation inside the wake region; c), Comparison of vortex estimation. with high gradient vector change. In contrast, coherent optical flow estimated detailed vector change in normal to shear direction with smooth change of vectors representing more physics of the flow behaviour. Figure 5.b shows complex vortex and mixing inside the wake region. We found that the centre of the vortex is not aligned in two techniques. There is roughly 3 pixels shift between two estimations. Coherent optical flow maintained smooth rotation with a stretch in diagonal directions. Moreover, the vector field is decreasing gradually toward the vortex centre. However, the cross-correlation technique only captured the large scale motion with a weak signature of stretching in the diagonal direction. The third local comparison is in the formation region with a strong vortex (see Figure 5.c). Similarly, we observed disagreement in the vortex centre estimation between the two techniques while the large scale motions are almost equal. The upper right corner of the vortex is nearby of the large velocity motions (see Figure 5.c). By contrast, the vortex centre is located inside the wake, with drastically lower velocity values. Such a gradient associated with the flow rotation creates a complex local region for PIV estimation. Comparison of two techniques shows that using a coherent adjustable interrogation window resolves more details of the flow field than the classic cross-correlation techniques. 5 Conclusion A novel approach to adjust the PIV interrogation windows based on local spatial and temporal coherent mo- tions is proposed. We quantify the coherent and non-content regions using Lagrangian Coherent Structures (LCS) as skeletons of flow. The synthetic analysis showed that coherent optical flow locally improves the velocity estimation accuracy up to 50%. The main advantage of the proposed technique was the improve- ment in angular estimation in regions with high velocity and acceleration gradients. We also demonstrated our coherent optical flow performance in a real PIV experiment of the wake behind a cylinder at Reynolds number equal to 3900. The experiment case study revealed well-resolved velocity estimations in complex motions such as high shear, wake, and mixing regions. References [1] Raf Theunissen, Fulvio Scarano, and Michel L. Riethmuller. Spatially adaptive PIV interrogation based on data ensemble. Experiments in Fluids, 48(5):875–887, 5 2010. [2] Bernhard Wieneke and Karsten Pfeiffer. Adaptive PIV with variable interrogation window size and shape. In 15th International Symposium on Applications of Laser Techniques to Fluid Mechanics, Lisbon, 2010. [3] Raf Theunissen, Fulvio Scarano, and Michel L. Riethmuller. An adaptive sampling and windowing interrogation method in PIV. In Measurement Science and Technology, volume 18, pages 275–287. Institute of Physics Publishing, 1 2007. [4] George Haller. Lagrangian coherent structures. Annual Review of Fluid Mechanics, 47:137–162, 2015. [5] Ali Rahimi Khojasteh, Yin Yang, Dominique Heitz, and Sylvain Laizet. Lagrangian Coherent Track Initialisation (LCTI). In arXiv, volume 9, 2021. [6] Berthold K.P. Horn and Brian G. Schunck. Determining optical flow. Artificial Intelligence, 17(1- 3):185–203, 1981. [7] Romain Schuster, Dominique Heitz, and Etienne Mémin. Motion Estimation Under Location Un- certainty, Application To Large-Scale Characterization Of A Mixing Layer. In 19th International Symposium on the Application of Laser and Imaging Techniques to Fluid Mechanics, pages 16–19, 2018. [8] Shawn C. Shadden, John O. Dabiri, and Jerrold E. Marsden. Lagrangian analysis of fluid transport in empirical vortex ring flows. Physics of Fluids, 18(4):1–11, 2006. [9] Kristjan Onu, Florian Huhn, and Haller Haller. LCS Tool: A computational platform for Lagrangian coherent structures. Journal of Computational Science, 7:26–36, 2015. [10] Ali Rahimi Khojasteh, Dominique Heitz, Yin Yang, and Sylvain Laizet. Lagrangian Coherent Track Initialisation. In 3rd Workshop and 1st Challenge on Data Assimilation & CFD Processing for PIV and Lagrangian Particle Tracking, 2020. [11] Dominique Heitz, Etienne Mémin, and Christoph Schnörr. Variational fluid flow measurements from image sequences: synopsis and perspectives. Experiments in Fluids, (3):48, 2010. Introduction Local optical flow Coherent interrogation window Results and evaluation Synthetic evaluation Experiment case study Conclusion