Simulation method, device and equipment for leakage process of gas pressure pipeline and medium

By constructing a gas pressure pipeline leakage model using the smoothed particle dynamics method, the problems of large computational load and insufficient accuracy of traditional simulation methods are solved. This achieves efficient and accurate simulation of the gas pressure pipeline leakage process, providing theoretical support and engineering analysis.

CN121052159APending Publication Date: 2025-12-02PIPECHINA SOUTH CHINA CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511152006.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-18
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

Traditional grid-based fluid simulation methods suffer from high computational costs, insufficient accuracy, and severe grid distortion when dealing with complex flow regimes, turbulence, and transient flow in pipelines, making it difficult to meet the design and management requirements of natural gas pipeline systems.

Method used

A gas pressure pipeline leakage model is constructed using the Smooth Particle Dynamics (SPH) method. Lagrange particles are generated and particle parameters are initialized. Governing equations and boundary conditions are constructed within the Lagrange framework. The gas pressure pipeline leakage process is simulated by solving the governing equations and advancing the time.

Benefits of technology

It achieves high-precision simulation of gas pressure pipeline leakage process, simplifies the model building process, shortens the modeling time, provides theoretical support and technical analysis, and has scientific and engineering practical value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121052159A_ABST
    Figure CN121052159A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a simulation method, device and equipment for the leakage process of a gas pressure pipeline and a medium. The method comprises the steps that a gas pressure pipeline leakage model used for representing the leakage process of the gas pressure pipeline is constructed; according to the gas pressure pipeline leakage model, Lagrange particles are generated, and particle parameters of all the Lagrange particles are initialized; constructing a control equation of the gas pressure pipeline leakage model and a boundary condition corresponding to the control equation under a Lagrange framework; the control equation and the boundary conditions are solved and propelled in time, and all fluid particles are obtained from initialized particle parameters to particle parameters changing along with time. By utilizing the method, the leakage process of the gas pressure pipeline is simulated, the physical information and flow field distribution of the leakage process of the gas pressure pipeline can be accurately described, and the calculation precision is high. And a complex grid division or preprocessing process is not needed in the model establishment stage, so that the modeling time is greatly shortened.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of oil and gas safety technology, and in particular to a simulation method, apparatus, equipment and medium for the leakage process of a gas pressure pipeline. Background Technology

[0002] In the energy industry, natural gas, as a clean and efficient energy source, makes the safety and efficiency of its transportation and distribution systems crucial. With the continuous development and utilization of natural gas resources, natural gas pipeline systems are becoming increasingly large and complex, placing higher demands on pipeline design, operation, and management. Traditional grid-based fluid simulation methods often face challenges such as high computational load, insufficient accuracy, and mesh distortion when dealing with complex flow regimes, turbulence, and transient flow in pipelines. Therefore, finding a more efficient and accurate simulation technology is essential. Summary of the Invention

[0003] This invention provides a simulation method, apparatus, equipment, and medium for the leakage process of gas pressure pipelines. It enables the simulation of the leakage process of gas pressure pipelines, obtains the gas leakage diffusion characteristics, has high applicability and calculation accuracy, and can provide theoretical support and technical analysis for the leakage process of gas pressure pipelines.

[0004] Firstly, this embodiment provides a simulation method for a gas pressure pipeline leakage process, the method comprising:

[0005] Construct a gas pressure pipeline leakage model to characterize the gas pressure pipeline leakage process;

[0006] Based on the gas pressure pipeline leakage model, Lagrange particles are generated and the particle parameters of each Lagrange particle are initialized. The Lagrange particles include wall particles, fluid particles, inlet particles, outlet particles, and virtual particles.

[0007] Within the Lagrange framework, construct the governing equations and the corresponding boundary conditions for the gas pressure pipeline leakage model.

[0008] The governing equations and boundary conditions are solved and advanced over time to obtain the particle parameters of all fluid particles from the initial particle parameters to the particle parameters that change with time.

[0009] Secondly, this embodiment provides a simulation device for a gas pressure pipeline leakage process, the device comprising:

[0010] The model building module is used to build a gas pressure pipeline leakage model to characterize the gas pressure pipeline leakage process.

[0011] The particle generation module is used to generate Lagrange particles and initialize the particle parameters of each Lagrange particle according to the gas pressure pipeline leakage model. The Lagrange particles include wall particles, fluid particles, inlet particles, outlet particles and virtual particles.

[0012] The control construction module is used to construct the control equations and the corresponding boundary conditions of the gas pressure pipeline leakage model under the Lagrange framework.

[0013] The parameter update module is used to solve the control equations and the boundary conditions and advance them over time to obtain the particle parameters of all fluid particles as a function of time, based on the initial particle parameters.

[0014] Thirdly, this embodiment provides an electronic device, including:

[0015] At least one processor; and

[0016] A memory communicatively connected to the at least one processor; wherein,

[0017] The memory stores a computer program that can be executed by the at least one processor, which enables the at least one processor to perform a simulation method for a gas pressure pipeline leakage process as described in any embodiment of the present invention.

[0018] Fourthly, this embodiment provides a computer-readable storage medium storing computer instructions for causing a processor to execute a simulation method for a gas pressure pipeline leakage process as described in any embodiment of the present invention.

[0019] This invention provides a simulation method, apparatus, equipment, and medium for the leakage process of a gas pressure pipeline. The method includes: constructing a gas pressure pipeline leakage model to characterize the leakage process; generating Lagrange particles and initializing the particle parameters of each Lagrange particle based on the gas pressure pipeline leakage model; constructing the control equations and corresponding boundary conditions of the gas pressure pipeline leakage model within the Lagrange framework; solving the control equations and boundary conditions and advancing them over time to obtain the particle parameters of all fluid particles from the initialized particle parameters to those varying with time. The above technical solution, based on a gas pressure pipeline leakage model established using smooth particle dynamics, accurately describes the physical information and flow field distribution of the gas pressure pipeline leakage process, achieving high computational accuracy. Furthermore, it eliminates the need for complex mesh generation or preprocessing during model establishment, significantly reducing modeling time. It provides theoretical support and technical analysis for gas pressure pipeline leakage processes, possessing both scientific and engineering practical value.

