Natural gas station leakage hazard area division method, device and storage medium

By using scene clustering analysis methods in natural gas stations to reduce leakage scenarios, the problems of insufficient comprehensive considerations and high data redundancy in the existing technology are solved, and a more scientific and reasonable division of leakage hazard areas and improvement of computing efficiency are achieved. .

CN116976232BActive Publication Date: 2025-02-11PETROCHINA CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210405390.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-18
Publication Date
2025-02-11
Estimated Expiration
2042-04-18

AI Technical Summary

Technical Problem

In the classification of leakage and diffusion hazardous areas of natural gas stations, the considerations are not comprehensive enough, the universality is poor, and the data redundancy of representative leakage scenarios is high and the calculation amount is large.

Method used

A complete leakage scenario of natural gas field stations is constructed by using a scene clustering method, and the leakage scenario is reduced through multi-dimensional clustering analysis method, data redundancy is reduced, and the stability of clustering results is improved.

Benefits of technology

A more scientific and reasonable division of leakage hazard areas has been achieved, and the problems of insufficient consideration of a single leakage scenario and high data redundancy have been solved, which has improved the computing efficiency and universality of results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116976232B_ABST
    Figure CN116976232B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for dividing leakage hazard areas of natural gas stations, and a storage medium. The area division method includes the following steps: S1, constructing a complete leakage scenario of a natural gas station; S2, using a multidimensional cluster analysis method to perform cluster analysis on the complete leakage scenario of the natural gas station, reducing the leakage scenario according to the results of the cluster analysis, and obtaining the cluster reduction leakage scenario and the probability of cluster reduction leakage scenario of the natural gas station; S3, performing leakage diffusion numerical simulation on the cluster reduction leakage scenario of the natural gas station, and obtaining the gas concentration distribution after gas leakage; S4, dividing the leakage diffusion hazard area of ​​the natural gas station based on the gas concentration distribution results and the probability of cluster reduction leakage scenario. The division method is based on scenario clustering, which solves the problems of insufficient consideration of factors and poor universality caused by the existing single leakage scenario, high data redundancy of representative leakage scenarios, and large amount of calculation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of leakage monitoring of natural gas stations, and in particular to a method and device for dividing leakage risk areas of natural gas stations and a storage medium. Background Art

[0002] Natural gas pipeline transportation has the advantages of large transmission volume, low energy consumption, small land occupation and fast construction. At present, the total mileage of natural gas trunk pipelines in China has exceeded 110,000 kilometers. However, due to the continuous aging of pipeline equipment, the external risks are becoming more complex and many other challenges, which have caused the interaction and accumulation of new and old risks, especially fire and explosion accidents caused by natural gas leaks. As the hub of natural gas pipeline transportation, natural gas transmission and distribution stations can reduce the hidden dangers of dangerous accidents in gas transmission stations by identifying hazard factors and dividing risk areas, and formulate control and emergency measures according to the degree of risk to achieve the purpose of "controlling risks and reducing risks", which is of great significance to ensure the safe and stable operation of gas pipelines.

[0003] The basic process of dividing the leakage and diffusion danger zone of natural gas stations in the existing technical solutions is:

[0004] 1) Identification of potential leakage sources in process equipment and pipelines of gas transmission and distribution stations;

[0005] 2) Construct leakage accident scenarios based on atmospheric wind direction, wind speed and process parameters;

[0006] 3) Calculate the migration process and concentration boundary of leaked gas through empirical or semi-empirical diffusion models, such as Gaussian model, or numerical simulation, such as computational fluid dynamics;

[0007] 4) Determine the hazardous area and its boundaries based on the gas concentration gradient or thermal radiation intensity.

[0008] The leakage scenario is a combination of leakage location, leakage aperture, atmospheric wind direction, and wind speed. At present, the relevant research and methods for the division of leakage and diffusion danger zones in natural gas stations do not consider leakage scenarios comprehensively. Most of them are based on a single leakage scenario with the highest probability of occurrence or the most serious loss, and subsequent gas diffusion simulation and danger zone division are carried out. Although the danger zone is determined based on a single leakage scenario. However, since the leakage itself is a probabilistic event, its leakage scenario is a random combination of leakage location, size, wind direction and wind speed. Therefore, if the danger zone is divided based on a single scenario, it is difficult to apply to other leakage scenarios, and its practical application and reference value will be greatly reduced.

[0009] In order to solve the problem of uncertainty in scenario parameters in the division of dangerous areas for natural gas leakage and diffusion, the existing technology adopts the method of selecting representative leakage scenarios and weighting the calculation results with their scenario probabilities to obtain comprehensive dangerous areas. However, the selection of "representative scenarios" introduces new problems. If all leakage situations are to be considered comprehensively, a complete leakage accident scenario set must be constructed, which is a random combination of leakage location, size, wind direction, and wind speed, resulting in a geometric increase in the number of research objects. For example, 8 wind directions, 4 wind speeds, 12 leakage points, and 3 leakage apertures will eventually be combined into 8×4×12×3=1152 scenarios. Obviously, it is not easy to calculate all of these more than one thousand leakage scenarios. After statistical analysis, there are a large number of similar and repeated scenarios in the complete leakage accident scenario set, and the data redundancy is very high. Summary of the invention

[0010] The purpose of the present invention is to provide a method for dividing leakage hazard areas of natural gas stations. The division method is based on scene clustering, which not only solves the problems of poor universality of existing single leakage scenes due to insufficient consideration of factors, and high data redundancy and large amount of calculation of representative leakage scenes, but also considers various combination factors of leakage scenes, and has the advantage of good stability of clustering results.

[0011] In addition, the present invention also provides a device and a storage medium for the above-mentioned method for dividing leakage risk areas of natural gas stations.

