Method, System and Electronic Device for Determining Component Distribution of Steady-State Natural Gas Pipeline Network

By constructing a calculation model for component distribution and gas source proportion of steady-state natural gas pipeline network, and using direct LU decomposition method, the calculation problems of gas component distribution and gas source proportion in the natural gas pipeline network are solved, ensuring stable gas quality and pipeline safety for downstream users.

CN115712973BActive Publication Date: 2025-07-25PIPECHINA SOUTH CHINA CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211468600.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-22
Publication Date
2025-07-25
Estimated Expiration
2042-11-22

AI Technical Summary

Technical Problem

The existing steady-state simulation technology of natural gas pipeline network cannot calculate the distribution of gas components and the proportion of gas sources at any node of the pipeline network, especially when natural gas from different gas sources is mixed in the pipeline network, it may affect the gas quality and safety of downstream users.

Method used

By constructing the component distribution calculation model and gas source proportion calculation model for steady-state natural gas pipeline network, the direct LU decomposition method is used to solve large linear equations, and the gas components and gas source proportions at any position are calculated.

Benefits of technology

The determination of gas components and fluid calorific value at any location in the fully stable natural gas pipeline network is achieved, ensuring the stability of gas quality for downstream users, and improving the precise regulation and traceability of the pipeline network, especially providing guarantees for the safety of hydrogen-doped natural gas pipelines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115712973B_ABST
    Figure CN115712973B_ABST
Patent Text Reader

Abstract

The present invention relates to the technical field of natural gas pipeline networks, and in particular to a method, a system, and an electronic device for determining the component distribution of a steady-state natural gas pipeline network. The method includes: obtaining the gas components of each gas source point in the steady-state natural gas pipeline network; constructing a calculation model for the component distribution of the steady-state natural gas pipeline network; and calculating the gas components at any position in the steady-state natural gas pipeline network according to the gas components of each gas source point and the component distribution calculation model. It can calculate the gas components at any position in the entire steady-state natural gas pipeline network, and then can determine the changes in the calorific value and Wobbe index of the fluid in the steady-state natural gas pipeline network, ensuring the stable gas use quality of downstream users.
Need to check novelty before this filing date? Find Prior Art

Description

Background Art

[0002] In the natural gas pipeline industry, natural gas from different sources may be mixed and transported in the same pipeline network. Therefore, the gas transported in the pipeline network contains many different components. Some components have small differences, while some have quite large differences in physical properties, resulting in complex and diverse mixing processes. For example, when the H2 component with extremely large component differences is mixed with the NG component, since the gas constant of the H2 component exceeds that of the NG component by one order of magnitude, the flow velocity difference between the H2 component and the NG component in the pipeline is relatively large. Therefore, after mixing these two components, stratified flow or local hydrogen accumulation may occur. Moreover, the high heating value (HHV) of the H2 component is 1 / 3 of that of the NG component by volume, but 3 times that of the NG component by mass, which will also cause huge fluctuations in the calorific value of the mixed gas, thus affecting the gas use quality of downstream users. When two different natural gas (NG) components are mixed with each other and their physical property differences are very small, they can often be completely and evenly mixed. When impurity components such as N2, H2O, and H2S are mixed with the NG component, since the gas constants of the N2 component and the H2S component are approximately half of that of the NG component, this may cause a slight flow velocity difference between these components and the flowing gas. However, due to their low content, they can be regarded as uniform mixing. When dealing with a natural gas pipeline network with a determined gas source, the mixing process can be handled based on the physical property differences between constant components. When the gas source components are uncertain, it is necessary to consider various processes of mixing among multiple gas components with different physical property differences and the changes in the flow properties and gas quality of the gas after mixing.

