Method for dynamically determining an explosion safety distance based on a deep learning model
By dynamically determining the explosion safety distance using a deep learning model, the problem of low accuracy and limited applicability of safety distance prediction in existing technologies is solved. This enables real-time and accurate safety distance calculation in complex industrial scenarios, improving the efficiency of safety early warning and decision-making.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHONGQING UNIVERSITY OF SCIENCE AND TECHNOLOGY
- Filing Date
- 2025-05-28
- Publication Date
- 2026-05-08
AI Technical Summary
In existing technologies, the determination of safe distances for explosion events relies on empirical formulas or static simulations, which cannot adapt to complex working conditions and real-time changing environmental conditions, resulting in low accuracy of safe distance prediction and a limited scope of application.
A deep learning model-based approach was adopted, using an engineering simulation platform and CFD software to simulate different explosion scenarios, acquire multiple sets of data to train the deep learning model, collect environmental data in real time, and use the deep learning model to predict the overpressure threshold, the total energy released by the explosion, and the radius of the danger zone, thereby dynamically determining the safe distance.
It enables real-time and accurate acquisition of safe distances in complex industrial scenarios, adapts to different explosion scenarios, improves safety early warning and decision-making efficiency, reduces accident risks, and is applicable to high-risk industrial scenarios such as chemical plants, oil tank areas, and gas stations.
Smart Images

