A prediction method for the critical liquid-carrying flow rate of gas pipelines based on BP neural network

By combining the extended two-fluid phase separation model and the minimum pressure gradient method, a prediction model of the critical flow rate of the gas pipeline is established using the BP neural network, which solves the problem of difficulty in accurately predicting the critical flow rate of the gas pipeline in the prior art, and realizes accurate prediction and safe operation guidance under complex terrain conditions.

CN116341367BActive Publication Date: 2025-06-03SHAANXI YANCHANG PETROLEUM GRP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310113545.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-15
Publication Date
2025-06-03
Estimated Expiration
2043-02-15

AI Technical Summary

Technical Problem

The prior art is difficult to accurately predict the critical flow rate of liquid carrying in the ground gas pipeline, especially under complex terrain undulation conditions, resulting in pipeline fluid accumulation, increased back pressure and corrosion problems.

Method used

The extended two-fluid phase separation model and minimum pressure gradient method combined with the BP neural network were used to establish a predictive model of the critical flow rate of liquid carrying in the gas pipeline. By extracting easy-to-measure feature parameters, a nonlinear mapping function relationship between the critical flow rate of the liquid carrying fluid and the feature parameters is established by using the BP neural network to make predictions.

Benefits of technology

Accurate prediction of the critical flow rate of the gas pipeline liquid carrying in complex terrain conditions is achieved, which reduces calculation errors and improves the feasibility and accuracy of on-site operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116341367B_ABST
    Figure CN116341367B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for predicting the critical liquid-carrying flow velocity of a gas transmission pipeline based on a BP neural network, and the method is as follows: establishing a geometric model for numerical calculation of the gas transmission pipeline; extracting the characteristic parameters and their value ranges that affect the critical liquid-carrying flow velocity of the gas transmission pipeline according to the on-site working conditions; constructing a U 80 (80 6 ) uniform design table; randomly combining 11 groups of numerical values within the determined value ranges of the characteristic parameters, and solving the critical liquid-carrying flow velocity corresponding to the characteristic parameters at this value; using 80 groups of characteristic parameters and their corresponding critical liquid-carrying flow velocities as training sample data, and establishing a non-linear mapping function relationship between the critical liquid-carrying flow velocity and the characteristic parameters by using a BP neural network as a prediction model to predict the critical liquid-carrying flow velocity; the present invention avoids the disadvantages that many mechanical and physical property parameters in the conventional prediction model are greatly affected by the on-site working conditions and are not easy to extract, and is easy to operate and apply on site.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of ensuring the safety of wet gas pipeline flow, and particularly to a method for predicting the critical liquid-carrying flow velocity of a gas transmission pipeline based on a BP neural network. Background Art

[0002] The Yan'an Gas Field is located in the Loess Plateau of northern Shaanxi, with complex topography and landforms. The pipelines have many undulations and large elevations, and gas-liquid mixed transportation is adopted for surface gathering and transportation. During the production of the gas field, the liquid production at the wellhead is discontinuous and accompanied by slug flow, and the instantaneous liquid production fluctuates greatly. Under the condition of multi-undulating terrain, it is extremely easy to cause liquid accumulation at the low points of the surface pipelines. In severe cases, slug flow is induced, resulting in an increase in the wellhead back pressure, frequent tripping of emergency cut-off valves, and prominent pipeline corrosion problems.

[0003] At present, the research on the liquid-carrying characteristics of gas-liquid two-phase flow mainly focuses on the liquid accumulation in gas wellbores. For the stable liquid-carrying production of gas wells such as vertical wells and horizontal wells, corresponding experiments and theoretical analyses have been carried out by domestic and foreign scholars. However, the research on the gas-liquid carrying law of surface gas transmission pipelines is relatively less and mostly focuses on mechanical equilibrium models (droplet model and liquid film model). Li Guohao established a calculation model for the critical gas velocity of liquid accumulation in wet gas pipelines based on the minimum shear stress criterion of stratified flow. Pan Jie et al. determined the maximum droplet diameter based on the equality of the total surface free energy of droplets and the total turbulent kinetic energy of the gas phase and established a critical gas velocity model for ellipsoidal droplets. Xing Peng used CFD software to simulate the flow state of multiphase flow in undulating pipelines and determined the critical liquid-carrying parameters. Chen Jianlei analyzed the influencing factors of the critical liquid-carrying flow velocity of undulating wet gas pipelines and established a calculation model for the critical gas velocity of liquid carrying in surface gas transmission pipelines based on the WALLIS flooding empirical formula. The above models do not consider the influence of terrain undulation changes, and many mechanical and physical properties parameters in the models are greatly affected by on-site working conditions and are not easy to extract, so the calculation error is large.

