Buried gas pipeline leakage diffusion multi-cause fusion simulation method and system

By integrating adaptive grids, porous media coupling algorithms and dynamic hierarchical early warning methods, the complexity of simulating the leakage diffusion process of buried natural gas pipelines in the prior art is solved, and the safety management needs of high-precision leakage simulation and fast response are achieved.

CN119962441AInactive Publication Date: 2025-05-09SHANGHAI THREE ZERO FOUR ZERO TECH CO LTD

Patent Information

Application Number
CN202510439652.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-09
Publication Date
2025-05-09
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing technology is difficult to accurately simulate the leak diffusion process of buried natural gas pipelines, and the closedness of commercial software and high licensing costs limit the customized development of enterprises in soil porous media characteristics and dynamic topological scenarios of pipeline networks.

Method used

A high-precision simulation method that integrates adaptive grids, porous media coupling algorithms and dynamic hierarchical warnings is adopted. By selecting the appropriate leakage calculation model, generating an adaptive grid, and using the improved PIMPLE algorithm to solve the flow equation, output the gas concentration field and generate risk warning information.

Benefits of technology

It significantly improves the matching degree between leakage calculation and real physical scenarios, realizes a reasonable balance between calculation accuracy and resource consumption, supports rapid analysis and judgment of leakage diffusion trends, and shortens the decision-making link from data acquisition to emergency response.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119962441A_ABST
    Figure CN119962441A_ABST
Patent Text Reader

Abstract

The invention relates to the field of smart city operation, and discloses a buried gas pipeline leakage diffusion multi-cause fusion simulation method and system, and the method comprises the following steps: inputting pipeline operation parameters and soil physical parameters; selecting a leakage rate calculation model according to the leakage aperture, and calculating leakage mass flow; generating a three-dimensional basic grid covering the leakage diffusion area, and performing adaptive encryption on the local area based on leakage characteristics; solving the flow equation by adopting a porous medium coupled PIMPLE algorithm, and outputting a gas concentration field; and analyzing the concentration field data and generating risk early warning information. According to the method, the problem of physical distortion of a traditional CFD method in a porous medium environment is solved, high-precision simulation of the leakage diffusion process and rapid perception of the risk situation are achieved, and a whole-process technical support is provided for safe operation and maintenance of a gas pipe network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of smart city operation technology, and specifically to a multi-factor fusion simulation method and system for underground gas pipeline leakage and diffusion. Background Art

[0002] With the adjustment of global energy structure and the growing demand for clean energy, natural gas, as one of the core clean energy sources, is widely used in industry, commerce and residents' lives. However, during transportation, distribution and use, natural gas may leak due to pipeline aging, construction problems or natural disasters. The diffusion behavior of leaked natural gas in the soil is a complex physical process, which is affected by many factors such as soil type, humidity, temperature, and natural gas composition. Leakage of buried natural gas pipelines will not only lead to energy waste, but also cause safety hazards such as fire and explosion, seriously threatening the ecological environment and the safety of people's lives and property. Therefore, how to accurately simulate the leakage and diffusion process of natural gas in the soil and form effective guidance for emergency rescue in the event of leakage has become a technical problem that needs to be solved urgently.

[0003] Although the existing mainstream CFD technology has certain advantages in gas leakage and diffusion simulation, its traditional model that relies on commercial software such as ANSYS is facing severe engineering challenges. The closed nature of commercial software has led to a limited technology ecosystem. The high licensing fees and inaccessibility of source code make it difficult for companies to customize and develop special models for scenarios such as soil porous media characteristics and pipeline network dynamic topology. Taking the simulation of buried pipeline leakage as an example, users need to have relevant professional knowledge to select the appropriate calculation module and select appropriate parameters such as soil permeability, porosity, etc. The complexity of the modeling process further exacerbates this problem. Users need to manually model the pipeline and the corresponding soil. For various working conditions, such as changes in pipeline diameter, they need to re-model and initiate calculations, which undoubtedly increases the difficulty of scene implementation and increases the complexity of calculations.