Figure CN120597760B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of risk assessment technology, and more specifically to a method for dynamically determining the safe distance for explosions based on a deep learning model. Background Technology
[0002] In industrial production, explosions pose significant risks to equipment, personnel, and the environment. Current methods for determining safe distances in explosion scenarios often rely on empirical formulas, static simulations, or single data sources. However, relying solely on empirical formulas or static simulations ignores complex operating conditions and real-time environmental changes in actual situations, leading to low accuracy in the final safe distance predictions. Furthermore, relying on a single data source, such as chemical diffusion paths, is only applicable to chemical industrial parks, limiting its applicability. Summary of the Invention
[0003] In order to overcome the shortcomings of the existing technology, the purpose of this invention is to provide a method for dynamically determining the explosion safety distance based on a deep learning model, which can be applied to different explosion scenarios and can accurately obtain the safety distance in the explosion scenario in real time, thereby assisting the staff to make accurate safety response decisions.
[0004] The technical solution adopted in this invention is as follows: a method for dynamically determining the explosion safety distance based on a deep learning model, comprising the following steps:
[0005] S1: Create different explosion scenario models through an engineering simulation platform, and numerically simulate the explosion process under different scenarios using CFD software to obtain multiple sets of data. Each set of data includes spatial coordinates, time step, local pressure value, shock wave propagation speed, overpressure threshold at a specific location, total energy released by the explosion, and radius of the danger zone. These multiple sets of data are then used to construct a training dataset.
[0006] S2: Train a deep learning model using a training dataset. The deep learning model obtains the relationship between the input feature spatial coordinates, time step, local pressure value, shock wave propagation speed, and the overpressure threshold at a specific location of the output feature, the total energy released by the explosion, and the radius of the danger zone.
[0007] S3: Acquire real-time data on pressure, temperature, gas concentration, and flow rate in the environment at the corresponding time point through the data acquisition module;
[0008] S4: The corresponding explosion scene model is created by processing the real-time data of pressure, temperature, gas concentration, flow rate and geometric parameters of the exploded object in the collected environment through the engineering simulation platform. The explosion process of the corresponding explosion scene model is numerically simulated by CFD software to obtain spatial coordinates, time step, local pressure value and shock wave propagation speed.
[0009] S5: Input the obtained spatial coordinates, time step, local pressure value, and shock wave propagation speed into the trained deep learning model, and obtain the predicted overpressure threshold, total energy released by the explosion, and radius of danger zone at a specific location through the deep learning model;
[0010] S6: Calculate the explosion safety distance at the corresponding time point using the explosion safety distance calculation formula by taking the obtained overpressure threshold, total energy released by the explosion, and radius of the danger zone;
[0011] S7: Repeat S3-S6. The data acquisition module transmits the collected information to the engineering simulation platform at a preset frequency to dynamically determine the explosion safety distance in real time.
[0012] As a preferred embodiment of the present invention, S1 includes the following steps:
[0013] S11: In the engineering simulation platform, define solid boundaries, opening boundaries, and environmental boundaries. Set the initial pressure, temperature, gas concentration, and flow rate for the explosion area, define the geometric parameters of the explosion area, and create the corresponding explosion scene model.
[0014] S12: Mesh the explosion scene model using the Fluent Meshing tool in CFD software;
[0015] S13: Set up a turbulence model in the Fluent tool of the CFD software, and simulate the electric spark ignition process in the form of component transfer, as well as set the time step and calculation duration.
[0016] S14: Start the Fluent simulation program and perform a numerical simulation of the explosion process in this scenario;
[0017] S15: Obtain simulation results using the Fluent tool in CFD software, including pressure distribution cloud map, shock wave propagation path map, and shock wave diffusion time-pressure curve;
[0018] S16: Export pressure distribution cloud map and shock wave propagation path map. Extract the values of pressure distribution cloud map and shock wave propagation path map through image analysis and program reading functions. Obtain spatial coordinates based on the grid nodes of the explosion scene model. Obtain local pressure values based on pressure distribution cloud map and spatial coordinates. Obtain shock wave propagation velocity based on shock wave propagation path map. Obtain overpressure threshold, total energy released by explosion and radius of danger zone through CFD software result report.
[0019] S17: Repeat S11-S16 to create different explosion scenario models and obtain multiple sets of data. In each set of data, spatial coordinates, local pressure values, shock wave propagation speed, time step, overpressure threshold, total energy released by the explosion, and radius of danger range are used as labels. Multiple sets of data together constitute the training dataset.
[0020] In a preferred embodiment of the present invention, S2 includes the following steps:
[0021] S21: Input the training dataset into the deep learning model. The first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model automatically obtain the corresponding weights and biases through the training dataset. At the same time, the input features in the training dataset are input into the deep learning model in batches in single-set form. Feature extraction is performed through the first hidden layer, the second hidden layer, and the fully connected layer to obtain three feature tensors. Each feature tensor corresponds to a set of temporal or spatial features of the input data. Each feature tensor is a row and column matrix structure arranged according to the output features and feature dimensions.
[0022] S22: By processing individual features in the corresponding feature tensor through the softmax layer in the deep learning model, the probability of a single feature in the feature tensor relative to the sum of individual features in the feature tensor is calculated, and the single feature with the highest probability is selected as the predicted value.
[0023] S23: Calculate the degree of deviation between the predicted value and the output features in the training dataset using the mean squared error loss function, and optimize the weights and biases of the first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model;
[0024] S24: Repeat S21-S24 until the maximum number of iterations is reached, at which point training will automatically stop.
[0025] In a preferred embodiment of the present invention, S21 further includes the following steps:
[0026] S211: The deep learning model includes a first hidden layer, a second hidden layer, a fully connected layer, and a softmax layer. The first hidden layer includes 16 LSTM units, and the second hidden layer includes 32 LSTM units.
[0027] S212: Input the training dataset into the deep learning model. The first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model automatically obtain the corresponding weights and biases through the training dataset. At the same time, the input features in the training dataset are input into the deep learning model in batches in single-group form. Feature extraction is performed through the first hidden layer, the second hidden layer, and the fully connected layer to obtain three feature tensors. Each feature tensor corresponds to the temporal or spatial features of a batch of samples. Each feature tensor is a row and column matrix structure arranged according to the sample and feature dimensions.
[0028] In a preferred embodiment of the present invention, S5 further includes the following steps:
[0029] S51: The obtained spatial coordinates, time step, local pressure value, and shock wave propagation velocity are used as input features into the trained deep learning model, as shown in formula (1).
[0030] X t =[x,y,z,t,P,v] (1),
[0031] In formula (1), X t The input features are represented by x, y, and z, which are spatial coordinates, t, and P, respectively. P is the local pressure value, and v is the shock wave propagation speed.
[0032] S52: The feature tensors extracted from the input features by the first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model are shown in formulas (2), (3), (4), (5), (6), (7), (8), and (9).
[0033] f t =σ(W f ·[h t-1 ,X t ]+b f (2),
[0034] i t =σ(W i ·[h t-1 ,X t ]+b i (3),
[0035]
[0036] o t =σ(W o ·[h t-1 ,X t ]+b o (6),
[0037]
[0038] z = W fc ·h t ′+b fc (9),
[0039] In formulas (2), (3), (4), (5), (6), (7), (8), and (9), X t The input feature, h t h t′ represents the output of the first hidden layer, the output of the second hidden layer, z represents the output of the fully connected layer, and h represents the output of the second hidden layer. t-1 It is used as the hidden state of the first layer and is set as the zero vector, f t It is the Gate of Oblivion, i t It's an input gate. It is a candidate state, C t It is a cellular state, o t It's an output gate, W f W i W C W o W fc These are the weight matrices, b f b i b C b o b fc These are the biases;
[0040] S53: By processing individual features in the extracted feature tensor through the softmax layer in the deep learning model, the probability of each individual feature in the feature tensor relative to the sum of individual features in the feature tensor is calculated, and the individual feature with the highest probability is selected as the predicted value, as shown in formula (10).
[0041]
[0042] In formula (10), z j It is the j-th feature of the fully connected layer;
[0043] S54: Repeat S53, calculate the probability of each individual feature in the other two feature tensors relative to the sum of individual features in this feature tensor, and take the individual feature with the highest probability as the corresponding predicted value.
[0044] In a preferred embodiment of the present invention, S6 includes the following steps:
[0045] S61: The explosion safety distance at the corresponding time point is calculated using the obtained overpressure threshold, total energy released by the explosion, and radius of the danger zone, as shown in formula (11).
[0046]
[0047] In formula (11), d is the safe distance, R is the radius of the danger zone, E is the total energy released by the explosion, P is the overpressure threshold, k is a constant related to environmental conditions, and n is an exponent related to the explosion type.
[0048] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0049] 1) This invention simulates different explosion scenarios through an engineering simulation platform, obtains a large amount of data through CFD simulation, that is, acquires data under different explosion scenarios, and uses a large amount of data as a training dataset for deep learning models to learn. In the practical application stage, the deep learning model can accurately output the corresponding input features. That is, it can quickly predict the overpressure threshold, the total energy released by the explosion, and the radius of danger range under the current complex environment by using the trained deep learning model, avoiding the time-consuming CFD simulation, realizing real-time dynamic response, and can be applied to different explosion scenarios. That is, it can directly obtain the corresponding overpressure threshold, the total energy released by the explosion, and the radius of danger range based on the data obtained from different explosion scenarios, thereby dynamically obtaining the safe distance in real time.
[0050] 2) This invention can be widely used in high-risk industrial scenarios such as chemical plants, oil tank areas, gas stations, high-pressure gas transmission stations, power facilities, mining, and other hazardous operations. It effectively reduces accident risks. Through real-time collection of environmental data and deep learning models, it can quickly predict overpressure thresholds, total energy released by explosions, and radius of danger in explosion events, and dynamically optimize safe distances. This improves the accuracy and real-time performance of safe distance calculations, adapts to the dynamic changes in complex industrial scenarios, significantly improves the efficiency of safety early warning in explosion scenarios, enhances the safety assurance capabilities of industrial sites, and improves decision-making efficiency.
[0051] 3) Traditional explosion safety distance calculations often rely on static parameters (such as empirical formulas, fixed deceleration coefficients, etc.), while deep learning models can integrate multi-dimensional dynamic data (such as shock wave propagation speed, pressure changes, ambient temperature and humidity, etc.) in real time and automatically adjust the prediction results through nonlinear modeling. For example, this invention introduces a time series data processing module (LSTM structure) to capture the dynamic evolution of the explosion process. Through real-time data-driven and deep learning model prediction, high-precision dynamic simulation of the explosion hazard area is achieved.
[0052] 4) Dynamically Determining Explosion Safety Distance Based on Deep Learning Models: Compared with traditional chemical reaction kinetics methods for determining explosion safety distance, this invention can integrate multi-dimensional dynamic data (shock wave propagation velocity, pressure changes) in real time and capture the dynamic evolution of the explosion process through time-series models such as LSTM, thus adapting to complex scenarios. Simultaneously, the deep learning model overcomes the limitations of traditional methods that rely on static parameters and simplification assumptions by automatically extracting the spatiotemporal characteristics of shock wave propagation and performing nonlinear modeling, reducing errors in complex scenarios such as turbulence effects and obstacle reflections. Attached Figure Description
[0053] Figure 1 This is a flowchart of the method for dynamically determining the explosion safety distance based on a deep learning model according to the present invention;
[0054] Figure 2This is a diagram of the deep learning model structure in the method for dynamically determining the explosion safety distance based on a deep learning model in this invention;
[0055] Figure 3 This is a diagram of the LSTM unit structure in the method for dynamically determining the explosion safety distance based on a deep learning model in this invention;
[0056] Figure 4 This invention relates to the method for dynamically determining the explosion safety distance based on a deep learning model, which describes the geometric structure of the explosive object.
[0057] Figure 5 This is a mesh diagram of the explosion scene model in the method for dynamically determining the explosion safety distance based on a deep learning model in this invention;
[0058] Figure 6 This is a spatial coordinate diagram in the method for dynamically determining the explosion safety distance based on a deep learning model in this invention;
[0059] Figure 7 This is a geometric diagram of the explosive object when the method for dynamically determining the explosion safety distance based on a deep learning model of the present invention is applied to a natural gas pipeline leak and explosion scenario;
[0060] Figure 8 This is a pressure distribution cloud map when the method for dynamically determining the explosion safety distance based on a deep learning model of the present invention is applied to a natural gas pipeline leakage and explosion scenario;
[0061] Figure 9 This is a diagram showing the propagation path of the shock wave when the method for dynamically determining the explosion safety distance based on a deep learning model is applied to a natural gas pipeline leak and explosion scenario. Detailed Implementation
[0062] Typical embodiments embodying the features and advantages of the present invention will be specifically described in the following description. It should be understood that the present invention can have various variations in different embodiments without departing from the scope of the present invention, and the descriptions and illustrations herein are for illustrative purposes only and not intended to limit the present invention.
[0063] The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0064] Methods for dynamically determining explosion safety distances based on deep learning models, such as Figure 1 As shown, it includes the following steps:
[0065] S1: Create different explosion scenario models through an engineering simulation platform, and numerically simulate the explosion process under different scenarios using CFD software to obtain multiple sets of data. Each set of data includes spatial coordinates, time step, local pressure value, shock wave propagation speed, overpressure threshold at a specific location, total energy released by the explosion, and radius of the danger zone. These multiple sets of data are then used to construct a training dataset.
[0066] In this embodiment, the engineering simulation platform is ANSYS Workbench. The specific location refers to the location in the explosion scene that corresponds to the spatial coordinates of the key target area (such as key equipment, personnel activity area or boundary), and is used to evaluate the intensity of the explosion impact at that location.
[0067] Specifically, S1 includes the following steps:
[0068] S11: In the engineering simulation platform, define solid boundaries, opening boundaries, and environmental boundaries. Set initial pressure, temperature, gas concentration, and flow rate for the explosion zone, such as... Figure 4 As shown, the geometric parameters of the explosion area are defined, and a corresponding explosion scene model is created;
[0069] S12: Using the Fluent Meshing tool in CFD software, such as... Figure 5 As shown, the explosion scene model is divided into meshes;
[0070] S13: Set up a turbulence model in the Fluent tool of the CFD software, and simulate the electric spark ignition process in the form of component transfer, as well as set the time step and calculation duration.
[0071] S14: Start the Fluent simulation program in the CFD software and perform a numerical simulation of the explosion process in this scenario;
[0072] S15: Obtain simulation results using the Fluent tool in CFD software, including pressure distribution cloud map, shock wave propagation path map, and shock wave diffusion time-pressure curve;
[0073] S16: Export the pressure distribution cloud map and shock wave propagation path map. Extract the numerical values from the pressure distribution cloud map and shock wave propagation path map using the image analysis and program reading functions in the CFD software's post-processing module. Figure 7 As shown, spatial coordinates are obtained from the grid nodes of the explosion scene model, local pressure values are obtained from the pressure distribution cloud map and spatial coordinates, shock wave propagation speed is obtained from the shock wave propagation path map, and overpressure threshold, total energy released by the explosion and radius of danger zone are obtained from the CFD software result report;
[0074] S17: Repeat S11-S16 to create different explosion scenario models and obtain multiple sets of data. In each set of data, spatial coordinates, local pressure values, shock wave propagation speed, time step, overpressure threshold, total energy released by the explosion, and radius of danger range are used as labels. Multiple sets of data together constitute the training dataset.
[0075] In this embodiment, the solid boundary, opening boundary, and environmental boundary are actually edited according to the actual situation in practical applications.
[0076] S2: Train a deep learning model using a training dataset. The deep learning model obtains the relationship between the input feature spatial coordinates, time step, local pressure value, shock wave propagation speed, and the overpressure threshold at a specific location of the output feature, the total energy released by the explosion, and the radius of the danger zone.
[0077] Specifically, S2 includes the following steps:
[0078] S21: Input the training dataset into the deep learning model. The first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model automatically obtain the corresponding weights and biases through the training dataset. At the same time, the input features in the training dataset are input into the deep learning model in batches in single-set form. Feature extraction is performed through the first hidden layer, the second hidden layer, and the fully connected layer to obtain three feature tensors. Each feature tensor corresponds to a set of temporal or spatial features of the input data. Each feature tensor is a row and column matrix structure arranged according to the output features and feature dimensions.
[0079] Among them, such as Figure 2 , 3 As shown, S21 further includes the following steps:
[0080] S211: The deep learning model includes a first hidden layer, a second hidden layer, a fully connected layer, and a softmax layer. The first hidden layer includes 16 LSTM units, and the second hidden layer includes 32 LSTM units.
[0081] S212: Input the training dataset into the deep learning model. The first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model automatically obtain the corresponding weights and biases through the training dataset. At the same time, the input features in the training dataset are input into the deep learning model in batches in single-group form. Feature extraction is performed through the first hidden layer, the second hidden layer, and the fully connected layer to obtain three feature tensors. Each feature tensor corresponds to the temporal or spatial features of a batch of samples. Each feature tensor is a row and column matrix structure arranged according to the sample and feature dimensions.
[0082] S22: By processing individual features in the corresponding feature tensor through the softmax layer in the deep learning model, the probability of a single feature in the feature tensor relative to the sum of individual features in the feature tensor is calculated, and the single feature with the highest probability is selected as the predicted value.
[0083] S23: Calculate the degree of deviation between the predicted value and the output features in the training dataset using the mean squared error loss function, and optimize the weights and biases of the first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model;
[0084] S24: Repeat S21-S24 until the maximum number of iterations is reached, at which point training will automatically stop.
[0085] In this embodiment, the feature tensor, which is the population matrix, can also adopt an early termination strategy during the model training process. When there is no significant deviation between the predicted value calculated by the mean squared error loss function and the output feature in the training dataset, the training will automatically stop.
[0086] In this embodiment, inputting features into the deep learning model in batches in a single set means that each time the input features are input into the deep learning model, they are in units of a set of data, but multiple sets of data are continuously input into the deep learning model.
[0087] In this embodiment, a deep learning model is trained using samples (more than 1000 groups) extracted from CFD software operating condition simulation. The loss function is MSE, and the error of the final prediction value is controlled within ±10%, as shown in formula (12):
[0088]
[0089] In formula (12), n is the sample size, and y i It is the true value of the i-th sample (that is, the output feature in the training dataset). It is the model's prediction for the i-th sample.
[0090] S3: Acquire real-time data on pressure, temperature, gas concentration, and flow rate in the environment at the corresponding time point through the data acquisition module;
[0091] S4: The corresponding explosion scene model is created by processing the real-time data of pressure, temperature, gas concentration, flow rate and geometric parameters of the exploded object in the collected environment through the engineering simulation platform. The explosion process of the corresponding explosion scene model is numerically simulated by CFD software to obtain spatial coordinates, time step, local pressure value and shock wave propagation speed.
[0092] In this embodiment, the specific steps of S4 are referred to as S11-S15.
[0093] S5: Input the obtained spatial coordinates, time step, local pressure value, and shock wave propagation speed into the trained deep learning model, and obtain the predicted overpressure threshold, total energy released by the explosion, and radius of danger zone at a specific location through the deep learning model;
[0094] Specifically, S5 also includes the following steps:
[0095] S51: The obtained spatial coordinates, time step, local pressure value, and shock wave propagation velocity are used as input features into the trained deep learning model, as shown in formula (1).
[0096] X t =[x,y,z,t,P,v] (1),
[0097] In formula (1), X t The input features are represented by x, y, and z, which are spatial coordinates, t, and P, respectively. P is the local pressure value, and v is the shock wave propagation speed.
[0098] S52: The feature tensors extracted from the input features by the first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model are shown in formulas (2), (3), (4), (5), (6), (7), (8), and (9).
[0099] f t =σ(W f ·[h t-1 ,X t ]+b f (2),
[0100] i t =σ(W i ·[h t-1 ,X t ]+b i (3),
[0101]
[0102] o t =σ(W o ·[h t-1 ,X t ]+b o (6),
[0103]
[0104] z = W fc ·h t ′+b fc (9),
[0105] In formulas (2), (3), (4), (5), (6), (7), (8), and (9), X t The input feature, h t h t ′ represents the output of the first hidden layer, the output of the second hidden layer, z represents the output of the fully connected layer, and h represents the output of the second hidden layer. t-1 It is used as the hidden state of the first layer and is set as the zero vector, f t It is the Gate of Oblivion, i t It's an input gate. It is a candidate state, C t It is a cellular state, o t It's an output gate, W f W i W C W o W fc These are the weight matrices, b f b i b C b o b fc These are the biases;
[0106] S53: By processing individual features in the extracted feature tensor through the softmax layer in the deep learning model, the probability of each individual feature in the feature tensor relative to the sum of individual features in the feature tensor is calculated, and the individual feature with the highest probability is selected as the predicted value, as shown in formula (10).
[0107]
[0108] In formula (10), z j It is the j-th feature of the fully connected layer;
[0109] S54: Repeat S53, calculate the probability of each individual feature in the other two feature tensors relative to the sum of individual features in this feature tensor, and take the individual feature with the highest probability as the corresponding predicted value.
[0110] S6: Calculate the explosion safety distance at the corresponding time point using the explosion safety distance calculation formula by taking the obtained overpressure threshold, total energy released by the explosion, and radius of the danger zone;
[0111] S6 includes the following steps:
[0112] S61: The explosion safety distance at the corresponding time point is calculated using the obtained overpressure threshold, total energy released by the explosion, and radius of the danger zone, as shown in formula (11).
[0113]
[0114] In formula (11), d is the safe distance, R is the radius of the danger zone, E is the total energy released by the explosion, P is the overpressure threshold, k is a constant related to environmental conditions, and n is an exponent related to the explosion type.
[0115] In this embodiment, the specific value of k is selected according to the Chinese "Safety Regulations for Blasting" (GB 6722) and the American Petroleum Institute (API) standard, and n is usually taken as 2 to 3.
[0116] S7: Repeat S3-S6. The data acquisition module transmits the collected information to the engineering simulation platform at a preset frequency to dynamically determine the explosion safety distance in real time.
[0117] Because the steps for obtaining spatial coordinates, local pressure values, shock wave propagation paths and overpressure thresholds, total energy released by the explosion, and the radius of the danger zone differ in numerical simulation of explosion models in CFD software, obtaining the overpressure threshold, total energy released by the explosion, and the radius of the danger zone requires more post-processing steps and analysis.
[0118] Specifically, in CFD post-processing software (such as CFD-Post), the spatial coordinates of a point in the model can be obtained through the probe tool in the toolbar; local pressure values can be directly obtained through the processing tools in CFD; during the simulated explosion, the propagation of the shock wave in space can be seen intuitively through CFD software, and the shock wave diffusion velocity can be directly obtained; however, obtaining the overpressure threshold, the total energy released by the explosion, and the radius of the danger zone requires additional steps, including data extraction (setting monitoring points in the model and recording the pressure changes of these points during the simulation), data analysis (smoothing or filtering the data to eliminate the influence of numerical noise), energy calculation (integrating the internal energy, kinetic energy, and other energy terms in the flow field), and multiple analyses and adjustments of the simulation results before the CFD software's result report can be obtained.
[0119] In this embodiment, the specific values obtained by the data acquisition module are used to obtain the six required values through CFD software. Deep learning is then used to predict the overpressure threshold, total energy released by the explosion, and radius of the danger zone at the last three specific locations. In the practical application stage, the deep learning model can quickly obtain the predicted data and achieve real-time dynamic response. This eliminates the need for offline CFD software simulation every time the dynamic safety distance is obtained. Although offline CFD software simulation has high accuracy, it consumes a lot of computing resources and cannot output timely predictions in real time. The deep learning model can quickly obtain these three predicted values.
[0120] The following example, a natural gas pipeline leak and explosion, illustrates this point in detail:
[0121] S3: Deploy multiple sensor nodes at key locations along the natural gas pipeline to collect the following data:
[0122] Initial pressure P0 = 1050000 Pa;
[0123] Initial temperature T0 = 298 K;
[0124] The volume fraction of the fuel gas, CCH4, is 9.5% (i.e., the gas concentration).
[0125] Flow velocity V0 = 10 m / s;
[0126] S4: Using an engineering simulation platform, real-time data on pressure, temperature, gas concentration, and flow velocity in the collected environment, as well as the geometric parameters of the exploding object, are processed to create a corresponding explosion scenario model. The explosion scenario model is divided into unstructured networks. The EDC turbulent reaction model (an EDC model is a detailed chemical reaction model used to simulate turbulent combustion) in the CFD software is used to simulate spark ignition. A time step of 10ms is set, and the Fluent simulation program in the CFD software is started to numerically simulate the explosion process in this scenario. Pressure distribution cloud map and shock wave propagation path map are obtained. The image analysis and program reading functions of the post-processing module in the CFD software are used to extract the values from the pressure distribution cloud map and shock wave propagation path map.
[0127] The spatial coordinates (1.0, 0.5, 0) are obtained from the mesh nodes of the explosion scene model, such as... Figure 8 , 9 As shown, the local pressure value obtained from the pressure distribution cloud map and spatial coordinates is 4.715 × 10⁻⁶. 5 pa, the propagation velocity of the shock wave is obtained as 325m / s based on the shock wave propagation path diagram;
[0128] S5: Obtain the spatial coordinates (1.0, 0.5, 0), time step 10 ms, and local pressure value 4.715 × 10⁻⁶. 5 Pa and the shock wave propagation speed of 325 m / s are used as the input feature vector X. t =[x,y,z,t,P,v] In the deep learning model after training, the first hidden layer has 16 LSTM units, the second hidden layer has 32 LSTM units, the fully connected layer, and the softmax layer output features. Specifically, the overpressure threshold is 7000Pa, the total energy released by the explosion is 6.5×106J, and the radius of the danger zone is 24.1m.
[0129] S6: The explosion safety distance at the corresponding time point is calculated using the obtained overpressure threshold, total energy released by the explosion, and radius of the danger zone, as shown in formula (11).
[0130]
[0131] The predicted value for d is 28.5m.
[0132] The above embodiments are merely preferred embodiments of the present invention and should not be construed as limiting the scope of protection of the present invention. Any non-substantial changes and substitutions made by those skilled in the art based on the present invention shall fall within the scope of protection claimed by the present invention.
Claims
1. A method for dynamically determining the explosion safety distance based on a deep learning model, characterized in that: Includes the following steps: S1: Create different explosion scenario models through an engineering simulation platform, and numerically simulate the explosion process under different scenarios using CFD software to obtain multiple sets of data. Each set of data includes spatial coordinates, time step, local pressure value, shock wave propagation speed, overpressure threshold at a specific location, total energy released by the explosion, and radius of the danger zone. These multiple sets of data are then used to construct a training dataset. S2: Train a deep learning model using a training dataset. The deep learning model obtains the relationship between the input feature spatial coordinates, time step, local pressure value, shock wave propagation speed, and the overpressure threshold at a specific location of the output feature, the total energy released by the explosion, and the radius of the danger zone. S2 includes the following steps: S21: Input the training dataset into the deep learning model. The first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model automatically obtain the corresponding weights and biases through the training dataset. At the same time, the input features in the training dataset are input into the deep learning model in batches in single-set form. Feature extraction is performed through the first hidden layer, the second hidden layer, and the fully connected layer to obtain three feature tensors. Each feature tensor corresponds to a set of temporal or spatial features of the input data. Each feature tensor is a row and column matrix structure arranged according to the output features and feature dimensions. S22: The softmax layer in the deep learning model processes a single feature in the corresponding feature tensor, calculates the probability of a single feature in the feature tensor relative to the sum of the single features in the feature tensor, and selects the single feature with the highest probability as the predicted value. S23: Calculate the degree of deviation between the predicted value and the output features in the training dataset using the mean squared error loss function, and optimize the weights and biases of the first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model; S24: Repeat S21-S24 until the maximum number of iterations is reached, at which point training will automatically stop. S3: Acquire real-time data on pressure, temperature, gas concentration, and flow rate in the environment at the corresponding time point through the data acquisition module; S4: The corresponding explosion scene model is created by processing the real-time data of pressure, temperature, gas concentration, flow rate and geometric parameters of the exploded object in the collected environment through the engineering simulation platform. The explosion process of the corresponding explosion scene model is numerically simulated by CFD software to obtain spatial coordinates, time step, local pressure value and shock wave propagation speed. S5: Input the obtained spatial coordinates, time step, local pressure value, and shock wave propagation speed into the trained deep learning model, and obtain the predicted overpressure threshold, total energy released by the explosion, and radius of danger zone at a specific location through the deep learning model; S6: Calculate the explosion safety distance at the corresponding time point using the explosion safety distance calculation formula by taking the obtained overpressure threshold, total energy released by the explosion, and radius of the danger zone; S7: Repeat S3-S6. The data acquisition module transmits the collected information to the engineering simulation platform at a preset frequency to dynamically determine the explosion safety distance in real time.
2. The method for dynamically determining the explosion safety distance based on a deep learning model according to claim 1, characterized in that: S1 includes the following steps: S11: In the engineering simulation platform, define solid boundaries, opening boundaries, and environmental boundaries. Set the initial pressure, temperature, gas concentration, and flow rate for the explosion area, define the geometric parameters of the explosion area, and create the corresponding explosion scene model. S12: Mesh the explosion scene model using the Fluent Meshing tool in CFD software; S13: Set up a turbulence model in the Fluent tool of the CFD software, and simulate the electric spark ignition process in the form of component transfer, as well as set the time step and calculation duration. S14: Start the Fluent simulation program and perform a numerical simulation of the explosion process in this scenario; S15: Obtain simulation results, including pressure distribution cloud maps and shock wave propagation path maps, using the Fluent tool in CFD software; S16: Export pressure distribution cloud map and shock wave propagation path map. Extract the values of pressure distribution cloud map and shock wave propagation path map through image analysis and program reading functions. Obtain spatial coordinates based on the grid nodes of the explosion scene model. Obtain local pressure values based on pressure distribution cloud map and spatial coordinates. Obtain shock wave propagation velocity based on shock wave propagation path map. Obtain overpressure threshold, total energy released by explosion and radius of danger zone through CFD software result report. S17: Repeat S11-S16 to create different explosion scenario models and obtain multiple sets of data. In each set of data, spatial coordinates, local pressure values, shock wave propagation speed, time step, overpressure threshold, total energy released by the explosion, and radius of danger range are used as labels. Multiple sets of data together constitute the training dataset.
3. The method for dynamically determining the explosion safety distance based on a deep learning model according to claim 1, characterized in that: S21 also includes the following steps: S211: The deep learning model includes a first hidden layer, a second hidden layer, a fully connected layer, and a softmax layer. The first hidden layer includes 16 LSTM units, and the second hidden layer includes 32 LSTM units. S212: Input the training dataset into the deep learning model. The first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model automatically obtain the corresponding weights and biases through the training dataset. At the same time, the input features in the training dataset are input into the deep learning model in batches in single-group form. Feature extraction is performed through the first hidden layer, the second hidden layer, and the fully connected layer to obtain three feature tensors. Each feature tensor corresponds to the temporal or spatial features of a batch of samples. Each feature tensor is a row and column matrix structure arranged according to the sample and feature dimensions.
4. The method for dynamically determining the explosion safety distance based on a deep learning model according to claim 1, characterized in that: S5 also includes the following steps: S51: The obtained spatial coordinates, time step, local pressure value, and shock wave propagation velocity are used as input features into the trained deep learning model, as shown in formula (1). (1), In formula (1), Indicates input features, , , These are spatial coordinates. It is the time step. It is a local pressure value. It is the speed of shock wave propagation; S52: The feature tensors extracted from the input features by the first hidden layer, the second hidden layer, and the fully connected layer in the deep learning model are shown in formulas (2), (3), (4), (5), (6), (7), (8), and (9). (2), (3), (4), (5), (6), (7), (8), (9), In formulas (2), (3), (4), (5), (6), (7), (8), (9), These are input features. , These are the outputs of the first hidden layer and the second hidden layer, respectively. It is the output of the fully connected layer. It is used as the hidden state of the first layer and is set to the zero vector. It is the Gate of Oblivion. It's an input gate. It is a candidate state. It is a cellular state. It's an output gate. , , , , These are the weight matrices. , , , , These are the biases; S53: By processing individual features in the extracted feature tensor through the softmax layer in the deep learning model, the probability of each individual feature in the feature tensor relative to the sum of individual features in the feature tensor is calculated, and the single feature with the highest probability is selected as the predicted value, as shown in formula (10). (10), In formula (10), It is the fully connected layer. One feature; S54: Repeat S53, calculate the probability of each individual feature in the other two feature tensors relative to the sum of individual features in this feature tensor, and take the individual feature with the highest probability as the corresponding predicted value.
5. The method for dynamically determining the explosion safety distance based on a deep learning model according to claim 1, characterized in that: S6 includes the following steps: S61: The explosion safety distance at the corresponding time point is calculated using the obtained overpressure threshold, total energy released by the explosion, and radius of the danger zone, as shown in formula (11). (11), In formula (11), It is a safe distance. It is the radius of the danger zone. It is the total energy released by the explosion. It is the overpressure threshold. It is a constant related to environmental conditions. It is an index related to the type of explosion.
Citation Information
Patent Citations
Method and system for quickly predicting consequence of leakage accident of hydrogen refueling station
CN116306377A
Gas pipeline and subway safety distance optimization method based on numerical simulation
CN119558229A