A method for identifying a gas-liquid two-phase transient flow pattern

CN118781337BActive Publication Date: 2026-09-15UNIV OF ELECTRONICS SCI & TECH OF CHINA
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410857957.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2026-09-15
Estimated Expiration
2044-06-28

AI Technical Summary

Technical Problem

[0006]现有的气液两相流的流型识别都是基于定常流动进行流型分析,很少有涉及对气液两相瞬态流的流型研究

Benefits of technology

[0020] The beneficial effects of this invention are: This invention proposes a method for identifying the flow pattern of gas-liquid two-phase transient flow, which combines traditional image processing technology with the ResNet model based on convolutional neural networks and applies it to the flow pattern of transient flow, effectively improving the efficiency and accuracy of flow pattern identification for transient flow.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118781337B_ABST
    Figure CN118781337B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on convolutional neural network's gas-liquid two-phase transient flow's flow pattern identification method.First, the picture of gas-liquid two-phase transient flow is shot by high-speed camera, and bubble image sequence in transient flow process is collected;Second, the image is preprocessed, and bubble is segmented and contour reconstruction using motion target detection algorithm and fitting, and bubble morphology is obtained;Again, the radius, area and volume of single bubble change with time are obtained by tracking bubble, the curve of gas holdup changes with time is obtained, and flow pattern is divided, and dataset is made;Finally, ResNet model is used for training and testing, and the flow pattern category of the gas-liquid two-phase transient flow to be detected is output.The application applies ResNet model based on convolutional neural network to the flow pattern of gas-liquid two-phase transient flow, improves the flow pattern identification efficiency of transient flow.Mastering the flow pattern change rule of gas-liquid two-phase transient flow is of great significance to improve its modeling accuracy and reveal its physical characteristics.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of fluid measurement technology and flow pattern recognition technology, and is particularly applicable to the identification of flow patterns in transient two-phase gas-liquid flow in transparent pipelines. Background Technology

[0002] When a pipeline with stable flow suddenly experiences a valve closure or equipment malfunction causing a momentary change in flow rate, the pressure within the pipeline fluctuates instantaneously, resulting in pressure pulsation and a transient process. This transient process leads to continuous pressure increases and decreases within the pipeline, impacting the pipeline and potentially causing damage. Transient processes are often accompanied by the generation of bubbles and cavitation, creating different flow patterns. When these bubbles travel to high-pressure areas, they burst, causing the fluid to impact the original bubble location at high speed, eroding the pipeline material – a phenomenon known as cavitation. Therefore, understanding the changing flow patterns in transient two-phase gas-liquid flows in horizontal pipelines is crucial for improving modeling accuracy, revealing physical characteristics, and reducing pipeline cavitation to maintain the normal operation of pipeline systems.

[0003] Due to the sudden closure of the valve, the transient flow pattern of the gas-liquid two-phase flow changes over time, continuously transitioning between bubbly flow, bubbly-slug transition flow, and slug flow. Bubble flow refers to the flow in which the liquid phase medium contains dispersed bubbles; slug flow refers to the flow in which small bubbles aggregate into large bubbles as the gas flow rate increases, with the large bubbles separated by the liquid phase, while many small bubbles are also present; and bubbly-slug transition flow is an intermediate state between these two states.

[0004] Extensive research has been conducted both domestically and internationally on methods for identifying flow patterns in gas-liquid two-phase flows. These methods include flow pattern mapping, direct measurement, and indirect measurement. Flow pattern mapping involves collecting a large amount of experimental data through numerous repeated experiments, combining this data with relevant flow parameters, and then summarizing the data to obtain the corresponding flow pattern. Direct measurement methods determine the flow pattern based on the flow state of the two-phase flow itself, including visual inspection, high-speed photography, X-ray measurement, and probe measurement. Because direct measurement methods are highly subjective, indirect measurement methods have been developed for flow pattern identification. Indirect measurement methods mainly include differential pressure signal methods, process tomography, and artificial intelligence methods.