[0020] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0021] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0022] Figure 1 This is a flowchart illustrating a simulation method for a gas pressure pipeline leakage process provided in Embodiment 1 of the present invention.

[0023] Figure 2 This is a schematic diagram of a pipeline leakage model provided in Embodiment 1 of the present invention;

[0024] Figure 3 This is a flowchart illustrating another simulation method for gas pressure pipeline leakage provided in Embodiment 2 of the present invention.

[0025] Figure 4 This is a schematic diagram of the structure of a simulation device for a gas pressure pipeline leakage process provided in Embodiment 3 of the present invention;

[0026] Figure 5 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Detailed Implementation

[0027] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0028] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0029] Example 1

[0030] Figure 1 This is a flowchart illustrating a simulation method for a gas pressure pipeline leakage process provided in Embodiment 1 of the present invention. This method is applicable to simulating the leakage process of a gas pressure pipeline. The method can be executed by a simulation device for the gas pressure pipeline leakage process. This simulation device can be implemented in hardware and / or software and is generally integrated into electronic equipment.

[0031] like Figure 1 As shown, the simulation method for a gas pressure pipeline leakage process provided in this embodiment can specifically include the following steps:

[0032] S101. Construct a gas pressure pipeline leakage model to characterize the gas pressure pipeline leakage process.

[0033] In this embodiment, the advantages of Smoothed Particle Hydrodynamics (SPH) in complex fluid flows are utilized to simulate the leakage process of a gas pressure pipeline. A square-hole leakage problem is used to illustrate the specific implementation. This problem can be described as follows: when a gas pressure pipeline has a square leak hole, high-pressure gas leaks into the external environment through the square hole, during which physical parameters such as gas flow rate, pressure, and temperature will undergo drastic changes. For example, Figure 2 This is a schematic diagram of a pipeline leakage model provided in Embodiment 1 of the present invention, as shown below. Figure 2 As shown, the leak hole is the pressure inlet, and the model also illustrates the wall boundary and pressure outlet. Leakage is a complex process; in this embodiment, smoothed particle dynamics is used to simulate the leakage process in a gas pressure pipeline.

[0034] SPH (Smooth Particle Hypothesis) is a fluid simulation technique based on the Lagrangian description. It treats a continuous fluid medium as a discrete system composed of many smooth particles with physical information such as mass, volume, and position. It features meshless operation and Lagrangian particles, making it particularly suitable for flow problems with large deformations, discontinuities, and multiphysics. The SPH method simulates fluid motion through the interactions between particles, eliminating the need for traditional mesh generation and thus avoiding problems such as mesh distortion and reconstruction. This makes it more flexible in handling complex geometries or dynamically changing boundary conditions. The physical quantities and interactions of each particle are calculated using a smoothing kernel function, providing detailed flow field information such as velocity, temperature, and pressure distributions, enabling accurate simulation of the entire fluid system.

[0035] In this embodiment, a gas pressure pipeline leakage model is constructed based on the analysis of the gas pressure pipeline leakage process. Specifically, the computational domain of the gas pressure pipeline is determined, which includes the wall domain, fluid domain, inlet domain, outlet domain, and virtual particle domain, and a method for calculating fluid properties is established.

[0036] S102. Based on the gas pressure pipeline leakage model, generate Lagrange particles and initialize the particle parameters of each Lagrange particle.

[0037] This step is used to generate SPH particles and initialize particle state and physical parameters. Specifically, based on the gas pressure pipeline model constructed above, Lagrange particles are generated, including inlet particles, outlet particles, wall particles, fluid particles, and virtual particles. Fluid particles are generated by uniformly distributing them within the fluid domain and initializing fluid information, including particle velocity, density, pressure, mass, temperature, and type. Wall particles are generated by uniformly distributing them within the wall domain and initializing wall fluid information, including particle velocity, density, pressure, mass, temperature, and type. Inlet particles are generated... Inlet particles are uniformly distributed within the inlet domain, and inlet fluid information is initialized, including inlet particle velocity, inlet particle density, inlet particle pressure, inlet particle mass, inlet particle temperature, and inlet particle type. Outlet particles are generated by uniformly distributing them within the outlet domain and initializing outlet fluid information, including outlet particle velocity, outlet particle density, outlet particle pressure, outlet particle mass, outlet particle temperature, and outlet particle type. Virtual particles are generated by uniformly distributing them within the virtual particle domain and initializing virtual fluid information, including virtual particle velocity, virtual particle density, virtual particle pressure, virtual particle mass, virtual particle temperature, and virtual particle type.

[0038] S103. Construct the control equations and boundary conditions corresponding to the control equations for the gas pressure pipeline leakage model within the Lagrange framework.

[0039] In this embodiment, the corresponding SPH control equations are established, boundary conditions are applied, and the SPH fluid information is updated over time. The control equations for the gas pressure pipeline leakage model are established, a suitable SPH discretization scheme is selected, the boundary condition application method is established, and the continuity equation, momentum conservation equation, and energy conservation equation of the SPH framework are solved, with the fluid information iteratively updated over time.

[0040] This step is used to construct the corresponding SPH (Self-Protected Physics) governing equations and boundary conditions. The governing equations for the gas pressure pipeline leakage model, described within the Lagrange framework, specifically include the continuity equation, momentum conservation equation, and energy conservation equation. The smoothed particle kinematics method is used to discretize the continuity equation, momentum conservation equation, and energy conservation equation, respectively, obtaining the discretized continuity equation, discretized momentum conservation equation, and discretized energy conservation equation, which serve as the governing equations for the gas pressure pipeline leakage model. Inlet boundary conditions, wall boundary conditions, and outlet boundary conditions are then constructed as the boundary conditions for the governing equations.

