1 Introduction

In the fields of petroleum drilling and production engineering, flow rates of oil, gas and water in produced fluids could reflect real-time changes in single well capacity in oilfields, which can provide support data for reservoir management and production decisions (API 2005). At present, quantitative online detection of multi-phase flow in oil and gas wells is extremely challenging, and there is no reliable technology which can accurately measure multi-phase fluid without phase separation. In recent years, multi-phase flow rate measurement technology without phase separation has been widely considered and developed gradually. The emergence of the multi-phase flow meter can realize online flow measurement for produced fluids on-site, with no human intervention required, which is significant for dynamic reservoir management, production allocation optimization and wellhead testing.

As a green, efficient and accurate method for oil and gas detection, nuclear magnetic resonance (NMR) has been widely used in hydrocarbon reservoir evaluation and laboratory study of rock physical properties (Coates et al. 2000; Blümich et al. 2009). In terms of oil and gas measurement, NMR can carry out fluid qualitative and quantitative evaluation by obtaining molecular scale information of reservoir fluid. The unique measurement principle of NMR determines its theoretical potential to measure multi-phase flow online.

The multi-phase flow NMR measurement method and hardware development scheme proposed in this paper can quantitatively analyze multi-phase flow; meanwhile it also can be used as a set of analytical instruments for on-site fluid property testing. Multi-phase flow in oil and gas wells and pipelines, however, is significantly affected by the “state of fluid motion” and a “poor working environment,” which makes it hard for the existing laboratory NMR technology and method to be directly applied to the quantitative detection of oil and gas multi-phase flow. Aiming at this problem, this paper proposes a multi-phase flow NMR online detection system based on previous research results.

2 Flow effects

Compared with the NMR fluid measurement in the static state, the largest challenges to flow measurement using NMR are as follows:

  1. 1.

    Magnetization efficiency and signal loss rate control in the flow state (Deng et al. 2013). In a continuous flow state, fluid magnetization time is limited, which may cause insufficient fluid magnetization and influence the signal-to-noise ratio of the collected signals and the latter data interpretation. Similarly, the time that the fluid flows through the antenna is also very limited, which can easily cause insufficient echo collection and influence the accuracy and reliability of the collected signals. In addition, the traditional technology can be only used to measure the average flow velocity of multi-phase flow in the tubes, resulting in an error in flow measurement.

  2. 2.

    Fast acquisition of NMR signals and pulse sequences. On the one hand, the flow state has a significant effect on the traditional 1D NMR signal collection, and the pulse sequence needs to be optimized. Multi-dimensional NMR, on the other hand, can obtain more abundant fluid information than the 1D NMR, so it is more suitable for multi-phase flow tests. However, its measurement time is relatively longer than 1D NMR which restricts its applications in online measurements, and the pulse sequence needs to be innovative.

  3. 3.

    Data processing and quantitative interpretation of multi-phase flow online detection. Low-field NMR can be used to measure and acquire echo signals but cannot directly reflect the flow velocity and compositions of the multi-phase fluid. At the same time, aiming at this problem, a new measurement pulse sequence and a corresponding inversion method are proposed.

3 Device

NMR probe design is essentially a problem of the electromagnetic field and also includes magnet structural optimization and material science research. The online NMR measurement of multi-phase flow is extremely challenging, and it takes the hydrogen nuclei of a rapidly flowing fluid in an oil pipeline as the basic detection and research objects. The velocity and flow pattern of each phase of the multi-phase flow are changing, so these put forward very stringent requirements for accuracy, reliability, timeliness and efficiency of the NMR detection instrument.

The design goal of the NMR system for a multi-phase fluid described in this paper is to meet the following parameters listed in Table 1.

Table 1 Performance indicators

3.1 Probe