[0012] The present invention is achieved through the following technical solutions:

[0013] The method for dividing the leakage hazard area of ​​a natural gas station includes the following steps:

[0014] S1: Construct a complete leakage scenario for a natural gas station. The complete leakage scenario includes a complete leakage scenario set and a complete leakage scenario probability matrix.

[0015] S2: using a multidimensional cluster analysis method to perform cluster analysis on the complete leakage scenario of the natural gas station constructed in step S1, reducing the leakage scenario according to the result of the cluster analysis, and obtaining the cluster-reduced leakage scenario of the natural gas station and the probability of cluster-reduced leakage scenario;

[0016] S3: performing leakage diffusion numerical simulation on the natural gas station clustering reduction leakage scenario obtained in step S2 to obtain the gas concentration distribution after the gas leakage;

[0017] S4: Based on the gas concentration distribution obtained in step S3 and the clustering reduction leakage scenario probability obtained in step S2, the leakage and diffusion risk area of ​​the natural gas station is divided.

[0018] The leakage scenario is a combination of multiple factors such as wind direction and speed, leakage location and leakage aperture. The existing methods for dividing the dangerous areas of leakage and diffusion of natural gas stations are mostly based on a single leakage scenario with the highest probability of occurrence or the most serious loss. The results are not applicable to other leakage scenarios. Therefore, the existing methods have the disadvantages of insufficient consideration of factors and poor universality. However, if multiple leakage factors and all leakage scenarios are considered, the data redundancy is high, which will lead to a huge amount of diffusion simulation calculations and waste of computing resources.

[0019] The present invention comprehensively considers the complete set of leakage scenarios and adopts a scenario clustering analysis method to reduce data redundancy, thereby providing data for the concentration distribution of leakage diffusion. It solves the problems of poor universality of existing single leakage scenarios due to insufficient consideration of factors, and high data redundancy and large amount of calculation for representative leakage scenarios.

[0020] Furthermore, the scene clustering adopted by the present invention includes leakage scene clustering and leakage scene probability clustering. Compared with clustering analysis based solely on the probability of leakage scenes, the clustering results are more stable. That is, the present invention has the advantage of good clustering result stability.

[0021] Furthermore, step S1 specifically includes the following steps:

[0022] S11: Obtain local weather historical data in the target area, construct a wind direction set, a wind speed set, and a wind direction and speed probability matrix;

[0023] S12: Obtain a target natural gas station leakage failure database, construct a leakage source set and a leakage source probability matrix, wherein the leakage source set includes a leakage position set and a leakage aperture set;

[0024] S13: constructing a complete leakage scenario set based on the wind direction set and wind speed set constructed in step S11 and the leakage source set constructed in step S12;

[0025] S14: Based on the wind direction and wind speed probability matrix constructed in step S11 and the leakage source probability matrix constructed in step S12, a complete leakage scenario probability matrix is ​​constructed.

[0026] Furthermore, the wind direction set includes east wind, west wind, south wind, north wind, southeast wind, northeast wind, southwest wind and northwest wind; the wind speed set is a set of ratios of the maximum wind speed in the target area to the number of intervals divided by the wind speed.

[0027] The wind direction set is:

[0028] a=[a1,a2,a3,...,a8] (1)

[0029] In the formula: a1-a8 represent east wind, west wind, south wind, north wind, southeast wind, northeast wind, southwest wind and northwest wind respectively.

[0030] The wind speed set is:

[0031] b=[v / m,2v / m,...,v] (2)

[0032] Where: v is the maximum wind speed in the target area; m is the number of wind speed intervals.

[0033] The wind direction and wind speed probability matrix is:

[0034] P1={P ab |a1≤a≤a8,v / m≤b≤v} (3)

[0035] Where: P1 is the wind direction and wind speed probability matrix; P ab is the probability that the wind direction is a and the wind speed is b;

[0036] The leakage location set is:

[0037] c=[1,2,...,t] (4)

[0038] Where: t is the total number of potential leakage points in the natural gas station;

[0039] The leakage aperture set is:

[0040]

[0041] Where: d1-d4 represent small pores, medium pores, large pores, and fractures respectively;

[0042] The sizes of small holes, medium holes and large holes are shown in Table 1:

[0043] Table 1 Commonly used typical leakage hole sizes

[0044] Leak type Small hole Middle hole Large hole fracture Aperture size range / mm 1~10 10~50 50~150 >150

[0045] The leakage source probability matrix is:

[0046] P2={P cd |1≤c≤t,d1≤d≤d4} (6)

[0047] Where: P2 is the leakage source probability matrix; P cd is the probability of leakage position c and leakage aperture d;

[0048] The complete leakage scenario set is a combination of the wind direction set, the wind speed set, and the leakage source set. The total number of the complete leakage scenario set is:

[0049] N = 8 × m × t × 4 (7)

[0050] The complete leakage scenario probability matrix is:

[0051]

[0052] Where: P3 is the probability matrix of complete leakage scenario; P abcd It is the probability when the wind direction in the atmosphere is a, the wind speed is b, the leakage position is c, and the leakage aperture is d.

[0053] Furthermore, step S2 adopts K-means clustering analysis method.

[0054] Furthermore, step S2 specifically includes the following steps:

[0055] Step S21: normalizing the element values ​​in the natural gas station complete leakage scenario and calculating the variation weighted coefficient;

[0056] Step S22: grouping the complete leakage scene sets, and determining the central scene of each group of complete leakage scene sets, and dividing the complete leakage scenes into a cluster central set and other leakage scene sets;

[0057] Step S23: Calculate the Euclidean distance from each scene in the remaining leakage scene set to the corresponding cluster center scene, and establish a Euclidean distance matrix;

