CN110866343A - Particle motion simulation method, device, equipment and medium - Google Patents

Particle motion simulation method, device, equipment and medium Download PDF

Info

Publication number
CN110866343A
CN110866343A CN201911140026.5A CN201911140026A CN110866343A CN 110866343 A CN110866343 A CN 110866343A CN 201911140026 A CN201911140026 A CN 201911140026A CN 110866343 A CN110866343 A CN 110866343A
Authority
CN
China
Prior art keywords
particles
container
container units
particle
information
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.)
Pending
Application number
CN201911140026.5A
Other languages
Chinese (zh)
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.)
Institute of Process Engineering of CAS
Original Assignee
Institute of Process Engineering of CAS
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 Institute of Process Engineering of CAS filed Critical Institute of Process Engineering of CAS
Priority to CN201911140026.5A priority Critical patent/CN110866343A/en
Publication of CN110866343A publication Critical patent/CN110866343A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a particle motion simulation method, a device, equipment and a storage medium. The method comprises the following steps: obtaining at least two container units filled with particles and at least one processing node associated with the container units, wherein the at least two container units are obtained by dividing a container; determining collision information and motion tracks of the particles according to the position information of the particles in different container units concurrently based on at least one processing node; summarizing collision information and motion tracks of particles in different container units to obtain the current motion state of the particles in the container; upon detection that the stopping condition is met, the final state of motion of the particles in the container is obtained. The embodiment of the invention improves the simulation scale and efficiency of particle motion and improves the user experience.

Description

