Feasibility Study of Using X-ray Tube and GMDH for Measuring Volume Fractions of Annular and Stratiﬁed Regimes in Three-Phase Flows

: In this paper, the feasibility of using an X-ray tube instead of radioisotope sources for measuring volume fractions of gas, oil, and water in two typical ﬂow regimes of three-phase ﬂows, namely, annular and stratiﬁed, is evaluated. This study’s proposed detection system is composed of an X-ray tube, a 1 inch × 1 inch NaI detector, and one Pyrex-glass pipe to model different volume fractions for two ﬂow regimes, annular and stratiﬁed. Group method of data handling (GMDH), a powerful regression tool, was also implemented to analyze the obtained data. The obtained results in this work indicate that a simple system based on an X-ray tube and just one NaI detector could be a potential alternative to radioisotope-based systems for separate measurements of gas, oil, and water volume fractions in annular and stratiﬁed ﬂow regimes of a three-phase ﬂow.


Introduction
Petroleum industries still demand appropriate measurements to evaluate their production of oil, gas, and other related fluids. The primary measuring instruments previously utilized a technique based on gravitational decanters in the component separation process [1]. The mentioned devices had a large volume and a long delay in measuring response. Since then, various techniques have been implemented to measure the quality or composition of a multiphase stream. Some of these have included capacitance, photon radiation attenuation, neutron attenuation, and orifice or flow nozzle correlations. The mentioned techniques are explained in detail in reference [2].
Many studies have been done on measuring gas, oil, and water volume fractions in three-phase flows using gamma radiation techniques. In 2010, Salgado and his colleagues presented a dual-energy gamma emitter radioisotope-based system for identifying flow regimes of a gas-oil, multiphase water flow [3]. In 2017, G.H. Roshani and his colleagues investigated the capability of radial basis function (RBF) neural network and gamma transmission technique to predict volume fractions of gas, oil, and water phases in an annular regime of a three-phase flow [4]. Their proposed system consisted of a dualenergy gamma source (europium-152 and cesium-137 radioisotopes) and one NaI detector. They investigated three different RBF models. The first one was assigned to estimate the water and oil volume fractions, another one was adopted to estimate the gas and water volume fractions, and the third one was implemented to estimate the gas and oil volume fractions. Comparing three proposed RBF models, they found that the first RBF model could estimate the volume fractions in an annular regime of three-phase flows with better precision. In 2017, Gholipour Peyvandi and his colleagues proposed a gamma backscatter technique for measuring volume fractions in a stratified flow regime of a three-phase flow [5]. They established an experimental setup that included one cesium-137 source with an activity of 148 × 10 7 Bq and one 2 inch × 2 inch NaI detector. They positioned the NaI detector under the vessel and next to the cesium-137 source to record the backscattered gamma radiation's energy spectrum. They trained a neural network model of multilayer perceptron (MLP) with data obtained from experiments. Employing a combination of a gamma backscatter technique and MLP neural network, they could estimate gas, oil, and water volume fractions with an error of less than 6.47%. In 2018, Roshani and his colleagues implemented a hybrid system of the Jaya optimization algorithm and the adaptive neuro-fuzzy inference system (ANFIS) combined with a dual-energy gamma-ray system to estimate the volume fractions of gas, oil, and water in a stratified regime of a three-phase flow [6]. Their simulated detection system included a dual-energy gamma source, including europium-152 and cesium-137 radioisotopes, and one NaI detector. They indicated that the hybrid network that uses the oil and gas volume fractions as its outputs is the best estimator model for estimating volume fractions of gas, oil, and water in a stratified regime of a three-phase flow. Further research about multiphase flow meters and the application of artificial intelligence in different engineering fields can be found in references [7][8][9][10][11][12][13][14][15][16][17][18][19][20][21][22][23].
In recent years, some researchers have also used X-ray radiation for imaging multiphase flows. In 2008, Theodore et al. utilized a facility including digital X-ray radiography and stereography imaging to determine different flow characteristics in large vertical systems with internal diameters of up to 32 cm and as tall as 4 m [24]. In 2018, Song et al. presented a compact X-ray densitometry system including a 50 kV, 1 mA X-ray tube, and some linear detector arrays for determining characteristics of a two-phase flow [25]. A comprehensive review study about the application of X-ray imaging techniques in multiphase flows has been done by Heindel [26].
As discussed in the literature review, the X-ray tubes have been usually used for imaging of multiphase flows and have been rarely implemented in radiation-based flow meters. In other words, in most previous studies regarding radiation-based three-phase flow meters, a single or dual-energy gamma source, including one or more radioisotopes, was usually employed.
In a recent study [17], an X-ray tube was used for simultaneously determining flow regime and volume fraction; two detectors were implemented in the system. In this paper, a simple system including just one detector and one X-ray tube is presented for measuring volume fractions of gas, oil, and water separately in two typical flow regimes of threephase flows (annular and stratified). Decreasing the number of detectors in a photon-based system helps to reduce the economic costs as well as make the system simpler. Hence, every attempt aimed at reducing the number of detectors in a photon attenuation-based system with the condition that the system's performance is not decreased is of great importance. Besides, in the present work, the gas and water volume fraction measurement precision has been improved by more than two times compared to the system in the previous study [17].
It should be noted that X-ray tubes have some advantages over radioisotope sources [27]. For example, X-ray tubes have tunable photon energy, more photon intensity (compared to an average commercial source), the ability to be easily turned on and off, fixed photon flux over time, and other features that highlight the importance of the current investigation.