[0005] In recent years, in the field of deep learning image recognition, various convolutional neural networks, after training, have been able to effectively identify different categories of images and exhibit good performance, such as VGGNet, ResNet, and GoogLeNet. ResNet, as a classic image classification algorithm, is particularly suitable for manifold identification in gas-liquid two-phase transient flows.

[0006] Existing flow pattern identification methods for gas-liquid two-phase flows are all based on steady flow analysis, with very few studies addressing the flow patterns of transient gas-liquid two-phase flows. Therefore, methods for flow pattern identification based on transient gas-liquid two-phase flows require further research. Summary of the Invention

[0007] The present invention aims to solve the above problems and provide a highly efficient and accurate method for identifying the flow pattern of gas-liquid two-phase transient flow based on convolutional neural networks.

[0008] To solve the above-mentioned technical problems, the technical solution of the present invention is as follows: a high-speed camera is used to acquire images of gas-liquid two-phase transient flow in a pipeline system; image processing is performed on the acquired bubble images to obtain the gas content change, and a threshold is set to classify the flow patterns, and a dataset is created and expanded; a ResNet model based on a convolutional neural network is used for training and testing, and the flow pattern category of the gas-liquid two-phase transient flow to be detected is output.

[0009] Preferably, the piping system includes a water tank, flow meter, valve seat, electromagnetic coil, valve, centrifugal water pump, return water pipe, high-speed camera, and computer. The water tank provides constant pressure, the sudden closure of the valve causes transient flow, the flow meter measures the volumetric flow rate of the return water pipe, the centrifugal water pump operates to drive water flow, the return water pipe maintains constant pressure throughout the experiment, and valves 1-4 change the pipe connection method to achieve the movement and retrieval of the ball. At the beginning of the experiment, if... Figure 2 As shown, open valves 1 and 4, close valves 2 and 3, and turn on the motor. After the water flow stabilizes, release a small steel ball from the water tank. Driven by the water flow, the ball moves to the valve seat and is attracted by the electromagnet, simulating the rapid closing of the valves. At the instant the valves close, a transient two-phase flow process occurs in the water supply pipeline. After the experiment, as shown... Figure 3 As shown, open valves 2 and 3, close valves 1 and 4, turn on the motor, draw the water in the pipeline back to the water tank and retrieve the small ball.

[0010] Preferably, the high-speed camera is a Lightning RDT. TM The device has a resolution of 16, 4GB of storage, a maximum image resolution of 1280×1024, and a shooting speed of 500fps at the maximum resolution. During the experiment, images of the entire transient flow process were captured at a resolution of 512×100 pixels and a shooting speed of 5000fps.

[0011] Preferably, the image processing operation on the acquired bubble image is as follows:

[0012] First, median filtering is used to denoise the acquired bubble image to remove isolated noise points;

[0013] Then, grayscale transformation is used to perform image enhancement on the acquired bubble image to enhance the contrast between the foreground and the background;

[0014] A moving target detection algorithm based on Gaussian mixture model is used to detect moving bubbles in the bubble image sequence. The pixel values ​​of moving bubbles in the binary image are set to 1, and the pixel values ​​of static background are set to 0.

[0015] Then, the watershed segmentation algorithm is used to segment the overlapping bubbles and separate the bubbles.

[0016] The segmented bubbles are reconstructed using roundness fitting and ellipse fitting to obtain the true bubble shape.

[0017] Finally, the inter-frame difference method is used to track each bubble, obtain various properties of each bubble, and acquire parameters such as area, radius and volume of each bubble as a function of time, so as to obtain the gas content curve of the transparent pipe as a function of time.

