Inversion method for total heat transfer coefficient of oil and gas gathering and transportation pipeline
By establishing a mathematical model of the total heat transfer coefficient in the oil and gas collection and transportation pipeline and using particle swarm algorithm, the problems of difficulty in describing parameter changes and poor accuracy in the existing technology are solved, and the rapid and accurate correction of the total heat transfer coefficient of the pipeline is achieved, and the improvement of the improvement of the total heat transfer coefficient of the pipeline is achieved. Simulation accuracy and efficiency.
Patent Information
- Application Number
- CN202411304033.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2024-12-20
AI Technical Summary
The existing simulation methods for oil and gas collection and transportation pipelines are difficult to accurately describe the changes in key parameters of the pipelines, and the adjustment time is long and the accuracy is poor, which affects the accuracy of the thermal simulation results.
By establishing the relationship between the temperature boundary conditions and the total heat transfer coefficient at both ends of the pipeline, a mathematical model of the total heat transfer coefficient in the oil and gas collection and transportation pipeline is proposed, and the particle swarm algorithm is used to solve the model to realize the total heat transfer coefficient at different locations of the pipeline. correction.
The model modeling process is simplified, the simulation accuracy is improved, the detection time and cost are reduced, and the total heat transfer coefficient of the pipeline is achieved quickly and accurately corrected.
Smart Images

