Flow pattern identification method, system and equipment based on dynamic flow pattern sample and medium
By constructing an electric field-flow field coupling model and a BPNN neural network optimized by genetic algorithm, dynamic flow pattern samples are used to identify oil-water two-phase flow patterns, which solves the problem of insufficient model generalization ability caused by static samples in existing technologies and achieves higher recognition accuracy and adaptability.
Patent Information
- Application Number
- CN202510693404.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-12
AI Technical Summary
Existing machine learning methods rely on static flow pattern samples in oil-water two-phase flow pattern identification, resulting in a large gap with actual industrial flow patterns and weak model generalization ability.
By constructing an electric field-flow field coupling model to simulate the flow state of oil-water two-phase flow, array electrodes are used to obtain dynamic flow pattern samples, and the BPNN neural network optimized by genetic algorithm is used for flow pattern identification.
The accuracy and generalization ability of flow pattern recognition are improved, which can better adapt to the flow pattern changes in industrial environments and meet practical application needs.
Smart Images

Figure CN120632673A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of oil-water two-phase flow pattern identification, and in particular to a flow pattern identification method, system, equipment and medium based on dynamic flow pattern samples. Background Art
[0002] In the field of oil extraction, oil-water two-phase flow is a common and complex phenomenon, encompassing various flow patterns, including stratified flow, bubbly flow, annular flow, and core flow. Different flow patterns exhibit significant differences in physical parameters such as the spatial distribution of oil and water, flow rate, and phase holdup. These differences directly impact the efficiency of the extraction process, the stability of equipment operation, and the profitability of crude oil production. Therefore, accurate flow pattern identification is not only a key technology for improving oil extraction efficiency but also an essential foundation for achieving refined management and intelligent control in the oil industry.
[0003] Currently, methods for identifying oil-water two-phase flow patterns are mainly divided into two categories: image processing and signal processing. Image processing methods use high-speed photography equipment or electrical tomography to obtain image data of fluid flow, and then use image grayscale processing, threshold segmentation and other means, combined with algorithms to identify flow patterns. This method can intuitively reflect the distribution state of the fluid, but it has high requirements for image processing technology and is not effective in identifying certain flow patterns. In particular, when the flow pattern is more complex or the environmental conditions vary greatly, the limitations of image processing methods are more obvious. In contrast, signal processing methods have become the mainstream in the identification of oil-water two-phase flow patterns due to their higher reliability and adaptability. For example, patent application publication number CN105003249B discloses a horizontal well flow pattern identification method based on total flow rate and conductivity probe array signals. First, the total flow rate and the voltage response signal of each probe in the conductivity probe array are measured separately. Second, features are extracted from each probe voltage response signal using statistical analysis and wavelet analysis. Third, the extracted features are normalized using Z-scores, and principal components are extracted using principal component analysis (PCA) to form PCA features. Feature-level information fusion based on support vector classification (SVC) is then performed, using the SVC method to establish a classification model for oil-water two-phase flow patterns from the PCA features of the total flow rate and probe array voltage response signals. Finally, the SVC model parameters are optimized using a particle swarm optimization algorithm. However, such methods require continuous changes in experimental conditions during field testing to collect voltage response signals under various flow patterns and obtain sufficient samples for effective classification model training. This process consumes significant manpower, material resources, and time. Therefore, the signal processing method can utilize a variety of raw data sources, such as differential pressure signals, phase holdup, ECT capacitance signals, etc. for flow pattern identification. Among them, ECT capacitance signals are particularly suitable for flow pattern identification of oil-water two-phase flow due to their high sensitivity, strong anti-interference ability, fast acquisition speed, no radiation, and non-invasiveness.
[0004] With the development of big data and machine learning technologies, machine learning, as an intelligent algorithm, has become an effective tool for identifying oil-water two-phase flow patterns. By autonomously learning from large amounts of data, machine learning can discover complex nonlinear relationships, accurately adapt to the changing flow patterns, and efficiently complete classification and identification tasks. Especially when dealing with complex and changing flow patterns, machine learning can capture underlying patterns and characteristics by learning from historical data, improving recognition accuracy and real-time performance. Therefore, machine learning has been widely used in oil-water two-phase flow pattern identification research, providing a smarter and more efficient solution to traditional signal processing methods. For example, patent application CN112800589B discloses an artificial intelligence-based method for coarsening the relative permeability grid of oil-water two-phase flow, the steps of which include: 1) establishing a geological model; 2) determining the size and number of coarse grids and dividing the coarse grids; 3) extracting a set proportion of coarse grids as sample set F1, and recording the remaining coarse grids as sample set F2, performing coarsening calculations on the relative permeability of the sample set F1, and obtaining the coarse-scale relative permeability of the coarse grids in the sample set F1; 4) performing data preprocessing on the permeabilities of all coarse grids in the geological model; 5) training a machine learning algorithm with the distribution characteristics of the permeability of each coarse grid in the sample set F1 and the coarse-scale relative permeability data of the coarse grids, and obtaining a prediction model for the coarse-scale relative permeability of the coarse grids through a ten-fold cross-validation method; 6) using the prediction model to predict the coarse-scale relative permeability of the coarse grids in the sample set F2; and 7) using the coarse-scale relative permeability in F1 and the predicted coarse-scale relative permeability in F2 to perform numerical simulation calculations of the reservoir. However, although machine learning has shown great potential in flow pattern identification, the application of existing ECT technology in oil-water two-phase flow pattern identification usually relies on electrostatic field simulation or static experimental data to obtain flow pattern samples and train machine learning models based on these static samples. There is a significant gap between these static samples and the flow patterns in actual industrial environments, resulting in the trained models showing low generalization ability and adaptability in practical applications. Static simulation or experimental data can usually only reflect the flow pattern distribution under specific conditions and lack a comprehensive description of the dynamic changes in flow patterns and the complexity of the flow field. Therefore, models trained based on these static data often find it difficult to cope with the variability and complexity of flow patterns in industrial environments, resulting in insufficient recognition accuracy and robustness, making it difficult to meet the needs of practical applications. Summary of the Invention
[0005] In order to overcome the defects of the above-mentioned prior art, the purpose of the present invention is to provide a flow pattern identification method, system, equipment and medium based on dynamic flow pattern samples. Based on the electrical multiphase flow parameter detection technology, an electric field-flow field coupling model is constructed to simulate the flow state of oil-water two-phase flow. At the same time, the corresponding output electrical signals are obtained by using array electrodes installed around the pipeline, and a sufficient amount of dynamic flow pattern samples are collected. The flow pattern identification of oil-water two-phase flow is further realized through a BPNN neural network optimized based on a genetic algorithm (GA), so as to solve the problem that the existing machine learning flow pattern identification methods mostly use static flow pattern sample training, resulting in a large gap with the actual industrial flow pattern and weak model generalization ability.
[0006] A flow pattern recognition method based on dynamic flow pattern samples specifically comprises the following steps:
[0007] Step 1: Use the AC / DC module and fluid flow module of COMSOL software to build a coupled model;
[0008] First, when constructing the coupling model on the software, the basic parameters of the coupling model are set, including the number of electrodes, electrode angle, electrode length, pipe inner diameter, pipe thickness and pipe length; secondly, the coupling relationship between the electric field and the flow field of the coupling model is determined based on formula (1):
[0009]
[0010] Among them, ε r and ε c are the relative permittivity of the discrete phase and the relative permittivity of the continuous phase, respectively; φ d is the phase fraction of the discrete phase. Based on the above basic parameters and coupling relationship, the construction of the coupling model is completed. The coupling relationship between the electric field and the flow field of the coupling model can simulate the flow characteristics and electrical response of the oil-water two-phase flow in the pipeline. In terms of physical field setting, the AC / DC module is used to simulate the electric field distribution in the pipeline, and the electrodes are stimulated in turn. According to the formula n represents the number of electrodes, which can collect the electrical signals output by the array electrodes; at the same time, the fluid flow module is used to simulate the flow behavior of oil-water two-phase flow.
[0011] Step 2: Based on the coupled model from step 1, typical flow patterns, including core flow, stratified flow, annular flow, and bubbly flow, are simulated by adjusting the flow velocity, phase holdup, and inlet position parameters. The electrical signal data output by the array electrodes under different flow patterns are collected in real time.
[0012] Step 3: Based on the electrical signal data from step 2, extract key features that are sensitive to flow patterns and perform multi-dimensional feature extraction. The feature vector includes the signal mean, variance, maximum electrical signal amplitude, minimum electrical signal amplitude, and average electrical signal amplitude change rate. The formula is as follows:
[0013] Mean:
[0014] variance:
[0015] Maximum electrical signal amplitude: c max =max(|c ij |),1≤i≤n (4)
[0016] Minimum electrical signal amplitude: c max =min(|c ij |),1≤i≤n (5)
[0017] Average electrical signal change rate:
[0018] Where n is the number of electrodes and i≠j, c is the electrical signal, P(c ij ) is c ij Probability of occurrence;
[0019] Step 4: Based on the known BP neural network, the key features extracted in step 3 are used as input, and the output is the corresponding flow type category. The feature input and flow type category output are the dynamic flow type sample library, and the neural network is iteratively trained; at the same time, the GA genetic algorithm is used to optimize the neural network to improve the accuracy of flow type recognition.
[0020] The GA genetic algorithm optimizes the neural network, specifically:
[0021] (1) Initialize the population
[0022] Randomly initialize a population, each individual represents a weight and bias combination of a BP neural network;
[0023] (2) Fitness evaluation
[0024] For each individual in the population, the genetic algorithm trains its corresponding BP neural network and calculates the recognition error or loss function value of the network on the training set. Specifically, the fitness evaluation formula of the BP neural network is: Among them, MSE i is the mean square error of the BP network corresponding to the i-th individual. The higher the fitness, the better the performance in the flow pattern recognition task;
[0025] (3) Selection, crossover, and mutation
[0026] The genetic algorithm selects individuals with high fitness and performs crossover and mutation operations to generate new individuals;
[0027] (4) Iterative Update
[0028] Through multiple generations of iteration, the genetic algorithm continuously optimizes the population, and the algorithm converges to the network structure and weight configuration with the best recognition ability, and finally obtains a BP neural network model suitable for the flow pattern recognition task;
[0029] (5) Final training
[0030] On the basis of the BP neural network model structure suitable for flow pattern recognition tasks, the traditional BP neural network algorithm is used to further train the network, and the weights and biases are fine-tuned by the traditional BP algorithm to improve stability and accuracy.
[0031] The present invention also includes:
[0032] A system includes a processor capable of running the flow pattern recognition method based on dynamic flow pattern samples.
[0033] A device comprising:
[0034] Memory: used for storing a computer program of the flow pattern recognition method based on dynamic flow pattern samples;
[0035] Processor: used to implement the flow pattern recognition method based on dynamic flow pattern samples when executing the computer program.
[0036] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the flow pattern recognition method based on dynamic flow pattern samples.
[0037] Compared with the prior art, the present invention has the following beneficial effects:
[0038] (1) In steps 1 and 2 of the present invention, a three-dimensional dynamic simulation model of electric field-flow field coupling is constructed to obtain dynamic samples with rich flow patterns. Compared with static flow pattern samples, it can more realistically reflect the flow state of oil-water two-phase flow in industrial processes.
[0039] (2) In steps 3 and 4 of the present invention, multi-dimensional feature extraction is performed on the output electrical signal of the dynamic coupling model, and effective machine learning methods are combined to construct a flow pattern recognition model with strong generalization ability and field adaptability.
[0040] In summary, the present invention is based on the electrical multiphase flow parameter detection technology, constructs a coupling model of electric field and flow field to simulate the flow conditions of oil-water two-phase flow, and captures the corresponding electrical signal output by installing array electrodes around the pipeline, and collects a large number of dynamic flow pattern samples; the BPNN neural network optimized based on genetic algorithm (GA) is used to realize the identification of oil-water two-phase flow pattern; in addition, the present invention also compares the recognition effect of dynamic and static flow pattern samples when training the model, solving the problem that the existing machine learning flow pattern recognition method mainly relies on static flow pattern sample training, resulting in large differences with the actual industrial flow pattern and insufficient model generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 This is a pipeline modeling diagram (taking the inlet mode for generating laminar flow as an example).
[0042] Figure 2 It is the medium distribution diagram (part) of 4 dynamic flow pattern samples.
[0043] Figure 3 It is the sensor output electrical signal (part) collected under four dynamic flow patterns.
[0044] Figure 4 It is a BPNN neural network framework diagram, showing the structure and connection relationship of each layer of the neural network.
[0045] Figure 5 It is a graph showing the change of accuracy with the number of hidden layer neurons, which determines the optimal number of hidden layer neurons (dynamic flow pattern sample).
[0046] Figure 6 It is a diagram of the neural model iteration process, showing the convergence of model training (dynamic flow pattern sample).
[0047] Figure 7 It is the medium distribution diagram (part) of 4 static flow type samples.
[0048] Figure 8 It is a graph showing the change of accuracy with the number of hidden layer neurons, which determines the optimal number of hidden layer neurons (static flow type sample).
[0049] Figure 9 It is a diagram of the neural model iteration process, showing the convergence of model training (static flow type sample). DETAILED DESCRIPTION
[0050] The present invention will be described in detail below with reference to the accompanying drawings.
[0051] A flow pattern recognition method based on dynamic flow pattern samples specifically comprises the following steps:
[0052] Step 1: Use the AC / DC module and fluid flow module of COMSOL software to build a coupled model;
[0053] First, when constructing the coupling model on the software, the basic parameters of the coupling model are set, including the number of electrodes, electrode angle, electrode length, pipe inner diameter, pipe thickness and pipe length; secondly, the coupling relationship between the electric field and the flow field of the coupling model is determined based on formula (1):
[0054]
[0055] Among them, ε r and ε c are the relative permittivity of the discrete phase and the relative permittivity of the continuous phase, respectively; φ d is the phase fraction of the discrete phase. Based on the basic parameters and coupling relationship, the construction of the coupling model is completed.
[0056] Specific reference Figure 1 , using COMSOL software to build the ECT electric field-flow field coupling model, in order to accurately simulate and analyze the dynamic flow pattern samples and obtain the corresponding sample data, AD\DC and fluid flow modules are used to build a multi-physics field. The pipeline physical model is as follows Figure 1 As shown in the figure, including the main view and cross-sectional view, the model structure and electrode distribution are displayed. A 12-electrode array sensor is selected, and the sensor wall thickness R1-R2 = 2mm, the electrode plate thickness R3-R1 = 0.1mm, the pipe inner diameter R2 = 23mm, the electrode plate angle θ = 26°, the radial electrode plate length is 125mm, and the pipe length is 500mm. The electrode plate material is selected as metal copper with good conductivity and stability. According to formula (1), the equivalent dielectric constant of each phase is set, where the relative dielectric constant of pure water is set to 80 and the dielectric constant of pure oil is set to 3. In terms of physical field settings, by further setting the normal velocity of inlet 1 (water phase) and inlet 2 (oil phase), the 12 electrodes are excited in turn using the parametric sweep function to simulate the flow field distribution of the mixture in the pipeline and obtain the electrical signal on the array electrode in real time. At the same time, the fluid flow module is used to simulate the flow behavior of the oil-water two-phase flow, and the material dielectric constant of the coupling model is set as a variable, which follows formula (1):
[0057]
[0058] Among them, ε r and ε c are the relative permittivity of the discrete phase and the relative permittivity of the continuous phase, respectively; φ d is the phase fraction of the discrete phase.
[0059] Step 2: Based on the coupling model of step 1, different flow patterns can be simulated by flexibly adjusting key physical parameters such as inlet position, pipe size and medium flow rate. Here, four typical flow patterns, core flow, stratified flow, annular flow and bubbly flow, are taken as examples. The distribution of some extracted media is shown as follows: Figure 2 By further drawing on the ECT sensor array electrode structure, the electrical signal data output by the array electrodes under different flow patterns is collected in real time, providing rich data support for subsequent feature extraction, model training and flow pattern identification, while also providing a scientific basis for flow pattern identification.
[0060] Step 3: Based on the electrical signal data of step 2, some electrical signals such as Figure 3 As shown, it can be seen that there are significant differences in the sensor output signals corresponding to different flow types. These differences reflect the changes in the electrical characteristics of different flow types. Making full use of these differences can achieve effective identification of different flow types. In order to reduce the computational burden and improve the accuracy and efficiency of flow type identification, key features sensitive to flow types are extracted and multi-dimensional feature extraction is performed. The feature vector includes the mean, variance, maximum electrical signal amplitude, minimum electrical signal amplitude and average electrical signal amplitude change rate of the signal. The formula is as follows:
[0061] Mean:
[0062] variance:
[0063] Maximum electrical signal amplitude: c max =max(|c ij |),1≤i≤n (4)
[0064] Minimum electrical signal amplitude: c max =min(|c ij |),1≤i≤n (5)
[0065] Average electrical signal change rate:
[0066] Where n is the number of electrodes and i≠j, c is the electrical signal, P(c ij ) is c ij The above eigenvectors can effectively describe the fluctuation of electrical signals, the amplitude of changes, and the distribution characteristics of signals.
[0067] Step 4: Based on the known BP neural network, the key features extracted in step 3 are used as input, and the output is the corresponding flow type category. The feature input and flow type category output are the dynamic flow type sample library, and the neural network is iteratively trained; at the same time, the GA genetic algorithm is used to optimize its neural network to improve the accuracy of flow type recognition.
[0068] Optimizing its neural network primarily involves five steps: population initialization, fitness evaluation, selection, crossover and mutation, iterative updates, and final training. A global search mechanism automatically adjusts weights and biases to avoid local optimal solutions caused by the gradient descent method, thereby improving flow pattern recognition performance. The flow pattern recognition model inputs the key features extracted in step 3, and outputs the corresponding flow pattern category. These feature inputs and flow pattern label outputs are used to train the neural network, learning the underlying patterns between different flow pattern signals. With continuous iterations of the training process, the neural network will gradually improve its recognition accuracy for different flow patterns, ultimately enabling it to accurately distinguish between them. Typically, 80% to 90% of the samples are used for training, and 10% to 20% are used for testing. The number of hidden layer neurons is determined through comprehensive analysis of experiments and accuracy.
[0069] Reference Figure 4 、 5 A BP neural network is constructed based on the neural network model. In the study of flow pattern recognition, although traditional BP neural networks have strong learning capabilities, they often fall into local optimal solutions during the training process, resulting in the model's recognition accuracy failing to reach the optimal level. To address this problem, this study introduced a BP neural network optimized by a genetic algorithm (GA). As a global optimization technology, the genetic algorithm can effectively avoid the local optimal trap that occurs in traditional BP neural networks during training, and find more superior network weights and structures through global search, thereby improving the accuracy of flow pattern recognition.
[0070] Specifically, the GA-optimized BP neural network is optimized through the following steps:
[0071] (1) Initialize the population
[0072] The first step in a genetic algorithm is to randomly initialize a population, where each individual represents a combination of weights and biases in a BP neural network. The genes (i.e., network parameters) for each individual are initially randomly selected. The multiple individuals in the population represent different possible combinations of BP network parameters, thus forming a solution space. The population size is typically large to ensure a broad global search and avoid prematurely falling into local optima.
[0073] (2) Fitness evaluation
[0074] For each individual in the population, the genetic algorithm will train its corresponding BP neural network and calculate the recognition error or loss function value (such as mean square error MSE) of the network on the training set. Specifically, the fitness evaluation formula of the BP neural network is: Among them, MSE iis the mean square error of the BP network corresponding to the i-th individual. The higher the fitness, the better the performance of the network in the flow pattern recognition task, and thus a higher selection probability can be obtained.
[0075] (3) Selection, crossover, and mutation
[0076] Based on the fitness evaluation results, the genetic algorithm uses selection to select individuals with higher fitness, and then performs crossover and mutation operations to generate new individuals. The crossover operation simulates genetic recombination to combine the characteristics of excellent individuals and generate new solutions. The mutation operation randomly changes the genes of certain individuals to increase the diversity of the solution space and help the algorithm avoid local optimal solutions. In this way, the genetic algorithm can explore a wider range of solution spaces, thereby increasing the probability of ultimately finding the global optimal solution.
[0077] (4) Iterative Update
[0078] Through multiple generations of iteration, the genetic algorithm continuously optimizes the population. In each generation, through selection, crossover, and mutation, individuals in the population gradually approach the optimal solution. After several generations of evolution, the algorithm converges to a network structure and weight configuration with optimal recognition capabilities, ultimately resulting in a BP neural network model suitable for flow pattern recognition tasks.
[0079] (5) Final training
[0080] Based on the optimal weights and network structure obtained through genetic algorithm optimization, the network is further trained using a traditional BP neural network algorithm to refine details, eliminate errors, and ensure the highest level of recognition accuracy. At this point, the network has already achieved high initial performance, and the traditional BP algorithm can be used to fine-tune weights and biases, making the network more stable and accurate in real-world applications.
[0081] The neural network optimized by the GA was trained on dynamic flow pattern samples. For example, 400 sets of samples were used as training data, with 360 sets serving as test data. Five key features were extracted from each set of samples as model input, and the flow pattern category was used as the output label: 1 for bubbly flow, 2 for annular flow, 3 for core flow, and 4 for stratified flow. The number of hidden layer neurons was initially set between 20 and 30, and training was performed five times for each value, with the accuracy rate recorded. Based on the experimental results, the model's initial parameters were set to: 27 hidden layer nodes, an error threshold of 1e-6, a learning rate of 1e-7, 50 generations, a population size of 5, and an accuracy-related parameter of [1e-6, 1].
[0082] Reference Figure 6It can be seen that although the training prediction output values for annular flow and core flow identification showed a certain degree of deviation from the target values, the overall error rate was less than 1%. This result shows that the selected feature vectors and the BPNN model built based on the genetic algorithm have practical application feasibility and effectiveness in the flow pattern identification work of this experiment.
[0083] In addition, in order to verify the advantages of dynamic flow pattern samples, static flow pattern samples were collected for comparative analysis. The static flow pattern samples as the control group were obtained through AD\DC physical field modeling. By regulating the volume ratio of the oil and water phases and their distribution in space (including but not limited to: layered distribution, that is, the oil phase and the water phase show a clear layered structure in the horizontal direction; annular distribution, the oil phase or the water phase forms an annular area around the inner wall of the pipe; bubble distribution, the dispersed oil droplets or water droplets are evenly distributed in the continuous phase medium in the form of bubbles), the distribution of some media is as follows Figure 7 Some electrical signals are shown as Figure 8 As shown in , determine the optimal number of hidden layer neurons (static flow sample). The recognition effect is as follows Figure 9 As shown, the convergence of the model training static flow sample is demonstrated.
[0084] Referring to Table 1, in order to comprehensively compare the impact of the two flow type samples on the recognition results, 10% samples from each of the dynamic samples and the static samples (a total of 80 groups of mixed samples) were selected as test sets, and their respective recognition rates were calculated.
[0085] Identification Model Test sample accuracy Recognition model based on dynamic flow pattern sample training 96.25% Recognition model based on static flow pattern sample training 81.25%
[0086] As shown in the table above, for these 80 mixed samples, the recognition accuracy of the model trained on dynamic samples was 96.25%, while that of the model trained on static samples was 81.25%. This indicates that while the model trained on static samples has some recognition capabilities, the model trained on dynamic samples performs superiorly when handling complex flow patterns. This comparison demonstrates that the model trained on dynamic samples has stronger generalization capabilities when handling diverse data. This result validates the advantages of dynamic flow pattern samples in flow pattern recognition, provides strong support for future research and application, and will help promote the application and development of this technology in fields such as oil extraction.
[0087] The present invention also includes:
[0088] A system includes a processor capable of running the flow pattern recognition method based on dynamic flow pattern samples.
[0089] A device comprising:
[0090] Memory: used for storing a computer program of the flow pattern recognition method based on dynamic flow pattern samples;
[0091] Processor: used to implement the flow pattern recognition method based on dynamic flow pattern samples when executing the computer program.
[0092] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the computer program implements the flow pattern recognition method based on dynamic flow pattern samples.
[0093] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.
Claims
1. A flow pattern recognition method based on dynamic flow pattern samples, characterized in that: The specific steps include: Step 1: Use the AC / DC module and fluid flow module of COMSOL software to build a coupled model; Step 2: Based on the coupled model from step 1, typical flow patterns, including core flow, stratified flow, annular flow, and bubbly flow, are simulated by adjusting the flow velocity, phase holdup, and inlet position parameters. The electrical signal data output by the array electrodes under different flow patterns are collected in real time. Step 3: Based on the electrical signal data from step 2, extract key features that are sensitive to flow patterns and perform multi-dimensional feature extraction. The feature vector includes the signal mean, variance, maximum electrical signal amplitude, minimum electrical signal amplitude, and average electrical signal amplitude change rate. Step 4: Based on the known BP neural network, the key features extracted in step 3 are used as input, and the output is the corresponding flow type category. The feature input and flow type category output are the dynamic flow type sample library, and the neural network is iteratively trained; at the same time, the GA genetic algorithm is used to optimize the neural network to improve the accuracy of flow type recognition.
2. A flow pattern recognition method based on dynamic flow pattern samples according to claim 1, characterized in that: The step 1 is specifically as follows: First, when constructing the coupling model on the software, the basic parameters of the coupling model are set, including the number of electrodes, electrode angle, electrode length, pipe inner diameter, pipe thickness and pipe length; secondly, the coupling relationship between the electric field and the flow field of the coupling model is determined based on formula (1): Among them, ε r and ε c are the relative permittivity of the discrete phase and the relative permittivity of the continuous phase, respectively; φ d is the phase fraction of the discrete phase. Based on the above basic parameters and coupling relationship, the construction of the coupling model is completed. The coupling relationship between the electric field and the flow field of the coupling model can simulate the flow characteristics and electrical response of the oil-water two-phase flow in the pipeline. In terms of physical field setting, the AC / DC module is used to simulate the electric field distribution in the pipeline, and the electrodes are stimulated in turn. According to the formula n represents the number of electrodes, which can collect the electrical signals output by the array electrodes; at the same time, the fluid flow module is used to simulate the flow behavior of oil-water two-phase flow.
3. The flow pattern recognition method based on dynamic flow pattern samples according to claim 1, characterized in that: The eigenvector formula in step 3 is as follows: Mean: variance: Maximum electrical signal amplitude: c max =max(|c ij |),1≤i≤n(4)Minimum electrical signal amplitude: c max =min(|c ij |),1≤i≤n(5)Average electrical signal change rate: Where n is the number of electrodes and i≠j, c is the electrical signal, P(c ij ) is c ij Probability of occurrence.
4. The flow pattern recognition method based on dynamic flow pattern samples according to claim 1, characterized in that: The GA genetic algorithm optimization neural network described in step 4 is specifically as follows: (1) Initialize the population Randomly initialize a population, each individual represents a weight and bias combination of a BP neural network; (2) Fitness evaluation For each individual in the population, the genetic algorithm trains its corresponding BP neural network and calculates the recognition error or loss function value of the network on the training set. Specifically, the fitness evaluation formula of the BP neural network is: Among them, MSE i is the mean square error of the BP network corresponding to the i-th individual. The higher the fitness, the better the performance in the flow pattern recognition task; (3) Selection, crossover, and mutation The genetic algorithm selects individuals with high fitness and performs crossover and mutation operations to generate new individuals; (4) Iterative Update Through multiple generations of iteration, the genetic algorithm continuously optimizes the population, and the algorithm converges to the network structure and weight configuration with the best recognition ability, and finally obtains a BP neural network model suitable for the flow pattern recognition task; (5) Final training On the basis of the BP neural network model structure suitable for flow pattern recognition tasks, the traditional BP neural network algorithm is used to further train the network, and the weights and biases are fine-tuned by the traditional BP algorithm to improve stability and accuracy.
5. A system, characterized in that: The invention comprises a processor capable of running the flow pattern recognition method based on dynamic flow pattern samples as described in any one of claims 1 to 4.
6. A device, characterized in that include: Memory: used to store a computer program of a flow pattern recognition method based on dynamic flow pattern samples according to any one of claims 1 to 4; Processor: used to implement any one of the flow pattern recognition methods based on dynamic flow pattern samples according to claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the flow pattern recognition method based on dynamic flow pattern samples according to any one of claims 1 to 4 is implemented.
Citation Information
Patent Citations
A method for identifying the flow pattern of horizontal wells based on total flow rate and conductivity probe array signals.
CN105003249B
An AI-based method for coarsening relative permeability meshes in oil-water two-phase flow
CN112800589B