[0004] The current technical framework is also faced with the shackles of high dependence on engineering experience and insufficient standardization. The operating procedures of commercial software are highly dependent on the engineers' mastery of fluid mechanics theory. From the selection of turbulence models (k-ε, LES or DES) to the setting of convergence criteria, manual intervention is required, and the lack of soil parameter libraries (such as permeability data sets of soils with different textures) further increases modeling uncertainty. More seriously, the data barriers between different software (such as the incompatibility of mesh formats between FLUENT and OpenFOAM) make multi-tool collaborative simulation difficult to achieve, making it difficult for companies to build a complete digital chain from leakage simulation, risk assessment to emergency decision-making. These bottlenecks jointly restrict the progress of CFD technology from the laboratory to online services, making it unable to meet the safety management needs of real-time monitoring and rapid response of modern urban gas pipelines. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a high-precision simulation method and system for buried pipeline leakage and diffusion that integrates adaptive grids, porous medium coupling algorithms, and dynamic graded early warning.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a multi-factor fusion simulation method for leakage and diffusion of buried gas pipelines, comprising the following steps: Input pipeline operation parameters and soil physical parameters; Select the leakage calculation model according to the ratio of the leakage hole diameter to the pipe diameter, and calculate the leakage mass flow rate; Generate a 3D base grid covering the leakage diffusion area and adaptively encrypt the local area based on the leakage characteristics; The PIMPLE algorithm coupled with porous media is used to solve the flow equation and output the gas concentration field; Analyze concentration field data and generate risk warning information.

[0007] Preferably, the step of selecting a leakage calculation model according to the ratio of the leakage aperture to the pipe diameter comprises: When the leakage aperture is smaller than the first threshold, the leakage volume is calculated using the small hole model; When the leakage aperture is larger than the first threshold value and smaller than the first threshold value proportional to the pipe diameter, the leakage amount is calculated using the macropore model; When the leakage aperture is larger than a first threshold value proportional to the pipe diameter, the pipeline rupture model is used to calculate the leakage amount.

[0008] Preferably, the step of calculating the leakage using the pinhole model comprises: Determine whether the gas flow at the time of the leak is critical or subcritical: ; in, is the critical pressure ratio, is the absolute pressure of the environment, is the critical pressure of the leak port, is the gas isentropic index; like When , it is critical flow, and the leakage is: ; like When , it is critical flow, and the leakage is: ; in, is the leakage amount, is the gas leakage coefficient, is the leakage area, is the absolute pressure of the gas in the container, is the molar mass of the gas, is the compression factor, is the molar gas constant, is the temperature of the gas in the container.

[0009] Preferably, the calculation formula for calculating the leakage using the macropore model is: ; The calculation formula for calculating the leakage volume using the pipeline fracture model is: ; in, is the leakage amount, is the area of ​​the circle, is the gas leakage coefficient, is the leakage area, is the absolute pressure of the gas in the container, is the molar mass of the gas, is the compression factor, is the molar gas constant, is the temperature of the gas in the container.

[0010] Preferably, the step of adaptively encrypting the local area based on the leakage characteristics comprises: Set the initial encryption level according to the size of the leak aperture; Dynamically adjust the grid size based on the distance to the leak source. The closer the distance, the higher the encryption level. Boundary layer grids are set on the pipe wall and leakage port.

[0011] Preferably, the rule for dynamically adjusting the grid size is: ; in, is the leakage aperture, is the distance between the grid point and the leakage source, function satisfy Follow Increase and decrease, with Increase and increase.

[0012] Preferably, the step of using the porous medium coupled PIMPLE algorithm to solve the flow equation and output the gas concentration field comprises: Introducing the isotropic drag source term into the momentum equation, the expression is: ; in, for The soil resistance source term in the direction, is the viscous resistance coefficient of natural gas, is the viscosity coefficient, is the inertial drag coefficient, is the fluid velocity, is the fluid density; The modified continuity equation is a porosity-coupled form: ; in, is the soil porosity, For time, is the length of space; Solve the momentum equation for porous media: ; in, For pressure, is the volume force on the gas; Introduce porosity and permeability correction terms into the energy equation: ; in, is the temperature, is the soil thermal conductivity, is the specific heat capacity, is the heat source term; Solve the gas concentration diffusion equation: ; in, is the volume concentration of the gas; The k-ε turbulence model is selected, and the momentum equation, energy equation and concentration equation are spatially discretized using the first-order upwind format, and the time discretization uses the Euler format; Based on the PIMPLE algorithm framework of OpenFOAM, the solution is iteratively solved through the following steps: Perform a prediction step to calculate the velocity field ; Solve the pressure correction equation to update the pressure field ; Correction of velocity field based on pressure gradient ; The loop is iterated until the residual converges, and the gas concentration field and velocity field are output.

[0013] Preferably, the risk warning information includes: The diffusion range where the gas concentration reaches the lower explosion limit; Dynamic cloud diagram of the spatial and temporal evolution of the concentration field; Prediction of peak time of surface leakage concentration.

[0014] Preferably, the method further comprises: Automatically correct porosity and permeability through a preset soil parameter library; Optimize grid encryption strategy based on historical leakage cases.

[0015] The present invention also provides a buried gas pipeline leakage diffusion multi-factor fusion simulation system, comprising: A parameter input module, used to receive pipeline operation parameters and soil physical parameters; The leakage calculation module selects the calculation model according to the leakage aperture ratio; Adaptive mesh generation module, which performs 3D basic mesh construction and local encryption; Multi-physics solution module, which runs the improved PIMPLE algorithm to solve porous media flow; Risk warning module, analyzes the concentration field and outputs visual results.