Figure CN119167777A_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of oil and gas pipeline transportation and processing, and in particular relates to an inversion method for the total heat transfer coefficient of an oil and gas gathering and transportation pipeline. Background Art
[0002] With the digital transformation of energy, traditional oil and gas gathering and transportation pipelines will develop into digital oil and gas gathering and transportation pipelines, which means that oil and gas gathering and transportation pipeline simulation technology will become the most common way to optimize the design and operation management of oil and gas gathering and transportation pipeline systems. The computer simulation technology of the oil and gas gathering and transportation pipeline network system can quantify the flow and change process of oil and gas gathering and transportation in the pipeline network based on the mathematical representation of the pipeline network flow process, so as to accurately predict and trace the operating status of each gas source, user, pipeline, and equipment in the pipeline network system. It is the core technology for realizing the safe and efficient design and operation management of the pipeline network system.
[0003] However, the accuracy of software simulation is often limited by the accuracy of simulation model parameters, which affects the judgment of pipeline operation status and timely and effective decision-making management. The total heat transfer coefficient of oil and gas gathering and transportation pipelines is an important parameter that affects the thermal changes of pipelines. The soil temperature field around the pipeline changes with factors such as pipeline start-up and shutdown, seasonal operating conditions, etc., which affects the total heat transfer coefficient of the pipeline, resulting in large deviations in thermal simulation results. Manual adjustment generally relies on experience to judge the parameters that cause errors, and tries to adjust the parameter values to reduce the errors. Generally speaking, the whole process is time-consuming and inefficient, and the correction accuracy is generally ±5%, which still has room for further improvement.
[0004] Therefore, the present invention proposes a mathematical model for inversion of the total heat transfer coefficient of the oil and gas gathering and transportation pipeline, as well as a method and application for establishing the model, by establishing a relationship between the temperature boundary conditions at both ends of the pipeline and the total heat transfer coefficient along the pipeline. This solves the problem that the existing method has a complex mathematical model establishment process and a long detection time, and avoids blindness in the detection process and unnecessary cost and time consumption. Summary of the invention
[0005] The present invention provides an inversion method for the total heat transfer coefficient of an oil and gas gathering and transportation pipeline. Combined with pipeline operation parameters, the total heat transfer coefficient correction at different positions of the pipeline is realized, overcoming the problems that the existing simulation method for oil and gas gathering and transportation pipelines is difficult to describe the changes in key parameters of the pipeline, has a long adjustment time and poor accuracy.
[0006] The above-mentioned total heat transfer coefficient inversion method of an oil and gas gathering and transportation pipeline comprises the following steps:
[0007] Step 1: Collect basic data and operation data of oil and gas gathering and transportation pipelines, including the components of the transport medium, pipeline length, inner diameter of the pipeline, and pipeline mass flow, starting pressure, starting temperature, end pressure and end temperature data sets under various steady-state operating conditions;
[0008] Step 2: Determine whether the pipeline needs to perform an inversion operation on the total heat transfer coefficient. There are many ways to determine whether the pipeline needs to perform an inversion operation on the total heat transfer coefficient. The present invention uses pipeline simulation technology to calculate whether the deviation between the simulated value and the measured value of the pipeline endpoint temperature reaches a set threshold, so as to determine whether an inversion correction of the total heat transfer coefficient of the pipeline is required. Specifically, the following steps are included:
[0009] Step 2.1, use OLGA software to model the pipeline to be tested and set basic data, including pipeline length, pipeline inner diameter and gas composition;
[0010] Step 2.2, setting boundary conditions, including setting the end pressure, starting temperature and mass flow rate. Through simulation calculation, the starting pressure and end temperature of the pipeline under the boundary conditions can be obtained, and the relative deviation between the simulated value and the measured value of the end temperature can be calculated;
[0011] Step 2.3, according to the obtained pipeline operation data set, repeat step 2.2 to obtain the simulated value of the pipeline terminal temperature under various working conditions, and calculate the relative deviation between the simulated value and the measured value of the terminal temperature; calculate the average value of the relative deviation of all working conditions. If it exceeds 5%, it is considered that the total heat transfer coefficient inversion is required, and go to step three.
[0012] Step 3: Based on the pipeline basic data and operation data set obtained in step 1, the total heat transfer coefficient inversion mathematical model of the oil and gas gathering and transportation pipeline is established through mathematical formula derivation:
[0013] Step 3.1, based on the discretization idea of the finite difference method, divide the pipeline to be solved into n pipe segment grids and n+1 cross sections. Figure 1 Shown is a schematic diagram of pipeline discretization.
[0014] For the first pipeline grid, according to GB50350-2015 "Oilfield Oil and Gas Gathering and Transportation Design Code", the fluid temperature of the oil and gas gathering and transportation pipeline can be calculated as follows:
[0015]
[0016] Where: T 1 ——The temperature of the first section of the pipeline, the subscript indicates the section number, K;
[0017] T 2 ——Temperature of the second section of the pipeline, K;
[0018] K 1 ——Total heat transfer coefficient of the first grid, the subscript indicates the grid number;
[0019] b 1 ——The first grid calculation coefficient, the subscript indicates the grid number;
[0020] L——pipeline length, m;
[0021] n——grid number;
[0022] T w ——Soil temperature of buried pipeline, K;
[0023] M——pipeline flow rate, kg / s;
[0024] D——inner diameter of the pipe, m;
[0025] c 1 ——Specific heat capacity of the first grid at constant pressure, J / kg.C. The subscript indicates the grid number.
[0026] Step 3.2: For the second pipeline grid, the mathematical relationship (1) is also established:
[0027]
[0028] Multiply equation (1) by And add it to formula (3) to eliminate T 2 , we can get:
[0029]
[0030] For all grids, the relationship shown in formula (1) can be established. Repeat the above elimination operation to eliminate the unknown node temperature in the middle of the pipeline, and obtain the mathematical relationship between the starting and ending temperatures of the pipeline and the total heat transfer coefficient of each grid pipeline:
[0031]
[0032] Taking the natural logarithm of formula (5), it can be written as follows:
[0033]
[0034] Step 3.3, for m operating conditions, repeat steps 3.1 and 3.2 to obtain the mathematical relationship between the starting and ending temperatures of the pipeline and the total heat transfer coefficient of each grid pipeline under different operating conditions. The superscript represents the operating condition number, and the combined relationship can be obtained:
[0035]
[0036] make:
[0037]
[0038] In summary, formula (7) can be written as follows, which is the established mathematical model for the inversion of the total heat transfer coefficient of the oil and gas gathering and transportation pipeline section:
[0039]
[0040] Step 3.4, the coefficient b calculation requires the constant pressure specific heat capacity of the grid. The specific heat capacity of the i-th grid is calculated as follows:
[0041] c i =B+2CT i +3D c (T i ) 2 +4E(T i ) 3 +5F(T i ) 4 (10)
[0042] Among them, B, C, D c , E, F are calculation coefficients, which can be obtained by consulting the specific heat capacity calculation constant table. To calculate the specific heat capacity of each grid of the pipeline, it is necessary to know the temperature of each section. When only the starting and ending temperatures of the pipeline are known, the temperature of the internal section of the pipeline can be calculated by the Sukhov formula (1) after the total heat transfer coefficient of each grid of the pipeline is known. Therefore, the coefficient b is regarded as a function of the total heat transfer coefficient:
[0043] b 1 =f(K 1 ) (11)
[0044] Formula (9) can be written as:
[0045]
[0046] The problem of solving the nonlinear equation system of formula (12) is equivalently transformed into the problem of solving function optimization.
[0047]
[0048] The objective function is:
[0049]
[0050] In the formula, g j (X), j = 1, 2, ..., m represents the residual of the jth equation, K = {K 1 ,K 2 ,…,K n} represents the optimization variable.
[0051] Step 4: There are many methods for solving the optimization problem of formula (14). The present invention adopts a particle swarm algorithm to solve it.
[0052] The specific steps are as follows:
[0053] Step 4.1, particle swarm algorithm parameter setting; the particle dimension N is the total number of sections of the oil and gas gathering and transportation pipeline, that is, the number of variables to be determined; the population size is set to 5 times the particle dimension.
[0054] The particle population size is PSize, the current iteration number is t, the particle dimension is s (s = 1, 2, 3, ..., N), and the position of the rth (r = 1, 2, 3, ..., PSize) particle in the population is defined as:
[0055] x r (t) = [x r,1 (t),...,x r,s (t),...,x r,N (t)] (15)
[0056] The velocity of the rth particle is:
[0057] v r (t) = [v r,1 (t),...,v r,s (t),...,v r,N (t)] (16)
[0058] The historical optimal position of the rth particle is:
[0059] pbest r (t) = [p r,1 (t),p r,2 (t),...,p r,d (t)] (17)
[0060] The historical optimal position in the entire population is:
[0061] gbest(t)=[g 1 (t),...,g s (t),...,g N (t)] (18)
[0062] Where: v – iteration speed;
[0063] x – position of the particle;
[0064] t——number of iterations of the current algorithm;
[0065] r——the rth particle individual in the population;
[0066] s——the sth dimension of the particle;
[0067] pbest r ——The historical optimal position of the rth particle;
[0068] gbest——optimal position of population;
[0069] Step 4.2, the fitness function is designed as follows:
[0070]
[0071] Step 4.3, arbitrarily select an operating condition to calculate the total heat transfer coefficient of the pipeline using formula (20), and select 0.8 to 1.2 times of this value as the value range of the initial position of the particle. The initial position of each particle is randomly generated within this range.
[0072]
[0073] Step 4.4, calculate the fitness value of the population particle; first, for the first working condition, based on the position of the particle, calculate the temperature of each section of the pipeline and the specific heat capacity of each grid according to the starting temperature of the pipeline through formula (1) and formula (10), and then calculate each grid coefficient b through formula (2); calculate F through formula (8) according to the starting temperature of the pipeline, the end temperature, the buried temperature, the length of the pipeline and the number of pipeline sections; then calculate g(K) under this working condition, repeat the above steps to calculate g(K) under all working conditions, and substitute it into formula (19) to calculate the fitness value of the particle. Calculate the fitness value of each particle in the population, and sort them to obtain the individual optimal value pbest of each particle at present. r (t) and gbest(t) of the global optimal value of the population.
[0074] Step 4.5: The algorithm termination condition is that the difference between the fitness value of the best individual after the last iteration and the fitness value of the best individual after this iteration is less than the set value. Determine whether the iteration termination condition is met. If not, use formula (21) to update the particle velocity and formula (22) to update the particle position, and then re-enter step 4.4; if the termination condition is met, exit the program and output the position parameters of the best particle.
[0075] v r,s (t+1)=ωv r,s (t)+c 1 r 1 (pbest r,s (t)-x r,s (t))+c 2 r 2 (gbest s (t)-x r,s (t)) (21)
[0076] x r,s (t+1)=x r,s (t)+v r,s (t+1) (22)
[0077] Where: r 1 , r 2 ——A random number in the interval [0, 1];
[0078] c1 , c 2 ——Learning factor, a constant in the interval [0, 2];
[0079] ω——Inertia weight factor.
[0080] The present invention adopts the above technical solution, and can achieve the following beneficial effects:
[0081] Based on the temperature drop formula of oil and gas gathering and transportation pipelines, a mathematical model for the total heat transfer coefficient inversion of oil and gas gathering and transportation pipelines under various working conditions is established through formula derivation, and it is converted into an optimization problem. The particle swarm algorithm is used to solve the model to obtain the true total heat transfer coefficient value of each grid of the pipeline. The method of the present invention only needs to obtain the flow, pressure, and temperature parameters of the pipeline, and the inversion model of the total heat transfer coefficient of the pipeline is simple to model, and has the advantages of clear calculation process, convenient operation, and easy implementation. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] Figure 1 It is a schematic diagram of pipeline discrete processing of the present invention.
[0083] Figure 2 It is a schematic diagram of the process of the present invention.
[0084] Figure 3 A total heat transfer coefficient inversion method for oil and gas gathering and transportation pipelines provided for the implementation of the present invention adopts a particle swarm algorithm to solve the change of the total heat transfer coefficient of the optimal individual pipeline section during the iteration process. DETAILED DESCRIPTION
[0085] In order to make the purpose, technical scheme and advantages of the present invention more clear, the present invention is now described in detail with reference to examples. Example: The transport composition of the XY pipeline is 98% methane, 1% ethane, and 1% propane. The total length of the pipeline is 20,000 m, the outer diameter of the pipeline is 457 mm, the wall thickness is 7.1 mm, the soil temperature is 6°C, and the total heat transfer coefficient of the pipeline is 1.2.
[0086] Step 1: Collect basic data of XQDS pipeline: The composition of the transport medium is 98% CH 4 , 1%C 2 H 4 , 1%C 3 H 8 The total length of the pipeline is 20000m, the outer diameter of the pipeline is 273mm, the wall thickness is 6.4mm, the soil temperature is 6℃, the total heat transfer coefficient is 1.2, and the operating parameters at both ends of the pipeline are shown in Table 1 below.
[0087] Table 1 XQDS pipeline operation parameter set
[0088]
[0089]
[0090] Step 2: Through pipeline simulation technology, the terminal temperature simulation values of these 20 operating conditions are simulated and compared with the measured values, see Table 2.
[0091] Table 2 Comparison of XQDS pipeline simulation values and measured values
[0092] Serial number Simulation end point temperature (℃) Measured endpoint temperature (℃) deviation 1 14.25 13.38 6.50% 2 15.84 14.90 6.33% 3 17.48 16.47 6.11% 4 19.14 18.07 5.88% 5 20.82 19.71 5.65% 6 17.18 16.24 5.81% 7 13.78 13.03 5.74% 8 21.15 19.98 5.90% 9 15.29 14.47 5.65% 10 19.71 18.60 5.96% 11 22.62 21.38 5.83% 12 23.83 22.49 5.93% 13 11.37 10.80 5.29% 14 16.62 15.72 5.70% 15 19.39 18.34 5.69% 16 17.38 16.55 5.02% 17 22.11 21.02 5.21% 18 16.06 15.21 5.59% 19 15.11 14.36 5.17% 20 18.42 17.48 5.35%
[0093] It can be seen from Table 2 that the average deviation between the temperature simulation value and the measured value is greater than 5%, so the total heat transfer coefficient of the pipeline is inverted.
[0094] Step 3: divide the pipeline grid number into n=20, establish the inverse mathematical model of the pipeline total heat transfer coefficient shown in formula (12), and transform it into the optimization problem of formula (14).
[0095] Step 4: Use particle swarm algorithm to solve the mathematical model of step 3.
[0096] Step 4.1, particle swarm algorithm parameter setting; the particle dimension N is the total number of sections of the oil and gas gathering and transportation pipeline, that is, N = 20; the population size is set to 5 times the particle dimension, that is, 100.
[0097] Step 4.2, the fitness function is designed as shown in formula (19).
[0098] Step 4.3, for condition 1, the total heat transfer coefficient of the pipeline is calculated from the starting temperature and the end temperature to be 1.27. Therefore, the value range of the initial position of each particle is [1.016, 1.524].
[0099] Step 4.4, calculate the fitness value of all particles in the population and obtain the individual optimal value pbest of each particle at present r (t) and gbest(t) of the global optimal value of the population.
[0100] Step 4.5, determine whether the iteration termination condition is met. If not, use equation (21) to update the particle velocity, equation (22) to update the particle position, and then re-enter step 3.4; if the termination condition is met, exit the program and output the position parameters of the optimal particle. Figure 3 The iterative changes of the total heat transfer coefficient values of different pipeline sections of the optimal individual are shown. Table 3 shows the deviation between the simulation value and the measured value of the optimal individual brought into the simulation model. The simulation accuracy has increased significantly. The main reason for this phenomenon is that the soil along the pipeline section is saline-alkali soil, which is highly corrosive, resulting in damage to the external insulation layer of the pipeline, poor insulation effect, and a large thermal conductivity.
[0101] Table 3 Comparison of pipeline simulation values and measured values after inversion
[0102] Serial number End point temperature of simulation after inversion (℃) Measured endpoint temperature (℃) deviation 1 13.46 13.38 0.60% 2 14.99 14.90 0.57% 3 16.56 16.47 0.54% 4 18.17 18.07 0.51% 5 19.80 19.71 0.49% 6 16.33 16.24 0.57% 7 13.12 13.03 0.68% 8 20.07 19.98 0.47% 9 14.56 14.47 0.63% 10 18.70 18.60 0.50% 11 21.47 21.38 0.44% 12 22.59 22.49 0.41% 13 10.89 10.80 0.79% 14 15.81 15.72 0.59% 15 18.44 18.34 0.52% 16 16.65 16.55 0.61% 17 21.12 21.02 0.48% 18 15.30 15.21 0.62% 19 14.46 14.36 0.68% 20 17.58 17.48 0.56%
[0103] The improvement of this method is that the total heat transfer coefficient in the actual pipeline is difficult to calculate directly, and the proposed mathematical model for the inversion of the total heat transfer coefficient of the oil and gas gathering and transportation pipeline is simple to model and can reflect the changes in the total heat transfer coefficient values at different positions in the pipeline. Inspired by the above-mentioned ideal embodiment of the present invention and through the above-mentioned description, the relevant staff can make various changes and modifications without departing from the scope of the present invention. The inversion method for the total heat transfer coefficient of the oil and gas gathering and transportation pipeline proposed in the present invention has the characteristics of clear calculation process and convenient operation, overcomes the problems of inaccurate parameter values of key parameters and low efficiency of manual parameter debugging, and provides guidance for the safe, economical and efficient design and operation management of oil and gas gathering and transportation pipelines.
Claims
1. A method for inverting the total heat transfer coefficient of an oil and gas gathering and transportation pipeline, characterized in that: The following steps are involved: Step 1: Collect basic data and operation data of oil and gas gathering and transportation pipelines, including the components of the transport medium, pipeline length, inner diameter of the pipeline, and pipeline mass flow, starting pressure, starting temperature, end pressure and end temperature data sets under various steady-state operating conditions; Step 2: Use pipeline simulation to calculate whether the difference between the simulated value and the measured value of the pipeline endpoint temperature reaches a set threshold, and determine whether to perform an inversion of the total heat transfer coefficient of the pipeline; Step 3: Based on the pipeline basic data and operation data set obtained in step 1, an inversion mathematical model of the total heat transfer coefficient of the oil and gas gathering and transportation pipeline is established through mathematical formula derivation, and converted into an optimization problem; Step 4: Use the particle swarm algorithm to solve the optimization problem in step 3 and obtain the true total heat transfer coefficient value of each grid pipeline.
2. The method for inverting the total heat transfer coefficient of an oil and gas gathering and transportation pipeline according to claim 1, characterized in that: The inverse mathematical model of the total heat transfer coefficient of the oil and gas gathering and transportation pipeline established in step 3 is as follows: The pipeline is discretized and m operating condition data are combined to establish the inverse mathematical model of the total heat transfer coefficient of the oil and gas gathering and transportation pipeline: Where: m——Number of pipeline operating conditions; j——pipeline operation condition number; n——Number of pipeline discrete grids; i——pipe section / grid number; F is calculated as follows: Where: T1 is the temperature of the first section of the pipeline, the subscript indicates the section number, K; T n+1 ——the temperature of the n+1th section of the pipeline, K; L——pipeline length, m; T w ——Soil temperature of buried pipeline, K; The coefficient b is calculated as follows: Where: M——pipeline flow rate, kg / s; D——inner diameter of the pipe, m; c——specific heat capacity at constant pressure; c is calculated as follows: c i =B+2CT i +3D c (T i ) 2 +4E(T i ) 3 +5F(T i ) 4 (4) Among them, B, C, D c , E, F are calculation coefficients, which can be found by consulting the table of specific heat capacity calculation constants; The temperature of each section is calculated as follows: In the method for inverting the total heat transfer coefficient of an oil and gas gathering and transportation pipeline according to claim 1, the inverted optimization problem of the total heat transfer coefficient of an oil and gas gathering and transportation pipeline established in step 3 is as follows: The coefficient b is considered as a function of the overall heat transfer coefficient: b i =f(K i ) (6) The mathematical model of formula (1) is transformed into a function optimization problem: The objective function is: In the formula, g j (X), j = 1, 2, ..., m represents the residual of the jth operating condition equation, K = {K1, K2, ..., K n } represents the optimization variable, the total heat transfer coefficient of each grid.