[0041] S104. Solve the governing equations and boundary conditions and advance them over time to obtain the particle parameters of all fluid particles from the initial particle parameters to the particle parameters that change with time.

[0042] In this embodiment, the governing equations and boundary conditions are solved and time-progressed. During the time-progression solution process, when updating the density, velocity, internal energy, and position of the fluid particles, the Runge-Kutta method and a prediction-correction algorithm are preferably used. After obtaining the velocity, internal energy, position, and density of the fluid particles at any given time, the pressure and temperature of the fluid particles at that time are obtained using a preferred real gas equation of state.

[0043] The output data specifically includes the physical information of all fluid particles, such as particle velocity, density, pressure, mass, temperature, and type. After the entire simulation is completed, this physical information is output, including particle velocity, density, pressure, mass, temperature, and type. This data is then organized into tables or visualizations, such as a 3D distribution map of natural gas flow velocity during the leak, or a pressure-time curve, to intuitively analyze the physical phenomena and parameter evolution during a natural gas pipeline leak, providing detailed data for subsequent engineering applications.

[0044] The aforementioned technical solution, based on a gas pressure pipeline leakage model established using the smoothed particle dynamics method, simulates the gas pressure pipeline leakage process. It accurately describes the physical information and flow field distribution of the leakage process with high computational precision. Furthermore, it eliminates the need for complex mesh generation or preprocessing during model establishment, significantly reducing modeling time. It provides theoretical support and technical analysis for gas pressure pipeline leakage processes, possessing both scientific and engineering practical value.

[0045] Example 2

[0046] Figure 3This is a flowchart illustrating another simulation method for a gas pressure pipeline leakage process provided in Embodiment 2 of the present invention. This embodiment is a further optimization of the above embodiment. In this embodiment, the following optimizations are made: "generating Lagrange particles and initializing the particle parameters of each Lagrange particle according to the gas pressure pipeline leakage model"; "generating Lagrange particles and initializing the particle parameters of each Lagrange particle according to the gas pressure pipeline leakage model"; "constructing the control equations and corresponding boundary conditions of the gas pressure pipeline leakage model under the Lagrange framework"; and "solving the control equations and boundary conditions and advancing them over time to obtain the particle parameters of all fluid particles from the initialized particle parameters to those that change with time".

[0047] like Figure 3 As shown in the figure, this embodiment two provides a simulation method for the leakage process of a gas pressure pipeline, which specifically includes the following steps:

[0048] S201. Based on the information of the gas pressure pipeline, determine the computational domain of the gas pressure pipeline, wherein the computational domain includes the wall domain, the fluid domain, the inlet domain, the outlet domain, and the virtual particle domain.

[0049] In this embodiment, a gas pressure pipeline leakage model is constructed based on information about the gas pressure pipeline and the analysis of the gas pressure pipeline leakage process. For example, the information about the gas pressure pipeline may include pipeline length, pipe diameter, etc. First, the computational domain is determined, which includes a wall domain, a fluid domain, an inlet domain, an outlet domain, and a virtual particle domain. The positions of the inlet domain, outlet domain, wall domain, and virtual particle domain are fixed, and the scale of each domain is larger than the radius of the fluid particle support domain.

[0050] In this embodiment, a computational domain is defined, which is explicitly divided into a wall domain, a fluid domain, an inlet domain, an outlet domain, and a virtual particle domain. For example, consider a natural gas pipeline with an actual length of 10m and a diameter of 1m. Extend a certain distance outward to serve as the computational domain and the outlet domain, with lengths of 100m and 10m respectively. The wall domain is the pipe wall portion. The virtual particle domain surrounds the fluid domain and the wall domain, with a width of 10m. The fluid domain is the space inside the pipeline excluding the inlet domain, the outlet domain, and the virtual particle domain adjacent to the wall, used to simulate the main flow of natural gas.

[0051] S202. Establish fluid property calculation formulas based on real gas law.

[0052] In this embodiment, a suitable real gas law is selected for calculating gas properties. Preferably, the Benedict-Webb-Rubin equation (BWRS) is used.

[0053] In this equation, A0, B0, C0, a, b, c, d, and r are characteristic parameters. The values ​​of these parameters, such as A0, B0, and C0, are determined based on the known natural gas composition and operating conditions. p represents the system pressure, T represents the system temperature, ρ represents the density of the gas or liquid phase, and R represents the gas constant. The BWRS real gas equation of state is preferred for calculating the properties of natural gas to ensure the accuracy of the description of the physical characteristics of this real gas under different conditions.

[0054] S203. The calculation domain of the gas pressure pipeline and the calculation formula of the fluid properties are used as a gas pressure pipeline leakage model to characterize the gas pressure pipeline leakage process.

[0055] Based on the above settings, a complete natural gas pressure pipeline leakage model architecture was established, clarifying the spatial relationships and interaction modes between various domains, laying the foundation for subsequent particle generation and calculation.

[0056] S204. Generate wall particles in the wall domain according to the principle of uniform distribution, and initialize the fluid information of the wall particles.

[0057] The fluid information includes at least the particle velocity, density, pressure, mass, temperature, and type.

[0058] In this embodiment, based on the gas pressure pipeline leakage model constructed in the above steps, Lagrange particles are generated, including inlet particles, outlet particles, wall particles, fluid particles, and virtual particles. This step is used to generate wall particles, uniformly distribute wall particles within the wall domain, and initialize wall fluid information, which includes wall particle velocity, wall particle density, wall particle pressure, wall particle mass, wall particle temperature, and wall particle type.