[0016] The present invention provides a multi-factor fusion simulation method and system for underground gas pipeline leakage and diffusion, which has the following beneficial effects: 1. The present invention dynamically switches between small hole models, large hole models and pipeline fracture models, and automatically adapts the optimal algorithm for different leakage aperture ratios, effectively solving the limitation that a single model in traditional methods cannot cover all-scale leakage conditions, and significantly improving the matching degree between leakage calculation and real physical scenes.

[0017] 2. The present invention adopts an adaptive grid encryption strategy based on leakage characteristics, implements refined grid division near the leakage port, and maintains coarse-grained grids in non-critical areas, thereby achieving a reasonable balance between calculation accuracy and resource consumption, and avoiding the waste of computing power caused by uniform encryption across the entire domain.

[0018] 3. The present invention introduces the porosity correction term and the isotropic resistance source term into the momentum equation to accurately quantify the obstruction effect of soil on gas flow, thereby solving the problem that the traditional NS equation ignores the characteristics of porous media, making the concentration diffusion simulation more in line with the actual soil environment.

[0019] 4. The present invention combines dynamic concentration field data with a graded early warning mechanism to automatically generate visual risk maps and emergency response recommendations, supports rapid analysis of leakage and diffusion trends, and effectively shortens the decision-making chain from data acquisition to emergency response.

[0020] 5. The present invention forms a complete technical closed loop from data acquisition to simulation output through parameter standardized input, automatic grid generation and solver encapsulation, which reduces the dependence on the operator's CFD professional experience and can be quickly deployed on the existing gas pipeline network monitoring platform. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 It is a schematic diagram of the method flow of the present invention; Figure 2 It is a schematic diagram of the system structure of the present invention; Figure 3 A schematic diagram of coarse grid division according to an embodiment of the present invention; Figure 4 A schematic diagram of a simple model of pipeline leakage according to an embodiment of the present invention; Figure 5 A schematic diagram of an unstructured encrypted grid according to an embodiment of the present invention; Figure 6 A schematic diagram of leakage diffusion simulation results of an embodiment of the present invention; Figure 7 Schematic diagram of surface gas concentration calculation results according to an embodiment of the present invention.

[0022] Among them, 10, parameter input module; 20, leakage calculation module; 30, adaptive grid generation module; 40, multi-physics field solution module; 50, risk warning module. DETAILED DESCRIPTION

[0023] The following will be combined with the drawings in the specification of the present invention to clearly and completely describe the technical solutions 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. 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.

[0024] Please see attached Figure 1 The present invention provides a multi-factor fusion simulation method for underground gas pipeline leakage and diffusion. Through the leakage calculation of multiple models, the CFD solution algorithm of porous medium coupling, and the dynamic grid encryption technology, the efficient and accurate simulation of gas leakage and diffusion in complex soil environment is realized. This method solves the problems of low calculation efficiency, poor adaptability of boundary conditions, and rough modeling of leakage physical process in traditional CFD simulation, and can be applied to gas pipeline network risk assessment, emergency decision support and other fields.

[0025] like Figure 1 As shown, the buried gas pipeline leakage diffusion multi-factor fusion simulation method may include the following steps: S1. Input pipeline operation parameters and soil physical parameters; S2. Dynamic calculation of leakage and model selection; S3, adaptive mesh generation and refinement; S4, PIMPLE algorithm solution for porous media coupling; S5. Risk warning and visual output.

[0026] The following is a detailed description of each step in the method of the present invention, which comprehensively describes the specific implementation principle, technical details and process of each step.

[0027] For step S1, in this embodiment, the pipeline operation parameters include the absolute operating pressure of the gas in the pipeline, the pipeline diameter, the pipeline burial depth, and the actual physical size of the leakage aperture.

[0028] Among them, the pipeline operating pressure is collected in real time by the pressure sensor or directly input according to the design parameters, and the pressure unit is Pascal (Pa). The pipeline diameter is determined according to the engineering drawings or on-site measurement data, and the unit is meter (m). The pipeline burial depth is input through the spatial coordinate analysis of the geographic information system (GIS) or manual measurement, and the unit is meter (m). The leakage aperture is parameterized by the acoustic emission detection device or the preset fault mode, and the unit is meter (m).

[0029] Soil physical parameters include soil porosity, permeability and inertial resistance coefficient. Soil porosity is obtained based on soil sample laboratory measurement results or geological database matching, with a value range of 0.2 to 0.5 and dimensionless. Permeability is determined by Darcy permeability test or empirical model inversion calculation, and the unit is square meter (m 2 ), the typical value range is 1×10 -12 ~1×10 -9 m 2 The inertial drag coefficient is dimensionless and its typical value is 1.6×10 5 ~2.5×10 5 .

