Method and system for automatic generation of sph particle model and surface geometry model

By constructing and processing raster data, and using a hierarchical generation algorithm and Delaunay triangulation to generate SPH particle models and surface geometric models, the problems of low efficiency and insufficient accuracy of existing SPH modeling methods are solved, and efficient and automated multi-source data processing and accurate geometric modeling are achieved.

CN120706202BActive Publication Date: 2026-03-17INST OF MOUNTAIN HAZARDS & ENVIRONMENT CHINESE ACADEMY OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-27
Publication Date
2026-03-17

AI Technical Summary

Technical Problem

Existing SPH modeling methods suffer from low processing efficiency, high data alignment errors, and insufficient geometric accuracy of the model surface.

Method used

By constructing raster data of terrain elevation and material source thickness distribution models, data standardization processing is performed, and a resampling equation is established based on SPH particle diameter parameters. A layered generation algorithm is used to generate particle models, and Delaunay triangulation is combined to generate surface geometric models, thus achieving automated generation.

Benefits of technology

It improves modeling efficiency, reduces data alignment errors, enhances the geometric accuracy of model surfaces, and enables automatic alignment and dynamic resolution optimization of multi-source data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120706202B_ABST
    Figure CN120706202B_ABST
Patent Text Reader

Abstract

This invention belongs to the field of SPH modeling technology, specifically disclosing an automatic generation method and system for SPH particle models and surface geometry models. The method includes: constructing raster data for a terrain elevation model and a source thickness distribution model; performing data standardization to unify the spatial reference of the terrain elevation model and the source thickness distribution model; resampling the standardized raster data to ensure that the raster cell size matches the particle physical properties; generating terrain boundary particles using a layered generation algorithm and completing source particle filling; generating a surface geometry model in STL format based on the raster vertex coordinate set; and outputting particle coordinates and an STL file that meet the requirements of the SPH solver, thus completing the automatic generation of the SPH particle model and surface geometry model. This invention solves the problems of low processing efficiency, high data alignment error, and insufficient surface geometry accuracy in existing SPH modeling methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of SPH modeling technology, specifically relating to an automatic generation method and system for SPH particle models and surface geometry models. Background Technology

[0002] There are three major technical bottlenecks in the current field of numerical simulation modeling of smooth particle hydrodynamics (SPH): (1) Traditional modeling methods rely on manual intervention and are inefficient when dealing with complex terrain; (2) Existing automated tools have poor compatibility with multi-source data and data alignment errors can reach 5-10%; (3) The geometric accuracy of the model surface is insufficient and the distortion rate of common triangular patches exceeds 15%. Summary of the Invention

[0003] The purpose of this invention is to solve the problems of low processing efficiency, high data alignment error and insufficient geometric accuracy of existing SPH modeling methods, and to propose an automatic generation method and system for SPH particle models and surface geometric models.

[0004] The technical solution of the present invention is as follows: Firstly, an automatic generation method for SPH particle models and surface geometric models, comprising the following steps:

[0005] Construct raster data for the terrain elevation model and the material source thickness distribution model, and perform data standardization on the raster data to achieve spatial benchmark unification between the terrain elevation model and the material source thickness distribution model;

[0006] A resampling equation was established based on the SPH particle diameter parameter, and bilinear interpolation was used to resample the standardized raster data at a higher resolution to ensure that the raster cell size matches the particle physical properties.

[0007] A layered generation algorithm is used to generate terrain boundary particles in the terrain elevation model and to fill the source particles in the source thickness distribution model.

[0008] Based on the grid vertex coordinate set, a surface geometry model in STL format is generated using Delaunay triangulation. Then, the terrain boundary particle coordinates, material source particle coordinates, and STL file that meet the requirements of the SPH solver are output to simulate the interaction between fluid and solid boundaries in debris flow, thus completing the automatic generation of SPH particle model and surface geometry model.

[0009] Preferably, the data standardization process for the raster data specifically includes the following steps:

[0010] Perform WGS84 georegistration on topographic and source data to normalize the coordinate system of raster data;

[0011] Discrete data is converted into a unified grid coordinate system through bilinear interpolation, thereby achieving resolution normalization of raster data;

[0012] Convert GeoTIF format terrain files and object source files to TXT format to normalize the data format of raster data.

