CN113378435B - Particle generation method, device, equipment and storage medium - Google Patents

Particle generation method, device, equipment and storage medium Download PDF

Info

Publication number
CN113378435B
CN113378435B CN202110644214.2A CN202110644214A CN113378435B CN 113378435 B CN113378435 B CN 113378435B CN 202110644214 A CN202110644214 A CN 202110644214A CN 113378435 B CN113378435 B CN 113378435B
Authority
CN
China
Prior art keywords
particle
model
determining
particle generation
boundary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110644214.2A
Other languages
Chinese (zh)
Other versions
CN113378435A (en
Inventor
张维杰
江民圣
鲁效平
景大智
于晓义
王玉梅
高亚琼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Kaos Digital Technology Qingdao Co ltd
Karos Iot Technology Co ltd
Cosmoplat Industrial Intelligent Research Institute Qingdao Co Ltd
Original Assignee
Haier Digital Technology Qingdao Co Ltd
Cosmoplat Industrial Intelligent Research Institute Qingdao Co Ltd
Haier Cosmo IoT Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Haier Digital Technology Qingdao Co Ltd, Cosmoplat Industrial Intelligent Research Institute Qingdao Co Ltd, Haier Cosmo IoT Technology Co Ltd filed Critical Haier Digital Technology Qingdao Co Ltd
Priority to CN202110644214.2A priority Critical patent/CN113378435B/en
Publication of CN113378435A publication Critical patent/CN113378435A/en
Application granted granted Critical
Publication of CN113378435B publication Critical patent/CN113378435B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/23Design optimisation, verification or simulation using finite element methods [FEM] or finite difference methods [FDM]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/25Design optimisation, verification or simulation using particle-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F30/00Computer-aided design [CAD]
    • G06F30/20Design optimisation, verification or simulation
    • G06F30/28Design optimisation, verification or simulation using fluid dynamics, e.g. using Navier-Stokes equations or computational fluid dynamics [CFD]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2113/00Details relating to the application field
    • G06F2113/08Fluids
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2119/00Details relating to the type or aim of the analysis or the optimisation
    • G06F2119/14Force analysis or force optimisation, e.g. static or dynamic forces

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Hardware Design (AREA)
  • Evolutionary Computation (AREA)
  • Geometry (AREA)
  • General Engineering & Computer Science (AREA)
  • Algebra (AREA)
  • Computing Systems (AREA)
  • Fluid Mechanics (AREA)
  • Mathematical Analysis (AREA)
  • Mathematical Optimization (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating particles. The method comprises the following steps: displaying a particle generation interface; receiving input operation of a user on a particle generation interface, wherein the input operation is used for determining an entity model to be particlized, a particle networking scale and a storage path of a data file; determining the boundary of the solid model; acquiring a grid unit corresponding to the solid model according to the boundary of the solid model and the particle screening scale; determining the centroid of the grid cell as the data of the SPH particle model; a data file containing data of the SPH particle model is stored in a storage path. According to the method and the device, the data file after the physical model is particlized can be generated and stored in a one-key mode, the operation is simple and convenient, and the universality is high.

Description

Particle generation method, device, equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for generating particles.
Background
With the development of science and technology, the Smooth Particle Hydrodynamics (SPH) algorithm is widely used in scenes involving large deformation and large distortion, such as game development, computer graphics and visualization, impact, and skiving, and is a non-grid analysis method developed in recent 20 years. The premise of the SPH algorithm is to realize the granulation of the solid model so as to continue the subsequent analysis and calculation.
At present, common particlization technologies include a Delaunay triangulation algorithm, a Voronoi (Voronoi) graph algorithm, a mesh-free method and the like, and an algorithm research specially aiming at realizing particlization of a certain structure is also provided. However, these particle-forming techniques are complicated in technical implementation and have poor versatility. Therefore, a method for producing particles which is simple to operate and versatile is urgently required.
Disclosure of Invention
In order to solve the above problems in the prior art, the present application provides a method, an apparatus, a device and a storage medium for generating particles, which are simple and versatile in operation.
In a first aspect, the present application provides a method of particle generation, comprising:
displaying a particle generation interface;
receiving input operation of a user on a particle generation interface, wherein the input operation is used for determining an entity model to be particlized, a particle networking scale and a storage path of a data file;
determining the boundary of the solid model;
acquiring a grid unit corresponding to the solid model according to the boundary of the solid model and the particle screening scale;
determining the centroid of the grid cell as data of the SPH particle model;
the save path stores a data file containing data of the SPH particle model.
In a possible implementation manner, the obtaining the grid cells corresponding to the solid model according to the boundary of the solid model and the particle screening scale may include: determining a cutting reference surface of the solid model according to the boundary of the solid model and the particle screening scale; and acquiring the grid unit corresponding to the entity model according to the cutting reference surface.
In a possible embodiment, the determining the cutting reference plane of the solid model according to the boundary of the solid model and the particle screening scale may include: determining the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension according to the boundary value of the boundary of the solid model in the preset dimension and the particle screening scale; and obtaining a cutting reference surface of the solid model based on the boundary and the distance of the solid model in the preset dimension.
In a possible embodiment, the determining the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension according to the boundary value of the boundary of the solid model in the preset dimension and the particle screening scale includes: determining the difference between the maximum value and the minimum value of the boundary of the entity model in a preset dimension as a first intermediate value; taking the quotient integer of the first intermediate value and the particle screening scale as a second intermediate value; and determining the quotient of the first intermediate value and the second intermediate value as the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension.
In a possible implementation manner, before saving the data of the centroids of the grid cells as the data of the SPH particle model, the method further includes: determining a material density of the solid model; the centroid of the grid cell is determined from the material density.
In a possible implementation manner, the particle generation interface includes a particle generation progress bar for reflecting a current particle generation progress, and the particle generation method further includes: determining the current particle generation progress; and presenting the current particle generation progress on the particle generation progress bar.
In a second aspect, the present application provides a particle generating apparatus comprising:
the display module is used for displaying the particle generation interface;
the interaction module is used for receiving input operation of a user on the particle generation interface, and the input operation is used for determining an entity model to be particlized, a particle networking scale and a data file storage path;
a processing module for determining a boundary of the solid model; acquiring a grid unit corresponding to the solid model according to the boundary of the solid model and the particle screening scale; and determining data of the SPH particle model of the grid cell;
and the saving module is used for saving the data file containing the data of the SPH particle model in the saving path.
In a possible implementation, the processing module is specifically configured to: determining a cutting reference surface of the solid model according to the boundary of the solid model and the particle screening scale; and acquiring the grid unit corresponding to the entity model according to the cutting reference surface.
In one possible embodiment, the processing module is further configured to: determining the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension according to the boundary value of the boundary of the solid model in the preset dimension and the particle screening scale; and obtaining a cutting reference surface of the solid model based on the boundary of the solid model in the preset dimension and the distance.
In one possible embodiment, the processing module is further configured to: determining the difference between the maximum value and the minimum value of the boundary of the entity model in a preset dimension as a first intermediate value; taking the quotient integer of the first intermediate value and the particle screening scale as a second intermediate value; and determining the quotient of the first intermediate value and the second intermediate value as the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension.
In one possible embodiment, the processing module is further configured to: determining a material density of the solid model; the centroid of the grid cell is determined from the material density.
In one possible implementation, the particle generation interface comprises a particle generation progress bar for reflecting the current particle generation progress. The processing module is further configured to: determining the current particle generation progress; and presenting the current particle generation progress on the particle generation progress bar through the display module.
In a third aspect, the present application provides an electronic device, comprising: a processor and a memory;
wherein the memory is used for storing program instructions; the processor is adapted to invoke program instructions in the memory to perform the particle generation method as described in the first aspect.
In a fourth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program for implementing the particle generation method of the first aspect when the computer program is executed by a processor.
In a fifth aspect, the present application provides a computer program product comprising a computer program for implementing the particle generation method of the first aspect when the computer program is executed by a processor.
The skilled person in the art can understand that, in the present application, when the solid model is converted into the particle model, after the solid model to be particlized is determined on the particle generation interface, the particle screening scale is set, and the storage path of the data file is received, the converted SPH particle model can be generated and stored in the data file by one key, the operation is simple, the basic theory of the particle generation algorithm does not need to be mastered, and the method is suitable for any relevant person including a beginner; in addition, the scheme does not limit the specific structure of the entity model and has universality.
Drawings
Preferred embodiments of the particle generating method, device, apparatus, and storage medium of the present application are described below with reference to the accompanying drawings. The attached drawing is
Fig. 1 is a schematic view of an application scenario provided in an embodiment of the present application;
fig. 2 is a schematic flow chart of a particle generation method according to an embodiment of the present application;
FIG. 3 is an exemplary diagram of an interface of a one-touch particle file generation plug-in for a particle generation method provided by an embodiment of the present application;
FIG. 4 is a schematic flow chart diagram of a particle generation method provided by another embodiment of the present application;
FIG. 5 is a schematic flow chart diagram of a particle generation method provided by yet another embodiment of the present application;
FIG. 6 is a graph illustrating test results of a 2D model of a particle generation method provided by an embodiment of the present application;
FIG. 7 is a graph illustrating test results of a 3D model of a particle generation method provided by an embodiment of the present application;
FIG. 8 is a graph illustrating test results of a 3D model of a particle generation method provided by another embodiment of the present application;
fig. 9 is a schematic structural diagram of a particle generating apparatus according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
First, it should be understood by those skilled in the art that these embodiments are merely for explaining the technical principles of the present application, and are not intended to limit the scope of the present application. And can be modified as needed by those skilled in the art to suit particular applications.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the embodiments of the present application, the singular forms "a", "an" and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B, may be expressed as: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of additional like elements in a commodity or system comprising the element.
First, some technical terms related to the present application are explained:
a Voronoi diagram, also called a Thiessen polygon or Dirichlet diagram, is a polygon composite diagram, which is composed of a group of continuous polygons composed of perpendicular bisectors connecting two adjacent point straight lines.
Delaunay triangulation algorithm (also called Delaunay triangulation algorithm) is a basic method for mathematical analysis of geometric figures and planar figures. As may be used for Voronoi diagrams.
Gridless methods, i.e., modeling and analysis of protons without grid distribution, can be used in particle generation techniques.
The SPH algorithm is widely applied to computer graphics and scenes involving large deformation and large distortion, such as visualization, impact, cutting and the like, and the algorithm is realized on the premise that the granulation of a model is realized, and the calculation of the SPH algorithm can be carried out only after the granulation is finished.
The ABAQUS software is multifunctional finite element software and has powerful functions in engineering simulation and emulation.
An Application Programming Interface (API) function is a predefined function, and some complex operations can be simply and quickly completed by calling the API function during engineering operations.
At present, the existing particle model generation technologies such as a meshless method, a Delaunay triangulation algorithm and a Voronoi graph algorithm are complex in implementation, universality is not particularly good, and a beginner needs basic theory learning for a certain time to complete the granulation of an entity model.
Based on the foregoing problems, embodiments of the present application provide a particle generation method, apparatus, device, and storage medium to achieve the following objectives:
1. and the smooth particles are quickly generated, and the data file of the particle model is stored for the subsequent use of the SPH algorithm, so that the method is simpler and more convenient compared with other methods.
2. The plug-in development is realized, the generated data file of the SPH particle model can be generated and stored in one key, the basic theory of the particle generation algorithm does not need to be mastered, the operation is easy, and the universality is strong.
Fig. 1 is an illustration of an application field Jing Shi provided in the embodiments of the present application. As shown in fig. 1, in this application scenario, a plug-in for particlizing an entity model is installed in the computer 100, and after the entity model to be particlized is introduced into the plug-in, the particlized model and data are directly generated in one key in the plug-in, and the data are stored in the computer 100 or exported from the computer 100.
It should be noted that fig. 1 is only a schematic diagram of an application scenario provided in this embodiment, and this embodiment of the present application does not limit the devices included in fig. 1, and also does not limit the positional relationship between the devices in fig. 1. For example, in the application scenario shown in fig. 1, the application scenario may further include a data storage device, and the computer 100 may be a PC, i.e., a computer, a terminal device such as a mobile phone or a notebook, or another type of computer such as a server or a server cluster.
The following describes in detail the technical solutions of the embodiments of the present application and how to solve the above technical problems with specific embodiments. The following specific embodiments may be combined with each other, and some of the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic flow chart of a particle generation method according to an embodiment of the present application. The embodiment of the application provides a particle generation method which is suitable for electronic equipment provided with a plug-in for graining a solid model. As shown in fig. 2, the particle generation method includes:
and S201, displaying a particle generation interface.
In practical application, when a user has a requirement for particlization of the solid model, the plug-in can be started. And when the electronic equipment detects a starting instruction of the plug-in, displaying the particle generation interface.
Illustratively, as shown in fig. 3, the particle generation interface comprises the following parts: opening a particle model file option, saving an SPH file path option, setting a frame of particle division network scale values, determining a control and the like.
The option of opening the particle model file is used for importing the entity model, the path of the stored SPH file is used for representing the path of the entity model after the particle division is completed, and the setting frame of the particle division network scale value is used for manually presetting the particle division network scale value.
And setting the setting frame for opening the particle model file option, saving the SPH file path option and the particle sub-grid scale value on the particle generation interface, and then clicking the determining control to trigger the particle generation process.
Optionally, the particle generation interface may further include a particle generation progress bar. The particle generation progress bar can visually display the particle generation progress. In this case, the particle generation method may further include: determining the current particle generation progress; and presenting the current particle generation progress on the particle generation progress bar. Therefore, a user can visually know the particle generation progress, and the user experience is improved.
S202, receiving input operation of a user on the particle generation interface, wherein the input operation is used for determining an entity model to be particlized, a particle networking scale and a data file storage path.
After a user introduces an entity model which is expected to be particlized into a particle generation interface, a particle networking scale set based on historical experience or actual requirements is input, and a data storage path of the entity model after the granulation is finished is set.
Illustratively, the solid model may be any solid structure of three-dimensional (3D) or two-dimensional (2D). The three-dimensional solid model may be a polyhedron or a curved body. In general practice, the three-dimensional solid model may be a cube or a cylinder-like body. For the two-dimensional solid model, the imported two-dimensional solid model may be a convex polygon, and a hollow structure exists inside the convex polygon, for example, a small ellipse part is cut out of the inside of a rectangle.
Regarding the particle screening scale, δ can be used to control the number of particles, and the unit set in the particle generation interface is usually millimeter (mm), and its physical meaning is the length of the particles obtained after granulation. In the example shown in fig. 3, the length is a uniform length, i.e. the length of the particles along any one of the coordinate axes is the same. In subsequent operation calculation, the user can adjust the particle screening scale according to actual needs. Optionally, the lengths of the particles along different coordinate axes may also be different, and in this case, the particle generation interface needs to include a plurality of particle screening scales corresponding to different coordinate axes, for example, the particle screening scale δ corresponding to the x-axis x And the particle screening scale delta corresponding to the y axis y And so on. Due to the length of the particles, i.e. the distance between two adjacent cutting reference surfaces, delta x The physical meaning of (1) is the distance of the cutting reference plane on the x-axis, and, similarly, delta y The physical meaning of (c) is the distance of the cut reference plane on the y-axis.
Illustratively, the path for storing the particle model data file is, for example, a folder in the disk D, and after the particle generation is completed, the data file is stored in the path, which facilitates the subsequent use of the SPH algorithm.
And S203, determining the boundary of the entity model.
From the imported solid model, the electronic device determines boundaries of the solid model, including determining coordinates of the boundaries. For example, for a 2D solid model, the coordinate axes are the x-axis and the y-axis, and the minimum value coordinate of the boundary is (x) min ,y min ) The maximum value coordinate of its boundary is (x) max ,y max ). For a 3D solid model, the minimum coordinate of its boundary is (x) min ,y min ,z min ) The maximum value coordinate of its boundary is (x) max ,y max ,z max ). The coordinate values are used for subsequent cutting surface calculation, and corresponding coordinate points can be found in the particle generation interface according to the boundary coordinates, as illustrated in fig. 3.
And S204, acquiring grid units corresponding to the entity model according to the boundary of the entity model and the particle networking scale.
Based on the solid model boundary and the particle screening scale determined in step S203, the solid model is cut to obtain grid cells, and the grid cells are particles.
It will be appreciated that each mesh cell size after the cut is substantially the same, i.e., the solid model is equally divided, but the mesh cells at the boundary of the solid model are related to the actual boundary shape of the solid model.
And S205, determining the centroid of the grid cell as the data of the SPH particle model.
The step is to perform data processing on the cut grid cells. Since each particle is of a size that cannot be directly viewed as a point ideally, the centroid of the particle needs to be determined. Specifically, from a physical perspective, when a particle of an object is determined, it can be analyzed for force. After the centroid of the particle is determined, the centroid can be equivalently substituted for the SPH particle model, so that the particle can be regarded as an ideal point to operate. Optionally, the process also needs to be implemented by an API function in the ABAQUS software.
In one specific implementation, before the step, the particle generation method may further include: determining a material density of the solid model; the centroid of the grid cell is determined from the material density. In some embodiments, if the density of the solid model is uniform, the center or the gravity center of the grid cell, etc. may also be determined as the data of the SPH particle model, such as the center of a square with uniform density. Illustratively, the centroid of a grid cell may be obtained using the API function carried by the ABAQUS software itself.
S206, storing the data file containing the data of the SPH particle model in the storage path.
The centroid coordinates of the particles are stored as stored data in the storage path set in step S202, and the data is used for the subsequent calculation of the SPH algorithm.
In the embodiment of the application, an input operation of a user on a particle generation interface is received, wherein the input operation is used for determining an entity model to be particlized, a particle networking scale and a storage path of a data file; determining the boundary of the solid model; acquiring a grid unit corresponding to the solid model according to the boundary of the solid model and the particle screening scale; determining the centroid of the grid cell as the data of the SPH particle model; a data file containing data of the SPH particle model is stored in a storage path. When the entity model is converted into the particle model, the converted SPH particle model can be generated and stored into the data file by one key after the entity model to be particlized is determined on the particle generation interface, the particle networking scale is set and the storage path of the data file is received, so that the operation is simple, the basic theory of the particle generation algorithm does not need to be mastered, and the method is suitable for any relevant personnel including beginners; in addition, the scheme does not limit the specific structure of the entity model, and has strong universality.
On the basis of the above embodiment, in order to implement the operation of cutting the solid model into grid cells in step S204, the solid model may be subjected to a gridding operation by using a cutting function of a reference plane in the ABAQUS software. Optionally, in S204, obtaining a grid unit corresponding to the solid model according to the boundary of the solid model and the particle networking scale may include: determining a cutting reference surface of the solid model according to the boundary of the solid model and the particle screening scale; and acquiring the grid unit corresponding to the entity model according to the cutting reference surface.
Specifically, when the solid model is cut, a plurality of cutting reference surfaces are generated, for example, in a 3D solid model, three planes are required to determine a particle; in a 2D solid model, two planes are required to determine one particle.
In the embodiment of the application, the cutting reference surface is determined through the boundary of the particle solid model and the particle screening scale, the solid model can be cut into particles according to the cutting reference surface, and compared with other particle algorithms, the method is simpler and more convenient. On the basis of the above embodiment, in order to determine the cutting reference surfaces of the solid model, the distance between adjacent cutting reference surfaces needs to be calculated first. Fig. 4 is a schematic flow chart of a particle generation method according to another embodiment of the present application. As shown in fig. 4, the determining the cutting reference plane of the solid model according to the boundary of the solid model and the particle screening scale may further include:
s401, determining the difference between the maximum value and the minimum value of the boundary of the entity model in the preset dimension as a first intermediate value.
Illustratively, this step is formulated as (i) max -i min ) Where i may be x or y or z, and for example, where i is x, the formula represents the difference between two boundary values of the solid model on the x-axis. And obtaining a first intermediate value by taking the difference between the maximum value and the minimum value of the boundary coordinate values of the entity model in the same coordinate axis, wherein the physical meaning of the first intermediate value is the total length of the entity model in the coordinate axis. Illustratively, in the 3D model, there are three preset dimensions, namely, an x-axis, a y-axis, and a z-axis; in the 2D model, there are two preset dimensions, any two of the x-axis, y-axis and z-axis.
Illustratively, for a 3D model, (x) max -x min ) I.e. the length of the solid model in the x-axis,(y max -y min ) I.e. the length of the solid model in the y-axis, (z) max -z min ) I.e. the length of the solid model in the z-axis. The length of the mockup on different coordinate axes can be different from each other, i.e. (x) max -x min )≠(y max -y min )≠(z max -z min )。
It can be understood that the particle screening scale δ generally cannot ensure that the number of all particles after the solid model is cut is an integer value, and therefore mathematical rounding processing needs to be performed on the number of the particles. Therefore, in the embodiment of the application, the particle screening scale δ is adjusted through S403 and S403, so as to obtain the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension. Specifically, the method comprises the following steps:
s402, taking the quotient of the first intermediate value and the particle screening scale as a second intermediate value.
Illustratively, this step is formulated as int ((i) max -i min ) /δ), where int denotes taking an integer. And after the first intermediate value and the particle screening scale delta are subjected to division operation, the number of particles on one coordinate axis is obtained, the entity model is analyzed from a mathematical angle because the entity model has different lengths on different coordinate axes, the corresponding number of the particles is also different, and the quotient obtained after the division operation is taken as an integer as a second intermediate value, wherein the meaning of the second intermediate value is that the number of the particles on each coordinate axis is taken as an integer.
And S403, determining the quotient of the first intermediate value and the second intermediate value as the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension.
Specifically, the step is formulated as δ i =(i max -i min )/int((i max -i min )/δ)。
Since the total length divided by the total number is equal to the unit length, dividing the first intermediate value by the second intermediate value obtained above results in the length of the particles after rounding. Because the adjacent distance of the cutting reference surface is the length of the particle, the delta obtained after the division operation i I.e. the spacing of adjacent cutting reference surfaces. In different coordinate axesNext, the distances between the cutting reference surfaces may be different, and need to be calculated respectively.
In other words, in S401 to S403, a specific implementation of how to determine the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension according to the boundary value of the boundary of the solid model in the preset dimension and the particle screening scale is provided.
S404, obtaining a cutting reference surface of the solid model based on the boundary and the distance of the solid model in the preset dimension.
After the distance between the cutting reference surfaces in the coordinate axis is determined, the solid model is cut at equal intervals along the determined coordinate axis, 3 mutually perpendicular cutting reference surfaces are needed for the 3D model, and two mutually perpendicular cutting reference lines are needed for the 2D model.
Illustratively, the cutting reference surface is formulated as x coor =x min +n*δ x ,y coor =y min +n*δ y ,z coor =z min +n*δ z Wherein n is a positive integer. Delta x The length of the particle on the x axis, namely the distance between adjacent cutting reference surfaces on the x axis; delta y The length of the particle on the y axis is the distance between adjacent cutting reference surfaces on the y axis; delta z Is the length of the particle in the z-axis, i.e., the distance of the adjacent cutting reference surfaces in the z-axis. The maximum value of n is the number of particles on the coordinate axis. Illustratively, when n takes a value of 0, the reference plane is the minimum boundary coordinate of the solid model. When n is 1, the first particle is cut out from the cutting reference surface, and so on.
In particular, for the same coordinate axis, each cutting reference surface is equally spaced, the spacing being the corresponding length of the particle on that coordinate axis. For example, taking a 3D solid model as an example, if the length of the particle in the z-axis is m, the distance between each cutting reference surface in the z-axis is m. Still further, the cutting reference surface spacing on different coordinate axes may be different, for example, if the length of the particle on the y-axis is n, then on the y-axis, the spacing of each cutting reference surface is n, and m ≠ n. The above calculation method is equally applicable to 2D models.
In the embodiment of the application, through carrying out mathematical processing on the preset particle screening scale, the number of particles on a certain coordinate axis is obtained through the preset particle screening scale, and the number of particles obtained after cutting cannot be guaranteed to be an integer by the preset particle screening scale, so that the number of particles needs to be rounded, and the length of the particles on the certain coordinate axis is recalculated. Since the number of particles is rounded, the length is also a normalized length. According to the method, after the manual preset particle screening scale is subjected to mathematical rounding processing, the number and the length of particles cut in software are calculated, complex operation does not need to be considered for a user, and the method is compatible with a particle modeling algorithm of the software.
In specific application, the particle generation method provided by the application can be realized based on powerful geometric model processing of ABAQUS software and rich API script functions, can be universally applied to various entity models, and is relatively quick and convenient in realization process.
Fig. 5 is a schematic flowchart of a particle generation method according to yet another embodiment of the present application. The embodiment mainly utilizes ABAQUS software as a running support of script codes to realize the model particlization, and realizes the particlization through the API function carried by the ABAQUS software. Since similar operations have already been described in detail in the embodiment of fig. 2, they are not described here again. The specific technical idea is as follows:
s501, importing the entity model (2D or 3D) through software.
And S502, extracting the boundary of the entity model.
And S503, setting a particle screening scale delta.
And S504, generating a cutting reference surface.
And S505, cutting the entity model.
And S506, setting materials.
And S507, determining the centroid coordinates of the particles.
And S508, storing the particlized model file.
In the embodiment of the application, the entity model is introduced into the software, and after the particle screening scale is artificially set, the software can automatically complete the particle generation and is used for the subsequent calculation of the SPH algorithm. For a user, the method is simple to operate, and complex particle algorithm operation is not needed.
The 2D model and the 3D model are then subjected to a particlization test by the particle generation method as described above. Fig. 6 is a diagram illustrating a test result of a 2D model of a particle generation method according to an embodiment of the present application; FIG. 7 is a graph illustrating test results of a 3D model of a particle generation method provided by an embodiment of the present application; fig. 8 is an exemplary graph of the algorithm test result of the 3D model of the particle generation method provided by another embodiment of the present application. Referring to fig. 6, 7 and 8, it can be seen that the particle generation method provided by the present application can quickly and efficiently complete the particlization of the entity model. The horizontal and vertical axes in fig. 6 are used to represent the size information of the particle model obtained by particlizing the solid model in two coordinate axis directions; fig. 7 shows an X-direction projection view, a Y-direction projection view, a Z-direction projection view, and an ISO view of the particle model obtained by particlizing the solid model, respectively; fig. 8 is a partially enlarged schematic view showing projection views in two directions and a projection view in one direction of a particle model obtained by particlizing a solid model.
The following are embodiments of the apparatus of the present application that may be used to perform embodiments of the method of the present application. For details which are not disclosed in the embodiments of the apparatus of the present application, reference is made to the embodiments of the method of the present application.
Fig. 9 is a schematic structural diagram of a particle generating apparatus according to an embodiment of the present application. As shown in fig. 9, the particle generating apparatus 900 includes:
a display module 901, configured to display a particle generation interface;
an interaction module 902, configured to receive an input operation of a user on a particle generation interface, where the input operation is used to determine an entity model to be particlized, a particle networking scale, and a storage path of a data file;
a processing module 903 for determining the boundary of the solid model; acquiring a grid unit corresponding to the solid model according to the boundary of the solid model and the particle screening scale; determining the centroid of the grid cell as the data of the SPH particle model;
a saving module 904, configured to save a data file containing data of the SPH particle model in the saving path.
The apparatus provided in the embodiment of the present application may be used to execute the method in the embodiments described above, and the implementation principle and the technical effect are similar, which are not described herein again.
In some embodiments, the processing module 903 is further specifically configured to: determining a cutting reference surface of the solid model according to the boundary of the solid model and the particle screening scale; and acquiring the grid unit corresponding to the entity model according to the cutting reference surface.
Optionally, the processing module 903 may further be configured to: determining the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension according to the boundary value of the boundary of the solid model in the preset dimension and the particle screening scale; and obtaining a cutting reference surface of the solid model based on the boundary and the distance of the solid model in the preset dimension.
In some embodiments, the processing module 903 may further be configured to: determining the difference between the maximum value and the minimum value of the boundary of the entity model in a preset dimension as a first intermediate value; taking the quotient integer of the first intermediate value and the particle screening scale as a second intermediate value; and determining the quotient of the first intermediate value and the second intermediate value as the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension.
Alternatively, the processing module 903 may be further configured to: determining a material density of the solid model; the centroid of the grid cell is determined from the material density.
In some embodiments, the particle generation interface includes a particle generation progress bar for reflecting the current particle generation progress. The processing module 903 is further configured to: determining the current particle generation progress; the current particle generation progress is presented on the particle generation progress bar through the display module 901.
Fig. 10 is a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 10, the electronic device may be provided as a server or a computer, for example. Referring to fig. 10, the electronic device 1000 comprises a processing component 1001 that further comprises one or more processors and memory resources, represented by memory 1002, for storing instructions, e.g. applications, that are executable by the processing component 1001. The application programs stored in memory 1002 may include one or more modules that each correspond to a set of instructions. Furthermore, the processing component 1001 is configured to execute instructions to perform any of the method embodiments described above.
The electronic device 1000 may also include a power component 1003 configured to perform power management for the electronic device 1000, a wired or wireless network interface 1004 configured to connect the electronic device 1000 to a network, and an input/output (I/O) interface 1005. The electronic device 1000 may operate based on an operating system stored in the memory 1002, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, or the like.
The Memory 1002 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
The processing component 1001 may be an integrated circuit chip having signal processing capabilities. The Processing module 1001 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and so on. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
An embodiment of the present application further provides a chip, including: a processor and a memory; the memory stores a computer program, and the processor implements the steps of the particle generation method in the above-described method embodiments when executing the computer program stored in the memory.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and the computer program is used for implementing the steps of the particle generation method in the above-mentioned method embodiments when being executed by a processor.
An embodiment of the present application further provides a computer program product, which contains a computer program, and the computer program is used for implementing the steps of the particle generation method in the above method embodiments when being executed by a processor.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above may be implemented by hardware instructions of a computer program, and the computer program may be stored in a non-volatile computer-readable storage medium, and when executed, may include the processes of the embodiments of the methods described above. Any reference to memory, storage, database or other medium used in the embodiments provided herein can include non-volatile and/or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
So far, the technical solutions of the present application have been described in connection with the preferred embodiments shown in the drawings, but it is easily understood by those skilled in the art that the scope of the present application is obviously not limited to these specific embodiments. Equivalent changes or substitutions can be made on the related technical features by those skilled in the art without departing from the principle of the application, and the technical scheme after the changes or substitutions will fall into the protection scope of the application.