[0030] Specifically, the preprocessing of input parameters includes dimensional unification and outlier correction. For non-SI unit data in the input parameters, unit conversion operations are performed, such as converting pipeline pressure from bar to Pascal (Pa). For soil porosity, when the input value exceeds the physical reasonable range (for example, γ>0.5), the preset soil parameter library is called for forced correction to limit it to a reasonable range of 0.2 to 0.5.

[0031] During the parameter input process, the correlation check of each parameter is performed synchronously. For example, when the input leakage aperture exceeds the pipe diameter (d>D), the system triggers an abnormal warning and prompts re-entry.

[0032] In this embodiment, the mathematical expression of the parameter input includes: Pipeline operating pressure: p 1 (Pa) Pipe diameter: D (m) Pipeline burial depth: h (m) Leakage aperture: d (m) Soil porosity: γ (dimensionless) Soil permeability: α (m 2 ) Inertial drag coefficient: F (dimensionless) The physical meaning and role of each parameter are as follows: pipeline operating pressure and diameter determine the leakage driving pressure difference, burial depth affects the longitudinal range of leakage diffusion, and leakage aperture determines the choice of leakage calculation model. Soil porosity and permeability are used to correct the mass and momentum conservation terms in the porous media flow equation, and the inertial resistance coefficient is used to quantify the nonlinear resistance effect under high-speed flow.

[0033] In the parameter storage and transmission stage, all input parameters are encapsulated in a structured data format, including scalar parameters (such as pressure and diameter) and tensor parameters (such as permeability anisotropy data). For isotropic soils, the permeability tensor is degraded into a scalar form α, and the anisotropic component is automatically ignored in subsequent calculations.

[0034] For step S2, in this embodiment, the leakage calculation model is selected based on the proportional relationship between the leakage aperture and the pipe diameter. When the leakage aperture is below 20 mm, the small hole model is used; when the leakage aperture is above 20 mm and less than 80% of the pipe diameter, the large hole model is used; when the leakage aperture exceeds 80% of the pipe diameter, the pipe rupture model is used. The model switching condition is realized by judging the preset threshold, for example, by comparing the ratio of the actual leakage aperture to the pipe diameter to trigger different calculation logics.

[0035] For the small hole model, the critical pressure ratio needs to be calculated to determine the flow state. The critical pressure ratio is determined by the following formula: ; in: is the critical pressure ratio; is the absolute pressure of the environment, Pa; is the critical pressure of the leak port, Pa; is the gas isentropic index, which is 1.29 for natural gas; If the pressure inside and outside the pipe is , calculate the leakage mass flow rate according to the critical flow formula: ; like , then calculate according to the subcritical flow formula: ; in: is the leakage rate, kg / s; is the gas leakage coefficient; is the leakage area, m 2 ; is the absolute pressure of the gas in the container, Pa; is the molar mass of the gas, kg / mol; is the compression factor; is the molar gas constant, 8.314 J / (mol·K); is the temperature of the gas in the container, K.

[0036] For the large hole model, the leakage mass flow rate is calculated by the following formula: ; This model is suitable for medium-diameter leakage scenarios. It is the ambient absolute pressure, which is input through the atmospheric pressure sensor or preset value.

[0037] For the pipeline fracture model, the isothermal flow formula is used to calculate the leakage: ; in: is the area of ​​the circle; is the Darcy friction coefficient, which is calculated iteratively by Colebrook equation; It is the effective length of the upstream pipeline of the leakage point, which is determined according to the valve position or pipeline topology data.

[0038] This step achieves physically consistent description of full-scale leakage conditions through segmented model selection and formula calculation. The model switching threshold is preset based on engineering experience to ensure the scenario adaptability of leakage calculation. The nonlinear terms (such as the exponential term of the pressure ratio) and the resistance correction terms (such as the friction coefficient λ) in the formula reflect the multi-physics field coupling effect and provide accurate boundary conditions for subsequent CFD simulation.

[0039] Regarding step S3, in this embodiment, the generation of the three-dimensional basic grid is based on the pipeline burial depth and leakage diffusion characteristics to define the spatial domain.

[0040] In this embodiment, the grid generation scheme includes the generation of a coarse grid and grid encryption work based on the coarse grid.

