A method for assigning calorific values to complex pipe networks with multiple gas sources

By using the node solution equation method and the Gauss Sedal iterative method in the multi-gas source pipeline network, the problem of insufficient dynamicity and accuracy of heat generation assignment in the traditional method is solved, and fast and accurate heat generation calculation is achieved, which is suitable for large-scale complex pipeline networks.

CN119249737BActive Publication Date: 2025-07-08SOUTHWEST PETROLEUM UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411348999.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-26
Publication Date
2025-07-08
Estimated Expiration
2044-09-26

AI Technical Summary

Technical Problem

The traditional multi-gas source pipeline heat generation assignment method lacks dynamicity and accuracy, and it is difficult to reflect the gas components and heat distribution in real time. It has high computational complexity and is difficult to achieve real-time application in large-scale pipelines.

Method used

The correlation matrix and node equation method based on the pipeline network topology are adopted, combined with the multi-gas source pipeline component tracking model, and the iterative process and the Gauss Sedaer iterative method are used to calculate the pipeline flow, pressure and gas source ratio to achieve fast and accurate heat generation assignment.

Benefits of technology

It improves the accuracy and calculation efficiency of heat generation assignment, ensures the accuracy of gas supply quality and metering, adapts to the dynamic changes of multi-gas source complex pipelines, and reduces the computational complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119249737B_ABST
    Figure CN119249737B_ABST
Patent Text Reader

Abstract

The present invention provides a method for assigning calorific values to a complex pipeline network with multiple gas sources. This method uses a steady-state simulation model of the natural gas pipeline network as the underlying model, and couples a pipeline component tracking and calorific value assignment model for multiple gas sources. During the iteration process of key parameters, a convergence deviation is set to ensure the calculation accuracy, so as to realize the rapid and accurate assignment of calorific values to each node of the pipeline network, make up for the deficiencies of traditional calorific value assignment methods, and effectively solve the problem of calorific value assignment in a pipeline network with multiple gas sources. It not only provides a reliable guarantee for the efficient management of the natural gas pipeline network, but also provides certain technical support for promoting the transformation of the pipeline metering method.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of calorific value assignment for multi-gas-source pipe networks, and particularly to a method for assigning calorific values to complex multi-gas-source pipe networks. Background Art

[0002] In a pipe network system supplied with multiple gas sources, the gas compositions and calorific values of different gas sources often vary, such as the proportions of hydrocarbons such as methane, ethane, and propane, as well as the mixing degrees of inert gases such as carbon dioxide and nitrogen. These factors directly affect the total calorific value of natural gas. To optimize energy utilization and rationally allocate the gas supply of each gas source, each node in the pipe network needs to know the gas composition and calorific value information in real time. However, traditional pipe network management methods are difficult to cope with the dynamics and uncertainties of complex multi-gas-source pipe networks, resulting in many problems in the assignment of gas composition and calorific value.

[0003] In a complex pipe network supplied with multiple gas sources, accurately assigning gas composition and calorific value to each node of the pipe network has multiple necessities. First, it can help pipe network operators understand the gas quality status in the pipe network in real time, thus ensuring that the gas supply safety and quality meet national standards. Second, accurate calorific value information is the basis for energy trade and metering, and plays an important role in protecting the interests of upstream and downstream users and both parties in energy transactions. In addition, a reasonable assignment method can optimize pipe network dispatching, reduce energy losses, and improve the overall operation efficiency. Therefore, it is of great practical significance to propose an effective method for assigning calorific values to complex multi-gas-source pipe networks.

[0004] Currently, traditional methods for assigning calorific values to pipe networks are mainly based on empirical formulas, linear interpolation, and steady-state simulation. These methods often have the following problems:

[0005] (1) Lack of dynamics: Traditional methods usually ignore the real-time dynamic changes of gas flow in the pipe network and cannot reflect the gas composition and calorific value distribution of each node in real time, which leads to lagging assignment results and is difficult to meet the requirements of modern pipe network management.

[0006] (2) Insufficient assignment accuracy: Assignment methods based on empirical formulas and linear interpolation cannot accurately handle the complex component changes after mixing of multiple gas sources, resulting in insufficient accuracy in calorific value calculation, which may affect the accuracy of gas supply quality and energy metering.

[0007] (3) High calculation complexity: Although some steady-state simulation methods can improve the assignment accuracy to a certain extent, their calculation processes are complex and it is difficult to achieve real-time application in large-scale pipe networks, which limits their popularization in actual operation.

