# Analysis of Vorticity and Velocity Fields of Jets from Gas Injector Using PIV
## 3 Software and Methodology  
The cross-correlation algorithm was applied to evaluate the tracer particles displacement and the software used for this purpose was the Matlab R2022b (Natick, MA, USA) tool: PIVlab v2.61. Before proceeding with the algorithm, the scattered images were post-processed to improve their quality and to define the coordinate center reference system as shown in Figure 2. The jet object has been put in the foreground by using the contrast limited adaptive histogram equalization (CLAHE) and auto-contrast (AC) algorithms. The first is an image pre-processing technique that improves contrast in images. This algorithm elaborates several histograms, each corresponding to a distinct region of the raw image and uses them to redistribute the luminous values of the image [31]. Differently, the AC algorithm linearly stretches and offsets the image intensities. The next step involved the definition of the region of interest (ROI). This is the area within which the software performs the cross-correlation analysis. For the present work the ROI was set equal to 50 \(\times\) 75 mm, and the x-y-center was positioned at injector tip as shown in Figure 2. The diameter of the nozzle tip was used to calibrate the spatial resolution of the PIV images, thus measuring the pixel/millimeters ratio. Next, it was necessary to choose the dimensions of the interrogation area (IA) whose size defines the resolution of the PIV analysis. It was decided to use a square-shaped IA with a multi-pass approach. This methodology causes the software to start performing the cross-correlation analysis by imposing an initial oversized interrogation area (defined by the user). This preliminary operation will turn a \"rough\" vectors distribution, then the software repeats the cross-correlation with a reduced size of the IA (normally it gets halved with reference to the initial value), returning a more detailed vector distribution, thus gradually increasing the accuracy of  
Figure 1: Schematization of the experimental setup (**top**) and nozzle patterns (**bottom**). the PIV analysis. For the present study, a 3-step cross-correlation approach was used, and the starting size of the IA fixed equal to 64 \(\times\) 64 pixels, then decreased to 32 \(\times\) 32 and finally to 16 \(\times\) 16 pixels (\(\approx\)0.8 \(\times\) 0.8 mm). A 25% overlap between neighboring cells has been applied for the correlation of the two consecutive frames. For all operating conditions, two filters were applied to reduce the presence of spur vectors. First, a standard deviation filter was used to remove vectors whose magnitude exceeded the threshold defined by the following equation:  
\[True/False\lessapprox V\_mean+n*dev.st \tag{1}\]  
where \(V\_mean\) is the average velocity measured over the total spatial grid, \(n\) the user-imposed multiplier and \(dev.st\) the standard deviation. For the present study, \(n\) was set equal to 10. The second filter applied is a local median filter. In a 2-dimensional analysis, such as that considered for the present work, the filter considers neighbor values to calculate a moving average to limit the presence of local spikes. The window size has been set equal to 6 \(\times\) 6 cells. Note that both filters discussed above were set to operate in a non-aggressive manner, due to the low number of spur vectors measured in raw vector grids. Regarding edge detection, although it is necessary to measure jet penetration and plume angles, this information could not be directly extracted from the post-processed images. The high pixel density and local inhomogeneity typical of this type of analysis led the software to interpret the data as point-like, making impossible the identification of a coherent boundary between the jet and the background. For this reason, the jet edges were measured using a dedicated code built on Matlab R2022b by setting a threshold to separate the jet from the surroundings. This value was set equal to 20% of the maximum speed.