[0003] At present, the steady-state simulation technology of natural gas pipeline networks can simulate the starting and ending pressures, temperatures, outlet pressures of each compressor station, and pipeline throughput by establishing complex pipeline hydraulic and thermal calculation models and non-pipeline element characteristic equation models. The steady-state simulation speed of large and complex pipeline networks can reach within 10 s, leading the international level, and the calculation error can be controlled within 7%. However, the current steady-state simulation technology of natural gas pipeline networks has not yet been able to calculate the gas component distribution, gas source proportion, and gas calorific value at any node in the pipeline network. In particular, the natural gas from different gas sources will be mixed and transported in the same network. When the gas from these gas sources with large differences in calorific value and Wobbe index is mixed in the middle reaches of the pipeline network, it is very likely to affect the gas use quality and gas interchangeability of downstream users. For industrial users, gas interchangeability can be solved through the way of dedicated line gas supply. However, for a large number of residential users, the way of dedicated line gas supply is difficult to apply. Moreover, when hydrogen is transported in the pipeline, due to the danger of the H2 component and its extremely large difference in physical property parameters from the NG component, local accumulation is likely to occur. Therefore, it is necessary to conduct steady-state simulation for the gas component distribution, gas source proportion, and gas calorific value at any node in the pipeline network.

[0004] In summary, the current steady-state simulation technology for natural gas pipelines can achieve steady-state simulation of pressure, temperature, throughput, and compressor power along the pipeline, but lacks relevant technologies for simulating the component distribution at any node of the pipeline network. Therefore, it is necessary to propose a method for calculating the component distribution under the steady-state operation of a natural gas pipeline network, which can be used to calculate the component distribution under the steady-state operation of a natural gas pipeline network. Summary of the Invention

[0005] The technical problem to be solved by the present invention is to provide a method and system for determining the component distribution of a natural gas pipeline network under steady-state operation in view of the deficiencies of the prior art.

[0006] The technical solution of a method for determining the component distribution of a steady-state natural gas pipeline network according to the present invention is as follows:

[0007] Obtain the gas components of each gas source point in the steady-state natural gas pipeline network;

[0008] Construct a calculation model for the component distribution of the steady-state natural gas pipeline network;

[0009] According to the gas components of each gas source point and the component distribution calculation model, calculate the gas components at any position in the steady-state natural gas pipeline network.

[0010] The technical solution of a system for determining the component distribution of a steady-state natural gas pipeline network according to the present invention is as follows:

[0011] It includes an acquisition module, a construction module, and a calculation module;

[0012] The acquisition module is used to: obtain the gas components of each gas source point in the steady-state natural gas pipeline network;

[0013] The construction module is used to: construct a calculation model for the component distribution of the steady-state natural gas pipeline network;

[0014] The calculation module is used to: according to the gas components of each gas source point and the component distribution calculation model, calculate the gas components at any position in the steady-state natural gas pipeline network.

[0015] The beneficial effects of the technical solution of the present invention are as follows:

[0016] It can calculate the gas components at any position in a fully steady-state natural gas pipeline network, and then determine the changes in the calorific value and Wobbe index of the fluid in the steady-state natural gas pipeline network, ensuring the stable gas quality of downstream users. At the same time, for a hydrogen-blended natural gas pipeline, it can also determine the proportion of hydrogen components at each position in the pipeline network. Since hydrogen components may be explosive and pipeline hydrogen blending may cause "hydrogen embrittlement" and pipeline failure, this model is also of great significance for ensuring the safe operation of pipelines. Through the steady-state natural gas pipeline network gas source proportion calculation model, the proportion of each gas source at any position in the pipeline network can be calculated. When there are problems with the gas quality of downstream users, it is sometimes necessary to trace the source to clarify the gas source composition of the user node, so as to control the problem from the source. Therefore, this model is of great significance for the precise regulation of the pipeline network and improving the traceability ability. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a schematic flow chart of a method for determining the component distribution of a steady-state natural gas pipeline network according to an embodiment of the present invention;

[0018] Figure 2 It is a schematic diagram of the complete mixing rule;

[0019] Figure 3 It is a schematic diagram of the technical effect of the present invention;

[0020] Figure 4 It is a schematic diagram of a combined natural gas pipeline network;

[0021] Figure 5 It is a schematic structural diagram of a system for determining the component distribution of a steady-state natural gas pipeline network according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0022] As Figure 1 shown, a method for determining the component distribution of a steady-state natural gas pipeline network according to an embodiment of the present invention includes the following steps:

[0023] S1. Obtain the gas components of each gas source point in the steady-state natural gas pipeline network. The steady-state natural gas pipeline network refers to a natural gas pipeline network operating in a steady state. Among them, obtaining the gas components of each gas source point in the steady-state natural gas pipeline network is well-known to those skilled in the art and will not be elaborated here;

[0024] S2. Construct a component distribution calculation model for the steady-state natural gas pipeline network;

[0025] S3. Calculate the gas components at any position in the steady-state natural gas pipeline network according to the gas components of each gas source point and the component distribution calculation model. Specifically:

[0026] For a steady-state natural gas pipeline network, the following three basic assumptions can be adopted, specifically as follows:

[0027] 1) The gas components at each gas source point do not change with time;

[0028] 2) The natural gas components in each pipeline in the steady-state natural gas pipeline network remain consistent;

[0029] 3) The natural gas in the pipelines of the steady-state natural gas pipeline network flows out from the nodes after being uniformly mixed at the nodes. Then, the solution can be obtained through the following steps:

[0030] S10. Initial value setting. At the beginning of the calculation, obtain the gas components of all gas source points. Regarding the hydraulic calculation results as known, the fluid flow direction, volume flow rate in all pipeline components of the steady-state natural gas pipeline network, and the gas source point throughput are also input as known quantities;

[0031] S11. Construct a calculation model for the component distribution of the steady-state natural gas pipeline network:

[0032] For the steady-state natural gas pipeline network, the component complete mixing rule is adopted at the nodes, and its equation is: Where: α Ei is the calculated component molar fraction of pipeline i flowing into this node; Q Ei is the volume flow rate of pipeline i flowing into this node, m 3 / s. For M nodes, M such equations can be established. For the component constraints in the pipeline, it is considered that the pipeline and the upstream node connected to it contain the same components. Therefore, its component constraint is: α Ei = α Ni (up) E , α Ei is the molar fraction of component i in the E-th component, α Ni (up) E is the molar fraction of component i at the upstream node N in the E-th component. Therefore, E constraint equations can be established for E components.

[0033] For a steady-state natural gas pipeline network, the connection information of the steady-state natural gas pipeline network also needs to be obtained to establish the above component constraint equations into a component distribution calculation model. For a steady-state natural gas pipeline network, the relationship between each node is nothing more than three types:

[0034] 1) For the calculation node A, if node B is the upstream node of node A, the value of node B associated with node A in the incidence matrix is 1, indicating that the fluid flows from node B into the calculation node A.

[0035] 2) For the calculation node A, if node C is the downstream node of node A, the value of node C associated with node A in the incidence matrix is -1, indicating that the fluid flows from the calculation node A into node C.

[0036] 3) For computing node A, if there is no connection between node D and node A, the value of node D associated with node A in the incidence matrix is 0, indicating no connection between the two nodes.

[0037] The above criterion can be expressed as:

[0038]

[0039] Integrate the elements containing the connection information of each node in the pipe network into the pipe network incidence matrix M, separate the elements with values of 1 or 0 and the elements with a value of -1 and represent them respectively as and consisting of the matrix defined as M + , consisting of consisting of the matrix defined as M - , then the component mixing equation of the pipe network nodes can be expressed as:

[0040]

[0041] In the above formula, the subscript ij represents the pipe connecting the computing node i and node j, and Q and a respectively represent the fluid volume flow rate and the component mole fraction in the pipe flowing into the computing node i.

[0042] If there is no pipe connection between the computing node i and node j, then Q ij and a ij are 0. Or express the above formula in vector form, that is:

[0043] M + Q in α in = α·M + Q in

[0044] Similarly, the component constraint equation in the component can be expressed as:

[0045]

[0046] In the above formula, e ij represents the volume flow rate flowing out of the computing node i, m 3 / s. Similarly, the above formula can also be expressed in vector form:

[0047] Q out = |M - |α

[0048] M + Q in α in = α·M + Q in and Q out ​= |M - |α is the component distribution calculation model of the steady-state natural gas pipeline network.

[0049] S12. Use the direct LU decomposition method to solve the equations:

[0050] The component distribution calculation model of the steady-state natural gas pipeline network is a large-scale linear equation set. For a linear equation set, the direct LU decomposition method can be used for solution. The direct LU decomposition method is as follows: For the linear equation set Ax = b, where x is the matrix composed of the parameters to be solved, A is the matrix composed of the coefficients of the parameters to be solved, and b is the matrix composed of the results on the right side of the equation. For a model with n unknowns, n equations are required for constraint. Therefore, the A matrix can be expressed as an n-order matrix, that is:

[0051]

[0052] Use the following formula for matrix decomposition:

[0053]

[0054] The original matrix A can be decomposed into a unit lower triangular matrix L and an upper triangular matrix U, and the solution is carried out through the following calculation formula:

[0055] Ly = b

[0056] Uα = y

[0057]

[0058]

[0059] Thus, the gas components at any position in the steady-state natural gas pipeline network are calculated.

[0060] Optionally, in the above technical solution, it further includes:

[0061] S4. Construct the gas source proportion calculation model of the steady-state natural gas pipeline network and apply boundary conditions to the gas source proportion calculation model;

[0062] S5. According to the gas source proportion calculation model with boundary conditions applied, calculate the gas source proportion at any position in the steady-state natural gas pipeline network. Specifically:

[0063] For the gas source proportion of the steady-state natural gas pipeline network, it can be regarded as a special "component". That is, for the calculation of the gas source point, the proportion of this "component" is 1, while for other gas source points, the proportion of this "component" is 0. Therefore, the gas source proportion calculation model adopts the same constraint equations and solution methods as the component distribution calculation model, except that there are slight differences in the setting of the initial values.

[0064] S20. Set the boundary conditions of the gas source proportion calculation model: The boundary conditions are: set the gas source proportion at the calculated gas source point to 1, and set the gas source proportions at the remaining gas source points to 0. The volume flow rates at each pipeline component and the gas source points are still known quantities.

[0065] S21. Construct the gas source proportion calculation model for the steady-state natural gas pipeline network:

[0066] For the gas source proportion equation of the node, change to:

[0067]

[0068] where Y N represents the calculated gas source proportion in node N, and Y Ei represents the calculated gas source proportion in the upstream pipeline i connected to this node. Similarly, change the formula α Ei =α Ni (up) E to:

[0069] Y Ei =Y Ni (up) E

[0070] Therefore, the gas source proportion model can be obtained from the component distribution calculation model by modifying the matrix to be solved:

[0071] M + Q in Y in =Y·M + Q in

[0072] Q out =|M - Y|

[0073] M + Q in Y in =Y·M + Q in and Q out =|M - |Y) is the gas source proportion calculation model for the steady-state natural gas pipeline network. Step three: Model solution. The gas source proportion calculation model is also a large linear equation system, and the direct LU decomposition idea is also used for solution. Referring to the above text, it will not be elaborated here.

[0074] Optionally, in the above technical solution, it further includes:

[0075] S100. Set the initial gas calorific value for each preset node in the natural gas pipeline network, and set the gas calorific value for each gas inlet source point in the natural gas pipeline network;

[0076] S101. Obtain the pressure and flow rate of each preset node according to the initial gas calorific value of each preset node. Specifically:

[0077] Define a chemical energy flow rate E, which is defined as the product of the gas calorific value and the volume flow rate, as shown in Equation (1). Then, for a single node, the inflow chemical energy flow rate at the node is equal to the outflow chemical energy flow rate. At the same time, we assume that at the node, the incoming gas is completely mixed therein, as Figure 2 shown. In Figure 2 , assume that there are 3 upstream pipelines at the node, namely inlet pipeline A, inlet pipeline B, and inlet pipeline C. The gas calorific values in the three pipelines are denoted as HA, HB, and HC respectively. According to the complete mixing criterion, the gases in the three pipelines are completely mixed at the node, then in all the pipelines where the gas flows out

[0078] the gas calorific values are the same and are the weighted average of the gas calorific values in the three inlet pipelines The weights are the volume flow rates of the fluids in the three pipelines, that is, Equation (2):

[0079] E = HQ n (1)

[0080] ∑H in Q nin = ∑H out Q nout = H∑Q nout (2)