[0041] 1) Coarse grid generation scheme The coarse grid needs to determine the simulation range of gas leakage diffusion, define the simulation domain in three-dimensional space and divide the simulation domain into structured grids. Because too many grids will cause the calculation time to grow exponentially, but a smaller grid range may cause the calculation results to exceed the boundaries of the simulation definition and a larger grid will reduce the accuracy of the simulation calculation. Therefore, this part requires the user to have a clear estimate of the diffusion range and have rich CFD simulation experience. The empirical parameters set by the pre-calculation of multiple groups in the present invention are as follows: Table 1 Coarse grid range empirical table

[0042] 2) Unstructured Encrypted Grid Since it is difficult for users to input the inclination angle and horizontal angle of the pipeline, the simulation calculation model is simplified, and the pipeline and leakage hole are simplified. The small part of the pipeline that leaks is regarded as a cuboid, and the leakage hole is generated on the corresponding surface of the cuboid. The construction of the 3D model of the leakage part is completed by the corresponding developed python code to form an stl file for subsequent calculations.

[0043] After the coarse mesh and the local 3D model of the pipeline leakage are constructed, the mesh needs to be refined. Especially near the smaller leakage port, the mesh size needs to be basically consistent with the leakage aperture size to obtain better simulation results. This part needs to consider the Courant number of the mesh: ; in: is the Courant number; Fluid velocity, m / s; Simulation calculation time step, S; Simulation calculation space step, m.

[0044] It is generally believed that the Courant number needs to be less than 1, otherwise the calculation is likely to diverge. The OpenFoam guide states that if the Pimple algorithm is used, convergence may be achieved when the Courant number is between 3 and 5.

[0045] On the one hand, considering that the diffusion of gas in the soil is subject to greater resistance and slow speed, it is necessary to perform mesh encryption in key areas; on the other hand, since the mesh near the leakage aperture needs to be able to better reflect the location and size of the leakage port, the mesh near the leakage port needs to be smaller than the leakage aperture. At the same time, when the leakage port is downward, each face of the cuboid in the simplified model is a location where the fluid may adhere to the flow, and a boundary layer needs to be set. Therefore, after multiple mesh division experiments and simulation calculation tests, the following mesh scheme is formed.

[0046] 1) Encryption strategy: Based on the distance from each point in the simulation domain to the leakage aperture The specific division scheme is shown in the following table: Table 2 Unstructured grid encryption strategy

[0047] 2) Two layers of boundary layer grids are set around the cuboid formed in the simplified modeling process of pipeline leakage, and the boundary layer thickness is 0.05m.

[0048] 3) Three layers of boundary layer grids are set at the leakage aperture, and the boundary layer thickness is 0.003m.

[0049] Mesh quality verification includes orthogonality check and aspect ratio limit. Use the checkMesh tool to enforce mesh orthogonality greater than 30 degrees and aspect ratio less than 5. Perform local re-meshing on unqualified areas with no more than 5 iterations. For example, when the aspect ratio exceeds the standard at the corner of the simplified pipeline model, the transition mesh is automatically inserted and the node coordinates are smoothed.

[0050] During the STL model generation process, the geometric center coordinates of the leak are aligned with the pipeline axis, and the diameter tolerance is controlled at ±0.5%. For inclined pipeline conditions, the leak is projected to the horizontal plane through the coordinate transformation matrix to ensure that the encrypted area is compatible with the flow direction. For example, when the pipeline inclination is 30 degrees, the leak STL model expands the encrypted area along the inclined axis direction, and the grid size gradient is consistent with the flow velocity field direction.

[0051] This step achieves a balance between leak front capture accuracy and computational efficiency through hierarchical encryption and boundary layer optimization. The coarse grid provides a global calculation basis, the encrypted grid describes the flow details near the leak port in detail, and the boundary layer setting effectively suppresses numerical diffusion, providing a high-quality discrete space for multi-physics field coupling solutions.

[0052] Regarding step S4, in this embodiment, the process of solving the flow equation using the porous medium coupled PIMPLE algorithm includes momentum equation correction, continuity equation correction, energy equation correction and concentration equation solution.

[0053] The boundary conditions of CFD simulation calculations are important prerequisites for calculation convergence and correct calculation results. The boundary conditions are set in combination with actual physical scenarios as shown in the following table: Table 3 Simulation calculation boundary conditions

[0054] The initial conditions of the simulation are set as follows: the initial pressure at each point is 101325Pa, the initial flow velocity is 0m / s, and the initial gas concentration is 0.

[0055] The PIMPLE algorithm for porous media coupling cuts the knots in the following steps: Introducing the isotropic drag source term into the momentum equation, the expression is: ; in: is the viscosity resistance coefficient tensor, which degenerates into , the rest of the components are zero; is the natural gas viscous drag coefficient, which is dynamically updated by matching the temperature through the fluid property library; is the inertial resistance coefficient, which is calculated by inversion of soil particle gradation parameters; is the velocity vector; is the gas density.