[0018] Preferably, the process of classifying flow patterns and creating and expanding the dataset specifically involves first classifying the flow patterns into bubble flow, slug flow, and bubble-slug transition flow to create a dataset. Then, data augmentation techniques are used to expand the bubble images for different flow patterns. Combining the characteristics of bubble size and distribution for each flow pattern, operations such as brightness transformation, Gaussian noise, and vertical symmetry transformation are added to the bubble images of different flow pattern categories to increase the amount of data and ensure its usability and breadth. Finally, the dataset is divided into a training set and a test set at an 8:2 ratio.

[0019] Preferably, during the training of the ResNet model based on a convolutional neural network, the preprocessing of the bubble image involves scaling the shortest side without changing the aspect ratio of the original image, then cropping the image to 224×224 pixels using center cropping, and finally standardizing the image. The preprocessed bubble image is first processed by convolution, then by Batch Normalization, and finally by ReLU activation to obtain a new feature matrix. The above steps are repeated for the feature matrix to update it. Finally, the feature matrix is ​​passed through an adaptive average pooling layer, flattened, and then input into a fully connected layer to obtain the manifold category corresponding to the image.

[0020] The beneficial effects of this invention are: This invention proposes a method for identifying the flow pattern of gas-liquid two-phase transient flow, which combines traditional image processing technology with the ResNet model based on convolutional neural networks and applies it to the flow pattern of transient flow, effectively improving the efficiency and accuracy of flow pattern identification for transient flow. Attached Figure Description

[0021] Figure 1This is a flowchart of a method for identifying transient flow patterns in gas-liquid two-phase flow provided by the present invention;

[0022] Figure 2 This is a schematic diagram of the experimental principle and the ball release process of the present invention;

[0023] Figure 3 This is the ball recovery process of the present invention; Detailed Implementation

[0024] The present invention will be further described below with reference to the accompanying drawings and specific embodiments:

[0025] This invention discloses a method for identifying the flow pattern of a gas-liquid two-phase transient flow. Please refer to [link / reference]. Figure 1 The flowchart shown illustrates that the method includes the following steps:

[0026] Step 1, according to Figure 2 The experimental principle diagram illustrates the construction of the experimental pipeline system. This system includes a water tank, flow meter, valve seat, electromagnetic coil, valves, centrifugal water pump, return water pipeline, high-speed camera, and computer. The water tank provides constant pressure. A sudden valve closure causes a transient process. The flow meter measures the volumetric flow rate of the return water pipeline. The centrifugal water pump operates, driving water flow. The return water pipeline maintains constant pressure throughout the experiment. Valves 1-4 change the pipeline connection method to achieve the movement and retrieval of the small ball. At the start of the experiment, valves 1 and 4 are opened, valves 2 and 3 are closed, and the motor is turned on. After the water flow stabilizes, a small steel ball is released from the water tank. Driven by the water flow, the ball moves to the valve seat and is attracted by the electromagnetic adhesive, simulating the rapid valve closure process. At the instant the valves close, a gas-liquid two-phase transient flow process occurs in the water supply pipeline. At this time, a high-speed camera captures the transient flow image at the transparent pipe. After the experiment, valves 2 and 3 are opened, valves 1 and 4 are closed, and the motor is turned on to draw water back into the water tank and retrieve the small ball.

[0027] Step 2: Preprocess the acquired bubble images. First, median filtering is used to reduce noise and remove isolated noise points. Grayscale transformation is then used to enhance the image, increasing the contrast between the foreground and background. Next, a Gaussian mixture model is used to detect moving bubbles, setting the pixel value of moving bubbles to 1 and the pixel value of static background to 0, resulting in a binary image. A watershed segmentation algorithm is then used to segment overlapping bubbles. Circular and elliptical fitting are then used to reconstruct the contours of the segmented bubbles, yielding a more realistic bubble shape. Finally, inter-frame difference is used to track each bubble, obtaining its time-varying attributes such as area, radius, and centroid, resulting in a time-varying gas content curve in the transparent pipe.