Particle motion simulation method, device, equipment and medium
Technical Field
The embodiment of the invention relates to the technical field of macroscopic discrete particle motion simulation, in particular to a particle motion simulation method, a device, equipment and a storage medium.
Background
Macroscopically discrete particle systems are widely used in the process industry, such as catalyst particles in gas-solid two-phase flow reactors, pharmaceutical particles in the pharmaceutical industry, and coke and sinter in iron-making blast furnaces. Meanwhile, a macro discrete particle system relates to a plurality of flow forms, and a macro theory for uniformly describing all the flow forms is not formed, so that particularly in a multi-phase flow system, the space-time multi-scale behavior of particles brings great difficulty for accurately predicting the movement of the particles. In the experimental method, it is difficult to efficiently study the movement of complex macro particles due to the limitations of time and space accuracy of measurement, experimental complexity, and the like. In recent years, with the rapid development of computer science, the computing capability of computer equipment is greatly improved, and the possibility is provided for the modeling of a macro discrete particle system.
At present, a computer device is used for modeling a macro discrete particle system, and a Discrete Element Method (DEM) is commonly used. DEM is a simulation method of a particle flow system which is generally adopted internationally at present. It has been widely used in the fields of rock and soil, mining industry, construction, medicine and food processing, etc., and has a significant effect in the aspects of guiding engineering and process design, etc. The DEM is basically characterized in that two discrete units (such as particles) are regarded as elastic and compressible particles, the motion of each particle in a macro-discrete particle system is simulated and calculated according to the interaction among the particles and a particle motion equation, and finally the motion form and the motion rule of the particles in the system are statistically analyzed.
However, in practical applications, modeling each particle is a difficult or even impossible task due to the large number of particles. To solve this problem, researchers have proposed a method of replacing real particles with calculated particles (one calculated particle contains a plurality of real particles) to reduce the number of calculated real particles. However, the calculation of the size of the particles is limited by the calculation accuracy, and in the simulation of the actual industrial scale equipment, since the number of particles is huge, even if the method of calculating the particles is applied, the calculation amount thereof is still unbearable by the general simulation method, resulting in small scale and low efficiency of the simulation of the particle movement.
Disclosure of Invention
The embodiment of the invention provides a particle motion simulation method, a device, equipment and a storage medium, which improve the simulation scale and efficiency of particle motion.
In a first aspect, an embodiment of the present invention provides a particle motion simulation method, where the method includes:
obtaining at least two container units containing particles and at least one processing node associated with the container units, wherein the at least two container units are obtained by dividing a container;
determining collision information and motion tracks of particles according to position information of the particles in different container units concurrently based on the at least one processing node;
summarizing collision information and motion tracks of particles in different container units to obtain the current motion state of the particles in the container;
upon detection that a stopping condition is met, a final state of motion of the particles in the container is obtained.
In a second aspect, an embodiment of the present invention further provides a particle motion simulation apparatus, including:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring at least two container units filled with particles and at least one processing node associated with the container units, and the at least two container units are obtained by dividing a container;
the determining module is used for determining collision information and motion tracks of the particles according to the position information of the particles in different container units based on the at least one processing node;
the summarizing module is used for summarizing collision information and motion tracks of particles in different container units to obtain the current motion state of the particles in the container;
and the control module is used for obtaining the final motion state of the particles in the container when the detection meets the stop condition.
In a third aspect, an embodiment of the present invention further provides a computer device, where the computer device includes:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement a method of particle motion simulation as described in any of the embodiments of the invention.
In a fourth aspect, the present invention further provides a computer-readable storage medium, on which a computer program is stored, where the computer program is executed by a processor to implement the particle motion simulation method according to any embodiment of the present invention.
The technical scheme disclosed by the embodiment of the invention has the following beneficial effects:
the method comprises the steps of dividing a container filled with particles into at least two container units, determining collision information and motion tracks of the particles according to position information of the particles in different container units based on at least one processing node associated with different container units, summarizing the collision information and the motion tracks of the particles in different container units to obtain the current motion state of the particles in the container, and obtaining the final motion state of the particles in the container when detection meets a stop condition. Therefore, the container filled with a large number of particles is divided into the plurality of container units, concurrent motion analysis is carried out on the particles in each container unit, the motion analysis results of the particles in all the container units are collected to obtain the final motion state of the particles in the whole container, the simulation scale and the simulation efficiency of particle motion are improved, and user experience is improved.
Drawings
Fig. 1 is a schematic flow chart of a particle motion simulation method according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart of at least two container units obtained by dividing a container according to an embodiment of the present invention;
3(a) -3 (c) are schematic diagrams of at least two container units obtained by dividing a container containing a large number of particles according to an embodiment of the present invention;
FIG. 4 is a performance diagram for concurrently determining a particle motion state according to an embodiment of the present invention;
fig. 5 is a schematic flow chart of a particle motion simulation method according to a second embodiment of the present invention;
fig. 6(a) is a schematic diagram of calculation performed in a single-thread single-particle manner according to a second embodiment of the present invention;
FIG. 6(b) is a schematic diagram of a calculation performed in a multithreading-single-granule manner according to a second embodiment of the present invention;
fig. 6(c) is a schematic diagram of calculation performed in a single-thread multi-particle manner according to a second embodiment of the present invention;
fig. 7 is a schematic structural diagram of a particle motion simulation apparatus according to a third embodiment of the present invention;
fig. 8 is a schematic structural diagram of a computer device according to a fourth embodiment of the present invention.
Detailed Description
The embodiments of the present invention will be described in further detail with reference to the drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of and not restrictive on the broad invention. It should be further noted that, for convenience of description, only some structures, not all structures, relating to the embodiments of the present invention are shown in the drawings.
The embodiment of the invention provides a particle motion simulation method, a device, equipment and a storage medium, aiming at the problems of small simulation scale and low efficiency in particle motion simulation in the related art.
According to the embodiment of the invention, at least two container units filled with particles and at least one processing node associated with the container units are obtained, so that collision information and motion tracks of the particles are determined based on the at least one processing node associated with each container unit and according to position information of the particles in different container units, then the collision information and the motion tracks of the particles in different container units are summarized to obtain the current motion state of the particles in the container, and when the condition that the stopping condition is met is detected, the final motion state of the particles in the container is obtained. Therefore, the container filled with a large number of particles is divided into the plurality of container units, concurrent motion analysis is carried out on the particles in each container unit, the motion analysis results of the particles in all the container units are collected to obtain the final motion state of the particles in the whole container, the simulation scale and the simulation efficiency of particle motion are improved, and user experience is improved.
For clarity of explanation of the particle motion simulation method according to the embodiment of the present invention, the discrete particle simulation method will be described first.
Specifically, the main idea of the discrete particle simulation method is to explicitly model the particle materials in the actual system, obtain the motion state of the whole system by tracking the motion of the particles, and obtain the motion rule of the particle materials in the whole system by analyzing the microscopic and macroscopic properties. The movement of macro particles follows Newton's second law, and the specific control equation is:
Figure BDA0002280661430000051
wherein Fcolilide is the interaction between particles, mg is the gravity borne by the particles, v is the movement speed of the particles, t is the time, and dv/dt is the derivative of v to t.
The particle motion simulation method, apparatus, device, and storage medium according to embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
Example one
Fig. 1 is a schematic flow diagram of a particle motion simulation method according to an embodiment of the present invention, which is applicable to a large-scale simulation of particle motion scenes, and the method may be executed by a particle motion simulation apparatus, which may be composed of hardware and/or software and may be integrated in a computer device, where the computer device may be any device having a data processing function, and the computer device according to the embodiment of the present invention is preferably a device having a many-core processor, such as a super computer. The particle motion simulation method specifically comprises the following steps:
s101, obtaining at least two container units filled with particles and at least one processing node associated with the container units, wherein the at least two container units are obtained by dividing a container.
Specifically, before executing S101, the embodiment of the present invention first performs a data information preparation operation, including: container file, parameter setting of particles, calculation value setting and calculation resource allocation.
Wherein, the container file refers to a container file constructed for containing particles; the parameters of the particles comprise the number, the particle size, the density, the quality, the coefficient of restitution and the like of the particles; calculating the numerical value includes: a rule parameter and a value parameter, wherein the rule parameter comprises: a container partitioning rule and a processing node cluster allocation rule of a many-core processor; the numerical parameters include: time step, particle search frequency, etc., wherein the time step and the particle search frequency can be set according to the actual application requirement. Preparing computing resources including CPU resources and many-core processor resources, and requiring enough CPU resources and many-core processing resources in parallel computing.
In this embodiment, the container file may be implemented by using different commercial software. For example: SolidWorks, pointWise, Pro/E and the like, generating a three-dimensional structure diagram of the container containing the particles, exporting a file in an STL format described by using a triangular surface element, and constructing the container by using the triangular surface element in the STL file.
And (3) a container segmentation rule which is determined according to the spatial distribution and the position of the particles in parallel.
And (3) a processing node cluster distribution rule of the many-core processor performs dynamic distribution according to the number of particles in at least two container units after the container is divided.
After the data information preparation operation is completed, the data information can be stored in the storage unit, so that the data loading speed is improved when the related data information is acquired subsequently.
Further, after the data information preparation operation is completed, the embodiments of the present invention may read the prepared container file, parameter setting of the particles, calculation value setting, calculation resource allocation, and other information from the storage unit, and transmit the information at the CPU end and the many-core processor end for simulating the movement of the particles in the calculation container, where the number of the many-core processors may be multiple.
Optionally, the CPU may obtain a container file based on the read data information, and partition the constructed container into at least two container units by using a container partition rule and a processing node cluster allocation rule of the many-core processor, then allocate corresponding at least one processing node to different container units, and send the at least two container units and at least one processing node associated with the container units to the many-core processor, so that the many-core processor performs simulation calculation on the movement of particles contained in different container units based on the obtained at least two container units and at least one processing node associated with the container units.
In an exemplary embodiment of the present invention, the division of the constructed container containing a plurality of particles into at least two container units may be achieved by:
s201, according to a first scale division rule, dividing the container to obtain at least two first container units.
S202, determining whether the number of the particles in the at least two first container units is larger than a number threshold, if so, executing S203, otherwise, executing S205.
In a specific implementation, the number of particles in each first container unit obtained by the segmentation may be monitored, and the number of particles in each first container unit may be compared with a number threshold, so as to determine which first container units have the number of particles greater than the number threshold, and which first container units have the number of particles less than or equal to the number threshold. Then, the first container unit with the number of particles larger than the number threshold is subjected to a secondary segmentation operation.
S203, if the number of the particles in any first container unit is determined to be larger than the number threshold, the first container unit is divided according to a second scale division rule to obtain at least two second container units.
S204, acquiring at least two container units of the container based on the at least two first container units and the at least two second container units.
S205, if the number of the particles in the at least two first container units is determined to be less than or equal to the number threshold, the at least two first containers are used as the at least two container units of the container.
The first scale division rule, the second scale division rule and the quantity threshold value can be adaptively set according to actual application requirements.
In the embodiment of the present invention, the segmentation accuracy of the second scale segmentation rule is higher, i.e., the scale is smaller, than that of the first scale segmentation rule. That is, the first scale division rule is to divide the container into large scale units, and the second scale division rule is to divide the container units into larger scale units in a finer scale, so that the number of particles contained in each finally divided container unit is more uniform, and therefore, the communication loss during parallel computing can be reduced during the computation of the particle motion, and the overall efficiency of the parallel computing can be improved.
For example, if the container containing the particles is shown in fig. 3(a), the container is first divided into 9 first container units 301, 302, 303, 304, 305, 306, 307, 308 and 309 based on a first scale division rule (specifically, as shown in fig. 3 (b)). Assuming that the number threshold is 10 ten thousand, the number of particles currently contained in the 9 first container units is obtained, if the number of particles in 301 is 11 ten thousand, the number of particles in 302 is 8 ten thousand, the number of particles in 303 is 25 ten thousand, the number of particles in 304 is 9 ten thousand, the number of particles in 305 is 12 ten thousand, the number of particles in 306 is 7.5 ten thousand, the number of particles in 307 is 9.8 ten thousand, the number of particles in 308 is 5 ten thousand, and the number of particles in 309 is 16 ten thousand, the number of particles in 301, 303, 305, and 309 is determined to exceed 10 ten thousand, and thus the second scale division rule is adopted to divide 301, 303, 305, and 309 into two second container units: 3011 and 3012, dividing 303 into three second container units: 3031. 3032 and 3033, the division of 305 into two second container units: 3051 and 3052, the division 309 into two second container units is: 3091 and 3092, so that the number of particles in the first container units 302, 304, 306, 307 and 308 and the second container units 3011, 3012, 3031, 3032, 3033, 3051, 3052, 3091 and 3092 is less than or equal to 10 ten thousand of the number threshold value. Then, the first container units 302, 304, 306, 307, 308 and the second container units 3011, 3012, 3031, 3032, 3033, 3051, 3052, 3091 and 3092 are used as at least two container units of the container (specifically, as shown in fig. 3 (c)).
Further, after acquiring the at least two container units, the embodiment may further acquire at least one processing node associated with the at least two container units.
In a specific implementation, the obtaining of the at least one processing node associated with the at least two container units may be implemented by:
the first method is as follows:
and acquiring at least one processing node associated with different container units according to the number of particles in the different container units.
Generally, one processing node can process a certain number of particles, so the embodiment can allocate a corresponding number of processing nodes to different container units based on the number of particles in the unfilled container unit, so that the processing nodes are in an optimal state when calculating the particle movement condition in the container unit.
In an actual application process, one many-core processor may have a plurality of processing nodes, so when at least one processing node is allocated to different container units based on the number of particles in different container units, the embodiment may further allocate a corresponding number of processing nodes to each container unit based on the number of processing nodes of the many-core processor.
The second method comprises the following steps:
and determining at least one processing node associated with each container unit in a pre-established mapping relation between the particle number and the processing node.
That is to say, in the embodiment of the present invention, the mapping relationship between different numbers of particles and corresponding processing nodes may be pre-established, so that after the numbers of particles in different container units are obtained, the corresponding number of processing nodes are directly obtained from the mapping relationship according to the number of particles, so as to improve the speed of obtaining the processing nodes.
It should be noted that the above-mentioned at least one processing node for obtaining the association between at least two container units is only an exemplary illustration and is not a specific limitation to the present invention.
S102, based on the at least one processing node, determining collision information and motion tracks of the particles according to the position information of the particles in different container units.
In the embodiment of the invention, the collision information refers to the collision condition and the collision force between the particles and the adjacent particles, and the collision condition and the collision force between the particles and the inner wall of the container unit; wherein, the collision force between the particles and the adjacent particles, specifically the sum of the collision force between the particles and each adjacent particle; the movement locus means a movement locus when a particle moves based on a collision force after colliding with an adjacent particle or an inner wall of a container unit. It should be noted that, in this embodiment, the collision information and the motion trajectory of the particles are determined according to the position information of the particles in different container units, specifically, the above determination operation is performed on each particle in the container unit.
For example, the particles in different container units may be first divided based on euler orthogonal grids to obtain a plurality of grids, and then collision information and motion trajectories of the particles may be determined according to the processing cores in the processing nodes corresponding to each grid and according to position information of the particles in different grids. Thereby realizing that a plurality of processing cores process the grains in a plurality of grids in parallel. The euler orthogonal grid size of the embodiments of the present invention is set according to the particle size distribution of the particles in the simulation system, and is generally selected to be 2.5 to 7.5 times the maximum particle size, and the euler orthogonal grid size is smaller than the size of the container unit.
The determining of the collision information and the motion trajectory of the particles according to the processing cores in the processing nodes corresponding to the different grids and the position information of the particles in the different grids in parallel specifically includes: and searching adjacent particles of each particle in different grids to obtain adjacent particle information of each particle, and then determining collision information and a motion track of each particle based on the adjacent particle information. When any particle is adjacent to the inner wall of the container unit, the information of the adjacent particle also comprises the information of the inner wall of the container unit.
In this embodiment, the particle search is to detect the mutual contact state between the particles and establish the information of the neighboring particles that may interact with each particle for the calculation of the interparticle force.
Therefore, in the embodiment of the present invention, when at least one processing node searches for an adjacent particle of each particle in different grids, the searched adjacent particle information and particle position information may be stored in its own local memory, shared memory, or cache space. If the processing node can execute multi-thread calculation, the multi-thread can share the adjacent particle information and the particle position information to realize the sharing of the adjacent particle information and the particle position information, realize the recycling of the adjacent particle information and the particle position information, reduce the data loading capacity, save the memory loading time and improve the loading speed of the adjacent particle information and the particle position information.
Further, after the adjacent particle information of each particle is searched, at least one processing node is controlled to load the particle information of each particle from a local memory, a shared memory or a cache space, and the collision information and the motion trail of each particle are determined based on the adjacent particle information. In the specific implementation, the calculation may be performed by using a discrete unit method or a method applying a particle calculation method, and the like, which is not described herein in detail. Wherein, when the collision force between each particle and the adjacent particle is calculated, the collision force is obtained by adding the collision forces of all the adjacent particles. For calculating the collision information and the motion trajectory between the particles in different container units and the inner wall of the container unit, a combination of single-precision floating point number and double-precision floating point may be used for calculation, which is specifically referred to the following embodiments and will not be described herein in any detail.
S103, summarizing collision information and motion tracks of the particles in different container units to obtain the current motion state of the particles in the container.
And S104, when the detection meets the stop condition, obtaining the final motion state of the particles in the container.
Wherein the motion state of the particles may include: particle position, speed of movement and direction of movement.
In the embodiment of the present invention, the stop condition specifically means that the current motion state of the particles in the container is in a stable state, or when the current motion state of the particles in the container is not in a stable state, but reaches a preset time period. The preset duration can be set according to the actual application requirement. For example, 5 hours (h), etc., and is not particularly limited herein.
That is, after obtaining the current motion state of the particles in the container, it is first determined whether the current motion state is in a steady state; if the current movement state of the particles is in the stable state, determining the current movement state of the particles as a final movement state; if the current movement state of the particles is not in the stable state, further determining whether the particle movement simulation time length reaches a preset time length, and if so, determining the current movement state of the particles as a final movement state; if not, further determining collision information and motion tracks of the particles according to the position information of the particles in the different container units, summarizing the collision information and the motion tracks of the particles in the different container units to obtain a new motion state of the particles in the container until a stop condition is met.
When the current motion state of the particles in the container is determined not to be in a stable state and does not reach the preset time length, the motion state (the particle position, the motion speed and the motion direction) of each particle in different container units can be monitored when the collision information and the motion track of the particles are determined according to the position information of the particles in different container units, and when the motion distance of any particle is determined to be larger than the redundant distance between any particle and the adjacent particle searched before based on the motion state of the particles, the adjacent particle information of the particle is obtained again, and the collision information and the motion track of the particle are determined again based on the newly obtained adjacent particle information.
In the embodiment of the present invention, monitoring the motion state of each particle in different container units may use a leapfrog algorithm to iterate the motion state of the particle, or may also use a pre-estimation-correction algorithm to iterate the motion state of the particle, and the like, which is not specifically limited herein.
Further, after the final motion state of the particles in the container is obtained, the particles can be output according to a preset frequency, so that a technician can analyze and determine the motion rule and the shape of a large number of particles in the container according to the output final motion state.
It can be understood that, in the embodiment of the present invention, the entire container is divided into the plurality of container units, so that the collision information and the motion trajectory of each particle in different container units are concurrently calculated for the plurality of container units by using the associated at least one processing node, and then the collision information and the motion trajectory of the particles in all the container units are summarized to obtain the overall motion state of the particles in the entire container, so as to implement the motion state of the particles in the container, and the parallel block calculation is performed, and then the summary is performed to obtain the motion state of the particles in the entire container, so that the calculation speed is increased, and the calculation scale is also increased, and the specific performance is as shown in fig. 4.
According to the technical scheme provided by the embodiment of the invention, the container filled with the particles is divided into at least two container units, collision information and motion tracks of the particles are determined according to position information of the particles in different container units based on at least one processing node associated with different container units, then the collision information and the motion tracks of the particles in different container units are summarized to obtain the current motion state of the particles in the container, and when the detection meets the stop condition, the final motion state of the particles in the container is obtained. Therefore, the container filled with a large number of particles is divided into the plurality of container units, concurrent motion analysis is carried out on the particles in each container unit, the motion analysis results of the particles in all the container units are collected to obtain the final motion state of the particles in the whole container, the simulation scale and the simulation efficiency of particle motion are improved, and the user experience is improved
Example two
Based on the first embodiment, the determining, based on the at least one processing node and according to the position information of the particles in the different container units, the collision information and the motion trajectory of the particles in the first embodiment of the present invention is optimized, and specifically, the determining, based on the at least one processing node and according to the position information of the particles in the different container units, the collision information and the motion trajectory of the particles includes: and searching adjacent particle information of the particles in different container units concurrently based on the at least one processing node, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information. The above-described situation of the particle motion simulation method according to the embodiment of the present invention will be described with reference to fig. 5.
Fig. 5 is a schematic flow chart of a particle motion simulation method according to a second embodiment of the present invention. As shown in fig. 5, the method may include the following:
s501, obtaining at least two container units filled with particles and at least one processing node associated with the container units, wherein the at least two container units are obtained by dividing a container.
S502, based on the at least one processing node, searching for adjacent particle information of particles in different container units, and based on the adjacent particle information, determining collision information and motion tracks of the particles in different container units.
During specific implementation, whether the particle diameters of particles in Euler orthogonal grids in different container units are the same (namely whether the particle diameters are single particle diameters) is determined, if the particle diameters are the same, the difference between the numbers of adjacent particles of different particles is small, a single-thread-single-particle mode is adopted to search the information of the adjacent particles of the particles in different Euler orthogonal grids, and then collision information and motion tracks of the particles in different container units are determined based on the information of the adjacent particles of the particles; if the difference is not the same, the grid is indicated to have particles with large particle size and particles with small particle size, the number of adjacent particles of the particles with large particle size is far larger than that of the particles with small particle size, at the moment, a multithreading-single particle mode is adopted, adjacent particle information of the particles in different Euler orthogonal grids is searched, and then collision information and motion tracks of the particles in different container units are determined based on the adjacent particle information of the particles, so that the balance of collision calculation of the particles with large particle size is realized.
In practical application, if it is determined that the particle sizes of particles in the euler orthogonal grids are different, the calculation performance of a processing core in any processing node is strong, but a plurality of threads cannot be simultaneously initiated, the single-thread multi-particle mode is adopted to search adjacent particle information of the particles in different euler orthogonal grids, and then collision information and motion tracks of the particles in different container units are determined based on the adjacent particle information of the particles. I.e. collision calculations where one thread handles multiple neighboring particles.
For the single-thread-single-particle mode, the multi-thread-single-particle mode, and the single-thread-multi-particle mode, the information of the adjacent particles of the particles in different euler orthogonal grids is searched, and then based on the information of the adjacent particles of the particles, the collision information and the motion trajectory of the particles in different container units are determined, as shown in fig. 6(a) -6 (c). Wherein, FIG. 6(a) is a single-threaded-single-particle approach; FIG. 6(b) is a multi-thread-single-grain approach; fig. 6(c) shows a single-pass-multi-particle mode.
That is to say, in the embodiment of the present invention, based on the at least one processing node, searching for neighboring particle information of particles in different container units concurrently, and determining collision information and motion trajectories of particles in different container units based on the neighboring particle information includes:
determining whether the particle sizes of the particles in the Euler orthogonal grid are the same;
if yes, searching adjacent particle information of the particles in the Euler orthogonal grid in a single-thread-single-particle mode, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information;
if not, searching adjacent particle information of the particles in the Euler orthogonal grid by adopting a multi-thread-single particle mode, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information.
Wherein, a multithread-single-particle mode is adopted to search the adjacent particle information of the particles in the Euler orthogonal grid, and based on the adjacent particle information, the collision information and the motion trail of the particles in different container units are determined, and the method further comprises the following steps:
and if any processing node cannot execute the multi-thread single-particle mode, searching adjacent particle information of the particles in the Euler orthogonal grid by adopting the single-thread multi-particle mode, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information.
Further, in this embodiment of the present invention, when the at least one processing node determines collision information and motion trajectories of particles in different container units based on the neighboring particle information, the collision information includes: collision information between a particle and an adjacent particle, and collision information between a particle and an inner wall of the container unit.
The collision information between the particles and the adjacent particles can be determined by adopting the existing discrete unit method or the calculation particle model method, the collision information between the particles and the inner wall of the container unit is larger due to the fact that the structure of the inner wall of the container unit is possibly more complex or the difference of the spatial scale is larger, the triangular surface element is larger, the calculation resource amount is larger, and the problem that the calculation of the single-precision floating point number is insufficient when the relevant collision relation between the particles and the triangular surface element is calculated due to the mobility of the particles and the precision of the floating point number modeled by the triangular surface element in computer equipment can occur. Therefore, according to the embodiment of the invention, the single-precision floating point number can be adopted in the storage of the triangular surface element, and when the collision information between the particles and the triangular surface element is calculated, the double-precision floating point number is adopted for calculation, so that the combination of the single-precision floating point number and the double-precision floating point number is realized, the calculation speed advantage of the single-precision floating point number and the precision advantage of the double-precision floating point number are fully applied, and the high-precision and high-efficiency calculation of the collision information between the inner wall of the complex container and the particles is realized.
That is to say, in the embodiment of the present invention, when the processing node is used to process the collision information between the particles in the euler orthogonal grid in the corresponding container unit and the inner wall of the container unit, the single-double precision floating point combination mode can be adopted to perform calculation, so as to achieve the purpose of high precision and high efficiency.
As another optional implementation manner, the collision information between the particle and the inner wall of the container unit can be calculated by combining the half-precision floating point number, the single-precision floating point number and the double-precision floating point number.
S503, summarizing the collision information and the motion tracks of the particles in different container units to obtain the current motion state of the particles in the container.
S504, when the detection meets the stop condition, the final motion state of the particles in the container is obtained.
According to the technical scheme provided by the embodiment of the invention, when the collision information between the particles and the triangular surface element is calculated, the single-precision floating point number and the double-precision floating point number are adopted for calculation, so that the combination of the single-precision floating point number and the double-precision floating point number is realized, the calculation speed advantage of the single-precision floating point number and the precision advantage of the double-precision floating point number are fully applied, and the high-precision and high-efficiency calculation of the collision information between the inner wall of the complex container and the particles is realized.
EXAMPLE III
In order to achieve the above object, an embodiment of the present invention further provides a particle motion simulation apparatus. Fig. 7 is a schematic structural diagram of a particle motion simulation apparatus according to a third embodiment of the present invention. As shown in fig. 7, a particle motion simulation apparatus 700 according to an embodiment of the present invention includes: an acquisition module 710, a determination module 712, a summary module 713, and a control module 714.
The acquiring module 710 is configured to acquire at least two container units containing particles and at least one processing node associated with the container units, where the at least two container units are obtained by partitioning a container;
the determining module 712 is configured to determine collision information and a motion trajectory of the particles according to the position information of the particles in different container units concurrently based on the at least one processing node;
the summarizing module 713 is used for summarizing collision information and motion tracks of particles in different container units to obtain current motion states of the particles in the container;
the control module 714 is used for obtaining the final motion state of the particles in the container when the detection meets the stop condition.
As an optional implementation manner of the embodiment of the present invention, the determining module 712 is specifically configured to:
and searching adjacent particle information of the particles in different container units concurrently based on the at least one processing node, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information.
As an optional implementation manner of the embodiment of the present invention, the determining module 712 further includes:
a first determining subunit, a second determining subunit and a third determining subunit;
the first determining subunit is used for determining whether the particle sizes of the particles in the Euler orthogonal grid are the same or not;
a second determining subunit, configured to search, if yes, information of neighboring particles of the particles in the euler orthogonal grid in a single-thread-single-particle manner, and determine collision information and motion trajectories of the particles in different container units based on the information of the neighboring particles;
and the third determining subunit is configured to, if not, search for adjacent particle information of particles in the euler orthogonal grid in a multithreading-single particle manner, and determine collision information and motion trajectories of particles in different container units based on the adjacent particle information.
As an optional implementation manner of the embodiment of the present invention, the third determining subunit is further configured to:
and if any processing node cannot execute the multi-thread single-particle mode, searching adjacent particle information of the particles in the Euler orthogonal grid by adopting the single-thread multi-particle mode, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information.
As an optional implementation manner of the embodiment of the present invention, the obtaining module 710 is specifically configured to:
according to a first scale division rule, dividing the container to obtain at least two first container units;
if the number of the particles in any first container unit is larger than the number threshold, dividing the first container unit according to a second scale division rule to obtain at least two second container units;
obtaining at least two container units of the container based on the at least two first container units and the at least two second container units.
As an optional implementation manner of the embodiment of the present invention, the obtaining module 710 is further configured to:
and acquiring at least one processing node associated with different container units according to the number of particles in the different container units.
It should be noted that the foregoing explanation of the embodiment of the particle motion simulation method is also applicable to the particle motion simulation apparatus of this embodiment, and the implementation principle thereof is similar, and is not repeated here.
According to the technical scheme provided by the embodiment of the invention, the container filled with the particles is divided into at least two container units, collision information and motion tracks of the particles are determined according to position information of the particles in different container units based on at least one processing node associated with different container units, then the collision information and the motion tracks of the particles in different container units are summarized to obtain the current motion state of the particles in the container, and when the detection meets the stop condition, the final motion state of the particles in the container is obtained. Therefore, the container filled with a large number of particles is divided into the plurality of container units, concurrent motion analysis is carried out on the particles in each container unit, the motion analysis results of the particles in all the container units are collected to obtain the final motion state of the particles in the whole container, the simulation scale and the simulation efficiency of particle motion are improved, and the user experience is improved
Example four
In order to achieve the above object, an embodiment of the present invention further provides a computer device. Preferably, the computer device in the embodiment of the present invention is a supercomputer. Referring to fig. 8, the present embodiment provides a computer apparatus 800, which includes: one or more processors 810; a storage device 812, configured to store one or more programs, when the one or more programs are executed by the one or more processors 810, so that the one or more processors 810 implement the particle motion simulation method provided by the embodiment of the present invention, including:
obtaining at least two container units containing particles and at least one processing node associated with the container units, wherein the at least two container units are obtained by dividing a container;
determining collision information and motion tracks of particles according to position information of the particles in different container units concurrently based on the at least one processing node;
summarizing collision information and motion tracks of particles in different container units to obtain the current motion state of the particles in the container;
upon detection that a stopping condition is met, a final state of motion of the particles in the container is obtained.
Of course, those skilled in the art will understand that the processor 810 may also implement the technical solution of the particle motion simulation method provided in any embodiment of the present invention.
It should be noted that, in the embodiment of the present invention, a processor is specifically a many-core processor.
As shown in fig. 8, computer device 800 is in the form of a general purpose computing device. The components of computer device 800 may include, but are not limited to: one or more processors or processors 810, a storage device 812, and a bus 18 that couples the various system components (including the storage device 812 and the processors 810).
Bus 18 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Computer device 800 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by computer device 800 and includes both volatile and nonvolatile media, removable and non-removable media.
Storage 812 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)30 and/or cache memory 32. The computer device 800 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 34 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 by one or more data media interfaces. Storage 812 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28, such program modules 42 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may comprise an implementation of a network environment. Program modules 42 generally carry out the functions and/or methodologies of the described embodiments of the invention.
The computer device 800 may also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), with one or more devices that enable a user to interact with the computer device 800, and/or with any devices (e.g., network card, modem, etc.) that enable the computer device 800 to communicate with one or more other computing devices. Such communication may be through an input/output (I/O) interface 22. Moreover, computer device 800 may also communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network such as the Internet) via network adapter 20. As shown, the network adapter 20 communicates with the other modules of the computer device 800 via the bus 18. It should be appreciated that although not shown in the figures, other hardware and/or software modules may be used in conjunction with the computer device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processor 810 executes various functional applications and data processing, such as implementing a particle motion simulation method provided by an embodiment of the present invention, by executing a program stored in the storage device 812.
It should be noted that the foregoing explanation of the embodiment of the particle motion simulation method is also applicable to the computer device of the embodiment, and the implementation principle thereof is similar and will not be described herein again.
According to the technical scheme provided by the embodiment of the invention, the container filled with the particles is divided into at least two container units, collision information and motion tracks of the particles are determined according to position information of the particles in different container units based on at least one processing node associated with different container units, then the collision information and the motion tracks of the particles in different container units are summarized to obtain the current motion state of the particles in the container, and when the detection meets the stop condition, the final motion state of the particles in the container is obtained. Therefore, the container filled with a large number of particles is divided into the plurality of container units, concurrent motion analysis is carried out on the particles in each container unit, the motion analysis results of the particles in all the container units are collected to obtain the final motion state of the particles in the whole container, the simulation scale and the simulation efficiency of particle motion are improved, and the user experience is improved
EXAMPLE five
In order to achieve the above object, the present invention also provides a computer-readable storage medium. A computer-readable storage medium provided by an embodiment of the present invention stores thereon a computer program, which when executed by a processor implements a particle motion simulation method according to an embodiment of the present invention, the method including:
obtaining at least two container units containing particles and at least one processing node associated with the container units, wherein the at least two container units are obtained by dividing a container;
determining collision information and motion tracks of particles according to position information of the particles in different container units concurrently based on the at least one processing node;
summarizing collision information and motion tracks of particles in different container units to obtain the current motion state of the particles in the container;
upon detection that a stopping condition is met, a final state of motion of the particles in the container is obtained.
Of course, the computer-readable storage medium provided by the embodiments of the present invention, on which the computer program executable instructions are stored, is not limited to the method operations described above, and may also perform related operations in the particle motion simulation method provided by any embodiments of the present invention.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method of simulating particle motion, comprising:
obtaining at least two container units containing particles and at least one processing node associated with the container units, wherein the at least two container units are obtained by dividing a container;
determining collision information and motion tracks of particles according to position information of the particles in different container units concurrently based on the at least one processing node;
summarizing collision information and motion tracks of particles in different container units to obtain the current motion state of the particles in the container;
upon detection that a stopping condition is met, a final state of motion of the particles in the container is obtained.
2. The method of claim 1, wherein determining collision information and motion trajectories of particles based on the at least one processing node concurrently from position information of particles in different container units comprises:
and searching adjacent particle information of the particles in different container units concurrently based on the at least one processing node, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information.
3. The method according to claim 2, wherein the step of searching for neighboring particle information of particles in different container units based on the at least one processing node concurrently, and determining collision information and motion trajectories of particles in different container units based on the neighboring particle information specifically comprises:
determining whether the particle sizes of the particles in the Euler orthogonal grid are the same;
if yes, searching adjacent particle information of the particles in the Euler orthogonal grid in a single-thread-single-particle mode, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information;
if not, searching adjacent particle information of the particles in the Euler orthogonal grid by adopting a multi-thread-single particle mode, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information.
4. The method of claim 3, wherein neighboring grain information of the grains in the Euler orthogonal grid is searched in a multi-thread-single-grain manner, and collision information and motion trajectories of the grains in different container units are determined based on the neighboring grain information, further comprising:
and if any processing node cannot execute the multi-thread single-particle mode, searching adjacent particle information of the particles in the Euler orthogonal grid by adopting the single-thread multi-particle mode, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information.
5. The method of claim 1, wherein obtaining at least two container units containing particles comprises:
according to a first scale division rule, dividing the container to obtain at least two first container units;
if the number of the particles in any first container unit is larger than the number threshold, dividing the first container unit according to a second scale division rule to obtain at least two second container units;
obtaining at least two container units of the container based on the at least two first container units and the at least two second container units.
6. The method of claim 1, wherein obtaining at least one processing node associated with the at least two container units comprises:
and acquiring at least one processing node associated with different container units according to the number of particles in the different container units.
7. A particle motion simulation apparatus, comprising:
the system comprises an acquisition module, a storage module and a processing module, wherein the acquisition module is used for acquiring at least two container units filled with particles and at least one processing node associated with the container units, and the at least two container units are obtained by dividing a container;
the determining module is used for determining collision information and motion tracks of the particles according to the position information of the particles in different container units based on the at least one processing node;
the summarizing module is used for summarizing collision information and motion tracks of particles in different container units to obtain the current motion state of the particles in the container;
and the control module is used for obtaining the final motion state of the particles in the container when the detection meets the stop condition.
8. The apparatus of claim 7, wherein the determining module is specifically configured to:
and searching adjacent particle information of the particles in different container units concurrently based on the at least one processing node, and determining collision information and motion tracks of the particles in different container units based on the adjacent particle information.
9. A computer device, comprising:
one or more processors;
a storage device for storing one or more programs,
when executed by the one or more processors, cause the one or more processors to implement the particle motion simulation method of any one of claims 1-6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out a particle motion simulation method according to any one of claims 1 to 6.
CN201911140026.5A 2019-11-20 2019-11-20 Particle motion simulation method, device, equipment and medium Pending CN110866343A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911140026.5A CN110866343A (en) 2019-11-20 2019-11-20 Particle motion simulation method, device, equipment and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911140026.5A CN110866343A (en) 2019-11-20 2019-11-20 Particle motion simulation method, device, equipment and medium

