The oil and gas industry plays one of the most essential roles in global energy production. Where, due to the growth of the world population and the increase in energy consumption per capita, it is not surprising that there is an imbalance between the capacity to generate energy and care for the environment [1, 2]. Against this backdrop, there is an imperative interest in the development of advanced measurement techniques to obtain crucial data, such as the volumetric fraction of each phase of fluids transported through pipelines. This need for accuracy and efficiency in measurement becomes a focal point of research and development in the oil and gas industry, with the aim of optimizing production and ensuring a sustainable energy supply for the future. For these reasons, the use of techniques such as gamma-ray densitometry facilitates the collection of data such as holdup (liquid in-situ volumetric fraction), as this is a non-intrusive technique with high sensitivity and spatial resolution.
It has been defined that in horizontal pipes carrying two-phase flows, flow patterns are generated. These patterns have been divided into: smooth stratified, wavy stratified, bubble, slug, annular and dispersed. These flow patterns have been subject of study, where experiments have been carried out in horizontal tubes allowing the different flow patterns mentioned to be characterized, and good agreement between the results and the adopted flow pattern was observed (J.M. Mandhane, G.A. Gregory, K. Aziz) [3]. Consequently, one fundamental difference between single-phase and two-phase flow is that the latter has a moving and deformable interface, a conditions that makes it more complex to derive and solve the fundamental equations of continuity, momentum and energy [4].
The gamma densitometry technique is based on the interaction of gamma radiation emitted by a source with the atoms of the material. The absorbance of this radiation is directly related to the density of the material. For this reason, this technique has been widely used in the study of two-phase flows. Some studies have used this technique to analyze the intensity signals recorded by the detector in order to determine the void fraction and recognize the flow regime [5]. In another investigation, a two-energy transverse gamma-ray densitometer was used to determine phase distribution [6]. In some previous works the gamma-ray densitometry implemented to determine the phase fraction distribution and holdup [7, 13].
In recent research endeavors, the performance of various machine learning techniques has been showcased to predict two-phase flow parameters and properties. These techniques have emerged as new tools for tackling two-phase flow problems [14, 15]. Techniques such as the K-means clustering algorithm, single decision tree, probabilistic neural network, multilayer perceptron, radial basic function neural network, and support vector machine have been employed by [13, 16,17] for the identification of gas-liquid two-phase flow patterns in horizontal pipelines, and by [18] in vertical pipelines.
The present work is on the validation of a gamma-ray densitometer, with a homemade collimator, to obtain high-spatial sensitivity chordal data of a static two-phase system, and the development of an artificial neural network using a sequential model implemented to predict the holdup of gas-liquid two-phase flow in horizontal pipes.
2. MethodologyWe take advantage of the well-known ability of the gamma-ray densitometry technique to provide detailed measurements of phase fraction distribution. It is applied to obtain data from cross sections of ropes in a 2" id steel tube that is associated with the experimental equipment where the measurements were made. In addition, the capacity of neural network processing to predict behaviors from sets is studied. of complex data. We present a methodology that integrates both technologies, opening new Possibilities for the study, understanding and characterization of two-phase flows in various industrial contexts.
2.1 Collimated Gamma-Ray Densitometry
In the process of implementing the collimated gamma-ray densitometry technique, a displacement
system was developed, which allowed a sweep along the cross section of the tube, resulting in
chordal measurements. One can see in Figure 1 how the chordal measurement was performed along
the cross section of the tube. The equipment is composed of: a Cesium-137 (Cs137)
radioactive
source, a Thallium doped sodium iodide crystal detector, a homemade collimator with 0.5 mm
spacing, a LB 444-02 unit that allows the respective calibration of the equipment. It is
assembled to an automatic vertical displacement system, controlled by a driver module and a
stepper motor, thus allowing precision in the measurements and millimetric movements in the
sweep.
Figura 1. a) Representative diagram of the chordal measurement, and b) picture of real displacement system.
2.1.1 Law of attenuation. The data processing to determine the phase fraction distribution in a two-static-fluid system (water/air) was correlated with equation (1), which describes the radiation attenuation phenomenon,known as the attenuation law or Lambert-Beers law as presented by [19].
Where the term I_0 refers to the emission intensity of the source without any material between the source and the receiver, I represents the intensity measured by the receiver that was attenuated by the material, X is defined as the thickness of the absorbing material, and γ refers to the linear absorption coefficient, given by equation (2).
Where NA refers to the Avogadro's number (6.022x1023), AM represents the atomic mass number of the material and σ is the atomic absorption. From this law it is possible to obtain an expression to determine the gas fraction (εg), as presented in equation (3), and from this equation the liquid fraction (εw) can be obtained, equation (4).
2.1.2 Calibration curves. Before starting the experiments with the two fluids (water-air), it is necessary to determine the calibration curves for each of them as reported in the literature [20]. Therefore, sweeps were performed for the 100% water-filled tube and the 100% empty tube (air only) with the two fluids at atmospheric pressure. Therefore, in Figure 2 the calibration curves for each of the working fluids are presented. Where the curves are not superimposed on the upper part of the tube, as happened on the lower part, because there was a small difference in symmetry when making the measurements.
It is important to see that when there is a dense fluid such as water between the source and the receiver, the intensity is much more attenuated, compared to when there is a less dense fluid such as air. This means that the intensity measured for water (Iw) is lower than the intensity (Ig) measured for air (Ig>Iw).
2.2 Artificial neural network layout
Artificial Neural Network (ANN) can be used in different industrial areas and be applied to
fraction distribution measurement systems in two-phase flows. One of the most common neural
network types is the Backpropagation, based in a basic neural network, adding more hidden layers
and more neurons in each hidden layer, generating greater learning adaptation, generalization,
and robustness features. The structure of ANN is composed of different important parameters such
as the activation function (A.F.) as presented by [21], the
batch size (B.S), the number of hidden layers (No. H.L.),number of neurons in each hidden layer
(n), and the learning rate (L.R.), and the solver.
In this paper were used 3 different activation functions, such as ReLU (R), Sigmoid (S), and Tanh (T) to optimize the ANN models. These functions compare the input to a threshold value. Therefore, if the input value is greater than the threshold value, the neuron is activated. It’s disabled if the input value is less than the threshold value, which means its output isn’t sent on the next hidden layer. Activation functions are expressed in terms of the net input or neural network equation (I0), including synaptic weights(wij) and bias (bj), equation (5).
Where i represents the number of nodes, j a node of the hidden layer where I0 enters, and xi the inputs to node j or outputs of the immediately preceding layer.
The activation functions R, S and T are mathematically presented in equations (6), (7), and (8) , respectively.
The general architecture of a fully connected neural network is presented in Figure 3, where it is possible to identify that the model is a sequential one, structured with 3 inputs, composed of the intensity absorbed by the mixture, water cut, and h/D ratio, two hidden layers, and the output layer integrated by the predicted values of phase fraction distribution.
In Table 1 it is shown the proposed simulation matrix, including the solver, activation functions, batch size, number of hidden layers, number of neurons in each one, and the learning rate.
Tabla 1. Simulation matrix with different Artificial Neural Network structures.
The range of the number of hidden neurons were tentatively set between 10 and 100, while the solver was Adam and the learning rate took values from 0.001 and 0.01. It is important to mention that the structure and composition of the two hidden layers were identical.
The database of 110 data points was split into training and validation sets randomly. These two sets account 80% and 20% of the entire points, respectively.
2.3 Statistical parameters
The network training contains iterative internal calculations, and the neural network receives
the desired inputs together with the correct outputs for the specified inputs. The performance
is sensitive to the parameters defined in the artificial neural network layout section, and
measured taking into account the mean square error (MSE) and the mean absolute error (MAE),
defined in equations (9) and (10), respectively.
In which n represents the total number of data points, y is the holdup obtained by means of experiments, and y ̂is the ANN output representing the predicted holdup.
3. Results and DiscussionsThe sweeps to determine the phase fraction distribution were carried out from the top inner wall to the bottom inner wall. This was done for different water levels inside the pipe. The first experiment was performed with the pipe filled to 25% of its capacity with water, the next to 50% and the last to 75%. For each of these chordal measurements, 22 stops were made by the displacement system with a time of one minute for data acquisition each.
Having the sweepings done, equations (3) and (4) were implemented to determine the phase-fraction distribution along the pipe’s cross section. In Figure 4 one can see the curves of phase fraction distribution of water and air in steady case. The curves are divided into three regions: the zero value of εw is related to the less dense phase (air), the 1 value of εw is related more dense phase (water), and the third region with intermediate values of εw marks the position of the interface between the two fluids.
Based on the simulation matrix, thirty-six different structures were developed and tested, using ReLU, sigmoid and tanh activation function, two hidden layers and only one output with the holdup predicted values.
In the initial analysis, Table 2 showcases the outcomes derived from the configurations developed through the utilization of the ReLU activation function.
Tabla 2. Results obtained using the ReLU activation function.
The numerical values for Mean Squared Error (MSE) and Mean Absolute Error (MAE) in this initial set of simulations provide insight into the performance of the models during the training and validation phases. For models utilizing a learning rate of 0.001, specifically models 1-R, 3-R, 5-R, 7-R, 9-R, and 11-R, the MAE exhibits variations in the range of 0.036 to 0.057 during the training phase, with corresponding MSE values ranging from 0.006 to 0.012.
In the validation step, these models display MAE values ranging from 0.025 to 0.047, while the MSE values fall within the range of 0.001 to 0.004. These numerical outcomes illustrate the model performance with respect to error metrics across different learning rate scenarios.
For models structured with a learning rate of 0.01, it was determined that the models 2-R and 8-R exhibited the most optimal performance during both the training and validation phases.
Table 3 compares the results produced by the neural networks structured with the sigmoid activation function. The worst results were generated by model 5-S in both training and validation when using a learning rate of 0.001, while the best model was model 1-S, which produced average values for MAE and MSE of 0.1 and 0.02, respectively. Additionally, considering the poor performance of models 4-S and 2-S with a learning rate of 0.01, they were excluded from the selection of the ideal structure.
Tabla 3. Results obtained using the sigmoid activation function.
The implementation of the Tanh activation function resulted in better performance than that generated by the sigmoid function for the neural network structures developed with a learning rate of 0.001. It produced values that were 41% and 81% lower for MAE and MSE, respectively, compared to the values generated by model 1-S in both the training and testing phases. The results generated by the T models are presented in Table 4.
Tabla 4. Results obtained using the Tanh activation function.
Considering the overall results obtained with the sigmoid and tanh functions, their structures were discarded as they produced higher errors compared to models generated using the ReLU function.
In Table 5 it is provided an overview of the outcomes achieved by the two most successful models in this research, specifically models 2-R and 7-R.
Tabla 5. Results from models with the highest performance.
The model 2-R exhibits a MAE of 0.055 and MSE of 0.013 during the training phase, employing 10 neurons in each hidden layer and a learning rate (L.R.) of 0.01. While these values are considered acceptable, when compared to the results obtained by model 7-R, they appear relatively high. Model 7-R, on the other hand, achieved a remarkable 33% reduction in MAE and a 48% reduction in MSE. Furthermore, in the validation phase, a 32% reduction in MAE was observed along with a 0.01-fold increase in MSE.
The variations for the Loss function versus the number of epochs in the training and validation phases of the best model are presented in Figure 5. In this context, a notable reduction from its initial value of 0.3 during the training phase becomes apparent. This significant reduction results from the synergistic interplay of hyperparameters employed in the configuration of the 7-R model. Furthermore, it is noteworthy that a stabilization trend toward a value in proximity to zero is discernible throughout the validation phase.
Figura 5. Evolution of the Loss Function during the training and validation phases of Model 7-R.
The computer system used to develop the neural network models in python was a laptop with an 8th generation core i5+ processor, 32 GBytes of RAM and a 1 Tb solid state disk. The processing time for training and validation phases for the best predictive model was in total 14,23 seconds.
4. ConclusionsExperimental results of cross-sectional chordal phase-fraction distribution profiles obtained from a collimated gamma-ray densitometer are presented. Furthermore, an artificial neural network model was developed to predict volumetric fraction in a pipe system.
New phase fraction profiles of static fluids in a 2"-i.d pipe were collected with different water levels. A total of 110 experimental points were obtained, and they were used to implement the neural network, which took into account factors such as the intensity absorbed, the percentage of water content, and the dimensionless h/D ratio and the flow pattern is associated with the values obtained experimentally with the fluids evaluated.
The results demonstrate that the ANN model can predict volumetric-fraction values with MSE of 0.3% and MAE of 0.028 during the validation phase. These outcomes were achieved by configuring the neural network with the Adam solver, ReLU activation function, batch size of 3, two hidden layers, each containing 60 neurons, and a learning rate of 0.001.
The results demonstrate that the ANN model can predict volumetric-fraction values with MSE of 0.3% and MAE of 0.028 during the validation phase. These outcomes were achieved by configuring the neural network with the Adam solver, ReLU activation function, batch size of 3, two hidden layers, each containing 60 neurons, and a learning rate of 0.001.
5. AcknowledgmentsThe authors thank USP (University of São Paulo), CNPq (process 311057/2020-9), PETROBRAS and ANP for funding part of the project.
[1] C. J. Noriega-Sánchez. “Una revisión de fluidos de trabajo de tipo mezclas para ciclos de potencia de baja temperatura y su modelado termodinámico.” Revista Ingenio, vol. 18, n.º 1, pp. 62–69, ene. 2021. Doi: https://doi.org/10.22463/2011642X.2340
[2] E. Espinel-Blanco, E. N. Flórez-Solano y J. E. Barbosa-Jaimes. “Estudio para la generación de energía por un sistema con paneles solares y baterías.” Revista Ingenio, vol. 17, n.º 1, pp. 9–14, 2020. Doi: https://doi.org/10.22463/2011642x.2392
[3] Z. Dang, Z. Yang, X. Yang y M. Ishii. “Experimental study of vertical and horizontal two-phase pipe flow through double 90 degree elbows.” International Journal of Heat and Mass Transfer, vol. 120, pp. 861–869, 2018. Doi: 10.1016/j.ijheatmasstransfer.2017.11.089
[4] A. M. Quintino, R. da Fonseca Junior y O. M. H. Rodriguez. “Experimental study of liquid/dense-gas pipe flow.” Geoenergy Science and Engineering, vol. 230, nov. 2023. Doi: 10.1016/j.geoen.2023.212179
[5] R. Hanus, M. Zych, V. Mosorov, A. Golijanek-Jędrzejczyk, M. Jaszczur y A. Andruszkiewicz. “Evaluation of liquid-gas flow in pipeline using gamma-ray absorption technique and advanced signal processing.” Metrology and Measurement Systems, 2021. Doi: 10.24425/mms.2021.135997
[6] A. Shmueli, T. E. Unander y O. J. Nydal. “Characteristics of gas/Water/Viscous oil in stratified-Annular horizontal pipe flows.” Offshore Technology Conference, 2015, pp. 1085–1102. Doi: 10.4043/26176-ms
[7] S. H. Stavland, C. Satre, B. T. Hjertaker, S. A. Tjugum, A. Hallanger y R. Maad. “Gas fraction measurements using single and dual beam gamma-densitometry for two phase gas-liquid pipe flow.” IEEE I2MTC 2019, vol. 2019-May, pp. 1–6, 2019. Doi: 10.1109/I2MTC.2019.8827056
[8] Y. Pan, C. Li, Y. Ma, S. Huang y D. Wang. “Gas flow rate measurement in low-quality multiphase flows using Venturi and gamma ray.” Experimental Thermal and Fluid Science, vol. 100, pp. 319–327, 2019. Doi: 10.1016/j.expthermflusci.2018.09.017
[9] G. H. Roshani, A. Karami, E. Nazemi y C. M. Salgado. “Flow regimes classification and prediction of volume fractions of the gas-oil-water three-phase flow using Adaptive Neuro-fuzzy Inference System.” pp. 17–27, 2020.
[10] S. Vestøl, W. A. S. Kumara y M. C. Melaaen. “Gamma densitometry measurements of gas/liquid flow with low liquid fractions in horizontal and inclined pipes.” International Journal of Computational Methods and Experimental Measurements, vol. 6, n.º 1, pp. 120–131, 2018. Doi: 10.2495/CMEM-V6-N1-120-131
[11] N. M. A. Mohamed. “Dual displacer-gamma ray system for level measurement of fluids-interface in oil separator.” Radiation Physics and Chemistry, vol. 184, jul. 2021. Doi: 10.1016/j.radphyschem.2021.109453
[12] C. Ferreira. “Detecção de alargamento de anular em dutos frexíveis usando A técnica de transmissão de radiação gama.” Tese (Doutorado), UFRJ, 2021.
[13] L. O. Zampereti, A. M. Quintino y O. M. H. Rodriguez. “Data-Driven Machine Learning Applied to Liquid-Liquid Flow Pattern Prediction.” 2022, pp. 123–129.
[14] A. M. Quintino, D. L. L. N. da Rocha, R. Fonseca Jr. y O. M. H. Rodriguez. “Flow Pattern Transition in Pipes Using Data-Driven and Physics-Informed Machine Learning.” Journal of Fluids Engineering, vol. 143, n.º 3, pp. 1–11, oct. 2020. Doi: 10.1115/1.4048876
[15] P. B. Bazon, J. E. Castro-Bolivar, C. M. Ruiz-Diaz, M. M. Hernández-Cely y O. M. H. Rodriguez. “Hybrid machine learning model applied to phase inversion prediction in liquid-liquid pipe flow.” Multiphase Science and Technology, vol. 35, n.º 1, pp. 35–53, 2023. Doi: 10.1615/MultScienTechn.2022046139
[16] R. Hanus, M. Zych, M. Kusy, M. Jaszczur y L. Petryka. “Identification of liquid-gas flow regime in a pipeline using gamma-ray absorption technique and computational intelligence methods.” Flow Measurement and Instrumentation, vol. 60, pp. 17–23, abr. 2018. Doi: 10.1016/j.flowmeasinst.2018.02.008
[17] J. Ambrosio, A. Lazzaretti, D. Pipa y M. da Silva. “Two-phase flow pattern classification based on void fraction time series and machine learning.” Flow Measurement and Instrumentation, vol. 83, p. 102084, 2022. Doi: 10.1016/j.flowmeasinst.2021.102084
[18] C. Gomez, D. Ruiz y M. Cely. “Specialist system in flow pattern identification using artificial neural Networks.” Journal of Applied Engineering Science, vol. 21, n.º 2, pp. 285–299, ene. 2023. Doi: 10.5937/jaes0-40309
[19] G. Elseth. An Experimental Study of Oil / Water Flow in Horizontal Pipes. Tesis doctoral, The Norwegian University of Science and Technology, 2001.
[20] W. A. S. Kumara, B. M. Halvorsen y M. C. Melaaen. “Single-beam gamma densitometry measurements of oil-water flow in horizontal and slightly inclined pipes.” 2010. Doi: 10.1016/j.ijmultiphaseflow.2010.02.003
[21] K. Vijayaprabakaran y K. Sathiyamurthy. “Towards activation function search for long short-term model network: A differential evolution based approach.” Journal of King Saud University - Computer and Information Sciences, 2020. Doi: 10.1016/j.jksuci.2020.04.015