[0056] The continuity equation is modified to a porosity-coupled form: ; in: is the soil porosity, obtained by inputting parameters in step S1; is the time variable; Correction Reflects the fluid mass storage effect in porous media.

[0057] The momentum equation of porous media can be specifically expressed as: ; in: is the pressure field; is the volume force on the gas, usually gravity, 9.8m 3 / s; is the resistance source term mentioned above.

[0058] In the equation The term reflects the modulation effect of porosity on the inertia term.

[0059] The energy equation correction includes the porosity and permeability coupling terms: ; in: is the temperature field; is the soil thermal conductivity; is the specific heat capacity of the gas at constant pressure; is the heat source term (set to zero by default); For permeability, the input parameters are dynamically associated through step S1.

[0060] The gas concentration diffusion equation is expressed as: ; in, is the gas volume concentration, and the initial condition is set to 1 at the leak port and 0 in the rest of the area. The diffusion term is ignored in the equation, and the concentration transport process is described only by the convection term.

[0061] The turbulence model uses the k-ε model, and the wall function uses the standard wall function. The spatial discretization uses the first-order upwind format, and the time discretization uses the Euler format. For example, the discrete format of the convection term in the momentum equation is: ; in, is the discretized variable, subscript represents the mesh center value, is the face normal vector.

[0062] The iterative process of the PIMPLE algorithm based on OpenFOAM includes the following steps: Perform the prediction step to solve the momentum equation to obtain the intermediate velocity field ; Update the pressure field through the pressure correction equation , the equation form is: ; Correction of velocity field based on pressure gradient ; During the iteration process, the residuals of the momentum equation and the continuity equation are monitored. When the residual drops to 10 -4 Convergence is determined when

[0063] The boundary condition settings include: the leak port uses a fixed velocity inlet (provided by the calculation results of step S2), the surface is set as a pressure outlet, and the pipe wall uses a no-slip boundary condition. The concentration field output is the volume concentration distribution for each time step, in the format of OpenFOAM standard field file, supporting ParaView visualization post-processing.

[0064] The algorithm achieves strong coupling between soil characteristics and flow equations through porosity parameters and permeability, and combines the pressure-velocity decoupling iteration mechanism of the PIMPLE algorithm to ensure the physical consistency of flow and concentration diffusion in porous media environments.

[0065] For step S5, in this embodiment, the risk warning information generation includes concentration field data analysis and visual output. Since the gas in the underground soil will hardly burn and explode, even if it does, its impact is limited to the local voids in the soil and will not have a significant impact. Therefore, generally only the gas concentration distribution on the surface is concerned. By performing spatial interpolation and time series analysis on the gas volume concentration field data output by step S4, the maximum concentration value, diffusion range and dangerous area are extracted. At the same time, according to the combustion and explosion limit of methane, the following main warning concentration marks are formed: 0.01% to 0.1% warning concentration, 0.1% to 1% warning concentration, 1% to 5% combustion risk concentration, 5% to 15% explosion risk concentration, and >15% ultra-high concentration area. According to the concentration reached by the leakage, the consequences of the pipeline leakage are evaluated and divided. When a leakage actually occurs, it also forms an effective theoretical guidance for emergency disposal of the leakage.

[0066] In the event of an actual leak, when the local concentration reaches 0.1%, the personnel in the area should be evacuated immediately. When the local concentration reaches 1%, it is indicated as a risk area, and there is a risk of combustion in this area. During the pipeline integrity analysis, if there are densely populated areas such as hospitals and schools within the range, this section of the pipeline is marked as a high-consequence area, and the number of inspections needs to be increased during normal pipeline network management. When the concentration reaches 5%, it is indicated as a high-risk area, and there is a risk of explosion in this area. During the pipeline integrity analysis, if there are densely populated areas or important facilities such as building substations in this area, this section of the pipeline is marked as an ultra-high consequence area, and the number of inspections needs to be increased and regular internal and external inspections of the pipeline are carried out; when it reaches 15%, it is the same as the ultra-high consequence area, and the number of inspections needs to be increased in normal management and regular internal and external inspections of the pipeline are carried out. In the event of an actual leak, the warning area can be divided based on the 0.01% concentration when the concentration distribution of the gas leak is stable to prevent irrelevant personnel from entering; relevant emergency rescue personnel in the 0.1% to 15% concentration area need to strictly take protective measures against combustion and explosion. It is also required that relevant personnel be evacuated and upstream and downstream valves be shut off before the gas concentration reaches 1%.