[0081] In the formula, E represents the chemical energy flow rate of the gas, MJ / s; H represents the gas calorific value, where the subscript in and the subscript out represent the gas flowing into the node and the gas flowing out of the node respectively, MJ / m3; Qn represents the gas volume flow rate, where in and out represent the gas flowing into the node and the gas flowing out of the node respectively, m3 / s. At the same time, since the volume flow rate of the gas flowing into the node is equal to the volume flow rate of the gas flowing out of the node, the volume balance equation ∑Q nin = ∑Q nout can be substituted into Equation (2), and finally the formula for calculating the calorific value of the mixed gas at the node is as shown in Equation (3):

[0082] H = ∑H in Q nin / ∑Q nin (3)

[0083] For the natural gas pipeline network, the calorific values and flow rates calculated for each node will be arranged through the following equations:

[0084] Gh = b (4)

[0085] Wherein, G is a matrix composed of flow coefficients, and its elements are the flow rates of each pipe network node obtained by using the hydraulic calculation model in Step 2; h is a matrix containing the calorific values of each node; b is a vector representing the sum of gas mass and flow rate.

[0086] S102. Calculate the gas calorific value of any preset node according to the pressure and flow rate of the preset node until the gas calorific values of each preset node are obtained;

[0087] S103. Take the gas calorific value of any preset node calculated in S102 as the initial gas calorific value of the preset node, and return to execute S101 until the difference between the gas calorific values calculated continuously twice for each preset node is less than the preset difference threshold, and take the finally obtained gas calorific value of any preset node as the simulation result of the preset node until the simulation results of each preset node are obtained.

[0088] Optionally, in the above technical solution, S101 includes:

[0089] According to the initial gas calorific value of each preset node, and using the combined hydraulic and thermal calculation model of the pipe network, obtain the pressure and flow rate of each preset node.

[0090] The present invention can calculate the gas components at any position in the fully steady-state natural gas pipe network, and further can determine the changes in the calorific value and Wobbe index of the fluid in the steady-state natural gas pipe network, ensuring the stable gas use quality of downstream users; at the same time, for a hydrogen-blended natural gas pipeline, it can also determine the proportion of hydrogen components at each position in the pipe network. Since hydrogen components may be explosive, and pipeline hydrogen blending may cause "hydrogen embrittlement" and make the pipeline fail, this model is also of great significance for ensuring the safe operation of the pipeline. Through the steady-state natural gas pipe network gas source proportion calculation model, the proportion of each gas source at any position in the pipe network can be calculated. When there are problems with the gas use quality of downstream users, sometimes it is necessary to trace the source to clarify the gas source composition of the user node, so as to control the problem from the source. Therefore, this model is of great significance for the precise regulation of the pipe network and improving the traceability ability, as Figure 3 shown.

[0091] In summary, the steady-state natural gas pipe network gas component distribution calculation model and the steady-state natural gas pipe network gas source proportion calculation model proposed in this patent are of great significance for enhancing the precise regulation ability of the pipe network, promoting the reasonable pricing of the natural gas consumption market, and improving the operation benefits of enterprises.

[0092] The following embodiments are used to illustrate a method for determining the component distribution of a steady-state natural gas pipe network of the present invention:

[0093] Suppose a combined natural gas pipe network, the structure is as shown in the appendixFigure 4 As shown. In this natural gas pipeline network, there are 12 preset nodes, including 5 gas source points numbered 1 to 5 respectively, and another 3 users numbered 1 to 3 are set. The flow rate, pressure, calorific value and gas composition of the gas source points are given as known parameters in Table 1 and Table 2.

[0094] Table 1:

[0095] <![CDATA[C1]]> <![CDATA[C2]]> <![CDATA[C3]]> <![CDATA[n-C4]]> <![CDATA[i-C4]]> <![CDATA[i-C5]]> <![CDATA[N2]]> <![CDATA[CO2]]> <![CDATA[H2]]> Gas supply point 1 96.04 0.77 0.11 0.02 0.02 0.02 0.15 2.87 0 Gas supply point 2 94.7 0.55 0.08 0.01 0.01 0 1.94 2.71 0 Gas supply point 3 03.47 6.4 0.06 0 0 0 0 0.07 0 Gas supply point 4 92.55 3.96 0.34 0.09 0.12 0.22 0.84 1.88 0 Gas supply point 5 95.5 0 0 0 0 0 1.5 1 2