[0013] Preferably, the resampling equation is:

[0014]

[0015] in, and This indicates the resolution of the resampled raster data. Indicates the correction factor. This represents the diameter parameter of SPH particles.

[0016] Preferably, the generation of terrain boundary particles specifically includes:

[0017] Employing a layer-by-layer decreasing particle stacking strategy, with the grid center... Using the reference point, the global Cartesian coordinate system is transformed into a layered coordinate system;

[0018] In a layered coordinate system, particle arrangement is controlled according to layer sequence, and the particle spacing in each layer satisfies... , Indicates the minimum distance between particles. Indicates the safety factor. This represents the particle diameter parameter of SPH;

[0019] Within each layer, a scanline algorithm is used for horizontal non-overlapping sorting to generate terrain boundary particles.

[0020] As a preferred option, the coordinate system transformation model is as follows:

[0021]

[0022]

[0023]

[0024] in, This represents the particle coordinates in a layered coordinate system. and This represents the local index of the particle within the cell. , and This indicates the resolution of the resampled raster data. This indicates the terrain elevation corresponding to the particle. Indicates the vertical stratigraphic sequence. This represents the pre-calculated theoretical number of particle stacking layers. This represents the diameter parameter of SPH particles.

[0025] As a preferred method, the specific method for filling with source particles is as follows:

[0026] A vertical expansion algorithm is constructed based on the source thickness, and constraints on particle spatial distribution are established:

[0027]

[0028] in, This represents the maximum surface elevation corresponding to the particle. Indicates the thickness of the disaster material source. This represents the particle diameter parameter of SPH;

[0029] Establish a mapping table between source thickness and particle stacking layer number, and pre-calculate the theoretical particle stacking layer number corresponding to the source thickness:

[0030]

[0031] in, This represents the pre-calculated theoretical number of particle stacking layers. This indicates that the value is rounded to the nearest whole number. Indicates the thickness of the material source;

[0032] Establish a residual feedback mechanism to trigger layer adjustment if the particle spatial distribution constraint is not met.

[0033] Set a maximum layer count constraint to prevent overfitting;

[0034] Under the constraint of the maximum number of layers, particles are stacked from the ground elevation downwards according to the theoretical number of particle stacking layers to achieve particle filling of the material source area.

[0035] The maximum number of layers is constrained as follows:

[0036]

[0037] in, Indicates the maximum number of floors. Indicates rounding up. This indicates the maximum thickness of the source region.

[0038] Preferably, a layered generation algorithm is used to generate terrain boundary particles in the terrain elevation model, and a dual-layer spacing constraint algorithm is used to control the particle spacing error to ≤0.5 when filling the source particle in the source thickness distribution model. The two-layer spacing constraint algorithm includes global pre-allocation, local fine-tuning, and boundary layer encryption techniques; among them, This represents the particle diameter parameter of SPH;

[0039] Global pre-allocation specifically involves calculating the theoretical number of particles. According to the theoretical number of particles Pre-allocated grid cells;

[0040] Local fine-tuning specifically involves calculating the error in the distance between adjacent particles. Using a spring-mass model to Virtual forces are applied to the particle pairs, and the process converges to the error range through damping iteration.

[0041] The boundary layer densification technique employs a mirror particle method in the near-wall region, at a distance of 0.5 meters from the solid wall. d Virtual particles are generated at the physical boundary, forcing the spacing between real particles at the physical boundary to remain at (1±0.5). d This inhibits the escape of boundary layer particles.

[0042] As a preferred option, the theoretical number of particles The calculation formula is:

[0043]

[0044] in, This represents the maximum cross-sectional area of ​​the particle. This represents the particle diameter parameter of SPH. Indicates the thickness of the material source;

[0045] Interparticle spacing error The calculation formula is:

[0046]

[0047] in, Indicates the first The first particle The spacing error of individual particles, Indicates the first The radius of each particle, Indicates the first The radius of each particle;

[0048] The formula for calculating virtual force is:

[0049]

[0050] in, Represents virtual force. This represents the stiffness coefficient.

[0051] As a preferred method, a surface geometry model in STL format is generated based on the grid vertex coordinate set using Delaunay triangulation, specifically as follows:

[0052] Based on grid vertex coordinate set A 3D surface model is constructed using Delaunay triangulation, generating a set of triangular facets conforming to the STL format specification, thereby obtaining an STL-formatted surface geometry model; among which, This represents the total number of raster vertices in the raster vertex coordinate set. Indicates the first The coordinates of each grid vertex;

[0053] The set of triangles conforming to the STL format specification is as follows:

[0054]

[0055] in, This represents a set of triangles conforming to the STL format specification. Indicates the first A triangular facet, , and These represent the first vertex coordinates in the grid vertex set. , and The coordinates of each grid vertex.

[0056] The beneficial effects of this invention are:

[0057] 1. This invention ensures optimal matching between grid resolution and particle physical properties through dynamic resampling. Dynamic resampling automatically adjusts the grid resolution based on changes in particle physical properties (such as density, velocity gradient, temperature gradient, etc.).

[0058] 2. This invention employs coordinate transformation and layer sequence control to achieve non-overlapping particle arrangement. By transforming the coordinate system (mapping the global Cartesian coordinate system to a layered coordinate system), particles can be converted from one coordinate system to another, allowing each layer of particles to be arranged along a specific geometric direction (such as the normal direction). This better arranges the particle positions and places particles according to a certain layered order, thereby avoiding particle overlap and improving computational efficiency. For example, after layering, particles can be processed layer by layer, reducing cross-layer interaction calculations.

[0059] 3. This invention uses a source thickness-particle stacking layer mapping table to pre-calculate the required particle configuration. For example, it determines the number of layers and the diameter of each particle based on the source thickness. This allows for rapid parameter setting during modeling, eliminating the need for repeated trial and error. Furthermore, given two of the parameters, a third parameter can be easily calculated, facilitating model design and adjustment.

[0060] Secondly, an automatic generation system for SPH particle models and surface geometry models includes:

[0061] The data processing module is used to construct raster data for the terrain elevation model and the material source thickness distribution model, and to perform data standardization processing on the raster data to achieve spatial benchmark unification between the terrain elevation model and the material source thickness distribution model.

[0062] The dynamic adaptive resampling module is used to establish a resampling equation based on the SPH particle diameter parameter, and to perform resolution resampling on the standardized raster data through bilinear interpolation to ensure that the raster cell size matches the particle physical properties.

[0063] The layered particle generation module is used to generate terrain boundary particles in the terrain elevation model using a layered generation algorithm, and to fill the material source particles in the material source thickness distribution model.

[0064] The surface geometry modeling module is used to generate surface geometry models in STL format based on grid vertex coordinate sets and Delaunay triangulation. It then outputs terrain boundary particle coordinates, material source particle coordinates, and STL files that meet the requirements of the SPH solver. This is used to simulate the interaction between fluid and solid boundaries in debris flows and to automatically generate SPH particle models and surface geometry models. Attached Figure Description

[0065] Figure 1 The diagram shows a flowchart of an automatic generation method for SPH particle models and surface geometry models.

[0066] Figure 2 The diagram shows a parallel acceleration architecture. Detailed Implementation

[0067] 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 drawings are merely exemplary and are intended to illustrate the principles and spirit of the invention, and are not intended to limit the scope of the invention.

[0068] Example 1:

[0069] like Figure 1 As shown, an automatic generation method for SPH particle models and surface geometry models includes the following steps:

[0070] S1. Construct raster data for the terrain elevation model and the material source thickness distribution model, and perform data standardization processing on the raster data to achieve spatial benchmark unification between the terrain elevation model and the material source thickness distribution model;