[0059] For example, the steps for generating wall particles can be described as follows: Wall particles are uniformly distributed within the wall domain, with a particle spacing of 0.01 m. The wall fluid information is initialized, with the velocity initialized to zero and the density determined based on the pipe material to be 59.3 kg / m³. 3 The initial pressure is set to 8 MPa, the same as the pressure of adjacent fluid particles. The mass is calculated based on the volume and density of the wall particles. The temperature is set to 298.15 K, the same as the initial temperature of the fluid. The particle type is identified as "wall particles".

[0060] S205. Generate fluid particles in the fluid domain according to the principle of uniform distribution, and initialize the fluid information of the fluid particles.

[0061] This step is used to generate fluid particles, uniformly distribute the fluid particles within the fluid domain, and initialize the fluid information, which includes fluid particle velocity, fluid particle density, fluid particle pressure, fluid particle mass, fluid particle temperature, and fluid particle type.

[0062] For example, the steps for generating fluid particles can be described as follows: within a defined fluid domain, fluid particles are generated according to a uniform distribution principle. For instance, depending on the required simulation accuracy, one fluid particle is placed every 0.01m along the axial direction of the pipeline and every 0.01m radially. Information for each fluid particle is initialized, including an initial velocity of 0m / s (which can also be set based on the natural gas flow rate at the leak), an initial density of 0.657kg / m³ (determined by the initial natural gas conditions), an initial pressure of 0.1MPa, a mass of 6.57 × 10⁻⁷kg (calculated based on particle volume and initial density), an initial temperature of 298.15K (initial temperature of the natural gas in the pipeline), and a fluid particle type identifier of "fluid particle".

[0063] S206. Generate entrance particles in the entrance domain according to the principle of uniform distribution, and initialize the fluid information of the entrance particles.

[0064] This step is used to generate inlet particles, uniformly distribute inlet particles within the inlet domain, and initialize inlet fluid information, including inlet particle velocity, inlet particle density, inlet particle pressure, inlet particle mass, inlet particle temperature, and inlet particle type.

[0065] For example, the step of generating inlet particles can be described as follows: Inlet particles are generated at uniformly distributed points within the inlet region, with a spacing of 0.01m. Based on the inlet conditions given by the natural gas pipeline leakage model, the inlet particle velocity is initialized to 100m / s (simulating the natural gas flow velocity at the inlet at the start of the leak, which can be calculated based on the upstream pressure and leakage orifice diameter), the temperature is 298.15K (natural gas temperature inside the pipe), the pressure is 8MPa (pressure inside the pipe), and the mass is 5.9310-5kg (calculated based on particle volume and inlet natural gas density). The particle type is identified as "inlet particle".

[0066] S207. Generate exit particles in the exit domain according to the principle of uniform distribution, and initialize the fluid information of the exit particles.

[0067] This step is used to generate exit particles, uniformly distribute exit particles within the exit domain, and initialize exit fluid information, including exit particle velocity, exit particle density, exit particle pressure, exit particle mass, exit particle temperature, and exit particle type.

[0068] For example, the step of generating exit particles can be described as follows: uniformly distributing exit particles within the exit domain with a spacing of 0.01m. Initially, the physical information of the exit particles can be set to default values, such as velocity, density, pressure, and temperature, which are the same as the initial values ​​of adjacent exit domains, with a mass of 6.57 × 10⁻⁶. -7 kg, particle type is identified as "exit particle", which will be dynamically updated according to the outflow of fluid particles during subsequent calculations.

[0069] S208. Generate virtual particles in the virtual particle domain according to the principle of uniform distribution, and initialize the fluid information of the virtual particles.

[0070] This step is used to generate virtual particles, uniformly distribute virtual particles within the virtual particle domain, and initialize virtual fluid information, including virtual particle velocity, virtual particle density, virtual particle pressure, virtual particle mass, virtual particle temperature, and virtual particle type.

[0071] For example, the steps for generating virtual particles can be described as follows: Virtual particles are uniformly generated within a virtual particle domain, with a spacing of 0.01 m. Virtual fluid information is initialized so that its velocity is equal in magnitude and opposite in direction to the velocity of adjacent fluid particles, and its initial density, pressure, temperature, and other physical properties are the same as those of adjacent fluid particles, with a mass of 5.93 × 10⁻⁶. -5 kg, particle type is identified as "virtual particle".

[0072] S209. Construct the continuity equation, momentum conservation equation, and energy conservation equation within the Lagrange framework.

[0073] In this embodiment, the governing equations for a gas pressure pipeline leakage model are established, describing the governing equations of the gas pressure pipeline leakage model within a Lagrange framework. Among them,

[0074] The continuity equation is expressed as:

[0075] The momentum conservation equation is expressed as:

[0076] The energy conservation equation is expressed as:

[0077] In the formula: ρ represents particle density, t represents time, v is particle velocity, x is particle position vector, e is particle internal energy, α and β represent particle position direction respectively, and p represents pressure.

[0078] S210. The continuity equation, momentum conservation equation, and energy conservation equation are discretized using the smooth particle kinematics method to obtain the discretized continuity equation, momentum conservation equation, and energy conservation equation, which serve as the control equations for the gas pressure pipeline leakage model.

[0079] In this embodiment, the control equations determined above are discretized using SPH.

[0080] The continuity equation after discretization is:

[0081] The continuity equation after discretization is:

[0082] The momentum conservation after discretization is:

[0083] In the formula, m is the particle mass, p is the particle pressure, ρ is the particle density, v is the particle velocity, x is the particle position, e is the particle internal energy, i is the index of the current computational fluid particle, j is the particle index within the support domain of particle i, N is the total number of all particles within the support domain of particle i, and w(r,h) is the smoothing kernel function in the SPH method. The preferred smoothing kernel function is a cubic spline function, calculated as follows: In the formula: a d In one-dimensional, two-dimensional and three-dimensional space respectively Determine a based on one-dimensional, two-dimensional, or three-dimensional space. d The value of , such as in this embodiment where it is a three-dimensional space, and h is the smoothing distance set according to the simulation accuracy requirements, such as 0.021m.

