A method for identifying a leading head in dynamic simulation of debris flow and a method for querying a neighborhood particle
By using a 3D-CNN classification model and an optimized data storage structure in the SPH model, the problem of identifying and distinguishing debris flow heads was solved, and more efficient numerical simulation of debris flows was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- CHENGDU UNIV OF INFORMATION TECH
- Filing Date
- 2026-01-12
- Publication Date
- 2026-04-24
AI Technical Summary
Existing SPH-type debris flow numerical models lack the ability to distinguish between the debris flow head and the rest of the flow. This results in the model system lacking real physical properties based on physical composition and motion characteristics, making it difficult to achieve effective debris flow head identification and numerical simulation.
A three-dimensional convolutional neural network (3D-CNN) classification model is adopted, which combines virtual rule 3D grids and grid-scale particle attribute statistical indicators to identify debris flow heads through training samples. Different data storage structures are used to process the head and non-head regions in the simulation domain to optimize the particle query method.
This method enables accurate identification and differentiation of debris flow leaders in the SPH model, optimizes computational efficiency, reduces global computational complexity, and improves the accuracy and efficiency of debris flow numerical simulation.
Smart Images

Figure CN121503341B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a method for identifying the flow head in debris flow dynamic simulation and a method for querying neighboring particles, particularly a method for identifying the flow head in debris flow dynamic simulation based on the SPH model, and a method for querying neighboring particles based on partitioning logic. It belongs to the fields of electronic digital data processing technology and computer-aided design geological disaster simulation technology. Background Technology
[0002] Debris flows consist of a solid phase composed of large particles and a liquid phase composed of water and a small amount of clay and sand, thus exhibiting solid-liquid two-phase properties. In a typical solid-liquid two-phase debris flow, large particles aggregate forward and undergo violent rolling and collisions, forming a high and steep head, commonly known as the "dragon head." The appearance of the dragon head is a unique property of debris flow movement. The destructive force of a debris flow primarily originates from the impact energy of the dragon head; therefore, the dynamic characteristics of the debris flow dragon head directly relate to important dynamic characteristics such as flow velocity and impact force, making it one of the important scientific issues in debris flow dynamics and a crucial technical issue in debris flow control engineering. This means that in the field of debris flow numerical simulation and modeling, distinguishing the dragon head from the rest of the debris flow in the numerical model system is important, and in some technical aspects, even critical.
[0003] Modeling debris flow motion using the Smoothed Particle Hydrodynamics (SPH) method is a relatively new and widely used numerical simulation technique for debris flows, applicable to the analysis and experimentation of various debris flow dynamics problems. The existing technology "Research on the Dynamic Response of Debris Flow Impacting an Opening Flexible Protective Net" (Zhang Xiaomei, Chengdu University of Technology, 2021) discloses a debris flow load model based on the SPH method, which numerically simulates a debris flow-opening flexible protective net system, analyzing the dynamic response law through indicators such as velocity attenuation rate, blocking rate, and rise height. While this method involves analyzing the impact time and velocity of the debris flow "head" during debris flow impact analysis, the term "head" is actually just a simple reference to the "moving front end" of the debris flow simulation domain. The existing technology "Dynamic Response and Protective Measures of Frame Structures under Debris Flow" (Zhao Hao, Southwest Jiaotong University, 2021) discloses a numerical model simulation method for debris flow based on the coupled theory of smoothed particle hydrodynamics-finite element method (SPH-FEM). It establishes a numerical model of debris flow load, solves the mesh distortion problem in debris flow simulation, and realizes the simulation of debris flow motion and scouring under large deformation and large displacement conditions. The method involves the impact time and velocity analysis of the debris flow "dragon head" and the motion description of the "dragon head particles," but the meaning of the term "dragon head" is the same as in the aforementioned existing technology.
[0004] Existing technologies have constructed different types of SPH (Self-Propelled Physics) models for debris flows, solving numerical simulation problems in different problem domains of debris flow motion. The analyses involve the description and measurement of the trajectory of the debris flow "head," but the term "head" used in these models only refers to the "moving tip" of the debris flow. Because the constructed SPH model system lacks specific local details for the head, the "head" in the model system and its presented analysis lacks concrete physical properties defined based on physical composition and motion characteristics. In short, existing technologies have not solved the problem of distinguishing the head from the rest of the debris flow in SPH-type debris flow numerical simulations. Summary of the Invention
[0005] The purpose of this invention is to address the shortcomings of existing technologies by providing a method for identifying the head of a debris flow in dynamic simulation, and a neighborhood particle combination search method based on the SPH model established on the division of debris flow head and non-head.
[0006] To achieve the above objectives, the present invention first provides the following method for identifying the dragon head in the dynamic simulation of debris flow.
[0007] A method for identifying the dragon head in dynamic simulation of debris flows.
[0008] Step S100: Train the dragon head recognition model
[0009] Using a debris flow SPH numerical simulation model with a realistic physical dynamic response mechanism as the material model, the raw data of the material model is output frame by frame. Each frame contains the properties of the global particles of the material model, thus obtaining the time series particle data of the material model. A virtual regular 3D mesh covering the SPH simulation domain is constructed on the simulation domain of the material model, and the particle space is divided into mesh units.
[0010] For any grid cell cell A Starting from each node, a three-dimensional enclosing space is defined along the x, y, and z axes outwards from the mesh element. This three-dimensional enclosing space is the mesh element. cell A Attribute analysis space, mesh cell cell A It forms its local aggregation space with its attribute analysis space;
[0011] For each frame of time-series particle data, global particles are assigned to corresponding grid cells based on their spatial coordinates.
[0012] Based on the static and dynamic physical characteristics analysis of debris flow faucets, grid-scale particle attribute statistical indices and grid-scale faucets identification rules are constructed. The grid-scale particle attribute statistical indices are SPH particle attribute statistical indices that centrally characterize the physical properties of faucets at the grid cell scale. The grid-scale faucets identification rules are based on the grid-scale particle attribute statistical indices to determine whether the SPH model domain possesses the static and dynamic physical characteristics of debris flow faucets at the grid cell scale.
[0013] For any grid cell cell A Extract the SPH particle attribute data within it, and add a head sample label Y or a non-head sample label N to it using the grid-scale head identification rule; and extract the attribute data of all SPH particles in the local aggregation space respectively, and construct the local aggregation space feature tensor, which is a three-dimensional feature tensor reflecting the physical state of the local aggregation space.
[0014] grid cells cell A The sample labels and local aggregated spatial feature tensors form supervised learning training samples. A three-dimensional convolutional neural network is trained with a sufficient amount of supervised learning training samples to obtain the dragon head recognition model.
[0015] Step S200: Identification of the leading edge of the debris flow dynamic simulation model.
[0016] The particle properties of the debris flow SPH model are defined using the smoothed particle hydrodynamics method, and particle initialization is completed.
[0017] Construct a virtual regular 3D mesh covering the SPH simulation domain, and divide the particle space into mesh cells with the same precision as in step S100;
[0018] For any given grid cell, define its local aggregation space;
[0019] Use any current grid cell as the grid cell to be identified. celll B Extract the attribute data of all SPH particles within its local aggregation space, calculate the feature tensor of the local aggregation space and input it into the dragon head recognition model, and identify the current grid cell based on the model output. cell B Is it a mudslide leader?
[0020] The above-mentioned method for identifying the head of a debris flow in dynamic simulation of debris flow, as described in this invention, identifies the head of the debris flow by configuring a 3D-CNN classification model in the SPH model to classify the spatial units of the model. The main principles of the technical solution are: 1. Constructing samples using frame data from the source SPH model, and training the 3D-CNN classification model using these samples to classify the spatial units of the SPH model. 2. Based on the frame data of the source SPH model, generating training samples using an analysis method that follows grid-scale particle attribute statistical indices and grid-scale head identification rules (referred to as grid-scale indices and rules) for model training. 3. Constructing the relationship between grid-scale indices and rules starts from the analysis of the static and dynamic physical characteristics of the debris flow head, combining the real physical characteristics with objects (particles and space) in the SPH simulation domain, and deriving guiding rules to solve the key problem of transforming frame data into training samples. The guiding rules fully utilize the core ideas of the SPH method, using particle attributes to reflect spatial attributes, and then using the "nearby area" attribute of the analyzed object to reflect the attributes of the analyzed object. By defining the surrounding attribute analysis space and local aggregation space around the object space unit, extracting feature tensors, and then combining them with the particle attributes of the object space unit, guiding rules for sample generation are constructed.
[0021] Based on the aforementioned method for identifying the dragon's head in debris flow dynamic simulation, this invention also provides the following optimized technical solutions. These optimized solutions can be implemented individually or simultaneously without causing logical conflicts.
[0022] Optimization 1: Optimization of the definition of local aggregation space.
[0023] The local aggregation space affects the balance between the range of inter-particle interactions, simulation accuracy, and computational resource consumption in SPH. Determining the size of the local aggregation space or attribute space mainly considers three factors: 1. The size of the space (i.e., the value of the side length of the enclosing space) is primarily determined by the particle radius. r nuclear radius h The simulation space needs to be large enough to fully encompass the types of relationships between the leading particles, effectively reflecting the "real attributes" and ensuring the accuracy of the simulation results; however, it should not be too large, as this would lead to the repeated coverage of the same types of particle relationships, wasting computational resources and time. Thirdly, the spatial definition should utilize existing spatial coordinate systems within the SPH framework as much as possible, such as SPH global coordinates or virtual regular 3D meshes.
[0024] Defining the attribute space using a virtual rule-based 3D mesh is a simple and efficient optimization method. The side length of the 3D enclosing space is measured in mesh cells, and both the attribute space and the local aggregation space are measured in mesh cells.
[0025] Optimization 2: Optimization of the statistical indicators of particle attributes at the grid scale and the identification rules of the leading edge at the grid scale.
[0026] Based on extensive data analysis and research findings from previous studies, this invention constructs three grid-scale particle attribute indices: average particle density within a grid cell, etc. Average speed Average particle size And construct the corresponding grid-scale leader criteria and identification rules. There are three criteria: if the grid unit... cell A If an internal particle's properties satisfy any two of the three criteria, it belongs to the "Dragon Head" category. The three criteria are as follows.
[0027] Criterion 1 ,in, ρ avg - Global average particle density in the simulation domain σ ρ - Standard deviation of particle density;
[0028] Criterion 2 ,in, v avg - Average velocity of global particles in the simulation domain; σ v - Standard deviation of particle velocity;
[0029] Criterion 3 ,in, d avg - Global average particle size in the simulation domain; σ d - Standard deviation of particle size.
[0030] Optimization 3: Optimization of the feature tensor of the local aggregation space.
[0031] Based on the conclusions of extensive preliminary data analysis, this invention constructs a 7-feature tensor that can serve as sample characteristics, including: particle number N, particle density, and other features for each grid cell within the local aggregation space. ρ i average Particle velocity modulus average Particle velocity modulus maximum value v max Particle size d i average density gradient , velocity direction variance (Expressed by Equation 1).
[0032] Formula 1
[0033] In the formula, , These are the particle's velocity modulus and velocity, respectively.
[0034] Optimization 4: Optimization of the 3D convolutional neural network.
[0035] The 3D convolutional neural network consists of two sets of convolutional layers (Conv3D) and pooling layers (MaxPool3D). The first convolutional layer (Conv3D-1) has 32 convolutional kernels with a kernel size of 3×3×3, and the first pooling layer (MaxPool3D-1) has a pooling kernel size of 2×2×2. The second convolutional layer (Conv3D-2) has 64 convolutional kernels with a kernel size of 3×3×3, and the second pooling layer (MaxPool3D-2) has a pooling kernel size of 2×2×2. Following the second pooling layer (MaxPool3D-2) are a flattening layer, a fully connected layer, and an output layer. The fully connected layer uses the sigmoid activation function, and the output layer also uses the sigmoid activation function.
[0036] The ultimate goal of this invention is to improve and optimize global particle querying by employing different particle query methods based on the different data characteristics of the leading and non-leading regions after identifying the partitions of debris flow in the global model. To this end, this invention also provides a neighborhood particle querying method for dynamic simulation of debris flows, the technical solution of which is as follows.
[0037] A neighborhood particle query method for debris flow dynamic simulation is implemented using the aforementioned debris flow dynamic simulation head identification method.
[0038] A virtual regular 3D mesh covering the simulation domain is constructed on the debris flow SPH model, and the particle space is divided into mesh units with the same accuracy as step S100 in the above debris flow dynamic simulation head identification method.
[0039] Establish a global mapping table to determine the spatial affiliation of all particles in the SPH simulation domain within the grid cells;
[0040] Construct a hash table for global particles and store global SPH particles in the index of the hash table;
[0041] The above-mentioned method for identifying the dragon head in debris flow dynamic simulation is used to identify any grid cell, and the following actions are taken based on the identification result: if the current grid cell does not belong to the dragon head, the particle data storage structure of the mapped address remains unchanged; if the current grid cell belongs to the dragon head, the particle information of the mapped address is read and rewritten into a tree-like storage.
[0042] Traverse all grid cells in the simulation domain to obtain the global partition fusion hash table;
[0043] In the neighborhood particle search, for any SPH particle, it is determined based on its belonging grid cell. cell h The coordinates determine the neighborhood search range and query the global partition fusion hash table. Based on the data storage structure of the hash key address, a hash query or a tree query is used.
[0044] In the dynamic simulation calculation of debris flow, the above-mentioned head identification method of debris flow dynamic simulation is used in each time step to identify the grid attribute of any particle belonging to the cell and update the global partition fusion hash table according to the result, and then perform neighborhood particle search.
[0045] In terms of material composition, motion, and dynamic characteristics, the head of a debris flow is the most unique and complex region. This results in the particle data of the head being larger, more varied, and more rapidly changing compared to other particle data in the debris flow SPH model. Using a globally unified particle data storage structure would lead to a technical defect where head calculations "drag down" global calculations. The neighborhood particle query method for debris flow dynamic simulation described in this invention, based on head identification, uses different particle data storage structures for different differences in the debris flow during time-step calculations, constructing a globally partitioned and fused data storage structure to optimize global calculations. Specifically, firstly, a global hash table is established using a pre-constructed virtual 3D regular grid. Then, head particles are identified and rewritten as tree storage. In neighborhood particle search, a query method combining hash and tree queries is used for different particle storage methods, improving query efficiency. This method addresses the characteristics of large density variations and high computational volume in head particles by leveraging the advantages of tree storage—adaptive spatial partitioning and low space overhead—overcoming the limitations of the hash grid linked list method when handling fluids with large density variations, reducing computational burden, and preventing particle search from degenerating into brute-force search. Meanwhile, in non-leading positions, the advantages of hash lookup are leveraged to save time.
[0046] The technical solution of this invention can be applied to the numerical simulation of debris flow based on the SPH method. The numerical simulation of debris flow based on the SPH method can be a debris flow numerical simulation implemented entirely using the SPH method, or a debris flow numerical simulation implemented using the SPH-DEM coupled method. In this case, the SPH method simulates the continuous fluid phase component of the debris flow, and the discrete element method (DEM method) simulates the discrete solid phase component of the debris flow.
[0047] Compared with the prior art, the beneficial effects of the present invention are: (1) In the field of debris flow research, the "head" has a specific meaning, which characterizes the characteristic composition and kinematic properties that are different from the rest of the debris flow. However, in the existing SPH-type debris flow numerical model, this distinction is not presented accordingly. The debris flow dynamic simulation head identification method of the present invention provides a technical solution that can identify the debris flow head in the debris flow SPH numerical model, so that the numerical simulation of debris flow can distinguish between the head and the debris flow. To solve this problem, the method adopts a brand-new technical concept, including: the method constructs a sample set from the material model, trains a classification model using a 3D-CNN structure, and then configures the classification model into the debris flow numerical simulation based on the SPH method to realize the identification of the head. When constructing the sample set, the method uses a virtual rule 3D mesh to perform domain decomposition on the SPH model, transforming the global problem of "where is the head in the global particles" into the local problem of "whether the location of a certain particle is the head"; and then, by analyzing "what is around a certain particle", the technical problem of "what is a certain particle" is fed back. In the optimization scheme, by reusing the spatial database information of the virtual rule 3D mesh, the space of "near a certain particle" is quickly defined and the result of "what is near a certain particle" is calculated, thereby establishing a fast data characterization of the object space "around a certain particle" in the SPH framework. (2) In order to train the head recognition model, this invention combines the head attribute characteristics of debris flow in theoretical research with the data characteristics of debris flow numerical model. Through a large number of experiments and tests, the grid-scale particle attribute statistical index and the corresponding grid-scale head recognition rule are constructed to solve the key problem of obtaining samples from the data, making the training of the recognition model possible. (3) The neighborhood particle query method of debris flow dynamic simulation in this invention is based on the head recognition method of debris flow dynamic simulation in this invention. In the simulation domain, after identifying the head and non-head, the virtual partition of the simulation domain is completed, and different data storage methods can be used for different areas of the simulation domain. For the non-head particle area, the bottom layer uses an array or linked list structure to maintain the particle list, maintain a lightweight management method, and achieve low overhead and high access efficiency; for the head particle area, the space is adaptively divided by the local tree storage structure to adapt to the high-density aggregation trend and frequent change characteristics of particles. This leads to the construction of a fusion storage data structure for obtaining global particles. In particle storage queries in different regions of the simulation domain, different combinations of time and space complexity are dynamically configured. This allows for the differentiated use of the advantages of different data storage structures in the acceleration structure, reducing the computational complexity of global computation neighborhood particle search, optimizing computational time and space overhead, and balancing the accuracy and efficiency of the debris flow numerical model. Attached Figure Description
[0048] Figure 1 This is a schematic diagram of the main steps in the process of building a dragon head identification model.
[0049] Figure 2 This is a schematic diagram of the relationship between the local aggregation space and the central grid. (a) shows the length defined outward from the central grid node. d The three-dimensional enclosed space, (b) shows d The case where the value is a / 2 grid cells. The relationship between its local aggregation space and the central grid position.
[0050] Figure 3 This is a schematic diagram of the 3D-CNN grid architecture of the dragon head recognition model.
[0051] Figure 4 This is a schematic diagram of the main steps in the head identification process of a debris flow dynamic simulation model.
[0052] Figure 5 This is a schematic diagram of the main steps in the neighborhood particle query process in the debris flow dynamic simulation model.
[0053] Figure 6 The test model experimental group's debris flow multi-view visualization effect diagram (particle scale 20000), (a) shows the base map, (b) to (f) show different perspectives. Detailed Implementation
[0054] The preferred embodiments of the present invention will now be further described with reference to the accompanying drawings.
[0055] Example 1
[0056] A dragon head recognition model is constructed. The dragon head recognition model chooses a three-dimensional convolutional neural network (3D-CNN) to take advantage of its strength in processing data with spatial structure features.
[0057] Figure 1 This is a schematic diagram of the main steps in the process of building a dragon head identification model.
[0058] 1. Obtain the dataset
[0059] A debris flow SPH numerical simulation model with a realistic physical dynamic response mechanism was selected as the material model. The material model should have the following characteristics as much as possible: (1) It should be able to comprehensively cover the key dynamic behaviors in the debris flow evolution process, such as the initial triggering, accumulation body destruction, coarse particle aggregation and frontal impact expansion; (2) It should be able to realistically reflect the complex relationship between particle contact, fluid interaction and dynamic response; (3) It should be able to output SPH particle time series data during the simulation process, including multiple physical properties such as position, velocity, density and particle size. In this example, two material models were selected: one is the model constructed by the debris flow dam failure numerical simulation experiment, and the other is the model constructed by the debris flow impact bridge pier numerical simulation experiment. Both types of materials include SPH models, numerical simulation experimental data and real physical test response data.
[0060] The raw data of the material model is output frame by frame (i.e. time step). Each frame contains the properties of the global particles of the model, thus obtaining the time series particle data of the material model.
[0061] A virtual, regular 3D mesh is constructed over the simulation domain of the material model to cover the model space, dividing the simulation domain into mesh cells. The accuracy of the 3D mesh is determined comprehensively using data indicators such as the spatial coordinates of SPH particles, the radius h of the smoothing kernel, and the model recognition accuracy. The side length Δ of the mesh cell along the xyz axis... x Δ y Δ z All ,in, xmax and xmin These are the SHP simulation domains in x The maximum and minimum values of the axis, NumCellx is x Number of mesh cells on the axis. In this example, the mesh cell λ is taken as the radius of the smoothing kernel. h .
[0062] For any given grid cell, taking it as the central grid cell, a three-dimensional enclosing space is defined from its nodes along the x, y, and z axes outwards from the grid cell. This enclosing space is called the attribute analysis space (hereinafter referred to as the attribute space) of the central grid. The central grid and the attribute space together form a local aggregation space. In this example, the local aggregation space is specifically a cube, extending outwards from each node by a length of... d .
[0063] The attribute space is defined using a virtual rule-based 3D mesh. (Setting) d The value is a / 2 grid cells, where a is a positive integer. The local aggregation space is a cube with a side length of (a+1), containing a total of (a+1) grid cells. 3 There are 1 grid cells, with the central grid cell 1 and the rest being attribute grid cells (i.e., grid cells that make up the attribute space).
[0064] Figure 2 This is a schematic diagram of the relationship between the local aggregation space and the central grid. (a) shows the length defined outward from the central grid node. d The three-dimensional enclosed space, (b) shows d The case where the value is a / 2 grid cells. Figure 2 (a) shows the length defined from the four top nodes of the central grid (the solid square in the center) outwards from the outermost grid cell. d ; Figure 2 (b) The solid-lined square in the center represents the central grid, and the dotted-lined squares on the outer perimeter represent the local aggregated space.
[0065] Considering the impact of the local aggregation space on the range of SPH particle interactions, simulation accuracy, and computational resource consumption, in this example, the SPH particle radius... r=0.1cm, radius of smooth kernel h =2.5×2 r Based on the test data and the above three factors, the length of each of the eight sides around the central particle in the local aggregation space was determined to be approximately 10. h The range should be appropriate. Based on the grid cell side length λ = h Converted to a virtual 3D mesh, 'a' takes the value of 20 mesh units. For example, if we take mesh units ( i , j , k ) is the central grid (( i , j , k (where ) is the grid cell subscript, calculated and determined according to Equation 7), and its attribute space is... x On the axis ( i -10λ, i -9λ, …, i -1λ, i , i +1λ, i +2λ, …, i +10λ), y On the axis ( j -10λ, j -9λ, …, j -1λ, j , j +1λ, j +2λ, …, j +10λ), z On the axis ( k -10λ, k -9λ, …, k -1λ, k , k +1λ, k +2λ, …, k A three-dimensional space enclosed by +10λ, containing a total of 20 3 -1 attribute grid.
[0066] For each frame of the time-series particle data, global particles are assigned to their corresponding grid cells based on their spatial coordinates; specifically, this is based on any single particle... i coordinate( x , y , z ) Calculate its assigned grid cell according to Equation 2 cell h Integer index of coordinates ( i , j , k This yields the spatial attribution dataset of global particles in the material model relative to the grid cells, i.e., the constructed dataset.
[0067] Formula 2
[0068] In the formula, floor function – round down, Δ x Δ y Δ z - Grid cell size, xmin , ymin , zmin - Minimum boundary value of the virtual rule 3D mesh range.
[0069] 2. Construct a sample set
[0070] Based on the analysis of the static and dynamic physical characteristics of debris flow heads, we construct SPH particle attribute statistical indexes (hereinafter referred to as grid-scale particle attribute indexes) that can centrally characterize the physical properties of the heads at the grid cell scale, and use grid-scale particle attribute indexes to identify whether the SPH model domain has static and dynamic physical characteristics of debris flow heads at the grid cell scale (hereinafter referred to as grid-scale head identification rules).
[0071] The statistical indices of particle attributes at the grid scale and the identification rules for the leading edge at the grid scale of the selected optimization scheme are shown in Table 1.
[0072] Table 1 Rules for Identifying Dragon Heads at Grid Scale
[0073]
[0074] For any central grid: (1) Extract the SPH particle attribute data within it, and add Y / N sample labels (Y - leading, N - non-leading) to it using the grid scale leading-head identification rule; (2) Extract its local aggregation space (a+1) respectively. 3 The SPH particle attribute data within each grid cell are used to construct a feature tensor reflecting the physical state of the local aggregate space (hereinafter referred to as the local aggregate space feature tensor). The local aggregate space feature tensor, as the sample feature, together with the Y / N sample labels, forms the supervised learning training samples.
[0075] For the local aggregation space, seven feature tensors are extracted according to the optimization scheme, as shown in Table 2.
[0076] Table 2 Characteristic tensors and calculation methods of locally aggregated spatial grid elements
[0077]
[0078] The dataset was used to construct sample data, and Table 3 shows an example of the sample data. In the table, the sample label items are 1 for Y and 0 for N.
[0079] Table 3 Sample Data Example
[0080]
[0081] 3. Recognition Model Training
[0082] The 3D-CNN to be trained includes two sets of 3D convolutional layers + 3D max pooling layers (Conv3D + MaxPool3D). The first 3D convolutional layer (Conv3D-1) includes 32 convolutional kernels with a kernel size of 3×3×3. The first 3D max pooling layer (MaxPool3D-1) has a pooling kernel size of 2×2×2. The second 3D convolutional layer (Conv3D-2) includes 64 convolutional kernels with a kernel size of 3×3×3. The second 3D max pooling layer (MaxPool3D-2) has a pooling kernel size of 2×2×2. After the second 3D max pooling layer, there are flattening layers (1×8000), fully connected layers (1×512), and output layers (1×1). The fully connected layers use the Sigmoid activation function, and the output layers also use the Sigmoid activation function. Figure 3 Table 4 shows the 3D-CNN mesh architecture of the dragon head recognition model and the dimensions of its input and output tensors.
[0083] Table 4. 3D-CNN Mesh Architecture and Input / Output Tensor Dimensions of the Dragon Head Recognition Model
[0084]
[0085] Output and subsequent acceleration structure connection: The final output of the model is a probability value between [0,1], which represents the confidence level that the current grid belongs to the debris flow head. The probability value is compared with the preset classification threshold (0.5 in this example) to obtain the binary judgment result (0=N, 1=Y).
[0086] In this example, PyTorch is used to build a 3D-CNN training model. During the data partitioning and loading stage, the sample set is divided into training and test sets proportionally using the interface provided by PyTorch. A batch reader is built using DataLoader to support random batch sampling, data shuffling, and efficient loading during training. At the same time, the mechanism, together with tensor normalization and data preprocessing operations, effectively improves the scalability and convergence efficiency of the training process.
[0087] Model Iterative Optimization: During the training phase of the 3D convolutional neural network, a mini-batch gradient descent optimization strategy is adopted. The training process involves forward propagation to calculate the predicted probability, the binary cross-entropy loss function, backpropagation to calculate the gradient of the network parameters, and the Adam optimizer to update the parameters.
[0088] Performance evaluation: After each round of training, the model will switch to evaluation mode on the test set, and key performance indicators such as accuracy, precision, and recall will be calculated based on the correspondence between the prediction results and the true labels.
[0089] 4. Model Export and Deployment
[0090] After the dragon head recognition model is trained, it is converted into an intermediate table format conforming to the TorchScript specification via the interface provided by PyTorch, and then exported as a .pt file via the relevant interface. Subsequently, it is loaded and run in a C++-supported environment via the libTorch interface to deploy the model in the Unreal Engine simulation.
[0091] Example 2
[0092] Identification of the dragon head in a dynamic simulation model of debris flow.
[0093] Figure 4 This is a schematic diagram of the main steps in the head identification process of a debris flow dynamic simulation model.
[0094] 1. Create a particle simulation model for debris flow SPH.
[0095] The particle properties of the debris flow SPH model are defined using the smoothed particle hydrodynamics method, requiring that the SPH model accuracy and particle properties be the same as those of the material model in Example 1. Particle initialization is then completed.
[0096] In this example, the Niagara particle system within Unreal Engine (UE) is used to construct a dynamic simulation model of a debris flow and implement head recognition. In addition to building a basic debris flow SPH model within the Niagara particle system, an exported head recognition model.pt file is implemented as a loading object in the particle system's C++ inference phase, for use by the deployment end. Main hardware: The CPU is an AMD Ryzen 9 6900HX with Radeon Graphics, responsible for overall simulation flow control, data transmission, model scheduling, and logic operations; the GPU is an NVIDIA GeForce RTX 3070 Ti Laptop, responsible for particle interaction force calculation, fluid simulation, Niagara rendering effect generation, and the training and inference of the 3DCNN model.
[0097] 2. Utilize virtual rule-based 3D meshes to modularize the simulation domain mesh.
[0098] A virtual rule 3D mesh covering the SPH simulation domain is constructed, and the simulation domain is divided into mesh cells. The accuracy of the 3D mesh is the same as that of the dragon head recognition model trained in Example 1.
[0099] 3. Identification of the grid unit of the faucet
[0100] Treating the grid cells of a regular 3D mesh as the objects to be identified, traversing all grid cells, and performing the following operations on any given grid cell:
[0101] (1) Using this grid cell as the central grid, the attribute space is delineated using the same method as in the dragon head recognition model training process, and the local aggregation space is determined. In this example, the attribute space size is designed to be the same as that of the trained dragon head recognition model;
[0102] (2) Extract the particle attribute data of the local aggregate space and calculate the local aggregate space feature tensor required for the dragon head recognition model. In this example, the feature tensor of the form [21,21,21,7] is calculated according to Table 2;
[0103] (3) Input the local aggregated spatial feature tensor into the dragon head recognition model to obtain probability values between [0,1];
[0104] (4) The system compares the above probability values with the preset classification threshold (0.5 in this example) to obtain the binary judgment result (0=N, 1=Y).
[0105] The binary determination result indicates whether the central grid is located at the head of a debris flow. Tables 5 and 6 show examples of grid cell identification for head and non-head nodes.
[0106] Table 5 Example of a leading grid cell
[0107]
[0108] Table 6 Examples of non-leading grid cells
[0109]
[0110] In this example, the actual deployment of the Niagara particle system is as follows: After loading the dragon head recognition model.pt file using libTorch (a C++ inference library provided by PyTorch), the model inference interface is used in a custom NiagaraModule written in C++ in the Unreal Engine project to achieve real-time classification and discrimination of the input grid cells.
[0111] Example 3
[0112] A method for querying neighboring particles in a dynamic simulation model of debris flow.
[0113] Figure 5 This is a schematic diagram of the main steps in the neighborhood particle query process in the debris flow dynamic simulation model.
[0114] Based on the debris flow SPH simulation model of Example 2, the method of this invention is used to design different query techniques for debris flow leading and non-leading particles in the neighborhood particle query.
[0115] 1. Construct a debris flow SPH model and divide the simulation domain into grid cells.
[0116] Similar to Example 2, “1. Create particles for the debris flow SPH simulation model” and “2. Use virtual rule 3D mesh to unitize the simulation domain mesh”.
[0117] 2. Construct a global hash table for particles.
[0118] A global mapping table is established to record the spatial affiliation of all particles in the SPH simulation domain within the grid cells, thus determining the grid cell to which any particle belongs. cell h , and the particles contained in any grid cell.
[0119] Construct an empty hash table and a hash function (as shown in Equation 8), and use the hash function to... cell h ( i , j , k Mapped to hash key h ( i , j , k This completes the mapping between the virtual rule 3D mesh position and the hash table, and stores the global SPH particles in the index of the hash table.
[0120] Formula 8
[0121] In the formula, ( i , j , k - Any particle belongs to a grid cell cell h Integer index, p 1. p 2. p 3 - prime numbers (usually large prime numbers, such as 73856093, 19349663, 83492791), ⊕ represents the XOR operation, and M represents the hash table size (usually a large prime number to reduce hash collisions).
[0122] 3. Partitioning and rewriting the global hash table
[0123] The method described in Example 2, "3. Identification of the grid cell of the dragon head," is used to identify any grid cell, and the following actions are performed based on the identification result:
[0124] If the current grid cell does not belong to the head, keep the particle data storage structure of the mapped address unchanged, that is, keep the particle linked list unchanged;
[0125] If the current grid cell belongs to the head, read the particle information of the mapped address and rewrite it into a tree structure.
[0126] Traverse all grid cells in the simulation domain to obtain the global partition fusion hash table.
[0127] 4. Combined query of neighborhood particle search
[0128] For any particle in the simulation domain r i According to its assigned grid cell cell h Coordinates determine the search range of neighboring particles (belonging to the grid cell). cell h (and its 26 directly adjacent network units, totaling 27 neighboring grids), query the global partition fusion hash table based on the hash key address, and execute:
[0129] If the particles in the hash table storage unit pointed to by the hash key are hash data structures, a hash lookup is performed. That is, all particle IDs under these linked lists are directly traversed, and the spatial coordinates and physical properties of these particles are obtained through the Niagara particle attribute reading interface, thereby completing the calculation of SPH-related attributes of the target particle.
[0130] If the hash table storage unit pointed to by the hash key contains particles in an octree data structure, a tree query is performed. That is, through a spatial pruning algorithm, the system recursively locates the leaf nodes that intersect with the search range of the target particle, starting from the root node. The spatial coordinates and physical properties of the particles stored in these leaf nodes are obtained through the Niagara particle property reading interface, and finally, the SPH-related properties are calculated.
[0131] Traverse 27 grid cells and return the particles. r i The list of neighboring particles.
[0132] 5. Calculation and updating of system physical properties
[0133] Based on the query results of neighboring particles in the simulation domain, the inter-particle calculations are completed. The system's physical properties are then updated. During the SPH model simulation calculation, the above steps "3. Partitioning and rewriting the global hash table" to "5. Calculation and updating of system physical properties" are repeated at each time step until the simulation termination condition is met.
[0134] Test Example 1
[0135] The efficiency of the neighborhood particle query method in the debris flow dynamic simulation model of Example 3 was verified by test experiments.
[0136] The tests were conducted on the model system built in Example 3.
[0137] 1. Comparative Test of Particle Computation Stage
[0138] Four debris flow SPH simulation test models were constructed in the Niagara particle system, with global particle sizes of 1000, 2000, 5000, and 20000, respectively. Except for the total number of particles, the four test models had the same model parameters and particle properties. The simulation domain was divided into 200×200×200 grid cells using a virtual regular 3D mesh. The test models were used to compare the computational efficiency and performance of the system under different particle sizes. Experimental and control groups were set up for each of the four test models to evaluate the operational performance of the density, pressure, and viscous force calculation stages in the SPH numerical calculation. The experimental group used the method described in Example 3, while the control group used the existing conventional mesh method (refer to existing technology: Wang Yaru, Debris Flow Motion Simulation Based on SPH Method, North China University of Water Resources and Electric Power, Dissertation, 2018).
[0139] The core technology of this invention is the identification of debris flow leaders in the SPH model, as well as the particle information data fusion and storage structure based on particle partitioning and the highly efficient neighbor particle query. Since the neighbor particle query is not an independent step but is nested within the calculation process of multiple physical quantities such as density, pressure, and viscous force, and the neighbor particle query step accounts for the majority of the computational time, this example selects the time consumed in the complete density calculation, pressure, and viscous force calculation stages as the test comparison item. This more reasonably reflects the supporting performance and efficiency improvement effect of the neighbor particle query calculation on the overall physical property calculation of the model.
[0140] During the comparative test, all physical parameters except the number of particles remained consistent. The single-frame runtime of the two methods in the neighbor particle lookup and related physical quantity calculation stages was compared, and the relevant data are shown in Table 7.
[0141] Table 7. Test time data for the particle computation phase.
[0142]
[0143] Table 7 shows that: (1) Under the same simulation conditions, the experimental group added the head identification operation for different particle scale models, but the calculation time was lower than that of the control group. Compared with the control group, the experimental group improved the average efficiency of particle density calculation by about 38.7% and the average efficiency of pressure and viscous force calculation by about 34.4% in the four particle scale calculations (the efficiency improvement is calculated as a percentage of the difference in time consumption between the two methods and the time consumption of the control group). (2) In the lower particle scale model, due to the low number of particles, the head characteristics of debris flow are not prominent and the number of head grids is small, so the difference in calculation time between the experimental group and the control group is not significant. As the particle scale increases, the head characteristics of debris flow become apparent, the number of head grids increases accordingly, the requirements for model performance increase, and the computational efficiency advantage of the experimental group is more obvious.
[0144] 2. Test data during the rendering and visualization phase.
[0145] In the visualization simulation model including debris flow rendering, to ensure the calculation meets real-time requirements, the frame rate should be maintained between 30FPS and 60FPS, which translates to a calculation time per frame of 16.6ms to 33.3ms. According to the data in Table 7, the control group for all particle scales already performed worse than the experimental group in terms of particle density and pressure viscosity calculation steps. The overall calculation time for multiple steps, including depth and normal texture calculations and blurring, approached or exceeded the upper limit. The control group with a particle scale of 20,000 experienced a particle calculation time exceeding 33.3ms, and after adding the rendering step, the time per frame was approximately 50.88ms, which is insufficient for debris flow visualization.
[0146] Table 8 lists only the experimental group data to test the time consumption of the method of the present invention and its support for the rendering step.
[0147] Table 8. Test time consumption data for the rendering and visualization calculation phase of the experimental group.
[0148]
[0149] Table 8 shows that in the mudslide visualization calculation, which involves mechanical calculations and superimposed subsequent mudslide rendering processes (depth and normal texture calculations, blurring operations), when the number of particles reaches 20,000, the total calculation time per frame can be stably maintained at about 33ms, corresponding to a running level of 30FPS, demonstrating good real-time simulation performance.
[0150] Figure 6 The test model experimental group's debris flow multi-view visualization effect diagram (particle scale 20000), (a) shows the base map, (b) to (f) show different perspectives. Figure 6 (a) is the base topographic map of the simulated area; Figure 6 (b) shows the simulation visualization results of the regional panorama; Figure 6 (c) and Figure 6 The diagram in the middle (d) shows the location and observation direction of observation points OP1 and OP2. Both observation points are set at a height of 3.5m above the ground. The green area in the diagram represents the camera's field of view. NP in the diagram represents the camera's ground projection point. Figure 6 (e) and Figure 6 The middle (f) corresponds to from Figure 6 (c) Observation point OP1 and Figure 6 The visualization effect from the perspective of observation point OP2 in the middle (d).
Claims
1. A method for identifying the "head" of a debris flow in dynamic simulation, characterized by: Step S100: Train the dragon head recognition model Using a debris flow SPH numerical simulation model with a realistic physical dynamic response mechanism as the material model, the raw data of the material model is output frame by frame. Each frame contains the global particle properties of the material model, thus obtaining the time series particle data of the material model. A virtual regular 3D mesh covering the SPH simulation domain is constructed on the material model, and the particle space is divided into mesh units. For any grid cell cell A Starting from each node, a three-dimensional enclosing space is defined along the x, y, and z axes outwards from the mesh element. This three-dimensional enclosing space is the mesh element. cell A Attribute analysis space, mesh cell cell A It forms its local aggregation space with its attribute analysis space; For each frame of time-series particle data, global particles are assigned to corresponding grid cells based on their spatial coordinates. Based on the static and dynamic physical characteristics analysis of debris flow faucets, grid-scale particle attribute statistical indices and grid-scale faucets identification rules are constructed. The grid-scale particle attribute statistical indices are SPH particle attribute statistical indices that centrally characterize the physical properties of faucets at the grid cell scale. The grid-scale faucets identification rules are based on the grid-scale particle attribute statistical indices to determine whether the SPH model domain possesses the static and dynamic physical characteristics of debris flow faucets at the grid cell scale. For any grid cell cell A Extract the SPH particle attribute data within it, and add a head sample label Y or a non-head sample label N to it using the grid-scale head identification rule; and extract the attribute data of all SPH particles in the local aggregation space respectively, and construct the local aggregation space feature tensor, which is a three-dimensional feature tensor reflecting the physical state of the local aggregation space. grid cells cell A The sample labels and local aggregated spatial feature tensors form supervised learning training samples. A three-dimensional convolutional neural network is trained with a sufficient amount of supervised learning training samples to obtain the dragon head recognition model. Step S200: Identification of the leading edge of the debris flow dynamic simulation model. The particle properties of the debris flow SPH model are defined using the smoothed particle hydrodynamics method, and particle initialization is completed. Construct a virtual regular 3D mesh covering the SPH simulation domain, and divide the particle space into mesh cells with the same precision as in step S100; For any given grid cell, define its local aggregation space; Use any current grid cell as the grid cell to be identified. celll B Extract the attribute data of all SPH particles within its local aggregation space, calculate the feature tensor of the local aggregation space and input it into the dragon head recognition model, and identify the current grid cell based on the model output. celll B Is it a mudslide leader? 2. The method for identifying the dragon head in debris flow dynamic simulation according to claim 1, characterized in that: The grid-scale particle property statistics include the average particle density within the grid cell. Average speed Average particle size ; The grid-scale dragon head identification rules include: Criterion 1 ,in, ρ avg - Global average particle density in the simulation domain σ ρ - Standard deviation of particle density; Criterion 2 ,in, v avg - Average velocity of global particles in the simulation domain; σ v - Standard deviation of particle velocity; Criterion 3 ,in, d avg - Global average particle size in the simulation domain; σ d - Standard deviation of particle size; If grid cells cell A If the properties of an internal particle satisfy any two of the three criteria, then cell A It is a leading company.
3. The method for identifying the dragon head in debris flow dynamic simulation according to claim 1, characterized in that: The local aggregation space feature tensor includes the following for each grid cell: particle number N, particle density. ρ i average Particle velocity modulus average Particle velocity modulus maximum value v max Particle size d i average density gradient , velocity direction variance The velocity direction variance Expressed according to Formula 1, Formula 1 In the formula, , These are the particle's velocity modulus and velocity, respectively.
4. The method for identifying the dragon head in debris flow dynamic simulation according to claim 1, characterized in that: The three-dimensional convolutional neural network includes two sets of 3D convolutional layers + 3D max pooling layers. The first 3D convolutional layer includes 32 convolutional kernels with a kernel size of 3×3×3. The first 3D max pooling layer has a pooling kernel size of 2×2×2. The second 3D convolutional layer includes 64 convolutional kernels with a kernel size of 3×3×3. The second 3D max pooling layer has a pooling kernel size of 2×2×2. After the second 3D max pooling layer, there are flattening layers, fully connected layers, and output layers in sequence. The fully connected layer activation function is Sigmoid, and the output layer activation function is Sigmoid.
5. The method for identifying the dragon head in debris flow dynamic simulation according to claim 1, characterized in that: The three-dimensional convolutional neural network is optimized during the training phase using a mini-batch gradient descent optimization strategy. During the training process, forward propagation is performed to calculate the predicted probability, the binary cross-entropy loss function, and backpropagation is performed to calculate the gradient of the network parameters. The Adam optimizer updates the parameters.
6. The method for identifying the dragon head in debris flow dynamic simulation according to claim 1, characterized in that: The side length of the three-dimensional enclosed space is determined by the particle radius. r smooth kernel radius h The density of the leading particles is determined together with the density of the particles.
7. The method for identifying the dragon head in debris flow dynamic simulation according to claim 6, characterized in that: The local aggregation space is a cube, extending outwards from each node by a length of... d =10 h =10×2.5×2 r .
8. The method for identifying the dragon head in debris flow dynamic simulation according to claim 1, characterized in that: Step S100 uses PyTorch to build a three-dimensional convolutional neural network training model. After training, the model is converted into an intermediate table format in TorchScript specification through the interface provided by PyTorch and exported as a .pt file. Step S200 uses the Niagara particle system of Unreal Engine to build a debris flow dynamic simulation model. The .pt file is loaded and run through the libTorch interface in a C++ supported environment to realize the deployment of the dragon head recognition model in Unreal Engine.
9. A neighborhood particle query method for dynamic simulation of debris flows, characterized in that: The method for identifying the dragon head in the dynamic simulation of debris flow as described in any one of claims 1 to 8 is used. A virtual regular 3D mesh covering the simulation domain is constructed on the debris flow SPH model, and the particle space is divided into mesh units with the same accuracy as step S100 in the debris flow dynamic simulation head identification method according to any of claims 1 to 8. Establish a global mapping table to determine the spatial affiliation of all particles in the SPH simulation domain within the grid cells; Construct a hash table for global particles and store global SPH particles in the hash table index; The head dragon identification method for debris flow dynamic simulation according to any one of claims 1 to 8 is used to identify any grid cell, and the following actions are performed according to the identification result: if the current grid cell does not belong to the head dragon, the particle data storage structure of the mapped address remains unchanged; if the current grid cell belongs to the head dragon, the particle information of the mapped address is read and rewritten into tree storage. Traverse all grid cells in the simulation domain to obtain the global partition fusion hash table; In the neighborhood particle search, for any SPH particle, it is determined based on its belonging grid cell. cell h The coordinates determine the neighborhood search range and query the global partition fusion hash table. Based on the data storage structure of the hash key address, a hash query or a tree query is used. In the dynamic simulation calculation of debris flow, the head identification method of debris flow dynamic simulation is used in each time step to identify the grid attribute of any particle belonging to the cell and update the global partition fusion hash table according to the result, and then perform neighborhood particle search.
10. The neighborhood particle query method for debris flow dynamic simulation according to claim 9, characterized in that: It is applied to the numerical simulation of debris flow based on the SPH method.
Citation Information
Patent Citations
Method and device for simulating external force driven scene flow by SPH based on CCNN
CN118940644A
SPH fluid rendering method and system based on Gaussian function
CN121213755A