[0004] The pressure drop generated by gas-liquid two-phase flow in a pipeline mainly includes shear friction and gravity loss. Along with the change of the flow rate in the pipeline, there is a minimum value for the pipeline pressure drop, and the apparent flow velocity of the gas phase under the minimum pressure drop is the critical liquid-carrying flow velocity. If it is inconvenient to obtain the pressure difference inflection point through on-site pipeline measurement to judge the critical liquid-carrying flow velocity, it also lacks forward-looking guidance for the layout of gas production pipelines. Since the undulating section where the maximum uphill inclination angle is located in the undulating pipeline has a decisive influence on the critical liquid-carrying flow velocity, in order to better serve the production practice of the gas field site, a numerical calculation model is established for it. An extended two-fluid phase-separation model is adopted, and a prediction model for the critical liquid-carrying flow velocity of surface gas transmission pipelines is established based on the minimum pressure gradient method combined with uniform design and BP neural network, in order to better guide the design and safe operation of wet gas pipelines. Summary of the Invention

[0005] The present invention aims at the above problems and provides a method for predicting the critical liquid-carrying velocity of gas pipelines based on a BP neural network. The method extracts characteristic parameters that are easy to measure in engineering practice and uses the established machine learning model to predict the critical liquid-carrying velocity of gas pipelines.

[0006] The technical solution of the present invention is as follows:

[0007] A method for predicting the critical liquid-carrying velocity of gas pipelines based on a BP neural network is as follows:

[0008] Step 1: Establish a geometric model for numerical calculation of gas pipelines;

[0009] The geometric model includes a gas pipeline, which is composed of a downward-sloping gas pipeline and an upward-sloping gas pipeline connected in sequence; among them, the lengths of the downward-sloping gas pipeline and the upward-sloping gas pipeline are both 1 km; the inner diameter of the gas pipeline is the same as that of the pipeline to be measured; the maximum uphill inclination angle of the upward-sloping gas pipeline is the angle corresponding to the maximum uphill of the pipeline to be measured; the downhill inclination angle of the downward-sloping gas pipeline is the angle corresponding to the downhill before the maximum uphill of the pipeline to be measured; when the uphill inclination angle appears in a continuous uphill pipeline, the downhill inclination angle is selected as 0.5 degrees;

[0010] Step 2: Extract the characteristic parameters and their value ranges that affect the critical liquid-carrying velocity of gas pipelines according to the on-site working conditions; the characteristic parameters include gas temperature, gas pressure, gas moisture content, maximum uphill inclination angle, downhill inclination angle corresponding to the maximum uphill inclination angle, and inner diameter of the gas pipeline;

[0011] Step 3: Construct a U 80 (80 6 ) uniform design table, requiring that the centralization deviation of the uniform design table < 0.05, the corrected deviation < 0.08, the symmetrization deviation < 0.6, the rollability deviation < 0.2, and the goodness < 0.0002; conduct numerical experimental design on the value ranges of each characteristic parameter to study the variation law of the critical liquid-carrying velocity under different characteristic parameters;

[0012] Step 4: Randomly combine 11 groups of values within the value ranges of the characteristic parameters determined in Step 2 and solve the critical liquid-carrying velocity corresponding to the characteristic parameters at this value;

[0013] Step 5: Use the 80 groups of characteristic parameters and their corresponding critical liquid-carrying velocities in Step 3 as training sample data, and use a BP neural network to establish a non-linear mapping function relationship between the critical liquid-carrying velocity and the characteristic parameters as a prediction model to predict the critical liquid-carrying velocity; the value range of the similarity coefficient of the prediction model is (0.98, 0.99); when the mean square error / MSE drops to 10 -3 The training ends when it no longer decreases hereinafter.