[0084] S211. Construct the inlet boundary conditions, wall boundary conditions, and outlet boundary conditions as the boundary conditions for the governing equations.

[0085] The inlet boundary conditions include the velocity, temperature, and pressure values ​​of the inlet particles given by the gas pressure pipeline leakage model; the wall boundary conditions include a non-slip boundary, where wall particles are fixed at the wall position with zero velocity, and the wall particle pressure is calculated using a set formula; the outlet boundary conditions are free outflow boundaries, where the fluid particle type is immediately changed to an outlet particle when the fluid particle reaches the outlet position, and the particle parameters of the outlet particle remain unchanged.

[0086] In this embodiment, the inlet boundary conditions are velocity and pressure inlet conditions, i.e., the velocity, temperature, and pressure values ​​of the inlet particles are given according to the gas pressure pipeline leakage model, i.e., ρ. in =ρ0,T in =T0,p in =p0.

[0087] For example, the inlet boundary conditions can be set as follows: using velocity, temperature and pressure inlet, with a given inlet particle velocity of 100 m / s, a temperature of 298.15 K and a pressure of 8 MPa, to ensure that the simulation matches the actual initial state of a natural gas pipeline leak.

[0088] The wall boundary adopts a no-slip boundary, and the wall particles are fixed at the wall position with a constant velocity. The pressure of the wall particles is calculated by the following formula. In the formula: p w It is the pressure of the wall particle i, where p j The pressure of fluid particle j within the support domain of wall particle i is updated in real time to reflect the interaction between the fluid and the wall.

[0089] The outlet boundary condition adopts a free outflow boundary. When a fluid particle reaches the outlet location, its type is immediately changed to an outlet particle. The physical information in the fluid information of the outlet particle remains unchanged, allowing natural gas to flow naturally out of the simulation area, simulating the actual situation of leakage into the external environment.

[0090] S212. Apply the inlet boundary condition to each inlet particle, apply the outlet boundary condition to each outlet particle, adjust each virtual particle according to the particle parameter information of the fluid particle, and apply the wall boundary condition to each wall particle.

[0091] The following describes the process of solving the governing equations and advancing the calculation over time. First, it is determined whether the conditions for ending the calculation are met. The criterion for ending the calculation is reaching the model setpoint time. If yes, the calculation ends; otherwise, the following process is repeated.

[0092] For example, determining whether the condition for ending the computation is met can be described as follows: Set the total computation time of the model to 100 seconds. After each time step, check whether the total time has been reached. If it is, end the computation; otherwise, repeat the following iterative process.

[0093] For each inlet particle, a given inlet boundary condition is applied, including inlet particle velocity, temperature, and pressure. For each outlet particle, a free outflow boundary is applied, changing the type of fluid particles flowing out of the fluid domain. For each virtual particle, virtual particle information is determined based on the physical information of the fluid particles, where the virtual particle position is symmetrical to the fluid particle position about the wall, the virtual particle velocity is equal in magnitude and opposite in direction to the fluid particle velocity, and other physical properties are the same. For each wall particle, a no-slip boundary condition is applied, and the wall particle pressure is obtained using the following formula: The meanings of the letters in the formula are as described above and will not be repeated here.

[0094] For example, for each inlet particle, a given inlet boundary condition is applied, namely, maintaining the inlet particle velocity at 100 m / s, the temperature at 298.15 K, and the pressure at 8 MPa; for each outlet particle, a free outflow boundary is applied, and once the fluid particle flows out of the fluid domain, its type is immediately updated to outlet particle; for each virtual particle, it is dynamically adjusted according to the physical information of the fluid particle to ensure that the virtual particle position is symmetrical to the fluid particle about the wall, the virtual particle velocity is equal in magnitude and opposite in direction to the fluid particle velocity, and other physical properties are the same; for each wall particle, a no-slip boundary condition is applied, and the wall particle pressure calculation formula is updated in real time.

[0095] S213. For each fluid particle, determine the density, velocity, internal energy, pressure, and temperature of the fluid particle at the current moment according to the governing equation and the fluid property calculation formula.

[0096] In this embodiment, for each fluid particle, all neighboring particles within the support domain of the current fluid particle are determined, the density of the current fluid particle is calculated according to the continuity equation, the velocity derivative of the current fluid particle is calculated according to the momentum conservation equation, the internal energy derivative of the current fluid particle is calculated according to the energy conservation equation, and the position derivative of the current particle is equal to the velocity of the current fluid particle.

[0097] The continuity equation is expressed as:

[0098] The momentum conservation equation is expressed as:

[0099] The energy conservation equation is expressed as: The meanings of the letters in the formula can be found above, and will not be repeated here.

[0100] For example, for each fluid particle, all its neighboring particles within its current support domain are identified (the support domain radius is set to 0.021m according to the simulation accuracy). The current support domain is a spherical region constructed with a smooth distance as its radius, set according to the simulation accuracy requirements. The density of the current fluid particle is calculated using the discrete continuity equation, the velocity derivative is calculated using the momentum conservation equation, and the internal energy derivative is calculated using the energy conservation equation. The position derivative of the current particle is directly equal to its velocity. Thus, the density, velocity, internal energy, and position of the fluid particle at the current moment can be determined. The temperature of the fluid particle at the current moment can then be determined based on its density and internal energy. A preferred real gas law is used as the formula for calculating fluid properties. The current temperature and density of the fluid particle are substituted into the real gas law to obtain the fluid particle pressure at that moment.

[0101] As a specific implementation, the step of determining the density, velocity, internal energy, pressure, and temperature of each fluid particle at the current moment based on the governing equations and the fluid property calculation formulas can be optimized, including:

[0102] a1) For each fluid particle, calculate the density, velocity, position, and internal energy of the fluid particle at the current moment according to the governing equation.

[0103] In this embodiment, the governing equations are a series of ordinary differential equations related to the time constant. The velocity, internal energy, and displacement of the fluid particles at the current moment can be obtained by advancing the velocity, internal energy, and displacement of the fluid particles at the next moment by one time step. The density of the fluid particles is obtained through discrete continuity equations without the need for time advancement. The density of the current fluid particles is calculated based on the discrete continuity equations, the velocity derivative of the current fluid particles is calculated based on the momentum conservation equation, the internal energy derivative of the current fluid particles is calculated based on the energy conservation equation, and the position derivative of the current particles is directly equal to the velocity of the current fluid particles. Thus, the density, velocity, internal energy, and position of the fluid particles at the current moment can be determined.

[0104] b1) Determine the pressure and temperature of the fluid particle at the current moment based on the density and internal energy of the fluid particle at the current moment, as well as the fluid property calculation formula.

[0105] In this embodiment, after obtaining the velocity, internal energy, position, and density of the fluid particles at any given moment, the temperature of the fluid particles at the current moment can be determined based on their density and internal energy. A preferred real gas law is used as the formula for calculating the fluid properties. The current temperature and density of the fluid particles are substituted into the real gas law to obtain the pressure of the fluid particles at that moment. Based on the current temperature and density of the fluid particles, the pressure of the fluid particles at the current moment is obtained using the real gas law.

[0106] The meanings of the parameters in the formula are explained above and will not be repeated here.

[0107] The above technical solution specifies the steps for determining the fluid information of fluid particles.

[0108] S214. The second-order Runge-Kutta method is used to update the fluid particles from the initial particle parameters to the density, velocity, internal energy and position that change over time, until the preset calculation termination condition is met.

[0109] In this embodiment, the second-order Runge-Kutta method is preferred for time-progression updates of the density, velocity, internal energy, and position of fluid particles to ensure the accuracy and stability of the calculation. During the iterative solution process: when updating the density, velocity, internal energy, and position of fluid particles via time-progression, the Runge-Kutta method and a prediction-correction algorithm are preferably used. The time step size during time-progression needs to satisfy the Courant–Friedrichs–Lewy condition (CFL). The time step size is calculated as follows:

[0110]

[0111] Δt=min(0.4Δt c ,0.25Δt f )

[0112] In the formula: f is the force acting on a unit mass, c is the speed of sound, α and β are constants, with preferred values ​​of 0.4 and 0.25 respectively, h represents the smooth length, the subscript i indicates the particle symbol, and Δt c Δt represents the time step considering viscous dissipation. f The time step considering the influence of external forces is represented by Δt, and the formula for calculating φ is: v represents the velocity difference vector between adjacent particles, and r represents the position vector between adjacent particles.

[0113] It should be noted that the specific parameter values ​​in the above embodiments are only examples, and in actual applications, they need to be reasonably determined according to factors such as the specific operating conditions of the natural gas pipeline and the simulation accuracy requirements.

[0114] Understandably, during particle generation, the distribution of virtual particles within the virtual particle domain is uniform during model initialization. During time-progression calculations, the positions of the virtual particles must satisfy a symmetrical relationship with the fluid particle positions about the wall boundary, with equal velocities, opposite directions, and identical other physical properties. If the inlet particle's position is within the fluid domain during time-progression calculations, the inlet particle type is updated to a fluid particle, and a new inlet particle is created at the initial position of the inlet domain.

[0115] The output data specifically includes the physical information of all fluid particles, such as particle velocity, density, pressure, mass, temperature, and type. After the entire simulation is completed, this physical information is output, including particle velocity, density, pressure, mass, temperature, and type. This data is then organized into tables or visualizations, such as a 3D distribution map of natural gas flow velocity during the leak, or a pressure-time curve, to intuitively analyze the physical phenomena and parameter evolution during a natural gas pipeline leak, providing detailed data for subsequent engineering applications.

[0116] The above technical solution specifies the steps for constructing a gas pressure pipeline leakage model, generating Lagrange particles, constructing the governing equations for the gas pressure pipeline leakage model, and solving the governing equations. The gas pressure pipeline leakage model established based on the SPH method consists of a series of time-dependent ordinary differential equations, which are concise, clear, and computationally efficient. It can accurately describe the physical information and flow field distribution of the gas pressure pipeline leakage process, and can obtain the gas leakage diffusion characteristics by simulating the gas pressure pipeline leakage process, exhibiting high applicability and computational accuracy. Furthermore, it eliminates the need for complex mesh generation or preprocessing during the model establishment stage, significantly shortening the modeling time. It provides theoretical support and technical analysis for the gas pressure pipeline leakage process, possessing certain scientific and engineering practical value, and providing technical support for research on gas pressure pipeline leakage.

[0117] Example 3

[0118] Figure 4 This is a schematic diagram of a simulation device for a gas pressure pipeline leakage process provided in Embodiment 3 of the present invention. This device is applicable to simulating gas pressure pipeline leakage processes. The simulation device can be implemented in hardware and / or software and is generally integrated into electronic equipment. Figure 4 As shown, the device includes: a model building module 31, a particle generation module 32, a control building module 33, and a parameter update module 34, wherein,

[0119] Model building module 31 is used to build a gas pressure pipeline leakage model to characterize the gas pressure pipeline leakage process;

[0120] The particle generation module 32 is used to generate Lagrange particles and initialize the particle parameters of each Lagrange particle according to the gas pressure pipeline leakage model. The Lagrange particles include wall particles, fluid particles, inlet particles, outlet particles and virtual particles.

[0121] The control construction module 33 is used to construct the control equations and the corresponding boundary conditions of the gas pressure pipeline leakage model under the Lagrange framework.

