A simulation method and system for predicting the diffusion range of toluene gas leakage
By constructing a physical model based on the Reynolds-averaged Navier-Stokes equations and the standard κ-ε turbulence model, and combining an 8-layer fully connected residual network and an ensemble Kalman filter model, the problems of low accuracy and poor real-time performance in toluene leakage and diffusion prediction are solved. This enables high-precision concentration field generation and dynamic risk assessment, supporting scientific emergency response.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-15
- Publication Date
- 2026-07-24
AI Technical Summary
Existing technologies for predicting toluene leakage and diffusion have low accuracy and poor real-time performance, making it difficult to integrate multi-source observation data and failing to effectively reflect the dynamic changes in human exposure risk.
A physical model based on the Reynolds-averaged Navier-Stokes equations and the standard κ-ε turbulence model was constructed. An 8-layer fully connected residual network and an ensemble Kalman filter model were combined, and sensor observation data were fused through data assimilation technology to generate a high-precision concentration field. The Probit toxicology model was then used to transform the concentration field into a real-time dynamic risk field.
It achieves high-precision, real-time prediction of the spread range of toluene leaks, can dynamically assess human exposure risks, and provide scientific emergency response recommendations.
Smart Images

Figure CN122452369A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of gas leakage diffusion simulation technology, specifically to a method and system for predicting and simulating the diffusion range of toluene gas leakage. Background Technology
[0002] Toluene, a widely used organic solvent in chemical production, is flammable, toxic, and volatile. Its leakage and diffusion accidents frequently threaten industrial safety and human health. Accurately predicting the diffusion range of toluene leaks and converting the concentration field into human exposure risk is a crucial prerequisite for developing emergency response measures. In existing technologies, traditional computational fluid dynamics methods simulate leakage and diffusion processes by solving the Navier-Stokes equations and component transport equations. However, this method is computationally time-consuming and cannot meet the needs of real-time dynamic prediction. Meanwhile, purely data-driven machine learning models, such as convolutional neural networks or recurrent neural networks, while capable of quickly predicting concentration distributions, heavily rely on large amounts of high-quality training data and lack physical constraints. This leads to a sharp drop in prediction accuracy under sparse data or uncovered operating conditions, and even predictions that violate physical laws. On the other hand, while field-deployed gas sensors can provide local real-time concentration observations, the observation data is sparse, making it difficult to directly obtain the precise state of the global concentration field. Existing methods often use spatial interpolation or simplified diffusion models to generate the concentration field, failing to effectively integrate multi-source heterogeneous data to improve prediction accuracy. Furthermore, traditional risk field construction methods typically map concentration thresholds directly to risk levels without considering the nonlinear relationship between human exposure time and toxicological response, thus failing to dynamically reflect risk changes during actual evolution. Summary of the Invention
[0003] The purpose of this invention is to overcome the problems of low accuracy, poor real-time performance, and difficulty in integrating multi-source observation data in the existing technology for predicting toluene leakage and diffusion. It provides a prediction and simulation method and system that can efficiently utilize physical prior knowledge and real-time sensor observation data, and simultaneously achieve dynamic correction of the concentration field and dynamic assessment of human exposure risk.
[0004] The objective of this invention can be achieved through the following technical solutions:
[0005] A method and system for predicting and simulating the diffusion range of toluene gas leakage is disclosed. The method includes the following steps: constructing a physical model of toluene leakage based on the Reynolds-averaged Navier-Stokes equations and the standard κ-ε turbulence model; and generating high-fidelity true data containing concentration field and flow field details by solving the mass conservation equation, momentum conservation equation, energy conservation equation, and toluene component transport equation of the mixed gas. As one technical solution of this invention, the mass conservation equation of the mixed gas is expressed as:
[0006] ;
[0007] In the formula: The density of the gas mixture; For time; Let velocity be the velocity vector. The momentum conservation equation is expressed as:
[0008] ;
[0009] In the formula: Static pressure; The effective viscosity is the sum of the laminar viscosity and the turbulent viscosity. It is the vector of gravitational acceleration; This is the momentum source term. The energy conservation equation is expressed as:
[0010] ;
[0011] In the formula: The static enthalpy of the fluid; The Prandtl number for turbulence; This is the energy source term. The transport equation for the toluene component is expressed as:
[0012] ;
[0013] In the formula: This represents the mass fraction of toluene. The laminar diffusion coefficient; Turbulent viscosity; For turbulent Schmidt number; This represents the leakage source term. Through numerical solutions to the aforementioned physical model, high-precision, high-resolution concentration and flow field data can be obtained, serving as the baseline ground truth for subsequent neural network training, thereby ensuring the physical consistency of the prediction model.
[0014] A physical information neural network model with an 8-layer fully connected residual network is constructed. Time coordinates, 3D spatial coordinates, wind speed, and wind direction are used as input features, and toluene mass concentration is used as the output. By minimizing a composite loss function weighted by data fitting loss, physical equation residual loss, and boundary condition loss, the nonlinear mapping relationship of the high-fidelity ground truth data is learned, and an initial predicted concentration field is output. Preferably, in the 8-layer fully connected residual network, let the first... Layer input is The traditional fully connected layer is transformed into The output in the residual block is corrected to In the formula: Here is the Swish self-gated activation function, whose mathematical expression is: ,in For the Sigmoid function, These are learnable smoothing parameters. The input layer of the network receives a 5-dimensional feature vector, including time coordinates. Three-dimensional spatial coordinates Wind speed and wind direction The output layer has a single output node, which outputs the predicted toluene mass concentration value at the corresponding spatiotemporal point. By introducing residual connections and the Swish activation function, this network can effectively alleviate the gradient vanishing problem in deep networks, improve the ability to learn complex flow characteristics, and at the same time preserve the constraint information of the physical equations.
[0015] As a technical solution of the present invention, the composite loss function Represented as:
[0016] ;
[0017] In the formula: All network weights and bias parameters; The weighting coefficient for the data fitting loss is preferably 0.4; For data fitting loss; This is the weighting coefficient for the residual loss of the physical equations, preferably 0.5; This represents the residual loss in the physical equations. This is the weighting coefficient for the boundary condition loss, and its preferred value is 0.1; This is the boundary condition loss. The data fitting loss is... Represented as:
[0018] ;
[0019] In the formula: This represents the number of training samples; For the physical information neural network model at sampling points Predicted toluene mass concentration at the location; This refers to the toluene mass concentration value in the high-fidelity true data corresponding to the sampling point. The boundary condition loss... Represented as:
[0020] ;
[0021] In the formula: This represents the number of boundary sampling points; For physical information neural network models at boundary points Predicted velocity vector value at the location; The normal vector of the wall; The spatial gradient of the concentration prediction. Further, the residual loss of the physical equation... Including component transport equation residuals and momentum equation residuals , represented as:
[0022] ;
[0023] In the formula: To calculate the number of configuration points for random sampling within the domain; For the configuration point The residuals of the component transport equations at the location; For the momentum equation or pressure equation at the placement point The residuals at the point. The residuals of the component transport equations. Represented as:
[0024] ;
[0025] In the formula: The mass concentration of toluene predicted by the physical information neural network model; , , They are respectively , , Predicted values of velocity components in the direction; The effective diffusion coefficient; The concentration source term is defined by this weighted composite loss function design. This allows the network to fit high-fidelity data while strictly satisfying the governing equations and boundary conditions, effectively improving the physical plausibility of the prediction results in sparse observation regions.
[0026] A data assimilation model based on ensemble Kalman filtering is constructed. The initial predicted concentration field is used as the state vector, and sensor observation data is fused. The optimal state estimate is obtained through ensemble initialization, a prediction step, and an analysis step, generating a corrected concentration field. As a technical solution of this invention, in the data assimilation model based on ensemble Kalman filtering, time is defined. System state vector ,in To calculate the total number of discrete grid points within the domain, the state vector contains the toluene concentration values for all spatial points. The state evolution equation is expressed as:
[0027] ;
[0028] In the formula: For prediction operators in physical information neural network models; For the previous moment The state vector; For the previous moment Meteorological parameters input; For process noise, Let be the process noise covariance matrix. The observation equation is expressed as:
[0029] ;
[0030] In the formula: For a moment The observation vector, The number of gas sensors deployed on-site; For observation operators, used to map a high-dimensional state space to a low-dimensional observation space; To observe the noise, To observe the noise covariance matrix.
[0031] Preferably, the specific steps for initializing the set are as follows: at the initial time... Initial prediction field based on physical information neural network model Generate by superimposing random perturbations containing The initial state set of each member The disturbance follows a pattern with a mean of 0 and a covariance matrix of . Normal distribution:
[0032] ;
[0033] In the formula: The size of the set is preferably 50; For the physical information neural network model at the initial time Concentration prediction field; For the first Random perturbation vectors of each set member; The initial error covariance matrix is used to determine the verification error based on the physical information neural network model. The specific steps of the prediction step are: utilizing the state evolution operator of the physical information neural network model... By performing independent time integration on each member of the set, we obtain... Prior prediction set at time :
[0034] ;
[0035] In the formula: For the previous moment The Analyze the members of the prior set. Calculate the prior mean based on the prior set. Approximate values of the prior error covariance matrix:
[0036] ;
[0037] ;
[0038] In the formula: For the set perturbation matrix, It is an all-1 vector. The specific steps of the analysis step are: obtain Observational data at time Then, the set of observed perturbations is first generated. ,in Then the Kalman gain matrix is calculated. :
[0039] ;
[0040] In the formula: The observation matrix corresponds to the observation operator. The matrix form is used. Kalman gain is applied to update each prior set member to obtain the analysis set. :
[0041] ;
[0042] Analyze the mean of the set This is the optimal state estimate after assimilation:
[0043] ;
[0044] The optimal state estimate As the corrected concentration field output, data assimilation through ensemble Kalman filtering can integrate sparse, real-time sensor observation information into the prediction results of the physical information neural network model, effectively correcting prediction biases caused by changes in meteorological conditions and uncertainties in leakage source parameters, thereby improving the real-time accuracy and reliability of the concentration field.
[0045] Based on the corrected concentration field, the concentration value is transformed into a real-time dynamic risk field reflecting the risk of human exposure through a dynamic risk field mapping function and the Probit toxicology model. As a technical solution of this invention, the specific steps for transforming the concentration value into a real-time dynamic risk field reflecting the risk of human exposure are as follows: First, based on the difference between the analysis set and the prior set, the assimilation increment is calculated. The discrete assimilation increment is extended into a continuous error correction field using the Kriging interpolation method. Then, the error correction field is superimposed onto the original prediction field of the physical information neural network model to obtain the reconstructed concentration field:
[0046] ;
[0047] In the formula: The reconstructed toluene concentration field; The concentration field is predicted by the physical information neural network model. Finally, it is based on the dynamic risk field mapping function. The reconstructed concentration field is transformed into a real-time risk field:
[0048] ;
[0049] In the formula: This provides a real-time risk field. By introducing the Probit toxicology model, the concentration-exposure time relationship can be transformed into a probabilistic health risk indicator, providing emergency responders with intuitive evacuation area delineation and protection recommendations.
[0050] This invention also provides a simulation system for predicting the diffusion range of toluene gas leaks. The system includes: a physical model construction module for generating high-fidelity true data based on the Reynolds-averaged Navier-Stokes equations and the standard κ-ε turbulence model; a physical information neural network module for constructing an 8-layer fully connected residual network and outputting an initial predicted concentration field; a data assimilation module for generating a corrected concentration field based on ensemble Kalman filtering and fusion of sensor observation data; and a risk field generation module for generating a real-time dynamic risk field based on a dynamic risk field mapping function and a Probit toxicology model. These modules work collaboratively to achieve end-to-end prediction from leak source parameter input to risk assessment output, significantly improving the accuracy and real-time performance of toluene leak diffusion range prediction under complex environments.
[0051] The beneficial effects of this invention are:
[0052] A physical information neural network model with an 8-layer fully connected residual network is constructed, using time coordinates, 3D spatial coordinates, wind speed, and wind direction as input features, and toluene mass concentration as output. By minimizing a composite loss function weighted by data fitting loss, physical equation residual loss, and boundary condition loss, the model learns the nonlinear mapping relationship of high-fidelity ground truth data. By directly embedding physical constraints such as the Navier-Stokes equations and component transport equations into the loss function during network training, this model maintains adherence to physical laws even with only sparse training data, significantly improving the reliability of extrapolation predictions compared to traditional pure data-driven models. The physical equation residual loss forces the network output to satisfy fundamental physical laws such as mass and momentum conservation, while the boundary condition loss ensures that the prediction results satisfy no-slip and no-flux constraints in regions such as walls, thus generating concentration distributions consistent with hydrodynamic mechanisms even in unobserved regions. An 8-layer fully connected residual network structure addresses the gradient degradation problem in deep network training by introducing skip connections. Combined with the adaptive smoothing properties of the Swish self-gated activation function, it can more efficiently capture steep gradients and nonlinear features in the concentration field. The generation speed of the initial predicted concentration field is several orders of magnitude faster than traditional CFD simulations, meeting the requirements for rapid response in emergency scenarios. A data assimilation model based on ensemble Kalman filtering is constructed, using the initial predicted concentration field as the state vector. Sensor observation data is fused, and the optimal state estimate is obtained through ensemble initialization, prediction step, and analysis step, generating a corrected concentration field. This model uses a physical information neural network model as the state evolution operator to perform time integration on the ensemble members, fusing prior physical predictions with real-time sparse observation data within a statistical framework. The confidence level of the concentration at each spatial point is adaptively adjusted through the Kalman gain matrix, thus simultaneously utilizing the global predictive power of the physical model and the local realism of sensor observations. Ensemble Kalman filtering approximates the error covariance through an ensemble perturbation matrix, avoiding the computational bottleneck of explicit storage and inversion of the covariance matrix in high-dimensional state spaces, as required by traditional Kalman filtering. This makes data assimilation on large-scale discrete grid points possible. The optimal state estimate obtained after the analysis step significantly improves the accuracy compared to pure physical predictions and can capture the concentration evolution trend in areas not directly covered by sensors. The corrected concentration field effectively eliminates system biases caused by model parameter uncertainties and boundary condition errors. Based on the corrected concentration field, the concentration values are transformed into a real-time dynamic risk field through a dynamic risk field mapping function and a Probit toxicology model. This risk field reflects the cumulative impact of exposure time on human health and is more physiologically relevant than simple concentration threshold grading methods, providing a more scientific basis for emergency evacuation and regional control decisions. Attached Figure Description
[0053] The invention will now be further described with reference to the accompanying drawings.
[0054] Figure 1 This is a flowchart illustrating the working steps of the toluene gas leakage diffusion range prediction and simulation method described in this invention. Detailed Implementation
[0055] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0056] See appendix Figure 1 This invention provides a method for predicting and simulating the diffusion range of toluene gas leakage, comprising the following steps: Constructing a physical model of toluene leakage based on the Reynolds-averaged Navier-Stokes equations and the standard κ-ε turbulence model; generating high-fidelity true data containing concentration field and flow field details by solving the mass conservation equations, momentum conservation equations, energy conservation equations, and toluene component transport equations of the mixed gas; constructing a physical information neural network model with an 8-layer fully connected residual network, using time coordinates, three-dimensional spatial coordinates, wind speed, and wind direction as input features, and toluene mass concentration as output; learning the nonlinear mapping relationship of the high-fidelity true data by minimizing a composite loss function weighted by data fitting loss, physical equation residual loss, and boundary condition loss, and outputting an initial predicted concentration field; constructing a data assimilation model based on ensemble Kalman filtering, using the initial predicted concentration field as a state vector, fusing sensor observation data, and obtaining the optimal state estimate through ensemble initialization, prediction step, and analysis step, generating a corrected concentration field; and transforming the concentration value into a real-time dynamic risk field reflecting human exposure risk through a dynamic risk field mapping function and a Probit toxicology model.
[0057] Example 1
[0058] In the simulation method for predicting the diffusion range of toluene gas leakage, a physical model of toluene leakage based on the Reynolds-averaged Navier-Stokes equations and the standard κ-ε turbulence model is constructed. By solving the mass conservation equation, momentum conservation equation, energy conservation equation and toluene component transport equation of the mixed gas, high-fidelity true data containing details of the concentration field and flow field are generated.
[0059] The mass conservation equation for the gas mixture is expressed as:
[0060] ;
[0061] In the formula: The density of the gas mixture is expressed in kilograms per cubic meter. Time, in seconds; It is a velocity vector, measured in meters per second, and contains components in three spatial directions. , , ; This represents the divergence operator.
[0062] The momentum conservation equation is expressed as:
[0063] ;
[0064] In the formula: This refers to static pressure, measured in Pascals. The effective viscosity is expressed in Pascals per second and is equal to the sum of the laminar viscosity and the turbulent viscosity. This is the gravitational acceleration vector, measured in meters per second squared, and directed vertically downwards. This is the momentum source term, measured in Newtons per cubic meter, used to represent the additional momentum generated by leaks, jets, etc. For the velocity gradient tensor; It is the transpose of the velocity gradient tensor.
[0065] The energy conservation equation is expressed as:
[0066] ;
[0067] In the formula: Enthalpy of a fluid is expressed in joules per kilogram. The Prandtl number for turbulence is dimensionless and has a value of 0.85. This is an energy source term, measured in watts per cubic meter, used to represent the heat generated due to leakage or chemical reactions; This is the static enthalpy gradient.
[0068] The toluene component transport equation is expressed as:
[0069] ;
[0070] In the formula: This represents the mass fraction of toluene, dimensionless, and its value ranges from 0 to 1. , is the laminar diffusion coefficient, measured in square meters per second, representing the molecular diffusion capacity of toluene in air; is the turbulent viscosity, in Pascal-seconds, calculated using the standard κ-ε turbulence model; The turbulent Schmidt number is dimensionless and has a value of 0.7. For leakage source terms, the unit is kilograms per cubic meter per second, used to describe the mass injection rate of toluene at the leakage point; This represents the toluene mass fraction gradient.
[0071] The above four equations together constitute the governing equations of the physical model of toluene leakage. High-fidelity true data is generated through numerical solutions (such as the finite volume method). This data includes the toluene concentration, velocity component, pressure, and temperature values at each spatial grid point in the computational domain at different times.
[0072] Example 2
[0073] Construct a physical information neural network model using an 8-layer fully connected residual network. In the 8-layer fully connected residual network, let the... Layer input is ,in This represents the index of the network layer, with values ranging from 1 to 8. The traditional fully connected layer transformation is represented as... In the formula: For the first The weight matrix of the layer, the dimension of which is determined based on the number of input features and the number of output features; For the first The bias vector of the layer has the same dimension as the number of output features; This is a Swish self-gated activation function. The output in the residual block is corrected to... In the formula: For the first Layer weight matrix; For the first Layer bias vector; For the first The layer's input is directly added to via a skip connection. On the output. The mathematical expression of the Swish self-gated activation function is: ,in For input values, For the Sigmoid function, For learnable smoothing parameters, The initial value is set to 1.0 and is updated during training via backpropagation.
[0074] The network's input layer receives a 5-dimensional feature vector, including time coordinates. Three-dimensional spatial coordinates Wind speed and wind direction .in The unit is seconds. The unit is meters. The unit is meters per second. The unit is degrees. The output layer is a single output node, outputting the predicted toluene mass concentration value for the corresponding spatiotemporal point. The unit is consistent with the concentration unit in the high-fidelity true value data, which is kilograms per cubic meter.
[0075] The specific structure of the aforementioned 8-layer fully connected residual network is as follows: Eight fully connected layers are sequentially connected after the input layer. Layers 2 through 8 are organized in a residual block manner, meaning each pair of layers forms a residual block. Specifically, layer 1 is a fully connected transformation from the input layer to layer 2, and the output of layer 2 and the input of layer 1 form the first residual block; layer 3 is a fully connected transformation from the output of layer 2 to layer 4, and the output of layer 4 and the input of layer 3 form the second residual block; and so on, with layer 7 being a fully connected transformation from the output of layer 6 to layer 8, and the output of layer 8 and the input of layer 7 forming the fourth residual block. Each fully connected layer has 128 neurons. All fully connected layers use the Swish self-gated activation function, except for the last output layer, which does not use an activation function.
[0076] During training, spatiotemporal sampling points are randomly selected from high-fidelity ground truth data, with each sampling point corresponding to a set of input feature vectors. and the corresponding actual toluene mass concentration value The input feature vector is fed into an 8-layer fully connected residual network to obtain the predicted value. The loss is calculated using a composite loss function, and the Adam optimizer iteratively updates all weights and biases in the network, as well as the learnable smoothing parameters in the Swish activation function. The learning rate was set to 0.001, the number of training iterations was 100,000, and the batch size was set to 256. After training, the trained network parameters were fixed for subsequent predictions.
[0077] Example 3
[0078] In constructing the physical information neural network model, the composite loss function, which is a weighted sum of data fitting loss, physical equation residual loss, and boundary condition loss, is minimized. To train the network. Composite loss function. Represented as:
[0079] ;
[0080] In the formula: All network weights and bias parameters; This is the weighting coefficient for the data fitting loss, with a value of 0.4; For data fitting loss; This is the weighting factor for the residual loss of the physical equations, with a value of 0.5; This represents the residual loss in the physical equations. This is the weighting coefficient for the boundary condition loss, with a value of 0.1; This represents the boundary condition loss. The values of the weighting coefficients mentioned above are determined through a grid search, and the combination that minimizes the total loss is selected on the validation set.
[0081] Data fitting loss Represented as:
[0082] ;
[0083] In the formula: This represents the number of training samples; For the physical information neural network model at sampling points The predicted mass concentration of toluene at the location, of which Representing three-dimensional spatial coordinates ; This represents the toluene mass concentration value in the high-fidelity true data for the corresponding sampling point. The value should be the same as the size of the training dataset, set to 100000.
[0084] Boundary condition loss Represented as:
[0085] ;
[0086] In the formula: Set the number of boundary sampling points to 5000; For physical information neural network models at boundary points The velocity vector prediction at that location contains three components. , , ; This is the wall normal vector, pointing outside the computational domain; The spatial gradient of the concentration prediction values, i.e. .
[0087] Physical equation residual loss Including component transport equation residuals and momentum equation residuals , represented as:
[0088] ;
[0089] In the formula: The number of configuration points for random sampling within the calculation domain is set to 50000; For the configuration point The residuals of the component transport equations at the location; For the momentum equation or pressure equation at the placement point The residuals at the location, among which Take respectively , , , This corresponds to three momentum direction equations and pressure equations (transformed through the continuity equation). Placement point. Random and uniform sampling is performed within the computational domain, without relying on high-fidelity ground truth data labels.
[0090] Component transport equation residuals Represented as:
[0091] ;
[0092] In the formula: The mass concentration of toluene predicted by the physical information neural network model; , , These are the predictions of the physical information neural network model. , , The velocity component in the direction; The effective diffusion coefficient is obtained by... The calculation yielded, where The laminar diffusion coefficient is... The turbulent viscosity is the output of the standard κ-ε turbulence model. The density of the mixed gas, For turbulent Schmidt number; The spatial divergence of the effective diffusion term; This is the concentration source term, determined by the location of the leak source and the leak rate. It is set to a non-zero value in the grid region where the leak point is located, and zero in the rest of the region. , The equal partial derivatives are directly calculated by the physical information neural network model using automatic differentiation techniques.
[0093] Example 4
[0094] Construct a data assimilation model based on ensemble Kalman filtering. In this model, time points are defined. System state vector ,in To calculate the total number of discrete grid points within the domain, the state vector contains the toluene concentration values for all spatial points. The state evolution equation is expressed as:
[0095] ;
[0096] In the formula: This is a prediction operator for a physical information neural network model. The operator receives the state vector and meteorological parameters from the previous time step and outputs the predicted state at the current time step. For the previous moment The state vector; For the previous moment Meteorological parameters to be input, including wind speed and wind direction; For process noise, The process noise covariance matrix is... Set as a diagonal matrix, with each diagonal element representing 10% of the variance of the prediction error of the neural network model for the corresponding grid point. The variance of the prediction error is calculated using the validation set. The observation equation is expressed as:
[0097] ;
[0098] In the formula: For a moment The observation vector, The number of gas sensors deployed on-site; This is an observation operator used to map a high-dimensional state space to a low-dimensional observation space. Specifically, it is implemented by extracting the concentration values of the grid points in the space where the sensor is located from the state vector. To observe the noise, To observe the noise covariance matrix, Set as a diagonal matrix, with the diagonal elements being the variance of the sensor measurement error, which is determined by the sensor's factory calibration accuracy.
[0099] The specific steps for set initialization are as follows: at the initial moment Initial prediction field based on physical information neural network model Generate by superimposing random perturbations containing The initial state set of each member The disturbance follows a pattern with a mean of 0 and a covariance matrix of . Normal distribution:
[0100] ;
[0101] In the formula: The size of the set is 50. For the physical information neural network model at the initial time Concentration prediction field; For the first Random perturbation vectors of each set member; The initial error covariance matrix is determined based on the physical information neural network model, specifically by calculating the covariance matrix of the prediction errors of all grid points on the validation set.
[0102] The specific steps of the prediction step are as follows: using the state evolution operator of the physical information neural network model. By performing independent time integration on each member of the set, we obtain... Prior prediction set at time :
[0103] ;
[0104] In the formula: For the previous moment The Analyze the members of the prior set. Calculate the prior mean based on the prior set. Approximate values of the prior error covariance matrix:
[0105] ;
[0106] ;
[0107] In the formula: Let be the set perturbation matrix, where For dimension A matrix, where each column represents a priori set member; For elements all equal to 1 3D column vector; Represents scalar multiplication; for The transpose of .
[0108] The specific steps of the analysis step are as follows: obtain Observational data at time Then, the set of observed perturbations is first generated. ,in Then the Kalman gain matrix is calculated. :
[0109] ;
[0110] In the formula: The observation matrix corresponds to the observation operator. In matrix form, The number of rows is The number of columns is In each row, the element corresponding to the grid point where the sensor is located is 1, and the other elements are 0; for The transpose of the matrix is used. The Kalman gain is applied to update each prior set member to obtain the analysis set. :
[0111] ;
[0112] Analyze the mean of the set This is the optimal state estimate after assimilation:
[0113] ;
[0114] The optimal state estimate As the corrected concentration field output.
[0115] Example 5
[0116] Based on the corrected concentration field, the concentration values are transformed into a real-time dynamic risk field reflecting human exposure risk through a dynamic risk field mapping function and the Probit toxicology model. The specific steps for transforming the concentration values into a real-time dynamic risk field reflecting human exposure risk are as follows: First, based on the difference between the analysis set and the prior set, the assimilation increment is calculated. ,in For a moment The analysis set mean (optimal state estimate). For a moment The prior set mean, For dimension The column vector represents the concentration correction at each discrete grid point. Kriging interpolation is used to extend the discrete assimilation increment into a continuous error correction field. The Kriging interpolation method, based on spatial correlation, uses the assimilation increment values at known grid points to calculate the error correction value for unknown spatial locations (continuous coordinates) through a variogram model, thus forming an error correction value for any spatial location within the entire computational domain. All have defined error correction fields Then, the error correction field is superimposed onto the original prediction field of the physical information neural network model to obtain the reconstructed concentration field:
[0117] ;
[0118] In the formula: The reconstructed toluene concentration field is expressed in kilograms per cubic meter. The concentration field predicted by the physical information neural network model is expressed in kilograms per cubic meter. This is the error correction field, expressed in kilograms per cubic meter. Finally, it is based on the dynamic risk field mapping function. The reconstructed concentration field is transformed into a real-time risk field:
[0119] ;
[0120] In the formula: This represents a real-time risk field with one dimension, indicating the probability of human exposure risk, ranging from 0 to 1. The dynamic risk field mapping function... The mathematical expression for this is the Probit toxicology model, specifically in the form of:
[0121] ;
[0122] In the formula: The cumulative distribution function of the standard normal distribution; The natural logarithm of the reconstructed concentration values (unit: milligrams per cubic meter); and These are the position and scale parameters in the Probit model, determined based on toluene toxicology data. The value is 5.2. The value is 1.4, and the above value is derived from the experimental data fitting results of the acute exposure dose-response relationship of toluene.
[0123] The foregoing has provided a detailed description of one embodiment of the present invention, but this description is merely a preferred embodiment and should not be construed as limiting the scope of the invention. All equivalent variations and modifications made within the scope of the claims of this invention should still fall within the patent coverage of this invention.
Claims
1. A method for predicting and simulating the diffusion range of toluene gas leakage, characterized in that, Includes the following steps: A physical model of toluene leakage based on the Reynolds-averaged Navier-Stokes equations and the standard κ-ε turbulence model was constructed. By solving the mass conservation equation, momentum conservation equation, energy conservation equation and toluene component transport equation of the mixed gas, high-fidelity true data containing details of the concentration field and flow field were generated. A physical information neural network model with an 8-layer fully connected residual network is constructed. The time coordinate, three-dimensional spatial coordinate, wind speed and wind direction are used as input features, and toluene mass concentration is used as output. By minimizing the composite loss function composed of data fitting loss, physical equation residual loss and boundary condition loss weighted together, the nonlinear mapping relationship of the high-fidelity true value data is learned, and the initial predicted concentration field is output. A data assimilation model based on ensemble Kalman filtering is constructed. The initial predicted concentration field is used as the state vector. Sensor observation data is fused, and the optimal state estimate is obtained through ensemble initialization, prediction step and analysis step to generate the corrected concentration field. Based on the modified concentration field, the concentration value is transformed into a real-time dynamic risk field reflecting the human exposure risk through a dynamic risk field mapping function and a Probit toxicology model.
2. The method for predicting and simulating the diffusion range of toluene gas leakage according to claim 1, characterized in that, The mass conservation equation for the mixed gas is expressed as: ; In the formula: The density of the gas mixture; For time; It is a velocity vector; The momentum conservation equation is expressed as: ; In the formula: Static pressure; The effective viscosity is the sum of the laminar viscosity and the turbulent viscosity. It is the vector of gravitational acceleration; For momentum source term; The energy conservation equation is expressed as: ; In the formula: The static enthalpy of the fluid; The Prandtl number for turbulence; For energy source terms; The toluene component transport equation is expressed as follows: ; In the formula: This represents the mass fraction of toluene. The laminar diffusion coefficient; Turbulent viscosity; For turbulent Schmidt number; This is a source of leakage.
3. The method for predicting and simulating the diffusion range of toluene gas leakage according to claim 1, characterized in that, In the aforementioned 8-layer fully connected residual network, let the first layer be... Layer input is The traditional fully connected layer is transformed into The output in the residual block is corrected to ; In the formula: Here is the Swish self-gated activation function, whose mathematical expression is: ,in For the Sigmoid function, These are learnable smoothing parameters; The input layer of the network receives a 5-dimensional feature vector, including time coordinates. Three-dimensional spatial coordinates Wind speed and wind direction The output layer has a single output node, which outputs the predicted toluene mass concentration value at the corresponding spatiotemporal point. .
4. The method for predicting and simulating the diffusion range of toluene gas leakage according to claim 1, characterized in that, The composite loss function Represented as: ; In the formula: All network weights and bias parameters; These are the weighting coefficients for the data fitting loss; The value is 0.4; For data fitting loss; These are the weighting coefficients for the residual loss of the physical equations; The value is 0.5; This represents the residual loss in the physical equations. These are the weighting coefficients for the boundary condition loss; The value is 0.1; For boundary condition loss; The data fitting loss Represented as: ; In the formula: This represents the number of training samples; For the physical information neural network model at sampling points Predicted toluene mass concentration at the location; This refers to the toluene mass concentration value in the high-fidelity true data for the corresponding sampling point. The boundary condition loss Represented as: ; In the formula: This represents the number of boundary sampling points; For physical information neural network models at boundary points Predicted velocity vector value at the location; The normal vector of the wall; This represents the spatial gradient of the concentration prediction values.
5. The method for predicting and simulating the diffusion range of toluene gas leakage according to claim 4, characterized in that, The physical equation residual loss Including component transport equation residuals and momentum equation residuals , represented as: ; In the formula: To calculate the number of configuration points for random sampling within the domain; For the configuration point The residuals of the component transport equations at the location; The momentum equation or pressure equation at the placement point The residual at the location; The component transport equation residual Represented as: ; In the formula: The mass concentration of toluene predicted by the physical information neural network model; , , They are respectively , , Predicted values of velocity components in the direction; The effective diffusion coefficient; This is the concentration source term.
6. The method for predicting and simulating the diffusion range of toluene gas leakage according to claim 1, characterized in that, In the data assimilation model based on ensemble Kalman filtering, time is defined. System state vector ,in To calculate the total number of discrete grid points within the domain, the state vector contains the toluene concentration values for all spatial points; The state evolution equation is expressed as: ; In the formula: For prediction operators in physical information neural network models; For the previous moment The state vector; For the previous moment Meteorological parameters input; For process noise, The process noise covariance matrix; The observation equation is expressed as: ; In the formula: For a moment The observation vector, The number of gas sensors deployed on-site; For observation operators, used to map a high-dimensional state space to a low-dimensional observation space; To observe the noise, To observe the noise covariance matrix.
7. The method for predicting and simulating the diffusion range of toluene gas leakage according to claim 6, characterized in that, The specific steps for initializing the set are as follows: at the initial moment... Initial prediction field based on physical information neural network model Generate by superimposing random perturbations containing The initial state set of each member The disturbance follows a pattern with a mean of 0 and a covariance matrix of . Normal distribution: ; In the formula: The size of the set is 50. For the physical information neural network model at the initial time Concentration prediction field; For the first Random perturbation vectors of each set member; The initial error covariance matrix is used to determine the verification error based on the physical information neural network model.
8. The method for predicting and simulating the diffusion range of toluene gas leakage according to claim 7, characterized in that, The specific steps of the prediction step are as follows: utilizing the state evolution operator of the physical information neural network model. By performing independent time integration on each member of the set, we obtain... Prior prediction set at time : ; In the formula: For the previous moment The Each analysis set member; Calculate the prior mean based on the prior set. Approximate values of the prior error covariance matrix: ; ; In the formula: Let be the set perturbation matrix. It is a vector consisting entirely of 1s; The specific steps of the analysis step are as follows: Obtaining... Observational data at time Then, the set of observed perturbations is first generated. ,in ; Then the Kalman gain matrix is calculated. : ; In the formula: The observation matrix corresponds to the observation operator. Matrix form; The analysis set is obtained by updating each prior set member using Kalman gain. : ; Analyze the mean of the set This is the optimal state estimate after assimilation: ; The optimal state estimate As the output of the corrected concentration field.
9. The method for predicting and simulating the diffusion range of toluene gas leakage according to claim 1, characterized in that, The specific steps for converting the concentration value into a real-time dynamic risk field reflecting human exposure risk are as follows: The assimilation increment is calculated based on the difference between the analytical set and the prior set. The discrete assimilation increment is extended into a continuous error correction field using the Kriging interpolation method. ; The error correction field is superimposed on the original prediction field of the physical information neural network model to obtain the reconstructed concentration field: ; In the formula: The reconstructed toluene concentration field; Concentration field predicted by a physical information neural network model; Finally, based on the dynamic risk field mapping function The reconstructed concentration field is transformed into a real-time risk field: ; In the formula: This is a real-time risk field.