[0014] Among them, the BP neural network adopts a three-layer single hidden layer structure, namely the input layer, the hidden layer and the output layer; the number of nodes in the input layer is 6, the number of nodes in the hidden layer is 5, and the number of nodes in the output layer is 1; the BP neural network training adopts the Levenberg-Marquardt algorithm, the training function adopts trainlm, the transfer function between the input layer and the hidden layer is the TANSIG tangent sigmoid function, and the transfer function between the hidden layer and the output layer is the PURELIN linear function; the learning rate of the BP neural network is set to 0.04.

[0015] In addition, it also includes randomly selecting 6 groups of values from the 11 groups of values in step 4 as the generalization ability test samples to train the BP neural network model, and the remaining 5 groups of values in the 11 groups of values as the test samples of the prediction model to test the accuracy of the prediction model; it is required that the maximum relative error of the test samples of the prediction model ≤ 10%, and the average relative error ≤ 6%.

[0016] It also includes: the input layer and the output layer are normalized and inverse-normalized, and the mapminmax function is used for normalization and inverse-normalization. The maximum number of training times is 7000 times, the training convergence residual is 0.00001, and the model generalization ability detection index is 25 times. The standard for the end of the BP neural network training is that any one of the maximum number of training times, the training convergence residual, and the model generalization ability detection index reaches the set value.

[0017] Among them, in the said step 3, the specific solving process of the liquid-carrying critical flow rate is as follows:

[0018] The basic control equation for calculating the pressure drop of gas-liquid two-phase flow is the extended two-fluid separated-phase model equation; the state equations of gas-liquid two-phase are the PR gas-liquid two-phase state equation, the dynamic viscosity and the thermal conductivity are calculated by the SuperTrapp equation, and the surface tension is calculated by the MCS equation;

[0019] The basic control equation for calculating the pressure drop of gas-liquid two-phase flow includes the mass conservation equation, the momentum conservation equation, and the energy conservation equation, which are shown as follows:

[0020] Mass conservation equation:

[0021]

[0022]

[0023] In the formula: V is the volume fraction of each phase, %; G is the mass source of each phase; ρ is the density, kg / m 3 ; υ is the flow velocity of each phase, m / s; A is the cross-sectional area of the pipe flow, m 2 ; ψ g is the mass transfer rate between gas and liquid, kg / s; ψ eis the droplet entrainment rate, m / s; ψ d is the droplet deposition rate, m / s; the subscripts g, L, and D represent the gas phase, droplet, and liquid film, respectively;

[0024] Momentum conservation equation:

[0025]

[0026]

[0027] In the formula: α is the angle between the pipeline and the vertical direction, °; P is the pressure, Pa; υ r is the relative velocity, m / s; S is the wetted perimeter of each phase interface, m 2 ; g is the acceleration due to gravity, g / m 2 ; the subscripts g, L, and i represent the gas phase, liquid film, and gas-liquid phase interface, respectively; Energy conservation equation:

[0028]

[0029] In the formula: E is the internal energy of the fluid per unit mass, j / kg; h is the elevation, m; H S is the enthalpy of the mass source, j; U is the heat transfer amount through the pipe wall, j;

[0030] The first-order nonlinear one-dimensional partial differential equation system composed of the above mass conservation equation, momentum conservation equation, and energy conservation equation is discretized using a difference scheme and transformed into an algebraic equation system. Given the boundary conditions, iterative solutions are carried out to calculate the pipeline pressure gradient generated by different inlet mass flows under a fixed pipeline outlet pressure.

[0031] Among them, the value ranges of the characteristic parameters affecting the critical liquid-carrying flow velocity of the gas transmission pipeline are as follows: the maximum and minimum values of the gas transmission temperature are the temperatures during the summer operation of the buried gas transmission pipeline and the temperatures during the winter operation, respectively; the maximum and minimum values of the gas transmission pressure are the maximum operating pressure designed during the entire life cycle of the gas transmission pipeline and the minimum operating pressure, respectively; the maximum and minimum values of the gas moisture content are the maximum and minimum values of the liquid / gas ratio in the corresponding gas source wells of the gas gathering pipeline network where the gas transmission pipeline is located, respectively; the maximum and minimum values of the maximum uphill inclination angle are the maximum and minimum values of the angle at the maximum uphill of the gas transmission pipelines under the jurisdiction of the gas gathering pipeline network, respectively; the maximum and minimum values of the downhill inclination angle are the maximum and minimum values of the angle at the downhill before the maximum uphill of the gas transmission pipelines under the jurisdiction of the gas gathering pipeline network; the maximum and minimum values of the inner diameter of the gas transmission pipeline are the maximum and minimum inner diameter values in the gas transmission pipelines under the jurisdiction of the gas gathering pipeline network, respectively.