Claims (8)

1. A particle generation method for one-click generation of a data file for a smooth particle hydrodynamic SPH particle model based on ABAQUS software, the particle generation method comprising:
displaying a particle generation interface;
receiving input operation of a user on the particle generation interface, wherein the input operation is used for determining an entity model to be particlized, a particle networking scale and a storage path of the data file;
determining a boundary of the solid model;
determining a cutting reference surface of the solid model according to the boundary of the solid model and the particle screening scale;
acquiring a grid unit corresponding to the entity model according to the cutting reference surface;
determining the centroid of the grid cell as data of an SPH particle model;
and storing a data file containing the data of the SPH particle model in the saving path.
2. The method of claim 1, wherein determining the cutting reference plane of the solid model according to the boundary of the solid model and the particle screening scale comprises:
determining the distance between two adjacent cutting reference surfaces of the entity model in a preset dimension according to the boundary value of the boundary of the entity model in the preset dimension and the particle screening scale;
and obtaining a cutting reference surface of the entity model based on the boundary of the entity model in the preset dimension and the distance.
3. The particle generation method according to claim 2, wherein the determining a distance between two adjacent cutting reference surfaces of the solid model in a preset dimension according to a boundary value of a boundary of the solid model in the preset dimension and the particle screening scale comprises:
determining the difference between the maximum value and the minimum value of the boundary of the entity model in the preset dimension as a first intermediate value;
taking the quotient integer of the first intermediate value and the particle screening scale as a second intermediate value;
and determining the quotient of the first intermediate value and the second intermediate value as the distance between two adjacent cutting reference surfaces of the solid model in the preset dimension.
4. The particle generation method of claim 1, wherein prior to determining the centroid of the grid cell as data for a smooth particle hydrodynamics, SPH, particle model, further comprises:
determining a material density of the solid model;
determining a centroid of the grid cells as a function of the material density.
5. The particle generation method according to any one of claims 1 to 4, wherein the particle generation interface includes a particle generation progress bar for reflecting a current particle generation progress, and the particle generation method further includes:
determining the current particle generation progress;
and presenting the current particle generation progress on the particle generation progress bar.
6. A particle generation apparatus for one-click generation of a data file of a smooth particle hydrodynamic SPH particle model based on ABAQUS software, the particle generation apparatus comprising:
the display module is used for displaying the particle generation interface;
the interaction module is used for receiving input operation of a user on the particle generation interface, and the input operation is used for determining an entity model to be particlized, a particle networking scale and a storage path of the data file;
a processing module for determining boundaries of the solid model; acquiring a grid unit corresponding to the entity model according to the boundary of the entity model and the particle screening scale; determining the centroid of the grid cell as data of the SPH particle model;
the saving module is used for saving a data file containing the data of the SPH particle model in the saving path;
the processing module is specifically configured to determine a cutting reference plane of the solid model according to the boundary of the solid model and the particle screening scale;
and acquiring the grid unit corresponding to the entity model according to the cutting reference surface.
7. An electronic device, comprising: a memory and a processor:
the memory is to store program instructions;
the processor is configured to invoke program instructions in the memory to perform the particle generation method of any of claims 1 to 5.
8. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, is adapted to carry out the particle generation method of any one of claims 1 to 5.
CN202110644214.2A 2021-06-09 2021-06-09 Particle generation method, device, equipment and storage medium Active CN113378435B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110644214.2A CN113378435B (en) 2021-06-09 2021-06-09 Particle generation method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110644214.2A CN113378435B (en) 2021-06-09 2021-06-09 Particle generation method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113378435A CN113378435A (en) 2021-09-10
CN113378435B true CN113378435B (en) 2023-02-17