[0096] Table 2:

[0097] Pressure (MPa) <![CDATA[Flow rate (10 4 m 3 / d)]]> <![CDATA[Calorific value (MJ / m 3 )]]> Gas supply point 1 5.85 152 35.85 Gas supply point 2 6.03 8259.8 35.85 Gas supply point 3 6.07 3575.2 39 Gas supply point 4 6.5 8239.1 37.8 Gas supply point 5 6.08 1134.1 37

[0098] The calculation method proposed by the present invention is adopted, and the specific implementation steps are as follows:

[0099] S1000. Assign initial calorific values to all preset nodes. Among them, the initial calorific values of gas supply points 1 to 5 are assigned according to the parameters in Table 2, and the remaining gas supply points are assigned an initial estimated value of 50 MJ / m 3 . Gas source ratio setting for gas supply points: The gas source ratio of each gas source point is calculated separately (i.e., gas supply points 1 to 5). When calculating the gas source ratio of gas supply point 1, the ratio of gas supply point A is set to 1, and the gas source ratios of gas supply points 2 to 5 are set to 0.

[0100] S1001. Obtain the temperature T, pressure P and flow rate Q at each preset node under the initial calorific value through the existing hydraulic and thermal model n , and then determine the fluid flow direction and volume flow rate in each pipeline element in the pipeline network.

[0101] S1002. Substitute the volume flow rate Q obtained in S1001 n into Formula (3) and Formula (4) to obtain the first calorific value calculation results of each pipeline network node; determine the gas source ratio of gas supply point 1 in the pipeline network through S21.

[0102] S1003. Take the result obtained in S1002 as the initial value again, and repeat S11 to S12 until the error between adjacent two calorific value calculation results can be ignored, and take the last calorific value calculation result as the simulation result.

[0103] S1004. Then set the gas source ratio of gas supply point 2 to 1, and the gas source ratios of the remaining gas supply points to 0, and calculate the gas source ratio of gas supply point 2 in the pipeline network by using S21; and so on, and obtain the gas source ratios of gas supply points 3 to 5 in turn.

[0104] Finally, the gas source ratios and calorific value results of users 1 - 3 are obtained, as shown in Table 3.

[0105] Table 3:

[0106]

[0107] In the above embodiments, although the steps are numbered as S1, S2, etc., they are only specific embodiments given in this application. Those skilled in the art can adjust the execution order of S1, S2, etc. according to the actual situation, which is also within the protection scope of the present invention. It can be understood that in some embodiments, it may include some or all of the above embodiments.

[0108] As Figure 5 shown, a component distribution determination system 200 for a steady-state natural gas pipeline network according to an embodiment of the present invention includes an acquisition module 210, a construction module 220, and a calculation module 230;

[0109] The acquisition module 210 is configured to: acquire the gas components of each gas source point in the steady-state natural gas pipeline network;

[0110] The construction module 220 is configured to: construct a component distribution calculation model for the steady-state natural gas pipeline network;

[0111] The calculation module 230 is configured to: calculate the gas components at any position in the steady-state natural gas pipeline network according to the gas components of each gas source point and the component distribution calculation model.

[0112] Optionally, in the above technical solution, the construction module 220 is further configured to: construct a gas source proportion calculation model for the steady-state natural gas pipeline network and apply boundary conditions to the gas source proportion calculation model;

[0113] The calculation module 230 is further configured to: calculate the gas source proportion at any position in the steady-state natural gas pipeline network according to the gas source proportion calculation model with boundary conditions applied.

[0114] For the parameters and the steps for each unit module in the above component distribution determination system for the steady-state operation of a natural gas pipeline network of the present invention to achieve corresponding functions, reference can be made to the parameters and steps in the embodiments of the component distribution determination method for the steady-state operation of a natural gas pipeline network in the above text, which will not be elaborated here.

[0115] A storage medium according to an embodiment of the present invention stores instructions, and when a computer reads the instructions, it causes the computer to execute the above-mentioned component distribution determination method for the steady-state operation of a natural gas pipeline network.