[0028] Step 3: Based on the gas content, thresholds are set to classify three flow patterns: bubbly flow, bubbly-slug transition flow, and slug flow. Data augmentation techniques are then used to expand the bubble images for each flow pattern. Combining the bubble size and distribution characteristics of each flow pattern, brightness transformation, Gaussian noise, and vertical symmetry transformation are applied to the bubble images of different flow pattern categories to increase the dataset size and ensure its usability and breadth. The transient flow images of different flow patterns are then labeled, and the bubble image dataset is randomly divided into training and testing sets in an 8:2 ratio. The testing set is not used for training but only for subsequent validation.

[0029] Step 4: Construct a ResNet model based on a convolutional neural network, using the dataset obtained in the previous steps as the training set for this neural network. The ResNet model includes: convolutional layers, max-pooling layers, five consecutive residual structure layers, average pooling downsampling layers, and fully connected layers. The ReLU activation function is applied to the output of the convolutional layers. Batch Normalization is used to standardize the data between the convolutional layers and the activation function. The Softmax activation function is selected and applied to the output layer. Finally, the argumentmax function is used to obtain the index corresponding to the maximum value, outputting the manifold corresponding to the image and the probability of that manifold.

[0030] In this model, the ReLU activation function enhances the network's non-linearity while avoiding the gradient explosion and vanishing problems during training. The mathematical expression for the ReLU activation function is:

[0031] f(x b ) = max(0, x b )

[0032] Where, x b This is the input feature matrix for the bubble image.

[0033] Applying Batch Normalization between the convolutional layer and the ReLU activation function accelerates network convergence and improves accuracy. The specific calculation process of Batch Normalization is as follows:

[0034]

[0035]

[0036]

[0037]

[0038] in It is the input feature matrix of a batch of bubble images, where μ and σ are respectively... The mean and variance of all elements are given, ε is a very small number to avoid cases where the denominator is 0, and γ and β are the learning rates obtained through backpropagation. It is the output feature matrix after Batch Normalization.

[0039] The Softmax activation function is selected and applied to the output layer. Each neuron is normalized so that the output manifold probabilities for different categories in each bubble image conform to a probability distribution. The mathematical expression for the Softmax activation function is:

[0040]

[0041] Where, x b This is the input feature matrix for the bubble image.

[0042] Specifically, in this manifold recognition method, the ResNet34 model is selected, and its construction and training process is as follows:

[0043] First, the bubble image is preprocessed by scaling the shortest side without changing the aspect ratio of the original image. Then, the image size is cropped to 224×224 using center cropping and normalization is performed.

[0044] Then, the pre-processed bubble image of size 224×224 is input into convolutional layer 1 with kernel size of 7×7 and stride of 2 to obtain an output feature matrix of 112×112.

[0045] The feature matrix is ​​then input into a pooling layer with a kernel size of 3×3 and a stride of 2, and a convolutional layer 2 with three residual layers to obtain a 56×56 output feature matrix.

[0046] The feature matrix is ​​then input into a convolutional layer 3 with four residual layers to obtain a 28×28 output feature matrix;

[0047] Then the output feature matrix is ​​used as the input feature matrix of the next convolutional layer, which is input into a convolutional layer 4 with six residual layers to obtain a 14×14 feature matrix;

[0048] The feature matrix is ​​then input into a convolutional layer 5 with three residual layers to obtain a 7×7 output feature matrix;

[0049] The output feature matrix is ​​then fed into an adaptive average pooling layer, flattened, and then fed into a fully connected layer.

[0050] Finally, the Softmax activation function is applied to the output layer to normalize each neuron, so that the probability output of different class manifolds for each image satisfies the probability distribution.

[0051] Step 5: Input the test set obtained in the above steps into the trained convolutional neural network model for testing. Importing the test set into the input layer of ResNet allows for rapid evaluation. Through multiple iterations and adjustments to the model parameters, the model can better fit the features of the dataset, improving segmentation accuracy. Finally, the evaluation value for each manifold category of each image is in the range of 0 to 1. The category with the highest threshold is the manifold corresponding to that bubble image.