[0122] The parameter update module 34 is used to solve the control equations and the boundary conditions and advance them over time to obtain the particle parameters of all fluid particles from the initial particle parameters to the particle parameters that change with time.

[0123] The aforementioned technical solution, based on a gas pressure pipeline leakage model established using the smoothed particle dynamics method, simulates the gas pressure pipeline leakage process. It accurately describes the physical information and flow field distribution of the leakage process with high computational precision. Furthermore, it eliminates the need for complex mesh generation or preprocessing during model establishment, significantly reducing modeling time. It provides theoretical support and technical analysis for gas pressure pipeline leakage processes, possessing both scientific and engineering practical value.

[0124] Optionally, the model building module 31 is specifically used for:

[0125] Based on the information of the gas pressure pipeline, the computational domain of the gas pressure pipeline is determined, and the computational domain includes the wall domain, fluid domain, inlet domain, outlet domain, and virtual particle domain.

[0126] Formulas for calculating fluid properties are established based on the real gas law.

[0127] The computational domain of the gas pressure pipeline and the fluid property calculation formula are used as a gas pressure pipeline leakage model to characterize the gas pressure pipeline leakage process.

[0128] Optionally, the particle generation module 32 is specifically used for:

[0129] Within the wall domain, wall particles are generated according to a uniform distribution principle, and the fluid information of the wall particles is initialized.

[0130] Fluid particles are generated within the fluid domain according to a uniform distribution principle, and the fluid information of the fluid particles is initialized.

[0131] In the inlet domain, inlet particles are generated according to the principle of uniform distribution, and the fluid information of the inlet particles is initialized.

[0132] Within the outlet domain, outlet particles are generated according to a uniform distribution principle, and the fluid information of the outlet particles is initialized.

[0133] Virtual particles are generated within the virtual particle domain according to the principle of uniform distribution, and the fluid information of the virtual particles is initialized.

[0134] The fluid information includes at least the particle velocity, density, pressure, mass, temperature, and type.

[0135] Optionally, control module 33 is specifically used for:

[0136] Construct the continuity equation, momentum conservation equation, and energy conservation equation within the Lagrange framework;

[0137] The continuity equation, momentum conservation equation, and energy conservation equation are discretized using the smooth particle kinematics method to obtain the discretized continuity equation, momentum conservation equation, and energy conservation equation, which serve as the governing equations for the gas pressure pipeline leakage model.

[0138] The inlet boundary conditions, wall boundary conditions, and outlet boundary conditions are constructed as the boundary conditions for the governing equations.

[0139] Optionally, the inlet boundary conditions include the velocity, temperature, and pressure values ​​of the inlet particles given according to the gas pressure pipeline leakage model;

[0140] The wall boundary conditions include the wall boundary being a non-slip boundary, the wall particles being fixed at the wall position with zero velocity, and the wall particle pressure being calculated using a set formula.

[0141] The outlet boundary condition adopts a free outflow boundary. When the fluid particle reaches the outlet position, the type of the fluid particle is immediately changed to an outlet particle, while the particle parameters of the outlet particle remain unchanged.

[0142] Optionally, the parameter update module 34 includes:

[0143] The condition application unit is used to apply the inlet boundary condition to each inlet particle, apply the outlet boundary condition to each outlet particle, adjust each virtual particle according to the particle parameter information of the fluid particle, and apply the wall boundary condition to each wall particle.

[0144] The particle control unit is used to determine, for each fluid particle, the density, velocity, internal energy, pressure, and temperature at the current moment, based on the control equation and the fluid property calculation formula.

[0145] The time-advancement unit is used to update the fluid particles from the initial particle parameters to the density, velocity, internal energy, and position that change over time using the second-order Runge-Kutta method, until the preset calculation termination condition is met.

[0146] The particle control unit is specifically used for:

[0147] For each fluid particle, the density, velocity, position, and internal energy of the fluid particle at the current moment are calculated according to the governing equations.

[0148] Based on the density and internal energy of the fluid particle at the current moment, and the fluid property calculation formula, determine the pressure and temperature of the fluid particle at the current moment.

[0149] The simulation device for gas pressure pipeline leakage process provided in the embodiments of the present invention can execute the simulation method for gas pressure pipeline leakage process provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0150] Example 4

[0151] Figure 5 This is a schematic diagram of an electronic device according to Embodiment 4 of the present invention. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (such as helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0152] like Figure 5 As shown, the electronic device 40 includes at least one processor 41 and a memory, such as a read-only memory (ROM) 42 or a random access memory (RAM) 43, communicatively connected to the at least one processor 41. The memory stores computer programs executable by the at least one processor. The processor 41 can perform various appropriate actions and processes based on the computer program stored in the ROM 42 or loaded into the RAM 43 from storage unit 48. The RAM 43 may also store various programs and data required for the operation of the electronic device 40. The processor 41, ROM 42, and RAM 43 are interconnected via a bus 44. An input / output (I / O) interface 45 is also connected to the bus 44.

[0153] Multiple components in electronic device 40 are connected to I / O interface 45, including: input unit 46, such as keyboard, mouse, etc.; output unit 47, such as various types of monitors, speakers, etc.; storage unit 48, such as disk, optical disk, etc.; and communication unit 49, such as network card, modem, wireless transceiver, etc. Communication unit 49 allows electronic device 40 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0154] Processor 41 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 41 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 41 performs the various methods and processes described above, such as the simulation method for a gas pressure pipeline leakage process.

[0155] In some embodiments, the simulation method for a gas pressure pipeline leakage process can be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 48. In some embodiments, part or all of the computer program can be loaded and / or installed on electronic device 40 via ROM 42 and / or communication unit 49. When the computer program is loaded into RAM 43 and executed by processor 41, one or more steps of the simulation method for a gas pressure pipeline leakage process described above can be performed. Alternatively, in other embodiments, processor 41 can be configured to perform the simulation method for a gas pressure pipeline leakage process by any other suitable means (e.g., by means of firmware).