[0032] Among them, the critical liquid-carrying flow velocity is calculated by the minimum pressure gradient method.

[0033] The technical effect of the present invention lies in:

[0034] An extended two-fluid phase separation model equation and its closure relations are combined with the gas-liquid two-phase state equation PR, the dynamic viscosity and thermal conductivity equation SuperTrapp, and the surface tension equation MCS. Based on the minimum gradient method and uniform design, a prediction model for the critical flow rate of liquid-carrying in gas pipelines is established using a BP neural network. The characteristic parameters required as input in this model are easy to extract and analyze at the gas field site, avoiding the drawback that many mechanical and physical property parameters in conventional prediction models (based on force balance analysis) are greatly affected by on-site working conditions and are not easy to extract, and it is easy to operate and apply on-site. Description of the Drawings

[0035] Figure 1 It is a schematic diagram of the geometric model for numerical calculation of the gas pipeline of the present invention.

[0036] Figure 2 It is a schematic diagram of the geometric topology of the gas pipeline of the present invention.

[0037] Figure 3 It is a schematic diagram of the minimum pressure drop gradient method of the present invention.

[0038] Figure 4 It is a structure diagram of the BP neural network of the present invention.

[0039] Figure 5 It is a block diagram of the calculation program of the BP neural network of the present invention.

[0040] Figure 6 It is a curve diagram of the training error of the BP neural network of the present invention.

[0041] Figure 7 It is a diagram of the fitting result of the prediction model of the present invention.

[0042] Figure 8 It is a diagram of the error comparison result of the present invention.

[0043] Figure 9 It is a geometric topology diagram of the liquid accumulation pipeline used for predicting the critical liquid-carrying flow rate of the present invention.

[0044] Figure 10 It is a curve diagram of the change of the liquid holdup along the gas pipeline of the present invention.

[0045] Figure 11 It is a curve diagram of the change of the liquid holdup and flow pattern along the gas pipeline at the critical liquid-carrying flow rate of the present invention. Detailed Implementation Manner

[0046] Taking a gas pipeline with liquid accumulation problems in a certain block of the Yan'an Gas Field as an example, the critical liquid-carrying flow rate of the gas pipeline is predicted by the method for predicting the critical liquid-carrying flow rate of the gas pipeline based on a BP neural network proposed by the present invention. The specific process is as follows:

[0047] Step 1: Establish a geometric model for numerical calculation of the gas pipeline;

[0048] The geometric model includes a gas pipeline, which is composed of a downward-inclined gas pipeline and an upward-inclined gas pipeline connected in sequence; among them, the lengths of the downward-inclined gas pipeline and the upward-inclined gas pipeline are both 1 km; the inner diameter range of the gas pipeline is 0.04 - 0.15 m, the corresponding downhill inclination angle range of the downward-inclined gas pipeline is 0.5 - 45°, and the maximum uphill inclination angle range of the upward-inclined gas pipeline is 0.5 - 45°.

[0049] Step 2: Extract the characteristic parameters and their value ranges affecting the liquid-carrying critical velocity of the gas pipeline for the on-site working conditions of a certain block of the Yan'an Gas Field; the characteristic parameters include gas transmission temperature, gas transmission pressure, gas moisture content, maximum uphill inclination angle, downhill inclination angle corresponding to the maximum uphill inclination angle, and inner diameter of the gas pipeline;

[0050] The value ranges of each characteristic parameter are as follows: the gas transmission temperature range is 1 - 40 °C, the gas transmission pressure range is 1 - 6 Mpa, the gas moisture content range is 0.1 - 1.5 m 3 .(10 4 m 3 ) -1 , the maximum uphill inclination angle range is 0.5 - 45°, the downhill inclination angle range corresponding to the maximum uphill inclination angle is 0.5 - 45°, and the inner diameter range of the gas pipeline is 0.04 - 0.15 m.

[0051] Step 3: Construct a U 80 (80 6 ) uniform design table, requiring that the centralization deviation of the uniform design table < 0.05, the corrected deviation < 0.08, the symmetrization deviation < 0.6, the rollability deviation < 0.2, and the goodness < 0.0002; conduct numerical experimental design on the value ranges of each characteristic parameter to study the variation law of the liquid-carrying critical velocity under different characteristic parameters;