[0008] Therefore, there is an urgent need for a calorific value assignment method that can dynamically adapt to the complex pipeline network environment with multiple gas sources to improve the accuracy and real-time performance of the assignment. The present invention provides a calorific value assignment method for a complex pipeline network with multiple gas sources. Using the steady-state simulation model of the natural gas pipeline network as the underlying model, coupling the pipeline component tracking and calorific value assignment model for multiple gas sources, a convergence deviation is set in the iteration process of key parameters, and rapid assignment of the calorific value of each node in the pipeline network is realized on the premise of ensuring the calculation accuracy, effectively making up for the deficiencies of the traditional method. Summary of the Invention

[0009] The present invention provides a calorific value assignment method for a complex pipeline network with multiple gas sources, characterized by including the following steps:

[0010] S1: Based on the pipeline network topology structure, generate an incidence matrix A, input the basic pipeline network parameters, set the node pressure convergence deviation and the initial values of the flow rates of each pipeline;

[0011] The basic pipeline network parameters include the gas quality components of the gas sources, the pipeline length, the pipeline inner diameter, the pipeline roughness, the pipeline ambient temperature, the node pressure boundary, and the node load boundary;

[0012] The initial flow rate of the pipeline is a fixed value determined according to historical production data;

[0013] S2: Adopt the solution node equation method, construct a pipeline admittance matrix based on the initial pipeline flow rate, back-calculate the pipeline flow rate and node pressure, and substitute them into the hydraulic calculation formula of the gas transmission pipeline to calculate the pipeline pressure drop;

[0014] S3: Based on the back-calculation results of the flow rate and pressure and the BWRS equation, calculate the physical properties parameters of natural gas, and the physical properties parameters include density, compressibility factor, dynamic viscosity, and specific heat at constant pressure;

[0015] S4: Determine the actual pipeline direction according to the calculation results of the pipeline flow rate and node pressure, solve the heat equation, and calculate the pipeline temperature drop, average temperature, and node temperature;

[0016] S5: Set the initial gas source ratio of the nodes, construct a gas source ratio calculation equation set, and complete the solution by using the Gauss-Seidel iteration to determine the gas source ratio of the nodes;

[0017] S6: Based on the calculation results of the water-heat parameters, calculate the flow time of natural gas in each pipeline to complete the calorific value assignment of the nodes.

[0018] Preferably, the specific steps of S2 are as follows:

[0019] S201: According to the impedance S calculation formula, transform the hydraulic calculation formula of the gas transmission pipeline into a linear equation set expression form, as shown in the following formula:

[0020] Impedance S calculation formula:

[0021] Hydraulic calculation formula for gas transmission pipeline:

[0022] Converted pressure drop calculation formula: In the formula, S is the pipeline impedance; Δp is the pipeline pressure drop; Q is the volume flow rate under standard conditions; P Q is the pipeline starting point pressure; P Z is the pipeline end point pressure; D is the pipeline inner diameter; λ is the hydraulic friction coefficient; L is the pipeline length; T0 is the standard temperature; P0 is the standard pressure; R is the gas constant of air; is the pressure drop of pipeline j in the k-th iteration; is the impedance of pipeline j in the k-th iteration; is the flow rate of pipeline j in the (k - 1)-th iteration, and for the initial iteration, it takes the value of the initial pipeline flow rate; is the flow rate of pipeline j in the k-th iteration; is the relative pressure of node i in the k-th iteration;

[0023] S202: According to the node relative pressure calculation formula, construct the linear relationship between pipeline flow rate and pressure drop, as shown in the following formula:

[0024] Node relative pressure formula:

[0025] Linear relationship between pipeline flow rate and pressure drop: In the formula, p0 is the reference node pressure, generally taking the gas source node; is the pressure of node i in the k-th iteration; is the admittance of pipeline j in the k-th iteration;

[0026] S203: Represent the relationship between pipeline flow rate and pressure drop of the pipe network in matrix form, and construct the admittance matrix. The process is shown in the following formula:

[0027] Matrix form of pipeline flow rate and pressure drop: Q = GΔP

[0028] Admittance matrix:

[0029] In the formula, Q is the flow rate vector; G is the admittance matrix; ΔP is the pressure drop vector;

[0030] S204: Based on the node continuity equation, convert the converted pressure drop formula into matrix form, substitute it into the matrix form of pipeline flow rate and pressure drop, obtain the node pressure calculation equation set and pipeline flow rate calculation equation set, and calculate the node pressure and pipeline flow rate by back calculation. The process is shown in the following formula:

[0031] Node continuity equation: AQ = q

[0032] Node pressure calculation equations: AGA T P = q

[0033] Pipeline flow calculation equations: Q = GΔP = GA T P

[0034] Wherein, P is the node relative pressure vector; q is the node load vector;

[0035] S205: Substitute the calculated results of node pressure and pipeline flow into the gas transmission pipeline hydraulic calculation formula to calculate the pipeline pressure drop;

[0036] S206: Calculate the node pressure deviation in the iterative process and compare it with the convergence deviation. If the calculated deviation is less than the convergence deviation, output the calculation results; otherwise, repeat S202 - S205 until the convergence deviation is satisfied;

[0037]

[0038] Wherein, ε p is the node pressure convergence deviation.

[0039] Preferably, it is characterized in that the specific steps of S4 are as follows:

[0040] S401: Determine the actual pipeline route according to the calculated results of pipeline flow and node pressure in S2;

[0041] S402: Determine the number of nodes connected by the pipeline and judge whether node N i is a gas source node. If it is a gas source node, assign values according to historical data. If it is not a gas source node, calculate it through the node temperature calculation formula as shown in the following formula:

[0042]

[0043] Wherein, T out is the temperature flowing out of node i; m in is the mass flow rate flowing into node i; T in is the temperature flowing into node i; m out is the mass flow rate flowing out of node i;

[0044] S403: Calculate the pipeline temperature drop and average temperature according to the actual pipeline flow direction. The calculation formulas are as shown in the following formulas:

[0045] Pipeline temperature drop calculation formula:

[0046]

[0047] Pipeline average temperature calculation formula: Wherein, T Zis the temperature at the end of the pipeline; T0 is the ambient temperature of the pipeline; a is a dimensionless parameter; L is the length of the pipeline; T Q is the temperature at the starting point of the pipeline; D i is the Joule-Thomson coefficient; K is the total heat transfer coefficient of the pipeline; M is the mass flow rate of the gas; T Z is the average temperature of the pipeline.

[0048] Preferably, it is characterized in that the specific steps of S5 are as follows:

[0049] S501: Set the initial gas source ratio of the node according to historical data, and construct a gas source ratio calculation equation as shown in the following formula:

[0050]

[0051] In the formula, is the ratio of gas source j flowing out of node i; is the ratio of gas source j flowing into node i. If gas source j is located at node i, the ratio of gas source j is 100%; is the mass flow rate flowing into node i; is the mass flow rate flowing out of node i;

[0052] S502: Use the Gauss-Seidel iteration to solve the gas source ratio calculation equation for each node in the pipe network;

[0053] S503: Calculate the deviation between the gas source ratio result and the result of the previous iteration as shown in the following formula. If the deviation is within the convergence deviation range, the solution ends, and the hydraulic and thermal parameters for the next iteration are corrected; otherwise, repeat S502 until the convergence deviation requirement is met;

[0054]

[0055] In the formula, ε y is the convergence deviation of the node gas source ratio.

[0056] Preferably, it is characterized in that the specific steps of S6 are as follows:

[0057] S601: According to the node instantaneous velocity and pipeline average velocity calculation formulas, construct a flow time formula to calculate the flow time of natural gas in the pipeline as shown in the following formula:

[0058] Node instantaneous velocity calculation formula:

[0059] Pipeline average velocity calculation formula:

[0060] Flow time calculation formula: In the formula, Q p is the flow rate of pipeline p; Ti is the temperature of node i; p i is the pressure of node i; v i is the instantaneous velocity of node i; v j is the average flow velocity of pipe section p; Δt l is the flow time of natural gas through pipe p;

[0061] S602: By calculating the flow time of the gas components of the gas source to the station to be assigned, the natural gas components of the node to be assigned are assigned and calculated. The formula is as follows:

[0062] X y (x, t) = X y (0, t - Δt)

[0063]

[0064] In the formula, X j (x, t) is the mole fraction of natural gas component y at the node to be assigned at a distance of x km from the gas source at time t; Δt is the natural gas flow time from the gas source to the station to be assigned;

[0065] S603: According to the assignment result of the components of the node to be assigned, the calorific value of the node is assigned. The calorific value assignment formula is as follows:

[0066]