Family

ID=77573336

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110644214.2A Active CN113378435B (en) 2021-06-09 2021-06-09 Particle generation method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113378435B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113888687B (en) * 2021-12-07 2022-04-26 南京开博信达科技有限公司 Method and device for realizing dynamic particle transformation
CN115659769B (en) * 2022-09-15 2023-11-03 深圳十沣科技有限公司 Model particle generation method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329772A (en) * 2008-07-21 2008-12-24 北京理工大学 Emulation modelling method interacted with movable object and water based on SPH
CN112652044A (en) * 2021-01-05 2021-04-13 网易(杭州)网络有限公司 Particle special effect rendering method, device and equipment and storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112765867B (en) * 2020-12-21 2022-12-09 西安交通大学 General smooth boundary modeling method based on particle method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101329772A (en) * 2008-07-21 2008-12-24 北京理工大学 Emulation modelling method interacted with movable object and water based on SPH
CN112652044A (en) * 2021-01-05 2021-04-13 网易(杭州)网络有限公司 Particle special effect rendering method, device and equipment and storage medium

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
任意区域上的粒子均匀分布方法;倪国喜等;《计算力学学报》;20070815(第04期);全文 *
基于光滑粒子流体动力学算法的海浪建模仿真研究;李婷等;《地球信息科学学报》;20170228(第02期);全文 *