Simulation Procedure
In the current investigation, Monte Carlo N-Particle code version X (MCNP-X) [28] was applied to model the proposed system. The system presented in this work included an X-ray tube, one 1 inch × 1 inch NaI detector, and one Pyrex-glass pipe for modeling different flow regimes and volume fractions. Figure 1 shows a schematic view of the simulated system and its performance. Figure 1. A schematic view of the simulated system and its performance: (1) photon source, (2) X-ray tube shield, (3) output window, (4) Pyrex-glass pipe, (5) modeled stratified regime, (6) NaI detector, (7) 200 keV filtered X-ray energy spectrum, and (8) recorded spectrum in the detector.

Photon Source Modeling
We modeled an industrial-type X-ray tube in the current investigation. Industrial X-ray tubes include 3 main parts: (1) cathode, an electron emitter (2) anode or target, usually made of tungsten, and (3) shield, which includes an exit window that often has a foil of metal placed in front for use as a filter. Since it takes less computational time to track the photons in MCNPX code than electrons, a photon source was considered a replacement for the cathode and anode set in the current investigation. We used the TASMIC free package provided by Hernandez et al. [29] to model the photon source. It is worth noting that Hernandez et al. implemented the MCNPX code for generating X-ray spectra. In the present investigation, a surface with a length and width of 1 cm and 0.1 cm, respectively, and oriented in direction of 12 • , similar to the actual focal spot reported in [29], was considered the photon source. To model the photon source's energy spectrum, an X-ray energy spectrum with a maximum tube voltage of 200-kilovolt peak (kVp), which was filtered with a 1 mm aluminum sheet, was utilized. The obtained X-ray energy spectrum from TASMIC was plugged into the MCNPX input.

Detector Modeling
A 1 inch × 1 inch cylinder was considered as the NaI detector. To record the energy spectrum of incident photons in the detector, Pulse Height Tally F8 was utilized. To consider the photon spectrum broadening in MCNPX code, we implemented the Gaussian energy broadening "FT8 GEB" option in the MCNPX code [30]. The "FT8 GEB" card contains three parameters: a, b, and c [30], which should be determined experimentally for a specific detector. In our former study [6], we calculated the required parameters for a 1 inch × 1 inch NaI crystal detector using some experimental laboratory work. Parameters a, b, and c were determined to be −1.09 × 10 −2 MeV, 6.96 × 10 −2 MeV 0.5 , and 2.26 ×1 0 −2 MeV −1 , respectively. In the present work, the three determined constant parameters were inserted into the "FT8 GEB" card.