[0067] In the formula, is the calorific value of the ideal gas at the node to be assigned at a distance of x km from the gas source at time t; is the calorific value of the ideal gas of component y; H x,t is the calorific value of the actual gas at the node to be assigned at a distance of x km from the gas source at time t; Z x,t is the natural gas compression factor at the node to be assigned at a distance of x km from the gas source at time t.

[0068] In summary, the present invention has the following beneficial effects:

[0069] (1) Improve the assignment accuracy: The traditional calorific value assignment method cannot accurately handle the complex component changes after the mixing of multiple gas sources, resulting in insufficient accuracy of the calculation results. By introducing a steady-state simulation model and a multi-gas-source pipeline component tracking model, the present invention can track the gas component changes of each node, realize the accurate assignment of the calorific value of each node, thereby improving the assignment accuracy and ensuring the accuracy of gas supply quality and metering;

[0070] (2) Improve calculation efficiency: The traditional steady-state simulation method has a high computational complexity and is difficult to be applied in real time in large-scale pipe networks. The present invention uses the solution node equation method, which has low requirements for initial values, excellent convergence performance, and high calculation accuracy, to solve the underlying steady-state simulation model, and can achieve rapid assignment of each node in the pipe network while ensuring accuracy, thereby improving the real-time application ability in large-scale complex pipe networks. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] Figure 1 is a flowchart of the method

[0072] Figure 2 is a topological structure diagram of the pipe network

[0073] Figure 3 is the calculation result of the gas source ratio of the node DETAILED IMPLEMENTATION MANNER

[0074] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Apparently, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0075] As Figure 1 shown, a method for assigning calorific values to a multi-gas-source complex pipe network based on the DFS algorithm provided by the present invention is characterized by including the following steps:

[0076] S1: Based on the topological structure of the pipe network, generate an incidence matrix A, input the basic parameters of the pipe network, and set the node pressure convergence deviation and the initial values of the flow rates of each pipeline;

[0077] The basic parameters of the pipe network include gas source gas composition, pipeline length, pipeline inner diameter, pipeline roughness, pipeline ambient temperature, node pressure boundary, and node load boundary;

[0078] The initial flow rate of the pipeline is a fixed value determined according to historical production data;

[0079] S2: Adopt the solution node equation method, construct a pipeline admittance matrix based on the initial flow rate of the pipeline, calculate the pipeline flow rate and node pressure by back-calculation, and substitute them into the hydraulic calculation formula of the gas transmission pipeline to calculate the pipeline pressure drop;

[0080] S3: Based on the results of the back-calculation of flow rate and pressure and the BWRS equation, calculate the physical properties of natural gas, and the physical properties include density, compressibility factor, dynamic viscosity, and specific heat at constant pressure;

[0081] S4: Determine the actual pipeline route based on the calculated results of pipeline flow rate and node pressure, solve the thermal equation, and calculate the pipeline temperature drop, average temperature, and node temperature;

[0082] S5: Set the initial gas source ratio of the node, construct a calculation equation set for the gas source ratio, and use the Gauss-Seidel iteration to complete the solution to determine the gas source ratio of the node;

[0083] S6: Based on the calculation results of water and thermal parameters, calculate the natural gas flow time in each pipeline and complete the assignment of node calorific value.

[0084] In one embodiment, the specific steps of the said S2 are as follows:

[0085] S201: According to the impedance S calculation formula, transform the hydraulic calculation formula of the gas transmission pipeline into a linear equation set expression form as shown in the following formula:

[0086] Impedance S calculation formula:

[0087] Hydraulic calculation formula of the gas transmission pipeline:

[0088] Transformed pressure drop calculation formula: In the formula, S is the pipeline impedance; Δp is the pipeline pressure drop; Q is the volume flow rate under standard conditions; P Q is the pipeline starting point pressure; P Z is the pipeline end point pressure; D is the pipeline inner diameter; λ is the hydraulic friction coefficient; L is the pipeline length; T0 is the standard temperature; P0 is the standard pressure; R is the gas constant of air; is the pressure drop of pipeline j in the k-th iteration; is the impedance of pipeline j in the k-th iteration; is the flow rate of pipeline j in the (k - 1)-th iteration, and for the initial iteration, the value is the initial pipeline flow rate; is the flow rate of pipeline j in the k-th iteration; is the relative pressure of node i in the k-th iteration;

[0089] S202: According to the node relative pressure calculation formula, construct the linear relationship between pipeline flow rate and pressure drop as shown in the following formula:

[0090] Node relative pressure formula:

[0091] Linear relationship between pipeline flow rate and pressure drop: In the formula, p0 is the reference node pressure, generally taking the gas source node; is the pressure of node i in the k-th iteration; is the admittance of pipeline j in the k-th iteration;

[0092] S203: Represent the relationship between the pipeline flow rate and pressure drop of the pipeline network in matrix form, and construct the admittance matrix. The process is shown in the following formula:

[0093] Matrix form of pipeline flow rate and pressure drop: Q = GΔP

[0094] Admittance matrix:

[0095] In the formula, Q is the flow rate vector; G is the admittance matrix; ΔP is the pressure drop vector;

[0096] S204: Based on the node continuity equation, transform the transformed pressure drop formula into matrix form, substitute it into the matrix form of pipeline flow rate and pressure drop, obtain the node pressure calculation equations and pipeline flow rate calculation equations, and calculate the node pressure and pipeline flow rate by back calculation. The process is shown in the following formula:

[0097] Node continuity equation: AQ = q

[0098] Node pressure calculation equations: AGA T P = q

[0099] Pipeline flow rate calculation equations: Q = GΔP = GA T P

[0100] In the formula, P is the node relative pressure vector; q is the node load vector;

[0101] S205: Substitute the calculated results of node pressure and pipeline flow rate into the hydraulic calculation formula of the gas transmission pipeline to calculate the pipeline pressure drop;

[0102] S206: Calculate the node pressure deviation in the iterative process and compare it with the convergence deviation. If the calculated deviation is less than the convergence deviation, output the calculation result; otherwise, repeat S202 - S205 until the convergence deviation is satisfied;

[0103]

[0104] In the formula, ε p is the node pressure convergence deviation.

[0105] In an embodiment, the specific steps of the said S4 are as follows:

[0106] S401: Determine the actual pipeline route according to the calculated results of pipeline flow rate and node pressure in S2;

[0107] S402: Determine the number of nodes connected by the pipeline, and judge whether the node N i is a gas source node. If it is a gas source node, assign values according to historical data; if it is not a gas source node, calculate it through the node temperature calculation formula, as shown in the following formula:

[0108]

[0109] In the formula, T out is the temperature flowing out of node i; m in is the mass flow rate flowing into node i; T in is the temperature flowing into node i; m out is the mass flow rate flowing out of node i;

[0110] S403: Calculate the temperature drop and average temperature of the pipeline according to the actual flow direction of the pipeline. The calculation formula is as follows:

[0111] Calculation formula for pipeline temperature drop:

[0112]

[0113] Calculation formula for average pipeline temperature: In the formula, T Z is the temperature at the end of the pipeline; T0 is the ambient temperature of the pipeline; a is a dimensionless parameter; L is the length of the pipeline; T Q is the temperature at the starting point of the pipeline; D i is the Joule-Thomson coefficient; K is the total heat transfer coefficient of the pipeline; M is the mass flow rate of the gas; T Z is the average temperature of the pipeline.

[0114] In one embodiment, the specific steps of S5 are as follows:

[0115] S501: Set the initial gas source ratio of the node according to historical data and construct a gas source ratio calculation equation as follows:

[0116]

[0117] In the formula, is the ratio of gas source j flowing out of node i; is the ratio of gas source j flowing into node i. If gas source j is located at node i, the ratio of gas source j is 100%; is the mass flow rate flowing into node i; is the mass flow rate flowing out of node i;

[0118] S502: Use the Gauss-Seidel iteration to solve the gas source ratio calculation equation for each node in the pipe network;

[0119] S503: Calculate the deviation between the gas source ratio result and the result of the previous iteration as follows. If the deviation is within the convergence deviation range, the solution is terminated, and the hydraulic and thermal parameters for the next iteration are corrected; otherwise, repeat S502 until the convergence deviation requirement is met;

[0120]

[0121] In the formula, ε y is the convergence deviation of the node gas source ratio.

[0122] In one embodiment, the specific steps of S6 are as follows:

[0123] S601: According to the node instantaneous velocity and pipeline average velocity calculation formulas, construct a flow time formula to calculate the flow time of natural gas in the pipeline, as shown in the following formula:

[0124] Node instantaneous velocity calculation formula:

[0125] Pipeline average velocity calculation formula:

[0126] Flow time calculation formula: In the formula, Q p is the flow rate of pipeline p; T i is the temperature of node i; p i is the pressure of node i; v i is the instantaneous velocity of node i; v j is the average flow velocity of pipe section p; Δt l is the flow time of natural gas through pipeline p;