[0052] Among them, the U 80 (80 6 ) uniform design table is shown in Table 1 below;

[0053] Table 1 Uniform design table

[0054]

[0055]

[0056]

[0057] The design parameters of the uniform design table are as shown in Table 2 below;

[0058] Table 2 Uniform design parameters

[0059]

[0060] The specific solution process of the liquid-carrying critical flow rate is as follows:

[0061] The basic control equation for calculating the pressure drop of gas-liquid two-phase flow is the extended two-fluid separated-phase model equation; the state equations for gas-liquid two-phase are the PR gas-liquid two-phase state equation, the dynamic viscosity and thermal conductivity are calculated through the SuperTrapp equation, and the surface tension is calculated through the MCS equation;

[0062] The basic control equations for calculating the pressure drop of gas-liquid two-phase flow include the mass conservation equation, the momentum conservation equation, and the energy conservation equation, which are shown as follows:

[0063] Mass conservation equation:

[0064]

[0065]

[0066] Where: V is the volume fraction of each phase, %; G is the mass source of each phase; ρ is the density, kg / m 3 ; υ is the flow velocity of each phase, m / s; A is the cross-sectional area of the pipe flow, m 2 ; ψ g is the mass transfer rate between gas and liquid phases, kg / s; ψ e is the droplet entrainment rate, m / s; ψ d is the droplet deposition rate, m / s; the subscripts g, L, and D represent the gas phase, droplets, and liquid film respectively;

[0067] Momentum conservation equation:

[0068]

[0069]

[0070] Where: α is the angle between the pipe and the vertical direction, °; P is the pressure, Pa; υ r is the relative velocity, m / s; S is the wetted perimeter of each phase interface, m 2 ; g is the acceleration due to gravity, g / m 2 ; the subscripts g, L, and i represent the gas phase, liquid film, and gas-liquid phase interface respectively;

[0071] Energy conservation equation:

[0072]

[0073] Where: E is the internal energy per unit mass of the fluid, j / kg; h is the elevation, m; H S is the enthalpy of the mass source, j; U is the heat transfer through the pipe wall, j;

[0074] The first-order nonlinear one-dimensional partial differential equation system composed of the above mass conservation equation, momentum conservation equation, and energy conservation equation is discretized using a difference scheme and transformed into an algebraic equation system. Given the boundary conditions, iterative solution is carried out to calculate the pipeline pressure gradient generated by different inlet mass flow rates under a fixed pipeline outlet pressure.

[0075] The critical liquid-carrying flow rate is calculated by the minimum pressure gradient method.

[0076] Step 4: Randomly combine 11 groups of values within the value range of the characteristic parameters determined in Step 2, and solve the critical liquid-carrying flow rate corresponding to the characteristic parameters at this value; the calculation results are shown in Table 3;

[0077] Table 3 Calculation Results

[0078]

[0079] Using the 80 groups of characteristic parameters and their corresponding critical liquid-carrying flow rates in Step 3 as training sample data, a BP neural network is used to establish a non-linear mapping function relationship between the critical liquid-carrying flow rate and the characteristic parameters as a prediction model to predict the critical liquid-carrying flow rate; the value range of the similarity coefficient of the prediction model is (0.98, 0.99); the mean square error / MSE drops to 10 -3 The training ends when it no longer decreases simultaneously below;

[0080] Among them, the BP neural network adopts a three-layer single hidden layer structure, namely the input layer, hidden layer, and output layer. The structure diagram is shown in Figure 4 ; the number of nodes in the input layer is 6, the number of nodes in the hidden layer is 5, and the number of nodes in the output layer is 1; the BP neural network training uses the Levenberg-Marquardt algorithm, the training function uses trainlm, the transfer function between the input layer and the hidden layer is the TANSIG tangent S-shaped function, and the transfer function between the hidden layer and the output layer is the PURELIN linear function; the learning rate of the BP neural network is set to 0.04.

[0081] Furthermore, in order to avoid overfitting of the BP neural network model, 6 groups of values are randomly selected from the 11 groups of values in Step 4 as the generalization ability test sample to train the BP neural network model, and the remaining 5 groups of values in the 11 groups of values are used as the test sample of the prediction model to test the accuracy of the prediction model; it is required that the maximum relative error of the test sample of the prediction model ≤ 10%, and the average relative error ≤ 6%.