[0058] Step S24: Based on step S23, a fixed Euclidean distance matrix is ​​constructed. After traversing all the remaining leakage scenarios, the average number of elements in each cluster set is recalculated to determine a new central scene, and a new complete leakage scenario is constructed to be divided into a cluster center set and a new set of remaining leakage scenarios;

[0059] Step S25: Calculate the square error E after the leakage scene is clustered, and compare the E values ​​before and after clustering:

[0060] If the square error E after clustering changes by more than W, where W is the error range, then use the new cluster center set and the new remaining leakage scene set to return to steps S23-S25 and recalculate;

[0061] If the square error E after clustering changes to less than or equal to W, clustering ends and the process goes to step S26;

[0062] Step S26: multiply the Euclidean distance between each leakage scene in each cluster and the center of the cluster by the inverse of its leakage scene probability, select the scene with the smallest value as the representative scene, and extract the representative scene in each cluster to form a leakage scene set after clustering reduction;

[0063] Step S27: Increase the number of groupings of the full leakage scenario set, repeat steps S22-S26, obtain the square error E of different numbers of clusters in the cluster analysis, draw a curve with the number of clusters k' as the horizontal coordinate and the square error E as the vertical coordinate, take the inflection point of the curve as the optimal number of clustering clusters, and the corresponding reduction scenario is the natural gas station clustering reduction leakage scenario, and the corresponding reduction scenario probability is the clustering reduction leakage scenario probability.

[0064] Furthermore, in step S21, the normalization process is performed by using a Z-score normalization method, specifically:

[0065]

[0066]

[0067]

[0068] Where: z e,i is the Z-score normalized value of the ith element in the dimension e set; dimension e represents the wind direction, wind speed, leakage location, and leakage aperture, which are represented as 1, 2, 3, and 4 respectively; x e,i is the value of the i-th element in the set of dimension e; μ e is the average value of the dimension e set; σ e is the standard deviation of the elements in the dimension e set; n is the total number of elements in the dimension e set;

[0069] The variation weighted coefficient is calculated by the following formula:

[0070]

[0071] Where: w e is the variation weighting coefficient of the dimension e set.

[0072] Further, in step S21, the element values ​​include a wind direction set, a wind speed set, a leakage position set, and a leakage aperture set.

[0073] Furthermore, the specific process of step S22 is:

[0074] Initially, the complete leakage scene set is divided into k groups, and k scenes are randomly selected from the complete leakage scenes as the center points of the initial clustering, recorded as the cluster center set Center, with the number of elements being k, and the remaining scenes are recorded as the remaining leakage scene set Rest, with the number of elements being Nk.

[0075] Furthermore, the specific process of step S24 is as follows:

[0076] Compare the elements of each row in the Euclidean distance matrix, extract the minimum element j,i of each row, and classify the remaining leakage scenes j into the cluster to which the cluster center scene i belongs; after traversing all the remaining leakage scenes, cluster the complete leakage scenes into k cluster sets for the first time, and recalculate the wind direction, wind speed, leakage position and leakage aperture average value of the scenes in each cluster set as the new cluster center set Center', with k elements, and the remaining scenes are recorded as the new remaining leakage scene set Rest', with Nk elements.

[0077] The cluster center set is expressed as:

[0078] Center = {z e,i} i=1,2...k; e=1,2,3,4 (13)

[0079] In the formula: Center is the cluster center set; z e,i is the normalized value of the center point of the cluster i and dimension e set;

[0080] The remaining set of leakage scenarios is expressed as:

[0081] Rest = {z e,j} j=1,2...Nk; e=1,2,3,4 (14)

[0082] Where: Rest is the set of other leakage scenarios; z e,j For the remaining leakage scenarios j, the normalized values ​​of the elements of the dimension e set;

[0083] The Euclidean distance is calculated as follows:

[0084]

[0085] Where: Dist(i,j) is the Euclidean distance from the remaining leakage scene j to the cluster center i;

[0086] The new cluster center set is:

[0087] Cert ′={z′ e,i}=μ e,i i=1,2...k; e=1,2,3,4 (16)

[0088] Where: Center' is the center point set of k clusters after update; z' e,i is the value of the center point under cluster i and dimension e, μ e,i is the average value of the set of elements in cluster i and dimension e.

[0089] The square error E is calculated by the following formula:

[0090]

[0091] Cluster reduction leakage scenarios constructed based on the natural gas station leakage hazard area division method.

[0092] Cluster reduction leakage scenarios are:

[0093]

[0094] Where: S is the leakage scenario after cluster reduction; P t,abcd is the probability of leakage position c and leakage aperture d when the wind direction is a and the wind speed is b in the atmosphere. t represents the leakage scenario and the leakage scenario belongs to the leakage scenario set S after cluster reduction.

[0095] Furthermore, step S4 specifically includes the following sub-steps:

[0096] S41: The natural gas station layout is divided into p×q grids, and the gas concentration distribution results of the leakage scene after cluster reduction are calculated according to computational fluid dynamics. The natural gas concentration data in the corresponding grid is extracted and recorded as:

[0097] C t,x,y x=1,2...p; y=1,2...q; t∈S (19)

[0098] Where: C t,x,y is the natural gas concentration when the horizontal and vertical coordinates of the natural gas station are x and y respectively under leakage scenario t;

[0099] S42: normalizing the probability distribution after scene reduction to obtain a normalized scene probability;

[0100] S43: Calculating a comprehensive concentration distribution of natural gas leakage considering scenario analysis according to the natural gas concentration and the normalized scenario probability;

[0101] S44: Determine the safety status of each area according to the comprehensive concentration distribution of the natural gas leakage.

[0102] Preferably, the normalized scene probability is calculated by the following formula:

[0103]

[0104] Where: P' t,abcd is the normalized scene probability.

[0105] Preferably, the comprehensive concentration distribution of natural gas leakage considering scenario clustering reduction is calculated by the following formula:

[0106]

[0107] Where: C x,y It is the natural gas concentration of the leaked natural gas at the x and y coordinates of the station after weighting the probability of the leakage scenario.

[0108] Further, step S44 is specifically as follows:

[0109] When the natural gas concentration in the area weighted by the probability of leakage scenario is less than the lower explosion limit, the area is a safe area;

[0110] When the natural gas concentration in the area with weighted leakage scenario probability is between the upper and lower explosion limits, the area is a flammable and explosive area;

[0111] When the natural gas concentration in an area weighted by the probability of leakage scenario is greater than the upper explosion limit, the area is a dangerous area.

[0112] A storage medium stores instructions for executing a method for dividing leakage hazard areas of a natural gas station.

[0113] A device for dividing leakage hazard areas of a natural gas station, comprising:

[0114] processor;

[0115] a storage medium storing executable instructions of the processor;

[0116] Wherein, the processor is configured to execute the steps of the method for dividing the leakage hazard area of ​​a natural gas station by executing the executable instructions.

[0117] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0118] 1. The present invention comprehensively considers the complete leakage scenario set and adopts the scenario clustering analysis method to reduce data redundancy, thereby providing data for the concentration distribution of leakage diffusion, and weighting the scenario probability and risk index to obtain the leakage hazard area, and the result is more scientific and reasonable.

[0119] 2. The division method of the present invention is based on scene clustering, including leakage scene clustering and leakage scene probability clustering. It not only solves the problems of insufficient consideration of factors and poor universality caused by the existing single leakage scene, high data redundancy of representative leakage scenes, and large amount of calculation, but also considers various combination factors of the leakage scene, and has the advantage of good stability of clustering results. BRIEF DESCRIPTION OF THE DRAWINGS

[0120] The drawings described herein are used to provide a further understanding of the embodiments of the present invention, constitute a part of this application, and do not constitute a limitation of the embodiments of the present invention. In the drawings:

[0121] Figure 1It is a flow chart of a method for dividing leakage risk areas of natural gas stations based on scene clustering according to the present invention;

[0122] Figure 2 This is a flow chart of using K-means clustering to reduce leakage scenarios in Example 1 of the present invention;

[0123] Figure 3 This is a schematic diagram of the relationship between the number of clusters and the square error curve in Example 1 of the present invention. DETAILED DESCRIPTION

[0124] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0125] Embodiment 1:

[0126] like Figure 1 As shown in the figure, the method for dividing the leakage hazard area of ​​a natural gas station includes the following steps:

[0127] S1: Construct a complete leakage scenario for a natural gas station. The complete leakage scenario includes a complete leakage scenario set and a complete leakage scenario probability matrix.

[0128] Specifically:

[0129] S11: Obtain local weather historical data in the target area, construct a wind direction set, a wind speed set, and a wind direction and speed probability matrix;

[0130] The wind direction set is:

[0131] a=[a1,a2,a3,...,a8] (1)

[0132] Where: a1-a8 represent east wind, west wind, south wind, north wind, southeast wind, northeast wind, southwest wind, northwest wind respectively;

[0133] The wind speed set is:

[0134] b=[v / m,2v / m,...,v] (2)

[0135] Where: v is the maximum wind speed in the target area; m is the number of wind speed intervals;

[0136] The wind direction and wind speed probability matrix is:

[0137] P1={P ab |a1≤a≤a8,v / m≤b≤v} (3)

[0138] Where: P1 is the wind direction and wind speed probability matrix; P abis the probability that the wind direction is a and the wind speed is b;

[0139] S12: Obtain a target natural gas station leakage failure database, construct a leakage source set and a leakage source probability matrix, wherein the leakage source set includes a leakage position set and a leakage aperture set;

[0140] The natural gas station leakage failure database is established based on the process, equipment, operating parameters, fluid medium, insulation and anti-corrosion conditions of the target station;

[0141] The leakage location set is:

[0142] c=[1,2,...,t] (4)

[0143] Where: t is the total number of potential leakage points in the natural gas station;

[0144] The leakage aperture set is:

[0145]

[0146] Where: d1-d4 represent small pores, medium pores, large pores, and fractures respectively;

[0147] The leakage source probability matrix is:

[0148] P2={P cd |1≤c≤t,d1≤d≤d4} (6)

[0149] Where: P2 is the leakage source probability matrix; P cd is the probability of leakage position c and leakage aperture d;

[0150] S13: constructing a complete leakage scenario set based on the wind direction set and wind speed set constructed in step S11 and the leakage source set constructed in step S12;

[0151] The complete leakage scenario set is a combination of the wind direction set, the wind speed set, and the leakage source set. The total number of the complete leakage scenario set is:

[0152] N = 8 × m × t × 4 (7)

[0153] S14: Based on the wind direction and wind speed probability matrix constructed in step S11 and the leakage source probability matrix constructed in step S12, a complete leakage scenario probability matrix is ​​constructed. The complete leakage scenario probability matrix is:

[0154]

[0155] Where: P3 is the probability matrix of complete leakage scenario; P abcdIt is the probability when the wind direction in the atmosphere is a, the wind speed is b, the leakage position is c and the leakage aperture is d.

[0156] Taking a natural gas station Y in a certain place as an example, the natural gas station leakage risk area division method based on scene clustering of the present invention is used to divide its leakage risk area. In this embodiment, in step S1, the wind direction sets a1-a8 are 1, 2, 3, 4, 5, 6, 7, and 8 respectively, the maximum wind speed v in the wind speed set is 15m / s, the m interval is 4, and the wind direction and wind speed probability matrix is:

