Pipeline simulation method and device, electronic equipment and readable storage medium
By performing three-dimensional and one-dimensional modeling of the initial leakage area of the target pipeline, and using the iterative calculation method to use the pipeline simulation method, the problem of insufficient pipe leakage positioning accuracy in the prior art is solved, and more efficient leakage point positioning is achieved.
Patent Information
- Application Number
- CN202411970765.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-05-09
AI Technical Summary
The existing pipeline leakage detection and positioning technology has insufficient positioning accuracy in complex environments, making it difficult to effectively locate the leaked area.
A pipeline simulation method is adopted to improve the accuracy of leakage positioning by performing three-dimensional modeling and one-dimensional modeling of the initial leakage area of the target pipeline, and iterative calculation methods are used.
Improves the accuracy of pipe simulation for leaked areas and the efficiency of leakage point positioning, and enhances positioning accuracy in complex environments.
Smart Images

Figure CN119962422A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a pipeline simulation method, device, electronic device and readable storage medium. Background Art
[0002] As the pace of national industrialization advances steadily, more and more gas pipelines are being built, and the demand for gas pipeline leak detection and positioning technology is increasing. Currently, pipeline leak detection and positioning methods are developing rapidly. The detection methods can be roughly divided into two types: direct leak detection method and indirect leak detection method.
[0003] The direct leak detection method is based on people carrying detection tools to patrol along the gas pipeline to directly find and quickly respond to pipeline leaks and other problems. However, due to the large number of pipelines, the direct detection method has problems such as insufficient detection of small and medium-sized leaks in the pipeline. The indirect leak detection method refers to the inspection of the gas pipeline through the operating parameters and balance relationships such as flow, sound waves, pressure waves, and temperature in the gas pipeline to determine whether a leak has occurred. Among the currently known indirect leak detection technologies, negative pressure wave leak detection technology is an accurate method for detecting pipeline leaks. The positioning results of this technology are easily affected by external factors, especially in a more complex pipeline environment, and the positioning accuracy of the leaking area needs to be improved. Summary of the invention
[0004] The embodiment of the present application provides a pipeline simulation method, which can improve the accuracy of simulating a pipeline with a leakage area and improve the efficiency of locating the leakage point.
[0005] In a first aspect, an embodiment of the present application discloses a pipeline simulation method, the method comprising:
[0006] According to the initial leakage area of the target pipeline, determining a first pipeline section corresponding to the target pipeline; the first pipeline section is a pipeline section in the target pipeline including the initial leakage area;
[0007] Performing three-dimensional modeling on the first pipeline segment to obtain a first model;
[0008] Performing one-dimensional modeling on a second pipeline segment in the target pipeline except the first pipeline segment to obtain a second model;
[0009] In each iteration cycle, using the first model to calculate a first gas leakage amount according to first pressure data at an interface between the first pipeline segment and the second pipeline segment, and transferring the first gas leakage amount to the second model;
[0010] updating the first pressure data to second pressure data based on the first gas leakage using the second model;
[0011] When the second pressure data does not meet the preset condition, the second pressure data is transferred to the first model, and the next round of iteration is performed until the second pressure data meets the preset condition, and then the iteration is stopped.
[0012] Optionally, in each iteration cycle, calculating a first gas leakage amount according to first pressure data at an interface between the first pipeline segment and the second pipeline segment using the first model, and transferring the first gas leakage amount to the second model, comprises:
[0013] In each iteration cycle, the first gas leakage amount is calculated based on the geometric characteristics of the initial leakage area, the physical properties of the fluid, and the first pressure data;
[0014] The first gas leakage is mapped into the second model using a first interpolation algorithm.
[0015] Optionally, the updating the first pressure data to second pressure data based on the first gas leakage using the second model includes:
[0016] Using the second model, adjusting the flow rate and pressure distribution in the second pipeline section based on the first gas leakage;
[0017] Calculating a second gas leakage amount in the second pipeline section based on the flow rate and the pressure distribution;
[0018] When the difference between the second gas leakage amount and the first gas leakage amount is less than or equal to a first preset threshold, the second pressure data is determined according to the pressure distribution.
[0019] Optionally, when the second pressure data does not meet a preset condition, transmitting the second pressure data to the first model includes:
[0020] The second pressure data is mapped into the first model using a second interpolation algorithm.
[0021] Optionally, the method further comprises:
[0022] Disposing at least three pressure sensors on the target pipeline;
[0023] Pressurizing the target pipeline and collecting third pressure data monitored by the pressure sensor when a leakage valve of the target pipeline is opened;
[0024] When the difference between the second pressure data and the third pressure data is greater than a second preset threshold, the first pipeline section corresponding to the target pipeline is re-determined.
[0025] Optionally, performing three-dimensional modeling on the first pipeline segment to obtain a first model includes:
[0026] The first model is constructed according to the initial pressure field in the first pipeline segment, the fluid properties in the first pipeline, and the boundary conditions of the first pipeline segment; the first model is used to reflect the actual flow field and pressure wave transmission changes of the first pipeline segment.
[0027] In a second aspect, an embodiment of the present application discloses a pipeline simulation device, the device comprising:
[0028] A determination module, configured to determine a first pipeline segment corresponding to the target pipeline according to an initial leakage area of the target pipeline; the first pipeline segment is a pipeline segment in the target pipeline including the initial leakage area;
[0029] A first modeling module, used for performing three-dimensional modeling on the first pipeline segment to obtain a first model;
[0030] A second modeling module is used to perform one-dimensional modeling on a second pipeline segment in the target pipeline except the first pipeline segment to obtain a second model;
[0031] a calculation module, configured to calculate, in each iteration cycle, a first gas leakage amount according to first pressure data at an interface between the first pipeline segment and the second pipeline segment using the first model, and transmit the first gas leakage amount to the second model;
[0032] An updating module, configured to update the first pressure data to second pressure data based on the gas leakage amount by using the second model;
[0033] The transmission module is used to transmit the second pressure data to the first model when the second pressure data does not meet the preset conditions, and perform the next round of iteration until the second pressure data meets the preset conditions, and then stop the iteration.
[0034] In a third aspect, an embodiment of the present application discloses an electronic device, which includes a processor, a memory, a communication interface and a communication bus, wherein the processor, the memory and the communication interface communicate with each other through the communication bus; the memory is used to store executable instructions, and the executable instructions enable the processor to execute the pipeline simulation method as described above.
[0035] In a fourth aspect, an embodiment of the present application discloses a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the aforementioned pipeline simulation method is implemented.
[0036] The embodiments of the present application include the following advantages:
[0037] According to the initial leakage area of the target pipeline, the first pipeline section of the target pipeline is determined; the first pipeline section is three-dimensionally modeled to obtain a first model; the second pipeline section other than the first pipeline section in the target pipeline is one-dimensionally modeled to obtain a second model; in each iteration cycle, the first gas leakage amount is calculated according to the first pressure data at the interface between the first pipeline section and the second pipeline section using the first model, and the first gas leakage amount is transferred to the second model; the first pressure data is updated to the second pressure data based on the gas leakage amount using the second model; when the second pressure data does not meet the preset conditions, the second pressure data is transferred to the first model, and the next round of iteration is performed, until the second pressure data meets the preset conditions, the iteration is stopped, so as to improve the accuracy of simulating the pipeline with leakage area and improve the efficiency of locating the leakage point. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0039] Figure 1 It is a flow chart of steps of a pipeline simulation method embodiment provided in an embodiment of the present application;
[0040] Figure 2 It is a schematic diagram of a three-dimensional model established for a first pipeline section including a leakage area on a target pipeline provided in an embodiment of the present application;
[0041] Figure 3 It is a schematic diagram of a one-dimensional model established for a second pipeline segment other than the first pipeline segment on a target pipeline provided by an embodiment of the present application;
[0042] Figure 4 It is a structural block diagram of a pipeline simulation device provided in an embodiment of the present application;
[0043] Figure 5 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0044] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are 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.
[0045] The terms "first", "second", etc. in the specification and claims of the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable when appropriate, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, the term "and / or" in the specification and claims is used to describe the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In the embodiments of the present invention, the term "multiple" refers to two or more, and other quantifiers are similar.
[0046] Method Embodiment
[0047] The pipeline simulation method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0048] Reference Figure 1 , shows a flow chart of the steps of a pipeline simulation method embodiment of the present invention, such as Figure 1 As shown, the method specifically comprises the following steps:
[0049] Step S101: determining a first pipeline segment corresponding to the target pipeline according to an initial leakage area of the target pipeline; the first pipeline segment is a pipeline segment in the target pipeline including the initial leakage area.
[0050] The pipeline simulation method provided in the embodiment of the present application can be applied to the fields of oil and gas pipeline networks, chemical industry, urban gas pipelines, aerospace, etc. In oil and gas pipeline networks, leakage is a serious problem. The pipeline simulation method provided in the present application can simulate the flow conditions when the gas pipeline leaks, so as to quickly and accurately locate the leakage point and assess the severity of the leakage. Leakage in urban gas pipelines may endanger the safety of life and property of residents. The pipeline simulation method provided in the present application can simulate the development process of urban gas pipeline leakage accidents and provide decision support for emergency response.
[0051] The target pipeline refers to the pipeline used to transport gas. In different application scenarios, the gas transported inside the target pipeline is different. Specifically, in the field of oil and gas pipeline networks, the gas transported inside the target pipeline is mainly natural gas; in the field of urban gas pipelines, the gas transported inside the target pipeline is also mainly natural gas; in the chemical industry, the gas transported inside the target pipeline mainly includes various chemicals, solvents and reactants in gas form, etc.; in the aerospace field, the gas transported inside the target pipeline is mainly propellant, oxygen, nitrogen, etc. In different application scenarios, the caliber size of the target pipeline and the materials used to cast the target pipeline are also different, and thus the parameters used to model the target pipeline are also different.
[0052] The initial leakage area refers to the location and range of the target pipeline leakage observed by various detection equipment (such as gas detectors, thermal imagers, etc.). Measure the size, shape, leakage rate and other parameters of the leakage area to obtain accurate experimental data. Predict the location and range of possible leakage in the target pipeline based on physical principles (such as fluid mechanics, thermodynamics, etc.). Analyze historical pipeline leakage cases, learn from the lessons learned from historical cases, and determine the possible initial leakage area in the target pipeline.
[0053] The first pipeline section refers to a section of the pipeline that includes the upstream and downstream of the initial leakage area. The specific range depends on factors such as the severity of the leakage, the nature of the fluid, and the operating conditions of the pipeline. Specifically, the higher the fluid pressure, the greater the impact force during leakage, and the greater the impact on the pipeline and the surrounding environment. High-temperature or low-temperature fluids may cause thermal damage or cold damage to the surrounding environment when leaking. Pipes of different materials have different resistance to leakage and the scope of impact after leakage. The diameter and wall thickness of the pipeline affect the flow rate of the fluid and the impact force during leakage.
[0054] Step S102: Perform three-dimensional modeling on the first pipeline segment to obtain a first model.
[0055] Three-dimensional modeling refers to creating or reconstructing an object or scene with a three-dimensional spatial form in a computer. The first model is a comprehensive representation including the geometric shape of the first pipeline segment and other attributes related to the first pipeline segment.
[0056] When the first pipeline segment is 3D modeled, a basic geometric body is created as the basic model of the first pipeline segment according to the length and diameter of the first pipeline segment, ensuring that the size and shape of the basic geometric body are consistent with the actual situation of the first pipeline segment. According to the position of the initial leakage area in the first pipeline segment, the shape of the initial leakage area, and the area of the initial leakage area, details are added to the basic geometric body, and a small hole or crack is created on the basic geometric body as a leakage point. Other components can also be added to the basic geometric body, such as the wall thickness and valve of the first pipeline segment. After the 3D modeling of the first pipeline segment is completed, the file of the first model is output according to the specified file format. Exemplarily, the first pipeline segment can be modeled using 3D modeling software, such as SolidWorks, AutoCAD or ANSYS Design Modeler, and the tools provided by the 3D modeling software (such as lines, circles, faces, etc.) are used to create basic geometric bodies.
[0057] Based on the basic model, the first model is constructed in combination with fluid mechanics related technologies to accurately reflect the impact of leakage on the pipeline.
[0058] Step S103: Perform one-dimensional modeling on a second pipeline segment in the target pipeline except the first pipeline segment to obtain a second model.
[0059] One-dimensional modeling is a mathematical model used to describe and predict the changes of fluid flow in a pipeline in one-dimensional space. In one-dimensional modeling, only the changes of fluid flow along a specific direction are considered, while changes in other directions are ignored. Specifically, compared with three-dimensional modeling, one-dimensional modeling focuses more on the dynamic behavior of the fluid along the length direction of the second pipeline segment, and cannot capture the three-dimensional flow field state on the cross section.
[0060] When the second pipeline is modeled in one dimension, pipeline and fluid parameters are collected. Pipeline parameters may include the length, diameter, inner wall roughness, bending radius, etc. of the pipeline. Fluid parameters may include density, temperature, etc. of the fluid. Determine the variables (such as velocity, pressure, temperature, displacement, etc.) and parameters (such as density, viscosity, thermal conductivity, etc. of the fluid) that need to be described, and establish corresponding mathematical equations for each variable based on physical laws and principles. Mathematical equations are usually partial differential equations or ordinary differential equations, which describe the law of change of variables over time and space. The various equations are linked together through variables and parameters to form a complete mathematical model. The variables in one equation are used as inputs or parameters of another equation, or the equations are linked together through conservation laws (such as conservation of mass, conservation of momentum, conservation of energy, etc.). Specifically, the continuity equation describes the conservation of mass of fluid flow. The momentum equation describes the dynamic characteristics of fluid flow, usually including pressure gradient terms, friction terms, and inertial force terms. The energy equation, when considering heat transfer, needs to be added to describe the energy changes during fluid flow. A one-dimensional model of the discretized pipeline is established. The pipeline is discretized into a series of small units or control volumes along the axial direction. The fluid parameters (such as velocity, pressure, and temperature) in each unit are considered to be uniformly distributed. A mathematical model is applied to each unit, and the continuity equation, momentum equation, and energy equation are applied to establish a mathematical model to describe the fluid flow.
[0061] For example, Figure 3 As shown, the second pipeline segment is modeled in one dimension using flowmaster software to determine the main objectives of modeling, such as analyzing flow, pressure distribution, temperature change, etc. In the embodiment of the present application, the modeling goal is to determine the flow field distribution inside the target pipeline when the target pipeline leaks instantly, which is mainly reflected by pressure distribution. Open Flowmaster software, create a new project and select the fluid type and unit system, such as gas and SI unit in the fluid class, use the pipeline modeling module, draw a model with a total length of 610m of the pipeline, and segment it according to actual needs (such as 0m-300m segment and 300m-600m segment). Add a pressure inlet node at the left end of the pipeline, add a pressure outlet node at the right end, and set the pressure outlet node at the leak port. Add pressure monitoring points at each important node (such as 0m, 300m, 600m) to record data. Define fluid properties (Air Ideal Gas) and boundary conditions (inlet pressure 95kPa, outlet pressure is atmospheric pressure). Run the simulation to set the simulation time step, total time and other parameters in Flowmaster. Start the simulation and let Flowmaster calculate the fluid behavior in the pipeline.
[0062] Step S104: In each iteration cycle, the first model is used to calculate a first gas leakage amount according to first pressure data at an interface between the first pipeline segment and the second pipeline segment, and the first gas leakage amount is transferred to the second model.
[0063] It should be noted that when the first pipeline segment is at both ends of the target pipeline, the first pipeline segment and the second pipeline segment have only one interface; in other cases, there are two interfaces between the first pipeline segment and the second pipeline segment, the target pipeline is divided into three parts, and the second pipeline segment includes two sub-pipeline segments.
[0064] In the first iteration cycle, the first gas leakage is calculated based on the initial pressure data at the interface between the first pipeline segment and the second pipeline segment; in each subsequent iteration cycle, the first model calculates the first gas leakage based on the pressure data transmitted by the second model. At the beginning of each iteration cycle, the first model receives the state information at the interface between the first pipeline segment and the second pipeline segment, such as pressure data, temperature, etc. The first gas leakage is calculated based on the first pressure data at the interface. Generally, the higher the pressure, the greater the gas leakage.
[0065] It should be noted that the iteration cycle refers to the time or steps required to complete an iterative calculation, and the duration of the iteration cycle of each iterative calculation is not necessarily the same.
[0066] Step S105: using the second model to update the first pressure data to second pressure data based on the first gas leakage.
[0067] The gas leakage at the interface in the second model is detected, and the flow field distribution in the second pipeline is adjusted using the second model so that the gas leakage at the interface in the second model is close to the gas leakage calculated in the first model. When adjusting the flow field distribution in the second pipeline, the gas leakage detected in the current second model can be compared with the gas leakage calculated in the first model, and the flow field distribution can be adjusted in a targeted manner based on the mapping relationship between the existing gas leakage and pressure data.
[0068] Step S106: When the second pressure data does not meet the preset condition, the second pressure data is passed to the first model, and the next round of iteration is performed until the second pressure data meets the preset condition, and the iteration is stopped.
[0069] Among them, the preset condition is used to illustrate that during the iterative calculation process, the second pressure data reaches a stable value. The preset condition is a convergence condition. When the second pressure data meets the convergence condition, the calculation process has converged to the standard of a stable solution. Exemplarily, the preset condition can be residual convergence, and residual convergence means that the residual gradually decreases to below a preset threshold as the number of iterations increases. The residual refers to the difference in physical quantity between the current iteration cycle and the previous iteration cycle in the calculation process. Specifically, in an embodiment of the present application, the residual refers to the difference between the second pressure data in the current iteration cycle and the second pressure data in the previous iteration cycle.
[0070] At the end of each iteration cycle, check whether the second pressure data meets the convergence criteria. If so, the iteration process ends; otherwise, update the input conditions of the first model and the second model, especially the part related to the leakage, and start the calculation of the next iteration cycle.
[0071] In an embodiment of the present application, according to the initial leakage area of the target pipeline, the first pipeline segment of the target pipeline is determined; the first pipeline segment is three-dimensionally modeled to obtain a first model; the second pipeline segment other than the first pipeline segment in the target pipeline is one-dimensionally modeled to obtain a second model; in each iteration cycle, the first gas leakage amount is calculated according to the first pressure data at the interface between the first pipeline segment and the second pipeline segment using the first model, and the first gas leakage amount is transferred to the second model; the first pressure data is updated to the second pressure data based on the gas leakage amount using the second model; when the second pressure data does not meet the preset conditions, the second pressure data is transferred to the first model, and the next round of iteration is performed, until the second pressure data meets the preset conditions, the iteration is stopped, thereby improving the accuracy of simulating the pipeline with a leakage area and improving the efficiency of locating the leakage point.
[0072] Optionally, in each iteration cycle, using the first model to calculate the gas leakage amount according to the first pressure data at the interface between the first pipeline segment and the second pipeline segment, and transferring the gas leakage amount to the second model, comprises:
[0073] Step 11: In each iteration cycle, based on the geometric features of the initial leakage area, the physical properties of the fluid, and the first pressure data, calculate the first gas leakage amount;
[0074] Step 12: Use a first interpolation algorithm to map the first gas leakage into the second model.
[0075] Among them, the geometric characteristics refer to the shape, size and other information of the initial leakage area. The physical properties of the fluid refer to the density, viscosity, compressibility and the like of the fluid. For example, when a fluid with higher viscosity passes through a narrow leakage port, its flow resistance will be greater, resulting in a decrease in leakage. The first pressure data refers to the pressure at the interface between the first pipeline segment and the second pipeline. The pressure difference between the two ends of the first pipeline segment is calculated based on the first pressure data. The pressure difference is the main driving force for fluid leakage. Based on the geometric characteristics of the initial leakage area, the physical properties of the fluid and the first pressure data, the relevant theories of fluid mechanics or numerical simulation methods can be used to estimate the gas leakage. Specifically, the gas leakage is calculated based on the area of the initial leakage area, the density and viscosity of the fluid, the pressure difference between the two ends of the first pipeline segment, and the flow coefficient. Among them, the flow coefficient refers to the volume flow rate or mass flow rate of the pipeline medium flowing through the valve or flowmeter in unit time when the pipeline maintains a constant pressure. The formula for calculating the gas leakage is as follows:
[0076]
[0077] In formula (1), C refers to the flow coefficient, A refers to the area of the initial leakage area, g refers to the gravitational acceleration, and h is the fluid pressure head. The fluid pressure head h can be calculated by the pressure difference, that is, h = (P1-P2) / (ρ×g), where P1 is the pressure upstream of the first pipeline section, P2 is the pressure downstream of the first pipeline, ρ is the fluid density, and g is the gravitational acceleration.
[0078] For example, assume that the initial leakage area is a circular hole with a diameter of 1 cm, and assume that the leaked gas is methane, whose density under standard conditions is 0.717 kg / m3 and viscosity is 1.11×10^-5 Pa·s. Assume that the pressure upstream of the first pipeline section is 200 kPa and the pressure downstream of the second pipeline section is 101.325 kPa.
[0079] Leakage hole area A=π×(0.01÷2) 2 =3.14×10 -4 m 2 .
[0080] h=(P1-P2)÷(ρ×g), where P1 and P2 are the upstream and downstream pressures, ρ is the density of methane, and g is the acceleration due to gravity. Substituting the numerical values, we get h=(200000-101325)÷(0.717×9.81)≈138.7m.
[0081] Substituting A and h into the formula for calculating gas leakage, we get
[0082] The first model is a three-dimensional model, and the second model is a one-dimensional model. The position points of the first model and the position points of the second model cannot completely match. Therefore, the first model cannot directly transfer the gas leakage to the second model. Figure 2 As shown, the first model can be meshed, and the mesh consists of many small units, each of which represents a part of the first model. In the process of calculating the gas leakage, fluid dynamics equations, such as the Navier-Stokes equations, are solved on each unit to obtain the fluid properties on each unit, including the gas leakage. Due to the discreteness of the computational grid, the data output by the first model is also discrete, which means that the gas leakage data is only available at a series of specific spatial locations, namely, grid nodes or unit centers.
[0083] The interpolation algorithm refers to a mathematical method for estimating the value of a function at some points when the points are not within the domain of the function. In the embodiment of the present application, the interpolation algorithm is used to perform spatial and temporal mapping. Specifically, spline interpolation and linear interpolation can be used. For example, the gas leakage data point (x 3d ,y 3d , z 3d , leak_rate1), determine the corresponding interface position x in the second model 1d Among them, (x 3d ,y 3d , z 3d ) represents the three-dimensional coordinates of the leakage position in the first model. The three-dimensional coordinates can be converted into one-dimensional coordinates, and then the gas leakage amount corresponding to the one-dimensional coordinates can be calculated according to the spline interpolation algorithm, and the calculated gas leakage amount can be passed to the second model.
[0084] In an embodiment of the present application, in each iteration cycle, the gas leakage amount is calculated based on the geometric characteristics of the initial leakage area, the physical properties of the fluid, and the first pressure data; the gas leakage amount is mapped to the second model using a first interpolation algorithm, and the three-dimensional first model can more accurately reflect the actual flow field conditions of the leakage section, including the gas leakage amount, and the pressure data is calculated in combination with the one-dimensional second model. There is no need to construct a three-dimensional model for the entire target pipeline, which not only improves the simulation speed, but also integrates the three-dimensional flow field state at the leakage port, thereby improving the accuracy of the simulation.
[0085] Optionally, the updating the first pressure data to second pressure data based on the first gas leakage using the second model includes:
[0086] Step 21: using the second model to adjust the flow rate and pressure distribution in the second pipeline section based on the first gas leakage;
[0087] Step 22: Calculate the second gas leakage in the second pipeline section based on the flow rate and the pressure distribution;
[0088] Step 23: When the difference between the second gas leakage amount and the first gas leakage amount is less than or equal to a first preset threshold, determine the second pressure data according to the pressure distribution.
[0089] It should be noted that when the second model is established, the pressure data at both ends of the second pipeline segment are initialized, and when the flow distribution in the second pipeline segment is adjusted, the pressure data at the interface changes accordingly. When the second model is used to simulate the second pipeline segment, the flow and pressure distribution in the second pipeline segment can be adjusted by changing the opening of the valve, the operating parameters of the pump or compressor, etc.
[0090] In the case where the leakage of the second gas is greater than the leakage of the first gas, in order to reduce the pressure at the interface to reduce the risk of leakage, the valve can be gradually closed and the speed or power of the pump or compressor can be reduced.
[0091] When the leakage of the second gas is less than the leakage of the first gas, the opening of the valve may be increased, and the rotation speed or power of the pump or compressor may be increased.
[0092] In the embodiment of the present application, the flow rate and pressure distribution in the second pipeline section are adjusted based on the gas leakage using the second model; the second gas leakage in the second pipeline section is calculated based on the flow rate and pressure distribution; when the difference between the second gas leakage and the first gas leakage is less than or equal to the first preset threshold, the second pressure data is determined according to the pressure distribution. The three-dimensional model can more accurately reflect the actual flow field conditions of the leakage section, including the gas leakage, and the pressure data is calculated in combination with the one-dimensional model. It is not necessary to construct a three-dimensional model for the entire target pipeline, which not only improves the simulation speed, but also integrates the three-dimensional flow field state at the leakage port to improve the accuracy of the simulation.
[0093] Optionally, when the second pressure data does not meet a preset condition, transmitting the second pressure data to the first model includes:
[0094] The second pressure data is mapped into the first model using a second interpolation algorithm.
[0095] The second pressure data is a time series data, which indicates the pressure values of the interface at different time points. In the case of mapping one-dimensional data into a three-dimensional model, radial basis function interpolation, Kriging interpolation or three-dimensional spline interpolation algorithms may be considered.
[0096] The pressure data at the interface in the second model is based on one-dimensional coordinates, which are converted into three-dimensional coordinates compatible with the first three-dimensional model. The pressure data at the interface in the one-dimensional model is mapped to the key position points of the leakage section in the three-dimensional model using the selected interpolation algorithm. Specifically, the one-dimensional pressure data is used as the interpolation input, and the key position points in the three-dimensional model are used as the interpolation output positions, and the interpolation calculation is performed to obtain the pressure values of the key position points in the three-dimensional model.
[0097] In the embodiment of the present application, data exchange between the three-dimensional first model and the one-dimensional second model is achieved through an interpolation algorithm.
[0098] Optionally, the method further comprises:
[0099] Step 31, setting at least three pressure sensors on the target pipeline;
[0100] Step 32, pressurizing the target pipeline, and collecting third pressure data monitored by the pressure sensor when the leakage valve of the target pipeline is opened;
[0101] Step 33: When the difference between the second pressure data and the third pressure data is greater than a second preset threshold, re-determine the first pipeline section corresponding to the target pipeline.
[0102] It should be noted that the geometric characteristics and fluid flow characteristics of the target pipeline are analyzed to determine the key points in the pipeline. The key points are places where the pressure changes are more significant, such as elbows, tees, valves, etc. At least three pressure sensors are installed along the length of the target pipeline. The positions of the pressure sensors should be evenly distributed to ensure that the pressure changes at different positions in the target pipeline can be captured. Exemplarily, the first pressure sensor can be installed near the inlet of the target pipeline, the second pressure sensor is installed near the midpoint or other key points of the pipeline, and the third pressure sensor is installed near the outlet of the target pipeline.
[0103] Wherein, when the difference between the second pressure data and the third pressure data is greater than the second preset threshold, the first pipeline segment can be re-determined by increasing the length of the first pipeline segment. For example, the initial first pipeline segment is 0.5 m to the left and right of the initial leakage area, and the re-determined first pipeline segment is 1 m to the left and right of the initial leakage area.
[0104] In an embodiment of the present application, at least three pressure sensors are arranged on the target pipeline; the target pipeline is pressurized, and the third pressure data monitored by the pressure sensor when the leakage valve of the target pipeline is opened is collected; when the difference between the second pressure data and the third pressure data is greater than the second preset threshold value, the first pipeline section corresponding to the target pipeline is re-determined to improve the accuracy of the simulation results.
[0105] Optionally, performing three-dimensional modeling on the first pipeline segment to obtain a first model includes:
[0106] The first model is constructed according to the initial pressure field in the first pipeline segment, the fluid parameters in the first pipeline and the boundary conditions of the first pipeline segment; the first model is used to reflect the actual flow field and pressure wave transmission changes of the first pipeline segment.
[0107] It should be noted that, based on the basic model, the first model is constructed in combination with fluid parameters, boundary conditions and initial pressure field to accurately reflect the impact of leakage on the pipeline. The initial pressure field refers to the initial pressure distribution of the first pipeline section.
[0108] Among them, fluid parameters refer to a series of parameters that describe the behavior and characteristics of the fluid. Fluid parameters may include: fluid type, fluid temperature, fluid velocity, and fluid density. Boundary conditions refer to physical quantities or states set on the boundary of the simulation area, which are used to constrain the behavior of the fluid on the boundary. Boundary conditions may include: velocity boundary conditions, pressure boundary conditions, wall boundary body conditions, inlet and outlet boundary conditions. Velocity boundary conditions specify the magnitude and direction of the velocity of the fluid on the boundary, pressure boundary conditions specify the pressure value of the fluid on the boundary; wall boundary conditions define the interaction between the fluid and the solid wall. Inlet boundary conditions are usually used to specify the flow rate, velocity or pressure of the fluid entering the simulation area. Outlet boundary conditions are used to specify the state of the fluid when it leaves the simulation area, such as free outflow, pressure outlet, etc. The first model is a comprehensive representation of the geometry of the first pipeline segment and other properties related to the first pipeline segment. The simulation area refers to the geometry simulated by the first pipeline segment.
[0109] Exemplarily, on the basis of 3D modeling software, combined with fluid mechanics simulation software (such as Fluent), the first pipeline section is 3D modeled to obtain a first model. In Fluent software, the initialization parameters of the basic model are set, the pressure reference is selected as 95kPa, and the initial pressure field is set. Set the material property to air (Air Ideal Gas), and enable the turbulence model (such as the k-epsilon model). Define the leak as a pressure outlet, the pressure value is atmospheric pressure, and the pipeline inlet and outlet are set to closed boundaries. Set a static flow field in the pipeline, and specify the initial temperature and pressure distribution of the fluid. Set the solution parameters, select transient model solution, solution time step 0.00001s, maximum number of iterations 1×108, etc.
[0110] In the embodiment of the present application, a first model is constructed based on the initial pressure field in the first pipeline segment, the fluid parameters in the first pipeline, and the boundary conditions of the first pipeline segment, so that the first model can accurately reflect the impact of leakage on the pipeline.
[0111] In summary, a pipeline simulation method provided in an embodiment of the present application can determine a first pipeline segment of a target pipeline according to an initial leakage area of the target pipeline; perform three-dimensional modeling on the first pipeline segment to obtain a first model; perform one-dimensional modeling on a second pipeline segment other than the first pipeline segment in the target pipeline to obtain a second model; in each iteration cycle, calculate a first gas leakage amount according to first pressure data at an interface between the first pipeline segment and the second pipeline segment using the first model, and transfer the first gas leakage amount to the second model; update the first pressure data to second pressure data based on the gas leakage amount using the second model; when the second pressure data does not meet a preset condition, transfer the second pressure data to the first model, and perform the next round of iteration until the second pressure data meets the preset condition, and stop the iteration, thereby improving the accuracy of simulating pipelines with leakage areas and improving the efficiency of locating leakage points.
[0112] Device Embodiment
[0113] like Figure 4 As shown, Figure 4 A logical block diagram of a pipeline simulation device provided in an embodiment of the present application is shown, the device comprising:
[0114] The determination module 410 is used to determine a first pipeline section corresponding to the target pipeline according to the initial leakage area of the target pipeline; the first pipeline section is a pipeline section in the target pipeline including the initial leakage area;
[0115] A first modeling module 420, configured to perform three-dimensional modeling on the first pipeline segment to obtain a first model;
[0116] A second modeling module 430 is used to perform one-dimensional modeling on a second pipeline segment in the target pipeline except the first pipeline segment to obtain a second model;
[0117] a calculation module 440, configured to calculate a first gas leakage amount according to first pressure data at an interface between the first pipeline segment and the second pipeline segment using the first model in each iteration cycle, and transmit the first gas leakage amount to the second model;
[0118] An updating module 450, configured to update the first pressure data to second pressure data based on the first gas leakage using the second model;
[0119] The transmission module 460 is used to transmit the second pressure data to the first model when the second pressure data does not meet the preset conditions, and perform the next round of iteration until the second pressure data meets the preset conditions, and then stop the iteration.
[0120] Optionally, the calculation module includes:
[0121] A first calculation submodule, configured to calculate the first gas leakage amount in each iteration cycle based on the geometric features of the initial leakage area, the physical properties of the fluid, and the first pressure data;
[0122] The first interpolation module is used to map the first gas leakage into the second model by using a first interpolation algorithm.
[0123] Optionally, the updating the first pressure data to second pressure data based on the first gas leakage using the second model includes:
[0124] an adjustment module, configured to adjust the flow rate and pressure distribution in the second pipeline section based on the first gas leakage amount by using the second model;
[0125] A second calculation submodule, configured to calculate a second gas leakage amount in the second pipeline segment based on the flow rate and the pressure distribution;
[0126] The first determination submodule is configured to determine the second pressure data according to the pressure distribution when the difference between the second gas leakage amount and the first gas leakage amount is less than or equal to a first preset threshold.
[0127] Optionally, when the second pressure data does not meet a preset condition, transmitting the second pressure data to the first model includes:
[0128] The second interpolation module is used to map the second pressure data into the first model by adopting a second interpolation algorithm.
[0129] Optionally, the method further comprises:
[0130] A setting module, used for setting at least three pressure sensors on the target pipeline;
[0131] A pressurizing module, used to pressurize the target pipeline and collect third pressure data monitored by the pressure sensor when the leakage valve of the target pipeline is opened;
[0132] The second determination submodule is used to re-determine the first pipeline section corresponding to the target pipeline when the difference between the second pressure data and the third pressure data is greater than a second preset threshold.
[0133] Optionally, performing three-dimensional modeling on the first pipeline segment to obtain a first model includes:
[0134] A construction submodule is used to construct the first model according to the initial pressure field in the first pipeline segment, the fluid properties in the first pipeline, and the boundary conditions of the first pipeline segment; the first model is used to reflect the actual flow field and pressure wave transmission changes of the first pipeline segment.
[0135] In summary, a pipeline simulation device provided in an embodiment of the present application can determine a first pipeline segment of a target pipeline according to an initial leakage area of the target pipeline; perform three-dimensional modeling on the first pipeline segment to obtain a first model; perform one-dimensional modeling on a second pipeline segment other than the first pipeline segment in the target pipeline to obtain a second model; in each iteration cycle, calculate a first gas leakage amount according to first pressure data at an interface between the first pipeline segment and the second pipeline segment using the first model, and transfer the first gas leakage amount to the second model; update the first pressure data to second pressure data based on the first gas leakage amount using the second model; when the second pressure data does not meet a preset condition, transfer the second pressure data to the first model, and perform the next round of iteration until the second pressure data meets the preset condition, and stop the iteration, thereby improving the accuracy of simulating pipelines with leakage areas and improving the efficiency of locating leakage points.
[0136] The pipeline simulation device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or other devices other than the terminal. Exemplarily, the electronic device can be a GPU BOX, a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0137] The pipeline simulation device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0138] Alternatively, if Figure 5As shown, an embodiment of the present application also provides an electronic device, including a processor and a memory, wherein the memory stores a program or instruction that can be executed on the processor, and when the program or instruction is executed by the processor, the various steps of the above-mentioned pipeline simulation method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0139] In an embodiment of the present application, the memory may be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.
[0140] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.
[0141] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned pipeline simulation method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0142] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0143] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned pipeline simulation method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0144] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0145] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the relevant technology, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0146] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A pipeline simulation method, characterized in that: The method comprises: According to the initial leakage area of the target pipeline, determining a first pipeline section corresponding to the target pipeline; the first pipeline section is a pipeline section in the target pipeline including the initial leakage area; Performing three-dimensional modeling on the first pipeline segment to obtain a first model; Performing one-dimensional modeling on a second pipeline segment in the target pipeline except the first pipeline segment to obtain a second model; In each iteration cycle, using the first model to calculate a first gas leakage amount according to first pressure data at an interface between the first pipeline segment and the second pipeline segment, and transferring the first gas leakage amount to the second model; updating the first pressure data to second pressure data based on the first gas leakage using the second model; When the second pressure data does not meet the preset condition, the second pressure data is transferred to the first model, and the next round of iteration is performed until the second pressure data meets the preset condition, and then the iteration is stopped.
2. The method according to claim 1, characterized in that The method of calculating a first gas leakage amount according to first pressure data at an interface between the first pipeline segment and the second pipeline segment using the first model in each iteration cycle, and transferring the first gas leakage amount to the second model, comprises: In each iteration cycle, the first gas leakage amount is calculated based on the geometric characteristics of the initial leakage area, the physical properties of the fluid, and the first pressure data; The first gas leakage is mapped into the second model using a first interpolation algorithm.
3. The method according to claim 1, characterized in that The updating the first pressure data to second pressure data based on the first gas leakage using the second model includes: Using the second model, adjusting the flow rate and pressure distribution in the second pipeline section based on the first gas leakage; Calculating a second gas leakage amount in the second pipeline section based on the flow rate and the pressure distribution; When the difference between the second gas leakage amount and the first gas leakage amount is less than or equal to a first preset threshold, the second pressure data is determined according to the pressure distribution.
4. The method according to claim 1, characterized in that: When the second pressure data does not meet a preset condition, transmitting the second pressure data to the first model comprises: The second pressure data is mapped into the first model using a second interpolation algorithm.
5. The method according to claim 1, characterized in that: The method further comprises: Disposing at least three pressure sensors on the target pipeline; Pressurizing the target pipeline and collecting third pressure data monitored by the pressure sensor when a leakage valve of the target pipeline is opened; When the difference between the second pressure data and the third pressure data is greater than a second preset threshold, the first pipeline section corresponding to the target pipeline is re-determined.
6. The method according to claim 1, characterized in that The three-dimensional modeling of the first pipeline segment to obtain a first model includes: The first model is constructed according to the initial pressure field in the first pipeline segment, the fluid properties in the first pipeline, and the boundary conditions of the first pipeline segment; the first model is used to reflect the actual flow field and pressure wave transmission changes of the first pipeline segment.
7. A pipeline simulation device, characterized in that: The device comprises: A determination module, configured to determine a first pipeline segment corresponding to the target pipeline according to an initial leakage area of the target pipeline; the first pipeline segment is a pipeline segment in the target pipeline including the initial leakage area; A first modeling module, used for performing three-dimensional modeling on the first pipeline segment to obtain a first model; A second modeling module, used for performing one-dimensional modeling on a second pipeline segment in the target pipeline except the first pipeline segment, to obtain a second model; a calculation module, configured to calculate, in each iteration cycle, a first gas leakage amount according to first pressure data at an interface between the first pipeline segment and the second pipeline segment using the first model, and transmit the first gas leakage amount to the second model; An updating module, configured to update the first pressure data to second pressure data based on the gas leakage amount by using the second model; The transmission module is used to transmit the second pressure data to the first model when the second pressure data does not meet the preset conditions, and perform the next round of iteration until the second pressure data meets the preset conditions, and then stop the iteration.
8. An electronic device, characterized in that: The electronic device comprises a processor, a memory, a communication interface and a communication bus, and the processor, the memory and the communication interface communicate with each other via the communication bus; The memory is used to store executable instructions, and the executable instructions enable the processor to execute the pipeline simulation method as described in any one of 1 to 6.
9. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the pipeline simulation method described in any one of claims 1 to 6 is implemented.