[0127] S602: By calculating the flow time for the gas components of the gas source to reach the station to be assigned, the natural gas component of the node to be assigned is calculated and assigned, and the formula is as shown in the following formula:

[0128] X y (x,t) = X y (0,t - Δt)

[0129]

[0130] In the formula, X j (x,t) is the mole fraction of the natural gas component y at the node to be assigned, which is x km away from the gas source, at time t; Δt is the flow time of natural gas from the gas source to the station to be assigned;

[0131] S603: According to the component assignment result of the node to be assigned, assign the calorific value of the node, and the calorific value assignment formula is as shown in the following formula:

[0132]

[0133] In the formula, is the ideal gas calorific value of the node to be assigned, which is x km away from the gas source, at time t; is the ideal gas calorific value of component y; H x,t is the actual gas calorific value of the node to be assigned, which is x km away from the gas source, at time t; Zx,t is the natural gas compression factor of the node to be assigned at x km away from the gas source at time t.

[0134] To prove that the calorific value assignment method for a multi-gas-source complex pipe network provided by the present invention can quickly and accurately assign the calorific value of each node in the pipe network and effectively solve the problem of calorific value assignment in a multi-gas-source pipe network, taking a certain domestic multi-gas-source pipe network as an example, an example analysis is carried out. The topological structure of this pipe network is as Figure 2 shown. From Figure 2 it can be seen that this pipe network has a total of 34 nodes, 39 pipelines, 7 basic loops and 3 gas sources, among which nodes n1, n8 and n31 are gas source nodes, named gas source 1, gas source 2 and gas source 3 respectively. The structural parameters of this pipe network are shown in Table 1, the node boundary conditions are shown in Table 2, and the components of each gas source are shown in Table 3. Set the initial pipeline flow rate to 100 m 3 / h, and the node pressure convergence deviation ε p and the gas source ratio convergence deviation ε y are both 10 -6 . For calorific value assignment, the overall solution time is 21 s, and a total of 945 iterations are carried out to reach the convergence deviation.

[0135] Table 1 Pipe network structure parameters

[0136]

[0137]

[0138] Table 2 Node boundary conditions

[0139]

[0140] Note: A negative flow represents the gas supply flow. Since n1, n8, and n31 are all gas sources, the flow boundary is negative.

[0141] Table 3 Gas source component parameters

[0142]

[0143] Taking the simulation results of the mainstream simulation software TGNET in the pipe network field as a benchmark, the error conditions of the node pressure, node temperature and pipeline flow rate solution results are shown in Tables 4 to 6. It can be seen from Table 4 that the calculation error of the node pressure in this pipe network is small, the maximum relative error is 0.051%, and the average relative error is 0.012%; it can be seen from Table 5 that the calculation results of the node temperature in the pipe network are highly consistent with the simulation results, the maximum relative pressure error is 0.410%, and the average relative error is 0.130%; it can be seen from Table 6 that the calculation results of the pipeline flow rate in the pipe network are stable within a small range, the maximum relative pressure is 0.092%, and the average relative error is 0.012%.

[0144] Table 4 Node Pressure Calculation Results

[0145]

[0146] Table 5 Node Temperature Calculation Results

[0147]

[0148]

[0149] Table 6 Pipeline Flow Calculation Results

[0150]

[0151] The calculation results of the gas source ratio of the pipe network are as Figure 3 shown. From Figure 3 it can be seen that, from Figure 3 it can be known that the proportion of gas source 1 at nodes n1 to n5 is 100%, indicating that its gas quality components are only affected by gas source 1; the proportion of gas source 2 at nodes n7 to n9 is 100%, indicating that its gas quality components are only affected by gas source 2; the proportion of gas source 3 at nodes n24 to n34 is 100%, indicating that its gas quality components are only affected by gas source 3; the remaining nodes receive the gas from the 3 upstream gas source nodes at the same time, resulting in the gas quality components and calorific value of these nodes being affected by these three gases at the same time. Among them, the proportion of gas source 2 is the highest, followed by gas source 3, and the proportion of gas source 1 is the least. When the gas quality of the 3 gas sources fluctuates, 15 nodes such as n6, n10, and n11 are most affected by the gas quality fluctuation of gas source 2.