[0157]

[0158] The total number of leakage points is 4, and the leakage apertures d1-d4 are represented as 1, 2, 3, and 4 respectively. The leakage source probability matrix is:

[0159]

[0160] The total number of complete leakage scenario sets is N = 8 × 4 × 4 × 4 = 512, and the complete leakage scenario probability matrix is:

[0161]

[0162] S2: using a multidimensional cluster analysis method to perform cluster analysis on the complete leakage scenario of the natural gas station constructed in step S1, reducing the leakage scenario according to the result of the cluster analysis, and obtaining the cluster-reduced leakage scenario of the natural gas station and the probability of cluster-reduced leakage scenario;

[0163] In a specific embodiment, the multidimensional clustering analysis method adopts K-means clustering analysis method. It should be noted that, in addition to the K-means clustering analysis method, the present invention can also adopt other clustering methods in the prior art to perform clustering analysis on the complete leakage scenario of the natural gas station to reduce data redundancy. Figure 2 As shown, the K-means cluster analysis method specifically includes the following sub-steps:

[0164] S21: normalizing the wind direction set, wind speed set, leakage position set, and leakage aperture set, and calculating a variation weighted coefficient;

[0165] In a specific embodiment, when performing normalization processing, a Z-score normalization method is used for normalization processing, specifically:

[0166]

[0167]

[0168]

[0169] Where: z e,i is the Z-score normalized value of the ith element in the dimension e set; dimension e represents the wind direction, wind speed, leakage location, and leakage aperture, which are represented as 1, 2, 3, and 4 respectively; x e,i is the value of the i-th element in the set of dimension e; μ e is the average value of the dimension e set; σ e is the standard deviation of the elements in the dimension e set; n is the total number of elements in the dimension e set;

[0170] The variation weighted coefficient is calculated by the following formula:

[0171]

[0172] Where: w e is the variation weight coefficient of the dimension e set;

[0173] In the above-mentioned embodiment of natural gas station Y, the wind direction homogenization value in this step is: 1,1 、z 1,2 、z 1,3 、z 1,4 、z 1,5 、z 1,6 、z 1,7 、z 1,8 , the weighted coefficient of variation is w1; the wind speed homogenization value is: z 2,1 、z 2,2 、z 3,3 、z 2,4 , the weighted coefficient of variation is w2; the homogenized value of the leakage position is: z 3,1 、z 3,2 、z 3,3 、z 3,4 , the weighted coefficient of variation is w3; the normalized value of the leakage aperture is: z 4,1 、z 4,2 、z 4,3 、z 4,4 The weighted coefficient of variation is w4.

[0174] S22: Initialize and divide the complete leakage scene set into k groups (i.e., the number of clusters in the cluster analysis is k), randomly select k scenes from the complete leakage scene as the center points of the initial cluster, recorded as the cluster center set Center, the number of elements is k, and the remaining scenes are recorded as the remaining leakage scene set Rest, the number of elements is Nk;

[0175] The cluster center set is expressed as:

[0176] Center = {z e,i} i=1,2...k; e=1,2,3,4 (16)

[0177] In the formula: Center is the cluster center set; z e,i is the normalized value of the center point of the cluster i and dimension e set;

[0178] The remaining set of leakage scenarios is expressed as:

[0179] Rest = {z e,j} j=1,2...Nk; e=1,2,3,4 (17)

[0180] Where: Rest is the set of other leakage scenarios; z e,j For the remaining leakage scenarios j, the normalized values ​​of the elements of the dimension e set;

[0181] In the above-mentioned embodiment of natural gas station Y, the initial number of clusters in this step is 3, and P is randomly selected. 1324 , P 2132 , P 3123 The three scenes are respectively used as the center points of the three clusters, and the cluster center set is Center = {z e,i}i=1,2,3;e=1,2,3,4,the rest of the leakage scenario set is Rest={z e,j}j=1,2,...,509; e=1,2,3,4.

[0182] S23: Calculate the Euclidean distance from each scene j=1, 2…Nk in the remaining leakage scene set Rest to each center scene i=1, 2..k in the cluster center set Center. The Euclidean distance is calculated by the following formula:

[0183]

[0184] Where: Dist(i,j) is the Euclidean distance from the remaining leakage scene j to the cluster center i;

[0185] According to the calculation result of the Euclidean distance, a Euclidean distance matrix as shown below is established:

[0186]

[0187] S24: Compare the elements of each row in the Euclidean distance matrix, extract the minimum element j,i of each row, and classify the remaining leakage scene j into the cluster to which the cluster center scene i belongs. After traversing all the remaining leakage scenes, the complete leakage scene is initially clustered into k cluster sets, and the wind direction, wind speed, leakage position and leakage aperture average value of the scene in each cluster set are recalculated as the new cluster center set Center', with the number of elements being k, and the remaining scenes are recorded as the new remaining leakage scene set Rest', with the number of elements being Nk; the new cluster center set Center' is:

[0188] Cert ′={z′ e,i}=μ e,i i=1,2...k; e=1,2,3,4 (20)

[0189] Where: Center' is the center point set of k clusters after update; z' e,i is the value of the center point of cluster i and dimension e, μ e,i is the average value of the set of elements in cluster i and dimension e.

[0190] In the above-mentioned embodiment of natural gas station Y, in this step, 512 complete leakage scene sets are divided into 3 clusters, and the new center points of the 3 clusters are: P 3121 , P 4122 , P 1323 .

[0191] S25: Calculate the square error E of all leakage scenarios, and the square error E is calculated by the following formula:

[0192]