As the key parameters for management and efficient development of reservoirs, online NMR detection of multi-phase flow should be designed based on the actual characteristics of oil and gas wells and pipelines in order to achieve the engineering target. The detection object of this NMR system is the mixture of oil, gas and water flowing in wellhead transmitting pipelines of oil and gas production wells or oil and gas gathering and transferring pipelines of central treatment stations. Given that the detection environment is complex, instruments need to work steadily long term in such natural environments as deserts, swamps, plateaus or forests. In view of the above, it is designed with “Outside-in” NMR probe structure (probe packages and fluid pipes) (Abragam 1961) and it radiates the magnetic field inward. Equipped with temperature control and positive pressure units internally, the closed magnetic field structure is isolated from the external environment temperature, humidity and dust to avoid magnetic field intensity drift, erosion, electromagnetic interference and other adverse effects on the probe. Secondly, this structure can obtain a larger uniform magnetic field region and further improve detection accuracy and signal-to-noise ratio (SNR). At the same time, it can realize zero magnetic flux leakage outside the NMR probe by adding a highly magnetic shield outside the magnet and improve the safety of manual operation around the instrument.

The original purpose of the probe design is to reduce the impact of the flow state on NMR measurements (Wu et al. 2012; Akkurt 1990; Sigal et al. 2000). Flow leads to insufficient polarization time and consequently affects the echo signal strength. A longer pre-polarization magnet area helps increase fluid polarization time; theoretically it is better if the pre-polarization magnet length, Lp, can be as long as possible, but on-site installation, transport and economic problems determined that the length of the magnet should be as short as possible. Figure 1 shows the first echo amplitude of multi-phase flow with different water cuts under different lengths of pre-polarization magnets. Because the longitudinal relaxation time (T1) of water is longer, the first echo amplitude is relatively low when the multi-phase fluid has a water cut of 100%. In order to ensure an ideal measurement accuracy and echo data with better SNR at the same time, the magnetization efficiency is required more than 20% when the multi-phase fluid flows into the detection zone under selected extreme conditions (100% aqueous), which means that at least 500 mm pre-polarization length is necessary.

Fig. 1
figure 1

First echo amplitude under different lengths of pre-polarization magnets. Parameters: water (longitudinal relaxation time T1 = 2.60 s, transverse relaxation time T2 = 2.20 s), oil (T1 = 0.24 s, T2 = 0.20 s), gas (T1 = 1.64 s, T2 = 0.04 s, diffusion coefficient D = 2 × 10−3 cm2/s (Kleinberg and Vinegar 1996; Lo et al. 2000), hydrogen index (HI) = 0.245), average flow rate v = 700 mm/s (49 m3/day)

The internal structure of the probe is shown in Fig. 2. The lengths of the magnetic body in pre-polarization and detection zones are 573 and 312 mm, respectively. The field intensity in the center of the pre-polarization magnet is 3700 Gauss, which is slightly higher than the field intensity of 3400 Gauss in the detection zone to achieve a rapid polarization. The fluid pipe is about 1.5 m long, with an internal diameter of 32 mm (1.25 inch) and a wall thickness of 10 mm. Glass fiber reinforced epoxy is selected for the wall material. The antenna consists of two sections, a part of which is the main antenna set in the uniform magnetic field in the detection zone to measure relaxation time (T1, T2) and average flow velocity (v) of multi-phase flow, and another part is the auxiliary antenna set in the uniform gradient magnetic field at the tail section of the probe to measure the multi-phase flow diffusion coefficient (D) when the relaxation time cannot be used to distinguish multi-phase flow compositions. In addition, in order to deal with the influence of the huge temperature difference on the center frequency of the magnetic body on-site, an insulating layer is installed inside of the magnet and the inside of the probe shell; meanwhile a temperature control system is installed on the magnetic body to prevent temperature from drifting. Samarium cobalt is used as the probe magnet material.

Fig. 2
figure 2

Schematic of the internal structure of the proposed NMR probe

The probe magnet had a Halbach structure (Halbach 1980; Blümler 2016), as shown in Fig. 3. The pre-polarization magnet uses a single-loop Halbach magnet structure, which consists of eight magnets, and the magnetizing direction is shown in Fig. 3. Detection region magnets are arranged in a double-loop Halbach structure to obtain an optimal uniform magnetic field. All magnets have an octagonal structure, which shows advantages in two aspects compared with a square structure—one is that the generated magnetic field is more uniform, and another is that the magnet skeleton opening can be realized in the same direction which makes it easier for installation and processing while a square magnet needs to rotate to different angles to complete each opening.