[0152] The comparison between the calorific value assignment results of each node and the node calorific value results obtained by TGNET simulation is shown in Table 7. As can be seen from Table 7, the calorific value of each node assigned by this method is basically the same as the node calorific value results obtained by TGNET simulation, indicating that the constructed steady-state simulation model of the multi-gas-source pipe network has high accuracy, can simulate the gas distribution in the pipe network, analyze the influence range of the gas source, can quickly and accurately assign the calorific value of each node in the pipe network, make up for the deficiencies of the traditional calorific value assignment method, and effectively solve the problem of calorific value assignment in the multi-gas-source pipe network.

[0153] Table 7 Node Calorific Value Calculation Results

[0154]

[0155] The above are only the embodiments of this specification, and are not used to limit this specification. For those skilled in the art, various changes and modifications can be made to this specification. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included within the scope of the claims of this specification.

Claims

1. A calorific value assignment method for a multi-gas-source complex pipe network, characterized in that, It includes the following steps: S1: Based on the pipe network topology, generate the incidence matrix A, input the basic pipe network parameters, set the node pressure convergence deviation and the initial values of the flow rates of each pipeline; The basic pipe network parameters include the gas source gas quality components, pipe length, pipe inner diameter, pipe roughness, pipe ambient temperature, node pressure boundary and node load boundary; The initial flow rate of the pipeline is a fixed value determined according to historical production data; S2: Adopt the solution node equation method, construct the pipeline admittance matrix based on the initial pipeline flow rate, back-calculate the pipeline flow rate and node pressure, substitute them into the gas transmission pipeline hydraulic calculation formula, and calculate the pipeline pressure drop; The specific steps of S2 are as follows: S201: According to the impedance S calculation formula, transform the gas transmission pipeline hydraulic calculation formula into a linear equation expression form, as shown in the following formula: Impedance S calculation formula: Hydraulic calculation formula for gas transmission pipeline: Calculation formula for the pressure drop after conversion: Where S is the pipeline impedance; Δp is the pipeline pressure drop; Q is the volume flow rate under standard conditions; P Q is the pipeline starting pressure; P Z is the pipeline ending pressure; D is the pipeline inner diameter; λ is the hydraulic friction coefficient; L is the pipeline length; T0 is the standard temperature; P0 is the standard pressure; R is the gas constant of air; is the pressure drop of pipeline j in the k-th iteration; is the impedance of pipeline j in the k-th iteration; is the flow rate of pipeline j in the (k - 1)-th iteration. For the first iteration, it takes the value of the initial pipeline flow rate; is the flow rate of pipeline j in the k-th iteration; is the relative pressure of node i in the k-th iteration; S202: According to the node relative pressure calculation formula, construct the linear relationship between the pipeline flow rate and pressure drop, as shown in the following formula: Node relative pressure formula: Linear relationship between pipeline flow rate and pressure drop: Wherein, p0 is the pressure of the reference node, and the reference node is taken as the gas source node; is the pressure of node i at the k-th iteration; is the admittance of pipeline j at the k-th iteration; S203: Represent the relationship between the pipeline flow rate and pressure drop of the pipe network in matrix form, construct the admittance matrix, and the process is as shown in the following formula: Matrix form of pipeline flow rate and pressure drop: Q = GΔP Admittance matrix: In the formula, Q is the flow rate vector; G is the admittance matrix; ΔP is the pressure drop vector; S204: Based on the node continuity equation, transform the transformed pressure drop formula into matrix form, substitute it into the matrix form of the pipeline flow rate and pressure drop, obtain the node pressure calculation equation set and the pipeline flow rate calculation equation set, and back-calculate the node pressure and pipeline flow rate. The process is as shown in the following formula: Node continuity equation: AQ = q Node pressure calculation equations: AGA T P = q Pipe flow calculation equations: Q = GΔP = GA T P In the formula, P is the node relative pressure vector; q is the node load vector; S205: Substitute the calculation results of the node pressure and pipeline flow rate into the gas transmission pipeline hydraulic calculation formula to calculate the pipeline pressure drop; S206: Calculate the node pressure deviation in the iterative process and compare it with the convergence deviation. If the calculated deviation is less than the convergence deviation, output the calculation result; otherwise, repeat S202 - S205 until the convergence deviation is satisfied; where ε p is the convergence deviation of the node pressure; S3: Based on the flow rate and pressure back-calculation results and the BWRS equation, calculate the natural gas physical property parameters. The physical property parameters include density, compressibility factor, dynamic viscosity and specific heat at constant pressure; S4: Determine the actual pipeline orientation according to the calculation results of the pipeline flow rate and node pressure, solve the heat equation, and calculate the pipeline temperature drop, average temperature and node temperature; S5: Set the initial gas source ratio of the nodes, construct the gas source ratio calculation equation set, and complete the solution by using the Gauss - Seidel iteration to determine the gas source ratio of the nodes; S6: Based on the calculation results of the water - heat - force parameters, calculate the natural gas flow time in each pipeline and complete the node heat value assignment.