[0082] The generalization ability verification data is shown in Table 4 below;

[0083] Table 4 Generalization Ability Verification Data

[0084]

[0085] The predicted comparison data of the test samples are shown in Table 5 below;

[0086] Table 5 Predicted Comparison Data of Test Samples

[0087]

[0088] In addition, normalization and inverse normalization processing are performed on the input layer and output layer of the BP neural network. The normalization and inverse normalization use the mapminmax function. The maximum number of training times is 7000 times, the training convergence residual is 0.00001, and the model generalization ability detection index is 25 times. The standard for the end of the BP neural network training is that any one of the maximum number of training times, the training convergence residual, and the model generalization ability detection index reaches the set value.

[0089] The calculation program block diagram of the BP neural network is shown in Figure 5 .. The training error curve of the BP neural network is shown in Figure 6 .

[0090] From Figure 6 it can be seen that when training reaches 32 times, the mean square error / MSE drops to 10 -3 and below, and the training error no longer decreases, so the training ends.

[0091] If the fitting degree of the prediction model is too high, it will lead to a decline in generalization ability and poor universality. If it is too low, it will lead to an increase in the prediction error of the prediction model and affect the actual use effect. Therefore, it is necessary to control the fitting degree, the maximum relative error, and the average relative error of the test samples. See Figure 7 and Figure 8 as shown. Figure 7 In, the overall fitting degree of the prediction model is relatively high, and the similarity coefficient reaches 0.98261, indicating that there is a high correlation between the expected value and the predicted value in the prediction model, which can meet the prediction requirements. Figure 8 It shows that the maximum relative error of the prediction results of the test samples is 9.8%, and the average relative error is 5%. The errors are all within the range allowed by the multiphase flow pipeline transportation engineering practice, indicating that the prediction model can accurately predict the critical liquid-carrying velocity of natural gas.

[0092] The verification situation of the prediction model is as follows:

[0093] The geometric topology diagram of the terrain trend of the liquid accumulation pipeline is shown in Figure 9 , and the formation undulation trend data are shown in Table 6 below.

[0094] Table 6 Terrain Undulation Trend

[0095] Pipeline a: 8 undulations, maximum elevation difference 98m, maximum inclination angle 11.065 degrees, angle range -20.592~11.065 Pipeline b: 9 undulations, maximum elevation difference 85m, maximum inclination angle 15.698 degrees, angle range -17.478~15.698 Pipeline c: 10 undulations, maximum elevation difference 187m, maximum inclination angle 30.82 degrees, angle range -29.864~30.462 Pipeline d: 12 undulations, maximum elevation difference 223, maximum inclination angle 30.82 degrees, angle range -24.624~30.82

[0096] The change curve of the liquid holdup along the gas pipeline is shown in Figure 10 . The pressure drop data and the actual flow velocity are shown in Table 7 below.

[0097] Table 7 Pressure Drop Data and Actual Flow Rate

[0098] Pipeline <![CDATA[Field gas superficial velocity (m.s -1 )]]> Actual on-site pressure drop (MPa) Pipeline 1 3.2 1.17 Pipeline 2 2.6 0.51 Pipeline 3 3.6 0.77 Pipeline 4 3.3 0.69

[0099] From Figure 9 、 10 and Table 6, it can be seen that due to the large number of undulations in the gas transmission pipeline and the small design flow rate, the liquid-carrying capacity of the gas transmission pipeline is insufficient, resulting in liquid accumulation at the low-lying areas and the upward-sloping sections of the climbing pipeline. As can be seen from Table 7, the pressure drop of the pipeline increases due to liquid accumulation and is higher than the normal value, thus affecting normal production.

[0100] The liquid-carrying critical flow rates of these four gas transmission pipelines are calculated by the prediction model proposed in the present invention, and the results are shown in Table 8 below:

[0101] Table 8 Calculation Results of Liquid-Carrying Critical Flow Rates of the Prediction Model

[0102] Pipe section Pipeline 1 Pipeline 2 Pipeline 3 Pipeline 4 Liquid-carrying critical flow velocity (m.s-1) 4.21 3.71 4.87 5.1

