The thin oil film equation is the basis for determining the wall shear stress from a thin oil film. The theory is first discussed, and then the simulation of oil film as well as the measurement of wall shear stress using interferograms is considered. Finally, the image post-processing approach is discussed with its application for experimental data.
Oil-film interferometry skin friction measurement
Figure 1 depicts the principle of oil-film interferometry. The principle of the current oil-film interferometry skin friction technology is that the original oil drop applied to a model surface will flow due to the shear stress τ under the friction of the boundary layer. Then, the oil becomes thin to the point as time goes and under the illumination by visible monochromatic light the interference patterns, which is fringes, will be far enough to be visible in the oil [16,17,18].
The basic equation form of relation between oil film thickness and wall shear stress is shown in Eq. (1) (full derivation can be found in Brown and Naughton’s report [19]).
$$ \frac{\partial {h}_o}{\partial t}+\frac{\partial }{\partial x}\left(\frac{\tau_{w,x}{h}_o^2}{2\mu}\right)+\frac{\partial }{\partial z}\left(\frac{\tau_{w,z}{h}_o^2}{2\mu}\right)=0 $$
(1)
where ho is the thickness of oil film, τw,x and τw,z are the wall shear stress components on the surface coordinates x and z respectively, and t is time.
For the one dimensional situation, the changes of wall shear stress on z coordinate can be ignored. Then, Eq. (1) can be rewritten as Eq. (2).
$$ \frac{\partial {h}_o}{\partial t}+\frac{\partial }{\partial x}\left(\frac{\tau_{w,x}{h}_o^2}{2\mu}\right)=0 $$
(2)
Under the flow and effect of shear stress, the oil becomes thin. Additionally, illuminated by monochromatic light source, the fringe pattern of oil film can be visible on a reflective surface. Then, the thickness of oil film can be determined by Eq. (3).
$$ {h}_o=\frac{\lambda \phi}{4\pi}\left(\frac{1}{\sqrt{n_0^2-{\sin}^2{\theta}_i}}\right) $$
(3)
where ϕ is the phase difference between the portion of the beam reflected from the top of the oil and that transmitted through the oil, n0 is the index of reflection of oil, and θi is local illumination angle.
Then, the skin friction can be determined by Eq. (4) according to the solution of Eq. (2) and Eq. (3).
$$ {C}_f=\frac{2{n}_0\cos {\theta}_r\Delta x}{N\lambda {\int}_{t_1}^{t_2}\frac{q_{\infty }(t)}{\mu (t)} dt} $$
(4)
where θr is the refracted light angle through the oil, λ is the wavelength of the light source, N is the number of the fringes used in the equation, Δx is the total width of N fringes, q∞ is the dynamic pressure of the free stream, μ is the viscosity of the oil, and t1 and t2 are the start time and end time, respectively, to capture the pictures.
Image post-processing
In the present work, a new algorithm based on MATLAB for calculating the space of the oil film fringe is presented. A brief summary of the process of this algorithm is shown in Fig. 2. In this section, an explanation for each step is given. In the implementation of the algorithm, a MATLAB code is developed.
The image processing includes three main steps. Firstly, the image is pre-processed by converting to grayscale and removing the global brightness variation by subtracting off the local linear trends. Secondly, a proper sliding window is chosen. Within the window, stationarity is assumed; hence, the peaks and troughs, corresponding to dark and bright fringes, can be identified with their deviation from the local mean value. As the fringes are detected, the fringe widths can be determined, which would in turn give an indication to the choice of the window size as well. Finally, with a local filtering, the fringe widths, directly related to the local oil film thickness, can be calculated. The coefficient of friction can be thus calculated from the difference between two images captured in a sufficiently short time interval.
To better illustrate the procedure of the code, as well as to present the advantages of the method, one image from the experiment, as shown in Fig. 3, is used. Note that the x and y axes denote the x and y positions in terms of pixels, respectively. The distinction between bright and dark fringes can be observed clearly from this picture, which can be used for algorithm validation. It can be seen from the picture that it is not well cropped to the specific region of the fringes and gives global brightness variation in transverse direction. Moreover, it can also be seen that the contrast between bright and dark fringes diminishes to the middle part of the image, which indicates that the amplitude of the intensity variation is decreasing.
The pre-processing of the image comes first. Since the bright/dark fringes can easily be identified by the intensity, the imported image is converted to grayscale without loss of information. After that, to facilitate later calculation, a detrending is done to the image. Each row of pixels is divided into sections, and for each section, the local linear fit is subtracted off from the raw data. This step is done for removing the global brightness variation and makes the local variation more distinguishable. In addition, the sections in this step are flexible and can be relatively large, since the global variation of brightness is generally small. After the detrending, an example of one row of the data is shown in Fig. 4, taking the 50th row of pixels in Fig. 3 as the example data. The selected section of data is reflected in Fig. 3 as the section included in the red frame.
After the pre-processing, we can adopt a rolling-window method to create the contour of the local distances between two neighboring fringes. The principle for the choice of window size is that it should be less than the overall image size, but larger than the distances between fringes. For most of the situations, the local variation would be small enough for using an invariant window size; however, sometimes when the local flow is complex, there may be huge variation. In these situations, the methods based on regression fit would easily fail. However, in the method described in this paper, the problem can be solved by employing an adaptable window size. With the memory of the calculated fringe widths in the neighborhood, the window size could correspondingly be chosen as, for example, three or four times the fringe width. By adjusting the window size automatically, the robustness of the algorithm can be greatly improved. After the data is picked out by the window, the calculation is done row by row.
Observation of the data is based on the “peak and trough detection” algorithm. For each row, the mean and standard deviation of the detrended brightness is extracted. If one data point exceeds the mean by more than 0.5 times of the standard deviation, it is marked as a “peak section.” Conversely, if a data point goes below the mean value by more than 0.5 times of the standard deviation, it is marked as a “trough section.”
Thus, for each continuous “peak section,” it is considered as a bright fringe; for each continuous “trough section,” it is considered as a dark fringe. For each “peak section” or “trough section,” the maximum value or minimum value included in the corresponding data points is taken as the centers of the fringes, which is used for calculation of the distances. The first 101 elements in the series are shown in Fig. 4 (right) as an example (after detrending), with the length of the series taken to be the rolling window size, and the red lines as the limits of detection.
The advantage of this method over the three methods introduced previously can be well illustrated in Fig. 4 (right). It can be inferred from the series of data that it is not necessarily following a sinusoidal trend; on the other hand, the intensity data is not always symmetrical about the peak. Also, some of the dark fringes are with higher intensity in comparison to some of the weaker peaks. Thus, the threshold for binarization appears to be a great difficulty.
Obviously, this method also suffers from noise and inhomogeneity of the input image. Hence, we cannot calculate the distance by the simple average of all instances. Instead, the mode of the collection of distances is taken, since the true distance between the fringes is still the most probable value appearing. Since the resolution of the image is limited, the mode itself is not correctly representative of the true fringe width in the window. Hence, for a better estimation and to show a smooth transition in the contour, the data for this window is taken as the average of mode and the two types of the data taking values of mode+1 and mode−1. When the representative value is calculated, it is stored to be the value for the center of the window. Thereafter, the position of the window is switched by 1 pixel, thus creating the contour of all the points (excluding the edge) in the imported image.
After the image is processed, and the local widths of fringes are given, one additional problem arises. The whole graph can be put in, and the regions without oil film would be processed identically. Since the regions generally do not present periodical oscillations, this algorithm would not give reasonable values for that region. Hence, some nonsensical values, with great randomness, would be observed in such regions. This fact creates great noise for the created contour, but it also allows optimization of the image by removing noisy regions in the contour. Since the characteristics for the noisy region would differ greatly from case to case due to various nature of the photo captured. Two methods that can be applied to solve such problems are presented here:
-
1.
Using the entropy of the image. The entropy of the image is defined by its probability distribution of intensity values,− ∑ pi log(pi) . Obviously, for those regions with strong noisy and nonsensical values, they would have higher entropy. Hence, a threshold is set, and for all the points with entropy defined by its surroundings exceeding this value in the fringe width plot, we set the value of the point to be zero. This is a more general method but requires some artificial treatments since a reasonable range of entropy should be defined in advance.
-
2.
Using the probability distribution. This method is relatively simpler but requires that the image is relatively uniform in terms of the fringe widths. Firstly, a probability distribution of fringe width data in the image is calculated. By choosing a certain cluster size, only the data within the range of the most probable cluster are picked. Data out of the range would be abandoned and set to zero. For example, if a window size of 5 pixels is chosen, and the most probable range of the distribution of the pixels is between 10 and 15 pixels, then any data points with a value larger than 15 or smaller than 10 would be set to zero