2. The method for assigning calorific value to a multi-gas-source complex pipe network according to claim 1, wherein The specific steps of S4 are as follows: S401: Determine the actual pipeline orientation according to the calculation results of the pipeline flow rate and node pressure in S2; S402: Determine the number of nodes for pipeline connection and judge whether node N i is a gas source node. If it is a gas source node, assign values according to historical data. If it is not a gas source node, calculate using the node temperature calculation formula as shown below: where, T out is the temperature flowing out of node i; m in is the mass flow rate flowing into node i; T in is the temperature flowing into node i; m out is the mass flow rate flowing out of node i; S403: According to the actual pipeline flow direction, calculate the pipeline temperature drop and average temperature. The calculation formula is as shown in the following formula: Calculation formula for temperature drop of pipeline: Calculation formula for average pipeline temperature: where, T Z is the temperature at the end of the pipeline; T0 is the ambient temperature of the pipeline; a is a dimensionless parameter; L is the length of the pipeline; T Q is the temperature at the starting point of the pipeline; D i is the Joule-Thomson coefficient; K is the total heat transfer coefficient of the pipeline; M is the mass flow rate of the gas; T Z is the average temperature of the pipeline.

3. The method for assigning calorific value to a multi-gas-source complex pipe network according to claim 1, characterized in that, The specific steps of S5 are as follows: S501: Set the initial gas source ratio of the nodes according to historical data and construct the gas source ratio calculation equation, as shown in the following formula: In the formula, is the proportion of gas source j flowing out of node i; is the proportion of gas source j flowing into node i. If gas source j is located at node i, the proportion of gas source j is 100%; is the mass flow rate flowing into node i; is the mass flow rate flowing out of node i; S502: Adopt the Gauss - Seidel iteration to complete the solution of the gas source ratio calculation equation for each node in the pipe network; S503: Calculate the deviation between the gas source ratio result and the result of the previous iteration as shown in the following formula. If the deviation is within the convergence deviation range, the solution ends, and the hydraulic and thermal parameters for the next iteration are corrected; otherwise, repeat S502 until the convergence deviation requirement is met. where ε y is the convergence deviation of the node gas source ratio.

4. A method for assigning calorific values to a multi-gas-source complex pipe network according to claim 1, characterized in that, The specific steps of the aforementioned S6 are as follows: S601: Construct a flow time formula based on the node instantaneous velocity and the pipeline average velocity calculation formula to calculate the flow time of natural gas in the pipeline as shown in the following formula: Instantaneous velocity calculation formula for nodes: Calculation formula for average pipeline velocity: Flow time calculation formula: Where, Q p is the flow rate of pipeline p; T i is the temperature of node i; p i is the pressure of node i; v i is the instantaneous velocity of node i; v j is the average flow velocity of pipeline segment p; Δt l is the flow time of natural gas through pipeline p; S602: Assign values to the natural gas components at the node to be assigned by calculating the flow time of the gas components of the gas source reaching the station to be assigned. The formula is as shown in the following formula: X y (x, t) = X y (0, t - Δt) where X j (x, t) is the molar fraction of natural gas component y at the node to be assigned values at a distance of x km from the gas source at time t; Δt is the flow time of natural gas from the gas source to the station to be assigned values; S603: Assign the calorific value of the node according to the component assignment result of the node to be assigned. The calorific value assignment formula is as shown in the following formula: In the formula, is the calorific value of the ideal gas at the node to be assigned at a distance of x km from the gas source at time t; is the calorific value of the ideal gas of component y; H x,t is the calorific value of the actual gas at the node to be assigned at a distance of x km from the gas source at time t; Z x,t is the natural gas compression factor at the node to be assigned at a distance of x km from the gas source at time t.

Citation Information

Patent Citations

  • Modeling method for collaborative operation of power system and natural gas system

    CN108062599A

  • Natural gas pipeline network gas calorific value prediction method suitable for mixed gas source

    CN113987943A