Pipe network pressure-speed coupling solving method based on IDEAL algorithm
By constructing a closed set of speed and pressure equations in the pipeline system and using the IDEAL algorithm for solving it, the problems of low computing efficiency and slow convergence speed of existing algorithms in complex pipeline systems are solved, and the rapid coupling solution and efficient calculation of pipeline pressure-speed information are realized.
Patent Information
- Application Number
- CN202510380234.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-28
- Publication Date
- 2025-06-06
AI Technical Summary
The existing pressure-speed coupling solution algorithms, such as the SIMPLE algorithm, have low computational efficiency and slow convergence speed when dealing with complex pipeline systems, and the IDEAL algorithm has not been applied in pipeline speed-pressure coupling solution. There are problems such as empirical iteration selection, non-closed speed and pressure equation systems, and boundary conditions to handle cumbersome processing.
By constructing the equations of pipeline boundary points and pipeline connection points, the velocity equation and pressure equation based on the interleaved grid are realized, which avoids the empiricality of the number of iterative solutions in the pressure equation, and reduces the implementation complexity of the boundary conditions of the import and export of pipeline networks. The IDEAL algorithm is used for pressure-speed coupling solutions.
It realizes the rapid coupling solution of pipeline pressure-speed information, improves calculation efficiency, shortens convergence time, overcomes the problems of stability and inefficiency of traditional algorithms, and provides technical support for pipeline operation optimization.
Smart Images