Publications (1)

Publication Number Publication Date
CN110866343A true CN110866343A (en) 2020-03-06

Family

ID=69655572

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911140026.5A Pending CN110866343A (en) 2019-11-20 2019-11-20 Particle motion simulation method, device, equipment and medium

Country Status (1)

Country Link
CN (1) CN110866343A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113351354A (en) * 2021-05-31 2021-09-07 江苏邦鼎科技有限公司 Crushing method and system based on movement locus of material particles
CN115076613A (en) * 2022-06-28 2022-09-20 中国石油大学(北京) Pipeline erosion corrosion monitoring method, device, equipment and storage medium

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113351354A (en) * 2021-05-31 2021-09-07 江苏邦鼎科技有限公司 Crushing method and system based on movement locus of material particles
CN113351354B (en) * 2021-05-31 2022-02-08 江苏邦鼎科技有限公司 Crushing method and system based on movement locus of material particles
CN115076613A (en) * 2022-06-28 2022-09-20 中国石油大学(北京) Pipeline erosion corrosion monitoring method, device, equipment and storage medium
CN115076613B (en) * 2022-06-28 2023-08-25 中国石油大学(北京) Method, device, equipment and storage medium for monitoring erosion corrosion of pipeline

Similar Documents

Publication Publication Date Title
CN110515739B (en) Deep learning neural network model load calculation method, device, equipment and medium
Germaschewski et al. The plasma simulation code: A modern particle-in-cell code with patch-based load-balancing
Groen et al. Analysing and modelling the performance of the HemeLB lattice-Boltzmann simulation environment
Zheng et al. GPU-based parallel algorithm for particle contact detection and its application in self-compacting concrete flow simulations
Chen et al. A flow-guided file layout for out-of-core streamline computation
Xiong et al. Efficient 3D DNS of gas–solid flows on Fermi GPGPU
Liu et al. A hybrid solution method for CFD applications on GPU-accelerated hybrid HPC platforms
CN110866343A (en) Particle motion simulation method, device, equipment and medium
Morikawa et al. Explicit incompressible smoothed particle hydrodynamics in a multi-GPU environment for large-scale simulations
Avril et al. Fast collision culling in large-scale environments using GPU mapping function
US20140365186A1 (en) System and method for load balancing for parallel computations on structured multi-block meshes in cfd
Zou et al. A GPU-based DEM model for the pebble flow study in packed bed: Simulation scheme and validation
Ali et al. Visualization of large time-varying vector data
KR101642823B1 (en) Neighbor discovery computation system
DeMarle et al. In situ visualization with temporal caching
JP6677733B2 (en) Efficient time series histogram
Chen et al. BALS: Blocked alternating least squares for parallel sparse matrix factorization on GPUs
Park et al. MH cache: A multi-retention STT-RAM-based low-power last-level cache for mobile hardware rendering systems
Akkurt et al. An efficient edge based data structure for the compressible Reynolds‐averaged Navier–Stokes equations on hybrid unstructured meshes
Tiscar et al. DEM-based modelling framework for spray-dried powders in ceramic tiles industry. Part II: Solver implementation
Bender et al. k-Means Clustering on Two-Level Memory Systems
JPH07140289A (en) Neutron transport simulator
CN109800506B (en) Performance evaluation method and system of aircraft
Kuprii et al. RICSR: A modified CSR format for storing sparse matrices
Perks et al. Towards automated memory model generation via event tracing

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