A cloud chemical leakage diffusion parallel computing method applied to simulation training
Patent Information
- Application Number
- CN202310613770.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-05-29
AI Technical Summary
目前在已有的化学泄漏应急救援训练领域,尚没有基于云中心节点给多套模拟训练终端提供既快速又准确的气体扩散模拟计算的方法,因此对毒害性气体的扩散模拟进行准确且快速的计算,对于预防和应对突发灾害、掌握有毒气体扩散规律、进行事故模拟和应急救援训练等具有重要意义
[0024]与现有技术相比,本发明提供了一种应用于模拟训练的云端化学泄漏扩散并行计算方法,具备以下有益效果:
Smart Images

Figure CN117034790B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of chemical leakage diffusion simulation calculation technology in the field of simulation training, specifically to a cloud-based method for providing parallel calculation of chemical leakage diffusion to multiple simulation training terminals. Background Technology
[0002] In recent years, my country's chemical industry has developed rapidly, leading to a sharp increase in leaks of hazardous chemicals during production, storage, and transportation. These leaks have caused significant harm to the lives and property of the nation and its people, as well as to the ecological environment. After a toxic chemical leak, the toxins diffuse into the air, onto the ground, and onto objects in various forms. The toxic substances form clouds that spread outwards, especially downwind, causing widespread pollution and damage.
[0003] When toxic chemicals leak, they produce large amounts of toxic gases. On the one hand, these gases diffuse rapidly, requiring a central node computer or cloud platform to calculate the spatial and temporal distribution of the diffusion range and concentration within a short time. This is crucial for realistic chemical accident simulations and emergency response training. In other words, the diffusion calculation of toxic gases must be highly efficient, quickly obtaining the spatial diffusion range and concentration values. On the other hand, the diffusion of toxic gases is significantly influenced by external factors such as terrain, building obstruction, and atmospheric wind speed and direction. Even small changes in these external factors can lead to significant differences in the diffusion results, especially in densely built-up areas like residential areas, where the diffusion patterns differ from those in flat, open areas. Currently, in the field of chemical leak emergency response training, there is no method for providing both rapid and accurate gas diffusion simulation calculations to multiple simulation training terminals based on a cloud-based central node. Therefore, accurate and rapid calculation of toxic gas diffusion simulation is of great significance for preventing and responding to sudden disasters, understanding the diffusion patterns of toxic gases, conducting accident simulations, and carrying out emergency response training. Summary of the Invention
[0004] (a) Technical problems to be solved
[0005] To address the shortcomings of existing technologies, this invention provides a cloud-based parallel computing method for chemical leakage diffusion applied to simulation training. This method primarily aims to solve the problem that, currently in the field of chemical leakage emergency rescue training, there is no method that provides fast and accurate diffusion simulation calculations to multiple simulation training terminals based on a cloud central node.
[0006] (II) Technical Solution
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] A cloud-based parallel computation method for chemical leakage and diffusion applied to simulation training includes the following steps:
[0009] S1: Chemical accident leakage factor setting. Set corresponding parameters for the time, location, type of leaked toxic agent, leakage dose, leakage duration, leakage location, hazard concentration threshold, meteorological conditions, and information related to the accident involving trainees and training terminals. Set corresponding parameters for meteorological conditions and source strength information.
[0010] S2: Spatial partitioning of the computational domain. The location of the chemical leak and the surrounding diffusion area are spatially partitioned. When the building density is greater than or equal to 25%, the CFD (Computational Fluid Dynamics) accurate calculation model is used, and when the building density is less than 25%, the Gaussian fast calculation model is used.
[0011] S3: Parallel computational design of two diffusion models. In densely built-up areas, the CFD accurate calculation model is used to calculate the diffusion concentration of hazardous gases; in open and flat areas, the Gaussian diffusion fast model is used to calculate the diffusion concentration of hazardous gases.
[0012] S4: Spatial grid merging of calculation results. The results calculated by each parallel computing unit are spatially combined and merged to form a spatiotemporal hazardous gas concentration field at a certain location. In this process, the overlapping of adjacent regions generated by the spatial division of the computational domain is obtained by weighting the values of overlapping grids according to the proportion of spatial area. Spatial grid merging of the calculation results is performed, and the calculation grids below the hazardous concentration threshold are discarded. The overall calculation results are checked to see if they are reasonable and conform to the diffusion law.
[0013] S5: The simulator terminal obtains the calculation results based on the grid corresponding to the time and space information. The calculation results are then distributed to multiple simulator terminals carried by rescue officers and soldiers or other simulation terminals such as vehicles via zero-delay communication software such as DDS.
[0014] Furthermore, in step S2, the location of a chemical leak, such as a chemical plant or transport vehicle, and the surrounding area are spatially divided. The map data uses three types of data: vector maps, image maps, and topographic maps. Here, automatic remote sensing image recognition is used to identify built-up areas and open terrain areas on the remote sensing image base map. This can quickly identify densely built-up areas and open, flat terrain areas. After recognition, manual confirmation and correction are performed to verify the accuracy of the automatically identified areas.
[0015] Based on the aforementioned scheme, the building density in S2 refers to the building coverage rate, which is the ratio (%) of the total base area of buildings to the occupied land area within a certain range. It can reflect the open space ratio and building density within a certain land area.
[0016] As a further aspect of the present invention, the steps of the CFD accurate calculation model in S3 are as follows: Step 1: Mesh decomposition, decomposing the total computational region into multiple sub-computational regions. Mesh decomposition algorithms can generally be divided into overlapping domain decomposition and non-overlapping domain decomposition. For the finite volume method in CFD, non-overlapping domain decomposition is used. Step 2: Parallel preprocessing, including communication unit expansion and the generation of local and global data mappings. Specifically, the expansion of communication units is achieved by copying unit data at process boundaries. In addition, local process and global attribute mappings need to be established. Step 3: Matrix spatiotemporal assembly and solution, dividing the computational domain into sub-computational regions, and using different CPU cores to perform calculations on each sub-computational region. Different CPU cores operate on the same code, but they process different data (each processing its own data). After parallel computation, the data is reassembled. Step 4: Parallel I / O, employing distributed processing in CFD computation, where each process performs I / O operations in its own folder. After the parallel computation ends, global data is obtained by reconstructing the data and mesh.
[0017] Furthermore, the steps of the Gaussian diffusion fast model calculation in S3 are as follows: First, mesh decomposition: dividing the geographical location of the chemical plant hazardous material leak into the smallest unit of mesh; Second, GPU acceleration and GPU collaborative parallel computing framework: performing calculations on a grid-by-grid basis. Unlike CFD algorithm model parallel calculations, where there are iterative calls between grids, Gaussian algorithm model parallel calculations do not have a temporal relationship between grids, and the time order between grids is unordered. Therefore, the Gaussian algorithm model can fully utilize the high computing power of cloud platform GPUs for GPU calculation acceleration, calculating the gas diffusion concentration values of a large number of grids in a very short time; Third, Task threads execute the calculations: dividing each grid unit into a unit computing node, and each computing node generates a calculation task based on the Gaussian diffusion model. Each task is a thread, and the calculation tasks are dynamically distributed to the Task threads of multiple computing nodes for calculation. Multiple Executor processes are dynamically started on each computing node, and each Executor process then dynamically starts multiple Task threads. The computation results of each computation task are produced by the message queue producer and sent to the Topic partition of the message queue. This realizes a distributed parallel computing mode with multiple pipelines from computation, production to consumption. The smallest unit of computation results in the message queue are consumed in real time, and the smallest unit of computation results are statistically summarized. The fourth step is parallel I / O. In the Gaussian diffusion model computation, a distributed approach is adopted, that is, each process performs I / O operations in its own folder. After the parallel computation ends, the global data is obtained by manually reconstructing the data and grid.
[0018] Based on the aforementioned scheme, in S4, both the CFD precise diffusion calculation and the Gaussian fast diffusion calculation are performed in parallel using spatial grid partitioning. After the calculation is completed, the results calculated by each parallel computing unit can be spatially combined and merged to form a chemical hazardous gas diffusion concentration field composed of a five-dimensional array, where each three-dimensional grid contains a toxic gas diffusion concentration value at a different time.
[0019] As a further aspect of the present invention, the value of the overlapping grid in S4 is obtained by weighting the score according to the proportion of the spatial area, specifically including:
[0020] 1) Calculate the concentration values of each subdomain of the overlapping grid, which includes grids calculated using a CFD model and grids calculated using a Gaussian model. First, obtain the concentration values of the grids calculated using the CFD model and the grids calculated using the Gaussian model.
[0021] 2) Calculate the weights of contributing units and establish weighted relationships;
[0022] 3) For cases with nested overlap, repeat the above two sub-steps until the flow field converges.
[0023] (III) Beneficial Effects
[0024] Compared with existing technologies, this invention provides a cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training, which has the following beneficial effects:
[0025] 1. This invention employs a parallel computing framework based on multi-GPU collaborative computing. This framework can adaptively partition and allocate the GPU computing power required by each grid cell, and ensure the consistency of overlapping data at the partition boundary in each grid under the multi-GPU collaborative computing environment through a boundary data synchronization mechanism. This provides a high real-time solution for simulating hazardous gas concentration fields with high real-time requirements and large scale.
[0026] 2. This invention addresses the parallel computing design of precise CFD computation models by employing a matrix decomposition approach, encompassing both spatial and temporal decomposition dimensions. In spatial decomposition, the entire computational domain is divided into several smaller computational domains. The primary task of spatial decomposition is to maximize efficiency, ensuring that each processor receives the same workload. In temporal decomposition, the computational domains are ordered according to their iteration sequence, prioritizing the smaller computational domains within the spatial decomposition to enable ordered iteration among processors.
[0027] 3. This invention addresses the parallel computing design of a fast Gaussian diffusion model, employing a GPU-accelerated and GPU-cooperative parallel computing framework. Since the parallel computation between grids in the Gaussian diffusion model is time-disordered, the high computing power of cloud platform GPUs can be fully utilized for GPU computation acceleration. Simultaneously, based on the multi-GPU cooperative parallel computing framework, GPU computing power is adaptively partitioned and tasks are allocated. Furthermore, a boundary data synchronization mechanism ensures the consistency of overlapping data in each grid within the multi-GPU cooperative computing environment, thus providing a high real-time solution for large-scale hazardous gas concentration field simulations with high real-time requirements.
[0028] 4. This invention proposes a combined diffusion simulation calculation method. In densely built-up areas, a precise CFD calculation model is used, resulting in more accurate calculations. In open and flat areas, a Gaussian diffusion fast model is used, which is simple and fast, balancing the speed and accuracy of chemical leak diffusion simulation calculations. This allows multiple simulation training terminals to be trained in a dynamic and realistic chemical hazard environment, improving training effectiveness. Attached Figure Description
[0029] Figure 1 This is a schematic diagram of the process structure of a cloud-based parallel computing method for chemical leakage diffusion applied to simulation training, as proposed in this invention.
[0030] Figure 2 This is a schematic diagram of the Gaussian diffusion fast model calculation process in a cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training, as proposed in this invention.
[0031] Figure 3 This is a schematic diagram of the computational process structure of a CFD accurate calculation model in a cloud-based parallel computational method for chemical leakage and diffusion applied to simulation training, as proposed in this invention.
[0032] Figure 4 This is a schematic diagram of the computational domain spatial region construction method in a cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training, as proposed in this invention.
[0033] Figure 5 This is a schematic diagram of the computational domain spatial grid partitioning algorithm in a cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training, as proposed in this invention.
[0034] Figure 6 This is a schematic diagram of the calculation results of a fast calculation model in a cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training, as proposed in this invention.
[0035] Figure 7 This is a schematic diagram of a three-dimensional particle display generated based on the calculation results in a cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training, as proposed in this invention. Detailed Implementation
[0036] 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.
[0037] To address the need for both timeliness and accuracy in chemical accident emergency rescue simulation training, this invention employs a combination of rapid and precise calculations in its algorithm model. Specifically, in open, flat areas, a Gaussian diffusion model is used to calculate the concentration of hazardous gases. This model is suitable for uniform atmospheric conditions, open, flat areas, and point source diffusion patterns, offering advantages of simplicity and speed. In densely built-up areas, a CFD (Computational Fluid Dynamics) precise calculation model is used to calculate the concentration of hazardous gases. While the CFD precise calculation model is more computationally resource-intensive and less efficient, it provides more accurate results, making it highly suitable for simulating the diffusion of hazardous gases in densely built-up areas. This combination of rapid and precise calculations balances the requirements for both timeliness and accuracy. In terms of calculation methods, a parallel computing framework is introduced, with both the rapid and precise calculation models operating in parallel to improve computational efficiency. Accurate and rapid simulation calculations are performed through a cloud central node, and the results are pushed to multiple simulator terminals carried by rescue personnel to read and display the spatiotemporal distribution of diffusion concentrations and damage effects following a chemical leak.
[0038] This invention fully utilizes the storage capacity and computing power of cloud platforms, deploying or storing simulation training management software, various virtual environment resources, model solving and analysis software, etc. on the cloud platform. When calculating the diffusion range of toxic gases using accurate and fast calculation algorithm models, the computing power of the cloud platform is called to perform distributed parallel calculations on the divided grids. Finally, the calculated values of each grid are merged, and the calculation results are distributed to multiple simulator terminals carried by rescue officers and soldiers through zero-latency communication software such as DDS.
[0039] Example 1
[0040] Reference Figures 1-3 A cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training includes the following steps:
[0041] S1: Chemical accident leakage setting. Set corresponding parameters for the time, location, type of leaked toxic agent, leakage dosage, leakage duration, leakage location, hazard concentration threshold, meteorological conditions, and information related to the accident involving trainees and training terminals. Set corresponding parameters for meteorological conditions and source strength information.
[0042] S2: Spatial partitioning of the computational domain. The location of the chemical leak and the surrounding diffusion area are spatially partitioned. When the building density is greater than or equal to 25%, a precise CFD calculation model is used, and when the building density is less than 25%, a Gaussian fast calculation model is used. A combined diffusion simulation calculation method is proposed. In densely built areas, the precise CFD calculation model is used, and the calculation results are more accurate. In open and flat areas, the Gaussian fast diffusion model is used, which is simple and fast, and can balance the speed and accuracy of chemical leak diffusion simulation calculation.
[0043] S3: Parallel computation design of two diffusion models. In densely built-up areas, the CFD accurate calculation model is used to calculate the diffusion concentration of hazardous gases; in open and flat areas, the Gaussian diffusion fast model is used to calculate the diffusion concentration of hazardous gases. For the parallel computation design of the CFD accurate calculation model, a matrix decomposition method is adopted, which includes two dimensions: spatial decomposition and temporal decomposition. In spatial decomposition, the entire computational domain is divided into several smaller computational domains. The primary task of spatial decomposition is to maximize efficiency, ensuring that each processor receives the same workload. In temporal decomposition, the computational domains are ordered according to the order in which they are iterated, allowing each processor to iterate in an orderly manner. For the parallel computing design of the Gaussian diffusion fast model, a GPU acceleration and GPU collaborative parallel computing framework are adopted. Since the parallel computing between Gaussian diffusion model grids is temporally disordered, the high computing power of cloud platform GPUs can be fully utilized for GPU computing acceleration. At the same time, based on the multi-GPU collaborative parallel computing framework, GPU computing power is adaptively partitioned and task allocated, and the consistency of overlapping data of each grid in the multi-GPU collaborative computing environment is ensured through a boundary data synchronization mechanism. This provides a high real-time solution for the simulation of hazardous gas concentration fields with high real-time requirements and large scale.
[0044] S4: Spatial grid merging of calculation results. The results calculated by each parallel computing unit are spatially combined and merged to form a hazardous gas concentration field. In this process, the overlap between adjacent regions generated by the spatial division of the computational domain is taken by weighting the value of the overlapping grid according to the proportion of the spatial area. Spatial grid merging of the calculation results is performed, and the calculation grids below the hazardous concentration threshold are discarded. The overall calculation results are checked to see if they are reasonable and in line with the diffusion law.
[0045] When performing mesh merging, based on the positional information of the simulator and other components in the simulation environment, mesh interpolation and merging calculations are only performed on meshes that overlap in adjacent regions.
[0046] S5: The simulator terminal obtains the calculation results based on the grid corresponding to the time and space information. The calculation results are then distributed to multiple simulator terminals carried by each rescue officer and soldier via zero-delay communication software such as DDS.
[0047] In particular, in S2 of this invention, the location of a chemical leak, such as a chemical plant or transport vehicle, and the surrounding diffusion area are spatially divided. The map data uses three types of data: vector map, image map, and topographic map. Here, the automatic identification method of remote sensing image is used to identify the building areas and open terrain areas on the remote sensing image base map. It can quickly identify densely built areas and open and flat terrain areas. After identification, it is manually confirmed and corrected to ensure that the automatically identified areas are accurate. After calculation and spatial division, it can be determined which spatial geometric areas use the CFD accurate calculation model to calculate the gas diffusion concentration and which spatial geometric areas use the Gaussian fast calculation model to calculate the gas diffusion concentration.
[0048] In S2, building density refers to the building coverage ratio, which is the ratio (%) of the total area of building footprints to the total land area occupied within a certain range. It can reflect the open space ratio and building density within a certain land area.
[0049] The steps for calculating the exact CFD calculation model in S3 are as follows:
[0050] S301: Mesh decomposition, which divides the total computational domain into multiple sub-computational domains. Mesh decomposition algorithms can generally be divided into overlapping domain decomposition and non-overlapping domain decomposition. For the finite volume method in CFD, non-overlapping domain decomposition is used.
[0051] S302: Parallel preprocessing, including the expansion of communication units and the generation of local and global data mappings. The expansion of specific communication units is achieved by copying unit data at the process boundary. In addition, local process and global attribute mappings need to be established.
[0052] S303: Matrix spatiotemporal assembly and solution. The computational domain is divided into sub-computational domains, and different CPU cores are used to compute on each sub-computational domain. Different CPU cores execute the same code, but they process different data (each processes its own data). After parallel computation, the data is reassembled. In this embodiment of the invention, the parallel computing design of the CFD algorithm model adopts a matrix spatiotemporal decomposition method. In spatial decomposition, the entire computational domain is decomposed into several smaller computational domains. The primary task of spatial decomposition is to maximize efficiency, ensuring that each processor receives the same workload. In temporal decomposition, the computational domains are ordered according to the order in which they are iterated, allowing for ordered iteration between each processor. For example, a computational domain after a chemical leak is spatially decomposed into 9 sub-computational domains, numbered 1-9. The parallel approach is as follows: the matrix coefficients are simultaneously decomposed into 9*9 block matrices, where the diagonal blocks of the matrix correspond to the matrix coefficients of the sub-computational domains, and the off-diagonal blocks contain the interaction relationships at the boundaries of the sub-computational domains.
[0053] S304: Parallel I / O. In CFD, it adopts a distributed approach, meaning each process performs I / O operations in its own folder. After the parallel computation ends, global data is obtained by manually reconstructing the data and grid.
[0054] The steps of the Gaussian diffusion fast model calculation in S3 are as follows: S311: Mesh decomposition, dividing the geographical location of the chemical plant hazardous material leak into the smallest unit mesh (assuming 5m*5m*5m); S312: GPU acceleration and GPU collaborative parallel computing framework, performing calculations on a grid-by-grid basis. Unlike the parallel calculation of CFD algorithm models, where there are iterative calls between grids, the Gaussian algorithm model does not have a time order relationship between grids during parallel calculations, and the time order between grids is unordered. Therefore, the Gaussian algorithm model can fully utilize the high computing power of cloud platform GPUs for GPU calculation acceleration, calculating the gas diffusion concentration values of a large number of grids in a very short time; S313: Task threads execute calculations, dividing each grid cell into a unit computing node, and each computing node generates a value based on the Gaussian diffusion model. The computation is divided into tasks, each task being a thread. The computation tasks are dynamically distributed across multiple computation nodes. Multiple Executor processes are dynamically started on each computation node, and each Executor process in turn dynamically starts multiple Task threads. The computation results of each task are produced into the Topic partition of the message queue as a message queue producer. This realizes a distributed parallel computing mode with multiple pipelines from computation, production to consumption. The smallest unit of computation results in the message queue are consumed in real time, and the smallest unit of computation results are statistically summarized. S304: Parallel I / O. In the Gaussian diffusion model computation, a distributed approach is adopted, that is, each process performs I / O operations in its own folder. After the parallel computation ends, the global data is obtained by manually reconstructing the data and grid.
[0055] The spatial grid merging of the calculation results in step S4 is achieved by using spatial grid partitioning for parallel computation in both CFD precise diffusion calculation and Gaussian fast diffusion calculation. After the calculation is completed, the results calculated by each parallel computing minimum unit can be spatially combined and merged to form a toxic gas diffusion concentration value at different times in each three-dimensional grid.
[0056] The values of overlapping grids in S4 are obtained by weighting the scores according to the proportion of their spatial area: the specific process is as follows:
[0057] (1) Calculate the concentration values of each subdomain of the overlapping grid. For example, the overlapping grids of grid C include grid A (the grid calculated using the CFD model) and grid B (the grid calculated using the Gaussian model). First, we need to obtain the concentration values of grid A and grid B respectively.
[0058] (2) Calculate the weight of the contributing unit and establish the weighting relationship. For example, the volume of grid C is 8m³. 3 Grid A occupies an area of 6m². 3 The concentration value in grid A is 0.05 mg / m³.3 Grid B occupies an area of 5m². 3 The concentration value in grid B is 0.045 mg / m³. 3 Therefore, the concentration value of grid C = (6 ÷ 8 × 0.5 + 5 ÷ 8 × 0.45) × 8 ÷ 11 = 0.477 mg / m³ 3 ;
[0059] (3) For cases with nested overlap, the above two steps need to be repeated until the flow field converges.
[0060] The harm of toxic gases to the human body is within a certain range. When the concentration is below a certain value, the harm to the human body and the environment can be ignored. Therefore, during the calculation process, calculation results below a certain concentration value can be discarded when merging calculation results to reduce the pressure on data storage and diffusion rendering on the map. For example, for most toxic gases, when the concentration value is 0.001 mg / m^3, the harm is negligible. Therefore, when merging calculation results, calculation grids with concentrations below this value are discarded and not included in the map display.
[0061] Example 2
[0062] The following are specific application scenario examples:
[0063] Chemical Leakage Simulation Training: Simulates the leakage of hazardous materials in a chemical plant, simulating the hazardous environment of the leakage and spread of hazardous chemicals in two-dimensional maps, three-dimensional scenes, and detailed scenes.
[0064] The chemical accident leak was set as follows: spatial information of the leak point (longitude (116.458232), latitude (38.481474), altitude (2.0)); leaked chemical (hydrogen cyanide); leak rate 100 g / s; leak duration (600 s); algorithm model (continuous point source); conventional parameters (season (spring), weather (sunny), time period (morning)); meteorological parameters (wind speed (1.5 m / s), wind direction (northwest), total cloud cover (20), low cloud cover (10)).
[0065] The computational domain space is divided into:
[0066] Using the spatial information of the leak point (longitude (116.458232), latitude (38.481474)) as the diffusion center point A, and based on the given wind direction, point B is determined as the calculation leeward edge endpoint, located 10 kilometers downwind from point A. Lines EF and CD are then defined perpendicularly to lines A and B at 90-degree angles, with a length of 10 kilometers for both lines. Points C, D, C, and F are connected to form the computational spatial domain, and a spatial grid is created based on computational intervals. (The text repeats itself here.) Figure 4 , Figure 5 .
[0067] The parallel computation results of the two diffusion models are as follows: Figure 6 .
[0068] Spatial grid merging of calculation results, such as Figure 7 .
[0069] The simulator terminal retrieves the calculation results. Each grid point has specific concentration information, and the average concentration level of the toxic agent at a specific location can be determined by summing the concentration values of the toxic agent at adjacent sampling points.
[0070] In the description herein, it should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
Claims
1. A cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training, characterized in that, Includes the following steps: S1: Chemical accident leakage factor setting, setting corresponding parameters for chemical accident leakage; S2: Spatial partitioning of the computational domain. The location of the chemical leak and the surrounding diffusion area are spatially partitioned. When the building density is greater than or equal to 25%, the CFD accurate calculation model is used, and when the building density is less than 25%, the Gaussian fast calculation model is used. S3: Parallel computational design of two diffusion models. In densely built-up areas, the CFD accurate calculation model is used to calculate the diffusion concentration of hazardous gases. In open and flat areas, the concentration values of hazardous gases are calculated using a Gaussian diffusion fast model. S4: Spatial grid merging of calculation results. The results calculated by each parallel computing unit are spatially combined and merged to form a spatiotemporal hazardous gas concentration field. In this process, the overlapping between adjacent regions generated by the spatial division of the computational domain is obtained by weighting the overlapping grid values according to the proportion of spatial area. Spatial grid merging of calculation results is performed, and calculation grids below the hazardous concentration threshold are discarded. The overall calculation results are checked to see if they are reasonable and conform to the diffusion law. S5: The simulator terminal obtains the calculation results based on the grid corresponding to the time and space information; The calculation results are distributed to each simulator terminal via zero-delay communication software.
2. The cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training according to claim 1, characterized in that, In step S2, the location of the chemical leak and the surrounding area are spatially divided. The map data uses three types of data: vector map, image map, and topographic map. The automatic identification method of remote sensing image is used to identify the building areas and open terrain areas on the remote sensing image base map. After identification, it is manually confirmed and corrected to confirm the accuracy of the automatically identified area.
3. The cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training according to claim 1, characterized in that, The steps for calculating the CFD accurate calculation model in S3 are as follows: S301: Mesh decomposition, which decomposes the total computational domain into multiple sub-computational domains; mesh decomposition algorithms are divided into overlapping domain decomposition and non-overlapping domain decomposition, and non-overlapping domain decomposition is used for the finite volume method in CFD. S302: Parallel preprocessing, including the expansion of communication units and the generation of local and global data mappings. The expansion of specific communication units is achieved by copying unit data at the process boundary. In addition, local process and global attribute mappings need to be established. S303: Matrix spatiotemporal assembly and solution, which divides the computational domain into sub-computational domains and uses different CPU cores to compute the sub-computational domains. Different CPU cores operate on the same code, but process different data. The data is then reassembled after parallel computation. S304: Parallel I / O. In CFD, it adopts a distributed approach, meaning each process performs I / O operations in its own folder. After completion, the global data is obtained by manually recompiling the parallel computation and constructing the data grid.
4. The cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training according to claim 1, characterized in that, The steps for calculating the Gaussian diffusion fast model in S3 are as follows: S401: Mesh decomposition, dividing the geographical location of the leak site into the smallest unit of mesh; S402: A GPU-accelerated and GPU-co-located parallel computing framework that performs computations on a grid-based basis. During parallel computation of the Gaussian algorithm model, there is no temporal order between grids; the computation time between grids is unordered. The Gaussian diffusion fast model leverages the high computing power of cloud platform GPUs for GPU acceleration, calculating gas diffusion concentration values for a large number of grids. S403: Task threads perform computations. Each grid cell is divided into a unit computation node. Each computation node generates computation tasks based on a Gaussian diffusion model. Each task is a thread. Computation tasks are dynamically distributed across multiple task threads on multiple computation nodes. Multiple Executor processes are dynamically started on each computation node, and each Executor process dynamically starts multiple task threads. The computation results of each task are produced by the message queue producer and sent to the Topic partition of the message queue. This realizes a distributed parallel computing mode with multiple pipelines from computation, production to consumption. It consumes the smallest unit computation results in the message queue in real time and summarizes the smallest unit computation results. S404: Parallel I / O. In Gaussian diffusion model calculations, a distributed approach is used, meaning each process performs I / O operations in its own folder. After parallel computation ends, global data is obtained by manually reconstructing the data and grid.
5. The cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training according to claim 1, characterized in that, In S4, both CFD precise diffusion calculation and Gaussian fast diffusion calculation are performed in parallel by spatial grid partitioning. After the calculation is completed, the results calculated by each parallel computing unit are spatially combined and merged to form a chemical hazardous gas diffusion concentration field composed of a five-dimensional array in each three-dimensional grid, where each grid contains a toxic gas diffusion concentration value at a different time.
6. The cloud-based parallel computing method for chemical leakage and diffusion applied to simulation training according to claim 1, characterized in that, The values of the overlapping grids in S4 are obtained by weighting the scores according to the proportion of their spatial area, specifically including: 1) Calculate the concentration values of each subdomain of the overlapping grid, which includes grids calculated using a CFD model and grids calculated using a Gaussian model. First, obtain the concentration values of the grids calculated using the CFD model and the grids calculated using the Gaussian model. 2) Calculate the weights of contributing units and establish weighted relationships; 3) For cases with nested overlap, repeat the above two sub-steps until the flow field converges.
Citation Information
Patent Citations
Real terrain modeling and toxic gas diffusion simulation method
CN111783364A
Helicopter flow field numerical simulation optimization method and system
CN112632874A