Figure CN120105644A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of pipeline transportation research, and in particular to a pipeline network pressure-velocity coupling solution method based on an IDEAL algorithm. Background Art
[0002] The pipeline network system is an important part of the infrastructure such as long-distance oil and gas transportation, urban water supply, gas supply, and heating supply. Its operating status is directly related to the efficient allocation of resources and the safety and stability of the system. In the design, operation scheduling and optimization process of the pipeline network system, it is key to quickly and accurately obtain the quantitative distribution law of pipeline flow (velocity) and pressure. The solution of flow and pressure requires the momentum equation and continuity equation based on fluid mechanics. Pressure and flow are coupled with each other and difficult to solve directly. Usually, some pressure-velocity coupling solution algorithms are used to realize the calculation of transient flow and pressure of the pipeline network under given pipeline boundary conditions and initial conditions. The SIMPLE algorithm is a commonly used pressure-velocity coupling solution algorithm. The algorithm solves the momentum equation and pressure correction equation sequentially by assuming that the initial pressure and velocity are independent and ignoring the influence of the neighboring point correction velocity on the current node correction velocity. The velocity and pressure are corrected by the pressure correction value to realize the coupled solution of pressure and velocity. Due to the existence of these two assumptions of the SIMPLE algorithm, the pressure and velocity do not match, exaggerating the influence of the pressure correction value, resulting in an unstable solution process. When dealing with complex pipeline networks, it faces problems such as low computational efficiency and slow convergence. To this end, some scholars proposed the IDEAL (inner doubly iterative efficient algorithm for linked equations) algorithm, which uses two inner iterations of the pressure equation to overcome these two assumptions and achieve significant acceleration effects in the application of multidimensional problems. However, the IDEAL algorithm has not been applied in the solution of pipeline network velocity-pressure coupling, mainly due to the following four reasons:
[0003] First, the IDEAL algorithm is somewhat empirical: the IDEAL algorithm overcomes the assumptions of the SIMPLE algorithm through two internal iterations of the pressure equation solution. The number of each internal iteration is empirical. If the number of iterations is too small, the convergence is slow; if the number of iterations is too large, redundant iterations will increase the calculation time. It is difficult to accurately select the number of iterations to adapt to different pipe network hydraulic calculation problems; second, the velocity equation group obtained by the IDEAL algorithm for the discretization of the momentum equation is not closed: based on the conventional staggered grid, the momentum equation of the internal velocity node, the velocity equation of the pipe network inlet (source point) and outlet (sink point) nodes with some given velocity boundary conditions, and the quality equation of the pipe network connection nodes can be obtained. Continuity equation, the number of velocity discrete equations that can be constructed is less than the number of velocity variables to be determined; third, the pressure equation group obtained by the IDEAL algorithm based on the continuity equation and the momentum equation is not closed: based on the conventional staggered grid, the pressure equations of the internal pressure nodes, the pressure equations of the pipeline inlet and outlet nodes with some given pressure boundary conditions, and the pressure equality equations of the pipeline connection nodes can be obtained. The number of pressure discrete equations that can be constructed is less than the number of pressure variables to be determined; fourth, the boundary condition processing is cumbersome: for different pipeline inlet and outlet flow rates and pressure boundaries, the discrete objects are different, the discrete processing methods used are different, and different discrete strategies need to be adopted, which cannot automatically adapt to different boundary conditions.
[0004] Therefore, it is urgent to build a fast solution method for pipeline network pressure-velocity coupling based on the IDEAL algorithm, so as to achieve fast hydraulic solution of complex pipeline networks while ensuring accuracy, and provide technical support for pipeline network operation optimization. Summary of the invention
[0005] The purpose of the present invention is to provide a method for solving the pressure-velocity coupling of a pipeline network based on the IDEAL algorithm. The method realizes the closure of velocity equations and pressure equations based on staggered grids by constructing equations of pipeline boundary points and pipeline network connection points, promotes the coupling of pipeline network pressure-velocity information, avoids the empirical number of iterative solutions in the pressure equation, and reduces the implementation complexity of the boundary conditions of the pipeline network inlet and outlet.
[0006] The objective of the present invention is achieved through the following technical solutions:
[0007] A method for solving pipe network pressure-velocity coupling based on IDEAL algorithm, the method comprising:
[0008] Step 1: Build the pipe network structure and generate a staggered grid for each pipe;
[0009] Step 2: Set a velocity node at the end point of the pipeline, and the velocity node contains a control volume of half a grid. Obtain the velocity equations of the nodes inside the pipeline and the boundary nodes through the discretized momentum equation. Combined with the mass continuity equation and boundary conditions of the connection point, the network velocity equation is closed.
[0010] Step 3: Obtain the pressure equation of the nodes in the pipeline through the continuity equation of the pressure control volume. On the basis of the pressure equality equation and boundary conditions, combined with the mass continuity condition of the connection point, the pressure equation of the pipeline network is closed;
[0011] Step 4: Solve the pressure equation for the first time, and substitute the obtained pressure as the source term into the velocity equation obtained in step 2 as the iterative initial value for solving the momentum equation;
[0012] Step 5: Discretize the pressure gradient according to the initial pressure p*, and bring the pressure gradient into the velocity equation obtained in step 2 as a source term, and obtain the intermediate velocity u* by solving the velocity equation;
[0013] Step 6: Use the intermediate velocity u* obtained in step 5 to update the source term of the pressure equation, solve the pressure equation for the second time, only solve it once, get the final pressure at the current level, and use the velocity equation to get the final velocity at the current level;
[0014] Step 7: Determine whether it converges. If so, end the external iteration; otherwise, use the final velocity at the current iteration level as the initial velocity at the next iteration level, and return to step 2, repeating the above iteration until a converged pressure and velocity solution is obtained.
[0015] An electronic device comprises a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method.
[0016] A computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method.
[0017] It can be seen from the technical solution provided by the present invention that the above method realizes the closure of velocity discrete equations and pressure discrete equations based on staggered grids by constructing equations for pipeline boundary points and pipeline network connection points, promotes the coupling of pipeline network pressure-velocity information, avoids the empirical number of iterative solutions in the pressure equation, reduces the implementation complexity of pipeline network inlet and outlet boundary conditions, and finally realizes the application of IDEAL algorithm in the rapid solution of pipeline network pressure-velocity coupling. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative work.
[0019] Figure 1A schematic flow chart of a method for solving the pressure-velocity coupling of a pipe network based on the IDEAL algorithm provided in an embodiment of the present invention;
[0020] Figure 2 This is a schematic diagram of the topological structure of the pipe network structure according to an embodiment of the present invention;
[0021] Figure 3 It is a schematic diagram of velocity distribution when the length of each pipeline is 50 km obtained according to the method of the present invention;
[0022] Figure 4 A schematic diagram of pressure distribution when the length of each pipeline is 50 km obtained according to the method of the present invention;
[0023] Figure 5 It is a schematic diagram for comparing the calculation efficiency of the method according to the present invention. DETAILED DESCRIPTION
[0024] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments, which does not constitute a limitation of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] like Figure 1 FIG. 1 is a flow chart of a method for solving a pipe network pressure-velocity coupling problem based on an IDEAL algorithm according to an embodiment of the present invention. The method includes:
[0026] Step 1: Build the pipe network structure and generate a staggered grid for each pipe;
[0027] In this step, in the generated staggered grid, the pressure node is in the primary control volume and the velocity is in the secondary control volume generated by the staggering; different from the traditional staggered grid, the pipeline boundary velocity node has half a control volume, so that the pipeline boundary point also has an independent velocity discrete equation.
[0028] like Figure 2 The figure shows a schematic diagram of the topological structure of the pipe network structure according to an embodiment of the present invention, taking a branch pipe network as an example, including three pipes, a source point, and two sinks; each pipe element is connected by a connection point, and there is no additional variable to be determined at the connection point; each pipe is evenly divided into l sections, including l p (l p =l+2) pressure nodes, l v Speed nodes (l v =l+1).
[0029] Step 2: Set a velocity node at the end point of the pipeline, and the velocity node contains a control volume of half a grid. Obtain the velocity equations of the nodes inside the pipeline and the boundary nodes through the discretized momentum equation. Combined with the mass continuity equation and boundary conditions of the connection point, the network velocity equation is closed.
[0030] In this step, the speed of all speed nodes is assigned to the initial speed u 0 ,u 0 The value of needs to be close to the true solution. If it cannot be predicted, it can be taken as 0;
[0031] Using the known initial velocity u 0 , taking the steady-state momentum equation as an example, the discrete momentum equation is:
[0032]
[0033] Where ρ is the density, kg / m 3 ; u is the flow velocity, m / s; A is the cross-sectional area of the pipe, m 2 ; x is the position along the pipeline, m; p is the pressure at the location of the pipeline, Pa; θ is the angle between the pipeline axis and the horizontal direction, rad; g is the acceleration of gravity, m / s 2 ; S is the wetted perimeter length on the pipe cross section, m; f is the friction coefficient, N / m;
[0034] For each velocity internal node of the pipeline, taking velocity internal node n as an example, the momentum equation obtained by discretization using the finite volume method is:
[0035]
[0036] Where n is the number of the node in the velocity system; a is the coefficient of the algebraic equation system; Δx is the grid space step; b is the source term of the algebraic equation system; max is the maximum value selection sign; is the position of the left grid interface of node n in the velocity; is the grid interface position on the right side of node n in the velocity; n-1 is the node position on the left side of node n in the velocity; n+1 is the node position on the right side of node n in the velocity;
[0037] For each velocity boundary node of the pipeline, taking velocity boundary node m as an example, the momentum equation obtained by discretization using the finite volume method is:
[0038]
[0039] Among them, m1 is the boundary neighbor;
[0040] Each pipeline element is connected through a connection point. There is no variable to be determined at the connection point. Each connection point must satisfy mass continuity. Taking the connection point c as an example, the mass continuity equation is:
[0041]
[0042] The superscript c indicates the location of the connection point; i indicates the i-th connection node; n c Indicates the number of pipeline components connected to connection point c; other connection points are processed in the same way;
[0043] According to formulas (2)-(4), l v pipeline velocity nodes and l c A total of l connection points can be established v +l c equation, for l c The equations of the connection points are added to the equations of the nodes of the included pipeline connection elements, so that connections are established between pipelines and between pipelines and other elements. Taking the connection point c and its connected velocity boundary node m and source point s as an example, we get:
[0044]
[0045] After adding the equation of the connection point to the pipeline velocity boundary node equation, there is no longer an independent equation, and the pipeline equation still remains l v velocity equation; the source and sink of the pipeline are newly formed l source +l sink velocity equations, we get l v +l source +l sink A velocity equation;
[0046] For example, if Figure 2 As shown, the entire pipeline network has a total of l v +l source +l sink (21) unknown speed variables, including l v (18) pipeline nodes, l source 1 source point and l sink There are two (2) sinks, and the number of unknown velocity quantities in the entire network is consistent with the number of velocity equations, forming a closed form, thereby realizing the solution of the velocity field;
[0047] The source or sink is the network boundary. If the source or sink gives a pressure boundary, no processing is required on the velocity equation. If the velocity boundary u=u b ,u b Represents a given velocity boundary value, then the velocity equation of the source or sink can be modified. Taking the source point s as an example, we get:
[0048]
[0049] At this point, the number of velocity equations for the entire pipeline network is equal to the number of velocity unknowns, and the definite solution of the pipeline network velocity field based on the momentum equation can be achieved.
[0050] Step 3: Obtain the pressure equation of the nodes in the pipeline through the continuity equation of the pressure control volume. On the basis of the pressure equality equation and boundary conditions, combined with the mass continuity condition of the connection point, the pressure equation of the pipeline network is closed;
[0051] In this step, the momentum equation and initial velocity field u of each pipeline are discretized. 0 Calculate the hypothetical speed u g , get the hypothetical speed u g and the temporary velocity u of the pressure gradient t , the temporary speed u t Substitute the continuity equation of the pressure control volume into the pressure equation of each internal node except the pipeline boundary node, specifically:
[0052] Hypothetical speed u g Calculated based on the deformation of the momentum equation, with pressure node n p For example, we get:
[0053]
[0054] The temporary velocity u obtained from the momentum equation t Satisfy the continuity equation The temporary speed u t Substitute the continuity equation of the pressure control volume into the pressure equation of each internal node except the pipeline boundary point, and take the pressure node n as p For example, the temporary speed u t Substituting into the continuity equation we get:
[0055]
[0056] Among them, the parameters with "superscript '" represent the values corresponding to the pressure grid, and the parameters without "superscript '" represent the values corresponding to the velocity grid;
[0057] The temporary speed u in equation (8) t The mass flow rate of the connection point is continuous, and the pressure relationship of each connection point is obtained. The pipeline node p connected to the connection point c 1 For example:
[0058]
[0059] If the source point or sink point included in the connection point is a velocity boundary, the velocity boundary value is directly substituted into equation (10), otherwise the known value of the previous iteration step is taken;
[0060] According to the equal pressure of the connection points, another relationship between the pressures of each connection point can be obtained, taking the connection point c as an example:
[0061]
[0062] i, j are any two nodes connected by the connection point c, and i≠j;
[0063] According to equations (9)-(11), l n There are l pipelines in total p pipeline nodes and l c connection points, a total of l p -2×l n The internal point pressure equation and l c connection point equations; for l c The connection point equations are added to the equations of the nodes of the included pipeline connection elements, so that connections are established between pipelines and between pipelines and other elements, and the pipeline node p connected by the connection point c is 1 Taking other nodes i as an example, we get:
[0064]
[0065] Similarly, the pressure equations for other different connection points can be obtained;
[0066] Finally, if Figure 2 As shown, the pipeline includes l p -2×l n The internal point pressure equation, 2×l n The pressure equation of the pipeline boundary point; the pipeline source and sink form l source +l sink pressure equation, we get l p +l source +l sink There are l pressure equations in the pipeline. p +l source +l sink pressure unknowns, including l p pipeline nodes, l source Source point, l sink Therefore, the number of unknown quantities of pipeline pressure is consistent with the number of pressure equations, forming a closure, thereby realizing the solution of pressure field;
[0067] The source or sink is the boundary of the pipe network. If the velocity boundary is given at the source or sink, no processing is required on the pressure equation. For example, if the pressure boundary p = p b , p b Represents a given pressure boundary value, then the pressure equation of the source point or sink point can be modified. Take the source point s as an example:
[0068]
[0069] Therefore, the number of pressure equations for the entire pipe network is equal to the number of unknown pressure variables, and the definite solution of the pipe network pressure field based on the continuity equation can be achieved.
[0070] Step 4: Solve the pressure equation for the first time, and substitute the obtained pressure as the source term into the velocity equation obtained in step 2 as the iterative initial value for solving the momentum equation;
[0071] In this step, the pressure equation is solved for the first time, only once, and the obtained temporary pressure is used as the initial pressure p* at the current iteration level.
[0072] Step 5: Discretize the pressure gradient according to the initial pressure p*, and substitute the pressure gradient as the source term into the velocity equation (momentum equation) obtained in step 2, and obtain the intermediate velocity u* by solving the velocity equation.
[0073] Step 6: Use the intermediate velocity u* obtained in step 5 to update the source term of the pressure equation, solve the pressure equation for the second time, only solve it once, get the final pressure at the current level, and use the velocity equation to get the final velocity at the current level;
[0074] In this step, the virtual speed u is recalculated using the intermediate speed u*. g , update the source term of the pressure equation;
[0075] Solve the pressure equation for the second time, only once, to obtain the final pressure p at the current iteration level;
[0076] Substitute the final pressure into the temporary velocity u t The final velocity u is obtained from the expression of .
[0077] Step 7: Determine whether it converges. If so, end the external iteration; otherwise, use the final velocity at the current iteration level as the initial velocity at the next iteration level, and return to step 2, repeating the above iteration until a converged pressure and velocity solution is obtained.
[0078] In the specific implementation process, there is no need to perform internal iteration on the pressure equation. Since the connection point pressure equation contains the intermediate velocity, pressure difference and pressure, it promotes the transmission and coupling of pipeline pressure and velocity. In the entire external iteration, the pressure equation only needs to be solved once each time, and no internal iteration is required, thus overcoming the problem of empirical iteration number of pressure internal iteration in the traditional multi-dimensional IDEAL algorithm.
[0079] It is worth noting that the contents not described in detail in the embodiments of the present invention belong to the prior art known to professional and technical personnel in the field.
[0080] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the method.
[0081] An embodiment of the present invention further provides a computer storage medium, wherein the computer storage medium stores a plurality of instructions, wherein the instructions are suitable for being loaded by a processor and executing the method.
[0082] In order to verify the effectiveness of the method described in the embodiment of the present invention, the method described in the present invention and the classic SIMPLE algorithm of the prior art are compared and tested. Figure 2 The branch pipe network structure shown is used to solve the steady-state velocity and pressure field. The test case uses an incompressible fluid, the pipe diameter is 0.5m, and the fixed friction coefficient is 0.1; the source point is a velocity boundary condition, and the size is 0.5m / s; the confluence point is a pressure boundary condition, and the pressure size of the two confluence points is 0.5MPa. The grid space step size is selected as 1km, and the calculation efficiency of the method of the present invention (IDEAL algorithm) and the SIMPLE algorithm are compared when the three pipelines are 50km, 100km and 300km respectively. Since the pipeline length is consistent and the outlet confluence pressure is the same, the problem has an analytical solution, velocity distribution: the flow velocity of the main pipeline is 0.5m / s; the velocity of the branch pipeline is 0.25m / s; pressure distribution: the pressure is linearly distributed along the line, and the pressure drop of the main pipeline is 4 times that of the branch pipeline.
[0083] like Figure 3 The figure shows a schematic diagram of velocity distribution when the length of each pipeline is 50 km, obtained according to the method of the present invention. For a pipeline network with three pipelines each of which is 50 km long, the main pipeline flow velocity calculated using the SIMPLE algorithm and the method of the present invention is 0.5 m / s, and the velocity of the two branch pipelines is 0.25 m / s.
[0084] like Figure 4 The figure shows a schematic diagram of pressure distribution when the length of each pipeline is 50 km, obtained according to the method of the present invention. The pressure drop of the main pipeline is 4 times that of the branch pipeline. The outlet pressure is the same as the set pressure, which is consistent with the analytical solution and the calculation is correct.
[0085] In terms of computational efficiency, Figure 5 The figure shows a comparison diagram of the calculation efficiency of the method according to the present invention. When the three pipelines are 50 km, 100 km and 300 km, the calculation efficiency of the method of the present invention is significantly faster than that of the SIMPLE algorithm. Compared with the SIMPLE algorithm, the calculation time of the method of the present invention is shortened by 11.35 times on average.
[0086] It can be seen from the above comparison results that the calculation efficiency of the pipeline network pressure-velocity coupling solution method based on the IDEAL algorithm described in the embodiment of the present invention is higher than the classic SIMPLE algorithm in the prior art, and can provide technical support for the rapid operation optimization of the pipeline network.
[0087] In summary, the method described in the embodiment of the present invention realizes the closure of the velocity equation and the pressure equation based on the staggered grid by constructing equations for the pipeline boundary points and the pipeline network connection points, promotes the coupling of the pipeline network pressure-velocity information, avoids the empirical existence of the iterative solution in the pressure equation, reduces the implementation complexity of the pipeline network inlet and outlet boundary conditions, and finally realizes the application of the IDEAL algorithm in the rapid solution of pipeline network pressure-velocity coupling.
[0088] In addition, a person skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be implemented by instructing related hardware through a program, and the corresponding program can be stored in a computer-readable storage medium. The above-mentioned storage medium can be a read-only memory, a disk or an optical disk, etc.
[0089] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by any technician familiar with the technical field within the technical scope disclosed in the present invention should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims. The information disclosed in the background technology section of this article is only intended to deepen the understanding of the overall background technology of the present invention, and should not be regarded as an admission or in any form that the information constitutes prior art known to those skilled in the art.
Claims
1. A method for solving the pressure-velocity coupling of a pipe network based on the IDEAL algorithm, characterized in that: The method comprises: Step 1: Build the pipe network structure and generate a staggered grid for each pipe; Step 2: Set a velocity node at the end point of the pipeline, and the velocity node contains a control volume of half a grid. Obtain the velocity equations of the nodes inside the pipeline and the boundary nodes through the discretized momentum equation. Combined with the mass continuity equation and boundary conditions of the connection point, the network velocity equation is closed. Step 3: Obtain the pressure equation of the nodes in the pipeline through the continuity equation of the pressure control volume. On the basis of the pressure equality equation and boundary conditions, combined with the mass continuity condition of the connection point, the pressure equation of the pipeline network is closed; Step 4: Solve the pressure equation for the first time, and substitute the obtained pressure as the source term into the velocity equation obtained in step 2 as the iterative initial value for solving the momentum equation; Step 5: Discretize the pressure gradient according to the initial pressure p*, and bring the pressure gradient into the velocity equation obtained in step 2 as a source term, and obtain the intermediate velocity u* by solving the velocity equation; Step 6: Use the intermediate velocity u* obtained in step 5 to update the source term of the pressure equation, solve the pressure equation for the second time, only solve it once, get the final pressure at the current level, and use the velocity equation to get the final velocity at the current level; Step 7: Determine whether it converges. If so, end the external iteration; otherwise, use the final velocity at the current iteration level as the initial velocity at the next iteration level, and return to step 2, repeating the above iteration until a converged pressure and velocity solution is obtained.
2. The method for solving the pipe network pressure-velocity coupling based on the IDEAL algorithm according to claim 1 is characterized in that: In step 1, in the generated staggered grid, the pressure node is in the primary control volume, and the velocity is in the secondary control volume generated by the staggering; The velocity node at the pipe boundary has half a control volume, so that the pipe boundary point also has an independent velocity discrete equation.
3. The method for solving the pipe network pressure-velocity coupling based on the IDEAL algorithm according to claim 1 is characterized in that: The process of step 2 is specifically as follows: Assign the speed of all speed nodes to the initial speed u0, and the value of u0 should be close to the actual solution; Using the known initial velocity u0, taking the steady-state momentum equation as an example, the discrete momentum equation is: Among them, ρ is density; u is flow velocity; A is the cross-sectional area of the pipeline; x is the position along the pipeline; p is the pressure at the location of the pipeline; θ is the angle between the pipeline axis and the horizontal direction; g is the gravitational acceleration; S is the wetted perimeter length on the pipeline cross section; f is the friction coefficient; For each velocity internal node of the pipeline, taking velocity internal node n as an example, the momentum equation obtained by discretization using the finite volume method is: Where n is the number of the node in the velocity system; a is the coefficient of the algebraic equation system; Δx is the grid space step; b is the source term of the algebraic equation system; max is the maximum value selection sign; is the position of the left grid interface of node n in the velocity; is the grid interface position on the right side of node n in the velocity; n-1 is the node position on the left side of node n in the velocity; n+1 is the node position on the right side of node n in the velocity; For each velocity boundary node of the pipeline, taking velocity boundary node m as an example, the momentum equation obtained by discretization using the finite volume method is: Among them, m1 is the boundary neighbor; Each pipeline element is connected through a connection point. There is no variable to be determined at the connection point. Each connection point must satisfy mass continuity. Taking the connection point c as an example, the mass continuity equation is: The superscript c indicates the location of the connection point; i indicates the i-th connection node; n c Indicates the number of pipeline components connected to connection point c; other connection points are processed in the same way; According to formulas (2)-(4), l v pipeline velocity nodes and l c A total of l connection points can be established v +l c equation, for l c The equations of the connection points are added to the equations of the nodes of the included pipeline connection elements, so that connections are established between pipelines and between pipelines and other elements. Taking the connection point c and its connected velocity boundary node m and source point s as an example, we get: After adding the equation of the connection point to the pipeline velocity boundary node equation, there is no longer an independent equation, and the pipeline equation still remains l v velocity equation; the source and sink of the pipeline are newly formed l source +l sink velocity equations, we get l v +l source +l sink A velocity equation; The number of unknown velocity quantities in the entire pipeline network is consistent with the number of velocity equations, forming a closed system, thereby achieving velocity field solution; The source or sink is the network boundary. If the source or sink gives a pressure boundary, no processing is required on the velocity equation. If the velocity boundary u=u b ,u b Represents a given velocity boundary value, then the velocity equation of the source or sink can be modified. Taking the source point s as an example, we get: At this point, the number of velocity equations for the entire pipeline network is equal to the number of velocity unknowns, achieving a definite solution to the pipeline network velocity field based on the momentum equation.
4. The method for solving the pipe network pressure-velocity coupling based on the IDEAL algorithm according to claim 3 is characterized in that: In step 3, the discrete momentum equation of each pipeline and the initial velocity field u0 are used to calculate the hypothetical velocity u g , get the hypothetical speed u g and the temporary velocity u of the pressure gradient t , the temporary speed u t Substitute the continuity equation of the pressure control volume into the pressure equation of each internal node except the pipeline boundary node, specifically: Hypothetical speed u g Calculated based on the deformation of the momentum equation, with pressure node n p For example, we get: The temporary velocity u obtained from the momentum equation t Satisfy the continuity equation The temporary speed u t Substitute the continuity equation of the pressure control volume into the pressure equation of each internal node except the pipeline boundary point, and take the pressure node n as p For example, the temporary speed u t Substituting into the continuity equation we get: Among them, the parameters with "superscript '" represent the values corresponding to the pressure grid, and the parameters without "superscript '" represent the values corresponding to the velocity grid; The temporary speed u in equation (8) t The mass flow rate of the connection point is continuous, and the pressure relationship of each connection point is obtained. Take the pipeline node p1 connected to the connection point c as an example: If the source point or sink point included in the connection point is a velocity boundary, the velocity boundary value is directly substituted into equation (10), otherwise the known value of the previous iteration step is taken; According to the equal pressure of the connection points, another relationship between the pressures of each connection point can be obtained, taking the connection point c as an example: i, j are any two nodes connected by the connection point c, and i≠j; According to equations (9)-(11), l n There are l pipelines in total p pipeline nodes and l c connection points, a total of l p -2×l n The internal point pressure equation and l c connection point equations; for l c The connection point equations are added to the equations of the nodes of the included pipeline connection elements, so that connections are established between pipelines and between pipelines and other elements. Taking the pipeline node p1 and other nodes i connected by the connection point c as an example, we get: (12) Similarly, the pressure equations for other different connection points can be obtained; Finally, the pipeline includes l p -2×l n The internal point pressure equation, 2×l n The pressure equation of the pipeline boundary point; the pipeline source and sink form l source +l sink pressure equation, we get l p +l source +l sink There are l pressure equations in the pipeline. p +l source +l sink pressure unknowns, including l p pipeline nodes, l source Source point, l sink Therefore, the number of unknown quantities of pipeline pressure is consistent with the number of pressure equations, forming a closure, thereby realizing the solution of pressure field; The source or sink is the boundary of the pipe network. If the velocity boundary is given at the source or sink, no processing is required on the pressure equation. For example, if the pressure boundary p = p b , p b Represents a given pressure boundary value, then the pressure equation of the source point or sink point can be modified. Take the source point s as an example: Therefore, the number of pressure equations for the entire pipe network is equal to the number of unknown pipe pressure variables, achieving a definite solution to the pipe network pressure field based on the continuity equation.
5. The method for solving the pipe network pressure-velocity coupling based on the IDEAL algorithm according to claim 4 is characterized in that: In step 4, the pressure equation is solved for the first time, only once, and the obtained temporary pressure is used as the initial pressure p* at the current iteration level.
6. The method for solving the pipe network pressure-velocity coupling based on the IDEAL algorithm according to claim 5 is characterized in that: In step 6, the virtual speed u is recalculated using the intermediate speed u* g , update the source term of the pressure equation; Solve the pressure equation for the second time, only once, to obtain the final pressure p at the current iteration level; Substitute the final pressure into the temporary velocity u t The final velocity u is obtained from the expression of .
7. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 6.
8. A computer storage medium, characterized in that: The computer storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the method according to any one of claims 1 to 6.