https://doi.org/10.22463/2011642X.4098
Recibido: May 30, 2023 - Aprobado: November 01, 2023
How cite:
C. E. Álvarez-Pacheco, C. M. Ruiz-Diaz y O. M. Hernández-Rodriguez, “Chordal measurement of phase fraction distribution in a static gas-liquid system using collimated gamma-ray densitometer and artificial neural networks”, Rev. Ingenio, vol. 21, n°1, pp. , 2024, doi: https://doi.org/10.22463/2011642X.4098
Two-phase flow occurs in various industries, as in the production of oil and gas. A collimated gamma-ray densitometer is applied for the study of a static gas-liquid system that simulates a stratified flow pattern. It stands out for its non-intrusive measurement capacity, its high sensitivity to density variations and its good spatial resolution. Chordal phase fraction distributions are obtained in a tube containing water and air at room conditions, with the water level varied between 25%, 50% and 75%. The results obtained highlight the usefulness of the collimated gamma-ray densitometer to determine phase fraction distributions along the pipe’s cross section. Furthermore, this study suggests the use of an artificial neural network (ANN) model for predicting holdup in pipeline systems using a dataset of 110 experimental data points. The ANN model considers factors such as absorbed intensity, water cut percentage, and dimensionless h/D ratio. The adopted configuration includes the use of the Adam solver, Rectified Linear Unit (ReLU) activation function, a batch size of 3, two hidden layers (60 neurons each), and a learning rate of 0.001. The model achieves good accuracy, with a minimum mean square error (MSE) of 0.3% and a low mean absolute error (MAE) of 0.028.
Keywords:Collimated gamma-ray densitometer, Phase fraction distribution, two-phase flow, Artificial neural network.
Flujos bifásicos ocurren en diversas industrias, destacando la de petróleo y gas. Un densitómetro de rayos-gamma colimado es utilizado para estudiar un sistema estático gas-líquido que simula un flujo bifásico en el patrón estratificado. El equipo se destaca por su capacidad de medición no intrusiva, su alta sensibilidad y su buena resolución espacial. Distribuciones cordales de fracción de fase en un tubo conteniendo agua y aire son presentadas y se varió el nivel de agua entre 25%, 50% y 75%. Se determinó a distribución de fracción de fase a lo largo de la sección transversal. Además, este estudio presenta un modelo de red neuronal artificial (ANN) para predecir fracción volumétrica en sistemas de tuberías utilizando un conjunto de datos de 110 puntos experimentales. El modelo ANN considera factores como la intensidad absorbida, el porcentaje de corte de agua y la relación h/D. La configuración incluye el uso del solucionador Adam, la función de activación de Unidad lineal rectificada (ReLU), tamaño de lote de 3, dos capas ocultas (60 neuronas cada una) y una tasa de aprendizaje de 0,001. El modelo logra un error cuadrático medio (MSE) mínimo del 0,3 % y un error absoluto medio (MAE) bajo de 0,028.
Palabras clave: Densitómetro de rayos-gamma colimados, Distribución de fracción de fase, Flujo bifásico, Red neural artificial.
1. IntroductionIt 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.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 ).
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.[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", Rev. 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, and J. E. Barbosa-Jaimes, “Estudio para la generación de energía por un sistema con paneles solares y baterías,” Rev. Ingenio, vol. 17, no. 1, pp. 9–14, 2020, doi: https://doi.org/10.22463/2011642x.2392
[3] Z. Dang, Z. Yang, X. Yang, and M. Ishii, “Experimental study of vertical and horizontal two-phase pipe flow through double 90 degree elbows,” Int. J. Heat Mass Transf., vol. 120, pp. 861–869, 2018, doi: 10.1016/j.ijheatmasstransfer.2017.11.089.
[4] A. M. Quintino, R. da Fonseca Junior, and O. M. H. Rodriguez, “Experimental study of liquid/dense-gas pipe flow,” Geoenergy Sci. Eng., vol. 230, Nov. 2023, doi: 10.1016/j.geoen.2023.212179
[5] R. Hanus, M. Zych, V. Mosorov, A. Golijanek-Jędrzejczyk, M. Jaszczur, and A. Andruszkiewicz, “Evaluation of liquid-gas flow in pipeline using gamma-ray absorption technique and advanced signal processing,” Metrol. Meas. Syst., 2021, doi: 10.24425/mms.2021.135997.
[6] A. Shmueli, T. E. Unander, and O. J. Nydal, “Characteristics of gas/Water/Viscous oil in stratified-Annular horizontal pipe flows,” in 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, and R. Maad, “Gas fraction measurements using single and dual beam gamma-densitometry for two phase gas-liquid pipe flow,” I2MTC 2019 - 2019 IEEE Int. Instrum. Meas. Technol. Conf. Proc., vol. 2019-May, pp. 1–6, 2019, doi: 10.1109/I2MTC.2019.8827056
[8] Y. Pan, C. Li, Y. Ma, S. Huang, and D. Wang, “Gas flow rate measurement in low-quality multiphase flows using Venturi and gamma ray,” Exp. Therm. Fluid Sci., vol. 100, no. September 2018, pp. 319–327, 2019, doi: 10.1016/j.expthermflusci.2018.09.017
[9] G. H. Roshani, A. Karami, E. Nazemi, and 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, and M. C. Melaaen, “Gamma densitometry measurements of gas/ liquid flow with low liquid fractions in horizontal and inclined pipes,” Int. J. Comput. Methods Exp. Meas., vol. 6, no. 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,” 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, and 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., and O. M. H. Rodriguez, “Flow Pattern Transition in Pipes Using Data-Driven and Physics-Informed Machine Learning,” J. Fluids Eng., vol. 143, no. 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, and O. M. H. Rodriguez, “Hybrid machine learning model applied to phase inversion prediction in liquid-liquid pipe flow,” Multiph. Sci. Technol., vol. 35, no. 1, pp. 35–53, 2023, doi: 10.1615/MultScienTechn.2022046139.
[16] R. Hanus, M. Zych, M. Kusy, M. Jaszczur, and L. Petryka, “Identification of liquid-gas flow regime in a pipeline using gamma-ray absorption technique and computational intelligence methods,” Flow Meas. Instrum., vol. 60, pp. 17–23, Apr. 2018, doi: 10.1016/j.flowmeasinst.2018.02.008
[17] J. Ambrosio, A. Lazzaretti, D. Pipa, and M. da Silva, “Two-phase flow pattern classification based on void fraction time series and machine learning,” Flow Meas. Instrum., vol. 83, no. December 2020, p. 102084, 2022, doi: 10.1016/j.flowmeasinst.2021.102084
[18] C. Gomez, D. Ruiz, and M. Cely, “Specialist system in flow pattern identification using artificial neural Networks,” vol. 21, no. 2, pp. 285–299, Jan. 2023, doi: 10.5937/jaes0-40309.
[19] G. Elseth, “An Experimental Study of Oil / Water Flow in Horizontal Pipes,” [Thesis (Doctoral) The Norwegian University of Science and Technology], 2001.
[20] W. A. S. Kumara, B. M. Halvorsen, and M. C. Melaaen, “Single-beam gamma densitometry measurements of oil-water flow in horizontal and slightly inclined pipes,”Jun. 2010, doi: 10.1016/j.ijmultiphaseflow.2010.02.003.
[21] K. Vijayaprabakaran and K. Sathiyamurthy, “Towards activation function search for long short-term model network : A differential evolution based approach,” J. King Saud Univ. - Comput. 2020, doi: 10.1016/j.jksuci.2020.04.015
* Magíster.Correo:cristhianeap@usp.br
** Magíster.Correo: carlosruiz978@usp.br
*** Doctor. Correo: oscarmhr@sc.usp.br