[0103] The curve graphs of the liquid holdup and flow pattern changes along the gas transmission pipeline at the liquid-carrying critical flow rate are shown in Figure 11 . From Figure 11 it can be found that at the liquid-carrying critical flow rate, the liquid holdup along the gas transmission pipeline decreases significantly. In the actual production of the gas field, the areas with a high liquid holdup are mostly slug flow. When the gas flow rate reaches the liquid-carrying critical flow rate, the flow pattern along the line changes to stratified flow. At this time, the liquid film lies flat on the upward-sloping pipe section, and the pressure drop of the gas transmission pipeline decreases significantly. The results show that the liquid-carrying critical flow rate obtained by this prediction model is reasonable and can guide production practice.

Claims

1. A method for predicting the critical liquid-carrying flow rate of a gas transmission pipeline based on a BP neural network, characterized in that: the method is as follows: Step 1: Establish a geometric model for numerical calculation of the gas transmission pipeline; The geometric model includes a gas transmission pipeline, which is composed of a downward-inclined gas transmission pipeline and an upward-inclined gas transmission pipeline connected in sequence; among them, the lengths of the downward-inclined gas transmission pipeline and the upward-inclined gas transmission pipeline are both 1 km; the inner diameter of the gas transmission pipeline is the same as that of the pipeline to be measured; the maximum uphill inclination angle of the upward-inclined gas transmission pipeline is the angle corresponding to the maximum uphill of the pipeline to be measured; the downhill inclination angle of the downward-inclined gas transmission pipeline is the angle corresponding to the downhill before the maximum uphill of the pipeline to be measured; when the uphill inclination angle appears in a continuous uphill pipeline, the downhill inclination angle is selected as 0.5 degrees; Step 2: Extract the characteristic parameters and their value ranges that affect the critical liquid-carrying flow rate of the gas transmission pipeline according to the on-site working conditions; the characteristic parameters include gas transmission temperature, gas transmission pressure, gas moisture content, maximum uphill inclination angle, downhill inclination angle corresponding to the maximum uphill inclination angle, and inner diameter of the gas transmission pipeline; Step 3: Construct U composed of characteristic parameters 80 (80 6 ) Uniform design table, requiring that the centralization deviation of the uniform design table < 0.05, the correction deviation < 0.08, the symmetrization deviation < 0.6, the rollability deviation < 0.2, and the goodness < 0.0002; conduct numerical experimental design on the value ranges of each characteristic parameter to study the variation law of the critical liquid-carrying flow rate under different characteristic parameters; Step 4: Randomly combine 11 groups of values within the value ranges of the characteristic parameters determined in Step 2, and solve the critical liquid-carrying flow rate corresponding to the characteristic parameters at this value; Step 5: Using the 80 groups of characteristic parameters and their corresponding critical liquid-carrying flow rates in Step 3 as training sample data, establish a non-linear mapping function relationship between the critical liquid-carrying flow rate and the characteristic parameters by using a BP neural network as a prediction model to predict the critical liquid-carrying flow rate; the value range of the similarity coefficient of the prediction model is (0.98, 0.99); the mean square error / MSE drops to 10 -3 The training ends when it no longer decreases simultaneously hereinafter.

2. The method for predicting the critical liquid-carrying flow rate of a gas transmission pipeline based on a BP neural network according to claim 1, characterized in that: The BP neural network adopts a three-layer single-hidden layer structure, namely an input layer, a hidden layer, and an output layer; the number of nodes in the input layer is 6, the number of nodes in the hidden layer is 5, and the number of nodes in the output layer is 1; the BP neural network training adopts the Levenberg-Marquardt algorithm, the training function adopts trainlm, the transfer function between the input layer and the hidden layer is the TANSIG tangent S-shaped function, and the transfer function between the hidden layer and the output layer is the PURELIN linear function; the learning rate of the BP neural network is set to 0.

04.

3. The method for predicting the critical liquid-carrying flow rate of a gas transmission pipeline based on a BP neural network according to claim 2, characterized in that: It also includes selecting 6 groups of values from the 11 groups of values in Step 4 as the generalization ability test samples to train the BP neural network model, and the remaining 5 groups of values in the 11 groups of values as the test samples of the prediction model to test the accuracy of the prediction model; it is required that the maximum relative error of the test samples of the prediction model ≤ 10%, and the average relative error ≤ 6%.