[0071] The terrain elevation model and the source thickness distribution model can be used for debris flow terrain elevation model (z.txt) and source thickness distribution model (h.txt). In debris flow simulation, the same modeling process is adapted to liquid slurry (…). =0.2mm) and solid particles ( Hybrid modeling (=4mm) is used, meaning SPH particles can be liquid slurry and solid particles.

[0072] S2. A resampling equation is established based on the SPH particle diameter parameter, and bilinear interpolation is used to resample the standardized raster data to ensure that the raster cell size matches the particle physical properties.

[0073] S3. Use a layered generation algorithm to generate terrain boundary particles in the terrain elevation model and complete the material source particle filling in the material source thickness distribution model;

[0074] S4. Based on the grid vertex coordinate set, a surface geometry model in STL format is generated using Delaunay triangulation. Then, the terrain boundary particle coordinates, material source particle coordinates, and STL file that meet the requirements of the SPH solver are output to simulate the interaction between fluid and solid boundaries in debris flow, thus completing the automatic generation of SPH particle model and surface geometry model.

[0075] In this embodiment, the data standardization process for raster data specifically includes the following steps:

[0076] Perform WGS84 georegistration on topographic and source data to normalize the coordinate system of raster data;

[0077] Discrete data is converted into a unified grid coordinate system through bilinear interpolation, thereby achieving resolution normalization of raster data;

[0078] Convert GeoTIF format terrain files and object source files to TXT format to normalize the data format of raster data.

[0079] In this embodiment, the resampling equation is:

[0080]

[0081] in, and This indicates the resolution of the resampled raster data. Indicates the correction factor. This represents the diameter parameter of SPH particles.

[0082] This invention proposes a resolution adaptive mechanism: dynamic resampling ensures the optimal match between grid resolution and particle physics properties.

[0083] In particle-based numerical simulations, particle physical properties such as density and velocity vary with time and spatial location. Dynamic resampling automatically adjusts the raster resolution based on these changes in particle physical properties (e.g., density, velocity gradients, temperature gradients). For example, in simulating fluid flow, complex physical phenomena such as vortices may occur in high-gradient regions within the fluid. These regions exhibit significant variations in particle density and velocity gradients. In such cases, an adaptive resolution mechanism can increase the raster resolution in these regions, automatically increasing the sampling density. This allows for more accurate capture of the details of particle physical properties (e.g., surface tension, turbulent vortices) within small-scale physical phenomena. For relatively stable regions, the resolution can be reduced to minimize redundant computations, balancing simulation accuracy and computational efficiency.

[0084] In this embodiment, generating terrain boundary particles specifically involves:

[0085] Employing a layer-by-layer decreasing particle stacking strategy, with the grid center... Using the reference point, the global Cartesian coordinate system is transformed into a layered coordinate system;

[0086] In a layered coordinate system, particle arrangement is controlled according to layer sequence, and the particle spacing in each layer satisfies... , Indicates the minimum distance between particles. Indicates the safety factor. , This represents the particle diameter parameter of SPH;

[0087] Within each layer, a scanline algorithm is used for horizontal non-overlapping sorting to generate terrain boundary particles.

[0088] In this embodiment, the coordinate system transformation model is as follows:

[0089]

[0090]

[0091]

[0092] in, This represents the particle coordinates in a layered coordinate system. and This represents the local index of the particle within the cell. , and This indicates the resolution of the resampled raster data. This indicates the terrain elevation corresponding to the particle. Indicates the vertical stratigraphic sequence. This represents the pre-calculated theoretical number of particle stacking layers. This represents the diameter parameter of SPH particles.

[0093] In this embodiment, the method for filling with source particles is as follows:

[0094] A vertical expansion algorithm is constructed based on the source thickness, and constraints on particle spatial distribution are established:

[0095]

[0096] in, This represents the maximum surface elevation corresponding to the particle. Indicates the thickness of the disaster material source. This represents the particle diameter parameter of SPH;

[0097] Establish a mapping table between source thickness and particle stacking layer number, and pre-calculate the theoretical particle stacking layer number corresponding to the source thickness:

[0098]

[0099] in, This represents the pre-calculated theoretical number of particle stacking layers. This indicates that the value is rounded to the nearest whole number. Indicates the thickness of the material source;

[0100] Establish a residual feedback mechanism to trigger layer adjustment if the particle spatial distribution constraint is not met.

[0101] Set a maximum layer count constraint to prevent overfitting;

[0102] Under the constraint of the maximum number of layers, particles are stacked from the ground elevation downwards to achieve particle filling of the material source region.

[0103] The maximum number of layers is constrained as follows:

[0104]

[0105] in, Indicates the maximum number of floors. Indicates rounding up. This indicates the maximum thickness of the source region.

[0106] This invention proposes a layered generation algorithm: using coordinate transformation and layer order control to achieve non-overlapping particle arrangement.

[0107] In the construction of particle systems, non-overlapping arrangement is one of the key requirements. Coordinate transformation (mapping the global Cartesian coordinate system to layered coordinate systems such as cylindrical or spherical coordinates) can transform particles from one coordinate system to another, allowing particles in each layer to be arranged along specific geometric directions (such as the normal direction) for better particle placement. Hierarchical control involves placing particles according to a certain hierarchical order. First, layers are defined based on the thickness of the source material or physical boundaries (such as the solid-wall distance), and the spacing between particles in each layer satisfies… ( k =1.1−1.5 is the safety factor); secondly, a grid index is used within each layer for horizontal sorting to ensure that particles do not overlap in the two-dimensional plane (e.g., by detecting and adjusting particle positions through a scanline algorithm). For example, when constructing a three-dimensional particle model, the positions of the bottom-layer particles can be determined first, and then the positions of the upper-layer particles can be determined based on the positions of the bottom-layer particles and certain rules (e.g., certain spacing). In this way, particles are arranged upwards sequentially, thereby avoiding overlap between particles and potentially improving computational efficiency, such as processing by layer after layering, reducing cross-layer interaction calculations.

[0108] In this embodiment, the present invention also proposes a parametric modeling system: establishing particle diameter -Number of floors -Source thickness ( The mathematical correlation model realizes a positive mapping from "physical target to parameter configuration": ,in This represents the interlayer gap coefficient (empirical value 0.1). -0.3 This needs to be adjusted based on material properties (such as compressibility).

[0109] Generally, the thickness of the material source is affected by the particle diameter and the number of layers. For example, assuming the particles are uniformly arranged spherical particles, the material source thickness can be approximated as the particle diameter multiplied by the number of layers. Simultaneously, the determination of the number of layers is also limited by the particle diameter and the material source thickness. By establishing such a mathematical correlation model, the required particle configuration can be pre-calculated, such as determining the number of layers and the particle diameter per layer based on the material source thickness. This allows for rapid parameter setting during modeling, eliminating the need for repeated trial and error. Furthermore, given two of the parameters, the third parameter can be easily calculated, facilitating model design and adjustment.

[0110] In this embodiment of the invention, a two-layer spacing constraint algorithm is also designed, including a global pre-allocation mechanism and a local fine-tuning mechanism.

[0111] The global pre-allocation mechanism specifically involves calculating the theoretical number of particles based on the parameterized model. :

[0112]

[0113] in, This represents the cross-sectional area. Grid cells are pre-allocated using a spatial hash table, with each cell having a preset particle number threshold.

[0114] The local fine-tuning mechanism specifically involves calculating the error in the distance between adjacent particles.

[0115]

[0116] in, Indicates the first The first particle The spacing error of individual particles, Indicates the first The radius of each particle, Indicates the first The radius of each particle; using a spring-particle model for... Particles exert virtual forces:

[0117]

[0118] in, Represents virtual force. This represents the stiffness coefficient, which converges to the error range through damping iteration.

[0119] This invention also includes a boundary layer encryption technique that utilizes a mirror particle method in the near-wall region, at a distance of 0.5 meters from the solid wall. d Virtual particles are generated at the physical boundary, forcing the spacing between real particles near the physical boundary to remain at (1±0.5). d This inhibits the escape of boundary layer particles.

[0120] This invention also includes an error verification mechanism. By establishing a statistical histogram of particle spacing, the error distribution is monitored in real time, and local resampling is triggered in areas exceeding the threshold to ensure global accuracy consistency.

[0121] In this embodiment, based on the grid vertex coordinate set, a surface geometry model in STL format is generated using Delaunay triangulation, specifically as follows:

[0122] Based on grid vertex coordinate set A 3D surface model is constructed using Delaunay triangulation, generating a set of triangular facets conforming to the STL format specification, thereby obtaining an STL-formatted surface geometry model; among which, This represents the total number of raster vertices in the raster vertex coordinate set. Indicates the first The coordinates of each grid vertex are determined by the terrain boundary particle generation algorithm and the material source particle filling mechanism.

[0123] The set of triangles conforming to the STL format specification is as follows:

[0124]

[0125] in, This represents a set of triangles conforming to the STL format specification. Indicates the first A triangular facet, , and These represent the first vertex coordinates in the grid vertex set. , and The coordinates of each grid vertex.

[0126] This invention achieves the following by constructing an intelligent modeling system: (1) automatic alignment of multi-source data; (2) dynamic resolution optimization (improving modeling efficiency by 3 times); and adaptive surface optimization.

[0127] This invention designs an automated modeling process: enabling one-click generation from raw data to an SPH model, which can greatly improve work efficiency.

[0128] The automatic generation method for SPH particle models and surface geometry models in this invention is based on a hybrid parallel strategy of OpenMP / MPI, and is suitable for multi-node CPU clusters or GPU acceleration. The parallel acceleration architecture diagram is shown below. Figure 2 As shown, the layered generation stage uses a scanline algorithm instead of traditional global collision detection, reducing the time complexity from... O ( N 2 ) down to O ( N log N The resolution adaptive module integrates Early Termination Search, which skips resampling when the local gradient falls below a threshold.

[0129] In terms of hardware acceleration adaptation, this invention implements the particle neighborhood search kernel function on the GPU side and utilizes CUDA's Grid / Block / Thread structure to compute the K nearest neighbors of each particle in parallel, achieving an acceleration of 8-10 times compared to CPU serial computation. Memory management employs pinned memory combined with asynchronous data transmission (CUDA Streams) to hide host-device communication latency. As shown in Table 1, this method offers superior performance compared to traditional methods.

[0130] Table 1 Performance Comparison Data

[0131]

[0132] Meanwhile, the SPH particle model and surface geometry model constructed by the method proposed in this invention possess geometric compatibility and physical consistency.

[0133] Geometric compatibility: It can ensure that the output particle coordinates satisfy the solver's coordinate system (such as GANDALF's right-handed system and LIGGGHTS's LAMMPS compatible coordinate system), and supports solvers as 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).

[0134] Physical consistency: Mass conservation verification: (Error ≤ 0.1%); Energy initialization: Pre-calculate the initial internal energy based on the equation of state, and adapt the state equation interface to different solvers.

[0135] Table 2 List of Supported Solvers

[0136]

[0137] The SPH particle model and surface geometry model constructed by the method proposed in this invention have parameter scalability and support automatic adaptation for particle sizes ranging from 0.1 to 5.0 mm. Specifically:

[0138] 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 At that time, coarse-graining is used to merge multiple physical particles into computational particles, reducing the total number of particles.

[0139] The adaptive material properties are shown in Table 3.

[0140] Table 3 Adaptive Material Properties

[0141]

[0142] Example 2:

[0143] Based on Example 1, this embodiment of the invention verifies the technical effect of the method proposed in this invention by focusing on debris flow simulation modeling.

[0144] In debris flow simulation, the same modeling process is adapted to liquid slurry ( =0.2mm) and solid particles ( Hybrid modeling (=4mm):

[0145] The liquid slurry uses 5 layers of particles with a resolution of 0.25 mm to capture the details of slurry flow;

[0146] As coarse-grained particles, solid particles contain 10-20 physical particles per layer. The average stress obtained in the experiment was 13.65 kPa, while the average stress calculated in the simulation was 14.46 kPa. The calculation efficiency was improved by 2.3 times, while maintaining the accuracy of dynamics (the error compared with the experimental data is ≤6%).

[0147] Example 3:

[0148] Based on Example 1, this embodiment of the invention provides an automatic generation system for SPH particle models and surface geometry models, which can be used to implement the automatic generation method for SPH particle models and surface geometry models as described in Example 1 above. The system includes:

[0149] The data processing module is used to construct raster data for the terrain elevation model and the material source thickness distribution model, and to perform data standardization processing on the raster data to achieve spatial benchmark unification between the terrain elevation model and the material source thickness distribution model.

[0150] The dynamic adaptive resampling module is used to establish a resampling equation based on the SPH particle diameter parameter, and to perform resolution resampling on the standardized raster data through bilinear interpolation to ensure that the raster cell size matches the particle physical properties.

[0151] The layered particle generation module is used to generate terrain boundary particles in the terrain elevation model using a layered generation algorithm, and to fill the material source particles in the material source thickness distribution model.

[0152] The surface geometry modeling module is used to generate surface geometry models in STL format based on grid vertex coordinate sets and Delaunay triangulation. It then outputs terrain boundary particle coordinates, material source particle coordinates, and STL files that meet the requirements of the SPH solver. This is used to simulate the interaction between fluid and solid boundaries in debris flows and to automatically generate SPH particle models and surface geometry models.

[0153] According to embodiments of the present invention, the present invention also provides an electronic device, a readable storage medium, and a computer program product.

[0154] 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 executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method as described in Embodiment 1 above.

[0155] In an exemplary embodiment, the readable storage medium may be a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method described in Embodiment 1 above.

[0156] In an exemplary embodiment, the computer program product includes a computer program that, when executed by a processor, implements the method described in Embodiment 1 above.

[0157] The program code used to implement the methods of the present invention can be written in any combination of one or more programming languages. This program code can be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing device, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code can be executed entirely on the machine, partially on the machine, as a standalone software package partially on the machine and partially on a remote machine, or entirely on a remote machine or server.

[0158] In the context of this invention, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. Machine-readable media can include, but are not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0159] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, 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 sound input, voice input, or tactile input).

[0160] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0161] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact via communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other. Servers can be cloud servers, servers in distributed systems, or servers incorporating blockchain technology.

[0162] Those skilled in the art will recognize that the embodiments described herein are intended to help the reader understand the principles of the invention, and should be understood that the scope of protection of the invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific modifications and combinations based on the technical teachings disclosed in this invention without departing from the spirit of the invention, and these modifications and combinations are still within the scope of protection of this invention.

Claims

1. A method for automatic generation of SPH particle model and surface geometry model, characterized in that, The method comprises the following steps: Grid data of the terrain elevation model and the source thickness distribution model are constructed, and data standardization processing is performed on the grid data to unify the spatial reference of the terrain elevation model and the source thickness distribution model; A resampling equation is established based on a SPH particle diameter parameter, and resolution resampling is performed on the standardized grid data through bilinear interpolation to ensure that the grid cell size matches the physical characteristics of the particles; A layered generation algorithm is used to generate terrain boundary particles in the terrain elevation model, and source particle filling in the source thickness distribution model is completed; Based on a set of grid vertex coordinates, a surface geometry model in STL format is generated through Delaunay triangulation, and then terrain boundary particle coordinates, source particle coordinates and an STL file meeting the requirements of a SPH solver are output to simulate the interaction between fluid and solid boundaries in a debris flow, and automatic generation of the SPH particle model and the surface geometry model is completed.

2. The method of claim 1, wherein, The data standardization processing on the grid data specifically comprises the following steps: WGS84 geographical registration is performed on the terrain data and the source data to normalize the coordinate system of the grid data; Discrete data is converted into a unified grid coordinate system through bilinear interpolation to normalize the resolution of the grid data; GeoTIF format terrain files and source files are converted into TXT format to normalize the data format of the grid data.

3. The method of claim 1, wherein the SPH particle model and surface geometry model are automatically generated by: The resampling equation is: wherein, and denotes the resolution of the resampled grid data, denotes a correction factor, denotes a SPH particle diameter parameter.

4. The method of claim 1, wherein the SPH particle model and surface geometry model are automatically generated. The terrain boundary particles are generated in the following manner: A layer-by-layer decreasing particle stacking strategy is adopted to stack the particles in the center of the grid The global Cartesian coordinate system is converted into a layered coordinate system with the center of the grid as the reference point; In the hierarchical coordinate system, the particle arrangement is controlled according to layer sequence, and the particle spacing of each layer satisfies , represents the minimum particle spacing, represents the safety factor, represents the SPH particle diameter parameter; Intra-layer scanning line algorithm is used for horizontal non-overlapping sorting to complete the generation of the terrain boundary particles.

5. The method of claim 4, wherein the SPH particle model and surface geometry model are automatically generated by: The coordinate system transformation model is: wherein, represents the particle coordinates in the layered coordinate system, and represents the local index of the particle within the cell, , and represents the resolution of the resampled grid data, represents the terrain elevation corresponding to the particle, represents the vertical direction layer sequence, represents the pre-computed theoretical number of particle stack layers, represents the SPH particle diameter parameter.

6. The method of claim 1, wherein, The method for source particle filling is specifically as follows: A vertical expansion algorithm is established based on the source thickness to establish a particle space distribution constraint condition: wherein, represents a surface topography elevation maximum value corresponding to the particle, represents a disaster source thickness, represents a SPH particle diameter parameter; A source thickness-particle stacking layer mapping table is established to pre-calculate the theoretical particle stacking layers corresponding to the source thickness: wherein, represents a pre-computed theoretical number of particle stack layers, represents rounding off the value, represents the source thickness; A residual feedback mechanism is established, and if the particle space distribution constraint condition is not met, the layer number is adjusted; A maximum layer number constraint is set to prevent overfitting; Under the condition of meeting the maximum layer number constraint, the particles are stacked downward from the terrain elevation according to the theoretical particle stacking layers to realize the particle filling in the source area; The maximum layer number constraint is: wherein, represents the maximum number of layers, represents the ceiling function, represents the maximum thickness of the source region.

7. The method of claim 1, wherein the SPH particle model and surface geometry model are automatically generated by: When the terrain boundary particles in the terrain elevation model are generated by using the hierarchical generation algorithm, and the source particles in the source thickness distribution model are filled, a double-layer spacing constraint algorithm is used to control the particle spacing error to be less than or equal to 0.5 The double-layer spacing constraint algorithm includes global pre-allocation, local fine-tuning and boundary layer encryption technology; wherein, D represents the diameter parameter of the SPH particle. The global pre-allocation is specifically: calculating a theoretical particle number , pre-allocating grid cells according to the theoretical particle number . The local fine-tuning specifically includes: calculating the error of the distance between adjacent particles , applying a virtual force to the particle pair using a spring-mass model, and converging to the error range through damping iteration; The boundary layer encryption technique is to generate virtual particles at 0.5 d distance from the solid wall by using the mirror particle method in the near-wall region, and to maintain the real particle spacing at the physical boundary at (1±0.5) d , and to suppress the escape of boundary layer particles.

8. The method of claim 7, wherein the SPH particle model and surface geometry model are automatically generated by: Theoretical particle number The calculation formula is: wherein, represents the maximum cross-sectional area of the particle, represents the SPH particle diameter parameter, represents the source thickness; Neighboring particle spacing error The formula for calculating the error is: wherein, represents the radius of the first particle, represents the spacing error of the first particle, represents the radius of the first particle, represents the radius of the first The calculation formula of the virtual force is: wherein represents a virtual force, represents a stiffness coefficient.

9. The method of claim 1, wherein, Based on the set of grid vertex coordinates, a surface geometry model in STL format is generated through Delaunay triangulation, and the specific process is as follows: A set of grid vertex coordinates , a three-dimensional surface model is constructed by using Delaunay triangulation, a triangle facet set conforming to the STL format specification is generated, and then a surface geometric model in STL format is obtained; wherein, represents the total number of grid vertices in the set of grid vertex coordinates, represents the coordinates of the th grid vertex. The triangular facet set meeting the STL format specification is: wherein, represents a collection of triangular facets conforming to the STL format specification, represents the th triangular facet, , and represent the coordinates of the , and th grid vertex in the grid vertex coordinate set, respectively.

10. A system for automatic generation of SPH particle model and surface geometry model, characterized in that, The method comprises the following steps: A data processing module is configured to construct grid data of a terrain elevation model and a source thickness distribution model, and perform data standardization processing on the grid data to unify the spatial reference of the terrain elevation model and the source thickness distribution model; A dynamic adaptive resampling module is configured to establish a resampling equation based on a SPH particle diameter parameter, and perform resolution resampling on the standardized grid data through bilinear interpolation to ensure that the grid cell size matches the physical characteristics of the particles; A layered particle generation module is configured to generate terrain boundary particles in the terrain elevation model through a layered generation algorithm, and complete source particle filling in the source thickness distribution model. The surface geometry modeling module is used for generating a surface geometry model in STL format by using Delaunay triangulation based on the set of grid vertex coordinates, and then outputting terrain boundary particle coordinates, source particle coordinates and an STL file meeting the requirements of an SPH solver, so as to simulate the interaction between fluid and solid boundaries in a debris flow and complete the automatic generation of the SPH particle model and the surface geometry model.

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