1. Introduction
Flow velocity field measurement is important for analyzing the flow characteristics of oil–water two-phase immiscible flow, which directly affects the interpretation of logging data and design of logging instruments [
1,
2]. Flow velocity field measurement methods include the capacitance method [
3], conductance method [
4], and electromagnetic method [
5]. Current oilfield flow velocity field measurement is more inclined toward velocity distribution visualization measurement, which can obtain more detailed flow velocity field information and observe the flow characteristics more easily to guide oilfield development [
6]. It is very difficult for the traditional measurement method to meet this requirement. Therefore, a new flow velocity field measurement method must be adopted. Particle image velocimetry (PIV) is an effective flow velocity field measurement technology in hydromechanics [
7,
8]. Its characteristics of nondisturbance, noncontact, and full-field measurement [
9] meet the requirements of oilfields. Therefore, it has promising potential applications.
PIV was originally developed from laser speckle velocimetry [
10]. Then, PIV was gradually digitized into digital particle image velocimetry (DPIV) with the advent of digital technology [
11,
12,
13] and different illumination solutions, like LED or flash lamps were proposed for specific applications, where a laser source is inadequate due to the high tracers density (e.g., multiphase flows and liquid-granular flows). The intrinsic principle of DPIV is to capture the pattern movements by means of a cross-correlation optimization, as shown in
Figure 1a [
14]. During the process of measuring the flow velocity field, an appropriate amount of tracer is evenly sprinkled into the flow body. Then, a computer synchronously controls the pulsed laser light source and high-speed camera to illuminate the flow velocity field and record the instantaneous flow state [
15,
16,
17]. Some scholars carry out hardware improvement at the foundation of the classical PIV system: Sarno [
18] uses the LED lamp placed in front of the pipe to measure the velocity fields of granular flows and Estevadeordal et al. [
19], Hessenkemper et al. [
20], and Cerqueira et al. [
21] use a light-emitting diode (LED) backlight source to replace the laser source, which has also achieved good measurement performance, as shown in
Figure 1b. Finally, the recorded digital image is transmitted to the computer for further processing to obtain the instantaneous flow velocity field [
22].
The traditional DPIV postprocessing algorithm is based on cross-correlation and the fast Fourier transform (FFT) algorithm [
23,
24]. Although simple, it has many limitations. In
Figure 2, the yellow points stand for the particles whose velocity is very high, the blue points stand for the particles those are still in the interrogation window, the brown points stand for the new particles, and the red points stand for the particles, which are out of the interrogation window for the displacement increases. As shown in
Figure 2a, the consistent interrogation window size and position of the two images remains unchanged, so the red points run out the interrogation window. The matching particles in the interrogation window decrease as the displacement increases as a result of the consistent interrogation window size and position of the two images [
25]. The accuracy of DPIV is affected by the numbers of matching particles, so this make the decrease in accuracy of DPIV. By offsetting the interrogation window using the predetermined pixel displacement to maximize the particle matching rate, Westerweel et al. [
26] and Gui et al. [
27] proposed discrete and continuous window offset technologies, respectively. However, this still has limitations in a flow field with a velocity gradient. As shown in
Figure 2b, the yellow points still run out the interrogation. As shown in
Figure 2c, Huang et al. [
28] proposed the concept of image deformation, in which the interrogation window is deformed according to the kinematics formula to improve the calculation accuracy in a complex flow state. Scarano and Riethmuller [
29] adopted a Taylor expansion to fit the displacement distribution in the deformation algorithm and combined it with an iterative multigrid algorithm to create the window deformation iterative multigrid (WIDIM) algorithm, which is now widely accepted. To reduce the amount of calculation, Scarano [
30] used bilinear interpolation to construct the pixel point displacement field for image deformation. Astarita [
31] analyzed the bilinear, shift bilinear, B-spline, and FFT interpolation methods. The B-spline method has the highest interpolation accuracy, and the second-order B-spline can be applied to most actual scenarios.
There are still many limitations in multiphase flow measurement by DPIV, such as the shielding of oil against tracer particles in oil–water two-phase immiscible flow [
32]. Xu et al. [
33] applied DPIV to the small diameter horizontal oil–water two-phase immiscible flow with oil droplets as tracer particles, and the results represented the average accumulation flow velocity of oil droplets in the shooting direction. Kong et al. [
34] applied DPIV to oil–water two-phase immiscible flow in a small diameter horizontal well, and modified the window overlap method in the WIDIM algorithm to improve the measurement accuracy. Although these algorithms are effective in their application filed, they do not perform well for oil–water two-phase immiscible flow measurement in an inner diameter 125 mm vertical upward pipe. The inner diameter 125 mm vertical well is the most widely used in oilfields. At low flow velocity and high water cut (the water volume percentage), water is the continuous phase and oil is the dispersed phase and the fluid appears as the bubbly flow state in the well. Oil droplets are small in inner diameter 125 mm vertical upward pipe, with good follow ability, and could be used as tracer particles to obtain the shooting direction cumulative average flow velocity distribution information in the plane.
At present, the following problems exist in the application of the WIDIM algorithm in DPIV to oil–water two-phase immiscible flow velocity field measurement in an inner diameter 125 mm vertical pipe. (1) As a result of the large diameter, the relative motion range of oil droplets in the interrogation window is very large. Therefore, the following performance of the interrogation window is required to be good enough. However, the following performance of the interrogation window does not meet the demand of the velocity measurement of 125 mm vertical upward oil–water two-phase immiscible flow. (2) Compared to small-scale laboratory investigations, the larger spatial domain increases the illumination issues and oil droplets shielding problems, especially if the LED source is placed behind the pipe. (3) Because the application object of DPIV is two-phase flow with oil tracers, the gray image of two-phase flow is more complex than that of single-phase flow. This makes the cross-correlation calculation prone to mismatching and generating plenty of false vectors so as to leads to the measurement error. The error may be amplified during the iteration process of the algorithm, especially the initial calculation error, thereby seriously affecting image deformation performance. Hence, the iteration calculation accuracy should be improved as far as possible; thus, the method how to increase the accuracy of the iteration calculation should be studied. (4) There are missing data at the displacement field boundary in the interpolation process of WIDIM algorithm, which also affect deformation performance. Thefore, the displacement field boundary problem should be studied.
In this paper, the iterative closest point (ICP) algorithm is introduced into the WIDIM algorithm to calculate the initial displacement field to improve the accuracy of the initial iteration. Moreover, the moving least squares (MLS) algorithm is used to fit the displacement field to obtain the fitting value of the boundary displacement in the interpolation process. The improved DPIV algorithm is applied to oil–water two-phase immiscible flow measurement in an inner diameter 125 mm vertical upward pipe, and the flow velocity distribution characteristics in plane are studied.
3. Verification of the IM-WIDIM-DPIV Algorithm
To verify the feasibility of the IM-WIDIM-DPIV algorithm, the DPIV combination flow image which was synthesized using MATLAB. The known speed of local oil–water two-phase immiscible flow grayscale image is 1000 pixel/s, and the interval is 0.001 s. The results are shown in
Figure 6.
For the synthesized DPIV images, the flow velocity field obtained by the IM-WIDIM-DPIV algorithm was closer to the theory flow velocity field, and some of false vectors in
Figure 6f were revised by the IM-WIDIM-DPIV algorithm. In
Figure 6h,i, the horizontal coordinate represents the error of the two algorithms in the x direction, and the vertical coordinate represents the error of the two algorithms in the y direction. Points in
Figure 6i are closer to the origin of coordinate than points in
Figure 6h, indicating that the error of IM-WIDIM-DPIV is smaller than that of WIDIM-DPIV. The average absolute error of the WIDIM-DPIV algorithm was 0.2916 pixels, and that of the IM-WIDIM-DPIV algorithm was 0.1628 pixels. For grayscale images, the average velocity calculated by the WIDIM-DPIV was 928.0 pixels, and the average velocity calculated by the IM-WIDIM-DPIV algorithm was 1034.8 pixels, which improved the velocity measurement accuracy by 3.72%. The run-time and measurement accuracy of two algorithms are shown in
Table 2. The measurement accuracy of IM-WIDIM-DPIV algorithm is higher than that of WIDIM-DPIV algorithm, while the run-time of IM-WIDIM-DPIV algorithm is longer than that of WIDIM-DPIV algorithm.
According to the above analysis, the measurement accuracy of IM-WIDIM-DPIV algorithm is better than the measurement accuracy of WIDIM-DPIV algorithm, but the run-time is longer than that of WIDIM-DPIV algorithm. Under the condition of strict real-time requirements, WIDIM-DPIV algorithm is preferred, while IM-WIDIM-DPIV algorithm is preferred under the condition of low real-time requirements.
4. Experiment
To study the practical effect of applying the IM-WIDIM-DPIV algorithm to the measurement of vertical upward oil–water two-phase immiscible flow, an experimental verification was conducted in the oil–gas–water three-phase flow laboratory of the testing service branch of Daqing Oilfield Co., Ltd. in China. The experimental schematic diagram and experiment platform are shown in
Figure 7.
The area to be measured was illuminated with an LED backlight source. The led array lamps are designed by our team, and the parameters are as follows. (1) Light color: no-flicker white; (2) size: 20 cm × 20 cm, and evenly distributed with 19 × 4 LED lights; (3) input voltage: 220 V; (4) luminous flux: ~2400 lm. To make the lighting more uniform, the LED lights are assembled into a rectangular box without top lid, and cover the top of the box with an oil paper. The oil bubble in the vertical upward two-phase flow was used as the tracer in the experiment. A high-speed camera was adjusted to make flow velocity field imaging clear. As shown in
Figure 7, Multiphase flow control system controls the flow velocity of oil phase and water phase according to the given velocity and holding rate. When the velocity table of oil phase and water phase has stable numerical value, the flow in pipe reaches the predetermined velocity and water up. The control errors of velocity and holding rate are less than 0.1%. After the oil and water phases are mixed and flowing about 6 m in the pipe, the flow state is steady. The high-speed camera is used to collect the image of oil–water two-phase immiscible flow, and then the DPIV image recorded by the high-speed camera was transmitted to a computer in real time for preservation and processing. Six iterations were carried out in the process of implementing the algorithm to calculate the flow velocity field, and the interrogation window was reduced to a quarter of the original size every two iterations. Interrogation window size changes from 128 pixel × 128 pixel to 32 pixel × 32 pixel. DPIV measurement experiment under different working conditions was conducted by changing different components of the multiphase flow through control system.
The flow velocity in this experiment ranged from 9.4 × 10
−3 m/s to 51.9 × 10
−3 m/s, with intergroup interval of 4.7 × 10
−3 m/s. The water cut ranged from 70% to 90%, with a step rate of 10%. The experimental parameters are of DPIV measurement experiment shown in
Table 3.
As shown in
Figure 8, there is optical distortion during the experiment as a result of the transparent curved surface of the vertical pipe. It has serious influence on flow velocity field measurement, the point whose original position is
lo moves to
lo’ in the image due to the influence of optical distortion. It is necessary to revise the calculated flow velocity field as follows.
where,
v’r and
u’l are the original longitudinal and transverse velocities at any point, respectively,
n1;
n2 and
n3 are the refractive indexes of liquid, glass, and air, respectively;
δ1 and
δ2 are the incidence angles;
τ1 and
τ2 are refraction angles;
lo is the axial location of the point; and
R1 and
R2 are radii of the inside and outside pipes’ diameter.
5. Results and Discussion
5.1. Measurement Accuracy
Figure 9 shows the DPIV measurement results under the working condition of 51.9 × 10
−3 m/s-80% (flow velocity: 51.9 × 10
−3 m/s; water cut: 80%). To reduce the influence of image distortion by oil drops passing the light path, preprocess on the collected oil–water two-phase immiscible flow image is carried out. Firstly, the regions of interest of images are cropped; then, a series of image processing techniques is adopted, such as Laplace sharpening and contrast enhancement to enhance useful information in the image. The experiment results show that the quality of the image is much better than that of the original image although there is still some distortion.
Figure 9a,b show pairs of preprocessed images. The time interval is 0.006 s, and the measurement area size is 124 mm × 124 mm.
Figure 9c,d shows the flow velocity fields measured by the WIDIM-DPIV algorithm and the IM-WIDIM-DPIV algorithm, respectively.
According to the calculation, the average velocity of the WIDIM-DPIV algorithm was 47.12 × 10−3 m/s and that of the IM-WIDIM-DPIV algorithm was 53.81 × 10−3 m/s. The accuracy of the WIDIM-DPIV algorithm was 90.80% and that of the IM-WIDIM-DPIV algorithm was 96.31%. Therefore, the IM-WIDIM-DPIV algorithm improved the measurement accuracy.
To decrease the effect of experiment contingency on measurement accuracy, the DPIV experiment was conducted on the oil–water two-phase immiscible flow under different conditions in the inner diameter 125 mm vertical pipe. The flow velocity ranges from 9.4 × 10
−3 m/s to 51.9 × 10
−3 m/s with intergroup interval of 4.7 × 10
−3 m/s.
Figure 10 shows the measurement results at conditions of 90%, 80%, and 70% water cut.
As shown in
Figure 10, the measurement results of the IM-WIDIM-DPIV algorithm were closer to the theoretical values for all water cut than those of WIDIM-DPIV algorithm. This qualitatively indicates that the accuracy of the IM-WIDIM-DPIV algorithm was higher than that of the WIDIM-DPIV algorithm. Under different working conditions, the mean error of the WIDIM-DPIV algorithm was 3.39 × 10
−3 m/s and that of the IM-WIDIM-DPIV algorithm was 1.43 × 10
−3 m/s. This quantitatively indicates that the mean error of the IM-WIDIM-DPIV algorithm was smaller than that of WIDIM-DPIV algorithm and the measurement results of the IM-WIDIM-DPIV algorithm were closer to the theory value under all working conditions. According to all measurement data, the average accuracy of the IM-WIDIM-DPIV algorithm was 94.8%. It was higher than that of the WIDIM-DPIV algorithm, which was 88.3%. The standard deviation of the WIDIM-DPIV algorithm was 1.39 × 10
−3 m/s and that of the IM-WIDIM-DPIV algorithm was 0.56 × 10
−3 m/s, which indicates that the volatility of the IM-WIDIM-DPIV algorithm was smaller than that of WIDIM-DPIV algorithm. The maximum deviation of the WIDIM-DPIV algorithm was 5.77 × 10
−3 m/s under the condition of 51.9 × 10
−3 m/s-90% and that of the IM-WIDIM-DPIV algorithm was 2.65 × 10
−3 m/s under the condition of 42.4 × 10
−3 m/s-70%. The maximum relative deviation of the WIDIM-DPIV algorithm was 16.8% under the condition of 14.1 × 10
−3 m/s-90%, and that of the IM-WIDIM-DPIV algorithm was 9.4% under the condition of 9.4 × 10
−3 m/s-90%, which indicates that the deviation degree of result that calculated by the IM-WIDIM-DPIV algorithm from the actual value was lower than that of the WIDIM-DPIV algorithm.
As shown in
Figure 10, there is jumping data at specific points with different water cut, and the major differences between the two PIV approaches occur at relatively high flow velocity. This may be caused by the following four reasons. (1) Oil droplets are used as tracer particles in the experiment. With the increase of flow velocity and water cut, the average size of oil droplets increase due to the stacking effect. The minimum visible diameter of oil droplets is ~2 mm, the maximum diameter is ~9 mm, and the average diameter is ~4.5 mm. In the case of the same flow velocity and different water cut, the oil droplets distribution in shooting area is different. When the water cut is high, the oil droplets distribution in the shooting area is sparse compared with that of low water cut, and the number of matched oil droplets is small. This results in larger errors. (2) Reversal flows induced by buoyancy driven turbulence. (3) With the increase of flow velocity, the velocity gradient in the pipe increases, and DPIV interrogation window’s following performance becomes worse. However, the interrogation window following performance of IM-WIDIM-DPIV algorithm is better than that of WIDIM-DPIV algorithm. Therefore, the measurement accuracy difference is obvious at high flow velocity. (4) As the flow velocity and water cut increases, the distribution of oil droplets gradually became denser; when the droplets are too dense, oil droplets shield each other seriously. This results in inaccurate calculation in DPIV calculation, so the accuracy of DPIV reduces.
In conclusion, from both qualitative and quantitative perspectives, the IM-WIDIM-DPIV algorithm had a higher precision than the WIDIM-DPIV algorithm, with a maximum measurement accuracy of 97.5% and an average measurement accuracy of 94.8%.
5.2. Measurement Reproducibility
To verify the stability of the IM-WIDIM-DPIV algorithm, the oil–water two-phase immiscible flow in the inner diameter 125 mm vertical upward pipe was repeatedly measured under different water cut and flow velocity of 9.4 × 10
−3 m/s - 51.9 × 10
−3 m/s with intergroup interval of 4.7 × 10
−3 m/s. The measurement results are shown in
Figure 11 and
Table 4.
As shown in
Figure 11, the measured curve is effectively consistent with the theory curve, despite fluctuating slightly. The calculated maximum fluctuation was 2.93 × 10
−3 m/s, with a relative deviation of 5.64%, standard deviation of 1.50 × 10
−3 m/s, and average value of 51.74 × 10
−3 m/s. This is close to the theoretical value of 51.90 × 10
−3 m/s, so the measured results have good stability.
Table 4 shows that the overall average maximum deviation of repeated measurements under various working conditions was 5.46 × 10
−3 m/s; the highest was 10.13 × 10
−3 m/s and the lowest was 2.12 × 10
−3 m/s. The average reproducibility was 1.98%; the highest was 5.81% and the lowest was 0.74%, all of which did not exceed 10%. When the water cut was 70%, the average maximum deviation and average reproducibility were the minimum. They were 4.85 × 10
−3 m/s and 1.26%, respectively. Therefore, the IM-WIDIM-DPIV algorithm has good reproducibility and stability.
Figure 12 shows the velocity distribution of oil–water two-phase immiscible flow in the inner diameter 125 mm vertical upward pipe under different working conditions obtained by the IM-WIDIM-DPIV algorithm.
Figure 12 shows that the axial velocity of the flow in the pipe is clearly greater than the radial velocity, so the fluid flows upward as a whole, and the average velocity at the center of the vertical pipe is significantly higher than that near the boundary; this is consistent with the actual bubble flow in vertical wells [
40,
41].
5.3. Measurement Uncertainty Evaluation
The velocity calculation equation based on DPIV is Equation (25):
where,
γ is camera calibration factor, Δ
pixel is the pixel value of particles movement in two adjacent frames of images, and Δ
t is the time difference between two frames of images.
To evaluate the uncertainty measurement of oil–water two-phase immiscible flow velocity, the above equation is equivalent to
where, Δ
QW is the water phase flow rate, Δ
QO is the oil phase flow rate, and
D is pipe inner diameter.
In the calculation process, the measurement of oil–water two-phase immiscible flow velocity is obtained according to Equation (25), not Equation (26). According to Equation (25), flow velocity measurement errors are divided into two categories: One is instrument calibration error, which is mainly composed of object distance error, camera tilt error, and camera manufacturing error; the other is the geometric error and control error of measurement system.
According to the above analysis, the measurement uncertainty of oil–water two-phase immiscible flow measurement mainly includes the following.
(1) Measurement uncertainty uw caused by the control error of water phase flow velocity ΔQW.
The maximum value of this error is 0.1%, the error approximately follows uniform distribution, and the maximum flow velocity of water phase is 3.20 m
3/h. Therefore, the measurement uncertainty caused by this part is calculated as
(2) Measurement uncertainty uo caused by the control error of water phase flow rate ΔQO
The maximum value of this error is 0.1%, the error approximately follows uniform distribution, and the maximum flow velocity of oil phase is 1.38 m
3/h. Therefore, the measurement uncertainty caused by this part is calculated as
(3) Measurement uncertainty uD caused by the error of pipe inner diameter D
The maximum value of this error is 0.1 mm, pipe inner diameter
D is 125 mm, and the error approximately follows uniform distribution. Therefore, the measurement uncertainty caused by this part is
(4) Measurement uncertainty uΔt caused by the error of time difference Δt of per camera frame
The maximum value of this error is 0.05%, the error approximately follows uniform distribution, and the time difference of each frame is 0.001. Therefore, the measurement uncertainty caused by this part is
(5) Measurement uncertainty uγ caused by the error of camera calibration γ
Object distance error is 1 mm, object distance is 0.5 m, the tilt angle error of the camera is 0.01°, the camera design angle is 0°, and the errors are within the limits permitted of the measurement procedure. Therefore, the measurement uncertainty of this part according to the manufacturer is
where,
L is object distance,
Vmax is the max flow velocity, and the value is 0.113 m/s.
Therefore, the combined uncertainty U
95 of the oil–water two-phase immiscible flow measurement system is