Analytical method suitable for dynamic analysis of natural gas network
By using constant change method and building practical analytical and equivalent models in natural gas systems, the problem of low calculation efficiency of dynamic analysis of natural gas systems in the prior art is solved, and more efficient and accurate dynamic analysis is achieved.
Patent Information
- Application Number
- PCT/CN2024/081591
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-11-03
- Filing Date
- 2024-03-14
- Publication Date
- 2025-05-08
AI Technical Summary
The prior art has low computational efficiency in dynamic analysis of natural gas systems, and it is difficult to intuitively and quantitatively characterize the degree of response of state quantity to external excitation.
The constant change method is used to reconstruct the dynamic transmission model of natural gas into equivalent form, and based on the superimposed characteristics, time-invariant characteristics and causal characteristics of natural gas transmission, a practical analytical formula of the dynamic transmission model of natural gas and an equivalent model of the natural gas network is constructed.
It improves the calculation efficiency and accuracy of dynamic analysis of natural gas systems, reduces the calculation complexity, and makes multi-subject simulation calculation and optimization operation more efficient.
Smart Images

Figure CN2024081591_08052025_PF_FP_ABST
Abstract
Description
An analytical method for dynamic analysis of natural gas networks Technical Field
[0001] The present invention relates to the field of energy system modeling and operation analysis, and in particular to an analytical method suitable for dynamic analysis of natural gas networks. Background Art
[0002] Increasing energy consumption and environmental pressures are driving technological transformation in low-carbon, green energy networks. Cities, as the primary drivers of energy consumption and transformation, are transitioning to complex energy networks with multiple energy flows and dynamics. Natural gas networks, as a crucial component of urban energy networks, can significantly improve the overall efficiency of energy systems and their ability to absorb renewable energy through interconnection with power and heating systems and energy optimization management. The operational and management timescales of different energy networks vary significantly, necessitating the acquisition of real-time, reliable, and consistent network information based on precise simulation models and technologies. However, because multiple energy networks are managed and operated by different companies, the information exchanged between them is very limited, necessitating attention to information protection during joint simulation and operational optimization.
[0003] The simulation of a natural gas system essentially involves first defining a set of state variables to describe the system's key characteristics, then analyzing the system's mechanisms to determine how all state variables evolve under a given stimulus. Because the natural gas system model is a set of partial differential-algebraic equations, a mainstream approach currently involves discretizing the pipeline model through spatiotemporal segmentation, recursively calculating 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 typically large, resulting in a low computational efficiency for the recursive process and making it difficult to intuitively and quantitatively characterize the responsiveness of the natural gas system's state variables to external stimuli.
[0004] Taking into account the above-mentioned deficiencies, it is necessary to study an analytical model of the natural gas system transmission dynamics that takes into account both accuracy and complexity from the perspective of modeling, so as to quickly and accurately describe the dynamic process of the system, making it more conducive to multi-agent simulation calculation and optimization operation, and meeting the application conditions in actual engineering.
[0005] Summary of the Invention
[0006] To address the shortcomings of existing technologies, this paper proposes an analytical method for dynamic analysis of natural gas networks. This method, based on the dynamic transmission model of the natural gas system, employs the constant variation method to derive its equivalent form. Furthermore, based on the superposition, time-invariance, and causal properties of natural gas transmission, a practical analytical form of the natural gas dynamic transmission model, as well as an equivalent model of the natural gas network, is constructed under different initial and boundary conditions. This provides a model foundation for operational analysis of integrated energy systems.
[0007] The purpose of the present invention can be achieved through the following technical solutions:
[0008] An analytical method suitable for dynamic analysis of natural gas networks, characterized by comprising:
[0009] Establishing a natural gas dynamic transmission model based on the conservation law equation of natural gas transmission, and reconstructing the natural gas dynamic transmission model into a natural gas dynamic heat conduction equation;
[0010] The natural gas dynamic heat conduction equation is converted into a group of partial differential equations with homogeneous boundary conditions by using a parameter variation method; a general analytical expression of the group of partial differential equations under a constant pressure boundary condition is determined;
[0011] Based on the superposition, initial conditions and boundary conditions of natural gas transmission, a practical analytical formula for the natural gas dynamic transmission model based on the general analytical formula is constructed;
[0012] According to the topological characteristics, time invariance and causality of the natural gas system, a natural gas network equivalent model based on the practical analytical formula is constructed;
[0013] The non-source node pressure and source node mass flow rate in the natural gas system are determined based on the natural gas network equivalent model.
[0014] In some embodiments, establishing a natural gas dynamic transmission model based on the conservation law equations of natural gas transmission includes the following steps:
[0015] A dynamic model of natural gas transmission in a pipeline is established, including the mass conservation equation and momentum conservation equation, as shown below:
[0016] Where x and t are space and time, c is the speed of sound, which is 340 m / s; p x,t is the natural gas pressure, Pa; q x,t is the natural gas mass flow rate, kg / s; w is the average natural gas velocity, m / s; D is the inner diameter of the pipeline, m; S is the cross-sectional area of the pipeline, m 2 ;λ is the pipe resistance coefficient;
[0017] In the dynamic analysis of natural gas systems, initial conditions and boundary conditions also need to be given, which are:
[0018] Where p x,0 and q x,0 are the distribution of pressure and mass flow in the pipeline at time 0, i.e. the initial conditions; and are the initial condition functions of pressure and mass flow respectively; L is the pipe length, m; p 0,tis the time series function of the pipe inlet pressure, i.e., the pressure boundary; q L,t is the time series function of the mass flow rate at the pipeline outlet, that is, the flow boundary.
[0019] In some embodiments, reconstructing the natural gas dynamic transmission model into a natural gas dynamic heat conduction equation comprises the following steps:
[0020] Taking the partial derivative of the second equation in equation (1) with respect to x and substituting it into the first equation in equation (1), we get the heat conduction equation as follows:
[0021] In the formula, α is the coefficient term in the heat conduction equation; accordingly, the rate of change of pressure with respect to space at the outlet of the pipe can be obtained by transformation, which is defined as m t , which can be expressed as:
[0022] Therefore, formula (1) can be transformed into:
[0023] In some embodiments, the method of converting the natural gas dynamic heat conduction equation into a group of partial differential equations with homogeneous boundary conditions by using a parameter variation method comprises the following steps:
[0024] When the pressure boundary is constant, p 0,t Take a constant value ψ p,1 ; Introduce intermediate variable u x,t , for p x,t Refactoring, we have:
[0025] Substituting x=0 and t=0 into equation (6), we can get x,t The initial conditions and a set of boundary conditions are:
[0026] Taking the partial derivative of both sides of equation (6) with respect to x at x = L, we can get x,t Another set of boundary conditions is expressed as:
[0027] On both sides of equation (6), we take the second-order partial derivative of x and the first-order partial derivative of t, and we get:
[0028] Substituting Equation (9) into Equation (5), Equation (5) can be re-expressed as a system of partial differential equations with homogeneous boundary conditions as follows:
[0029] In some embodiments, determining the general analytical expression of the system of partial differential equations under the constant pressure boundary condition comprises the following steps:
[0030] definition is the solution of the homogeneous problem corresponding to formula (10). Solving the homogeneous problem, we can get:
[0031] Where k2 is the coefficient term; T0(t) is The function component with respect to time; n is the number of Fourier components; reference In the form of, we can see that in formula (10), u x,t The form is:
[0032] Where u n,t for u x,t The function component about time in Eq. (10) x,t Expanding the basis in formula (11), we can obtain:
[0033] Where, f n,t f x,t The time-dependent function component of is obtained by inverse Fourier transform as shown in equation (14). Substituting equations (12) to (14) into the first equation in equation (10), we can obtain:
[0034] Where g n is the coefficient term in the nth nonhomogeneous partial differential, u n,0 for u n,t The value at t = 0; Solving equation (15) yields u n,t and u x,t The analytical expressions are:
[0035] Substituting formula (17) into formula (6), we can get p x,t The analytical formula under constant pressure conditions is:
[0036] Substituting equation (18) into the second equation in equation (1), we can get q x,t The analytical formula under constant pressure conditions is:
[0037] Where p 0,t is a constant pressure boundary, and is taken as a constant; Equations (18) and (19) are the general analytical expressions of the partial differential equations of the natural gas dynamic transmission model under the condition of constant pressure boundary.
[0038] In some embodiments, constructing a practical analytical formula for a natural gas dynamic transmission model based on the general analytical formula based on the superposition property, initial conditions, and boundary conditions of natural gas transmission comprises the following steps:
[0039] The pressure boundary reconstruction can be expressed as:
[0040] Where Nt is the boundary condition length, Δt is the time step; ψ p is the new boundary condition, corresponding to the pressure increment, where the element ψ p,i Indicates t i The pressure at time t i-1 The increase in pressure at any moment;
[0041] According to the superposition of natural gas transmission, pressure p x,t Can be decomposed into:
[0042] In the formula, each component χ k,x,t satisfy:
[0043] When k = 1, χ k,x,t The form of is consistent with formula (18), that is:
[0044] When k>1, χ k,x,t The form is:
[0045] In engineering, the initial conditions are calculated based on the steady-state energy flow and can be expressed as:
[0046] Where K1, K2, K3 are constant coefficients in the initial conditions, m0 is m t The value at t=0 is, is the value of the initial condition of mass flow at x = L, that is, the mass flow rate at the pipe outlet at time t = 0;
[0047] At the same time, m t It is expressed as a piecewise step function, namely:
[0048] In formula (10), f x,t and f in formula (14) n,t Substituting into formula (16), we have:
[0049] The integral formula in formula (27) can be transformed as follows:
[0050] Substituting equations (28) and (29) into equation (27), we can obtain:
[0051] Then, by substituting Equation (30) into Equation (18) and Equation (19), the practical analytical expressions of the natural gas transmission dynamic model can be obtained as follows:
[0052] In some embodiments, constructing a natural gas network equivalent model based on the practical analytical formula according to the topological characteristics, time invariance, and causality of the natural gas system includes the following steps:
[0053] Substituting x=L and x=0 into equations (32) and (33) respectively, we can obtain j The outlet pressure and inlet flow rate of the pipeline are:
[0054] Rearranging equations (34) and (35) yields:
[0055] Where p L and p0 are the pressure vectors at the pipe outlet and inlet, q L and q0 are the flow vectors at the pipe outlet and inlet, H1 to H4 are N t ×N t The constant coefficient matrix, γ p and γ q N t The constant coefficient vectors of pressure and mass flow of ×1 are determined by the initial conditions; the elements can be expressed as:
[0056] Define N g and N b are the number of nodes and pipelines in the natural gas system, 1 and 0 are the identity matrix and zero matrix respectively; the incidence matrix A is introduced in 、A out 、A nb1 and A nb2 Used to describe topological properties in natural gas systems:
[0057] Among them A in Contains N g ×N bA submatrix is used to associate branch end flow and node flow. If the submatrix in row i and column j is 1, it means that the end flow of branch j flows into node i. Otherwise, the submatrix is 0. out Contains N g ×N b A sub-matrix is used to associate the branch head end flow and node flow, where the sub-matrix in the i-th row and j-th column is 1, indicating that the flow flows from node i to the head end of branch j, otherwise the sub-matrix is 0; nb1 Contains N b ×N g A submatrix is used to associate the branch end pressure and the node pressure, where the submatrix in the i-th row and j-th column is 1, indicating that the pressure at node j is equal to the end pressure of branch i, otherwise the submatrix is 0; nb2 Contains N b ×N g A submatrix is used to associate the branch head end pressure and the node pressure, where the submatrix in the i-th row and j-th column is 1, indicating that the pressure of node j is equal to the head end pressure of branch i, otherwise the submatrix is 0; in particular, if node j is a pressure ratio of K cp When node j is connected to the head of branch i, the submatrix of row i and column j is K cp ×1;
[0058] Based on the correlation matrix, the mass conservation equation at the node and the pressure continuity equation between the node and the pipe are constructed, which can be expressed as: A in q L -A out q0=qn (45) p L =A nb1 pn, p0=A nb2 pn (46)
[0059] Where pn and qn are the node pressure and vector respectively; L , p0, q L , q0 are both Nt×1 vectors; the coefficient matrix A in 、A out 、A nb1 、A out2 The sub-matrices 1 and 0 in are both Nt×Nt matrices;
[0060] Substituting formula (46) into the first line of formula (36), we can obtain:
[0061] Where H a1 and H a2 is the constant coefficient matrix and vector describing the mass flow rate at the pipeline outlet; then, substitute Equations (46) and (47) into the second row of Equation (36), and we can get: q0 = H4(Ha1 pn+H a2 )+γ q =H a3 pn+H a4 (48)
[0062] Where H a3 and H a4 is the constant coefficient matrix and vector describing the mass flow rate at the pipeline inlet; Substituting Equations (47) and (48) into Equation (45), the pressure and mass flow rate at the node can be related as follows:
[0063] Where H a5 and H a6 are the constant coefficient matrix and vector describing the correlation between the pressure and mass flow of the node; subscripts sr and ns are defined as the variable identifiers of the gas source node and gas load node. Expanding equation (49), we can obtain the natural gas network equivalent model based on the practical analytical formula:
[0064] Where H a51 、H a52 、H a53 、H a54 H a5 The submatrix in H a61 、H a62 H a6 The subvector in pn sr and pn ns is the pressure vector of the source node and non-source node; qn sr and qn ns is the mass flow vector of the source node and non-source node; the source node mass flow and non-source node pressure in the natural gas system are completely expressed as functions of the boundary conditions by using matrix transformation, that is, the simplified method of the natural gas network equivalent model is: qn sr =H a51 pn sr +H a52 pn ns +H a61 (52).
[0065] Beneficial effects of the present invention:
[0066] This method directly establishes the analytical solution of the natural gas system dynamic model. Compared with traditional numerical methods based on discretization, it completely avoids approximation errors and 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 natural gas system dynamic analysis. BRIEF DESCRIPTION OF THE DRAWINGS
[0067] The present invention will be further described below with reference to the accompanying drawings.
[0068] Fig. 1 is a specific flow chart of the present invention;
[0069] FIG2 is a structural diagram of a natural gas system in an exemplary embodiment of the present invention;
[0070] FIG3 is a diagram showing the calculation results of the node mass flow in the natural gas system of the present invention. DETAILED DESCRIPTION
[0071] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making any creative efforts shall fall within the scope of protection of the present invention.
[0072] Throughout this specification, references to terms such as "one embodiment," "example," or "specific example" indicate that the specific features, structures, materials, or characteristics described in conjunction with that embodiment or example are included in at least one embodiment or example of the present invention. In this specification, schematic representations of these 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 any one or more embodiments or examples.
[0073] Example: Taking the natural gas system shown in FIG2 as an example, the distribution of state quantities is studied under given initial conditions and boundary conditions.
[0074] As shown in FIG1 , an embodiment of the present invention provides an analytical method for dynamic analysis of a natural gas system, comprising the following steps:
[0075] Step 10) establishing a natural gas dynamic transmission model based on the conservation law equations of natural gas transmission and reconstructing it into a heat conduction equation form;
[0076] Step 101) A dynamic model of natural gas transmission in a pipeline is established, including the mass conservation equation and the momentum conservation equation, as shown below:
[0077] Where x and t are space and time, c is the speed of sound, which is 340 m / s; p x,t is the natural gas pressure, Pa; q x,t is the natural gas mass flow rate, kg / s; w is the average natural gas velocity, m / s; D is the inner diameter of the pipeline, m; S is the cross-sectional area of the pipeline, m 2 ; λ is the pipeline resistance coefficient. In addition, the dynamic analysis of the natural gas system also requires the initial conditions and boundary conditions, which are:
[0078] Where p x,0 and q x,0 are the distribution of pressure and mass flow in the pipeline at time 0, i.e. the initial conditions; and are the initial condition functions of pressure and mass flow respectively; L is the pipe length, m; p 0,t is the time series function of the pipe inlet pressure, i.e., the pressure boundary; q L,t is the time series function of the mass flow rate at the pipeline outlet, that is, the flow boundary.
[0079] Step 102) Calculate the partial derivative of the second equation in equation (1) with respect to x and substitute it into the first equation in equation (1), and the heat conduction equation can be obtained as follows:
[0080] In the formula, α is the coefficient term in the heat conduction equation. Correspondingly, the rate of change of pressure with respect to space at the outlet of the pipe can be obtained by transformation and defined as m t , which can be expressed as:
[0081] Therefore, formula (1) can be transformed into:
[0082] Step 20) using a parameter variation method to transform the reconstructed natural gas dynamic transmission model into a set of partial differential equations with homogeneous boundary conditions, and deriving a general analytical expression of the natural gas dynamic transmission model when the pressure boundary is constant;
[0083] Step 201) First, when the pressure boundary is constant, p 0,t Take a constant value ψ p,1 . Introduce the intermediate variable u x,t , for p x,t Refactoring, we have:
[0084] Substituting x=0 and t=0 into equation (6), we can get x,t The initial conditions and a set of boundary conditions are:
[0085] Taking the partial derivative of both sides of equation (6) with respect to x at x = L, we can get x,t Another set of boundary conditions is expressed as:
[0086] On both sides of equation (6), we take the second-order partial derivative of x and the first-order partial derivative of t, and we get:
[0087] Substituting Equation (9) into Equation (5), Equation (5) can be re-expressed as a system of partial differential equations with homogeneous boundary conditions as shown below.
[0088] Step 202) Define u*x,t as the solution of the homogeneous problem corresponding to equation (10). Solving the homogeneous problem, we can obtain:
[0089] Where k2 is the coefficient term; T0(t) is The function component with respect to time in ; n is the number of Fourier components. In the form of, we can see that in formula (10), u x,t The form is:
[0090] Where u n,t for u x,t The function component about time in . At the same time, f in formula (10) x,t Expanding the basis in formula (11), we can obtain:
[0091] Where, f n,t f x,t The time-dependent function component of is obtained by inverse Fourier transform as shown in equation (14). Substituting equations (12) to (14) into the first equation in equation (10), we can obtain:
[0092] Where g n is the coefficient term in the nth nonhomogeneous partial differential, u n,0 for u n,t The value at t = 0. Solving equation (15) yields u n,t and u x,t The analytical expressions are:
[0093] Substituting formula (17) into formula (6), we can get p x,t The analytical formula under constant pressure conditions is:
[0094] Substituting equation (18) into the second equation in equation (1), we can get q x,t The analytical formula under constant pressure conditions is:
[0095] Where p 0,t For the constant pressure boundary, take a constant;
[0096] Equations (18) and (19) are the general analytical expressions of the partial differential equations of the natural gas dynamic transmission model under the condition of constant pressure boundary.
[0097] Step 30) In combination with the superposition characteristics of natural gas transmission, a practical analytical expression of the natural gas dynamic transmission model is constructed according to the discrete forms of initial and boundary conditions;
[0098] Step 301) First, the pressure boundary is reconstructed, which can be expressed as:
[0099] Where Nt is the boundary condition length, Δt is the time step; ψ p is the new boundary condition, corresponding to the pressure increment, where the element ψ p,i Indicates t i The pressure at time t i-1 The pressure increase at that moment.
[0100] Step 302) According to the superposition of natural gas transmission, the pressure p x,t Can be decomposed into:
[0101] In the formula, each component χ k,x,t satisfy:
[0102] When k = 1, χ k,x,t The form of is consistent with formula (18), that is:
[0103] When k>1, χ k,x,t The form is:
[0104] Substituting Equations (23) and (24) into Equation (21), we can find that under any pressure boundary, p x,t and q x,t The analytical expressions of are still as shown in Equation (18) and Equation (19), the difference is that p 0,t From a constant to a set of discrete sequences.
[0105] In step 303), the initial conditions are generally calculated based on the steady-state energy flow and can be expressed as:
[0106] Where K1, K2, K3 are constant coefficients in the initial conditions, m0 is m t The value at t=0 is, is the value of the initial condition of mass flow at x = L, that is, the mass flow at the pipe outlet at time t = 0. At the same time, m t It is expressed as a piecewise step function, namely:
[0107] In formula (10), f x,t and f in formula (14) n,t Substituting into formula (16), we have:
[0108] The integral formula in formula (27) can be transformed as follows:
[0109] Substituting equations (28) and (29) into equation (27), we can obtain:
[0110] Then, by substituting Equation (30) into Equation (18) and Equation (19), the practical analytical expressions of the natural gas transmission dynamic model can be obtained as follows:
[0111] Step 40) Reconstruct the natural gas dynamic transmission model, combine the topological characteristics and the time-invariant and causal characteristics of natural gas transmission, and derive the natural gas network equivalent model based on the analytical method and its simplified analysis method.
[0112] 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:
[0113] Rearranging equations (34) and (35) yields:
[0114] Where p L and p0 are the pressure vectors at the pipe outlet and inlet, q L and q0 are the flow vectors at the pipe outlet and inlet, H 1-4 N t ×N t The constant coefficient matrix, γ p and γ q N t The constant coefficient vector of pressure and mass flow of ×1 is determined by the initial conditions. The elements can be expressed as:
[0115] Step 402) Define N g and Nb are the number of nodes and pipelines in the natural gas system, 1 and 0 are the identity matrix and zero matrix respectively. The incidence matrix is introduced to describe the topological properties of the natural gas system, including:
[0116] (1)A in :A in Contains N g ×N b A sub-matrix is used to associate branch end flow and node flow, where the sub-matrix in the i-th row and j-th column is 1, which means that the end flow of branch j flows into node i, otherwise the sub-matrix is 0.
[0117] (2)A out :A out Contains N g ×N b A sub-matrix is used to associate the branch headend flow and node flow, where the sub-matrix in the i-th row and j-th column is 1, which means that the flow flows from node i to the headend of branch j, otherwise the sub-matrix is 0.
[0118] (3)A nb1 :A nb1 Contains N b ×N g A submatrix is used to associate the branch end pressure and the node pressure, where the submatrix in the i-th row and j-th column is 1, indicating that the pressure at node j is equal to the end pressure of branch i, otherwise the submatrix is 0.
[0119] (4)A nb2 :A nb2 Contains N b ×N g A submatrix is used to associate the branch head end pressure and the node pressure, where the submatrix in the i-th row and j-th column is 1, indicating that the pressure of node j is equal to the head end pressure of branch i, otherwise the submatrix is 0; in particular, if node j is a pressure ratio of K cp When node j is connected to the head of branch i, the submatrix of row i and column j is K cp ×1.
[0120] Step 403) Based on the correlation matrix, the mass conservation equation at the node and the pressure continuity equation between the node and the pipeline are constructed, which can be expressed as: in q L -A out q0=qn (45) p L =A nb1 pn, p0=A nb2 pn (46)
[0121] Where pn and qn are the node pressure and vector respectively; L, p0, q L , q0 are both Nt×1 vectors, and the coefficient matrix A in 、A out 、A nb1 、A out2 The sub-matrices 1 and 0 in are both Nt×Nt matrices.
[0122] Substituting formula (46) into the first line of formula (36), we can obtain:
[0123] Where H a1 and H a2 are the constant coefficient matrix and vector describing the mass flow rate at the pipeline outlet. Next, substitute equations (46) and (47) into the second row of equation (36), and we can obtain: q0 = H4(H a1 pn+H a2 )+γ q =H a3 pn+H a4 (48)
[0124] Where H a3 and H a4 are the constant coefficient matrix and vector describing the mass flow rate at the pipeline inlet. Substituting Equations (47) and (48) into Equation (45), the pressure and mass flow rate at the node can be related as follows:
[0125] Where H a5 and H a6 are the constant coefficient matrices and vectors describing the correlation between pressure and mass flow at the nodes. Subscripts sr and ns are defined as variable identifiers for the gas source node and gas load node, and by expanding Equation (49), we can obtain the natural gas network equivalent model based on the practical analytical formula:
[0126] Where H a51 、H a52 、H a53 、H a54 H a5 The submatrix in H a61 、H a62 H a6 The subvector in pn sr and pn ns is the pressure vector of the source node and non-source node; qn sr and qn ns is the mass flow vector of the source node and non-source node. Using matrix transformation, the mass flow of the source node and the pressure of the non-source node in the natural gas system are completely expressed as functions of the boundary conditions. That is, the simplified method of the natural gas network equivalent model is: qnsr =H a51 pn sr +H a52 pn ns +H a61 (52)
[0127] The non-source node pressure and source node mass flow rate in the natural gas system are calculated using the analytical functions shown in Equations 1 and 2, respectively, as shown in Figure 3.
[0128] This paper proposes an analytical method for natural gas system dynamic analysis. Based on the dynamic transmission model of the natural gas system, this method uses the constant variation method to derive its equivalent form. Furthermore, based on the superposition, time-invariance, and causal properties of natural gas transmission, a practical analytical form of the natural gas dynamic transmission model and an equivalent model of the natural gas network are constructed under different initial and boundary conditions. This method reduces computational complexity while significantly improving accuracy.
[0129] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention, and such changes and modifications fall within the scope of the invention as claimed.
Claims
1. An analytical method suitable for dynamic analysis of natural gas networks, characterized in that: include: A natural gas dynamic transmission model is established according to the conservation law equation of natural gas transmission, and the natural gas dynamic transmission model is reconstructed into a natural gas dynamic heat conduction equation; The parameter variation method is used to transform the natural gas dynamic heat conduction equation into a group of partial differential equations with homogeneous boundary conditions; Determining a general analytical expression for the system of partial differential equations under constant pressure boundary conditions; Based on the superposition, initial conditions and boundary conditions of natural gas transmission, a practical analytical formula of a natural gas dynamic transmission model based on the general analytical formula is constructed; According to the topological characteristics, time invariance and causality of the natural gas system, a natural gas network equivalent model based on the practical analytical formula is constructed; The non-source node pressure and source node mass flow rate in the natural gas system are determined based on the natural gas network equivalent model.
2. The analytical method for natural gas network dynamic analysis according to claim 1, characterized in that: The method of establishing a natural gas dynamic transmission model according to the conservation law equation of natural gas transmission includes the following steps: A dynamic model of natural gas transmission in a pipeline is established, including the mass conservation equation and momentum conservation equation, as shown below: In the formula, x and t are space and time, c is the speed of sound, which is 340m / s; p x,t is the natural gas pressure, Pa; q x,t is the natural gas mass flow rate, kg / s; w is the average natural gas velocity, m / s; D is the inner diameter of the pipeline, m; S is the cross-sectional area of the pipeline, m 2 ;λ is the pipeline resistance coefficient; In the dynamic analysis of natural gas system, initial conditions and boundary conditions also need to be given, which are: In the formula, p x,0 and q x,0 are the distribution of pressure and mass flow in the pipeline at time 0, i.e., the initial conditions; and are the initial condition functions of pressure and mass flow respectively; L is the length of the pipeline, m; p 0,t is the time series function of the pipeline inlet pressure, i.e., the pressure boundary; q L,t is the time series function of the mass flow rate at the pipeline outlet, that is, the flow boundary.
3. The analytical method for natural gas network dynamic analysis according to claim 2, characterized in that: The step of reconstructing the natural gas dynamic transmission model into a natural gas dynamic heat conduction equation comprises the following steps: Taking the partial derivative of the second equation with respect to x and substituting it into the first equation in equation (1), we get the heat conduction equation as follows: In the formula, α is the coefficient term in the heat conduction equation; accordingly, the rate of change of pressure with respect to space at the outlet of the pipe can be obtained by transformation, which is defined as m t , which can be expressed as: Therefore, formula (1) can be transformed into:
4. The analytical method for natural gas network dynamic analysis according to claim 3, characterized in that: The method of transforming the natural gas dynamic heat conduction equation into a group of partial differential equations with homogeneous boundary conditions by using the parameter variation method comprises the following steps: When the pressure boundary is constant, p 0,t Take a constant value ψ p,1 ; Introduce intermediate variable u x,t , for p x,t Refactoring, we have: Substituting x=0 and t=0 into equation (6), we can obtain x,t The initial conditions and a set of boundary conditions are: Taking the partial derivative of both sides of equation (6) with respect to x at x = L, we can obtain x,t Another set of boundary conditions is expressed as: On both sides of equation (6), we obtain the second-order partial derivative of x and the first-order partial derivative of t, respectively: Substituting equation (9) into equation (5), equation (5) can be re-expressed as a set of partial differential equations with homogeneous boundary conditions as follows:
5. The analytical method for natural gas network dynamic analysis according to claim 4, characterized in that: Determining the general analytical expression of the partial differential equation group under the constant pressure boundary condition comprises the following steps: definition is the solution of the homogeneous problem corresponding to formula (10). Solving the homogeneous problem, we can get: In the formula, k2 is the coefficient term; T0(t) is The function component with respect to time in ; n is the number of Fourier components; reference In the form of, we can see that in formula (10), u x,t The form is: In the formula, u n,t for u x,t The time-dependent function component in (10) x,t According to the basis expansion in formula (11), we can get: In the formula, f n,t f x,t The time-dependent function component of is obtained by inverse Fourier transform as shown in equation (14). Substituting equations (12) to (14) into the first equation in equation (10), we can obtain: In the formula, g n is the coefficient term in the nth nonhomogeneous partial differential, u n,0 for u n,t The value at t = 0; Solving equation (15) yields u n,t and u x,t The analytical expressions are: Substituting formula (17) into formula (6), we can get p x,t The analytical formula under constant pressure conditions is: Substituting equation (18) into the second equation in equation (1), we can obtain q x,t The analytical formula under constant pressure conditions is: In the formula, p 0,t is a constant pressure boundary, and a constant is taken; equations (18) and (19) are the constant pressure boundary conditions. The general analytical expression of the partial differential equations of the natural gas dynamic transmission model under the condition of 6. The analytical method for natural gas network dynamic analysis according to claim 1, characterized in that: The method of constructing a practical analytical formula of a natural gas dynamic transmission model based on the general analytical formula based on the superposition property, initial conditions and boundary conditions of natural gas transmission comprises the following steps: The pressure boundary reconstruction can be expressed as: Where Nt is the boundary condition length, Δt is the time step; ψ p is the new boundary condition, corresponding to the pressure increment, where the element ψ p,i Indicates t i The pressure at time t i-1 The pressure increment at a given moment; According to the superposition of natural gas transmission, the pressure p x,t Can be decomposed into: In the formula, each component χ k,x,t satisfy: When k = 1, χ k,x,t The form is consistent with formula (18), that is: When k>1, χ k,x,t The form is: In engineering, the initial conditions are calculated based on the steady-state energy flow and can be expressed as: In the formula, K1, K2, K3 are constant coefficients in the initial conditions, and m0 is m t The value at t = 0, is the value of the initial condition of mass flow at x = L, that is, the mass flow at the pipeline outlet at time t = 0; At the same time, m t It is expressed as a piecewise step function, namely: In formula (10), f x,t And f in formula (14) n,t Substituting into formula (16), we have: The integral in formula (27) can be transformed as follows: Substituting equation (28) and equation (29) into equation (27), we can obtain: Then, by substituting equation (30) into equation (18) and equation (19), the practical analytical expressions of the natural gas transmission dynamic model are obtained as follows:
7. The analytical method for natural gas network dynamic analysis according to claim 1, characterized in that: The method of constructing a natural gas network equivalent model based on the practical analytical formula according to the topological characteristics, time invariance and causality of the natural gas system includes the following steps: Substituting x=L and x=0 into equation (32) and equation (33) respectively, we can obtain j The pipeline outlet pressure and inlet flow rate are: Rearranging equations (34) and (35), we can obtain: In the formula, p L and p0 are the pressure vectors at the pipe outlet and inlet, q L and q0 are the flow vectors at the pipe outlet and inlet, H1 to H4 are N t ×N t The constant coefficient matrix, γ p and γ q N t ×1 pressure and mass flow rate constant coefficient vector, determined by the initial conditions; the elements can be expressed as: Definition N g and N b are the number of nodes and pipelines in the natural gas system, 1 and 0 are the identity matrix and zero matrix respectively; the association matrix A is introduced in , A out , A nb1 and A nb2 Used to describe topological properties in natural gas systems: Among them A in Contains N g ×N b A submatrix is used to associate the branch end flow and node flow, where the submatrix in the i-th row and j-th column is 1, indicating that the end flow 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 branch headend flow and node flow, where the submatrix in the i-th row and j-th column is 1, indicating that the flow flows from node i to the headend of branch j, otherwise the submatrix is 0; nb1 Contains N b ×N g A submatrix is used to associate the branch end pressure and the node pressure, where the submatrix in the i-th row and j-th column is 1, indicating that the pressure at node j is equal to the end pressure of branch i, otherwise the submatrix is 0; nb2 Contains N b ×N g submatrices are used to associate the branch head pressure with the node pressure, where the submatrix in the i-th row and j-th column is 1, indicating that the pressure at node j is equal to the head pressure at branch i, otherwise the submatrix is 0; in particular, if node j is a node with a pressure ratio of K cp When node j is connected to the head of branch i, the submatrix of row i and column j 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 pipeline are constructed, which can be expressed as: AND in q L -AND out q0=qn (45) pp L =A nb1 pn,p0=A nb2 pn (46) Where pn and qn are the node pressure and vector respectively; L , p0, q L , q0 are both Nt×1 vectors; the coefficient matrix A in , A out , A nb1 , A out2 The sub-matrices 1 and 0 in are both Nt×Nt matrices; Substituting formula (46) into the first line of formula (36), we can obtain: In the formula, H a1 and H a2 is the constant coefficient matrix and vector describing the mass flow rate at the pipeline outlet; then, substituting equations (46) and (47) into the second line of equation (36), we can obtain: q0=H4(H a1 pn+H a2 )+γ q =H a3 pn+H a4 (48) In the formula, H a3 and H a4 is the constant coefficient matrix and vector describing the mass flow rate at the pipeline inlet; Substituting equations (47) and (48) into equation (45), the pressure and mass flow rate at the node can be related as follows: In the formula, H a5 and H a6 are the constant coefficient matrices and vectors describing the correlation between the pressure and mass flow of the nodes; subscripts sr and ns are defined as the variable identifiers of the gas source node and the gas load node. By expanding equation (49), the equivalent model of the natural gas network based on the practical analytical formula can be obtained: In the formula, H a51 , H a52 , H a53 , H a54 H a5 The submatrix in H a61 , H a62 H a6 The subvector in pn sr and pn ns is the pressure vector of the source node and non-source node; qn sr and qn ns is the mass flow vector of the source node and the non-source node; the source node mass flow and the non-source node pressure in the natural gas system are completely expressed as a function of the boundary conditions by using matrix transformation, that is, the simplified method of the natural gas network equivalent model is: qn sr =H a51 pn sr +H a52 pn ns +H a61 (52).
Citation Information
Patent Citations
Multi-energy complementary system operation boundary analysis method considering load uncertainty
CN110737993A
Electric power-natural gas optimal power flow calculation method considering natural gas non-isothermal process
CN114330817A
Analytic method suitable for dynamic analysis of natural gas network
CN117473758A
Methods and systems for natural gas data computation outside gas internet of things based on energy measuring
US20230027479A1