[0116] An electronic device according to an embodiment of the present invention includes a processor and the above storage medium, and the processor executes the instructions in the storage medium. Among them, the electronic device can be a computer, a mobile phone, etc.

[0117] Those skilled in the art in the technical field know that the present invention can be implemented as a system, a method, or a computer program product.

[0118] Thus, the present disclosure may be embodied in the following forms, i.e., it may be entirely hardware, may be entirely software (including firmware, resident software, microcode, etc.), or may be in the form of a combination of hardware and software, which is generally referred to herein as a "circuit", "module" or "system". In addition, in some embodiments, the present invention may also be implemented in the form of a computer program product in one or more computer-readable media, which contain computer-readable program code.

[0119] Any combination of one or more computer-readable media may be employed. The computer-readable media may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium include: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present document, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0120] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A method for determining the component distribution of a steady-state natural gas pipeline network, characterized in that including: obtaining the gas components of each gas source point in the steady-state natural gas pipeline network; constructing a component distribution calculation model for the steady-state natural gas pipeline network; calculating the gas components at any position in the steady-state natural gas pipeline network according to the gas components of each gas source point and the component distribution calculation model; wherein, the process of constructing the component distribution calculation model for the steady-state natural gas pipeline network is as follows: For a steady-state natural gas pipeline network, the component complete mixing rule is adopted at the nodes, and the equation of the component complete mixing rule is: where α Ei is the calculated component mole fraction of pipeline i flowing into this node; Q Ei is the volume flow rate of pipeline i flowing into this node. For M nodes, M equations of the component complete mixing rule are established, and the component constraint equation in the pipeline is: α Ei = α Ni (up) E , α Ni (up) E is the mole fraction of component i at the upstream node N in the E-th element; The nodes in the steady-state natural gas pipeline network include three types: 1) For calculation node A, if node B is an upstream node of node A, the value of node B associated with node A in the incidence matrix is 1, indicating that the fluid flows from node B into calculation node A; 2) For calculation node A, if node C is a downstream node of node A, the value of node C associated with node A in the incidence matrix is -1, indicating that the fluid flows from calculation node A into node C; 3) For calculation node A, if node D is not connected to node A, the value of node D associated with node A in the incidence matrix is 0, indicating that there is no connection between the two nodes; The elements containing the connection information of each node in the pipe network are synthesized into the pipe network incidence matrix M, and the elements with values of 1 or 0 and the elements with a value of -1 are separated and represented respectively as and consisting of The matrix is defined as M + and consisting of - The matrix is defined as M - Then the component blending equation of the pipe network nodes is: The subscript ij represents the pipeline connecting computational node i and node j. Q and α respectively represent the volumetric flow rate of the fluid and the component mole fraction in the pipeline flowing into computational node i. If there is no pipeline connection between computational node i and node j, then Q ij and a ij is 0. Denote in the form of a vector: M + Q in α in = α·M + Q in The component constraint equation in the element is expressed as: where, e ij represents the volumetric flow rate flowing out of the computational node i, and is expressed in vector form: Q out = |M - |α M + Q in α in = α·M + Q in associated with Q out = |M - |α is the calculation model for the component distribution of a steady-state natural gas pipeline network; The component distribution calculation model of the steady-state natural gas pipeline network is solved by the direct LU decomposition method; also including: constructing a gas source proportion calculation model for the steady-state natural gas pipeline network and applying boundary conditions to the gas source proportion calculation model; calculating the gas source proportion at any position in the steady-state natural gas pipeline network according to the gas source proportion calculation model with the boundary conditions applied; wherein, the process of constructing the gas source proportion calculation model for the steady-state natural gas pipeline network is as follows: For the gas source proportion equation of the node, change to: Among them, Y N represents the calculated gas source proportion in node N, and Y Ei represents the calculated gas source proportion in the upstream pipeline i connected to this node; The gas source proportion calculation model is obtained by modifying the matrix to be solved from the component distribution calculation model; M + Q in Y in = Y·M + Q in Q out = |M - |Y M + Q in Y in = Y·M + Q in and Q out = |M - |Y is the calculation model of the gas source proportion in the steady-state natural gas pipeline network.