[0067] Visual output is achieved through the ParaView plug-in, which renders the concentration field data into a dynamic three-dimensional cloud map. The isosurface extraction technology is used to generate cloud maps of pressure, concentration, and flow rate to verify the calculation results. And through the surface result extraction and analysis, the gas concentration value at the surface is drawn as the basis for the division of the warning area, generating a warning concentration of 0.01% to 0.1%, a warning concentration of 0.1% to 1%, a combustion risk concentration of 1% to 5%, an explosion risk concentration of 5% to 15%, and an ultra-high concentration area of ​​>15%.

[0068] The data report automatically generates key parameters including the maximum horizontal diffusion distance of each concentration range, the time when the surface concentration reaches 1%, the danger range, etc. The maximum diffusion distance is calculated by traversing the concentration field grid nodes and meets the requirements. ( , This value is the Euclidean distance between the farthest node and the leak (see the definition of each concentration range).

[0069] This step achieves real-time perception and decision support of leakage risks through multi-dimensional data fusion and automated early warning logic.

[0070] The buried gas pipeline leakage diffusion multi-factor fusion simulation system described below and the buried gas pipeline leakage diffusion multi-factor fusion simulation method described above can be referenced to each other.

[0071] Please see attached Figure 2 The present invention also provides a buried gas pipeline leakage diffusion multi-factor fusion simulation system, comprising: A parameter input module 10 is used to receive pipeline operation parameters and soil physical parameters; A leakage calculation module 20 selects a calculation model according to the leakage aperture ratio; An adaptive mesh generation module 30 performs three-dimensional basic mesh construction and local encryption; A multi-physics field solving module 40 runs an improved PIMPLE algorithm to solve porous media flow; The risk warning module 50 analyzes the concentration field and outputs visualization results.

[0072] The system of this embodiment can be used to execute the above method embodiments, and its principles and technical effects are similar, which will not be repeated here.

[0073] Example:

[0074] The embodiment of the present invention provides a calculation example of the above method.

[0075] 1) Introduction to working conditions The simulated leakage pipeline diameter is DN1000, the pipeline burial depth is 5m, and the pipeline operating pressure is 1Mpa. The simulated leakage aperture is 0.01m and the leakage port is located on the upper wall of the pipeline.

[0076] 2) Calculation of leakage According to step S2, it belongs to the small hole leakage model, and the calculated leakage amount is 0.142Nm 3 / S, the flow velocity at the leakage outlet is 183.50m / s, and the leakage mass flow rate is 0.102kg / s.

[0077] 3) Coarse grid division According to the coarse grid partitioning parameters in Table 1, structured grid partitioning is performed. The partitioning results are shown in Figure 3 shown.

[0078] 4) Unstructured grid encryption A simplified model of pipeline leakage is as follows: Figure 4 shown.

[0079] According to the unstructured grid scheme of step S3, the grid division result is as follows Figure 5 shown.

[0080] 5) Simulation results analysis After the meshing is completed, the PIMPLE algorithm of porous medium coupling in step S4 is used to solve the problem according to the parameters set in Table 3. The simulation results are shown in the figure. Figure 6 shown.

[0081] 6) Leakage and diffusion impact assessment According to the simulation calculation results in the previous step, the gas concentration distribution state at the surface is statistically analyzed. The distribution state at each moment is as follows: Figure 7 As shown, it is displayed on the front-end page.

[0082] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

Claims

1. A multi-factor fusion simulation method for underground gas pipeline leakage and diffusion, characterized in that: The following steps are involved: Input the pipe network operation parameters and soil physical parameters related to the pipe network; Select the leakage calculation model according to the size of the leakage aperture and the ratio of the leakage aperture to the pipe diameter, and calculate the leakage mass flow rate; Generate a 3D base grid covering the leakage diffusion area and adaptively encrypt the local area based on the leakage characteristics; The PIMPLE algorithm coupled with porous media is used to solve the flow equation and output the gas concentration field; Analyze concentration field data and generate risk warning information.

2. The multi-factor fusion simulation method for underground gas pipeline leakage and diffusion according to claim 1 is characterized in that: The step of selecting a leakage calculation model according to the size of the leakage aperture and the ratio of the leakage aperture to the pipe diameter comprises: When the leakage aperture is smaller than the first threshold, the leakage volume is calculated using the small hole model; When the leakage aperture is larger than a first threshold value and smaller than a first proportional threshold value to the pipe diameter, the leakage amount is calculated using a macropore model; When the leakage aperture is larger than a first proportional threshold to the pipe diameter, the pipeline rupture model is used to calculate the leakage amount.

3. The multi-factor fusion simulation method for underground gas pipeline leakage and diffusion according to claim 2 is characterized in that: The step of calculating the leakage using the small hole model comprises: Determine whether the gas flow at the time of the leak is critical or subcritical: ; in, is the critical pressure ratio, is the absolute pressure of the environment, is the critical pressure of the leak port, is the gas isentropic index; like When , it is critical flow, and the leakage is: ; like When , it is critical flow, and the leakage is: ; in, is the leakage amount, is the gas leakage coefficient, is the leakage area, is the absolute pressure of the gas in the container, is the molar mass of the gas, is the compression factor, is the molar gas constant, is the temperature of the gas in the container.