Flow Regime and Volume Fraction Modeling
To model various flow patterns and volume fractions, we first defined a pipe made of Pyrex glass with wall thickness and outer diameter of 0.25 cm and 10 cm, respectively, as the main tube. The following step was to add water, oil, and gas phases with different amounts in the main pipe. Ordinary water, gasoil, and air with respective densities of 1000 kg/m 3 , 826 kg/m 3, and 1.25 kg/m 3 were used for the three mentioned phases. In this paper, annular and stratified flow regimes, two main flow regimes of three-phase flows, were simulated. We describe the related calculations for modeling these flow regimes in the following sections.

Annular Regime
In the annular regime of three-phase flows, fluid with the highest density (water) covers the channel wall in an annular shape and fluid with lower density (oil) locates on the water phase while the fluid with the lowest density (gas) remains in the core of the pipe. From the point of view of radiation measurement, the annular regime is symmetric with respect to the pipe axis. Figure 2 shows the annular regime schematically. Various volume fractions for the gas phase and oil phase in the annular regime can be modeled using Equations (1) and (2), respectively: where R, r 1 , r 2 , V gas , and V oil are the main pipe's internal radius, the gas phase's radius, the oil phase's radius, the volume fraction of the gas phase, and the volume fraction of the oil phase, respectively. In the mentioned equations, the main pipe's internal radius is a fixed parameter in all the calculations, so different gas and oil volume fractions can be easily determined by changing gas and oil phases. Using Equations (1) and (2), we modeled various volume fractions. Table 1 shows the simulated volume fraction sets.  In the stratified regime of three-phase flows, the phase with lower density is always located above the fluid with higher density. In other words, for a three-phase flow that moves in a horizontal pipe, water is positioned at the bottom, oil is positioned above the water, and gas is positioned at the top of the pipe. In contrast to the annular regime, the stratified regime is not symmetric with respect to the longitudinal pipe axis, which means that the volume fraction measurement is dependent on the disposition of the radiation source and the detector. In this regard, three configurations can be identified: (1) top-bottom, when the source is positioned directly above the gas phase side, and the detector is positioned directly below the water phase side, (2) bottom-top, when the source is positioned directly below the water phase side, and the detector is positioned above the gas phase side, and (3) side-by-side, obtained by turning either of the two previous configurations ±90 • .
In this work, a bottom-top configuration was considered for simulating the stratified regime. Figure 3 illustrates the bottom-top configuration of the stratified regime. Various volume fractions in the bottom-top configuration for the gas phase and oil phase can be modeled using Equations (3) and (4), respectively: where R, L 1 , L 2 , V gas , and V oil are the main pipe's internal radius, the water phase's level inside the main pipe, the oil phase's level inside the main pipe, the volume fraction of the gas phase, and the volume fraction of the oil phase, respectively. It is worthy of mention that the water volume fraction can be easily modeled inside the pipe after defining the gas and oil volume fractions. For the stratified regime, volume fraction ratios from 10% to 80% were also modeled. It was previously mentioned that all of the required data for presenting the appropriate models were obtained from the Monte-Carlo simulation. The MCNP simulation was validated using several experiments [31]. In experiments of [31], annular and stratified flow regimes were generated, and the correctness of particle (photon) transport in the simulated structure was confirmed. According to this benchmark, the data obtained from photon transport simulation in annular and stratified regimes were valid. All of the simulations were performed with very low error using the STOP card [28]. We defined the maximum relative error as 0.01 in this card, so the obtained outputs were negligible. It should be noted that there was no noise effect in the simulation.

