An analytical method suitable for dynamic analysis of natural gas networks
By reconstructing the dynamic transmission model of natural gas using the constant variation method and constructing an equivalent model of the natural gas network, the problem of low simulation efficiency of natural gas systems is solved, and efficient and accurate dynamic analysis is achieved.
Patent Information
- Application Number
- CN202311454335.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-03
- Publication Date
- 2026-11-10
- Estimated Expiration
- 2043-11-03
AI Technical Summary
Existing natural gas system simulations are inefficient, making it difficult to accurately characterize the response of state variables to external stimuli. Furthermore, their computational complexity is high, making it difficult to meet the requirements for joint simulation and optimization of multi-energy networks.
The method of variation of constants is used to reconstruct the dynamic transmission model of natural gas into a system of homogeneous partial differential equations with boundary conditions. A practical analytical expression based on the superposition and causality of natural gas transmission is constructed, and an equivalent model of the natural gas network is established to reduce computational complexity and improve accuracy.
It achieves efficient and accurate calculation of dynamic analysis of natural gas systems, avoids approximation errors and numerical dispersion, improves calculation efficiency and accuracy, and is suitable for simulation and optimization of multi-energy systems.
Smart Images

Figure CN117473758B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of energy system modeling and operation analysis, specifically to an analytical method applicable to dynamic analysis of natural gas networks. Background Technology
[0002] The increasing energy consumption and environmental pressures are driving the transformation of low-carbon and green energy network technologies. Cities, as the main consumers and drivers of energy transformation, are evolving into complex energy networks with multiple energy flows and dynamics. Natural gas systems, as a crucial component of urban energy networks, can significantly improve the overall utilization efficiency of energy systems and the capacity to absorb renewable energy through interconnection and energy optimization management with power and heating systems. The time scales of operation and management differ significantly between different energy networks, necessitating the acquisition of real-time, reliable, and consistent network information based on accurate simulation models and technologies. However, since multiple energy networks are managed and operated by different companies, the information exchanged is very limited. Therefore, information protection must be carefully considered during joint simulation and operational optimization.
[0003] Simulation of natural gas systems essentially involves first defining a set of state variables to describe the system's key characteristics, and then analyzing the system mechanism to obtain the changes in all state variables under a given excitation. Since a natural gas system model is a set of partial differential-algebraic equations, a mainstream approach is to discretize the pipeline model through spatiotemporal segmentation and recursively calculate the state distribution within the system based on boundary and initial conditions. However, to ensure computational efficiency, the number of segments required for each pipeline is generally large, resulting in low computational efficiency for the entire recursive process and making it difficult to intuitively and quantitatively characterize the response of the natural gas system's state variables to external excitations.
[0004] Considering the above shortcomings, it is necessary to study an analytical model of the transmission dynamics of a natural gas system that balances accuracy and complexity from a modeling perspective. This model can quickly and accurately describe the dynamic process of the system, making it more conducive to multi-agent simulation calculations and optimized operation, and meeting the application conditions in actual engineering. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention proposes an analytical method suitable for dynamic analysis of natural gas networks. This method is based on a dynamic transmission model of the natural gas system and derives its equivalent form using the method of variation of constants. Furthermore, based on the superposition, time-invariant, and causal characteristics of natural gas transmission, practical analytical forms of the natural gas dynamic transmission model under different initial and boundary conditions, as well as an equivalent model of the natural gas network, are constructed, providing a model foundation for the operational analysis of integrated energy systems.
[0006] The objective of this invention can be achieved through the following technical solutions:
[0007] An analytical method suitable for dynamic analysis of natural gas networks, characterized by comprising:
[0008] A dynamic natural gas transmission model is established based on the conservation law equation for natural gas transmission, and the dynamic natural gas transmission model is reconstructed into a dynamic heat conduction equation for natural gas.
[0009] The dynamic heat conduction equation of natural gas is transformed into a system of partial differential equations with homogeneous boundary conditions using the parameter variation method; the general analytical expression of the system of partial differential equations under constant pressure boundary conditions is determined.
[0010] Based on the superposition of natural gas transmission, initial conditions, and boundary conditions, a practical analytical expression for the dynamic transmission model of natural gas based on the general analytical expression is constructed.
[0011] Based on the topological characteristics, time invariance, and causality of the natural gas system, an equivalent model of the natural gas network based on the aforementioned practical analytical formula is constructed.
[0012] The pressure at non-source nodes and the mass flow rate at source nodes in a natural gas system are determined based on an equivalent model of the natural gas network.
[0013] In some embodiments, establishing a dynamic natural gas transmission model based on the conservation law equations for natural gas transmission includes the following steps:
[0014] A dynamic model of natural gas transport in a pipeline is established, including the mass conservation equation and the momentum conservation equation, as shown below:
[0015]
[0016] In the formula, x and t represent space and time, respectively, and c is the speed of sound, taken as 340 m / s; p x,t Here is the pressure of natural gas, Pa; q x,t ρ is the mass flow rate of natural gas, kg / s; w is the average flow velocity of natural gas, m / s; D is the inner diameter of the pipe, m; S is the cross-sectional area of the pipe, m². 2 λ is the pipe resistance coefficient;
[0017] Dynamic analysis of natural gas systems also requires initial and boundary conditions, which are as follows:
[0018]
[0019] In the formula, p x,0 and q x,0 These represent the distribution of pressure and mass flow rate in the pipe at time 0, i.e., the initial conditions; and Initial condition functions for pressure and mass flow rate respectively; L is the pipe length, in meters; p 0,tq is a time-series function of the inlet pressure of the pipe, i.e., the pressure boundary; L,t This is a time-series function of the mass flow rate at the pipeline outlet, i.e., the flow boundary.
[0020] In some embodiments, reconstructing the natural gas dynamic transport model into a natural gas dynamic heat conduction equation includes the following steps:
[0021] Taking the partial derivative of the second equation with respect to x and substituting it into the first equation in equation (1), we obtain the heat conduction equation as shown below:
[0022]
[0023] In the formula, α is a coefficient term in the heat conduction equation; correspondingly, the rate of change of pressure with respect to space at the pipe outlet can be obtained through transformation, which is defined as m t , can be represented as:
[0024]
[0025] Therefore, equation (1) can be transformed into:
[0026]
[0027] In some embodiments, the method of parametric variation for transforming the dynamic heat conduction equation of natural gas into a system of homogeneous partial differential equations with boundary conditions includes the following steps:
[0028] When the pressure boundary is constant, p 0,t Take a constant value ψ p,1 Introducing intermediate variable u x,t , for p x,t Restructuring leads to:
[0029]
[0030] Substituting x = 0 and t = 0 into equation (6) respectively, we can obtain the information about u. x,t The initial conditions and a set of boundary conditions are as follows:
[0031]
[0032] Taking the partial derivative of both sides of equation (6) with respect to x at x = L, we can obtain the derivative with respect to u. x,t Another set of boundary conditions is expressed as:
[0033]
[0034] Taking the second-order partial derivatives with respect to x and the first-order partial derivatives with respect to t on both sides of equation (6), we obtain:
[0035]
[0036] Substituting equation (9) into equation (5), equation (5) can be rewritten to represent a system of partial differential equations with homogeneous boundary conditions, as shown below:
[0037]
[0038] In some embodiments, determining the general analytical expression of the system of partial differential equations under constant pressure boundary conditions includes the following steps:
[0039] Define u*x,t as the solution to the homogeneous problem corresponding to equation (10). Solving this homogeneous problem, we can obtain:
[0040]
[0041] In the formula, k2 is the coefficient term; T0(t) is the time function component of u*x,t; n is the number of Fourier components; referring to the form of u*x,t, it can be seen that in formula (10), u x,t The form is:
[0042]
[0043] In the formula, u n,t For u x,t The time-related functional components in equation (10); at the same time, f in equation (10) x,t Expanding on the basis of equation (11), we get:
[0044]
[0045]
[0046] In the formula, f n,t f x,t The time-related functional components are obtained through the inverse Fourier transform shown in equation (14); substituting equations (12) to (14) into the first equation in equation (10), we get:
[0047]
[0048] In the formula, g n u is the coefficient term in the nth non-homogeneous partial differential. n,0 For u n,t The value of u at t=0; solving equation (15) yields u. n,t and u x,t The analytical expressions are as follows:
[0049]
[0050]
[0051] Substituting equation (17) into equation (6), we get p x,t The analytical expression under constant pressure is:
[0052]
[0053] Substituting equation (18) into the second equation in equation (1), we get q x,t The analytical expression under constant pressure is:
[0054]
[0055] In the formula, p 0,t As a constant pressure boundary, constants are taken; Equations (18) and (19) are the general analytical expressions of the partial differential equations of the natural gas dynamic transmission model under constant pressure boundary conditions.
[0056] In some embodiments, constructing a practical analytical expression for the natural gas dynamic transmission model based on the superposition property, initial conditions, and boundary conditions of natural gas transmission includes the following steps:
[0057] The reconstructed pressure boundary can be expressed as:
[0058]
[0059] In the formula, Nt is the boundary condition length, Δt is the time step; ψ p For the new boundary conditions, corresponding to the pressure increment, where element ψ p,i Indicates t i Pressure at time t i-1 The increase in pressure over time;
[0060] Based on the superposition property of natural gas transmission, pressure p x,t It can be decomposed into:
[0061]
[0062] In the formula, each component χ k,x,t satisfy:
[0063]
[0064] When k = 1, χ k,x,t The form is consistent with equation (18), that is:
[0065]
[0066] When k>1, χ k,x,t The form is:
[0067] χk,x,t-tk-1 =ψ p,k k>1,t>t k-1 (twenty four)
[0068] In engineering, the initial conditions are calculated based on steady-state energy flow and can be expressed as:
[0069]
[0070] In the formula, K1, K2, and K3 are constant coefficients in the initial conditions, and m0 is the value of m. t The value at time t=0, Let x be the initial condition for the mass flow rate at x = L, which is the mass flow rate at the pipe outlet at t = 0.
[0071] At the same time, m t This can be represented as a piecewise step function, i.e.:
[0072]
[0073] f in equation (10) x,t In equation (14) f n,t Substituting into equation (16), we have:
[0074]
[0075] The integral in equation (27) can be transformed as follows:
[0076]
[0077]
[0078] Substituting equations (28) and (29) into equation (27), we get:
[0079]
[0080]
[0081] Next, substituting equation (30) into equations (18) and (19), we obtain the practical analytical expressions for the dynamic model of natural gas transmission as follows:
[0082]
[0083]
[0084] In some embodiments, constructing an equivalent model of the natural gas network based on the practical analytical formula, according to the topological characteristics, time invariance, and causality of the natural gas system, includes the following steps:
[0085] Substituting x = L and x = 0 into equations (32) and (33) respectively, we can obtain any t j The outlet pressure and inlet flow rate of the pipeline are as follows:
[0086]
[0087]
[0088] Rearranging equations (34) and (35), we get:
[0089]
[0090] In the formula, p L p0 and q are the pressure vectors at the pipe outlet and inlet, respectively. L Let q0 be the flow vectors at the pipe outlet and inlet, and H1 to H4 be N. t ×N t The constant coefficient matrix, γ p and γ q Let N be respectively t The constant coefficient vector of pressure and mass flow rate is ×1, determined by the initial conditions; its elements can be represented as:
[0091]
[0092]
[0093]
[0094]
[0095]
[0096]
[0097]
[0098]
[0099] Define N g and N b Let A represent the number of nodes and pipelines in the natural gas system, and let 1 and 0 represent the identity matrix and the zero matrix, respectively. Introduce the correlation matrix A. in A out A nb1 and A nb2 Used to describe the topological properties of natural gas systems:
[0100] Where A in Contains N g ×N bA submatrix is used to associate the flow at the end of a branch with the flow at a node. A submatrix in the i-th row and j-th column is 1 if the flow at the end of branch j flows into node i, otherwise the submatrix is 0. out Contains N g ×N b A submatrix is used to associate the flow at the beginning of a branch with the flow at a node. A submatrix in the i-th row and j-th column is 1 if the flow originates from node i and flows into the beginning of branch j; otherwise, the submatrix is 0. nb1 Contains N b ×N g A submatrix is used to correlate the pressure at the end of a branch with the pressure at a node. The submatrix in the i-th row and j-th column is 1 if the pressure at node j equals the pressure at the end of branch i, otherwise it is 0. nb2 Contains N b ×N g A submatrix is used to correlate the pressure at the head of a branch with the pressure at a node. The submatrix in the i-th row and j-th column is 1 if the pressure at node j is equal to the pressure at the head of branch i, and 0 otherwise. Specifically, if node j is a node with a pressure ratio of K... cp For the compressor node, when node j is connected to the beginning of branch i, the submatrix in the i-th row and j-th column is K. cp ×1;
[0101] Based on the correlation matrix, the mass conservation equation at the node and the pressure continuity equation between the node and the pipe can be expressed as follows:
[0102] A in q L -A out q0=qn (45)
[0103] p L =A nb1 pn,p0=A nb2 pn (46)
[0104] In the formula, pn and qn are the nodal pressure and vector, respectively; since p L p0, q L q0 and q0 are both Nt×1 vectors; coefficient matrix A in A out A nb1 A out2 Submatrices 1 and 0 in the matrix are both Nt×Nt matrices;
[0105] Substituting equation (46) into the first row of equation (36), we get:
[0106]
[0107] In the formula, H a1 and Ha2 To describe the constant coefficient matrix and vector of the mass flow rate at the pipe outlet; then, substituting equations (46) and (47) into the second row of equation (36), we get:
[0108] q0=H4(H a1 pn+H a2 )+γ q =H a3 pn+H a4 (48)
[0109] In the formula, H a3 and H a4 To describe the constant coefficient matrix and vector of the mass flow rate at the pipe inlet; substituting equations (47) and (48) into equation (45), the pressure and mass flow rate at the node can be correlated as follows:
[0110]
[0111] In the formula, H a5 and H a6 The constant coefficient matrix and vector describe the relationship between pressure and mass flow rate at the nodes; the subscripts sr and ns are defined as variable identifiers for gas source nodes and gas load nodes. Expanding equation (49), we can obtain the equivalent model of the natural gas network based on the practical analytical expression:
[0112]
[0113] In the formula, H a51 H a52 H a53 H a54 For H a5 submatrix H a61 H a62 For H a6 sub-vectors in pn sr and pn ns qn represents the pressure vector between the source node and non-source nodes. sr and qn ns Let be the mass flow vectors of source nodes and non-source nodes; using matrix transformations, the mass flow of source nodes and the pressure of non-source nodes in the natural gas system can be completely expressed as functions of boundary conditions. This simplification method for the equivalent model of the natural gas network is as follows:
[0114]
[0115] qn sr =H a51 pn sr +H a52 pn ns +H a61 (52)
[0116] The beneficial effects of this invention are:
[0117] This method directly establishes the analytical solution of the dynamic model of the natural gas system. Compared with the traditional numerical method based on discretization, it completely avoids approximation errors, numerical dispersion, and dissipation. At the same time, by avoiding the discretization process in the solution process, it greatly improves the computational efficiency and solution accuracy of the dynamic analysis of the natural gas system. Attached Figure Description
[0118] The invention will now be further described with reference to the accompanying drawings.
[0119] Figure 1 This is a detailed flowchart of the present invention;
[0120] Figure 2 This is a structural diagram of a natural gas system in the example of this invention;
[0121] Figure 3 This is a graph showing the calculation results of node mass flow rate in the natural gas system of this invention. Detailed Implementation
[0122] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0123] In the description of this specification, references to terms such as "an embodiment," "example," "specific example," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of the invention. In this specification, illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0124] Example: Figure 2 The natural gas system shown is used as an example to illustrate the distribution of state variables under given initial and boundary conditions.
[0125] like Figure 1 As shown, this embodiment of the invention provides an analytical method for dynamic analysis of a natural gas system, comprising the following steps:
[0126] Step 10) Establish a dynamic natural gas transmission model based on the conservation law equations of natural gas transmission, and reconstruct it into the form of heat conduction equations;
[0127] Step 101) Establish a dynamic model of natural gas transmission in the pipeline, including the mass conservation equation and the momentum conservation equation, as shown below:
[0128]
[0129] In the formula, x and t represent space and time, respectively, and c is the speed of sound, taken as 340 m / s; p x,t Here is the pressure of natural gas, Pa; q x,t ρ is the mass flow rate of natural gas, kg / s; w is the average flow velocity of natural gas, m / s; D is the inner diameter of the pipe, m; S is the cross-sectional area of the pipe, m². 2 λ is the pipeline resistance coefficient. Furthermore, the dynamic analysis of the natural gas system also requires initial and boundary conditions, which are as follows:
[0130]
[0131] In the formula, p x,0 and q x,0 These represent the distribution of pressure and mass flow rate in the pipe at time 0, i.e., the initial conditions; and Initial condition functions for pressure and mass flow rate respectively; L is the pipe length, in meters; p 0,t q is a time-series function of the inlet pressure of the pipe, i.e., the pressure boundary; L,t This is a time-series function of the mass flow rate at the pipeline outlet, i.e., the flow boundary.
[0132] Step 102) Take the partial derivative of the second equation in equation (1) with respect to x, and substitute it into the first equation in equation (1) to obtain the heat conduction equation as shown below:
[0133]
[0134] In the formula, α is a coefficient term in the heat conduction equation. Correspondingly, the rate of change of pressure with respect to space at the pipe outlet can be obtained through transformation, and defined as m... t , can be represented as:
[0135]
[0136] Therefore, equation (1) can be transformed into:
[0137]
[0138] Step 20) The reconstructed natural gas dynamic transmission model is transformed into a system of partial differential equations with homogeneous boundary conditions using the parameter variation method, and the general analytical expression of the natural gas dynamic transmission model when the pressure boundary is constant is derived.
[0139] Step 201) First, when the pressure boundary is constant, p0,t Take a constant value ψ p,1 Introducing an intermediate variable u x,t , for p x,t Restructuring leads to:
[0140]
[0141] Substituting x = 0 and t = 0 into equation (6) respectively, we can obtain the information about u. x,t The initial conditions and a set of boundary conditions are as follows:
[0142]
[0143] Taking the partial derivative of both sides of equation (6) with respect to x at x = L, we can obtain the derivative with respect to u. x,t Another set of boundary conditions is expressed as:
[0144]
[0145] Taking the second-order partial derivatives with respect to x and the first-order partial derivatives with respect to t on both sides of equation (6), we obtain:
[0146]
[0147] Substituting equation (9) into equation (5), equation (5) can be rewritten to represent a system of partial differential equations with homogeneous boundary conditions, as shown below.
[0148]
[0149] Step 202) Define u*x,t as the solution to the homogeneous problem corresponding to equation (10). Solving the homogeneous problem yields:
[0150]
[0151] In the formula, k2 is the coefficient term; T0(t) is the time-related functional component of u*x,t; and n is the number of Fourier components. Referring to the form of u*x,t, it can be seen that in formula (10), u x,t The form is:
[0152]
[0153] In the formula, u n,t For u x,t The time-related functional component in equation (10). Simultaneously, f in equation (10) x,t Expanding on the basis of equation (11), we get:
[0154]
[0155]
[0156] In the formula, f n,t f x,t The time-related functional components are obtained through the inverse Fourier transform shown in equation (14). Substituting equations (12) to (14) into the first equation in equation (10), we get:
[0157]
[0158] In the formula, g n u is the coefficient term in the nth non-homogeneous partial differential. n,0 For u n,t The value of u at t=0. Solving equation (15) yields u. n,t and u x,t The analytical expressions are as follows:
[0159]
[0160]
[0161] Substituting equation (17) into equation (6), we get p x,t The analytical expression under constant pressure is:
[0162]
[0163] Substituting the expression into the second equation, we get q. x,t The analytical expression under constant pressure is:
[0164]
[0165] In the formula, p 0,t Assuming a constant pressure boundary, take a constant value;
[0166] Equations (18) and (19) are the general analytical expressions of the partial differential equations of the natural gas dynamic transmission model under constant pressure boundary conditions.
[0167] Step 30) Combining the superposition characteristics of natural gas transmission, and based on the discrete forms of the initial and boundary conditions, construct a practical analytical expression for the dynamic transmission model of natural gas.
[0168] Step 301) First, the pressure boundary is reconstructed, which can be expressed as:
[0169]
[0170] In the formula, Nt is the boundary condition length, Δt is the time step; ψ p For the new boundary conditions, corresponding to the pressure increment, where element ψ p,i Indicates t i Pressure at time t i-1The increase in pressure at any given moment.
[0171] Step 302) Based on the superposition property of natural gas transmission, pressure p x,t It can be decomposed into:
[0172]
[0173] In the formula, each component χ k,x,t satisfy:
[0174]
[0175] When k = 1, χ k,x,t The form is consistent with equation (18), that is:
[0176]
[0177] When k>1, χ k,x,t The form is:
[0178]
[0179] Substituting equations (23) and (24) into equation (21), it can be found that under any pressure boundary, p x,t and q x,t The analytical expression is still as shown in equations (18) and (19), the difference being that p 0,t The constant is transformed into a set of discrete sequences.
[0180] In step 303), the initial conditions are generally calculated based on steady-state energy flow and can be expressed as:
[0181]
[0182] In the formula, K1, K2, and K3 are constant coefficients in the initial conditions, and m0 is the value of m. t The value at time t=0, Let m be the initial condition for the mass flow rate at x = L, i.e., the mass flow rate at the pipe outlet at t = 0. Simultaneously, let m... t This can be represented as a piecewise step function, i.e.:
[0183]
[0184] f in equation (10) x,t In equation (14) f n,t Substituting into equation (16), we have:
[0185]
[0186] The integral in equation (27) can be transformed as follows:
[0187]
[0188]
[0189] Substituting equations (28) and (29) into equation (27), we get:
[0190]
[0191]
[0192] Next, substituting equation (30) into equations (18) and (19), we obtain the practical analytical expressions for the dynamic model of natural gas transmission as follows:
[0193]
[0194]
[0195] Step 40) Reconstruct the natural gas dynamic transmission model, and derive the natural gas network equivalent model based on the analytical method and its simplified analysis method by combining topological features and the time-invariant and causal characteristics of natural gas transmission.
[0196] Step 401) Substitute x = L and x = 0 into equations (32) and (33) respectively to obtain any t j The outlet pressure and inlet flow rate of the pipeline are as follows:
[0197]
[0198]
[0199] Rearranging equations (34) and (35), we get:
[0200]
[0201] In the formula, p L p0 and q are the pressure vectors at the pipe outlet and inlet, respectively. L Let q0 be the flow vectors at the pipe outlet and inlet, and H be the flow vectors at the pipe outlet and inlet. 1-4 For N t ×N t The constant coefficient matrix, γ p and γ q Let N be respectively t A constant coefficient vector of pressure and mass flow rate ×1, determined by the initial conditions. The elements can be represented as follows:
[0202]
[0203]
[0204]
[0205]
[0206]
[0207]
[0208]
[0209]
[0210] Step 402) Define N g and N b Let represent the number of nodes and pipelines in the natural gas system, respectively, and 1 and 0 represent the identity matrix and the zero matrix, respectively. An incidence matrix is introduced to describe the topological properties of the natural gas system, including:
[0211] (1)A in A in Contains N g ×N b There are several submatrices used to associate the flow at the end of a branch with the flow at a node. If the submatrix in the i-th row and j-th column is 1, it means that the flow at the end of branch j flows into node i. Otherwise, the submatrix is 0.
[0212] (2)A out A out Contains N g ×N b There are several submatrices used to associate the flow at the beginning of a branch with the flow at a node. If the submatrix in the i-th row and j-th column is 1, it means that the flow flows from node i into the beginning of branch j; otherwise, the submatrix is 0.
[0213] (3)A nb1 A nb1 Contains N b ×N g A submatrix is used to correlate the pressure at the end of a branch with the pressure at a node. The submatrix in the i-th row and j-th column is 1 if the pressure at node j is equal to the pressure at the end of branch i, otherwise the submatrix is 0.
[0214] (4)A nb2 A nb2 Contains N b ×N g A submatrix is used to correlate the pressure at the head of a branch with the pressure at a node. The submatrix in the i-th row and j-th column is 1 if the pressure at node j is equal to the pressure at the head of branch i, and 0 otherwise. Specifically, if node j is a node with a pressure ratio of K... cpFor the compressor node, when node j is connected to the beginning of branch i, the submatrix in the i-th row and j-th column is K. cp ×1.
[0215] Step 403) Based on the correlation matrix, construct the mass conservation equation at the node and the pressure continuity equation between the node and the pipe, which can be expressed as follows:
[0216] A in q L -A out q0=qn (45)
[0217] p L =A nb1 pn, p0=A nb2 pn (46)
[0218] In the formula, pn and qn are the nodal pressure and vector, respectively; since p L p0, q L q0 and q0 are both Nt×1 vectors, and the coefficient matrix A in A out A nb1 A out2 Submatrices 1 and 0 in the matrix are both Nt×Nt matrices.
[0219] Substituting equation (46) into the first row of equation (36), we get:
[0220]
[0221] In the formula, H a1 and H a2 This describes the constant coefficient matrix and vector for the mass flow rate at the pipe outlet. Next, substituting equations (46) and (47) into the second row of equation (36), we obtain:
[0222] q0=H4(H a1 pn+H a2 )+γ q =H a3 pn+H a4 (48)
[0223] In the formula, H a3 and H a4 To describe the constant coefficient matrix and vector of the mass flow rate at the pipe inlet, substituting equations (47) and (48) into equation (45), the pressure and mass flow rate at the node can be correlated as follows:
[0224]
[0225] In the formula, H a5 and H a6This is a constant coefficient matrix and vector describing the relationship between pressure and mass flow rate at the nodes. The subscripts sr and ns are defined as variable identifiers for the gas source node and gas load node. Expanding equation (49), we obtain the equivalent model of the natural gas network based on the aforementioned practical analytical expression:
[0226]
[0227] In the formula, H a51 H a52 H a53 H a54 For H a5 submatrix H a61 H a62 For H a6 sub-vectors in pn sr and pn ns qn represents the pressure vector between the source node and non-source nodes. sr and qn ns Let be the mass flow vectors of source nodes and non-source nodes. Using matrix transformations, the mass flow rates of source nodes and the pressures of non-source nodes in the natural gas system can be completely expressed as functions of boundary conditions. This simplification method for the equivalent model of the natural gas network is as follows:
[0228]
[0229] qn sr =H a51 pn sr +H a52 pn ns +H a61 (52)
[0230] The non-source node pressure and source node mass flow rate in the natural gas system are calculated respectively using the analytical functions shown in equations and . Figure 3 As shown.
[0231] This invention proposes an analytical method for dynamic analysis of natural gas systems. Based on a dynamic transmission model of the natural gas system, this method derives its equivalent form using the method of variation of constants. Furthermore, based on the superposition, time-invariant, and causal characteristics of natural gas transmission, practical analytical forms of the dynamic transmission model of natural gas under different initial and boundary conditions, as well as equivalent models of the natural gas network, are constructed. This reduces computational complexity while significantly improving computational accuracy.
[0232] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. An analytical method suitable for dynamic analysis of natural gas networks, characterized in that, include: A dynamic natural gas transmission model is established based on the conservation law equation for natural gas transmission, and the dynamic natural gas transmission model is reconstructed into a dynamic heat conduction equation for natural gas. The dynamic heat conduction equation of natural gas is transformed into a system of partial differential equations with homogeneous boundary conditions using the parameter variation method. Determine the general analytical expression of the system of partial differential equations under constant pressure boundary conditions; Based on the superposition of natural gas transmission, initial conditions, and boundary conditions, a practical analytical expression for the dynamic transmission model of natural gas based on the general analytical expression is constructed. Based on the topological characteristics, time invariance, and causality of the natural gas system, an equivalent model of the natural gas network based on the aforementioned practical analytical formula is constructed. The pressure at non-source nodes and the mass flow rate at source nodes in a natural gas system are determined based on an equivalent model of the natural gas network.
2. The analytical method for dynamic analysis of natural gas networks according to claim 1, characterized in that, The establishment of a dynamic natural gas transmission model based on the conservation law equations for natural gas transmission includes the following steps: A dynamic model of natural gas transport in a pipeline is established, including the mass conservation equation and the momentum conservation equation, as shown below: (1) In the formula, x and t For space and time, c The speed of sound is taken as 340 m / s; p x,t The pressure of natural gas is expressed in Pa. q x,t The mass flow rate of natural gas is kg / s; w The average flow velocity of natural gas is given in m / s. D The inner diameter of the pipe is in meters (m). S The cross-sectional area of the pipe is in meters. 2 ; λ This is the pipeline resistance coefficient; Dynamic analysis of natural gas systems also requires initial and boundary conditions, which are as follows: (2) In the formula, p x,0 and q x,0 These represent the distribution of pressure and mass flow rate in the pipe at time 0, i.e., the initial conditions; and Initial condition functions for pressure and mass flow rate, respectively; L The length of the pipe is in meters (m). p 0,t This is a time-series function of the inlet pressure of the pipe, i.e., the pressure boundary. q L,t This is a time-series function of the mass flow rate at the pipeline outlet, i.e., the flow boundary.
3. The analytical method for dynamic analysis of natural gas networks according to claim 2, characterized in that, The process of reconstructing the natural gas dynamic transport model into a natural gas dynamic heat conduction equation includes the following steps: Find the equation about the second equation in equation (1). x Substituting the partial derivative of into the first equation of equation (1), we obtain the heat conduction equation as shown below: (3) In the formula, α This is a coefficient term in the heat conduction equation; correspondingly, through transformation, we can obtain the rate of change of pressure with respect to space at the pipe outlet, which is defined as... m t , represented as: (4) Therefore, equation (1) can be transformed into: (5)。 4. The analytical method for dynamic analysis of natural gas networks according to claim 3, characterized in that, The method of transforming the dynamic heat conduction equation of natural gas into a system of homogeneous partial differential equations with boundary conditions using the parameter variation method includes the following steps: When the pressure boundary is constant p 0,t Take a constant value ψ p,1 Introducing intermediate variables u x,t ,right p x,t Restructuring leads to: (6) Will x =0 and t Substituting 0 into equation (6) respectively, we get the following about u x,t The initial conditions and a set of boundary conditions are as follows: (7) exist x = L Find the relationship between the two sides of equation (6) x The partial derivatives of give us the information about u x,t Another set of boundary conditions is expressed as: (8) On both sides of equation (6) respectively x Find the second-order partial derivative, with respect to t Taking the first-order partial derivatives, we get: (9) Substituting equation (9) into equation (5), equation (5) can be rewritten to represent a system of partial differential equations with homogeneous boundary conditions, as shown below: (10)。 5. The analytical method for dynamic analysis of natural gas networks according to claim 4, characterized in that, Determining the general analytical expression of the system of partial differential equations under constant pressure boundary conditions includes the following steps: definition To find the solution to the homogeneous problem corresponding to equation (10), we can solve the homogeneous problem and obtain: (11) In the formula, k 2 For coefficient terms; T 0( t )for The time-related functional components of the equation; n Fourier components; Reference From the form, we can see that in equation (10), u x,t The form is: (12) In the formula, u n,t for u x,t The time-related functional components in equation (10); at the same time, the time-related components in equation (10) f x,t Expanding on the basis of equation (11), we get: (13) (14) In the formula, f n,t for f x,t The time-related functional components are obtained through the inverse Fourier transform shown in equation (14); substituting equations (12) to (14) into the first equation in equation (10), we get: (15) In the formula, g n For the first n The coefficient term in a non-homogeneous partial differential equation u n,0 for u n,t exist t The value when = 0; solving equation (15) yields u n,t and u x,t The analytical expressions are as follows: (16) (17) Substituting equation (17) into equation (6), we get p x,t The analytical expression under constant pressure is: (18) Substituting equation (18) into the second equation in equation (1), we get q x,t The analytical expression under constant pressure is: (19) In the formula, p 0,t As a constant pressure boundary, constants are taken; Equations (18) and (19) are the general analytical expressions of the partial differential equations of the natural gas dynamic transmission model under constant pressure boundary conditions.
6. The analytical method for dynamic analysis of natural gas networks according to claim 5, characterized in that, The practical analytical expression for the dynamic natural gas transmission model based on the general analytical expression, which is constructed based on the superposition property, initial conditions, and boundary conditions of natural gas transmission, includes the following steps: The reconstructed pressure boundary can be expressed as: (20) In the formula, Nt Let Δ be the length of the boundary condition. t For time step; ψ p For the new boundary conditions, corresponding to the pressure increment, where the elements ψ p,i express t i Pressure relative to time t i-1 The increase in pressure over time; Based on the superposition property of natural gas transmission, pressure p x,t It can be decomposed into: (21) In the formula, each component satisfy: (22) when k When =1, The form is consistent with equation (18), that is: (23) when k When >1, The form is: (24) In engineering, the initial conditions are calculated based on steady-state energy flow and can be expressed as: (25) In the formula, K 1. K 2. K 3 is a constant coefficient in the initial conditions. m 0 is m t exist t The value at time =0, Initial conditions for mass flow rate x = L The value at that location, i.e. t Mass flow rate at the pipe outlet at time =0; At the same time, m t This can be represented as a piecewise step function, i.e.: (26) In equation (10) f x,t In formula (14) f n,t Substituting into equation (16), we have: (27) The integral in equation (27) can be transformed as follows: (28) (29) Substituting equations (28) and (29) into equation (27), we get: (30) (31) Next, substituting equation (30) into equations (18) and (19), we obtain the practical analytical expressions for the dynamic model of natural gas transmission as follows: (32) (33)。 7. The analytical method for dynamic analysis of natural gas networks according to claim 6, characterized in that, The process of constructing an equivalent model of a natural gas network based on the practical analytical formula, according to the topological characteristics, time invariance, and causality of the natural gas system, includes the following steps: Pick x = L and x Substituting 0 into equations (32) and (33) respectively, we can obtain any... t j The outlet pressure and inlet flow rate of the pipeline are as follows: (34) (35) Rearranging equations (34) and (35), we get: (36) In the formula, p L and p 0 represents the pressure vector between the pipe outlet and inlet. q L and q 0 represents the flow vector at the pipe outlet and inlet, and H1 to H4 represent... N t × N t The constant coefficient matrix, γ p and γ q They are respectively N t The constant coefficient vector of pressure and mass flow rate is ×1, determined by the initial conditions; its elements can be represented as: (37) (38) (39) (40) (41) (42) (43) (44) definition N g and N b Let A represent the number of nodes and pipelines in the natural gas system, and let 1 and 0 represent the identity matrix and the zero matrix, respectively. Introduce the correlation matrix A. in A out A nb1 and A nb2 Used to describe the topological properties of natural gas systems: Where A in Include N g × N b The nth submatrix is used to associate the flow at the end of a branch with the flow at a node, where the nth submatrix is the nth submatrix. i Line number j A submatrix of a column containing 1 represents a branch. j End flow into node i Otherwise, the submatrix is 0; A out Include N g × N b The n submatrices are used to associate the flow at the beginning of a branch with the flow at each node, where the nth submatrix is the nth submatrix. i Line number j A submatrix of a column being 1 indicates that traffic originates from the node. i Inflow branch j The first end of A is a submatrix; otherwise, the submatrix is 0. nb1 Include N b × N g The nth submatrix is used to correlate the branch end pressure and the node pressure, where the nth submatrix is... i Line number j A submatrix of a column with a value of 1 represents a node. j The pressure is equal to that of the branch. i The final pressure, otherwise the submatrix is 0; A nb2 Include N b × N g The nth submatrix is used to correlate the pressure at the head of the branch with the pressure at the node, where the nth submatrix is... i Line number j A submatrix of a column with a value of 1 represents a node. j The pressure is equal to that of the branch. i The initial pressure, otherwise the submatrix is 0; in particular, if the node j The pressure ratio is K cp The compressor node, when the node j and branch road i The first end is connected, the second i Line number j The submatrix of the column is K cp ×1; Based on the correlation matrix, the mass conservation equation at the node and the pressure continuity equation between the node and the pipe can be expressed as follows: (45) (46) In the formula, pn and qn These are the nodal pressure and vector, respectively; due to p L , p 0、 q L , q 0 are all Nt A vector of size ×1; coefficient matrix A in A out A nb1 A nb2 Submatrices 1 and 0 in the matrix are both Nt × Nt Matrix; Substituting equation (46) into the first row of equation (36), we get: (47) In the formula, H a1 and H a2 To describe the constant coefficient matrix and vector of the mass flow rate at the pipe outlet; then, substituting equations (46) and (47) into the second row of equation (36), we get: (48) In the formula, H a3 and H a4 To describe the constant coefficient matrix and vector of the mass flow rate at the pipe inlet; substituting equations (47) and (48) into equation (45), the pressure and mass flow rate at the node can be correlated as follows: (49) In the formula, H a5 and H a6 A constant coefficient matrix and vector describing the relationship between pressure and mass flow rate at nodes; subscripts are defined. sr and ns Assuming the variable identifiers for gas source nodes and gas load nodes, expanding equation (49) yields the equivalent model of the natural gas network based on the aforementioned practical analytical expression: (50) In the formula, H a51 H a52 H a53 H a54 For H a5 submatrix H a61 H a62 For H a6 Subvectors in; pn sr and pn ns The pressure vectors for the source node and non-source nodes; qn sr and qn ns Let be the mass flow vectors of source nodes and non-source nodes; using matrix transformations, the mass flow of source nodes and the pressure of non-source nodes in the natural gas system can be completely expressed as functions of boundary conditions. This simplification method for the equivalent model of the natural gas network is as follows: (51) (52)。
Citation Information
Patent Citations
Method for building dynamic simulation system of natural gas pipeline network conveying system
CN102779198A
Unified modeling method of integrated energy system
CN113111515A