Fig. 3
figure 3

Cross section of magnet. a Pre-polarization magnet. b Detection magnet

Based on a finite element analysis of the magnetic field, an axial magnetic field distribution of the magnetic body in the detection zone can be obtained, as shown in Fig. 4. It is acceptable that the magnetic body in the detection zone produces a uniform field region with 40 mm in the axial direction located in the center of the magnet where the magnetic fluctuation is less than one Gauss and the magnetic field uniformity is 348.3 PPM. One cannot ignore the influence of the pre-polarization magnet on the magnetic field in the detection zone, and the pre-polarization magnet will “drag” the whole magnetic field in the detection zone toward the direction of the pre-polarization magnetic field, and this will create a peak value of the magnetic field in the interaction area of the pre-polarization magnets and detection magnets. However, the peak value disturbs the uniformity of the magnetic field in the detection region, which is obviously not acceptable. The solution is to set a gap between the pre-polarization magnets and the magnets in the detection zone, and there will be a low field intensity in the gap to offset the effect of the field strength peak on the detection zone.

Fig. 4
figure 4

Axial magnetic field distribution of the magnetic body in the detection zone

After assembly, a 3D structure of magnets is shown in Fig. 5. There are seven segment magnets in the pre-polarization zone and four segment magnets in the detection zone. In the detection zone, the spacing between magnets is different from each other and they are optimized to achieve a maximum range of the uniform magnetic field. The magnet gap is 8 mm (Gap 1 = 8 mm) in the pre-polarization zone, and the gap between the pre-polarization zone and the detection zone is 10 mm (Gap 2 = 10 mm). Gaps between each magnet are not identical (Gap 3 = 2 mm, Gap 4 = 10 mm, Gap 5 = 1 mm) in the detection zone, and the main purpose is to “resist” the effects of the magnetic field in the pre-polarization zone on the magnetic field in the detection zone. After all magnets are equipped, the distribution of the magnetic field along the fluid flow direction is shown in Fig. 6.

Fig. 5
figure 5

A 3D magnet structure

Fig. 6
figure 6

Axial distribution of the magnetic field

Antennas are a key component of the NMR instrument. These are used to generate the radio-frequency (RF) field to activate samples and receive magnetic resonance signals. The antenna design must meet the following requirements: The antennas must work at resonant frequencies and make the B1 field perpendicular to the B0 field; the B1 field must be able to completely cover the detection zone and have sufficient uniformity. Considering the impedance, the quality factor and resonant conditions of the antennas, as well as minimizing the antenna power, the antenna tuning circuit selects a parallel resonant structure which is relatively flexible to tune and easy to design.

The antennas are installed inside the magnet array and outside the fluid pipeline. Due to the space limit, the solenoid and saddle antennas, as shown in Fig. 7 commonly use internal heuristic antenna structures. Numerical simulation of the RF field of the antennas shows that the radio-frequency magnetic field generated by a solenoid structure is better, which is helpful to an accurate measurement of flow velocity. In addition, the RF field of the solenoid antenna always distributes along the axial direction and is perpendicular to the static magnetic field, while only small parts of the central magnetic field generated by the saddle coil are uniform and other parts of the RF field is parallel to the cross section of pipe. The solenoid antenna is 20 mm long, with an inner diameter of 55 mm.

Fig. 7
figure 7

Numerical simulation of the RF field of antennas. a Solenoid antenna. b Saddle antenna

In NMR instruments, the antenna recovery time can be expressed as follows (Andrew and Jurga 1987):

$$\tau_{\text{R}} = \frac{2Q}{\omega }$$
(1)
$$T_{\text{R}} = \frac{2Q}{\omega }\ln \frac{{V_{0} }}{{V_{\text{n}} }}$$
(2)

where Q is the quality factor of the antenna, ω is the resonant frequency, V0 is the amplitude of the transmitted voltage across the antenna and Vn is equal to the amplitude of the NMR signal.