2. A component distribution determination system for a steady-state natural gas pipeline network, characterized in that including an acquisition module, a construction module, and a calculation module; The acquisition module is used to: obtain the gas components of each gas source point in the steady-state natural gas pipeline network; The construction module is used to: construct the component distribution calculation model for the steady-state natural gas pipeline network; wherein, the process of constructing the component distribution calculation model for the steady-state natural gas pipeline network is as follows: For a steady-state natural gas pipeline network, the component complete mixing rule is adopted at the nodes, and the equation of the component complete mixing rule is: where α Ei is the calculated component molar fraction of pipeline i flowing into this node; Q Ei is the volume flow rate of pipeline i flowing into this node. For M nodes, M equations of the component complete mixing rule are established. The component constraint equation in the pipeline is: α Ei = α Ni (up) E , ɑ Ni (up) E is the mole fraction of component i at the upstream node N in the E-th element; The nodes in the steady-state natural gas pipeline network include three types: 1) For calculation node A, if node B is an upstream node of node A, the value of node B associated with node A in the incidence matrix is 1, indicating that the fluid flows from node B into calculation node A; 2) For calculation node A, if node C is a downstream node of node A, the value of node C associated with node A in the incidence matrix is -1, indicating that the fluid flows from calculation node A into node C; 3) For calculation node A, if node D is not connected to node A, the value of node D associated with node A in the incidence matrix is 0, indicating that there is no connection between the two nodes; Synthesize the elements containing the connection information of each node in the pipe network into the pipe network incidence matrix M, and separate the elements with values of 1 or 0 and the elements with a value of -1 and represent them respectively as and composed of The matrix is defined as M + and composed of - The matrix is defined as M Then the component blending equation of the pipe network nodes is: The subscript ij represents the pipeline connecting computational node i and node j. Q and α respectively represent the volumetric flow rate of the fluid and the molar fraction of the component in the pipeline flowing into computational node i. If there is no pipeline connection between computational node i and node j, then Q ij and a ij are 0. Express in the form of a vector: M + Q in α in = α·M + Q in The component constraint equation in the element is expressed as: where e ij represents the volumetric flow rate flowing out of computational node i, and is expressed in vector form as: Q out = |M - |α M + Q in α in = α·M + Q in and Q out = |M - |α is the calculation model for the component distribution of a steady-state natural gas pipeline network; The component distribution calculation model of the steady-state natural gas pipeline network is solved by the direct LU decomposition method; The calculation module is used to: calculate the gas components at any position in the steady-state natural gas pipeline network according to the gas components of each gas source point and the component distribution calculation model; The construction module is also used to: construct a gas source proportion calculation model for the steady-state natural gas pipeline network and apply boundary conditions to the gas source proportion calculation model; The calculation module is further configured to: calculate the gas source proportion at any position in the steady-state natural gas pipeline network according to the gas source proportion calculation model to which the boundary conditions are applied; Wherein, the process of constructing the gas source proportion calculation model of the steady-state natural gas pipeline network is as follows: For the gas source proportion equation of the node, change to: Among them, Y N represents the calculated gas source proportion in node N, and Y Ei represents the calculated gas source proportion in the upstream pipeline i connected to this node; The gas source proportion calculation model is obtained by modifying the matrix to be solved from the component distribution calculation model: M + Q in Y in = Y·M + Q in Q out = |M - |Y M + Q in Y in = Y · M + Q in and Q out = |M - |Y is the calculation model of the gas source proportion in the steady-state natural gas pipeline network.

3. A storage medium, characterized in that, The storage medium stores instructions, and when a computer reads the instructions, the computer is caused to execute a method for determining the component distribution of a steady-state natural gas pipeline network as described in claim 1.

4. An electronic device, characterized in that, Comprising a processor and the storage medium described in claim 3, the processor executes the instructions in the storage medium.

Citation Information

Patent Citations

  • Natural gas pipeline network operation regulation and control method based on self-adaptive dynamic planning

    CN104166344A

  • Dynamic tracking and real-time calculation system and method for natural gas components in natural gas pipeline network

    CN113239645A