Also Published As

Publication number Publication date
CN113378435A (en) 2021-09-10

Similar Documents

Publication Publication Date Title
CN111815755B (en) Method and device for determining blocked area of virtual object and terminal equipment
CN111639626B (en) Three-dimensional point cloud data processing method and device, computer equipment and storage medium
CN113378435B (en) Particle generation method, device, equipment and storage medium
TW201616449A (en) System and method for simplifying grids of point clouds
CN113221371A (en) Method and device for determining critical sliding surface of side slope and terminal equipment
CN112199751A (en) Wall model generation method and device, electronic equipment and storage medium
CN110008387B (en) Flow field visualization implementation method and device and electronic equipment
JP7262530B2 (en) Location information generation method, related device and computer program product
CN114820980A (en) Three-dimensional reconstruction method and device, electronic equipment and readable storage medium
CN105335118B (en) The display methods and device of a kind of electronic equipment control
US20150032422A1 (en) Computing device and simulation method for processing an object
CN115984440A (en) Object rendering method and device, computer equipment and storage medium
CN112381773B (en) Key cross section data analysis method, device, equipment and storage medium
CN111354070B (en) Stereoscopic graph generation method and device, electronic equipment and storage medium
CN113610864A (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN112487674A (en) Method and apparatus for generating model of lattice structure
CN108305329B (en) Model building method and terminal
US9858364B2 (en) Computing device and method for processing point clouds
CN110765513B (en) Method for placing connecting node of wall keel model and L-shaped top guide beam model and product
CN110750847B (en) Method, device, equipment and medium for determining grid segmentation relation
CN116071755B (en) Text positioning method, device and equipment in electronic seal and storage medium
CN115659769B (en) Model particle generation method, device, equipment and storage medium
CN116522781B (en) Sample data generation method, model training method and device
KR102156336B1 (en) Method for reconstructing three-dimensional shape
CN115049766B (en) Method and device for constructing muscle fiber model, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 266000 No. 1, Minshan Road, Qingdao area, China (Shandong) pilot Free Trade Zone, Qingdao, Shandong

Applicant after: CAOS industrial Intelligence Research Institute (Qingdao) Co.,Ltd.

Applicant after: Haier Kaos IOT Technology Co.,Ltd.

Applicant after: Haier digital technology (Qingdao) Co.,Ltd.

Address before: 266555 room 257, management committee of Sino German ecological park, 2877 Tuanjie Road, Huangdao District, Qingdao City, Shandong Province

Applicant before: QINGDAO HAIER INDUSTRIAL INTELLIGENCE RESEARCH INSTITUTE Co.,Ltd.

Applicant before: Haier CAOS IOT Ecological Technology Co.,Ltd.

Applicant before: Haier digital technology (Qingdao) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 266000 No. 1, Minshan Road, Qingdao area, China (Shandong) pilot Free Trade Zone, Qingdao, Shandong

Patentee after: CAOS industrial Intelligence Research Institute (Qingdao) Co.,Ltd.

Patentee after: Karos IoT Technology Co.,Ltd.

Patentee after: Kaos Digital Technology (Qingdao) Co.,Ltd.

Address before: 266000 No. 1, Minshan Road, Qingdao area, China (Shandong) pilot Free Trade Zone, Qingdao, Shandong

Patentee before: CAOS industrial Intelligence Research Institute (Qingdao) Co.,Ltd.

Patentee before: Haier Kaos IOT Technology Co.,Ltd.

Patentee before: Haier digital technology (Qingdao) Co.,Ltd.