A method for solving a steady-state model of a natural gas network taking into account slack nodes and compressors
By establishing flow conservation equations and Jacobi matrices, the analytical challenges of relaxed nodes and compressor control modes in multi-source natural gas networks were solved, enabling the acquisition and optimization of complete natural gas network parameters.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- ZHEJIANG UNIV
- Filing Date
- 2022-07-22
- Publication Date
- 2026-04-14
AI Technical Summary
Existing natural gas network analysis methods fail to effectively handle slack nodes and compressors with different control modes in multi-source networks, making it difficult to achieve complete parameter analysis and optimization of natural gas networks.
A steady-state model of a natural gas network based on the flow conservation equation is established, a Jacobi matrix is constructed, and node pressures are obtained and injection flow rates are calculated through iterative calculations. This model is applicable to relaxed nodes and various compressor control modes.
It enables complete parameter analysis of multi-source natural gas networks, supports the optimization of natural gas network planning and operation schemes, and provides data support.
Smart Images

Figure CN115169064B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of natural gas network analysis, and in particular relates to a method for solving the steady-state model of a natural gas network that takes into account relaxed nodes and compressors. Background Technology
[0002] As a clean and low-carbon fossil fuel, natural gas will play a crucial supporting role in the low-carbon transformation of the energy system. Firstly, because natural gas emits less CO2 than coal and oil when producing the same calorific value, replacing existing high-carbon fossil fuels with natural gas in the short term is beneficial for a smooth transition of the energy system. Secondly, natural gas generators can start and stop rapidly, effectively compensating for the uncertainties of renewable energy and ensuring the stable operation of the energy system. Simultaneously, converting excess renewable energy into hydrogen or natural gas for injection into the natural gas pipeline network through technologies such as electro-hydrogen production can further increase the absorption of renewable energy. The above analysis indicates that the application scope of natural gas will continue to expand in the future, and the promotion and application of natural gas generators and P2G units will lead to a more complex natural gas network structure and user types. A reasonable analysis of the operating characteristics of natural gas networks can provide strong support for the planning, design, and operation control of natural gas networks. For natural gas networks with multiple gas sources, current analysis methods mostly focus on the case of a single balancing node, i.e., given the pressure at a single gas source and the injection flow rate at the remaining gas sources. Relaxed nodes are a control method that can be considered in multi-source natural gas networks. However, analysis methods for natural gas networks considering relaxed nodes have not yet been reported. Furthermore, the compressor's control modes include given outlet pressure, given pressure ratio, and given flow rate. Current natural gas network analysis methods for compressors are mostly geared towards a specific type of compressor control mode; therefore, it is necessary to further develop natural gas network analysis methods capable of simultaneously handling different compressor control modes. Summary of the Invention
[0003] The purpose of this invention is to provide a method for solving the steady-state model of a natural gas network that takes into account slack nodes and compressors, so as to solve the natural gas network with slack nodes and compressors, and provide a basis for natural gas network planning and operation scheme analysis.
[0004] To address the aforementioned technical problems, this invention provides a method for solving a steady-state model of a natural gas network that considers relaxed nodes and compressors, comprising the following steps:
[0005] Step S1: Based on the flow conservation equations at each load node and relaxation node, establish a steady-state model of the natural gas network;
[0006] Step S2: Construct the Jacobian matrix corresponding to the steady-state model of the natural gas network;
[0007] Step S3: Iteratively calculate the steady-state model of the natural gas network to obtain the pressure of each load node and relaxation node;
[0008] Step S4: Calculate the injected natural gas flow rate at the reference node and the relaxed node based on the node pressure results.
[0009] Furthermore, step S1 specifically includes the following steps:
[0010] Step S11: Define the node with unknown injected natural gas flow rate and known pressure as the reference node; define the node with unknown injected natural gas flow rate and unknown pressure, but whose injected natural gas flow rate is known to the ratio of injected natural gas flow rate to the reference node's injected natural gas flow rate as the relaxation node; and define the remaining nodes as load nodes.
[0011] Step S12: Number the nodes and branches in the natural gas network. The set consisting of all relaxed nodes and load nodes, excluding the outlet node of the compressor with a given outlet pressure and the outlet node of the compressor with a given pressure ratio, is denoted as Ω1, and the number of elements in Ω1 is denoted as N1. The set consisting of all branches is denoted as Ω2, and the number of elements in Ω2 is denoted as N2.
[0012] Step S13: Set the initial value of the number of flow conservation equations t1 to 1;
[0013] Step S14: Denote the t1-th element in Ω1 as node i, and establish the flow conservation equation at node i based on the situation of node i. The specific process is as follows:
[0014] When node i is a node other than the compressor inlet node, compressor outlet node, and the node connected to the compressor outlet node among the load nodes, the flow conservation equation at node i is as follows:
[0015]
[0016] In the above formula, Ω i,1 Let m be the set of all inlet nodes of branches with node i as the exit node, and let m be the set Ω. i,1 For any node in C, m,i C represents the characteristic parameters of the branch between node m and node i. m,i Provided by natural gas network operators, p m and p i Sign represents the pressure at node m and node i, respectively. m,i For the sign function, when p m Greater than p i At that time, Sign m,i The value of is 1 when p m Less than p i At that time, Sign m,iThe value of Ω is -1; i,2 Let Ω be the set of all exit nodes of branches with node i as the entry node, and n be the set of Ω. i,2 For any node in C, i,n C represents the characteristic parameters of the branch between node i and node n. i,n Provided by natural gas network operators, p n For the pressure at node n, Sign i,n For the sign function, when p i Greater than p n At that time, Sign i,n The value of is 1 when p i Less than p n At that time, Sign i,n The value of S is -1; i Let S be the injected natural gas flow rate at node i. i Provided by natural gas network operators;
[0017] When node i is the inlet node of the compressor and the compressor control mode is set to a given natural gas flow rate, the flow conservation equation at node i is as follows:
[0018]
[0019] In the above formula, G com The natural gas flow rate given to the compressor;
[0020] When node i is the inlet node of the compressor and the compressor control mode is set to a given outlet pressure, the flow conservation equation at node i is as follows:
[0021]
[0022] In the above formula, node v and node w are the compressor's outlet node and the node connected to the outlet node, respectively, and C v,w C represents the characteristic parameters of the branch between node v and node w. v,w Provided by natural gas network operators, p v and p w The pressures at nodes v and w are respectively, and Sign represents the pressure at node v and node w. v,w For the sign function, when p v Greater than p w At that time, Sign v,w The value of is 1 when p v Less than p w At that time, Sign v,w The value is -1;
[0023] When node i is the inlet node of the compressor and the compressor control mode is a given pressure ratio, the flow conservation equation at node i is as follows:
[0024]
[0025] In the above formula, ε is the pressure ratio of the compressor, and ε is provided by the natural gas network operator;
[0026] When node i is the outlet node of the compressor and the compressor control mode is set to a given natural gas flow rate, the flow conservation equation at node i is as follows:
[0027]
[0028] When node i is the node connected to the compressor outlet node and the compressor control mode is a given natural gas flow rate or a given outlet pressure, the flow conservation equation at node i is as follows:
[0029]
[0030] When node i is the node connected to the compressor's outlet node and the compressor's control mode is a given pressure ratio, the flow conservation equation at node i is as follows:
[0031]
[0032] In the above formula, Ω i,3 For set Ω i,1 The set of nodes remaining after removing the compressor outlet node v, C v,i C represents the characteristic parameters of the branch between node v and node i. v,i Provided by natural gas network operators, u is the compressor inlet node, p u For the pressure at node u, Sign v,i For the sign function, when εp u Greater than p i At that time, Sign v,i The value of εp is 1. u Less than p i At that time, Sign v,i The value is -1;
[0033] When node i is a relaxed node, the flow conservation equation at node i is as follows:
[0034]
[0035] In the above formula, Ref_i is a reference node that has a proportional relationship with the injected natural gas flow rate at node i, and R i Ω is the ratio of the injected natural gas flow rate at node i to the injected natural gas flow rate at reference node Ref_i. Ref_i,1Let z be the set of all inlet nodes of branches whose outlet node is reference node Ref_i, and let z be the set Ω. Ref_i,1 For any node in C, z,Ref_i C represents the characteristic parameters of the branch between node z and reference node Ref_i. z,Ref_i Provided by natural gas network operators, p z and p Ref_i The pressures at node z and reference node Ref_i are respectively, and Sign is the sign. z,Ref_i For the sign function, when p z Greater than p Ref_i At that time, Sign z,Ref_i The value of is 1 when p z Less than p Ref_i At that time, Sign z,Ref_i The value of Ω is -1; Ref_i,2 Let y be the set of all exit nodes of branches whose ingress node is reference node Ref_i, and let y be the set Ω. Ref_i,2 For any node in C, Ref_i,y For the characteristic parameters of the branch between reference node Ref_i and node y, C Ref_i,y Provided by natural gas network operators, p y For the pressure at node y, Sign Ref_i,y For the sign function, when p Ref_i Greater than p y At that time, Sign Ref_i,y The value of is 1 when p Ref_i Less than p y At that time, Sign Ref_i,y The value is -1;
[0036] Step S15: Compare the size of t1 with N1. If t1 is less than N1, use t1+1 as the updated value of t1 and return to step S14; if t1 is equal to N1, execute step S16.
[0037] Step S16: All the flow conservation equations established in step S14 together constitute the steady-state model of the natural gas network. The steady-state model of the natural gas network is written in the following compact format:
[0038] F(p 2 ) = 0
[0039] In the above formula, p is a column vector composed of nodal pressures; F is a functional expression of p determined by all the flow conservation equations established in step S13.
[0040] Furthermore, step S2 specifically includes the following steps:
[0041] Step S21: Construct a node-branch association matrix A of dimension N1×N2, where the element in row b and column c of A is denoted as a. bc Let i be the b-th node in Ω1, and l be the c-th branch in Ω2. When node i is the endpoint of branch l, a bc The value of a is 1, when node i is the starting point of branch l. bc The value of a is -1, when node i is not connected to branch l. bc The value of is 0;
[0042] Step S22: Construct a diagonal matrix D of dimension N2×N2, where the element in the b-th row and b-th column of D is denoted as d. bb In Ω2, the b-th branch is denoted as l, and the starting and ending points of branch l are denoted as ln(l ... st and l ed d bb The possible values are as follows:
[0043]
[0044] In the above formula, For node l st and node l ed Characteristic parameters of the branches between them Provided by natural gas network operators, and They are nodes l st and node l ed Pressure at the location, For a sign function, when Greater than hour, The value of is 1, when Less than hour, The value is -1;
[0045] Step S23, let J be the Jacobian matrix corresponding to the steady-state model of the natural gas network. The initial value of J is calculated as follows:
[0046] J = -ADA T
[0047] In the above formula, A T This is the transpose of A;
[0048] Step S24: Set the initial value of the calculation formula of correction J, t2, to 1;
[0049] Step S25: Denote the t2th element in Ω1 as node i, and modify the calculation formula of J according to the condition of node i. The specific process is as follows:
[0050] When node i is not the compressor's inlet node, not the compressor's outlet node, not the node connected to the compressor's outlet node, or not a relaxed node, there is no need to modify the calculation formula for J.
[0051] When node i is the inlet node of the compressor and the compressor control mode is a given natural gas flow rate, there is no need to modify the calculation formula of J;
[0052] When node i is the compressor inlet node and the compressor control mode is set to a given outlet pressure, if the node w connected to the compressor outlet node is a non-reference node, let node w be numbered Index_w in Ω1, and the element in the t2-th row and Index_w-th column of the formula for calculating J is... The following corrections have been made:
[0053]
[0054] When node i is the compressor inlet node and the compressor control mode is a given pressure ratio, if the node w connected to the compressor outlet node is a non-reference node, the element in the t2-th row and Index_w-th column of the J calculation formula will be... and the element in row t2 and column t2 The following corrections have been made:
[0055]
[0056]
[0057] When node i is the outlet node of the compressor, there is no need to modify the calculation formula for J;
[0058] When node i is the node connected to the compressor outlet node, and the compressor control mode is a given natural gas flow rate or a given outlet pressure, there is no need to modify the calculation formula of J.
[0059] When node i is the compressor's outlet node and the compressor's control mode is a given pressure ratio, if the node u connected to the compressor's inlet node is a non-reference node, let node u's number in Ω1 be Index_u. Then, in the calculation formula for J, the element in the t2-th row and the Index_u-th column... The following corrections have been made:
[0060]
[0061] When node i is a relaxed node, the corresponding Ω Ref_i,1 Let z and Ω be any two nodes. Ref_i,2 For any node y in Ω1, let the indices of node z and node y in Ω1 be Index_z and Index_y, respectively. Then, in the formula for calculating J, the element in the t2-th row and the Index_z-th column... and the element in row t2 and column y The following corrections have been made:
[0062]
[0063]
[0064] Step S26: Compare the size of t2 with N1. If t2 is less than N1, use t2+1 as the updated value of t2 and return to step S25. If t2 is equal to N1, the process of correcting the calculation formula of J ends.
[0065] Furthermore, step S3 specifically includes the following steps:
[0066] Step S31: The natural gas network operator sets an initial value for p, denoted as p. 1 Set the error limit γ for iterative calculation;
[0067] Step S32, record the initial value of the iteration calculation number t3 as 1, and denote the vector formed by the squares of the nodal pressures in the t3th iteration calculation as... The initial value is (p) 1 ) 2 ;
[0068] Step S33, will The result obtained by substituting J into the calculation formula is denoted as...
[0069] Step S34: Utilize the compact-format natural gas network steady-state model established in step S16 and the data obtained in step S33. Calculate the correction amount for the squared pressure value at time t3.
[0070]
[0071] Step S35, calculate the updated value of the squared pressure value:
[0072]
[0073] Step S36, when When the element with the largest absolute value is less than γ, the iterative calculation ends and step S37 is executed; otherwise, ... As Update the value and execute step S33;
[0074] Step S37: Obtain the pressure square value vector from step S35. The nodal pressure obtained by taking the square root of each element is denoted as p. * .
[0075] Furthermore, step S4 specifically includes the following steps:
[0076] Step S41, using the node pressure p obtained in step S37 * Calculate the injected natural gas flow rate at any reference node j:
[0077]
[0078] Step S42, calculate the injected natural gas flow rate at any relaxed node i:
[0079] S i =R i S Ref_i
[0080] The results obtained in steps S37, S41, and S42 together constitute the solution results of the steady-state model of the natural gas network taking into account the reference node and the relaxed node.
[0081] The beneficial effects of this invention are:
[0082] This invention proposes a method for solving the steady-state model of a natural gas network that considers relaxed nodes and compressors. It establishes a steady-state model and solution method for the natural gas network, enabling the acquisition of complete parameters and making it applicable to various types of natural gas network state analysis. This invention can be applied to the natural gas network planning process, analyzing the state parameters of the natural gas network under different planning schemes, and providing data support for improving the natural gas network structure. It can also be applied to the natural gas network operation scheme formulation process, calculating the state parameters of the natural gas network under different operation schemes to select a suitable operation scheme from numerous options. Attached Figure Description
[0083] Figure 1 The flowchart shows the implementation of the steady-state model solution method for natural gas networks that takes into account relaxation nodes and compressors. Detailed Implementation
[0084] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0085] like Figure 1 As shown, this invention provides a method for solving a steady-state model of a natural gas network that considers relaxed nodes and compressors, comprising the following steps:
[0086] Step S1: Based on the flow conservation equations at each load node and relaxation node, establish a steady-state model of the natural gas network;
[0087] Step S2: Construct the Jacobian matrix corresponding to the steady-state model of the natural gas network;
[0088] Step S3: Iteratively calculate the steady-state model of the natural gas network to obtain the pressure of each load node and relaxation node;
[0089] Step S4: Calculate the injected natural gas flow rate at the reference node and the relaxed node based on the node pressure results.
[0090] Furthermore, step S1 specifically includes the following steps:
[0091] Step S11: Define the node with unknown injected natural gas flow rate and known pressure as the reference node; define the node with unknown injected natural gas flow rate and unknown pressure, but whose injected natural gas flow rate is known to the ratio of injected natural gas flow rate to the reference node's injected natural gas flow rate as the relaxation node; and define the remaining nodes as load nodes.
[0092] Step S12: Number the nodes and branches in the natural gas network. The set consisting of all relaxed nodes and load nodes, excluding the outlet node of the compressor with a given outlet pressure and the outlet node of the compressor with a given pressure ratio, is denoted as Ω1, and the number of elements in Ω1 is denoted as N1. The set consisting of all branches is denoted as Ω2, and the number of elements in Ω2 is denoted as N2.
[0093] Step S13: Set the initial value of the number of flow conservation equations t1 to 1;
[0094] Step S14: Denote the t1-th element in Ω1 as node i, and establish the flow conservation equation at node i based on the situation of node i. The specific process is as follows:
[0095] When node i is a node other than the compressor inlet node, compressor outlet node, and the node connected to the compressor outlet node among the load nodes, the flow conservation equation at node i is as follows:
[0096]
[0097] In the above formula, Ω i,1 Let m be the set of all inlet nodes of branches with node i as the exit node, and let m be the set Ω. i,1 For any node in C, m,i C represents the characteristic parameters of the branch between node m and node i. m,i Provided by natural gas network operators, p m and p i Sign represents the pressure at node m and node i, respectively. m,i For the sign function, when p m Greater than p i At that time, Sign m,iThe value of is 1 when p m Less than p i At that time, Sign m,i The value of Ω is -1; i,2 Let Ω be the set of all exit nodes of branches with node i as the entry node, and n be the set of Ω. i,2 For any node in C, i,n C represents the characteristic parameters of the branch between node i and node n. i,n Provided by natural gas network operators, p n For the pressure at node n, Sign i,n For the sign function, when p i Greater than p n At that time, Sign i,n The value of is 1 when p i Less than p n At that time, Sign i,n The value of S is -1; i Let S be the injected natural gas flow rate at node i. i Provided by natural gas network operators;
[0098] When node i is the inlet node of the compressor and the compressor control mode is set to a given natural gas flow rate, the flow conservation equation at node i is as follows:
[0099]
[0100] In the above formula, G com The natural gas flow rate given to the compressor;
[0101] When node i is the inlet node of the compressor and the compressor control mode is set to a given outlet pressure, the flow conservation equation at node i is as follows:
[0102]
[0103] In the above formula, node v and node w are the compressor's outlet node and the node connected to the outlet node, respectively, and C v,w C represents the characteristic parameters of the branch between node v and node w. v,w Provided by natural gas network operators, p v and p w The pressures at nodes v and w are respectively, and Sign represents the pressure at node v and node w. v,w For the sign function, when p v Greater than p w At that time, Sign v,w The value of is 1 when p v Less than p w At that time, Sign v,w The value is -1;
[0104] When node i is the inlet node of the compressor and the compressor control mode is a given pressure ratio, the flow conservation equation at node i is as follows:
[0105]
[0106] In the above formula, ε is the pressure ratio of the compressor, and ε is provided by the natural gas network operator;
[0107] When node i is the outlet node of the compressor and the compressor control mode is set to a given natural gas flow rate, the flow conservation equation at node i is as follows:
[0108]
[0109] When node i is the node connected to the compressor outlet node and the compressor control mode is a given natural gas flow rate or a given outlet pressure, the flow conservation equation at node i is as follows:
[0110]
[0111] When node i is the node connected to the compressor's outlet node and the compressor's control mode is a given pressure ratio, the flow conservation equation at node i is as follows:
[0112]
[0113] In the above formula, Ω i,3 For set Ω i,1 The set of nodes remaining after removing the compressor outlet node v, C v,i C represents the characteristic parameters of the branch between node v and node i. v,i Provided by natural gas network operators, u is the compressor inlet node, p u For the pressure at node u, Sign v,i For the sign function, when εp u Greater than p i At that time, Sign v,i The value of εp is 1. u Less than p i At that time, Sign v,i The value is -1;
[0114] When node i is a relaxed node, the flow conservation equation at node i is as follows:
[0115]
[0116] In the above formula, Ref_i is a reference node that has a proportional relationship with the injected natural gas flow rate at node i, and R iΩ is the ratio of the injected natural gas flow rate at node i to the injected natural gas flow rate at reference node Ref_i. Ref_i,1 Let z be the set of all inlet nodes of branches whose outlet node is reference node Ref_i, and let z be the set Ω. Ref_i,1 For any node in C, z,Ref_i C represents the characteristic parameters of the branch between node z and reference node Ref_i. z,Ref_i Provided by natural gas network operators, p z and p Ref_i The pressures at node z and reference node Ref_i are respectively, and Sign is the sign. z,Ref_i For the sign function, when p z Greater than p Ref_i At that time, Sign z,Ref_i The value of is 1 when p z Less than p Ref_i At that time, Sign z,Ref_i The value of Ω is -1; Ref_i,2 Let y be the set of all exit nodes of branches whose ingress node is reference node Ref_i, and let y be the set Ω. Ref_i,2 For any node in C, Ref_i,y For the characteristic parameters of the branch between reference node Ref_i and node y, C Ref_i,y Provided by natural gas network operators, p y For the pressure at node y, Sign Ref_i,y For the sign function, when p Ref_i Greater than p y At that time, Sign Ref_i,y The value of is 1 when p Ref_i Less than p y At that time, Sign Ref_i,y The value is -1;
[0117] Step S15: Compare the size of t1 with N1. If t1 is less than N1, use t1+1 as the updated value of t1 and return to step S14; if t1 is equal to N1, execute step S16.
[0118] Step S16: All the flow conservation equations established in step S14 together constitute the steady-state model of the natural gas network. The steady-state model of the natural gas network is written in the following compact format:
[0119] F(p 2 ) = 0
[0120] In the above formula, p is a column vector composed of nodal pressures; F is a functional expression of p determined by all the flow conservation equations established in step S13.
[0121] Furthermore, step S2 specifically includes the following steps:
[0122] Step S21: Construct a node-branch association matrix A of dimension N1×N2, where the element in row b and column c of A is denoted as a. bc Let i be the b-th node in Ω1, and l be the c-th branch in Ω2. When node i is the endpoint of branch l, a bc The value of a is 1, when node i is the starting point of branch l. bc The value of a is -1, when node i is not connected to branch l. bc The value of is 0;
[0123] Step S22: Construct a diagonal matrix D of dimension N2×N2, where the element in the b-th row and b-th column of D is denoted as d. bb In Ω2, the b-th branch is denoted as l, and the starting and ending points of branch l are denoted as ln(l ... st and l ed d bb The possible values are as follows:
[0124]
[0125] In the above formula, For node l st and node l ed Characteristic parameters of the branches between them Provided by natural gas network operators, and They are nodes l st and node l ed Pressure at the location, For a sign function, when Greater than hour, The value of is 1, when Less than hour, The value is -1;
[0126] Step S23, let J be the Jacobian matrix corresponding to the steady-state model of the natural gas network. The initial value of J is calculated as follows:
[0127] J = -ADA T
[0128] In the above formula, A T This is the transpose of A;
[0129] Step S24: Set the initial value of the calculation formula of correction J, t2, to 1;
[0130] Step S25: Denote the t2th element in Ω1 as node i, and modify the calculation formula of J according to the condition of node i. The specific process is as follows:
[0131] When node i is not the compressor's inlet node, not the compressor's outlet node, not the node connected to the compressor's outlet node, or not a relaxed node, there is no need to modify the calculation formula for J.
[0132] When node i is the inlet node of the compressor and the compressor control mode is a given natural gas flow rate, there is no need to modify the calculation formula of J;
[0133] When node i is the compressor inlet node and the compressor control mode is set to a given outlet pressure, if the node w connected to the compressor outlet node is a non-reference node, let node w be numbered Index_w in Ω1, and the element in the t2-th row and Index_w-th column of the formula for calculating J is... The following corrections have been made:
[0134]
[0135] When node i is the compressor inlet node and the compressor control mode is a given pressure ratio, if the node w connected to the compressor outlet node is a non-reference node, the element in the t2-th row and Index_w-th column of the J calculation formula will be... and the element in row t2 and column t2 The following corrections have been made:
[0136]
[0137]
[0138] When node i is the outlet node of the compressor, there is no need to modify the calculation formula for J;
[0139] When node i is the node connected to the compressor outlet node, and the compressor control mode is a given natural gas flow rate or a given outlet pressure, there is no need to modify the calculation formula of J.
[0140] When node i is the compressor's outlet node and the compressor's control mode is a given pressure ratio, if the node u connected to the compressor's inlet node is a non-reference node, let node u's number in Ω1 be Index_u. Then, in the calculation formula for J, the element in the t2-th row and the Index_u-th column... The following corrections have been made:
[0141]
[0142] When node i is a relaxed node, the corresponding Ω Ref_i,1 Let z and Ω be any two nodes. Ref_i,2For any node y in Ω1, let the indices of node z and node y in Ω1 be Index_z and Index_y, respectively. Then, in the formula for calculating J, the element in the t2-th row and the Index_z-th column... and the element in row t2 and column y The following corrections have been made:
[0143]
[0144]
[0145] Step S26: Compare the size of t2 with N1. If t2 is less than N1, use t2+1 as the updated value of t2 and return to step S25; if t2 is equal to N1, the process of correcting the calculation formula of J ends.
[0146] Furthermore, step S3 specifically includes the following steps:
[0147] Step S31: The natural gas network operator sets an initial value for p, denoted as p. 1 Set the error limit γ for iterative calculation;
[0148] Step S32: Record the initial value of the iteration calculation number t3 as 1, and denote the item composed of the square of the nodal pressure in the t3th iteration calculation as... The initial value is (p) 1 ) 2 ;
[0149] Step S33, will The result obtained by substituting J into the calculation formula is denoted as...
[0150] Step S34: Utilize the compact-format natural gas network steady-state model established in step S16 and the data obtained in step S33. Calculate the correction amount for the squared pressure value at time t3.
[0151]
[0152] Step S35, calculate the updated value of the squared pressure value:
[0153]
[0154] Step S36, when When the element with the largest absolute value is less than γ, the iterative calculation ends and step S37 is executed; otherwise, ... As Update the value and execute step S33;
[0155] Step S37: Obtain the pressure square value vector from step S35. The nodal pressure obtained by taking the square root of each element is denoted as p. * .
[0156] Furthermore, step S4 specifically includes the following steps:
[0157] Step S41: Obtain the node pressure p using the method described in step S37. * Calculate the injected natural gas flow rate at any reference node j:
[0158]
[0159] Step S42, calculate the injected natural gas flow rate at any relaxed node i:
[0160] S i =R i S Ref_i
[0161] The results obtained in steps S37, S41, and S42 together constitute the solution of the steady-state model of the natural gas network taking into account the reference node and the relaxed node.
Claims
1. A method for solving a steady-state model of a natural gas network considering relaxed nodes and compressors, characterized in that, Includes the following steps: Step S1: Based on the flow conservation equations at each load node and relaxation node, establish a steady-state model of the natural gas network. In the natural gas network, nodes with unknown injected natural gas flow and known pressure are defined as reference nodes, nodes with unknown injected natural gas flow and unknown pressure, but with a known ratio of injected natural gas flow to reference node injected natural gas flow are defined as relaxation nodes, and the remaining nodes are defined as load nodes. Step S2: Construct the Jacobian matrix corresponding to the steady-state model of the natural gas network; Step S3: Iteratively calculate the steady-state model of the natural gas network to obtain the pressure of each load node and relaxation node; Step S4: Calculate the injected natural gas flow rate at the reference node and the relaxation node based on the node pressure; Step S1 specifically includes the following steps: Step S11: Number the nodes and branches in the natural gas network. The set consisting of all relaxed nodes and load nodes, excluding the outlet node of the compressor with a given outlet pressure and the outlet node of the compressor with a given pressure ratio, is denoted as... , The number of elements in the middle is denoted as The set consisting of all branches is denoted as . , The number of elements in the middle is denoted as ; Step S12: Set the number of flow conservation equations The initial value is 1; Step S13, will The Middle Each element is denoted as a node. According to the node Establish nodes in the following situations The flow conservation equation at the point is as follows: When node When the load nodes are all nodes other than the compressor inlet node, compressor outlet node, and nodes connected to the compressor outlet node, the nodes are... The flow conservation equation at point A is shown below: In the above formula, For all nodes It is the set of the inlet nodes of the branches of the exit node. For set Any node in the middle, For nodes and nodes Characteristic parameters of the branches between them Provided by natural gas network operators, and They are nodes and nodes Pressure at the location, For a sign function, when Greater than hour, The value of is 1, when Less than hour, The value is -1; For all nodes It is the set of the exit nodes of the branches of the inbound node. For set Any node in the middle, For nodes and nodes Characteristic parameters of the branches between them Provided by natural gas network operators, For nodes Pressure at the location, For a sign function, when Greater than hour, The value of is 1, when Less than hour, The value is -1; For nodes The injected natural gas flow rate at the location, Provided by natural gas network operators; When node When the compressor is the inlet node and the compressor control mode is set to a given natural gas flow rate, the node... The flow conservation equation at point A is shown below: In the above formula, The natural gas flow rate given to the compressor; When node When the compressor is at its inlet node and the compressor's control mode is set to a given outlet pressure, the node... The flow conservation equation at point A is shown below: In the above formula, nodes and nodes These are the compressor's outlet node and the node connected to the outlet node, respectively. For nodes and nodes Characteristic parameters of the branches between them Provided by natural gas network operators, and They are nodes and nodes Pressure at the location, For a sign function, when Greater than hour, The value of is 1, when Less than hour, The value is -1; When node When the compressor is at its inlet node and the compressor's control mode is set to a given pressure ratio, the node... The flow conservation equation at point A is shown below: In the above formula, The pressure ratio of the compressor. Provided by natural gas network operators; When node When the compressor is the outlet node and the compressor's control mode is set to a given natural gas flow rate, the node... The flow conservation equation at point A is shown below: When node When the node is connected to the compressor outlet node and the compressor control mode is set to a given natural gas flow rate or a given outlet pressure, the node... The flow conservation equation at point A is shown below: When node When the node is connected to the outlet node of the compressor and the compressor control mode is a given pressure ratio, the node... The flow conservation equation at point A is shown below: In the above formula, For set Remove compressor outlet node The set of the remaining nodes. For nodes and nodes Characteristic parameters of the branches between them Provided by natural gas network operators, This is the inlet node of the compressor. For nodes Pressure at the location, For a sign function, when Greater than hour, The value of is 1, when Less than hour, The value is -1; When node When a node is relaxed, the node The flow conservation equation at point A is shown below: In the above formula, For nodes A reference node where the injected natural gas flow rate has a proportional relationship. For nodes Injected natural gas flow rate at reference node The ratio of the injected natural gas flow rate at each location; For all reference nodes It is the set of the inlet nodes of the branches of the exit node. For set Any node in the middle, For nodes and reference node Characteristic parameters of the branches between them Provided by natural gas network operators, and They are nodes and reference node Pressure at the location, For a sign function, when Greater than hour, The value of is 1, when Less than hour, The value is -1; For all reference nodes It is the set of the exit nodes of the branches of the inbound node. For set Any node in the middle, Reference node and nodes Characteristic parameters of the branches between them Provided by natural gas network operators, For nodes Pressure at the location, For a sign function, when Greater than hour, The value of is 1, when Less than hour, The value is -1; Step S14, Compare and The size, if Less than ,Will As The updated value is then returned to step S13; if equal Proceed to step S15; Step S15: All the flow conservation equations established in step S13 together constitute the steady-state model of the natural gas network. The steady-state model of the natural gas network is written in the following compact format: In the above formula, This is a column vector representing the nodal pressures; The equations relating to the flow conservation equations established in step S13 are used to determine the flow conservation equations. The function expression.
2. The method for solving the steady-state model of a natural gas network considering relaxed nodes and compressors according to claim 1, characterized in that, Step S2 specifically includes the following steps: Step S21, construct the dimension as Node-branch association matrix , The Middle line, number The elements of a column are denoted as , The Middle Each node is denoted as , The Middle Each branch is denoted as When node It is a side road The end point The value is 1 when the node It is a side road The starting point The value is -1 when the node and branch road When not connected The value of is 0; Step S22, construct the dimension as diagonal matrix , The Middle line, number The elements of a column are denoted as , The Middle Each branch is denoted as branch road The starting point and the ending point are respectively denoted as and , The possible values are as follows: In the above formula, For nodes and nodes Characteristic parameters of the branches between them Provided by natural gas network operators, and They are nodes and nodes Pressure at the location, For a sign function, when Greater than hour, The value of is 1, when Less than hour, The value is -1; Step S23, let the Jacobian matrix corresponding to the steady-state model of the natural gas network be . , The initial value calculation formula is shown below: In the above formula, for Transpose of; Step S24, Set correction The number of times the calculation formula The initial value is 1; Step S25, will The Middle Each element is denoted as a node. According to the node The situation is The calculation formula was modified, and the specific process is as follows: When node When there are non-compressor inlet nodes, non-compressor outlet nodes, nodes connected to non-compressor outlet nodes, and non-slack nodes, it is not necessary to... The calculation formula was revised. When node When the compressor is the inlet node and the compressor control mode is set to a given natural gas flow rate, it is not necessary to... The calculation formula was revised. When node When the compressor is at its inlet node and the compressor's control mode is set to a given outlet pressure, if the node connected to the compressor's outlet node... For non-reference nodes, denote the node. exist The number in ,Will In the calculation formula, the first line, number Column elements The following corrections have been made: When node When the compressor is connected to the inlet node and the compressor control mode is set to a given pressure ratio, if the compressor outlet node is connected to the node... For non-reference nodes, In the calculation formula, the first line, number Column elements and the OK, Column elements The following corrections have been made: When node When the compressor is the outlet node, it is not necessary to... The calculation formula was revised. When node When the node is connected to the compressor outlet node, and the compressor control mode is set to a given natural gas flow rate or a given outlet pressure, it is not necessary to... The calculation formula was revised. When node When the compressor is at its outlet node and the compressor's control mode is set to a given pressure ratio, if the node connected to the compressor's inlet node... For non-reference nodes, denote the node. exist The number in ,Will In the calculation formula, the first line, number Column elements The following corrections have been made: When node When it is a relaxed node, the corresponding Any node in the middle is and any node , record nodes and nodes exist The numbers in are respectively and ,Will In the calculation formula, the first line, number Column elements and the line, number Column elements The following corrections have been made: Step S26, Compare and The size, if Less than ,Will As The updated value is then returned to step S25; if equal Then for The process of correcting the calculation formula has ended.
3. The method for solving the steady-state model of a natural gas network considering relaxed nodes and compressors according to claim 2, characterized in that, Step S3 specifically includes the following steps: Step S31 is set by the natural gas network operator. The initial value of is denoted as Set the error limit for iterative calculation. ; Step S32, record the number of iterations. The initial value is 1, and the first The vector formed by the squared nodal pressures in the next iteration is denoted as... , The initial value is ; Step S33, will Substitute The result obtained after using the calculation formula is denoted as ; Step S34, calculate the first Correction amount for the squared value of secondary pressure : Step S35, calculate the updated value of the squared pressure value: Step S36, when The element with the largest absolute value is less than When the iteration ends, step S37 is executed; otherwise, the iteration will end. As Update the value and execute step S33; Step S37: Obtain the pressure square value vector from step S35. The nodal pressure obtained by taking the square root of each element is denoted as . .
4. The method for solving a steady-state model of a natural gas network considering reference nodes and relaxed nodes according to claim 3, characterized in that, Step S4 specifically includes the following steps: Step S41, utilizing node pressure Calculate any reference node Injected natural gas flow rate at: Step S42, calculate any relaxation node Injected natural gas flow rate at: 。
Citation Information
Patent Citations
Natural gas network gas storage configuration method based on global sensitivity analysis
CN110717643A
Comprehensive energy system load flow calculation method
CN114221346A