Group Method of Data Handling (GMDH)
In recent years, artificial intelligence has been widely used in radiation-based measuring instruments [32][33][34][35][36][37][38][39]. In 1971, M.G. Ivakhnenko presented the Group Method of Data Handling (GMDH) [40] as a robust regression neural network. This kind of neural network is applicable in different areas such as prediction, knowledge discovery, deep learning, data mining, optimization, and pattern recognition. Self-organization is one of the advantages of this kind of network. In fact, the layer's number, neuron's number, effective inputs, and the network structure are obtained in a self-organized mode. In this method, the Kolmogorov-Gabor polynomial is used in order to obtain the relation between input and output, as follows: In Equation (5), x (x 1 , x 2 , . . . , x m ), a (a 1 , a 2 , . . . , a m ), and y are the input vector, coefficient vector, and output, respectively.
In this kind of neural network, new variables are produced from old variables. In the current investigation, the detector's extracted spectrum was split into 100 sections (count1, count 2 . . . and count 100), and these sections were applied to the GMDH neural network as 100 independent variables. Every two independent variables were used as a combination to model the system using Equation (6).
For all input variables, the error (differences between desired output and predicted output) is minimized by applying the regression techniques for computing the coefficients ci in (6). The combinations with high error rates are deleted, and the other combination outputs with a low error are considered new independent variables. This algorithm is followed until the final output with a minimum error rate is achieved. The GMDH approach has many benefits over other conventional regression tools. Using a GMDH approach adequate to the noise level of considered data, the model structure's optimal complexity is obtained. Additionally, the model structure is determined in a self-organized manner and automatically. The most accurate model will be obtained with this approach, and practical input variables are selected automatically. Moreover, using this approach, a precise and straightforward formula from the model is determined. The testing data were used for testing the performance of neural networks. In this paper, 25 samples (approximately 70%) and 11 samples (approximately 30%) of data were implemented to train and test each neural network, respectively.
GMDH was used to determine the gas fraction and water fraction of three-phase flows in annular and stratified regimes. It is clear that the oil fraction could be obtained simply by using the gas and water fractions. One hundred features were extracted from the registered spectrum in the transmitting sodium iodide crystal detector. The spectrum was divided into 100 sections, from 0 to 200 keV with the two keV steps. These features were named count 1 to count 100. The extracted features were applied as the inputs of the GMDH neural network. For both annular and stratified regimes, two different networks with gas fraction output and water fraction output were designed. Figure 4 indicates the structures of the four presented GMDH neural networks. According to the GMDH tool ability, each regime's obtained formulas and each output have been tabulated in Table 2.

Results and Discussion
Figures 5-8 show the fitting diagrams and regression diagrams for training and testing data sets. The figures illustrate the implemented networks' performance for gas fraction output in the annular regime, water fraction output in the annular regime, gas fraction output in stratified regime, and water fraction output in the stratified regime, respectively. The error of presented models for every test sample has been tabulated in Table 3. Root mean square error (RMSE) and mean relative error percentage (MRE%) were obtained using Equations (7) and (8) below to evaluate the proposed networks. Table 4 indicates RMSE and MRE% results.      The outputs of MCNP simulations were considered as the input data for presented GMDH models. The models were trained by 70% of the data and were tested by the rest of the data. Accordingly, the obtained results from Figures 5-8 show the presented models' accuracy and precision.
The low errors of the presented networks demonstrated the ability of an X-ray source and GMDH neural network as a powerful metering system for the oil, chemical, and petrochemical industries.

Conclusions
In this study, the combination of an X-ray tube and GMDH neural network was implemented to determine each phase's volume fractions in three-phase annular and stratified regimes. One hundred features were extracted from the registered spectrum in the transmitting sodium iodide crystal detector and applied to the networks as independent variables. Four different networks for both annular and stratified regimes and gas and water output were defined. Simple formulas for each regime and each output were obtained. The utilization of an X-ray source instead of different radioisotopes in three-phase flow meters has several benefits that support the present work's relevance. The relatively low errors of the proposed networks demonstrated the ability of an X-ray source and GMDH neural network as a promising metering system in three-phase flows. The obtained results indicate that the obtained measurement precision for the gas and water volume fractions in the present work were improved by more than two times compared to the previous study [17].
Although the applicability of the proposed technique has been investigated in this study for two main flow regimes (annular and stratified) of gas-oil-water three-phase flow, the same technique can be easily applied for actual experimental conditions and more types of flow regimes.