[0052] This invention proposes a method for identifying the flow patterns of transient gas-liquid two-phase flows, which can improve the modeling accuracy and reveal the physical characteristics of the flow. This is of great significance for reducing pipeline cavitation and maintaining the normal operation of pipeline systems.

[0053] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.

Claims

1. A method for identifying the flow pattern of a gas-liquid two-phase transient flow, characterized in that... It includes the following steps: Step 1: Construct a transient flow pipeline system. Use a high-speed camera to photograph the transparent pipe and capture images of the gas-liquid two-phase transient flow at the moment the valve is closed. Obtain the image sequence of bubbles during the transient flow process. By changing the initial flow rate multiple times, different bubble image sequences can be obtained. Step 2: First, preprocess the acquired bubble image. Median filtering is selected to reduce noise in the bubble image, and grayscale transformation is selected to enhance the image. Then, the moving target detection algorithm of Gaussian mixture model is selected to detect bubbles. The watershed segmentation algorithm is used to segment the sticky and overlapping bubbles. The outline of the segmented bubbles is reconstructed by circular fitting and ellipse fitting to obtain a more realistic bubble shape. Then, the inter-frame difference method is used to track the bubbles, extract the bubble radius, area, and volume, and obtain the gas content curve corresponding to each image; Step 3: Based on the gas content, a threshold is set to classify three flow patterns: bubble flow, bubble-slug transition flow, and slug flow. To further increase the number of flow pattern datasets and ensure their usability and breadth, data augmentation techniques are used to expand the images. Combining the bubble characteristics of each flow pattern, brightness transformation, Gaussian noise, and vertical symmetry transformation are added to the bubble images of different flow pattern categories to increase the dataset size. The transient flow images of different flow patterns are labeled to create a dataset, and then the dataset is randomly divided into training and test sets in an 8:2 ratio. Step 4: Build a ResNet model based on a convolutional neural network, and use the training set obtained in the above steps as the training set for training the network. Step 5: Input the test set obtained in the above steps into the trained convolutional neural network model for testing, and output the manifold of the bubble image to be detected, so as to achieve the purpose of quickly identifying the manifold. The ResNet model, based on a convolutional neural network, includes: convolutional layers, max pooling layers, five residual structure layers, average pooling downsampling layers, and fully connected layers. The ResNet model uses the ReLU activation function on the output of the convolutional layers, and performs Batch Normalization to standardize the data between the convolutional layers and the activation function. The Softmax activation function is used on the output layer to normalize each neuron, ensuring that the manifold probabilities of different categories in each image conform to a probability distribution. Finally, the argmax function is used to obtain the index corresponding to the maximum value, outputting the manifold corresponding to the image and its probability. The goal is to ensure that a batch of feature maps follows a distribution with a mean of 0 and a variance of 1.

2. The method for identifying transient flow patterns in gas-liquid two-phase flow according to claim 1, characterized in that: The high-speed camera mentioned is a Lightning RDT. TM / 16, with 4GB of storage memory, a maximum shooting resolution of 1280×1024 pixels, and a shooting speed of 500fps when shooting at the maximum resolution; during the experiment, images of the entire transient flow process were captured at a resolution of 512×100 pixels and a shooting speed of 5000fps.

3. The method for identifying transient gas-liquid two-phase flow patterns according to claim 1, characterized in that: The ratio of the training set to the test set is 8:2, with the test set not participating in training but only used for subsequent verification.

4. The method for identifying transient flow patterns in gas-liquid two-phase flow according to claim 1, characterized in that: Steps 1 and 2 are performed on the MATLAB platform, while steps 4 and 5 are performed on the PyCharm platform using the PyTorch framework.

Citation Information

Patent Citations

  • Spatial target ISAR image classification method under small sample condition based on XGBoost optimized by multiple learners

    CN114219960A

  • KR20190066292A