[0156] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0157] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0158] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0159] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0160] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0161] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0162] This invention also provides a computer program product, including a computer program that, when executed by a processor, implements a simulation method for a gas pressure pipeline leakage process as provided in any embodiment of this invention.

[0163] In implementing a computer program product, computer program code for performing the operations of this disclosure can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include, but are not limited to, object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0164] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0165] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A simulation method for a gas pressure pipeline leakage process, characterized in that, include: Construct a gas pressure pipeline leakage model to characterize the gas pressure pipeline leakage process; Based on the gas pressure pipeline leakage model, Lagrange particles are generated and the particle parameters of each Lagrange particle are initialized. The Lagrange particles include wall particles, fluid particles, inlet particles, outlet particles, and virtual particles. Within the Lagrange framework, construct the governing equations and the corresponding boundary conditions for the gas pressure pipeline leakage model. The governing equations and boundary conditions are solved and advanced over time to obtain the particle parameters of all fluid particles from the initial particle parameters to the particle parameters that change with time.

2. The method according to claim 1, characterized in that, The construction of the gas pressure pipeline leakage model for characterizing the gas pressure pipeline leakage process includes: Based on the information of the gas pressure pipeline, the computational domain of the gas pressure pipeline is determined, and the computational domain includes the wall domain, fluid domain, inlet domain, outlet domain, and virtual particle domain. Formulas for calculating fluid properties are established based on the real gas law. The computational domain of the gas pressure pipeline and the fluid property calculation formula are used as a gas pressure pipeline leakage model to characterize the gas pressure pipeline leakage process.

3. The method according to claim 2, characterized in that, The step of generating Lagrange particles and initializing the particle parameters of each Lagrange particle based on the gas pressure pipeline leakage model includes: Within the wall domain, wall particles are generated according to a uniform distribution principle, and the fluid information of the wall particles is initialized. Fluid particles are generated within the fluid domain according to a uniform distribution principle, and the fluid information of the fluid particles is initialized. In the inlet domain, inlet particles are generated according to the principle of uniform distribution, and the fluid information of the inlet particles is initialized. Within the outlet domain, outlet particles are generated according to a uniform distribution principle, and the fluid information of the outlet particles is initialized. Virtual particles are generated within the virtual particle domain according to the principle of uniform distribution, and the fluid information of the virtual particles is initialized.

4. The method according to claim 1, characterized in that, The governing equations for constructing the gas pressure pipeline leakage model within the Lagrange framework, and the corresponding boundary conditions for the governing equations, include: Construct the continuity equation, momentum conservation equation, and energy conservation equation within the Lagrange framework; The continuity equation, momentum conservation equation, and energy conservation equation are discretized using the smooth particle kinematics method to obtain the discretized continuity equation, momentum conservation equation, and energy conservation equation, which serve as the governing equations for the gas pressure pipeline leakage model. The inlet boundary conditions, wall boundary conditions, and outlet boundary conditions are constructed as the boundary conditions for the governing equations.

5. The method according to claim 4, characterized in that, The inlet boundary conditions include the velocity, temperature, and pressure values ​​of the inlet particles given according to the gas pressure pipeline leakage model. The wall boundary conditions include the wall boundary being a non-slip boundary, the wall particles being fixed at the wall position with zero velocity, and the wall particle pressure being calculated using a set formula. The outlet boundary condition adopts a free outflow boundary. When the fluid particle reaches the outlet position, the type of the fluid particle is immediately changed to an outlet particle, while the particle parameters of the outlet particle remain unchanged.

6. The method according to claim 4, characterized in that, The process of solving the governing equations and boundary conditions and advancing the solution over time to obtain the time-varying particle parameters of all fluid particles, including: The inlet boundary condition is applied to each inlet particle, the outlet boundary condition is applied to each outlet particle, the virtual particle is adjusted according to the particle parameter information of the fluid particle, and the wall boundary condition is applied to each wall particle. For each fluid particle, the density, velocity, internal energy, pressure, and temperature of the fluid particle at the current moment are determined according to the governing equation and the fluid property calculation formula. The second-order Runge-Kutta method is used to update the fluid particles from the initial particle parameters to the density, velocity, internal energy and position that change over time, until the preset calculation termination condition is met.

7. The method according to claim 6, characterized in that, For each fluid particle, the density, velocity, internal energy, pressure, and temperature of the fluid particle at the current moment are determined according to the governing equations and the fluid property calculation formulas, including: For each fluid particle, the density, velocity, position, and internal energy of the fluid particle at the current moment are calculated according to the governing equations. Based on the density and internal energy of the fluid particle at the current moment, and the fluid property calculation formula, determine the pressure and temperature of the fluid particle at the current moment.

8. A simulation device for a gas pressure pipeline leakage process, characterized in that, include: The model building module is used to build a gas pressure pipeline leakage model to characterize the gas pressure pipeline leakage process. The particle generation module is used to generate Lagrange particles and initialize the particle parameters of each Lagrange particle according to the gas pressure pipeline leakage model. The Lagrange particles include wall particles, fluid particles, inlet particles, outlet particles and virtual particles. The control construction module is used to construct the control equations and the corresponding boundary conditions of the gas pressure pipeline leakage model under the Lagrange framework. The parameter update module is used to solve the control equations and the boundary conditions and advance them over time to obtain the particle parameters of all fluid particles from the initial particle parameters to the particle parameters that change with time.

9. An electronic device, characterized in that, include: At least one processor; as well as A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform a simulation method for a gas pressure pipeline leakage process as described in any one of claims 1-7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that, when executed by a processor, implement a simulation method for a gas pressure pipeline leakage process as described in any one of claims 1-7.