Pipeline pressure drop calculation method and device based on Gaussian-Legendre integral algorithm adapting to integral interval
By using the Gauss-Lejeander integral algorithm based on adaptive integral intervals in the pipeline pressure drop calculation, the problems of insufficient calculation accuracy and low calculation efficiency in the prior art under complex flow conditions are solved, and more efficient and accurate pressure drop calculation is achieved.
Patent Information
- Application Number
- CN202510025141.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-07
- Publication Date
- 2025-05-09
AI Technical Summary
When dealing with complex flow conditions, variable diameter pipes or multiphase flow, the prior art has problems such as insufficient accuracy, low computational efficiency, poor applicability and lack of flexibility.
The Gauss-Lejeon integration algorithm based on adaptive integral intervals is adopted. By dividing the target pipeline into multiple pipe segments, and using the adaptive integral method to adjust the number of intervals according to the dynamic deviation of the current integral, the interval size of the Gauss-Lejeon integration is adjusted, and the area of sharply changing in the pipeline is automatically detected and the interval is refined.
It improves the accuracy and efficiency of pressure drop calculations in pipeline flow states, can better adapt to complex flow characteristics, reduce calculation errors, and provide more reliable data support in key designs.
Smart Images

Figure CN119962425A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the fields of fluid mechanics and numerical calculation, and in particular to a method and device for calculating pipeline pressure drop based on a Gauss-Legendre integral algorithm with an adaptive integral interval. Background Art
[0002] In fluid transportation systems, the pressure drop calculation along the pipeline is a key factor in evaluating fluid flow characteristics and system performance. Pressure drop not only affects the fluid transportation efficiency, but also affects the safe operation and overall economy of the equipment. Traditional pressure drop calculation methods usually rely on simple analytical formulas or basic numerical integration techniques.
[0003] In the field of industry and engineering, fluid delivery systems are key components of various production processes, covering a wide range of application scenarios, including the delivery of various fluids such as oil, natural gas, water, chemicals, air, steam, etc. In the field of oil and natural gas delivery, it can be used to design and optimize the layout and operation of oil and natural gas pipeline networks to ensure efficient and safe long-distance delivery. Fluid delivery system simulation calculations are mainly used for pressure loss prediction. Due to friction and other resistances in the pipeline, pressure loss will occur during the flow of the fluid, which needs to be compensated by a pump or compressor. The overall pressure drop cannot be obtained without integrating the pressure drop gradient. It is crucial to select an accurate and efficient pressure drop integral solution method, which can significantly speed up the solution speed and improve the solution accuracy. The use of integral solution for pipelines can integrate a variety of influencing factors, such as temperature, pressure changes, and fluid mixing. The effects of these factors on pressure drop can be taken into account by integration. The integral method is not only suitable for pressure drop calculation of single-phase flow, but also for pressure drop analysis under multiphase flow and complex flow conditions. It can be widely used in industries such as oil, natural gas, and chemicals.
[0004] However, these methods often have the following problems when dealing with complex flow conditions, variable diameter pipes or multiphase flows:
[0005] Insufficient accuracy: Many existing methods perform poorly when dealing with nonlinear flow characteristics, which may lead to deviations in pressure drop calculations and affect the accuracy of system design and operation.
[0006] Low computational efficiency: Traditional numerical integration methods require finer interval divisions to improve accuracy, which significantly increases the computational time and cannot meet the needs of real-time computing.
[0007] Poor applicability: Existing methods cannot effectively cope with complex flow conditions. For example, when the fluid type changes or the pipeline is damaged, the calculation results are unreliable.
[0008] Lack of flexibility: Traditional methods often require readjustment of parameters when responding to changes in flow conditions, but lack an automated adaptation mechanism. Summary of the invention
[0009] The purpose of this application is to provide a pipeline pressure drop calculation method and device based on a Gauss-Legendre integration algorithm with an adaptive integration interval, so as to improve the accuracy and efficiency of pressure drop calculation under pipeline flow conditions.
[0010] To achieve the above objectives, this application provides the following solutions.
[0011] In a first aspect, the present application provides a pipeline pressure drop calculation method based on a Gauss-Legendre integral algorithm with an adaptive integral interval, comprising:
[0012] Divide the target pipeline into multiple pipe segments;
[0013] The pressure drop of each pipe section is calculated using the Gauss-Legendre integration algorithm with adaptive integration interval;
[0014] Calculating the sum of the pressure drop gradients of each pipe section as the total pressure drop of the target pipeline;
[0015] The pressure drop of each pipe section is calculated using the Gauss-Legendre integration algorithm with an adaptive integration interval, including:
[0016] Initializing a pressure drop of a target pipe section as a first pressure drop; the target pipe section is any pipe section among the multiple pipe sections;
[0017] determining the inclined pipe liquid holdup of the target pipe section under the first pressure drop;
[0018] According to the inclined pipe liquid holdup and the number of intervals of the target pipe section under the first pressure drop, the pressure drop of the target pipe section is integrated by intervals using the Gauss-Legendre integration algorithm to obtain a second pressure drop;
[0019] Determine whether the absolute value of the difference between the second pressure drop and the first pressure drop is less than a preset threshold value, and obtain a determination result;
[0020] If the judgment result is yes, determining the pressure drop of the target pipe section to be the second pressure drop;
[0021] If the judgment result is no, the first pressure drop is updated to the second pressure drop, the number of intervals is updated, and the process returns to the step of "determining the inclined pipe liquid holdup of the target pipe section under the first pressure drop".
[0022] In a second aspect, a pipeline pressure drop calculation device based on a Gauss-Legendre integration algorithm with an adaptive integral interval is provided, wherein the pipeline pressure drop calculation device based on a Gauss-Legendre integration algorithm with an adaptive integral interval applies the above-mentioned pipeline pressure drop calculation method based on a Gauss-Legendre integration algorithm with an adaptive integral interval, and the pipeline pressure drop calculation device based on a Gauss-Legendre integration algorithm with an adaptive integral interval includes:
[0023] A pipeline division module, used for dividing the target pipeline into multiple pipeline sections;
[0024] A pipe section pressure drop calculation module, used to calculate the pressure drop of each pipe section using a Gauss-Legendre integration algorithm with an adaptive integration interval;
[0025] A total pressure drop calculation module, used to calculate the sum of the pressure drop gradients of each pipe section as the total pressure drop of the target pipeline;
[0026] Wherein, the pipe section pressure drop calculation module specifically includes:
[0027] An initialization submodule, used to initialize the pressure drop of a target pipe section as a first pressure drop; the target pipe section is any pipe section among the multiple pipe sections;
[0028] An inclined pipe liquid holdup determination submodule, used to determine the inclined pipe liquid holdup of a target pipe section under the first pressure drop;
[0029] An interval integration submodule is used to integrate the pressure drop of the target pipe section by intervals using a Gauss-Legendre integration algorithm according to the inclined pipe liquid holdup and the number of intervals of the target pipe section under the first pressure drop, so as to obtain a second pressure drop;
[0030] A judgment submodule, used to judge whether the absolute value of the difference between the second voltage drop and the first voltage drop is less than a preset threshold value, and obtain a judgment result;
[0031] a pipe section pressure drop output submodule, configured to determine that the pressure drop of the target pipe section is the second pressure drop if the judgment result is yes;
[0032] The return submodule is used for updating the first pressure drop to the second pressure drop, updating the number of intervals, and returning to the inclined tube liquid holdup determination submodule if the judgment result is no.
[0033] According to the specific embodiments provided in this application, this application has the following technical effects.
[0034] The present application provides a pipeline pressure drop calculation method and device based on a Gauss-Legendre integration algorithm with an adaptive integral interval. The present application combines the techniques of adaptive integration and Gauss-Legendre integration, uses the adaptive integration method to adjust the number of intervals according to the dynamic deviation of the current integral, and then adjusts the size of the Gauss-Legendre integration interval. It can automatically detect the area of rapid change in the pipeline and refine the interval when necessary, thereby improving the pressure drop calculation accuracy. The Gauss-Legendre integration method is used for interval integration to ensure the pressure drop calculation efficiency. The present application improves the accuracy and efficiency of the pressure drop calculation under the pipeline flow state. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0036] Figure 1 A schematic flow chart of a pipeline pressure drop calculation method based on a Gauss-Legendre integration algorithm with an adaptive integration interval is provided in one embodiment of the present application.
[0037] Figure 2 A schematic diagram of a pipeline pressure drop calculation method based on a Gauss-Legendre integration algorithm with an adaptive integration interval provided in an embodiment of the present application.
[0038] Figure 3 A schematic diagram of a Gauss-Legendre integration algorithm provided in accordance with an embodiment of the present application.
[0039] Figure 4 A schematic diagram of interval division provided in an embodiment of the present application.
[0040] Figure 5 A comparison chart of simulation results provided in an embodiment of the present application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0042] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0043] The embodiment of the present application uses the Gauss-Legendre integration algorithm to predict the pipeline pressure drop. The Gauss-Legendre integration algorithm can provide extremely high calculation accuracy and adaptability when processing pipelines with horizontal, vertical, upward and downward flows.
[0044] In an exemplary embodiment, Figure 1 As shown, a pipeline pressure drop calculation method based on a Gauss-Legendre integration algorithm with an adaptive integration interval is provided, including the following steps 101 to 103.
[0045] Step 101: Divide the target pipeline into multiple pipe sections.
[0046] Step 102, using a Gauss-Legendre integration algorithm with an adaptive integration interval to calculate the pressure drop of each pipe section.
[0047] Step 103, calculating the sum of the pressure drop gradients of each pipe section as the total pressure drop of the target pipeline;
[0048] Among them, Figure 2 As shown, step 102 specifically includes the following steps 201 to 206.
[0049] Step 201, initializing the pressure drop of a target pipe section as a first pressure drop; the target pipe section is any pipe section among a plurality of pipe sections.
[0050] Step 202: determine the inclined pipe liquid holdup of the target pipe section under the first pressure drop.
[0051] Step 203: According to the inclined pipe liquid holdup and the number of intervals of the target pipe section under the first pressure drop, the pressure drop of the target pipe section is integrated by intervals using a Gauss-Legendre integration algorithm to obtain a second pressure drop.
[0052] Step 204: determine whether the absolute value of the difference between the second voltage drop and the first voltage drop is less than a preset threshold, and obtain a determination result.
[0053] Step 205: If the judgment result is yes, determine that the pressure drop of the target pipe section is the second pressure drop.
[0054] Step 206, if the judgment result is no, then the first pressure drop is updated to the second pressure drop, the number of intervals is updated, and the process returns to the step of "determining the inclined pipe liquid holdup of the target pipe section under the first pressure drop".
[0055] Implementing the above steps 101 to 103 can improve the accuracy and efficiency of pressure drop calculation under pipeline flow conditions.
[0056] When performing Beggs-Brill integration, the flow pattern must first be determined, and the flow pattern is divided using the flow pattern division boundary, where the flow pattern division lower boundary L1 and the flow pattern division upper boundary L2 are:
[0057] L1=exp(-4.62-3.757x-0.481x 2 -0.0207x 3 );
[0058] L2=exp(1.061-4.602x-1.609x 2 -0.179x 3 +0.635*10 -3 x 5 );
[0059] x = ln(λ);
[0060] Among them, L1 is the lower bound for flow pattern division, L2 is the upper bound for flow pattern division, x is an intermediate parameter, and λ is the volume liquid holdup of the target pipe section.
[0061] In the embodiments of the present application, the flow pattern is divided by calculating a series of parameters such as the Froude number N FR , the liquid-phase velocity criterion, the volume liquid holdup, and the slope θ. The flow patterns are mainly divided into: separated flow (stratified flow, wavy flow, annular flow): N FR < L1; intermittent flow (slug flow, plug flow): L1 < N FR < L2; dispersed flow (bubble flow, mist flow): N FR > L2.
[0062] Once the flow pattern is determined, each flow pattern has corresponding calculation formulas and parameter adjustment methods. For the liquid holdup of an inclined pipe, it can be expressed as H L (θ) = H L (0) * ψ, ψ = 1 + C * sin(1.8θ) - 1 / 3 * sin 3 (1.8θ); where H L (θ) is the liquid holdup of the inclined pipe of the target pipe section, θ is the slope of the target pipe section, H L (0) is the liquid holdup of the target pipe section in the horizontal state, ψ is the second intermediate parameter, and C is the flow parameter of the target pipe section.
[0063] For different flow patterns, the calculation formulas for the flow parameter C and the liquid holdup H L (0) of the target pipe section in the horizontal state are different.
[0064] When the flow pattern of the target pipe section is separated flow, the calculation formula for the liquid holdup of the target pipe section in the horizontal state is:
[0065]
[0066] Among them, N FR is the Froude number of the target pipe section;
[0067] When the flow pattern of the target pipe section is intermittent flow, the calculation formula for the liquid holdup of the target pipe section in the horizontal state is:
[0068]
[0069] When the flow pattern of the target pipe section is dispersed flow, the calculation formula for the liquid holdup of the target pipe section in the horizontal state is:
[0070]
[0071] When the flow pattern of the target pipe section is separated flow and the target pipe section is an uphill pipe, the calculation formula of the flow parameters of the target pipe section is:
[0072]
[0073] Among them, N FR is the Froude number of the target pipe section, N vl is the liquid phase velocity parameter of the target pipe section;
[0074] When the flow pattern of the target pipe section is separated flow or dispersed flow, and the target pipe section is a downhill pipeline, the calculation formula of the flow parameters of the target pipe section is:
[0075]
[0076] When the flow pattern of the target pipe section is intermittent flow, the calculation formula of the flow parameters of the target pipe section is:
[0077]
[0078] When the flow pattern of the target pipe section is dispersed flow and the target pipe section is an uphill pipeline, the calculation formula of the flow parameters of the target pipe section is:
[0079] C=0.
[0080] Based on the above inclined tube liquid holdup, the Beggs-Brill model can be obtained as follows:
[0081]
[0082] in, represents the pressure change rate, P represents the pressure, Z represents the pipe length, ρ L and ρ G are the liquid density and gas density of the fluid in the target pipe section under the first pressure drop, respectively, H L (θ) is the inclined pipe holdup of the target pipe section, θ is the slope of the target pipe section, g is the gravitational acceleration, f is the friction coefficient of the target pipe section, G is the mass flow rate of the fluid in the target pipe section under the first pressure drop, v is the flow velocity of the fluid in the target pipe section under the first pressure drop, and v sg is the converted velocity of the gas in the target pipe section under the first pressure drop, P1 is the front section pressure in the target pipe section under the first pressure drop, D is the diameter of the target pipe section, and A is the cross-sectional area of the target pipe section.
[0083] By selecting the inclined pipe liquid holdup that matches the flow pattern, the Beggs-Brill model can maintain a high degree of computational accuracy under various complex pipeline layouts and multiphase flow conditions. The Beggs-Brill model is particularly suitable for pipeline pressure drop analysis in different flow directions (such as horizontal and vertical), ensuring reliable fluid behavior simulation under complex industrial conditions. The Beggs-Brill model integrates classical fluid mechanics principles and a variety of empirical models, providing an accurate simulation and analysis method for the behavior of fluids in pipelines.
[0084] In another exemplary embodiment, the above step 202 specifically includes the following steps 301 to 303.
[0085] Step 301, determining the physical parameters of the fluid in the target pipe section under the first pressure drop; the physical parameters include: gas density, liquid density, gas viscosity, liquid viscosity, flow rate, gas volume fraction and liquid volume fraction.
[0086] Step 302: Calculate the Froude number, liquid phase velocity coefficient and volume liquid content of the target pipe section according to the physical parameters of the fluid in the target pipe section under the first pressure drop.
[0087] Step 303, calculating the inclined pipe liquid holdup of the target pipe section under the first pressure drop according to the Froude number, liquid phase velocity coefficient and volume liquid content of the target pipe section.
[0088] In the above calculation process of the inclined pipe liquid holdup, pipeline parameters are also used, including: the length of the pipeline, the diameter of the pipeline and the friction factor (f).
[0089] In another exemplary embodiment, in the above step 201, the formula for initializing the pressure drop of the target pipe section is:
[0090]
[0091] Where f is the friction factor, ΔP0 is the pressure drop of the target pipe section obtained by initialization, D is the diameter of the target pipe section, L is the length of the target pipe section, v is the mixed flow velocity of the fluid in the target pipe section under the first pressure drop, ρ is the mixed density of the fluid in the target pipe section under the first pressure drop, and θ is the slope of the target pipe section.
[0092] In another exemplary embodiment, Figure 3 As shown, in the above step 203, the process of integrating the pressure drop of the target pipe section by interval using the Gauss-Legendre integration algorithm is as follows:
[0093] Initialize the integration interval: Set the starting point a and the end point b of the target pipeline to form the initial integration interval [a, b].
[0094] Gauss-Legendre integration, specifically steps 401 to 405 are as follows:
[0095] Step 401, determine nodes and weights: select an appropriate number of Gaussian nodes K according to the required accuracy n ,Will And determine the corresponding nodes and weights.
[0096] Step 402, calculate the pressure drop integral: perform Gaussian integral calculation on each interval to obtain the pressure drop value:
[0097]
[0098] in, is the discrete form of the Beggs-Brill model computed on the interval .
[0099] Step 403, adaptive integration: Evaluate the error E of the current calculation result. If E is greater than the pre-threshold ε, perform adaptive subdivision:
[0100] Subdivide the current integral interval into smaller subintervals [a,c] and [c,b], such as Figure 4 shown.
[0101] Return to step 401 for the subdivided subintervals, and re-apply the Gauss-Legendre integration method to calculate the voltage drop; evaluate the error of the new calculation result, and determine whether to continue subdividing until the accuracy requirement is met.
[0102] Finally, the pressure drop calculation results of all intervals are integrated to obtain the pressure drop of the target pipe section.
[0103] Among them, the calculation formula of error E in each iteration process is:
[0104] E = |ΔP1-ΔP2|;
[0105] ΔP2=I1+I2+...+I N ;
[0106] Where E is the error, ΔP1 is the first voltage drop, ΔP2 is the second voltage drop, I1, I2 and I N They are the pressure drop values of the 1st, 2nd and Nth intervals respectively.
[0107] In order to more clearly demonstrate the method features, uses and beneficial effects of the present application, the technical solution of the present application is now described in detail below, but this should not be construed as limiting the applicable scope of the present application.
[0108] The simulation parameter settings are shown in Table 1.
[0109] Table 1 Feed composition and mole fraction
[0110] parameter value parameter value Feed temperature / K 323.15 Feed flow rate / (mol / s) 326.491 Feed pressure / kPa 2301.32 Feed molar composition Physical property method PR Propane 0.1116 Pipeline length / m 100 Propylene 0.3414 Inner diameter / m 0.1 Isobutane 0.2746 Pipe height / m 10 Butane 0.0625 Roughness / m 4.57E-05 1-Butene 0.05715 Isobutylene 0.05715 hydrogen 0.0544 Methane 0.0412
[0111] The input parameters are defined as follows:
[0112] 1. Fluid physical parameters:
[0113] Gas density (ρg): obtained based on gas type and temperature.
[0114] Liquid density (ρl): obtained according to liquid type and temperature.
[0115] Gas Viscosity (μg): Find the viscosity of a gas at a specific temperature.
[0116] Liquid Viscosity (μl): Find the viscosity of a liquid at a specific temperature.
[0117] Flow velocity (v): The flow rate of the fluid in the pipe.
[0118] 2. Pipeline parameters:
[0119] Pipeline length (L): Determined according to actual pipeline design.
[0120] Pipeline diameter (D): Determined according to actual pipeline design.
[0121] Roughness (Φ): Determined according to the pipe material.
[0122] The target pipeline is divided into K segments, each segment is Δx, and the initial integral interval for each segment is [a, b], where a and b are the starting point and end point of the segment, respectively.
[0123] like Figure 3 As shown, the process of calculating the pressure drop of each pipe section using the Gauss-Legendre integration algorithm with an adaptive integration interval in the above embodiment is:
[0124] The number of Gaussian nodes K is selected according to the required integration accuracy. The Gaussian-Legendre integral formula is used to calculate the pressure drop in each interval: Among them, K n is the number of selected Gaussian nodes, is the discrete form of the Beggs-Brill model computed on the interval .
[0125] Error evaluation: Calculate the preliminary integration result and evaluate the calculation error E = |ΔP1-ΔP2|. If E>∈(set error threshold), enter the subdivision step.
[0126] Subdividing intervals: Subdivide the current interval [a,b] into two intervals [a,c] and [c,b], where c is the midpoint of the interval [a,b].
[0127] Recalculation: Reapply the Gauss-Legendre integral to each subdivided subinterval and calculate the new I n .
[0128] Loop check: Evaluate the error E of the integral result after subdivision new , if E new >∈, continue to subdivide and repeat the above steps.
[0129] When the errors meet the requirements, the pressure drop of the target pipe section is output.
[0130] The pressure drop calculation results obtained by the above method embodiment are compared with the simulation results and test data of the method for directly solving the Beggs-Brill model (hereinafter referred to as the comparison algorithm), as shown in Tables 2 to 5 and Figure 5 shown.
[0131] Table 2 Comparison between original model and test data
[0132]
[0133]
[0134] Table 3 Comparison of calculation method and test data of this application
[0135] result This application Test data Relative error / % Outlet temperature / ℃ 25.23 24.94 -1.16 Outlet pressure / kPa 2079.56 2084.47 0.24
[0136] Table 4 Comparison of calculated results - pressure distribution along the pipe and test data
[0137] Tube length / m Comparison algorithm / kPa Test data / kPa Relative error / % 0 2301.31 2301.31 0 10 2285.7 2277.05 -0.37 20 2273.46 2255.65 -0.78 30 2261.76 2234.72 -1.2 40 2248.95 2213.76 -1.58 50 2241.11 2192.66 -2.2 60 2229.59 2171.4 -2.67 70 2216.39 2149.96 -3.08 80 2206.65 2128.33 -3.67 90 2189.91 2106.5 -3.95 100 2176.83 2084.47 -4.43
[0138] Table 5 Comparison of calculated results - pressure distribution along the pipe and test data
[0139] Tube length / m This application / kPa Test data / kPa Relative error / % 0 2301.31 2301.31 0 10 2274.31 2277.05 0.12 20 2252.49 2255.65 0.14 30 2231.59 2234.72 0.14 40 2210.43 2213.76 0.15 50 2189.15 2192.66 0.16 60 2167.49 2171.4 0.18 70 2146.09 2149.96 0.18 80 2124.28 2128.33 0.19 90 2102.07 2106.5 0.21 100 2079.56 2084.47 0.24
[0140] By comparing Tables 2 to 5 above, the calculation method of the pressure drop gradient along the pipeline using adaptive integration and Gauss-Legendre integration has higher accuracy than the original model, and the maximum error compared with the test data is less than 1%, which is accurate enough to meet the requirements of industrial processes.
[0141] Compared with other methods, this application has the following obvious advantages:
[0142] (1) Dynamic adjustment: The adaptive integration method has great flexibility and can dynamically adjust the size of the sub-integration interval according to the error of the current integration. In pipeline flow, there may be areas where the flow velocity and pressure drop change sharply, such as near pipe elbows, valves or other flow obstacles. Traditional fixed-step integration methods may produce large errors in these areas. The adaptive integration method can automatically detect these changes and refine the grid when necessary, thereby improving the calculation accuracy. This flexibility enables the method to better adapt to complex flow characteristics, thereby improving the overall calculation efficiency.
[0143] (2) High-precision calculation: The Gauss-Legendre integration method is an efficient numerical integration method, known for its excellent convergence and accuracy. This method optimizes the calculation results by selecting the best integration points and weights within a given interval, and is particularly suitable for processing smooth functions. In the pressure drop calculation of pipeline flow, physical quantities such as flow rate and pressure are usually continuous and smooth, so the Gauss-Legendre integration method can provide very accurate results. This high precision can not only reduce calculation errors, but also provide more reliable data support in key designs, ensuring the safety and efficiency of pipeline systems.
[0144] (3) Improved computational efficiency: Traditional pressure drop calculation methods often require uniform subdivision of the entire pipeline, which may result in large computational complexity and low efficiency. The adaptive integration method effectively reduces the time and resources required for calculation by using small intervals in areas that require refinement and larger intervals in areas with stable changes. At the same time, the high efficiency of the Gauss-Legendre integration method itself further accelerates the calculation process. This combination not only improves computational efficiency, but also makes it possible to analyze large-scale pipeline systems and can quickly provide the required design parameters in practical engineering applications.
[0145] (4) Adaptability to various flow conditions: The design of this method takes into account the different characteristics of single-phase flow and two-phase flow, so that it can be effectively applied under various flow conditions. In the oil and natural gas industries, there are often multiphase flows such as gas-liquid and liquid-solid in the pipeline. The calculation method based on adaptive integration and Gauss-Legendre integration can handle the physical properties and flow states of different fluids. Through appropriate model adjustment and parameter setting, it can maintain high calculation accuracy and stability in various flow environments. This adaptability makes this method an ideal choice for practical applications.
[0146] Based on the same inventive concept, the embodiment of the present application also provides a pipeline pressure drop calculation device based on the Gauss-Legendre integral algorithm with an adaptive integral interval for implementing the pipeline pressure drop calculation method based on the Gauss-Legendre integral algorithm with an adaptive integral interval. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more pipeline pressure drop calculation devices based on the Gauss-Legendre integral algorithm with an adaptive integral interval provided below can refer to the limitations of the pipeline pressure drop calculation method based on the Gauss-Legendre integral algorithm with an adaptive integral interval above, and will not be repeated here.
[0147] In an exemplary embodiment, a pipeline pressure drop calculation device based on a Gauss-Legendre integration algorithm with an adaptive integration interval is provided, comprising:
[0148] The pipeline division module is used to divide the target pipeline into multiple pipe sections.
[0149] The pipe section pressure drop calculation module is used to calculate the pressure drop of each pipe section using the Gauss-Legendre integration algorithm with an adaptive integration interval.
[0150] The total pressure drop calculation module is used to calculate the sum of the pressure drop gradients of each pipe section as the total pressure drop of the target pipeline.
[0151] Wherein, the pipe section pressure drop calculation module specifically includes:
[0152] The initialization submodule is used to initialize the pressure drop of a target pipe section as a first pressure drop; the target pipe section is any pipe section among the multiple pipe sections.
[0153] The inclined pipe liquid holdup determination submodule is used to determine the inclined pipe liquid holdup of the target pipe section under the first pressure drop.
[0154] The interval integration submodule is used to integrate the pressure drop of the target pipe section by intervals using the Gauss-Legendre integration algorithm according to the inclined pipe liquid holdup and the number of intervals of the target pipe section under the first pressure drop to obtain a second pressure drop.
[0155] The judgment submodule is used to judge whether the absolute value of the difference between the second voltage drop and the first voltage drop is less than a preset threshold value, and obtain a judgment result.
[0156] The pipe section pressure drop output submodule is used to determine that the pressure drop of the target pipe section is the second pressure drop if the judgment result is yes.
[0157] The return submodule is used for updating the first pressure drop to the second pressure drop, updating the number of intervals, and returning to the inclined tube liquid holdup determination submodule if the judgment result is no.
[0158] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0159] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A pipeline pressure drop calculation method based on a Gauss-Legendre integration algorithm with an adaptive integration interval, characterized in that: include: Divide the target pipeline into multiple pipe segments; The pressure drop of each pipe section is calculated using the Gauss-Legendre integration algorithm with adaptive integration interval; Calculating the sum of the pressure drop gradients of each pipe section as the total pressure drop of the target pipeline; The pressure drop of each pipe section is calculated using the Gauss-Legendre integration algorithm with an adaptive integration interval, including: Initializing a pressure drop of a target pipe section as a first pressure drop; the target pipe section is any pipe section among the multiple pipe sections; determining the inclined pipe liquid holdup of the target pipe section under the first pressure drop; According to the inclined pipe liquid holdup and the number of intervals of the target pipe section under the first pressure drop, the pressure drop of the target pipe section is integrated by intervals using the Gauss-Legendre integration algorithm to obtain a second pressure drop; Determine whether the absolute value of the difference between the second pressure drop and the first pressure drop is less than a preset threshold value, and obtain a determination result; If the judgment result is yes, determining the pressure drop of the target pipe section to be the second pressure drop; If the judgment result is no, the first pressure drop is updated to the second pressure drop, the number of intervals is updated, and the process returns to the step of "determining the inclined pipe liquid holdup of the target pipe section under the first pressure drop".
2. The pipeline pressure drop calculation method based on the Gauss-Legendre integration algorithm with adaptive integration interval according to claim 1 is characterized in that: Determining the inclined pipe liquid holdup of the target pipe section under the first pressure drop specifically includes: Determine the physical parameters of the fluid in the target pipe section under the first pressure drop; the physical parameters include: gas density, liquid density, gas viscosity, liquid viscosity, flow rate, gas volume fraction and liquid volume fraction; Calculating the Froude number, liquid phase velocity coefficient and volume liquid content of the target pipe section according to the physical parameters of the fluid in the target pipe section under the first pressure drop; The inclined pipe liquid holdup of the target pipe section under the first pressure drop is calculated according to the Froude number, liquid phase velocity coefficient and volume liquid content of the target pipe section.
3. The pipeline pressure drop calculation method based on the Gauss-Legendre integration algorithm with adaptive integration interval according to claim 2 is characterized in that: The calculation formula of Froude number is: Among them, N FR is the Froude number of the target pipe section, v is the flow velocity of the fluid in the target pipe section under the first pressure drop, g is the gravitational acceleration, and D is the diameter of the target pipe section; The calculation formula of liquid phase velocity number is: Among them, N vl is the liquid phase velocity parameter of the target pipe section, v sl is the converted velocity of the liquid in the target pipe section under the first pressure drop, ρ L is the liquid density of the fluid in the target pipe section under the first pressure drop, σ is the surface tension of the liquid in the target pipe section under the first pressure drop; The calculation formula of volume liquid content is: Among them, λ is the volume liquid content of the target pipe section, Q L is the liquid volume fraction of the fluid in the target pipe section under the first pressure drop, Q G is the gas volume fraction of the fluid in the target pipe section under the first pressure drop.
4. The pipeline pressure drop calculation method based on the Gauss-Legendre integration algorithm with adaptive integration interval according to claim 2 is characterized in that: According to the Froude number, liquid phase velocity coefficient and volume liquid content of the target pipe section, the inclined pipe liquid holdup of the target pipe section under the first pressure drop is calculated, specifically including: According to the volume liquid content of the target pipe section, the lower limit of the flow pattern division and the upper limit of the flow pattern division are calculated using the following formula; L1=exp(-4.62-3.757x-0.481x 2 -0.0207x 3 ); L2=exp(1.061-4.602x-1.609x 2 -0.179x 3 +0.635*10 -3 x 5 ); x = ln(λ); Among them, L1 is the lower limit of flow pattern division, L2 is the upper limit of flow pattern division, x is the intermediate parameter, and λ is the volume liquid content of the target pipe section; Determine the flow pattern of the target pipe section according to the Froude number of the target pipe section, the lower limit of the flow pattern division and the upper limit of the flow pattern division; According to the flow pattern, Froude number, liquid phase velocity coefficient and volume liquid content of the target pipe section, the flow parameters of the target pipe section and the liquid holdup of the target pipe section in a horizontal state are calculated; According to the flow parameters of the target pipe section and the liquid holdup of the target pipe section in the horizontal state, the inclined pipe liquid holdup of the target pipe section is calculated using the following formula; H L (θ)=H L (0)*ψ; ψ=1+C*sin(1.8θ)-1 / 3*sin 3 (1.8θ); Where Hx(θ) is the liquid holdup of the inclined pipe of the target pipe section, θ is the slope of the target pipe section, and H L (0) is the liquid holdup of the target pipe section in the horizontal state, ψ is the second intermediate parameter, and C is the flow parameter of the target pipe section.
5. The pipeline pressure drop calculation method based on the Gauss-Legendre integration algorithm with adaptive integration interval according to claim 4 is characterized in that: According to the Froude number of the target pipe section, the lower limit of the flow pattern division and the upper limit of the flow form division, the flow form of the target pipe section is determined, including: When N FR < is less than L1, determine that the flow pattern of the target pipe segment is separated flow; where N FR is the Froude number of the target pipe segment, and L1 is the lower bound for flow pattern division; When L1 ≤ N FR <When L2, determine that the flow pattern of the target pipe section is intermittent flow; L2 is the upper bound for flow pattern division; When N FR When ≥L2, the flow pattern of the target pipe section is determined to be dispersed flow.
6. The pipeline pressure drop calculation method based on the Gauss-Legendre integration algorithm with adaptive integration interval according to claim 4 is characterized in that: When the flow pattern of the target pipe section is separated flow, the calculation formula of the liquid holdup of the target pipe section in the horizontal state is: Among them, N FR is the Froude number of the target pipe section; When the flow pattern of the target pipe section is intermittent flow, the calculation formula of the liquid holdup of the target pipe section in the horizontal state is: When the flow pattern of the target pipe section is dispersed flow, the calculation formula of the liquid holdup of the target pipe section in the horizontal state is:
7. The pipeline pressure drop calculation method based on the Gauss-Legendre integration algorithm with adaptive integration interval according to claim 4 is characterized in that: When the flow pattern of the target pipe section is separated flow and the target pipe section is an uphill pipe, the calculation formula of the flow parameters of the target pipe section is: Among them, N FR is the Froude number of the target pipe section, N vl is the liquid phase velocity parameter of the target pipe section; When the flow pattern of the target pipe section is separated flow or dispersed flow, and the target pipe section is a downhill pipeline, the calculation formula of the flow parameters of the target pipe section is: When the flow pattern of the target pipe section is intermittent flow, the calculation formula of the flow parameters of the target pipe section is: When the flow pattern of the target pipe section is dispersed flow and the target pipe section is an uphill pipeline, the calculation formula of the flow parameters of the target pipe section is: C=0。 8. The pipeline pressure drop calculation method based on the Gauss-Legendre integration algorithm with adaptive integration interval according to claim 1 is characterized in that: According to the inclined pipe liquid holdup and the number of intervals of the target pipe section under the first pressure drop, the pressure drop of the target pipe section is integrated by intervals using the Gauss-Legendre integration algorithm to obtain the second pressure drop, specifically including: Divide the target pipe section into N intervals; N is the number of intervals, N=2t, t is the number of iterations; Determine the Beggs-Brill model according to the inclined pipe liquid holdup of the target pipe section under the first pressure drop; The Gauss-Legendre integration algorithm is used to integrate the Beggs-Brill model in each interval to obtain the pressure drop in each interval; The sum of the pressure drops in each interval is calculated as the second pressure drop.
9. The pipeline pressure drop calculation method based on the Gauss-Legendre integration algorithm with adaptive integration interval according to claim 8 is characterized in that: The Beggs-Brill model is: in, represents the pressure change rate, P represents the pressure, Z represents the pipe length, ρ L and ρ G are the liquid density and gas density of the fluid in the target pipe section under the first pressure drop, respectively, H L (θ) is the inclined pipe holdup of the target pipe section, θ is the slope of the target pipe section, g is the gravitational acceleration, f is the friction coefficient of the target pipe section, G is the mass flow rate of the fluid in the target pipe section under the first pressure drop, v is the flow velocity of the fluid in the target pipe section under the first pressure drop, and v sg is the converted velocity of the gas in the target pipe section under the first pressure drop, P1 is the front section pressure in the target pipe section under the first pressure drop, D is the diameter of the target pipe section, and A is the cross-sectional area of the target pipe section.
10. A pipeline pressure drop calculation device based on a Gauss-Legendre integration algorithm with an adaptive integration interval, characterized in that: The pipeline pressure drop calculation device based on the Gauss-Legendre integration algorithm with an adaptive integral interval applies the pipeline pressure drop calculation method based on the Gauss-Legendre integration algorithm with an adaptive integral interval according to any one of claims 1 to 9, and the pipeline pressure drop calculation device based on the Gauss-Legendre integration algorithm with an adaptive integral interval includes: A pipeline division module, used for dividing the target pipeline into multiple pipeline sections; A pipe section pressure drop calculation module, used to calculate the pressure drop of each pipe section using a Gauss-Legendre integration algorithm with an adaptive integration interval; A total pressure drop calculation module, used to calculate the sum of the pressure drop gradients of each pipe section as the total pressure drop of the target pipeline; Wherein, the pipe section pressure drop calculation module specifically includes: An initialization submodule, used to initialize the pressure drop of a target pipe section as a first pressure drop; the target pipe section is any pipe section among the multiple pipe sections; An inclined pipe liquid holdup determination submodule, used to determine the inclined pipe liquid holdup of a target pipe section under the first pressure drop; An interval integration submodule is used to integrate the pressure drop of the target pipe section by intervals using a Gauss-Legendre integration algorithm according to the inclined pipe liquid holdup and the number of intervals of the target pipe section under the first pressure drop, so as to obtain a second pressure drop; A judgment submodule, used to judge whether the absolute value of the difference between the second voltage drop and the first voltage drop is less than a preset threshold value, and obtain a judgment result; a pipe section pressure drop output submodule, configured to determine that the pressure drop of the target pipe section is the second pressure drop if the judgment result is yes; The return submodule is used for updating the first pressure drop to the second pressure drop, updating the number of intervals, and returning to the inclined tube liquid holdup determination submodule if the judgment result is no.
Citation Information
Cited By
Near-region terrain correction value rapid calculation method based on Gaussian-Legendre integral
CN122110328A