4. The multi-factor fusion simulation method for underground gas pipeline leakage and diffusion according to claim 2 is characterized in that: The calculation formula for calculating the leakage using the macropore model is: ; The calculation formula for calculating the leakage volume using the pipeline fracture model is: ; in, is the leakage amount, is the area of ​​the circle, is the gas leakage coefficient, is the leakage area, is the absolute pressure of the gas in the container, is the molar mass of the gas, is the compression factor, is the molar gas constant, is the temperature of the gas in the container, is the Darcy friction coefficient, is the effective length of the upstream pipeline of the leak point.

5. The multi-factor fusion simulation method for underground gas pipeline leakage and diffusion according to claim 1 is characterized in that: The step of adaptively encrypting the local area based on the leakage characteristics comprises: Set the initial encryption level according to the size of the leak aperture; Dynamically adjust the grid size based on the distance to the leak source. The closer the distance, the higher the encryption level. Boundary layer grids are set on the pipe wall and leakage port.

6. The multi-factor fusion simulation method for underground gas pipeline leakage and diffusion according to claim 5 is characterized in that: The rule for dynamically adjusting the grid size is: ; in, is the leakage aperture, is the distance between the grid point and the leakage source, function satisfy Follow Increase and decrease, with Increase and increase.

7. The multi-factor fusion simulation method for underground gas pipeline leakage and diffusion according to claim 1 is characterized in that: The step of using the PIMPLE algorithm coupled with porous media to solve the flow equation and output the gas concentration field includes: Introducing the isotropic drag source term into the momentum equation, the expression is: ; in, for The soil resistance source term in the direction, is the viscous resistance coefficient of natural gas, is the viscosity coefficient, is the inertial drag coefficient, is the fluid velocity, is the fluid density; The modified continuity equation is a porosity-coupled form: ; in, is the soil porosity, For time, is the length of space; Solve the momentum equation for porous media: ; in, For pressure, is the volume force on the gas; Introduce porosity and permeability correction terms into the energy equation: ; in, is the temperature, is the soil thermal conductivity, is the specific heat capacity, is the heat source term; Solve the gas concentration diffusion equation: ; in, is the volume concentration of the gas; The k-ε turbulence model is selected, and the momentum equation, energy equation and concentration equation are spatially discretized using the first-order upwind format, and the time discretization uses the Euler format; Based on the PIMPLE algorithm framework of OpenFOAM, the solution is iteratively solved through the following steps: Perform a prediction step to calculate the velocity field ; Solve the pressure correction equation to update the pressure field ; Correction of velocity field based on pressure gradient ; The loop is iterated until the residual converges, and the gas concentration field and velocity field are output.

8. The multi-factor fusion simulation method for underground gas pipeline leakage and diffusion according to claim 1 is characterized in that: The risk warning information includes: The diffusion range where the gas concentration reaches the lower explosion limit; Dynamic cloud diagram of the spatial and temporal evolution of the concentration field; Prediction of peak time of surface leakage concentration.

9. The multi-factor fusion simulation method for underground gas pipeline leakage and diffusion according to claim 1 is characterized in that: The method further comprises: Automatically correct porosity and permeability through a preset soil parameter library; Optimize grid encryption strategy based on historical leakage cases.

10. A multi-factor fusion simulation system for underground gas pipeline leakage and diffusion, used to execute the method according to any one of claims 1 to 9, characterized in that: include: A parameter input module, used to receive pipeline operation parameters and soil physical parameters; The leakage calculation module selects the calculation model according to the leakage aperture ratio; Adaptive mesh generation module, which performs 3D basic mesh construction and local encryption; Multi-physics solution module, which runs the improved PIMPLE algorithm to solve porous media flow; Risk warning module, analyzes the concentration field and outputs visual results.

Citation Information

Patent Citations

  • Diffusion simulation method and system during methane leakage

    CN113779821A

  • Slope buried aviation oil pipeline leakage diffusion simulation method based on DEM and CFD

    CN117350191A

Cited By

  • Method, device and equipment for adjusting time step length of VPI simulation and medium

    CN121052169A

  • Quantitative risk analysis method suitable for buried storage tank

    CN121525590A

  • A quantitative risk analysis method suitable for buried storage tanks

    CN121525590B

  • Overground gas vertical pipe leakage characteristic simulation method, system, equipment and medium

    CN121562109A

  • Overground and underground gradient diffusion integrated prediction method and system for gas and oil gas leakage

    CN121581313A