A simulation software skin particle generation method adaptive to complex geometry
By generating boundary particles and traversing the global space using a non-recursive flood filling method, the problems of slow generation speed and memory overflow of multi-connected particles in complex scenarios are solved, achieving efficient generation of multi-connected particles and high-precision simulation.
Patent Information
- Application Number
- CN202411235990.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-04
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2044-09-04
AI Technical Summary
Existing particle generation methods struggle to achieve high-precision simulations of multi-body, multi-phase states in complex scenarios, especially in the generation of multi-connected particles, where computation is slow and inefficient, and recursive implementations are prone to memory overflow.
A non-recursive flood fill method is used to generate boundary particles. The connectivity between particles is determined by the flood fill method, and particles in a single connected body are generated. The global space is traversed to generate particles in a multi-connected body, thus avoiding memory overflow caused by recursive calls and improving computational efficiency.
It achieves efficient generation of multi-connected particles in complex geometric scenes, supports high-precision simulation at high resolution, improves calculation speed and stability, and meets the high-precision simulation requirements of multi-physics and multi-phase states.
Smart Images

Figure CN119249836B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to a kind of simulation software skin particle generation method suitable for complex geometry, belong to computer simulation and industrial software technical field. BACKGROUND
[0002] Computer simulation software as an important part of industrial software, is a powerful tool to guide product design, research and development, test.Simulation software can simulate tsunami, car wading and other scenarios, help to deal with natural disasters, design improvements car shape, etc.
[0003] The specific implementation means of computer simulation software includes grid method and particle method.Among them, particle method is an important supplement to traditional grid method, especially suitable for simulation of complex problems such as large deformation and moving boundary.The spatial distribution of particles has a great influence on the calculation accuracy and stability of particle method.The ideal particle distribution is uniform and can accurately describe the geometric and physical information.The existing particle generation methods, such as lattice method, grid method and physical combination method, have the problems of slow speed and non-skin.
[0004] At present, simulation has achieved good results for simple physical scene problems.But it is still a very challenging problem to ensure high-precision simulation of different multi-physical bodies and multi-phase in complex scenes.The premise of accurate calculation of these multi-body and multi-phase problems is to accurately describe the interface between multi-body and multi-phase.In particle-based simulation method, it can be abstracted as particle generation of multi-connected body.Accurate description of complex interfaces of multi-body and multi-phase often requires high resolution, that is, more particles and larger calculation space.This poses a challenge to the speed and efficiency of multi-connected body particle generation method.Therefore, it is necessary to study a fast and feasible multi-connected body particle generation method. SUMMARY
[0005] The purpose of the present application is to creatively propose a simulation software skin particle generation method suitable for complex geometry in view of the problems and deficiencies of the prior art.
[0006] The method first generates boundary particles in the problem domain according to the geometric description of the given boundary, then traverses the entire problem domain space and applies the flood fill method to judge the connectivity between all particles to obtain particles of different connected regions.The non-recursive version of the flood fill method is used to avoid stack overflow caused by large particle size recursion.When the boundary particles are generated once, the flood fill method is applied to avoid the need for multiple calculations of traditional point body relationship judgment in other methods, and the generation speed of each connected body particle in the subsequent global is greatly improved.
[0007] The method is especially suitable for particle generation of multi-connected bodies in complex geometry under high resolution, and guarantees the demand of high-precision simulation of different multi-physical bodies and multi-phase states of computer simulation software under complex scenes.
[0008] In order to achieve the above object, the present application adopts the following technical scheme.
[0009] Firstly, the concept content involved in the present application is explained.
[0010] 1. Particle. It is a basic research unit in the particle-based simulation method. Each particle has geometric and physical information such as position, normal vector, velocity, etc. In the present application, only the position information of the particle is investigated.
[0011] 2. Geometry. It describes the internal structure and external surface of an object, which is composed of points, lines, surfaces, bodies, etc.
[0012] 3. Topology. It is a branch of geometry that studies the invariance of the overall properties of a graph (or set) under continuous deformation. It includes the connection and distance relationship between elements such as points, lines, surfaces, and bodies in geometric space.
[0013] 4. Multi-connected body. Different bounded objects separated by boundaries. In topological space, it means that all closed curves can be continuously shrunk to a few points.
[0014] 5. Complex geometry. In the present application, it refers to a geometric configuration separated by an irregular-shaped boundary surface. The complex boundary surface composed of triangular patches in space may be concave-convex, high-curvature, and multi-connected.
[0015] 6. Lattice. It is a periodic geometric structure in three-dimensional space. Common ones include cubes, etc.
[0016] 7. Flood fill method. It is a classic algorithm for extracting several connected points from a region and distinguishing them from other adjacent regions (or coloring them differently). It is named after the idea that the flood spreads from one region to all reachable regions.
[0017] 8. Recursion. It refers to the method of using the function itself in the definition of the function. Recursive implementation is concise and easy to use, but when the number of execution layers is large, the function call efficiency is low, and it may cause memory overflow. At this time, it is necessary to rewrite the recursive implementation into a non-recursive implementation of stack loop.
[0018] 9. STL file (STereoLithography, stereolithography). It is a file format for representing three-dimensional surface geometry. It is composed of a series of triangular patches with three vertex coordinates and three-dimensional normal vector information.
[0019] 10. VTK file (Visualization Toolkit) It is a dataset file that can carry various information, and can save particle data with various physical parameter values.
[0020] A simulation software skin particle generation method suitable for complex geometry, including boundary particle generation, single connected body particle obtained by flood filling method, and different connected region particles obtained by traversal.
[0021] Step 1: Set the initial parameter value, including particle spacing margin, STL file path, boundary thickness, boundary direction, and initial generation point.
[0022] Step 2: Analyze the STL file describing the geometric configuration to obtain the vertex coordinates and normal vector information of each boundary triangular face.
[0023] Step 3: Generate boundary particles.
[0024] Step 4: Based on the initial generation point and boundary particle information, use the non-recursive flood filling method to generate single connected body particles inside the boundary.
[0025] Step 5: Traverse the global space to generate global multi-connected body particles.
[0026] Step 6: Sort and output the most connected body particles in separate files.
[0027] Advantages
[0028] Compared with the prior art, the method has the following advantages:
[0029] 1. Under the same lattice distribution framework, the method can generate boundary particles of different thicknesses, and can choose to thicken the boundary particles along the normal vector direction or in the opposite direction. This provides a solid and flexible implementation basis for the subsequent flood filling method. If the initial boundary particle thickness is not suitable, it will seriously damage the effectiveness of the subsequent flood filling method, resulting in disconnected region particles also becoming the same connected body particles. The method also provides the function of sorting and outputting particles in separate files, which facilitates the visualization and inspection of multi-connected body distribution.
[0030] 2. The method supports the generation of all particles in the connected body where the specified point is located, and also supports the generation of particles under regional limitation conditions. The multi-connected body particle generation method is based on the single-connected body particle generation method based on the initial generation point. The particle in the space that is not marked with the connected body number is taken as the initial generation point, the connected body number of each near neighbor particle connected by the particle is marked, and the corresponding particle is generated.
[0031] 3. This method achieves efficient generation of multi-connected particles. It employs a flood-fill algorithm to generate all multi-connected particles in space, marking adjacent non-boundary particles as belonging to the same connected component from the initial generation point. This is significantly more efficient than traditional point-volume relationship determination methods that require multiple calculations. Furthermore, the flood-fill algorithm in this method uses a stack-based non-recursive implementation, avoiding inefficient multi-level function calls and the resulting memory overflow problems, thus meeting the requirement for efficient generation of large-scale particles. Attached Figure Description
[0032] Figure 1 This is a flowchart of the method.
[0033] Figure 2 This is a schematic diagram of boundary particle generation.
[0034] Figure 3 A schematic diagram of generating particles within a connected body using the flood filling method. Detailed Implementation
[0035] The present invention will now be described in further detail with reference to the accompanying drawings.
[0036] like Figure 1 As shown, a method for generating body-fitted particles in simulation software adapted to complex geometries is presented. First, the initial geometry or mesh information is parsed. Based on parameters such as boundary particle thickness and boundary orientation, boundary particles are generated according to the distance from lattice points to the geometry. Then, based on given or traversed initial generation points, a non-recursive flood-fill method is applied to generate particles within a single connected volume. When it is necessary to generate particles within all connected volumes in the global space, the initial generation points of subsequent unattached connected volumes are globally traversed until the global space lattice traversal is completed, resulting in global multi-connected volume particles.
[0037] Specifically, it includes the following processes:
[0038] Step 1: Set initial parameter values. This includes setting the initial particle spacing margin, STL file path, boundary thickness, boundary direction, and initial generation point.
[0039] Step 2: Parse the STL file describing the geometric configuration to obtain the vertex coordinates and normal vector information of each boundary triangle.
[0040] Step 3: Generate boundary particles based on parameters such as boundary thickness and boundary direction. Traverse all lattice points in space; if the distance between a point and the geometric configuration is less than or equal to the preset boundary thickness parameter, then generate a boundary particle at that point.
[0041] like Figure 2As shown in the figure, the generation of boundary particles in two dimensions is taken as an example. The distance between a lattice point in the calculation space and the geometry is calculated. If the distance is less than the boundary thickness parameter, a boundary particle is marked for generation. In the figure, the boundary thickness parameter is 0.5h, and h is the particle interval. The method supports using different boundary thickness parameters in the normal direction in the forward and reverse directions. In this way, the particles generated in the positive normal direction or the negative normal direction of the connected body can be better preserved.
[0042] Specifically, step 3 includes the following steps:
[0043] Step 3.1: Generate thickened multi-layer boundary particles.
[0044] Thickened boundary particles can better ensure the connectedness of the connected body, but will lose the particles corresponding to several layers on the boundary of each connected body. At a low resolution, the true connectivity of the particles generated in the complex connected body in the complex geometry cannot be guaranteed.
[0045] Step 3.2: Generate boundary particles in the normal direction of the geometry surface.
[0046] For example, if the lattice point is in the normal direction of the geometry configuration and the distance from the geometry configuration is less than or equal to the preset parameter boundary thickness, a boundary particle is generated at the point.
[0047] The boundary particles generated in the positive normal direction are thickened, and the single-connected body particles generated on the negative normal side of the geometry configuration after flood filling are closer to the boundary and more consistent with reality.
[0048] Step 4: Generate single-connected body particles inside the boundary according to the initial generation point and the boundary particle set using a non-recursive flood filling method.
[0049] For example, Figure 3As shown, for ease of drawing and discussion, the particles in the single connected body in two dimensions are taken as an example. Among them, (i) the subgraph describes the lattice points in the global space before flood filling, the boundary particle points, and the initial generation points, which are represented by small hollow circles, small solid gray circles, and large hollow circles with serial numbers, respectively. (ii) The subgraph describes the order of the neighbor points in the flood filling algorithm. As shown in (ii) the subgraph, the order of the stack in this method is the clockwise sequence starting from the right neighbor point. (iii) The subgraph describes the particles 1 and 2 in the same connected body after marking two neighbor particle points, and at this time the stack from bottom to top is a, b, c, d, e, f. The order of the stack is the sequence of the current point after marking, and the circle point sequence is recursively judged. (iv) The subgraph describes the particles in the same connected body generated by the method, that is, the large hollow circle surrounded by the small solid gray circle (boundary particle). The figure shows the first 10 digital serial numbers of the marked particles in the same connected body, and at this time the stack is waiting to be marked lattice points e, d, c, b, a. The order of traversing the neighbor points shown in the figure is the counterclockwise sequence starting from the top, and only the four neighbor points in the two-dimensional plane are traversed, and the six neighbor points in the three-dimensional space are traversed.
[0050] Specifically, step 4 includes the following steps:
[0051] Step 4.1: Mark the connected body number of the initial generation point, sequentially traverse the neighbor lattice points around the initial generation point, and sequentially add the neighbor points of the non-boundary particles which have not been marked as other connected body numbers to the stack to be marked.
[0052] Figure 3 The order of traversing the neighbor points shown in the figure is the counterclockwise sequence starting from the top, and only the four neighbor points in the two-dimensional plane are traversed, and the six neighbor points in the three-dimensional space are traversed.
[0053] Step 4.2: Mark the point to be marked at the top of the stack according to step 4.1 and delete the point in the stack. If there is a new neighbor point to be marked which has not been marked with a connected body number, it is sequentially added to the top of the stack. If the stack is empty at this time, the flood filling method is exited, and the recursive process of marking the particle set in the connected body is exited.
[0054] Step 5: Traverse the global space to generate the global multi-connected body particles.
[0055] Specifically, step 5 includes the following steps:
[0056] After obtaining the boundary particles according to the initial parameters, the particle set in the connected body of any initial generation point in the global space can be quickly generated.
[0057] Step 5.1: Select an initial generation point of a non-boundary particle which has not been marked with a connected body number according to the coordinate sequence.
[0058] Step 5.2: According to the selected initial generation point, the flood fill method is executed to mark the particle set of the connected body.
[0059] Step 5.3: If the initial generation point of the non-boundary particle which has not been marked with the connected body number is still not found after the traversal of the entire local space, the global multi-connected body particle generation process is exited.
[0060] Step 6: The connected body particles with the most particles are sorted and output in a file.
[0061] Specifically, the number of the connected body particle sets with the most particle numbers to be output can be set. For example, the connected body particle set VTK files of the top 10 particle numbers are generated.
[0062] Through the above technical means, the particle generation of the multi-connected region suitable for complex geometry is flexibly realized.
Claims
1. A method for generating simulation software skin particles for complex geometries, comprising: The method comprises the following steps: Step 1: setting initial parameter values, including particle spacing margin, STL file path, boundary thickness, boundary direction, initial generation point; Step 2: analyzing the STL file describing the geometric configuration to obtain vertex coordinates and normal vector information of each boundary triangular face; Step 3: generating boundary particles according to the boundary thickness and boundary direction; The method supports using different boundary thickness parameters in the normal direction and the reverse direction; Step 3 specifically comprises: Step 3.1: generating thickened multi-layer boundary particles; Step 3.2: generating boundary particles in the direction of the geometric surface normal; Step 4: using a non-recursive flood fill method to generate single-connected body particles within the boundary based on the initial generation point and boundary particle information; Step 4 specifically comprises: Step 4.1: marking the connected body number of the initial generation point, sequentially traversing the surrounding neighbor lattice points of the initial generation point, and adding the non-boundary particles and the neighbor points that have not been marked as other connected body numbers to the stack to be marked in sequence; The scheme for selecting surrounding neighbor lattice points includes: in a two-dimensional plane, selecting the nearest 4 neighbor points, up, down, left, and right; in a three-dimensional space, selecting the nearest 6 neighbor points, up, down, left, right, front, and back; Step 4.2: marking the top of the stack according to step 4.1 and deleting the point in the stack; if there are new neighbor points to be marked that have not been marked with a connected body number, they are sequentially added to the top of the stack; if the stack is empty at this time, the flood fill method is exited, and the recursive process of marking the connected body particle set is exited; Step 5: traversing the global space to generate global multi-connected body particles; Step 5 specifically comprises: Step 5.1: selecting an initial generation point of a non-boundary particle that has not been marked with a connected body number according to the coordinate sequence; Step 5.2: marking the particle set of this connected body by executing the flood fill method based on the selected initial generation point; Step 5.3: if the global space is traversed and no initial generation point of a non-boundary particle that has not been marked with a connected body number is found, the global multi-connected body particle generation process is exited; Step 6: sorting and outputting the most connected body particles in separate files.