The antenna recovery time constant \(\tau_{\text{R}}\) is proportional to Q and inversely proportional to ω. Reducing Q at a particular frequency can reduce the antenna recovery time, but the instrument’s SNR ratio or sensitivity is proportional to the square root of Q, so a reduction in Q will reduce the instrument sensitivity. In order to solve the problem of reducing the antenna recovery time and improving the instrument sensitivity, a basic idea is that the control antenna works in the low Q state during the pulse emission and after the pulse emission. When the nuclear magnetic resonance signal is received, the antenna works in the high Q state. Hoult and Richards (Hoult and Richards 2011) defined Q as:

$$Q = \frac{\omega l}{{R_{\text{AC}} }}$$
(3)

where RAC is the AC resistance at the Larmor frequency and l is the inductance of the coil and:

$$l = \frac{{5\uppi \mu_{0} N^{2} R^{2} }}{{9R + 5L_{\text{A}} }}$$
(4)

where N is the number of turns on the inductor, R is the coil radius and LA is the length of the coil.

The signal-to-noise ratio (SNR) for the NMR experiment using any B1 coil design (Moresi and Magin 2003; Smith and Hughes 2001; Casanova et al. 2011; Sun and Taherian 2000) is:

$${\text{SNR}} = \frac{{K(B_{1} )_{xy} VM\gamma \hbar I(I + 1)}}{{5.05k_{\text{B}} T_{\text{s}} }}\left( {\frac{{p_{\text{w}} }}{{Fk_{\text{B}} T_{\text{c}} L_{\text{A}} \zeta \Delta f}}} \right)^{{\frac{1}{2}}} \frac{{\omega_{0}^{{\frac{7}{4}}} }}{{[\mu \rho (T_{\text{c}} )]^{{\frac{1}{4}}} }}$$
(5)

where K is the inhomogeneity factor, V is the volume of the antenna surrounded the sample, M is the turns of the coil, μ is the magnetic moment of the nucleus, γ is the gyromagnetic ratio of the nucleus, h is the Planck’s constant divided by 2π, I is the spin quantum number, F is the preamplifier noise figure, ζ is a correction factor for the proximity effect discussed previously, kB is Boltzmann’s constant, ∆f is the noise bandwidth, Pw is the wire circumference, ω0 is the Larmor frequency, Tc is the coil temperature, Ts is ambient temperature and ρ(Tc) is the conductor resistivity at Tc.

3.2 Monitoring and control device

In order to facilitate quick installation and transportation, the NMR multi-phase flow detection system adopts integration and skid-type design.

The sampling control system includes the upper computer communication module, wireless signal transmitter, wireless signal receiving device, Programmable Logic Controller (PLC) and control valve, as shown in Fig. 8. The system measurement model includes a static measurement mode and a flow measurement mode. Multi-phase flow measurement is realized by switching between two measurement modes. Under the static measurement mode, the PLC closes # 1 and # 2 valves and opens # 3 and # 4 valves, which makes the continuous fluid flow through the red pipeline as shown in Fig. 8, and the fluid will stay temporarily motionless in the pipeline where a probe is located, and then the phase fraction of multi-phase flow will be measured. At this stage, one or more methods of traditional inversion recovery, Carr–Purcell–Meiboom–Gill sequence (CPMG) or diffusion editing pulse sequence, are used to measure T1, T2 and D distributions of the multi-phase flow sample. Also, a 2D T1T2 distribution can be obtained by driven-equilibrium CPMG (DECPMG) or driven-equilibrium fast-inversion recovery (DE-FIR) pulse sequence, and the diffusion editing pulse sequence and 3D pulse sequence can be used to measure T2D or T1T2D if time permits. Under the flow measurement mode, the PLC closes # 3 and # 4 valves and opens # 1 and # 2 valves, which makes fluid flow through the blue pipeline as shown in Fig. 8, and meanwhile the probe adopts the CPMG pulse sequence to finish a rapid measurement of the fluid flow velocity. When measuring, the static measurement frequency and flow measurement frequency are 2 min and 30 s, respectively, and the system switches between the two measurement modes.

Fig. 8
figure 8

