Method, device and equipment for determining pressure loss of gas pipeline and medium
By switching to the Colebrook-White formula after preliminary calculations using graph theory analysis and explicit formulas, the problem of high number of iterations in the calculation of pressure loss in gas pipelines is solved, efficiency and accuracy are improved, and resources are saved.
Patent Information
- Application Number
- CN202410648070.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-23
- Publication Date
- 2024-08-30
AI Technical Summary
When determining the pressure loss of gas pipelines, the existing technology cannot take into account both accuracy requirements and resource saving requirements. The large number of iterative calculations results in long processing time and large consumption of hardware resources.
Use graph theory knowledge to analyze the topological structure of the gas pipeline, use explicit formulas to initially calculate the friction coefficient and flow data, and switch to the Colebrook-White formula for iterative calculations when it is close to convergence, reducing the number of iterations and saving computing resources.
It effectively reduces the number of iterative calculations, improves data processing efficiency, meets accuracy requirements, and saves computing resources.
Smart Images

Figure CN118569127A
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of gas pipelines, and in particular to a method, device, equipment and medium for determining pressure loss of a gas pipeline. Background Art
[0002] With the adjustment of my country's urban energy structure, natural gas will become one of the main urban energy sources. The simulation analysis of gas pipeline network plays a very important role in the design, transformation, expansion and operation management of the pipeline network. Among them, in the analysis application of gas pipeline network, it is necessary to determine the pressure loss of each section of gas pipeline for design or scheduling management.
[0003] At present, when determining the pressure loss of a gas pipeline, it is necessary to first determine the friction resistance coefficient of the gas pipeline. In the related art, there are many formulas for calculating the friction resistance coefficient of a gas pipeline. The Colebrook-White formula is commonly used, which can achieve good accuracy. However, the Colebrook-White formula itself is an implicit function and needs to be calculated through an iterative algorithm. Generally speaking, it takes more than a dozen iterations to obtain a relatively good accuracy. If the accuracy requirement is higher, more iterations are required. The number of pipe sections in a large gas pipeline network may reach hundreds of thousands, and the simulation of the pipeline itself requires iterative processing. In each iteration, the pressure loss of all individual pipe sections needs to be calculated. It takes more than ten to dozens of iterations to achieve overall convergence. In this process, the pressure loss calculation of each pipe section may need to be calculated the same number of times. In each calculation, the friction resistance coefficient is repeatedly iterated, which increases the processing time, makes it difficult to meet the actual application requirements, and requires a large amount of hardware resources. Therefore, when determining the pressure loss of a gas pipeline in the existing solution, it is impossible to take into account both the accuracy requirements and the resource conservation requirements, and there are certain disadvantages in the application. Summary of the invention
[0004] The purpose of this application is to solve one of the technical problems existing in the related art to at least a certain extent.
[0005] To this end, an object of an embodiment of the present application is to provide a method, device, equipment and medium for determining the pressure loss of a gas pipeline.
[0006] In order to achieve the above technical objectives, the technical solutions adopted by the embodiments of the present application include:
[0007] On the one hand, an embodiment of the present application provides a method for determining pressure loss of a gas pipeline, the method comprising:
[0008] The topological structure of the gas pipeline is analyzed based on graph theory knowledge to obtain a node matrix or a loop matrix of the gas pipeline; wherein the node matrix is used to characterize the interconnection relationship of the pipe sections of the gas pipeline, and the loop matrix is used to characterize the loop status of the gas pipeline;
[0009] Initializing the pipe section flow data of each pipe section of the gas pipeline;
[0010] Based on the pipe section flow data, a first friction coefficient of the gas pipeline is calculated by an explicit formula, and a pipe network model is solved according to the first friction coefficient to obtain the first pipe section flow data;
[0011] Based on the flow data of the first pipe section, a second friction coefficient of the gas pipeline is calculated by using the Colebrook-White formula, and a pipe network model is solved according to the second friction coefficient to obtain the flow data of the second pipe section;
[0012] When the second pipe section flow data meets a preset accuracy, the pressure loss data of the gas pipeline is determined according to the second pipe section flow data.
[0013] In addition, the method for determining the pressure loss of a gas pipeline according to the above embodiment of the present application may also have the following additional technical features:
[0014] Furthermore, in one embodiment of the present application, the pipe network model includes a mass conservation model and a pipe section pressure loss calculation model.
[0015] Furthermore, in one embodiment of the present application, the formula of the pipe section pressure loss calculation model is:
[0016] ΔP = BQ;
[0017] Among them, ΔP represents the pressure difference of the pipe section, B represents the loop matrix, and Q represents the flow data of the pipe section.
[0018] Further, in one embodiment of the present application, the first friction coefficient of the gas pipeline is calculated by an explicit formula, and a pipeline network model is solved according to the first friction coefficient to obtain the flow data of the first pipe section, including:
[0019] Calculating a first friction coefficient of the gas pipeline by an explicit formula, and solving a pipe network model according to the first friction coefficient to obtain first initial flow data;
[0020] Calculating a first difference between the first initial flow data and the pipe section flow data input into the explicit formula in the previous round;
[0021] If the first difference is greater than or equal to a first preset threshold, based on the first initial flow data, return to the step of calculating the first friction coefficient of the gas pipeline by an explicit formula.
[0022] Further, in one embodiment of the present application, the method of calculating the first friction coefficient of the gas pipeline by an explicit formula, and solving the pipe network model according to the first friction coefficient to obtain the flow data of the first pipe section also includes:
[0023] If the first difference is smaller than the first preset threshold, the current first initial flow data is determined as the first pipe section flow data.
[0024] Further, in one embodiment of the present application, when the second pipe section flow data meets a preset accuracy, determining the pressure loss data of the gas pipeline according to the second pipe section flow data includes:
[0025] Calculate a second difference between the current second pipe section flow data and the pipe section flow data input into the Colebrook-White formula in the previous round;
[0026] If the second difference is less than a second preset threshold, the pressure loss data of the gas pipeline is determined according to the current second pipe section flow data.
[0027] Further, in one embodiment of the present application, the second friction coefficient of the gas pipeline is calculated by the Colebrook-White formula, and the pipeline network model is solved according to the second friction coefficient to obtain the flow data of the second pipe section, which also includes:
[0028] If the second difference is greater than or equal to the second preset threshold, based on the current second pipe section flow data, return to the step of calculating the second friction coefficient of the gas pipeline by using the Colebrook-White formula.
[0029] On the other hand, an embodiment of the present application provides a device for determining pressure loss of a gas pipeline, the device comprising:
[0030] An analysis unit, used for analyzing the topological structure of the gas pipeline based on graph theory knowledge to obtain a node matrix or a loop matrix of the gas pipeline; wherein the node matrix is used to characterize the interconnection relationship of the pipe sections of the gas pipeline, and the loop matrix is used to characterize the loop status of the gas pipeline;
[0031] An initialization unit, used for initializing the pipe section flow data of each pipe section of the gas pipeline;
[0032] A first processing unit, configured to calculate a first friction coefficient of the gas pipeline by an explicit formula based on the initial pipe section flow data, and solve a pipe network model according to the first friction coefficient to obtain first corrected pipe section flow data;
[0033] a second processing unit, configured to calculate a second friction coefficient of the gas pipeline by using a Colebrook-White formula based on the first pipe section flow data, and solve a pipe network model according to the second friction coefficient to obtain a second pipe section flow data;
[0034] The output unit is used to determine the pressure loss data of the gas pipeline according to the second pipe section flow data when the second pipe section flow data meets a preset accuracy.
[0035] On the other hand, an embodiment of the present application provides a computer device, including:
[0036] at least one processor;
[0037] at least one memory for storing at least one program;
[0038] When the at least one program is executed by the at least one processor, the at least one processor implements the above-mentioned method for determining the pressure loss of a gas pipeline.
[0039] On the other hand, an embodiment of the present application further provides a computer-readable storage medium, which stores a program executable by a processor. When the program executable by the processor is executed by the processor, it is used to implement the above-mentioned method for determining the pressure loss of a gas pipeline.
[0040] The advantages and benefits of the present application will be partially given in the following description, and partially become apparent from the following description, or be understood through the practice of the present application:
[0041] A method for determining the pressure loss of a gas pipeline disclosed in an embodiment of the present application includes: analyzing the topological structure of the gas pipeline based on graph theory knowledge to obtain a node matrix or a loop matrix of the gas pipeline; wherein the node matrix is used to characterize the interconnection relationship between the pipe sections of the gas pipeline, and the loop matrix is used to characterize the loop status of the gas pipeline; initializing the flow data of each pipe section of the gas pipeline; based on the pipe section flow data, calculating the first friction coefficient of the gas pipeline by an explicit formula, and solving the pipe network model according to the first friction coefficient to obtain the flow data of the first pipe section; based on the first pipe section flow data, calculating the second friction coefficient of the gas pipeline by the Colebrook-White formula, and solving the pipe network model according to the second friction coefficient to obtain the flow data of the second pipe section; when the flow data of the second pipe section meets the preset accuracy, determining the pressure loss data of the gas pipeline according to the second pipe section flow data. This method first uses an explicit formula such as the Aritsouri formula to calculate the relevant flow. When the calculation residual is close to convergence or has converged, it switches to the Colebrook-White implicit function to calculate the friction resistance coefficient and iterates the pipe network again. Since the values of the entire pipe network are close to convergence, the number of iterative calculations will be greatly reduced at this time. This can save a lot of computing resources, ensure data processing efficiency, and better meet the needs of data accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following introduction is made to the drawings of the embodiments of the present application or the related technical solutions in the prior art. It should be understood that the drawings introduced below are only for the convenience of clearly describing some embodiments of the technical solutions of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without paying any creative work.
[0043] Figure 1 A schematic flow chart of a method for determining pressure loss of a gas pipeline provided in an embodiment of the present application;
[0044] Figure 2 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The present application is further described below in conjunction with the accompanying drawings and specific embodiments. The described embodiments should not be regarded as limiting the present application, and all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present application.
[0046] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0047] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0048] Graph theory is a widely used branch of mathematics and has been put into practice in many fields. With the rapid development of computer technology, the application of graph theory has become more and more extensive. Graph theory makes the characteristics and flow laws of fluid pipelines clearly manifested. At the same time, the dynamic analysis of pipelines by computers can greatly improve the efficiency of data processing. In the embodiment of the present application, the graph theory method is used to analyze the structure of the pipeline network, the matrix method is used to describe the relationship between the various attributes of the pipeline network, the pipeline network is abstracted into a "directed graph", and the pipeline network structure is represented by the node matrix A representing the interconnection relationship between the pipe sections of the gas pipeline and the loop matrix B representing the loop status of the pipeline network.
[0049] With the adjustment of my country's urban energy structure, natural gas will become one of the main urban energy sources. The relevant analysis of gas pipeline network plays a very important role in the design, transformation, expansion and operation management of the pipeline network. Among them, in the analysis application of gas network, it is necessary to determine the pressure loss of each section of gas pipeline for design or scheduling management.
[0050] At present, when determining the pressure loss of a gas pipeline, it is necessary to first determine the friction resistance coefficient of the gas pipeline. In the related art, there are many formulas for calculating the friction resistance coefficient of a gas pipeline. The Colebrook-White formula is commonly used, which can achieve good accuracy. However, the Colebrook-White formula itself is an implicit function and needs to be calculated through an iterative algorithm. Generally speaking, it takes more than a dozen iterations to obtain a relatively good accuracy. If the accuracy requirement is higher, more iterations are required. The number of pipe sections in a large gas pipeline network may reach hundreds of thousands, and the simulation of the pipeline itself requires iterative processing. In each iteration, the pressure loss of all individual pipe sections needs to be calculated. It takes more than ten to dozens of iterations to achieve overall convergence. In this process, the pressure loss calculation of each pipe section may need to be calculated the same number of times. In each calculation, the friction resistance coefficient is repeatedly iterated, which increases the processing time, makes it difficult to meet the actual application requirements, and requires a large amount of hardware resources. Therefore, when determining the pressure loss of a gas pipeline in the existing solution, it is impossible to take into account both the accuracy requirements and the resource conservation requirements, and there are certain disadvantages in the application.
[0051] In view of this, a method for determining the pressure loss of a gas pipeline is provided in an embodiment of the present application. The method first uses an explicit formula such as the Aritsouri formula to calculate the relevant flow rate, and when the calculation residual is close to convergence or has converged, it switches to the Colebrook-White implicit function to calculate the friction resistance coefficient, and iterates the pipe network again. Since the values of the entire pipe network are close to convergence, the number of iterative calculations will be greatly reduced at this time. This can save a lot of computing resources, ensure data processing efficiency, and better meet the needs of data accuracy.
[0052] Please refer to Figure 1 , Figure 1 is a flow chart of a method for determining the pressure loss of a gas pipeline provided in an embodiment of the present application, with reference to Figure 1 The method for determining the pressure loss of a gas pipeline includes but is not limited to:
[0053] Step 110: Analyze the topological structure of the gas pipeline based on graph theory knowledge to obtain a node matrix or a loop matrix of the gas pipeline; wherein the node matrix is used to characterize the interconnection relationship between the pipe sections of the gas pipeline, and the loop matrix is used to characterize the loop status of the gas pipeline;
[0054] In the related technology, the analysis task of the gas pipeline network includes determining the pipe diameter based on the calculated gas flow and the allowable pressure drop. In some cases, the pipe diameter and pressure drop are known to calculate the pipe network's capacity. In short, through hydraulic calculation, the investment and metal consumption of the pipeline network are determined, and the reliability of the pipeline network is guaranteed.
[0055] In this step, graph theory knowledge is used to study the pipe network problem of the gas pipeline. First, the pipe network is abstracted into a "directed graph", and then the pipe network structure is represented by the node matrix A representing the interconnection relationship between the pipe segments and the loop matrix B representing the loop status of the pipe network. It can be understood that in the embodiment of the present application, using graph theory knowledge, the complex structure of the pipe network can be converted into information that can be recognized by the computer in a simple mathematical language, which provides conditions for the computer to calculate and analyze the gas pipe network. In graph theory, it is mainly composed of vertices and edges, corresponding to the nodes and pipe segments in the gas pipe network. In the gas pipe network, the main nodes that can be regarded as nodes are user gas points, gas source points, and the junctions between pipelines. The pipe segments can be represented as gas transmission pipelines of various pressure levels, pipe network equipment (valves, pressure regulating stations, etc.), and the path where the starting point and end point of the pipe segment in the gas pipe network coincide is called a ring. In graph theory, it can be divided into undirected graphs and directed graphs. Because in the actual gas pipeline network, the gas in each section of the gas pipeline has a certain flow direction, so the actual gas pipeline network is more in line with the directed graph in graph theory.
[0056] Specifically, in this step, in some embodiments, the node matrix can be described by A=[aij]n×m, where n is the number of nodes of the gas pipeline and m is the number of pipe sections of the gas pipeline. The elements of the node matrix A in row i and column j can be defined as: 1, indicating that the pipe section is connected to the node and the fluid flows away from the node; 0, indicating that the pipe section is not connected to the node; -1, indicating that the pipe section is connected to the node and the fluid flows to the node.
[0057] Step 120, initializing the pipe section flow data of each pipe section of the gas pipeline;
[0058] Step 130: Based on the pipe section flow data, a first friction coefficient of the gas pipeline is calculated by an explicit formula, and a pipe network model is solved according to the first friction coefficient to obtain the first pipe section flow data;
[0059] In the embodiment of the present application, when performing pipe network simulation calculation, first, the flow data of each pipe section of the gas pipeline can be initialized. The data can be set based on experience, and the present application does not limit its specific value. Then, based on the initial pipe section flow data, these assumed values can be used for iterative calculation in the early stage of the solution. The closer the initial assumption is to the actual result, the higher the efficiency of the iterative solution and the fewer the number of iterative solutions.
[0060] Specifically, as mentioned in the background technology section, since the direct use of the Colebrook-White implicit solution increases the amount of calculation and the solution time, in the embodiment of the present application, the explicit formula is first used to solve the friction resistance coefficient, and the obtained friction resistance coefficient is recorded as the first friction resistance coefficient. Here, the explicit formula is relative to the Colebrook-White formula, although there are differences in the calculation accuracy in certain intervals, but the calculation convenience is greatly improved. There are many versions of explicit formulas in the related art, and the type used in this application is not specifically limited. For example, the Aritsouri formula can be used as the explicit formula used in step 130.
[0061] In an embodiment of the present application, after obtaining the first friction coefficient, the pipe network model can be solved according to the first friction coefficient to obtain the flow data of the first pipe section. Here, specifically, in the process of pipe network simulation and analysis, it mainly includes a mass conservation model, a pipe section pressure loss calculation model and a pipe network diagram model. Among them, mass conservation in the node method means that the sum of all masses entering and leaving a certain node is 0, and the formula is: AQ=q; wherein A represents the node matrix, q represents the pipe section flow data involved in the calculation, and Q represents the pipe section flow data. q should be close to 0 at the end of the iterative calculation. The pipe section pressure loss calculation model can be simply expressed as: ΔP=BQ, wherein ΔP represents the pressure difference of the pipe section, B represents the loop matrix, and Q represents the pipe section flow data.
[0062] It should be noted that after the first pipe flow data is obtained, the data is closer to the real value than the initialized pipe flow data, but there are still certain accuracy issues. Therefore, it is necessary to use an iterative method to perform multiple rounds of updates to improve the data accuracy.
[0063] Step 140: Based on the flow data of the first pipe section, a second friction coefficient of the gas pipeline is calculated by using the Colebrook-White formula, and a pipe network model is solved according to the second friction coefficient to obtain the flow data of the second pipe section;
[0064] In this step, as mentioned above, although the explicit formula is superior in calculation speed, the data accuracy may be low. Therefore, in order to improve the data processing accuracy, in the embodiment of the present application, after the relatively reasonable first pipe segment flow data is initially obtained through the explicit formula, the friction coefficient and the pipe segment flow data are further iterated through the Colebrook-White formula, and the friction coefficient obtained in the process is recorded as the second friction coefficient, and the pipe segment flow data obtained is recorded as the second pipe segment flow data.
[0065] Step 150: When the flow data of the second pipe section meets a preset accuracy, the pressure loss data of the gas pipeline is determined according to the flow data of the second pipe section.
[0066] In this step, after obtaining the flow data of the second pipe section, its accuracy can be determined based on the residual in the iterative process. When it is determined that it meets the preset accuracy, it means that the current data is relatively accurate. At this time, the pressure loss data of the gas pipeline can be determined by the flow data of the second pipe section.
[0067] It is understandable that the method for determining the pressure loss of the gas pipeline provided in the embodiment of the present application first uses an explicit formula such as the Aritsouri formula to calculate the relevant flow rate, and then switches to the Colebrook-White implicit function to calculate the friction resistance coefficient when the calculation residual is close to convergence or has converged, and iterates the pipe network again. Since the value of the entire pipe network is close to convergence, the number of iterative calculations will be greatly reduced at this time. This can save a lot of computing resources, ensure data processing efficiency, and better meet the needs of data accuracy.
[0068] Optionally, in some embodiments, calculating the first friction coefficient of the gas pipeline by an explicit formula, and solving the pipe network model according to the first friction coefficient to obtain the flow data of the first pipe section includes:
[0069] Calculating a first friction coefficient of the gas pipeline by an explicit formula, and solving a pipe network model according to the first friction coefficient to obtain first initial flow data;
[0070] Calculating a first difference between the first initial flow data and the pipe section flow data input into the explicit formula in the previous round;
[0071] If the first difference is greater than or equal to a first preset threshold, based on the first initial flow data, return to the step of calculating the first friction coefficient of the gas pipeline by an explicit formula.
[0072] In the embodiment of the present application, in the process of iteratively calculating the first pipe segment flow data, the pipe segment flow data currently calculated can be input into the explicit formula in each round of iteration to calculate the first friction coefficient of the gas pipeline. Then, in solving the pipe network model according to the first friction coefficient of the gas pipeline, in the embodiment of the present application, the pipe segment flow data obtained in the iterative process is recorded as the first initial flow data. It can be understood that in each round of iteration, a first initial flow data will be generated. Then, the first difference between the first initial flow data of each round and the pipe segment flow data input into the explicit formula in the previous round can be calculated, and the size of the first difference can reflect the accuracy of the current first initial flow data. In the iterative process, the pipe segment flow data will slowly converge, so the first difference will gradually decrease. When the first difference is large, it means that the current first initial flow data is still in a stage of poor accuracy. At this time, iterative optimization and solution can be continued, that is, based on the first initial flow data, the first friction coefficient of the gas pipeline is calculated by the explicit formula, and then the pipe network model is solved according to the first friction coefficient to obtain the first initial flow data of the next round. In this regard, in the embodiment of the present application, a comparison threshold value may be set, which is recorded as the first preset threshold value. When the first difference value is greater than or equal to the first preset threshold value, the step of calculating the first friction coefficient of the gas pipeline by the explicit formula is returned based on the first initial flow data. If the first difference value is less than the first preset threshold value, it means that the current pipe section flow data calculated by the explicit formula has converged to a certain range, and at this time, the current first initial flow data can be determined as the first pipe section flow data.
[0073] Optionally, in some embodiments, when the second pipe section flow data satisfies a preset accuracy, determining the pressure loss data of the gas pipeline according to the second pipe section flow data includes:
[0074] Calculate a second difference between the current second pipe section flow data and the second pipe section flow data input into the Colebrook-White formula in the previous round;
[0075] If the second difference is less than a second preset threshold, the pressure loss data of the gas pipeline is determined according to the current second pipe section flow data.
[0076] Similarly, in the embodiment of the present application, when determining whether the flow data of the second pipe section meets the preset accuracy, the difference between the flow data of the second pipe section input into the Colebrook-White formula in the current round and the flow data of the second pipe section input into the Colebrook-White formula in the previous round can be calculated through the iteration process of the Colebrook-White formula, and recorded as the second difference. Then a comparison threshold is set specifically, recorded as the second preset threshold, and if the second difference is greater than or equal to the second preset threshold, the flow data of the second pipe section is continued to be iteratively updated. That is, based on the current flow data of the second pipe section, return to the step of calculating the second friction coefficient of the gas pipeline through the Colebrook-White formula, and then continue to update the flow data of the second pipe section according to the obtained second friction coefficient. If the second difference is less than the second preset threshold, it means that the current flow data of the second pipe section has basically converged, and the accuracy has reached the pre-required requirements. Therefore, the pressure loss data of the gas pipeline can be determined according to the current flow data of the second pipe section, and relatively, the pressure loss data obtained at this time will also be more accurate.
[0077] The embodiment of the present application also provides a device for determining pressure loss of a gas pipeline, the device comprising:
[0078] An analysis unit, used for analyzing the topological structure of the gas pipeline based on graph theory knowledge to obtain a node matrix or a loop matrix of the gas pipeline; wherein the node matrix is used to characterize the interconnection relationship of the pipe sections of the gas pipeline, and the loop matrix is used to characterize the loop status of the gas pipeline;
[0079] An initialization unit, used for initializing the pipe section flow data of each pipe section of the gas pipeline;
[0080] A first processing unit, configured to calculate a first friction coefficient of the gas pipeline by an explicit formula based on the pipeline flow data, and solve a pipeline network model according to the first friction coefficient to obtain the first pipeline flow data;
[0081] a second processing unit, configured to calculate a second friction coefficient of the gas pipeline by using a Colebrook-White formula based on the first pipe section flow data, and solve a pipe network model according to the second friction coefficient to obtain a second pipe section flow data;
[0082] The output unit is used to determine the pressure loss data of the gas pipeline according to the second pipe section flow data when the second pipe section flow data meets a preset accuracy.
[0083] Understandably, Figure 1The contents of the embodiment of the method for determining the pressure loss of a gas pipeline shown in the figure are applicable to the embodiment of the device for determining the pressure loss of a gas pipeline. The functions specifically implemented by the embodiment of the device for determining the pressure loss of a gas pipeline are the same as those of the embodiment of the method for determining the pressure loss of a gas pipeline shown in the figure. Figure 1 The embodiment of the method for determining the pressure loss of a gas pipeline shown in FIG. 1 is the same as that of the embodiment of the method for determining the pressure loss of a gas pipeline shown in FIG. Figure 1 The beneficial effects achieved by the embodiment of the method for determining the pressure loss of a gas pipeline shown are also the same.
[0084] Reference Figure 2 , the embodiment of the present application further discloses a computer device, including:
[0085] at least one processor 201;
[0086] At least one memory 202, used to store at least one program;
[0087] When at least one program is executed by at least one processor 201, at least one processor 201 implements the following Figure 1 An embodiment of a method for determining pressure loss in a gas pipeline is shown.
[0088] It is understandable that if Figure 1 The contents of the embodiment of a method for determining the pressure loss of a gas pipeline shown in FIG. 1 are applicable to the embodiment of the computer device. The functions specifically implemented by the embodiment of the computer device are similar to those of the embodiment of FIG. Figure 1 The embodiment of the method for determining the pressure loss of a gas pipeline shown in FIG. 1 is the same as that of the embodiment of the method for determining the pressure loss of a gas pipeline shown in FIG. 1 , and the beneficial effects achieved are the same as those of the method for determining the pressure loss of a gas pipeline shown in FIG. Figure 1 The beneficial effects achieved by the embodiment of the method for determining the pressure loss of a gas pipeline shown are also the same.
[0089] The present application also discloses a computer-readable storage medium in which a program executable by a processor is stored. When the program executable by the processor is executed by the processor, it is used to implement the following Figure 1 An embodiment of a method for determining pressure loss in a gas pipeline is shown.
[0090] It is understandable that if Figure 1 The contents of the embodiment of a method for determining the pressure loss of a gas pipeline shown in the figure are applicable to the embodiment of the computer-readable storage medium. The functions specifically implemented by the embodiment of the computer-readable storage medium are similar to those of the embodiment of the computer-readable storage medium. Figure 1 The embodiment of the method for determining the pressure loss of a gas pipeline shown in FIG. 1 is the same as that of the embodiment of the method for determining the pressure loss of a gas pipeline shown in FIG. 1 , and the beneficial effects achieved are the same as those of the method for determining the pressure loss of a gas pipeline shown in FIG. Figure 1 The beneficial effects achieved by the embodiment of the method for determining the pressure loss of a gas pipeline shown are also the same.
[0091] In some selectable embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the application is provided by way of example, for the purpose of providing a more comprehensive understanding of technology. The disclosed method is not limited to the operation and logic flow presented herein. Selectable embodiments are expected, wherein the order of various operations is changed and the sub-operation of a part described as a larger operation is performed independently.
[0092] In addition, although the present application is described in the context of functional modules, it should be understood that, unless otherwise specified, one or more of the functions and / or features can be integrated into a single physical system and / or software module, or one or more functions and / or features can be implemented in a separate physical system or software module. It can also be understood that a detailed discussion of the actual implementation of each module is unnecessary for understanding the present application. More specifically, in view of the properties, functions and internal relationships of the various functional modules in the system disclosed herein, the actual implementation of the module will be understood within the conventional techniques of engineers. Therefore, those skilled in the art can implement the present application set forth in the claims without excessive experimentation using ordinary techniques. It can also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present application, which is determined by the full scope of the attached claims and their equivalents.
[0093] If the function is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, and other media that can store program codes.
[0094] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, system or device (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, system or device and execute the instructions), or in conjunction with these instruction execution systems, systems or devices. For the purpose of this specification, "computer-readable medium" can be any system that can contain, store, communicate, propagate or transport a program for use by an instruction execution system, system or device, or in conjunction with these instruction execution systems, systems or devices.
[0095] More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or more wires (electronic systems), a portable computer disk case (magnetic systems), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic system, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be a paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering or, if necessary, processing in another suitable manner, and then stored in a computer memory.
[0096] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above-mentioned embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, it can be implemented by any one of the following technologies known in the art or their combination: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0097] In the above description of this specification, the description with reference to the terms "one embodiment / example", "another embodiment / example" or "certain embodiments / examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0098] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
[0099] The above is a specific description of the preferred implementation of the present application, but the present application is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present application. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present application.
[0100] In the description of this specification, the description with reference to the terms "one embodiment", "another embodiment" or "certain embodiments" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiments or examples are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0101] Although the embodiments of the present application have been shown and described, those skilled in the art will appreciate that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present application, and that the scope of the present application is defined by the claims and their equivalents.
Claims
1. A method for determining the pressure loss of a gas pipeline, characterized in that: The method comprises: The topological structure of the gas pipeline is analyzed based on graph theory knowledge to obtain a node matrix or a loop matrix of the gas pipeline; wherein the node matrix is used to characterize the interconnection relationship of the pipe sections of the gas pipeline, and the loop matrix is used to characterize the loop status of the gas pipeline; Initializing the pipe section flow data of each pipe section of the gas pipeline; Based on the pipe section flow data, a first friction coefficient of the gas pipeline is calculated by an explicit formula, and a pipe network model is solved according to the first friction coefficient to obtain the first pipe section flow data; Based on the flow data of the first pipe section, a second friction coefficient of the gas pipeline is calculated by using the Colebrook-White formula, and a pipe network model is solved according to the second friction coefficient to obtain the flow data of the second pipe section; When the second pipe section flow data meets a preset accuracy, the pressure loss data of the gas pipeline is determined according to the second pipe section flow data.
2. A method for determining pressure loss of a gas pipeline according to claim 1, characterized in that: The pipe network model includes a mass conservation model and a pipe section pressure loss calculation model.
3. A method for determining pressure loss of a gas pipeline according to claim 2, characterized in that: The formula for the pipe section pressure loss calculation model is: ΔP = BQ; Among them, ΔP represents the pressure difference of the pipe section, B represents the loop matrix, and Q represents the flow data of the pipe section.
4. A method for determining pressure loss in a gas pipeline according to any one of claims 1 to 3, characterized in that: The step of calculating the first friction coefficient of the gas pipeline by an explicit formula and solving the pipe network model according to the first friction coefficient to obtain the flow data of the first pipe section includes: Calculating a first friction coefficient of the gas pipeline by an explicit formula, and solving a pipe network model according to the first friction coefficient to obtain first initial flow data; Calculating a first difference between the first initial flow data and the pipe section flow data input into the explicit formula in the previous round; If the first difference is greater than or equal to a first preset threshold, based on the first initial flow data, return to the step of calculating the first friction coefficient of the gas pipeline by an explicit formula.
5. A method for determining pressure loss of a gas pipeline according to claim 4, characterized in that: The method of calculating the first friction coefficient of the gas pipeline by an explicit formula, and solving the pipe network model according to the first friction coefficient to obtain the flow data of the first pipe section, further includes: If the first difference is smaller than the first preset threshold, the current first initial flow data is determined as the first pipe section flow data.
6. A method for determining pressure loss of a gas pipeline according to claim 1, characterized in that: When the flow data of the second pipe section meets the preset accuracy, determining the pressure loss data of the gas pipeline according to the flow data of the second pipe section includes: Calculate a second difference between the current second pipe section flow data and the pipe section flow data input into the Colebrook-White formula in the previous round; If the second difference is less than a second preset threshold, the pressure loss data of the gas pipeline is determined according to the current second pipe section flow data.
7. A method for determining pressure loss of a gas pipeline according to claim 6, characterized in that: The method of calculating the second friction coefficient of the gas pipeline by the Colebrook-White formula and solving the pipe network model according to the second friction coefficient to obtain the flow data of the second pipe section also includes: If the second difference is greater than or equal to the second preset threshold, based on the current second pipe section flow data, return to the step of calculating the second friction coefficient of the gas pipeline by using the Colebrook-White formula.
8. A device for determining pressure loss of a gas pipeline, characterized in that: The device comprises: An analysis unit, used for analyzing the topological structure of the gas pipeline based on graph theory knowledge to obtain a node matrix or a loop matrix of the gas pipeline; wherein the node matrix is used to characterize the interconnection relationship of the pipe sections of the gas pipeline, and the loop matrix is used to characterize the loop status of the gas pipeline; An initialization unit, used for initializing the pipe section flow data of each pipe section of the gas pipeline; A first processing unit, configured to calculate a first friction coefficient of the gas pipeline by an explicit formula based on the initial flow data of the pipe section, and solve a pipe network model according to the first friction coefficient to obtain corrected flow data of the first pipe section; a second processing unit, configured to calculate a second friction coefficient of the gas pipeline by using a Colebrook-White formula based on the first pipe section flow data, and solve a pipe network model according to the second friction coefficient to obtain a second pipe section flow data; The output unit is used to determine the pressure loss data of the gas pipeline according to the second pipe section flow data when the second pipe section flow data meets a preset accuracy.
9. A computer device, characterized in that: include: at least one processor; at least one memory for storing at least one program; When the at least one program is executed by the at least one processor, the at least one processor implements a method for determining pressure loss of a gas pipeline as described in any one of claims 1-7.
10. A computer-readable storage medium storing a program executable by a processor, characterized in that: The processor executable program is used to implement a method for determining pressure loss of a gas pipeline as claimed in any one of claims 1 to 7 when executed by the processor.