4. The method for predicting the critical liquid-carrying flow rate of a gas transmission pipeline based on a BP neural network according to claim 3, characterized in that: The input layer and the output layer are subjected to normalization and inverse normalization processing, the normalization and inverse normalization adopt the mapminmax function, the maximum number of training times is 7000 times, the training convergence residual is 0.00001, the model generalization ability detection index is 25 times, and the standard for the end of BP neural network training is that any one of the maximum number of training times, the training convergence residual, and the model generalization ability detection index reaches the set value.

5. The method for predicting the critical liquid-carrying flow rate of a gas transmission pipeline based on a BP neural network according to claim 4, characterized in that: In the said Step 3, the specific solution process of the critical liquid-carrying flow rate is: The basic control equation for calculating the pressure drop of gas-liquid two-phase flow is the extended two-fluid separated-phase model equation; the state equations for gas-liquid two-phase are the PR gas-liquid two-phase state equation, the dynamic viscosity and thermal conductivity are calculated by the SuperTrapp equation, and the surface tension is calculated by the MCS equation; The basic control equations for calculating the pressure drop of gas-liquid two-phase flow include the mass conservation equation, the momentum conservation equation, and the energy conservation equation, which are shown as follows: Mass conservation equation: Where: V is the volume fraction of each phase, %; G is the mass source of each phase; ρ is the density, kg / m 3 ; υ is the flow velocity of each phase, m / s; A is the cross-sectional area of the flow in the pipe, m 2 ; ψ g is the mass transfer rate between the gas and liquid phases, kg / s; ψ e is the droplet entrainment rate, m / s; ψ d is the droplet deposition rate, m / s; the subscripts g, L, and D represent the gas phase, droplets, and liquid film respectively; Momentum conservation equation: Where: α is the angle between the pipeline and the vertical direction, °; P is the pressure, Pa; υ r is the relative velocity, m / s; S is the wetted perimeter of each phase interface, m 2 ; g is the acceleration of gravity, m / s 2 ; the subscripts g, L, and i represent the gas phase, liquid film, and gas-liquid interface, respectively; Energy conservation equation: where: E is the internal energy of the fluid per unit mass, j / kg; h is the elevation, m; H S is the enthalpy of the mass source, j; U is the heat transfer through the pipe wall, j; The first-order nonlinear one-dimensional partial differential equation system composed of the above mass conservation equation, momentum conservation equation, and energy conservation equation is discretized by the difference scheme and transformed into an algebraic equation system. Given the boundary conditions, iterative solution is carried out to calculate the pipeline pressure gradient generated by different inlet mass flow rates under a fixed pipeline outlet pressure.

6. The method for predicting the critical liquid-carrying velocity of a gas transmission pipeline based on a BP neural network according to claim 5, characterized in that: The value ranges of the characteristic parameters affecting the critical liquid-carrying velocity of the gas transmission pipeline are as follows: the maximum and minimum values of the gas transmission temperature are the temperature during summer operation and the temperature during winter operation of the buried gas transmission pipeline, respectively; the maximum and minimum values of the gas transmission pressure are the maximum operating pressure and the minimum operating pressure designed during the entire life cycle of the gas transmission pipeline, respectively; the maximum and minimum values of the gas water content are the maximum and minimum values of the liquid / gas ratio in the corresponding gas source wells of the gas gathering pipeline network where the gas transmission pipeline is located, respectively; the maximum and minimum values of the maximum uphill inclination angle are the maximum and minimum values of the angle at the steepest uphill section of the gas transmission pipelines under the jurisdiction of the gas gathering pipeline network, respectively; the maximum and minimum values of the downhill inclination angle are the maximum and minimum values of the angle at the downhill section before the steepest uphill section of the gas transmission pipelines under the jurisdiction of the gas gathering pipeline network, respectively; the maximum and minimum values of the inner diameter of the gas transmission pipeline are the maximum and minimum inner diameter values of the gas transmission pipelines under the jurisdiction of the gas gathering pipeline network, respectively.

7. The method for predicting the critical liquid-carrying velocity of a gas transmission pipeline based on a BP neural network according to claim 6, characterized in that: The critical liquid-carrying velocity is calculated by the minimum pressure gradient method.

Citation Information

Patent Citations

  • A downhole throttling process parameter calculation method for a gas well with a high liquid-gas ratio

    CN109598007A

  • Acid gas field corrosion prediction model considering multiple factors and parameter determination method

    CN112668206A