Schematic of NMR multi-phase measurement design

4 Methodology

4.1 Flow velocity measurements

In the previous work, we have understood that the polarization and echo collection processes of NMR measurements will be affected by the flow rate in the echo collection stage (as shown in Fig. 9) (Bloch 1946; Bloch et al. 1946; Cowan 1997; McConnell 1987):

$$ECHO(n) = \left\{ {\begin{array}{*{20}l} {\sum\limits_{i = 1}^{n} {M_{i} \exp \left[ - t\left(\frac{1}{{T_{2,i} }} + Y_{\text{v}} \right)\right],} } \hfill & {t < \frac{A}{v}} \hfill \\ {0,} \hfill & {t \ge \frac{A}{v}} \hfill \\ \end{array} } \right.$$
(6)

where ECHO(n) represents the signal amplitude of the nth echo, Mi represents the magnetization vectors of different fluid compositions after polarization, T2,i, respectively, represents the longitudinal relaxation time and transverse relaxation time of each composition of multi-phase flow, v represents the average flow rate, A is the effective antenna area length, t represents the echo collection time and Yv represents the flow velocity factor:

$$Y_{\text{v}} = \int\limits_{0}^{R} {Y_{\text{v}} } (r)\text{d} r = - \int\limits_{0}^{R} {\frac{1}{t}\ln \left( {1 - \frac{v(r)t}{A}} \right)} \text{d} r \approx \int\limits_{0}^{R} {\frac{v(r)}{A}} \text{d} r$$
(7)

where R is the diameter of the fluid tube, r is in the range of 0–R and v(r) represents the fluid flow velocity at distance r from the center point of the circular tube, according to fluid mechanics:

$$v(r) = \frac{Q(r)}{{\uppi R^{2} }} = \frac{\Delta P}{4\mu A}(R^{2} - r^{2} )$$
(8)

where Q is the flow rate, ∆P is the fluid pressure difference at both sides of the pipe in the detection range and μ is the viscosity.

Fig. 9
figure 9

Flow rate measurement method based on the attenuation of the CPMG echo train

As seen from Eq. (7), Yv causes an additional attenuation of the echo train which is almost proportional to the flow velocity. Therefore, it can be used to measure the flow velocity.

Contrary to the motion correction, in order to obtain an attenuation curve of the echo train caused by the flow velocity, the echo train data need to be reconstructed, that is, removing the normal echo relaxation attenuation trend from echo train signals and only retaining Yv effects. The processing steps are as follows: (1) do singular value decomposition (SVD) for the actual measured echo train, and obtain a fitting curve data ECHO_FIT1; (2) divide each data of ECHO_FIT1 by \(\exp ( - t/T_{2,i} )\) to eliminate echo relaxation attenuation and get ECHO_FIT_SC1 curve; (3) do subtraction between two curves before and after correction, and obtain difference data; (4) subtract difference data from the original echo train data to get echo train ECHO_SC1 through reconstruction, and acquire the attenuated echo train caused only by the influence of flow velocity, and the reconstructed echo train is shown in Fig. 10. The reason for processing SVD data instead of the original echo data string is because noise has been filtered before SVD calculation. Thus, this echo reconstruction method would not cause an additional amplification of noise when it is used to reconstruct echo train data. Figure 10 is the numerical modeling results of echo reconstruction eliminating attenuation caused by flow velocity. It shows that the lower the flow velocity is, the longer the fluid flows through the antenna area, and the larger the free attenuation amplitude of echo is. Therefore, correction is more needed before flow velocity fitting.

Fig. 10
figure 10

Echo reconstruction eliminating attenuation caused by flow velocity. Numerical simulation parameters: echo number N = 500, water cut = 60% (water T1 = 2.60 s, T2 = 2.20 s), oil content = 30% (oil T1 = 0.24 s, T2 = 0.20 s), gas content = 10% (gas T1 = 1.64 s, T2 = 0.04 s, D = 2 × 10−3 cm2/s, HI= 0.245), R = 32 mm, SNR= 35, A = 30 mm, echo spacing TE = 100 μs. a Average flow velocity v = 100 mm/s (7 m3/day). b Average flow velocity v = 300 mm/s (21 m3/day). c Average flow velocity v = 500 mm/s (35 m3/day). d Average flow velocity v = 700 mm/s (49 m3/day)

It is important to note that the influence of the flow rate on the polarization process can cause insufficient polarization of samples, thus causing the signal amplitude and signal-to-noise ratio to decrease, but theoretically it does not affect the measurement of the flow rate. The presence of a pre-polarization magnet area is beneficial to achieving greater signal intensity, thus improving the signal-to-noise ratio.

The flow rate of the fluid is inversely proportional to the time of flow through the antenna area. The higher the flow rate is, the less the number of hydrogen nuclei to which the NMR phenomenon occurs during one echo collection time, that is, the smaller the collected NMR signal is. So, the signal amplitude is related to the flow rate.

4.2 Fluid component measurements

The complexity of multi-phase fluid compositions results in frequent signal aliasing on the one-dimensional NMR spectrum, making it difficult to quantitatively evaluate oil, gas and water online. Now conventional signal aliasing processing methods include the pretreatment method of adding chemical reagents and using multi-dimensional NMR (Song and Tang 2004; Song 2002; Song et al. 2002; Bouton et al. 2001). The pretreatment method is to artificially separate two phase signals of oil and water (as shown in Fig. 11) by adding a paramagnetic material (such as MnCl2·4H2O) to the liquid phase, which is soluble in water and insoluble in oil; however, obviously this method is unable to be used for online measurements on-site. In recent years, 2D NMR (T1T2, T2D) (Hürlimann and Venkataramanan 2002; Brown 1989) and 3D NMR (T1T2D) are commonly used in the laboratory to describe pore medium structures or fluid compositions and can effectively distinguish multi-phase flow, which is difficult to be identified through a 1D NMR experiment. However, the multi-dimensional NMR needs a longer measurement time, and it would cause some issues in field applications including low measurement frequency and difficult capture of fluid transient change. In the previous work, a driven-equilibrium fast-inversion recovery (DE-FIR) pulse sequence was proposed, and this pulse sequence can obtain the T1T2 distribution only by two scans, and thus the measurement time is short (hundreds of milliseconds to several seconds). However, a few seconds of measuring time is still not sufficient for measuring high-flow velocity fluid. Regarding this challenge, this paper suggests that the temporary diversion of a fluid can be achieved through an automatic control of pipelines, and thus it will realize a static measurement mode for multi-dimensional NMR measurement, and the specific content will be detailed later.

Fig. 11
figure 11

1D NMR spectrum peak aliasing overlap phenomenon solved by adding chemical reagents in the laboratory

The main composition of the gas phase of multi-phase flow is methane, and the hydrogen index (HI) of methane at atmospheric pressure is so low (Callaghan 1991; Bloembergen et al. 1948) that the NMR signal is weak and overwhelmed by the noise. As a result, it is necessary to measure the gas phase under a certain pressure. Currently, experiments prove that NMR signals of natural gas can be collected when the pressure is higher than or equal to 0.8 MPa, and in most cases, the inner pressure of the pipe is higher than 0.8 MPa, which makes it possible to directly measure gas phase components. The gas phase percentage Vgas can be expressed as follows:

$$V_{\text{gas}} = \frac{{S_{\text{gas}} }}{{S \cdot {{HI}}_{\text{gas}} }}$$
(9)

where HIgas is the hydrogen index of the gas phase and can be obtained through a table lookup after reading pressure data of the pressure gauge and Sgas represents the measured signal quantity of the gas phase, which is reflected on inversion mapping as the area of the gas phase peak on a 1D map and the volume of the gas phase peak on 2D and 3D maps. S can be expressed as follows:

$$S = \frac{{S_{\text{gas}} }}{{{{HI}}_{\text{gas}} }} + \frac{{S_{\text{oil}} }}{{{{HI}}_{\text{oil}} }} + \frac{{S_{\text{water}} }}{{{t{HI}}_{\text{water}} }}$$
(10)

where HIoil and HIwater, respectively, represent the hydrogen index of the oil and water phases, and the impacts on these parameters caused by the internal pressure change in oil and gas pipelines can be ignored. Soil and Swater, respectively, express the measured signal quantity of oil and water phases.

If the pressure in a pipeline is low (internal pressure < 0.8 MPa) and unstable, the direct measurement accuracy of the gas phase content is low, and it should be calculated by the reverse-reasoning method. The following relation is always satisfied in multi-phase oil and gas pipelines:

$$V_{\text{gas}} + V_{\text{water}} + V_{\text{oil}} = 1$$
(11)

where Voil and Vwater represent the percentage content of oil and water, respectively. The expression is similar to Eq. 5. What is different, there is no Sgas/HIgas in expression of S. So, and we can calculate the gas content by measuring oil and water contents.

4.3 Multi-phase fluid flow rate

The quantitative evaluation of the multi-phase fluid flow rate can be completed based on the measurement of fluid velocity and phase fraction. After measuring the fluid velocity v and the fluid component, the flow rate of multi-phase flow, oil and water is:

$$Q_{\text{gas/water/oil}} = \sum\limits_{i = 1}^{x} {\frac{{V_{{{\text{gas/water/oil}},i}} }}{{V_{{{\text{A}},i}} }}v_{i} }$$
(12)

where x stands for scanning layer number using a gradient magnetic field hierarchical scan, VA,i represents the volume of the antenna sensitive area in layer i and vi represents the average flow velocity of layer i. Particularly, when there is no hierarchical scan, i = 1.

5 Numerical simulation results

Numerical simulation results of the multi-phase fluid flow rate and the accuracy of the results are shown in Fig. 12. The numerical simulation results of multi-phase flow compositions are shown in Fig. 13.

Fig. 12
figure 12

Numerical simulation results of multi-phase flow rate. a Collected echo train at different flow rates. b NMR flow rate and actual flow coincidence test. Parameters: temperature = 22 ºC, tubing pressure = 10 MPa, echo number N = 500, SNR = 35, antenna length A = 30 mm, echo spacing TE = 100 µs, water content = 60% (water T1 = 2.60 s, T2 = 2.20 s), oil content = 30% (oil T1 = 0.24 s, T2 = 0.20 s), gas content = 10% (gas T1 = 1.64 s, T2 = 0.04 s, D = 2 × 10−3 cm2/s, HI = 0.245)

Fig. 13
figure 13

Numerical simulation results of multi-phase flow compositions. Parameters: temperature = 22 ºC, tubing pressure = 10 MPa, SNR = 35, antenna length A = 30 mm. a Echo number N = 15,000, echo spacing TE = 200 μs, wait time TW place 20 points in logarithm between 1 ms and 12 s, water content = 30% (water T1 = 2.60 s, T2 = 2.20 s, D = 2 × 10−3 cm2/s), oil content = 60% (oil T1 = 0.24 s, T2 = 0.20 s, D = 2 × 10−3 cm2/s), gas content = 10% (gas T1 = 1.64 s, T2 = 0.04 s, D = 2 × 10−3 cm2/s, HI = 0.245). b Echo number N = 15,000, echo spacing TE place 20 points between 100 µs and 2 ms, wait time TW = 12 s, water content = 30% (water T1 = 0.25 s, T2 = 0.22 s, D = 1.75 × 10−5 cm2/s), oil content = 60% (oil T1 = 0.24 s, T2 = 0.20 s, D = 1.1 × 10−6 cm2/s), gas content = 10% (gas T1 = 1.64 s, T2 = 0.04 s, D = 2 × 10−3 cm2/s, HI = 0.245)

6 Conclusion

In this paper, an online NMR multi-phase flow rate measurement technical solution for oil and gas wells is proposed, including an instrument hardware design scheme, a measurement method and an interpretation method. This technique can perform quantitative detections of flow rates of oil, gas and water and components of multi-phase flow without phase separation. The technology also has advantages such as non-invasive detection, environmentally friendly protection and oil, gas and water three-phase full range. At present, related hardware products are being assembled, relevant technologies are being patented, and hardware system photographs and experimental results will be published in the following articles.