[0193] Compare the E values ​​before and after clustering: If the square error E after clustering changes by more than W, where W is the error range, use the new cluster center set Center' and the new remaining leakage scenario set Rest' to return to steps S23-S25 and recalculate; if the square error E after clustering changes by less than W, clustering ends and proceeds to step S26.

[0194] S26: Multiply the Euclidean distance between each leakage scene in each cluster and the center of the cluster by the inverse of its leakage scene probability, select the scene with the smallest value as the representative scene, and extract the representative scene in each cluster to form the leakage scene set S after clustering reduction:

[0195]

[0196] Where: S is the leakage scenario after cluster reduction; P t,abcdis the probability of leakage position c and leakage aperture d when the wind direction is a and the wind speed is b in the atmosphere. t represents the leakage scenario and the leakage scenario belongs to the leakage scenario set S after cluster reduction.

[0197] In the above-mentioned embodiment of natural gas station Y, the three representative scenes reduced by clustering in this step are divided into P 1311 , P 2143 , P 3143 .

[0198] S27: Increase the number of clusters in the cluster analysis k'=k+g, where g is the increment step, repeat steps S22-S26, and obtain the square error E of different numbers of clusters in the cluster analysis. Draw a curve with the number of clusters k' as the horizontal coordinate and the square error E as the vertical coordinate, and take the inflection point of the curve as the optimal number of clusters. The corresponding reduction scenario is the natural gas station clustering leakage reduction scenario.

[0199] In the above-mentioned embodiment of natural gas station Y, the increment step size in this step is 10, and the calculated cluster number and square error curve are as follows: Figure 3 As shown, the inflection point (the point where the curve slope changes by more than ±5%) is selected as the optimal number of clusters, and finally 521 leakage scenarios are reduced to 83 representative scenarios. It should be noted that the increment step g can be adjusted according to actual conditions and can be an integer greater than or equal to 1.

[0200] S3: performing leakage diffusion numerical simulation on the natural gas station clustering reduction leakage scenario obtained in step S2 to obtain the gas concentration distribution after the gas leakage;

[0201] In a specific embodiment, computational fluid dynamics (CFD) is used to perform leakage diffusion numerical simulation on the natural gas station clustering and leakage reduction scenario, which specifically includes the following sub-steps:

[0202] S31: Establishing a proportional geometric model of the target natural gas station and meshing the geometric model, wherein the geometric model includes station process pipelines, equipment layout, duty and rest houses, surrounding walls, etc.;

[0203] S32: The wind direction, wind speed, leakage location, and leakage aperture included in the leakage scenario set reduced by clustering natural gas stations are used as input parameters and boundary conditions, and the gas concentration distribution after gas leakage is calculated using the component transport model in computational fluid dynamics (CFD);

[0204] S33: extracting the concentration distribution of natural gas in different leakage scenarios S in post-processing.

[0205] In the above-mentioned embodiment of the natural gas station Y, this step needs to simulate the concentration distribution of the natural gas station after leakage diffusion under 83 representative scenarios after reduction.

[0206] It should be noted that although the gas leakage calculation of the present invention adopts the component transport model of computational fluid dynamics, the present invention can also adopt empirical or semi-empirical gas diffusion models, such as Gaussian diffusion equation, which has higher calculation efficiency but lower calculation accuracy than computational fluid dynamics (CFD).

[0207] S4: Based on the gas concentration distribution obtained in step S3 and the clustering reduction leakage scenario probability obtained in step S2, the leakage and diffusion risk area of ​​the natural gas station is divided, which specifically includes the following sub-steps:

[0208] S41: Divide the natural gas station layout into p×q grids, calculate the gas concentration distribution of the leakage scenario after cluster reduction based on computational fluid dynamics (CFD), and extract the natural gas concentration data in the corresponding grid, which is recorded as:

[0209] C t,x,y x=1,2...p; y=1,2...q; t∈S (23)

[0210] Where: C t,x,y is the natural gas concentration when the horizontal and vertical coordinates of the natural gas station are divided into x and y under leakage scenario t;

[0211] S42: The probability distribution after scene reduction is normalized by the following formula to obtain a normalized scene probability:

[0212]

[0213] Where: P' t,abcd is the normalized scene probability.

[0214] S43: According to the natural gas concentration and the normalized scenario probability, the comprehensive concentration distribution of natural gas leakage considering scenario analysis is calculated by the following formula:

[0215]

[0216] Where: C x,y It is the natural gas concentration of the leaked natural gas at the x and y coordinates of the station after weighting the probability of the leakage scenario.

[0217] S44: judging the safety status of each area according to the comprehensive concentration distribution of the natural gas leakage;

[0218] In a specific embodiment, judging the safety status of each area according to the comprehensive concentration distribution of natural gas leakage is specifically:

[0219] When the natural gas concentration in the area weighted by the probability of leakage scenario is less than the lower explosion limit, the area is a safe area;

[0220] When the natural gas concentration in the area with weighted leakage scenario probability is between the upper and lower explosion limits, the area is a flammable and explosive area;

[0221] When the natural gas concentration in an area weighted by the probability of leakage scenario is greater than the upper explosion limit, the area is a dangerous area.

[0222] In the above-mentioned example of natural gas station Y, this step divides the natural gas scene plane into 5×10, each grid width is 5m, and the concentration distribution of the natural gas station after weighting the leakage scene probability is shown in Table 1:

[0223] Table 1 Natural gas station concentration distribution results (unit: V%)

[0224] 0 0 0 0 0 0 0 0 0 0 0 2 6 10 20 13 18 6 5 0 0 1 7 12 8 14 31 7 2 0 0 3 10 25 21 15 18 10 3 0 0 0 0 5 0 0 0 0 0 0

