Automatic generation method and system of SPH particle model and surface geometric model
By constructing and processing raster data, using a layered generation algorithm and Delaunay triangulation, the problems of low efficiency, high data alignment error and insufficient geometric accuracy in SPH modeling are solved, and efficient and accurate SPH particle models and surface geometry models are automatically generated, supporting multi-node CPU clusters or GPU acceleration.
Patent Information
- Application Number
- CN202510880267.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-27
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2045-06-27
AI Technical Summary
The existing SPH modeling method has low processing efficiency, high data alignment error and insufficient model surface geometric accuracy, especially when dealing with complex terrain. It has low efficiency, poor compatibility of multi-source data and high triangular facet distortion rate.
By constructing raster data of terrain elevation and material source thickness distribution model, data standardization is performed, and a resampling equation is established based on the SPH particle diameter parameter. A layered generation algorithm is used to generate the particle model, and the surface geometry model is generated by combining Delaunay triangulation to achieve automatic generation.
It improves modeling efficiency, reduces data alignment errors, enhances model surface geometric accuracy, realizes automatic alignment of multi-source data and dynamic resolution optimization, supports multi-node CPU clusters or GPU acceleration, and has geometric compatibility and physical consistency.
Smart Images

Figure CN120706202A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of SPH modeling, and in particular relates to a method and system for automatically generating an SPH particle model and a surface geometry model. Background Art
[0002] There are currently three major technical bottlenecks in the field of smoothed particle hydrodynamics (SPH) numerical simulation modeling: (1) Traditional modeling methods rely on manual intervention and are inefficient when dealing with complex terrains; (2) Existing automated tools have poor compatibility with multi-source data, and data alignment errors can reach 5-10%; (3) The model surface geometric accuracy is insufficient, and the common triangular patch distortion rate exceeds 15%. Summary of the Invention
[0003] The purpose of the present invention is to solve the problems of low processing efficiency, high data alignment error and insufficient model surface geometric accuracy of existing SPH modeling methods, and propose an automatic generation method and system of SPH particle models and surface geometric models.
[0004] The technical solution of the present invention is as follows: In a first aspect, a method for automatically generating an SPH particle model and a surface geometry model comprises the following steps: Construct raster data of terrain elevation model and material source thickness distribution model, and perform data standardization on the raster data to achieve spatial benchmark unification of terrain elevation model and material source thickness distribution model; A resampling equation is established based on the SPH particle diameter parameter, and the resolution of the normalized grid data is resampled by bilinear interpolation to ensure that the grid cell size matches the physical properties of the particles. A hierarchical generation algorithm is used to generate terrain boundary particles in the terrain elevation model and complete the filling of source particles in the source thickness distribution model; Based on the grid vertex coordinate set, Delaunay triangulation is used to generate a surface geometric model in STL format. Then, the terrain boundary particle coordinates, source particle coordinates and STL files that meet the requirements of the SPH solver are output to simulate the interaction between fluid and solid boundaries in debris flows, completing the automatic generation of SPH particle models and surface geometric models.
[0005] Preferably, the data standardization processing of the raster data specifically includes the following steps: Perform WGS84 georeferencing on terrain data and source data to normalize the coordinate system of raster data; The discrete data is converted into a unified grid coordinate system through bilinear interpolation to achieve resolution normalization of the raster data; Convert terrain files and source files in GeoTIF format into TXT format to achieve data format normalization of raster data.
[0006] Preferably, the resampling equation is:
[0007] in, and Indicates the resolution of the resampled raster data. represents the correction factor, Represents the SPH particle diameter parameter.
[0008] Preferably, the generating of terrain boundary particles is specifically as follows: Adopting a particle stacking strategy that decreases layer by layer, with the center of the grid as the center. As the reference point, the global Cartesian coordinate system is converted into a hierarchical coordinate system; In the layered coordinate system, the particle arrangement is controlled by layer order, and the distance between particles in each layer satisfies , represents the minimum distance between particles, represents the safety factor, represents the SPH particle diameter parameter; The scan line algorithm is used within the layer to perform horizontal non-overlap sorting to complete the generation of terrain boundary particles.
[0009] As a preference, the coordinate system transformation model is:
[0010]
[0011]
[0012] in, represents the particle coordinates in the layered coordinate system, and represents the local index of the particle in the cell, , and Indicates the resolution of the resampled raster data. Indicates the terrain elevation corresponding to the particle, Indicates the vertical sequence, Indicates the number of pre-calculated theoretical particle stacking layers, Represents the SPH particle diameter parameter.
[0013] Preferably, the method of filling the source particles is as follows: A vertical expansion algorithm is constructed based on the source thickness, and the particle spatial distribution constraint conditions are established:
[0014] in, Indicates the maximum surface terrain elevation corresponding to the particle, represents the thickness of the disaster source, represents the SPH particle diameter parameter; Establish a mapping table between source thickness and number of particle stacking layers, and pre-calculate the theoretical number of particle stacking layers corresponding to the source thickness:
[0015] in, Indicates the number of pre-calculated theoretical particle stacking layers, Indicates that the value is rounded. Indicates the thickness of the source; Establish a residual feedback mechanism. If the particle spatial distribution constraints are not met, the number of layers will be adjusted. Set the maximum number of layers to prevent overfitting; When the maximum number of layers is satisfied, particles are stacked downward from the surface elevation according to the theoretical number of particle stacking layers to achieve particle filling in the source area. The maximum number of layers is constrained as follows:
[0016] in, Indicates the maximum number of layers, Indicates rounding up. Indicates the maximum thickness of the provenance area.
[0017] As a preference, a layered generation algorithm is used to generate terrain boundary particles in the terrain elevation model, and when filling the source particles in the source thickness distribution model, a double-layer spacing constraint algorithm is used to control the particle spacing error to ≤0.5 ; The dual-layer spacing constraint algorithm includes global pre-allocation, local fine-tuning and boundary layer encryption technology; Among them, represents the SPH particle diameter parameter; Global pre-allocation is specifically: Calculate the theoretical number of particles , according to the theoretical particle number Pre-allocate grid cells; Local fine-tuning is specifically: calculating the error in the distance between adjacent particles , using the spring-mass model The particles exert virtual forces and converge to the error range through damping iteration; The boundary layer encryption technology is to use the mirror particle method in the near wall area, and d Generate virtual particles at the physical boundary, forcing the real particle spacing to be maintained at (1±0.5) d , suppressing the escape of boundary layer particles.
[0018] As a preference, the theoretical particle number The calculation formula is:
[0019] in, represents the maximum cross-sectional area of the particle, represents the SPH particle diameter parameter, Indicates the thickness of the source; Error in the distance between adjacent particles The calculation formula is:
[0020] in, Indicates the The particle The distance error between particles is Indicates the The radius of the particle, Indicates the The radius of the particle; The calculation formula of virtual force is:
[0021] in, represents the virtual force, Represents the stiffness coefficient.
[0022] Preferably, based on the grid vertex coordinate set, Delaunay triangulation is used to generate the surface geometry model in STL format, specifically: Based on grid vertex coordinate sets , use Delaunay triangulation to build a three-dimensional surface model, generate a set of triangular facets that conform to the STL format specification, and then obtain the surface geometry model in STL format; Among them, Represents the total number of grid vertices in the grid vertex coordinate set, Indicates the The coordinates of the grid vertices; The set of triangles that conform to the STL format specification is:
[0023] in, Represents a set of triangle faces that conform to the STL format specification. Indicates the triangular patches, 、 and Respectively represent the first 、 and The coordinates of the grid vertices.
[0024] The beneficial effects of the present invention are: 1. This invention uses dynamic resampling to ensure the optimal match between grid resolution and particle physical properties. Dynamic resampling allows the grid resolution to be automatically adjusted based on changes in particle physical properties (such as density, velocity gradient, and temperature gradient).
[0025] 2. This invention uses coordinate transformation and layer-order control to achieve non-overlapping particle arrangement. Coordinate transformation (mapping the global Cartesian coordinate system to a layered coordinate system) converts particles from one coordinate system to another, arranging each layer of particles along a specific geometric direction (such as the normal). This allows for better particle positioning and placement in a specific layer order, thus avoiding overlap and improving computational efficiency. For example, after layering, processing can be performed layer by layer, reducing cross-layer interaction calculations.
[0026] 3. This invention uses a mapping table between source thickness and number of particle stacking layers to pre-calculate the required particle configuration. For example, the number of layers required and the particle diameter of each layer are determined based on the source thickness. This allows for quick parameter setting during modeling without trial and error. Furthermore, given two parameters, the third can be easily calculated, facilitating model design and adjustment.
[0027] In a second aspect, a system for automatically generating an SPH particle model and a surface geometry model includes: The data processing module is used to construct the raster data of the terrain elevation model and the material thickness distribution model, and perform data standardization on the raster data to achieve the spatial benchmark unification of the terrain elevation model and the material thickness distribution model; Dynamic adaptive resampling module, which is used to establish the resampling equation based on the SPH particle diameter parameter and resample the resolution of the normalized raster data through bilinear interpolation to ensure that the grid cell size matches the physical properties of the particles; The layered particle generation module is used to generate terrain boundary particles in the terrain elevation model using a layered generation algorithm and complete the source particle filling in the source thickness distribution model; The surface geometry modeling module is used to generate a surface geometry model in STL format based on a grid vertex coordinate set using Delaunay triangulation, and then output terrain boundary particle coordinates, source particle coordinates, and STL files that meet the requirements of the SPH solver. This module is used to simulate the interaction between fluid and solid boundaries in debris flows and automatically generate SPH particle models and surface geometry models. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1Shown is a flow chart of a method for automatically generating an SPH particle model and a surface geometry model. Figure 2 The figure shows the parallel acceleration architecture diagram. DETAILED DESCRIPTION
[0029] The exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be understood that the embodiments shown and described in the accompanying drawings are merely exemplary and are intended to illustrate the principles and spirit of the present invention, rather than to limit the scope of the present invention.
[0030] Example 1: like Figure 1 As shown, a method for automatically generating an SPH particle model and a surface geometry model includes the following steps: S1. Construct raster data of the terrain elevation model and the material thickness distribution model, and perform data standardization on the raster data to achieve spatial datum unification of the terrain elevation model and the material thickness distribution model; The terrain elevation model and the material source thickness distribution model can be the terrain elevation model (z.txt) and the material source thickness distribution model (h.txt) of the debris flow. In the debris flow simulation, the same set of modeling processes is adapted to the liquid slurry ( =0.2mm) and solid particles ( =4mm), that is, the SPH particles can be liquid slurry and solid particles.
[0031] S2. Establish a resampling equation based on the SPH particle diameter parameter and resample the resolution of the normalized grid data using bilinear interpolation to ensure that the grid cell size matches the physical properties of the particles; S3. Generate terrain boundary particles in the terrain elevation model using a layered generation algorithm and complete the filling of source particles in the source thickness distribution model; S4. Based on the grid vertex coordinate set, Delaunay triangulation is used to generate a surface geometry model in STL format. The terrain boundary particle coordinates, source particle coordinates, and STL files that meet the requirements of the SPH solver are then output. This is used to simulate the interaction between the fluid and solid boundary in debris flows, completing the automatic generation of the SPH particle model and surface geometry model.
[0032] In this embodiment, the data standardization processing of the raster data specifically includes the following steps: Perform WGS84 georeferencing on terrain data and source data to normalize the coordinate system of raster data; The discrete data is converted into a unified grid coordinate system through bilinear interpolation to achieve resolution normalization of the raster data; Convert terrain files and source files in GeoTIF format into TXT format to achieve data format normalization of raster data.
[0033] In this embodiment, the resampling equation is:
[0034] in, and Indicates the resolution of the resampled raster data. represents the correction factor, Represents the SPH particle diameter parameter.
[0035] The present invention proposes a resolution adaptation mechanism: dynamic resampling is used to ensure the best match between grid resolution and particle physical properties.
[0036] In particle-based numerical simulation scenarios, the physical properties of particles, such as density and velocity, change with time and spatial position. Through dynamic resampling, the grid resolution can be automatically adjusted according to the changes in the physical properties of the particles (such as density, velocity gradient, temperature gradient, etc.). For example, when simulating fluid flow, complex physical phenomena such as vortices may appear in high-gradient regions within the fluid. The particle density and velocity gradients in these regions vary greatly. At this time, the resolution adaptive mechanism can increase the grid resolution in these areas and automatically increase the sampling density, making it possible to more accurately capture the details of the particle physical properties in small-scale physical phenomena (such as surface tension and turbulent vortices). For relatively stable areas, the resolution can be reduced to reduce redundant calculations and balance simulation accuracy and computational efficiency.
[0037] In this embodiment, the generation of terrain boundary particles is specifically as follows: Adopting a particle stacking strategy that decreases layer by layer, with the center of the grid as the center. As the reference point, the global Cartesian coordinate system is converted into a hierarchical coordinate system; In the layered coordinate system, the particle arrangement is controlled by layer order, and the distance between particles in each layer satisfies , represents the minimum distance between particles, represents the safety factor, , represents the SPH particle diameter parameter; The scan line algorithm is used within the layer to perform horizontal non-overlap sorting to complete the generation of terrain boundary particles.
[0038] In this embodiment, the coordinate system transformation model is:
[0039]
[0040]
[0041] in, represents the particle coordinates in the layered coordinate system, and represents the local index of the particle in the cell, , and Indicates the resolution of the resampled raster data. Indicates the terrain elevation corresponding to the particle, Indicates the vertical sequence, Indicates the number of pre-calculated theoretical particle stacking layers, Represents the SPH particle diameter parameter.
[0042] In this embodiment, the method of filling source particles is specifically as follows: A vertical expansion algorithm is constructed based on the source thickness, and the particle spatial distribution constraint conditions are established:
[0043] in, Indicates the maximum surface terrain elevation corresponding to the particle, represents the thickness of the disaster source, represents the SPH particle diameter parameter; Establish a mapping table between source thickness and number of particle stacking layers, and pre-calculate the theoretical number of particle stacking layers corresponding to the source thickness:
[0044] in, Indicates the number of pre-calculated theoretical particle stacking layers, Indicates that the value is rounded. Indicates the thickness of the source; Establish a residual feedback mechanism. If the particle spatial distribution constraints are not met, the number of layers will be adjusted. Set the maximum number of layers to prevent overfitting; When the maximum number of layers is satisfied, particles are stacked downward from the surface elevation to achieve particle filling in the source area. The maximum number of layers is constrained to:
[0045] in, Indicates the maximum number of layers, Indicates rounding up. Indicates the maximum thickness of the provenance area.
[0046] The present invention proposes a layered generation algorithm: coordinate transformation and layer sequence control are used to achieve non-overlapping particle arrangement.
[0047] In the process of constructing a particle system, non-overlapping arrangement is one of the key requirements. Coordinate transformation (mapping the global Cartesian coordinate system to a hierarchical coordinate system such as cylindrical coordinates or spherical coordinates) can convert particles from one coordinate system to another, so that each layer of particles is arranged along a specific geometric direction (such as the normal direction) to better arrange the position of the particles. Layer sequence control is to place particles in a certain hierarchical order. First, the layers are divided according to the thickness of the source or the physical boundary (such as the distance to the solid wall), and the distance between the particles in each layer meets ( k =1.1−1.5 is a safety factor); secondly, grid indexing is used within each layer for horizontal sorting to ensure that particles do not overlap in the two-dimensional plane (e.g., by using a scan line algorithm to detect and adjust particle positions). For example, when constructing a three-dimensional particle model, one can first determine the positions of the particles in the bottom layer. Then, based on the positions of the particles in the bottom layer and certain rules (such as a certain spacing), the positions of the particles in the upper layer can be determined. In this way, particles are arranged upwards in sequence, avoiding overlap between particles and potentially improving computational efficiency. For example, after stratification, they can be processed layer by layer, reducing the calculation of cross-layer interactions.
[0048] In this embodiment, the present invention also proposes a parameterized modeling system: to establish the particle diameter -Number of layers -Thickness of the source ( ) to achieve the forward mapping of “physical target → parameter configuration”: ,in Indicates the interlayer gap coefficient (empirical value 0.1 -0.3 ), which needs to be corrected in combination with material properties (such as compressibility).
[0049] Generally speaking, source thickness is affected by particle diameter and the number of layers. For example, assuming the particles are uniformly arranged spherical particles, the source thickness can be approximately expressed as the particle diameter multiplied by the number of layers. Furthermore, the determination of the number of layers is also limited by the particle diameter and source thickness. By establishing such a mathematical correlation model, the required particle configuration can be calculated in advance, such as determining the number of layers required and the particle diameter of each layer based on the source thickness. This allows for quick parameter setting during modeling without trial and error. Furthermore, given two of the parameters, the third parameter can be easily calculated, facilitating model design and adjustment.
[0050] In an embodiment of the present invention, a dual-layer spacing constraint algorithm is designed, including a global pre-allocation mechanism and a local fine-tuning mechanism.
[0051] The global pre-allocation mechanism is as follows: Calculate the theoretical number of particles according to the parameterized model :
[0052] in, Represents the cross-sectional area. Grid cells are pre-allocated through a spatial hash table, and a particle number threshold is preset for each cell.
[0053] The local fine-tuning mechanism is as follows: Calculate the error in the distance between adjacent particles:
[0054] in, Indicates the The particle The distance error between particles is Indicates the The radius of the particle, Indicates the The radius of the particle; the spring-mass model is used to The particles exert a virtual force on :
[0055] in, represents the virtual force, represents the stiffness coefficient, which is converged to the error bound through damping iteration.
[0056] The embodiment of the present invention also designs a boundary layer encryption technology, which uses the mirror particle method in the near-wall area and d Generate virtual particles at the physical boundary, forcing the real particle spacing near the physical boundary to be maintained at (1±0.5) d , suppressing the escape of boundary layer particles.
[0057] The embodiment of the present invention also designs an error checking mechanism, which monitors the error distribution in real time by establishing a statistical histogram of particle distance, triggers local resampling of the over-threshold area, and ensures global accuracy consistency.
[0058] In this embodiment, based on the grid vertex coordinate set, Delaunay triangulation is used to generate a surface geometric model in STL format, specifically: Based on grid vertex coordinate sets , use Delaunay triangulation to build a three-dimensional surface model, generate a set of triangular facets that conform to the STL format specification, and then obtain the surface geometry model in STL format; Among them, Represents the total number of grid vertices in the grid vertex coordinate set, Indicates the The coordinates of the grid vertices are determined by the terrain boundary particle generation algorithm and the source particle filling mechanism.
[0059] The set of triangles that conform to the STL format specification is:
[0060] in, Represents a set of triangle faces that conform to the STL format specification. Indicates the triangular patches, 、 and Respectively represent the first 、 and The coordinates of the grid vertices.
[0061] The present invention achieves the following by constructing an intelligent modeling system: (1) automatic alignment of multi-source data; (2) dynamic resolution optimization (modeling efficiency increased by 3 times); and adaptive surface optimization.
[0062] The present invention designs an automated modeling process: achieving one-click generation from raw data to SPH models, which can greatly improve work efficiency.
[0063] The automatic generation method of SPH particle model and surface geometry model of the present invention is based on the hybrid parallel strategy of OpenMP / MPI, which is suitable for multi-node CPU cluster or GPU acceleration. The parallel acceleration architecture is shown in the figure Figure 2 As shown in the following figure, the layered generation phase uses the scan line algorithm to replace the traditional global collision detection, and the time complexity is reduced from O ( N 2 ) down to O ( N log N The resolution adaptation module integrates Early Termination Search, which skips resampling when the local gradient is below a threshold.
[0064] In terms of hardware acceleration adaptation, this embodiment of the present invention implements the particle neighborhood search kernel function on the GPU, leveraging CUDA's grid / block / thread architecture to parallelize the calculation of each particle's k-nearest neighbors, resulting in an 8-10x acceleration compared to CPU serial computation. Memory management utilizes page-locked memory (Pinned Memory) combined with asynchronous data transfer (CUDAStreams) to minimize host-device communication latency. As shown in Table 1, this method achieves superior performance compared to traditional methods.
[0065] Table 1 Performance comparison data
[0066] At the same time, the SPH particle model and surface geometry model constructed according to the method proposed in the present invention have geometric compatibility and physical consistency.
[0067] Geometric compatibility: It ensures that the output particle coordinates satisfy the solver's coordinate system (such as the right-handed system of GANDALF and the LAMMPS-compatible coordinate system of LIGGGHTS). The supported solvers are shown in Table 2. It can automatically generate the boundary files required by the solver (such as converting the STL mesh of the wall geometry into the particle virtual boundary).
[0068] Physical consistency: Mass conservation verification: (Error ≤ 0.1%); Energy initialization: Precalculate the initial internal energy based on the equation of state and adapt to the state equation interface of different solvers.
[0069] Table 2 List of supported solvers
[0070] The SPH particle model and surface geometry model constructed according to the method proposed in the present invention have parameter scalability and support automatic adaptation to the particle size range of 0.1-5.0 mm. Specifically: According to the particle size-resolution linkage formula: ,when When , sub-particle scale correction is enabled, virtual particles are inserted between grid nodes to enhance small-scale resolution; when When , the coarse-graining technology is used to merge multiple physical particles into calculation particles to reduce the total number of particles.
[0071] The material properties are adapted as shown in Table 3.
[0072] Table 3 Material property adaptation
[0073] Example 2: On the basis of Example 1, the embodiment of the present invention is aimed at debris flow simulation modeling to verify the technical effect of the method proposed by the present invention.
[0074] In debris flow simulation, the same modeling process is adapted to liquid slurry ( =0.2mm) and solid particles ( =4mm) hybrid modeling: The liquid slurry uses 5 layers of particles with a resolution of 0.25mm to capture the details of the slurry flow; The solid phase particles are coarse-grained particles, and each layer contains 10-20 physical particles. The average stress obtained in the experiment is 13.65kPa, and the average stress calculated by simulation is 14.46kPa. The calculation efficiency is improved by 2.3 times while maintaining the dynamic accuracy (the error compared with the experimental data is ≤6%).
[0075] Example 3: Based on Example 1, an embodiment of the present invention provides an automatic generation system of an SPH particle model and a surface geometric model, which can be used to implement the automatic generation method of an SPH particle model and a surface geometric model as described in Example 1. The system includes: The data processing module is used to construct the raster data of the terrain elevation model and the material thickness distribution model, and perform data standardization on the raster data to achieve the spatial benchmark unification of the terrain elevation model and the material thickness distribution model; Dynamic adaptive resampling module, which is used to establish the resampling equation based on the SPH particle diameter parameter and resample the resolution of the normalized raster data through bilinear interpolation to ensure that the grid cell size matches the physical properties of the particles; The layered particle generation module is used to generate terrain boundary particles in the terrain elevation model using a layered generation algorithm and complete the source particle filling in the source thickness distribution model; The surface geometry modeling module is used to generate a surface geometry model in STL format based on a grid vertex coordinate set using Delaunay triangulation, and then output terrain boundary particle coordinates, source particle coordinates, and STL files that meet the requirements of the SPH solver. This module is used to simulate the interaction between fluid and solid boundaries in debris flows and automatically generate SPH particle models and surface geometry models.
[0076] According to an embodiment of the present invention, the present invention further provides an electronic device, a readable storage medium, and a computer program product.
[0077] In an exemplary embodiment, an electronic device includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in Example 1 above.
[0078] In an exemplary embodiment, the readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method according to the above embodiment 1.
[0079] In an exemplary embodiment, a computer program product includes a computer program, which implements the method according to the above embodiment 1 when executed by a processor.
[0080] The program code for implementing the method of the present invention can be written in any combination of one or more programming languages. Such program code can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device so that when the program code is executed by the processor or controller, the functions / operations specified in the flow chart and / or block diagram are implemented. The program code can be executed entirely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or entirely on a remote machine or server.
[0081] In the context of the present invention, machine-readable medium can be a tangible medium that can contain or store a program for use with an instruction execution system, device or equipment or used in combination with an instruction execution system, device or equipment. Machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable medium can include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. More specific examples of machine-readable storage media can include electrical connections based on one or more lines, portable computer disks, hard disks, random access memories (RAM), read-only memories (ROM), erasable programmable read-only memories (EPROM or flash memory), optical fibers, portable compact disk read-only memories (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0082] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0083] The systems and techniques described herein can be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network (LAN), a wide area network (WAN), and the Internet.
[0084] A computer system may include a client and a server. The client and server are generally remote from each other and typically interact through a communication network. The client-server relationship arises through computer programs running on the respective computers and having a client-server relationship with each other. The server may be a cloud server, a server in a distributed system, or a server integrated with a blockchain.
[0085] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and it should be understood that the scope of protection of the present invention is not limited to such specific descriptions and embodiments. Those skilled in the art can make various other specific variations and combinations based on the technical teachings disclosed in the present invention without departing from the essence of the present invention, and such variations and combinations are still within the scope of protection of the present invention.
Claims
1. A method for automatically generating an SPH particle model and a surface geometry model, characterized in that: The following steps are involved: Construct raster data of terrain elevation model and material source thickness distribution model, and perform data standardization on the raster data to achieve spatial benchmark unification of terrain elevation model and material source thickness distribution model; A resampling equation is established based on the SPH particle diameter parameter, and the resolution of the normalized grid data is resampled by bilinear interpolation to ensure that the grid cell size matches the physical properties of the particles. A hierarchical generation algorithm is used to generate terrain boundary particles in the terrain elevation model and complete the filling of source particles in the source thickness distribution model; Based on the grid vertex coordinate set, Delaunay triangulation is used to generate a surface geometric model in STL format. Then, the terrain boundary particle coordinates, source particle coordinates and STL files that meet the requirements of the SPH solver are output to simulate the interaction between fluid and solid boundaries in debris flows, completing the automatic generation of SPH particle models and surface geometric models.
2. The method for automatically generating an SPH particle model and a surface geometry model according to claim 1, wherein: The data standardization process for the raster data specifically includes the following steps: Perform WGS84 georeferencing on terrain data and source data to normalize the coordinate system of raster data; The discrete data is converted into a unified grid coordinate system through bilinear interpolation to achieve resolution normalization of the raster data; Convert terrain files and source files in GeoTIF format into TXT format to achieve data format normalization of raster data.
3. The method for automatically generating an SPH particle model and a surface geometry model according to claim 1, wherein: The resampling equation is: in, and Indicates the resolution of the resampled raster data. represents the correction factor, Represents the SPH particle diameter parameter.
4. The method for automatically generating an SPH particle model and a surface geometry model according to claim 1, wherein: The generation of terrain boundary particles is specifically as follows: Adopting a particle stacking strategy that decreases layer by layer, with the center of the grid as the center. As the reference point, the global Cartesian coordinate system is converted into a hierarchical coordinate system; In the layered coordinate system, the particle arrangement is controlled by layer order, and the distance between particles in each layer satisfies , represents the minimum distance between particles, represents the safety factor, represents the SPH particle diameter parameter; The scan line algorithm is used within the layer to perform horizontal non-overlap sorting to complete the generation of terrain boundary particles.
5. The method for automatically generating an SPH particle model and a surface geometry model according to claim 4, wherein: The coordinate system transformation model is: in, represents the particle coordinates in the layered coordinate system, and represents the local index of the particle in the cell, , and Indicates the resolution of the resampled raster data. Indicates the terrain elevation corresponding to the particle, Indicates the vertical sequence, Indicates the number of pre-calculated theoretical particle stacking layers, Represents the SPH particle diameter parameter.
6. The method for automatically generating an SPH particle model and a surface geometry model according to claim 1, wherein: The specific method of filling source particles is as follows: A vertical expansion algorithm is constructed based on the source thickness, and the particle spatial distribution constraint conditions are established: in, Indicates the maximum surface terrain elevation corresponding to the particle, represents the thickness of the disaster source, represents the SPH particle diameter parameter; Establish a mapping table between source thickness and number of particle stacking layers, and pre-calculate the theoretical number of particle stacking layers corresponding to the source thickness: in, Indicates the number of pre-calculated theoretical particle stacking layers, Indicates that the value is rounded. Indicates the thickness of the source; Establish a residual feedback mechanism. If the particle spatial distribution constraints are not met, the number of layers will be adjusted. Set the maximum number of layers to prevent overfitting; When the maximum number of layers is satisfied, particles are stacked downward from the surface elevation according to the theoretical number of particle stacking layers to achieve particle filling in the source area. The maximum number of layers is constrained as follows: in, Indicates the maximum number of layers, Indicates rounding up. Indicates the maximum thickness of the provenance area.
7. The method for automatically generating an SPH particle model and a surface geometry model according to claim 1, wherein: When the layered generation algorithm is used to generate the terrain boundary particles in the terrain elevation model and fill the source particles in the source thickness distribution model, the double-layer spacing constraint algorithm is used to control the particle spacing error to ≤0.5 ; The dual-layer spacing constraint algorithm includes global pre-allocation, local fine-tuning and boundary layer encryption technology; Among them, represents the SPH particle diameter parameter; Global pre-allocation is specifically: Calculate the theoretical number of particles , according to the theoretical particle number Pre-allocate grid cells; Local fine-tuning is specifically: calculating the error in the distance between adjacent particles , using the spring-mass model The particles exert virtual forces and converge to the error range through damping iteration; The boundary layer encryption technology is to use the mirror particle method in the near wall area, and d Generate virtual particles at the physical boundary, forcing the real particle spacing to be maintained at (1±0.5) d , suppressing the escape of boundary layer particles.
8. The method for automatically generating an SPH particle model and a surface geometry model according to claim 7, wherein: Theoretical number of particles The calculation formula is: in, represents the maximum cross-sectional area of the particle, represents the SPH particle diameter parameter, Indicates the thickness of the source; Error in the distance between adjacent particles The calculation formula is: in, Indicates the The particle The distance error between particles is Indicates the The radius of the particle, Indicates the The radius of the particle; The calculation formula of virtual force is: in, represents the virtual force, Represents the stiffness coefficient.
9. The method for automatically generating an SPH particle model and a surface geometry model according to claim 1, wherein: Based on the grid vertex coordinate set, Delaunay triangulation is used to generate the surface geometry model in STL format, specifically: Based on grid vertex coordinate sets , use Delaunay triangulation to build a three-dimensional surface model, generate a set of triangular facets that conform to the STL format specification, and then obtain the surface geometry model in STL format; Among them, Represents the total number of grid vertices in the grid vertex coordinate set, Indicates the The coordinates of the grid vertices; The set of triangles that conform to the STL format specification is: in, Represents a set of triangle faces that conform to the STL format specification. Indicates the triangular patches, 、 and Respectively represent the first 、 and The coordinates of the grid vertices.
10. An automatic generation system of SPH particle model and surface geometry model, characterized in that: include: The data processing module is used to construct the raster data of the terrain elevation model and the material thickness distribution model, and perform data standardization on the raster data to achieve the spatial benchmark unification of the terrain elevation model and the material thickness distribution model; Dynamic adaptive resampling module, which is used to establish the resampling equation based on the SPH particle diameter parameter and resample the resolution of the normalized raster data through bilinear interpolation to ensure that the grid cell size matches the physical properties of the particles; The layered particle generation module is used to generate terrain boundary particles in the terrain elevation model using a layered generation algorithm and complete the source particle filling in the source thickness distribution model; The surface geometry modeling module is used to generate a surface geometry model in STL format based on a grid vertex coordinate set using Delaunay triangulation, and then output terrain boundary particle coordinates, source particle coordinates, and STL files that meet the requirements of the SPH solver. This module is used to simulate the interaction between fluid and solid boundaries in debris flows and automatically generate SPH particle models and surface geometry models.
Citation Information
Patent Citations
Three-dimensional modeling and visualization method for landslide danger range prediction
CN114359500A
TIN-based rapid automatic modeling method for MC particle transport in complex terrain scene
CN118470234A
System and method for predicting damage to a virtual vehicle
DE102024132865A1
Method and System for Generating a Mesh
US20190304180A1
Cited By
Debris flow surface SPH particle adaptive processing method and debris flow real-time simulation method
CN121189121A
Mudslide surface spf particle adaptive processing method and mudslide real-time simulation method
CN121189121B