[0225] In this embodiment, the lower explosion limit V%=5%, the upper explosion limit V%=15%, and the leakage and diffusion danger zone division results of the natural gas station Y are shown in Table 2:

[0226] Table 2 Division results of leakage and diffusion hazard areas of natural gas stations

[0227]

[0228] In Table 2, the area corresponding to the white background is the safe area (concentration less than 5%), the lighter gray area is the flammable and explosive area (concentration between 5% and 15%), and the darker gray area is the dangerous area.

[0229] The natural gas station Y is divided into dangerous areas by using the existing technology, as a comparative example of the embodiment of the natural gas station Y of the present invention.

[0230] In a specific comparative example 1, different from the embodiment of the natural gas station Y of the present invention, this comparative example 1 uses a single leakage scenario with the highest probability of leakage to divide the dangerous area of ​​the natural gas station Y. Specifically: In this comparative example 1, the maximum leakage probability scenario P is selected from the complete leakage scenario set. max A leakage and diffusion numerical simulation was performed to obtain the gas concentration distribution after the gas leakage. According to the gas concentration distribution results, the leakage and diffusion danger zone of the natural gas station Y was divided. The results are shown in Table 3:

[0231] Table 3 Comparative Example 1 Division results of leakage and diffusion hazard areas of natural gas stations

[0232]

[0233] By comparing Table 2 and Table 3, it can be seen that since the maximum leakage probability scenario in Comparative Example 1 only considers the concentration results after diffusion of a certain leakage point under a specific wind direction and wind speed, the obtained dangerous area of ​​the natural gas station is mainly concentrated near a certain leakage point; while the dangerous area division divided by the present invention combines multiple factors such as wind direction, wind speed, leakage location, leakage aperture, etc., and the obtained results are not concentrated near a certain leakage point, and the results are more accurate.

[0234] In another specific comparative example 2, different from the embodiment of the natural gas station Y of the present invention, this comparative example 2 does not perform multidimensional clustering reduction on the complete leakage scenario, but directly performs leakage diffusion numerical simulation on the set of complete leakage scenarios to obtain the gas concentration distribution after gas leakage, and divides the leakage diffusion hazard area of ​​the natural gas station Y according to the gas concentration distribution results.

[0235] In the above-mentioned comparative example 2, the computational fluid dynamics (CFD) numerical simulation of leakage diffusion of a leakage scenario takes about 8 hours. The numerical simulation of 512 scenarios of the complete leakage scenario set takes 512×8 / 24=170 days (single computer). The present invention greatly reduces the complete leakage scenario through multidimensional clustering, and streamlines the 512 leakage scenarios to 83 representative scenarios. The numerical simulation calculation takes 83×8 / 24=27 days (single computer). It can be seen that the present invention saves a lot of time and improves the efficiency of the site leakage diffusion hazard area division, which is a significant improvement compared with the prior art.

[0236] It should be noted that in the above embodiment, the judgment criterion is the concentration of combustible gas, but the present invention is not limited to this judgment criterion. The present invention can also introduce indicators such as flash fire, overpressure explosion, and thermal radiation as criteria for dividing dangerous areas based on actual needs.

[0237] In addition, according to the above judgment method, combined with the comprehensive concentration distribution of natural gas leakage and the p×q grid plane of the station, the boundaries of the safe area, flammable and explosive area and dangerous area of ​​the target station can be divided. It should be noted that the values ​​of the upper explosion limit and the lower explosion limit in the above judgment method can be obtained according to the existing technology and the actual situation of the target station, and the specific acquisition method will not be repeated here.

[0238] Embodiment 2:

[0239] A storage medium storing instructions for executing the method for dividing leakage risk areas of a natural gas station described in Example 1.

[0240] Embodiment 3:

[0241] A device for dividing leakage hazard areas of a natural gas station, comprising:

[0242] processor;

[0243] a storage medium storing executable instructions of the processor;

[0244] Wherein, the processor is configured to execute the steps of the method for dividing leakage hazard areas of a natural gas station as described in Example 1 by executing the executable instructions.

[0245] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for dividing leakage risk areas of natural gas stations, characterized in that: The following steps are involved: S1: Construct a complete leakage scenario for a natural gas station. The complete leakage scenario includes a complete leakage scenario set and a complete leakage scenario probability matrix. Step S1 specifically includes the following steps: S11: Obtain local weather historical data in the target area, construct a wind direction set, a wind speed set, and a wind direction and speed probability matrix; S12: Obtain a target natural gas station leakage failure database, construct a leakage source set and a leakage source probability matrix, wherein the leakage source set includes a leakage position set and a leakage aperture set; S13: constructing a complete leakage scenario set based on the wind direction set and wind speed set constructed in step S11 and the leakage source set constructed in step S12; S14: constructing a complete leakage scenario probability matrix based on the wind direction and wind speed probability matrix constructed in step S11 and the leakage source probability matrix constructed in step S12; S2: using a multidimensional cluster analysis method to perform cluster analysis on the complete leakage scenario of the natural gas station constructed in step S1, reducing the leakage scenario according to the result of the cluster analysis, and obtaining the cluster-reduced leakage scenario of the natural gas station and the probability of cluster-reduced leakage scenario; S3: performing leakage diffusion numerical simulation on the natural gas station clustering reduction leakage scenario obtained in step S2 to obtain the gas concentration distribution after the gas leakage; S4: Based on the gas concentration distribution obtained in step S3 and the clustering reduction leakage scenario probability obtained in step S2, the leakage and diffusion risk area of ​​the natural gas station is divided.

2. The method for dividing the leakage risk area of ​​a natural gas station according to claim 1 is characterized in that: The wind direction set includes east wind, west wind, south wind, north wind, southeast wind, northeast wind, southwest wind and northwest wind; the wind speed set is a set of ratios of the maximum wind speed in the target area to the number of intervals divided by the wind speed.

3. The method for dividing the leakage risk area of ​​a natural gas station according to claim 1 is characterized in that: The leakage pore size set includes small pores, medium pores, large pores and fractures.

4. The method for dividing the leakage risk area of ​​a natural gas station according to claim 1 is characterized in that: Step S2 uses K-means clustering analysis method.

5. The method for dividing the leakage risk area of ​​a natural gas station according to claim 1 is characterized in that: Step S2 specifically includes the following steps: Step S21: normalizing the element values ​​in the natural gas station complete leakage scenario and calculating the variation weighted coefficient; Step S22: grouping the complete leakage scene sets, and determining the central scene of each group of complete leakage scene sets, and dividing the complete leakage scenes into a cluster central set and other leakage scene sets; Step S23: Calculate the Euclidean distance from each scene in the remaining leakage scene set to the corresponding cluster center scene, and establish a Euclidean distance matrix; Step S24: Based on step S23, a fixed Euclidean distance matrix is ​​constructed. After traversing all the remaining leakage scenarios, the average number of elements in each cluster set is recalculated to determine a new central scene, and a new complete leakage scenario is constructed to be divided into a cluster center set and a new set of remaining leakage scenarios; Step S25: Calculate the square error after the leakage scene is clustered E , compare before and after clustering E value: If the square error after clustering E Changes greater than W , W If it is the error range, then use the new cluster center set and the new remaining leakage scene set to return to steps S23-S25 for recalculation; If the square error after clustering E Change is less than or equal to W , the clustering is completed and the process goes to step S26; Step S26: multiply the Euclidean distance between each leakage scene in each cluster and the center of the cluster by the inverse of its leakage scene probability, select the scene with the smallest value as the representative scene, and extract the representative scene in each cluster to form a leakage scene set after clustering reduction; Step S27: Increase the number of groups in the full leakage scenario set, repeat steps S22-S26, and obtain the square error of different numbers of clusters in the cluster analysis E , based on the number of clusters k' is the horizontal axis, square error E A curve is drawn for the ordinate, and the inflection point of the curve is taken as the optimal number of clusters. The corresponding reduction scenario is the natural gas station clustering reduction leakage scenario, and the corresponding reduction scenario probability is the clustering reduction leakage scenario probability.

6. The method for dividing the leakage risk area of ​​a natural gas station according to claim 5 is characterized in that: In step S21, the normalization process is performed using a Z-score normalization method.

7. The method for dividing the leakage risk area of ​​a natural gas station according to claim 5 is characterized in that: In step S21, the element values ​​include a wind direction set, a wind speed set, a leakage position set, and a leakage aperture set.

8. The method for dividing the leakage risk area of ​​a natural gas station according to claim 5 is characterized in that: The specific process of step S22 is: Initialize the complete leakage scene set into k Group, randomly selected from the complete leakage scenario k The scenes are taken as the center points of the initial clustering, recorded as the cluster center set Center , the number of elements is k , the remaining scenarios are recorded as the remaining leakage scenario set Rest , the number of elements is N .

9. The method for dividing the leakage risk area of ​​a natural gas station according to claim 8 is characterized in that: The specific process of step S24 is: Compare the elements of each row in the Euclidean distance matrix and extract the minimum element of each row j,i , the remaining leak scenarios j Classified as cluster center scene i The cluster to which it belongs; After traversing all the remaining leakage scenarios, the complete leakage scenarios are initially clustered into k In the cluster sets, the wind direction, wind speed, leakage position and leakage aperture average value of the scene in each cluster set are recalculated as the new cluster center set Center' , the number of elements is k , the remaining scenes are recorded as the new set of remaining leakage scenes Rest' , the number of elements is N .

10. The method for dividing the leakage risk area of ​​a natural gas station according to claim 1 is characterized in that: Step S4 specifically includes the following sub-steps: S41: Divide the natural gas station layout into p × q Grid, calculate the gas concentration distribution of the leakage scene after cluster reduction based on computational fluid dynamics, and extract the natural gas concentration data in the corresponding grid; S42: normalizing the probability distribution after scene reduction to obtain a normalized scene probability; S43: Calculating a comprehensive concentration distribution of natural gas leakage considering scenario analysis according to the natural gas concentration and the normalized scenario probability; S44: Determine the safety status of each area according to the comprehensive concentration distribution of the natural gas leakage.

11. The method for dividing the leakage risk area of ​​a natural gas station according to claim 10 is characterized in that: Step S44 is specifically as follows: When the natural gas concentration in the area weighted by the probability of leakage scenario is less than the lower explosion limit, the area is a safe area; When the natural gas concentration in the area with weighted leakage scenario probability is between the upper and lower explosion limits, the area is a flammable and explosive area; When the natural gas concentration in an area weighted by the probability of leakage scenario is greater than the upper explosion limit, the area is a dangerous area.

12. A clustering reduction leakage scenario constructed based on the natural gas station leakage hazard area division method described in any one of claims 1-11.

13. A storage medium, characterized in that: Instructions for executing the method for dividing the leakage hazard area of ​​a natural gas station as described in any one of claims 1-11 are stored.

14. A device for dividing leakage risk areas of natural gas stations, characterized in that: include: processor; a storage medium storing executable instructions of the processor; Wherein, the processor is configured to execute the steps of the method for dividing leakage hazard areas of a natural gas station as described in any one of claims 1-11 by executing the executable instructions.

Citation Information

Patent Citations

  • Gas pipeline leakage detection method, device and equipment and storage medium

    CN113944888A

  • Energy storage planning-oriented typical composite scene reduction method and system

    CN114021977A