Methods, apparatus, equipment and media for simulating particle motion
By dividing the container into multiple units and calculating the collision and motion trajectory of particles in parallel, the problem of small scale and low efficiency in the simulation of macroscopic discrete particle systems is solved, and larger-scale and more efficient particle motion simulation is achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INSTITUTE OF PROCESS ENGINEERING CHINESE ACADEMY OF SCIENCES
- Filing Date
- 2019-11-20
- Publication Date
- 2026-06-30
AI Technical Summary
In existing technologies, motion simulation of macroscopic discrete particle systems is small in scale and inefficient, making it difficult to effectively handle the motion analysis of a large number of particles.
The container containing particles is divided into multiple container units. Based on the processing node associated with each container unit, the collision information and motion trajectory of the particles are calculated concurrently. The motion states of each unit are then summarized to obtain the final motion state of the entire container.
It improves the scale and efficiency of particle motion simulation and enhances the user experience.
Smart Images

Figure CN110866343B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of macroscopic discrete particle motion simulation technology, and in particular to a particle motion simulation method, apparatus, device and storage medium. Background Technology
[0002] Macroscopic discrete particle systems are widely used in process industries, such as catalyst particles in gas-solid two-phase flow reactors, drug particles in the pharmaceutical industry, and coke and sinter in blast furnaces. However, due to the diverse flow patterns involved, a unified macroscopic theory describing all flow patterns has not yet been established for macroscopic discrete particle systems. This is especially true in multiphase flow systems, where the spatiotemporal multi-scale behavior of particles poses significant challenges to accurately predicting particle motion. Experimental methods also struggle to efficiently study the motion of complex macroscopic particles due to limitations in temporal and spatial measurement accuracy and experimental complexity. In recent years, the rapid development of computer science has greatly enhanced the computing power of computers, making it possible to model macroscopic discrete particle systems.
[0003] Currently, the Discrete Element Method (DEM) is commonly used for modeling macroscopic discrete particle systems using computer equipment. DEM is a widely adopted simulation method for particle flow systems internationally. It has been extensively applied in fields such as geotechnical engineering, mining, construction, pharmaceuticals, and food processing, playing a significant role in guiding engineering and process design. The basic idea of DEM is to treat two discrete elements (such as particles) as elastically compressible particles. Based on the interactions between particles and the particle motion equations, the motion of each particle in the macroscopic discrete particle system is simulated and calculated. Finally, the motion patterns and laws of the particles in the system are statistically analyzed.
[0004] However, in practical applications, modeling each particle is a difficult or even impossible task due to the sheer number of particles. To address this issue, researchers have proposed using computational particles (one computational particle contains multiple real particles) to reduce the number of real particles required for computation. However, the size of the computational particles is limited by computational accuracy, and in the simulation of actual industrial-scale equipment, the sheer number of particles means that even with computational particle methods, the computational load remains unbearable, resulting in small-scale and inefficient particle motion simulations. Summary of the Invention
[0005] This invention provides a method, apparatus, device, and storage medium for simulating particle motion, which improves the scale and efficiency of particle motion simulation.
[0006] In a first aspect, embodiments of the present invention provide a particle motion simulation method, the method comprising:
[0007] Obtain 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 the containers;
[0008] Based on the at least one processing node, the collision information and motion trajectory of the particles are determined concurrently according to the position information of the particles in different container units.
[0009] The collision information and motion trajectory of particles in different container units are summarized to obtain the current motion state of the particles in the container;
[0010] When the stopping condition is met, the final motion state of the particles in the container is obtained.
[0011] Secondly, embodiments of the present invention also provide a particle motion simulation device, the device comprising:
[0012] An acquisition module is used to acquire 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 the container;
[0013] The determination module is used to determine the collision information and motion trajectory of particles based on the at least one processing node and concurrently according to the position information of particles in different container units.
[0014] The aggregation module is used to aggregate the collision information and motion trajectory of particles in different container units to obtain the current motion state of the particles in the container.
[0015] The control module is used to obtain the final motion state of the particles in the container when the stopping condition is met.
[0016] Thirdly, embodiments of the present invention also provide a computer device, the computer device comprising:
[0017] One or more processors;
[0018] Storage device for storing one or more programs.
[0019] When the one or more programs are executed by the one or more processors, the one or more processors implement the particle motion simulation method according to any embodiment of the present invention.
[0020] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the particle motion simulation method described in any embodiment of the present invention.
[0021] The technical solutions disclosed in the embodiments of the present invention have the following beneficial effects:
[0022] By dividing a container containing particles into at least two container units, and based on at least one processing node associated with each container unit, concurrently determining the collision information and motion trajectory of the particles according to their position information in different container units, and then summarizing the collision information and motion trajectories 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 a stopping condition is met. This allows for dividing a container containing a large number of particles into multiple container units, performing concurrent motion analysis on the particles in each container unit, and summarizing the motion analysis results of all container units to obtain the final motion state of the particles in the entire container. This improves the simulation scale and efficiency of particle motion and enhances the user experience. Attached Figure Description
[0023] Figure 1 This is a schematic flowchart of a particle motion simulation method provided in Embodiment 1 of the present invention;
[0024] Figure 2 This is a schematic diagram of the process of obtaining at least two container units by dividing a container, as provided in Embodiment 1 of the present invention;
[0025] Figures 3(a)-3(c) This is a schematic diagram of dividing a container containing a large number of particles into at least two container units, as provided in Embodiment 1 of the present invention.
[0026] Figure 4 This is a performance diagram of concurrently determining the particle motion state provided in Embodiment 1 of the present invention;
[0027] Figure 5 This is a schematic flowchart of a particle motion simulation method provided in Embodiment 2 of the present invention;
[0028] Figure 6(a) is a schematic diagram of computation using a single-threaded, single-granular approach provided in Embodiment 2 of the present invention;
[0029] Figure 6(b) is a schematic diagram of the calculation using a multi-threaded-single-granular approach provided in Embodiment 2 of the present invention;
[0030] Figure 6(c) is a schematic diagram of computation using a single-threaded-multi-granular approach provided in Embodiment 2 of the present invention;
[0031] Figure 7 This is a schematic diagram of the structure of a particle motion simulation device provided in Embodiment 3 of the present invention;
[0032] Figure 8 This is a schematic diagram of the structure of a computer device provided in Embodiment 4 of the present invention. Detailed Implementation
[0033] The embodiments of the present invention will be further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the present invention and not intended to limit the scope of the invention. Furthermore, it should be noted that, for ease of description, the accompanying drawings show only the parts relevant to the embodiments of the present invention, and not all structures.
[0034] This invention addresses the problems of small simulation scale and low efficiency in particle motion simulation in related technologies by proposing a particle motion simulation method, apparatus, device, and storage medium.
[0035] This invention, through obtaining information on at least two container units containing particles and at least one processing node associated with each container unit, concurrently determines the collision information and motion trajectory of the particles based on the position information of the particles in different container units, using the at least one processing node associated with each container unit. Then, the collision information and motion trajectories of the particles in different container units are summarized to obtain the current motion state of the particles in the container. When a stopping condition is detected, the final motion state of the particles in the container is obtained. This allows for the division of a container containing a large number of particles into multiple container units, enabling concurrent motion analysis of the particles in each container unit. The final motion state of the particles in the entire container is obtained by summarizing the motion analysis results from all container units, thereby improving the simulation scale and efficiency of particle motion and enhancing the user experience.
[0036] To clearly illustrate the particle motion simulation method of the present invention, the discrete particle simulation method will be described first.
[0037] Specifically, the main idea of discrete particle simulation is to explicitly model particulate materials in a real system, obtain the motion state of the entire system by tracking the motion of particles, and obtain the motion laws of particulate materials in the entire system through the analysis of microscopic and macroscopic properties. The motion of macroscopic particles follows Newton's second law, and the specific governing equations are:
[0038]
[0039] Where Fcollide is the collision between particles, mg is the gravity acting on the particles, v is the velocity of the particles, t is time, and dv / dt is the derivative of v with respect to t.
[0040] The particle motion simulation method, apparatus, device, and storage medium of the present invention will now be described in detail with reference to the accompanying drawings.
[0041] Example 1
[0042] Figure 1 This is a flowchart illustrating a particle motion simulation method according to Embodiment 1 of the present invention. This embodiment is applicable to scenarios involving large-scale simulation of particle motion. The method can be executed by a particle motion simulation device, which can consist of hardware and / or software and can be integrated into a computer device. The computer device can be any device with data processing capabilities; in this embodiment, the computer device is preferably a device with a many-core processor, such as a supercomputer. The particle motion simulation method specifically includes the following:
[0043] S101, acquire at least two container units containing particles and at least one processing node associated with the container units, the at least two container units being obtained by dividing the containers.
[0044] Specifically, before executing S101, this embodiment of the invention first performs data information preparation operations, including: container file, particle parameter settings, calculation value settings, and calculation resource allocation.
[0045] The container file refers to the file used to hold the particles. Particle parameters include the number of particles, particle size, density, mass, and coefficient of restitution. Calculated values include rule parameters and numerical parameters. Rule parameters include container partitioning rules and many-core processor cluster allocation rules. Numerical parameters include time step and particle search frequency, where the time step and particle search frequency can be set according to actual application needs. Sufficient CPU and many-core processor resources are required for parallel computing.
[0046] In this embodiment, the container file can be generated using various commercial software, such as SolidWorks, PointWise, and Pro / E. This generates a 3D model of the container holding the particles and exports an STL format file describing the triangular facets, which is then used to construct the container.
[0047] The container segmentation rules are determined in parallel based on the spatial distribution and position of the particles.
[0048] The cluster allocation rules for many-core processors are dynamically allocated based on the number of particles in at least two container units after container partitioning.
[0049] After the data preparation operation is completed, the above data information can be stored in the storage unit to improve the data loading speed when retrieving relevant data information later.
[0050] Furthermore, after the data preparation operation is completed, the present invention can read the prepared container file, particle parameter settings, calculation value settings and computing resource allocation from the storage unit, and transmit the above information between the CPU and the many-core processor to simulate the movement of particles in the computing container, wherein there can be multiple many-core processors.
[0051] Optionally, the CPU can obtain the container file based on the read data information and use the container segmentation rules and the processing node cluster allocation rules of the many-core processor to divide the constructed container into at least two container units. Then, it can allocate at least one corresponding processing node to different container units and send the at least two container units and the at least one processing node associated with the container units to the many-core processor, so that the many-core processor can perform simulation calculations on the movement of particles contained in different container units based on the obtained at least two container units and the at least one processing node associated with the container units.
[0052] For example, in an embodiment of the present invention, dividing a constructed container containing a large number of particles into at least two container units can be achieved through the following steps:
[0053] S201, according to the first scale segmentation rule, the container is segmented to obtain at least two first container units.
[0054] S202, determine whether the number of particles in at least two first container units is greater than the number threshold. If it is greater, then execute S203; otherwise, execute S205.
[0055] In practice, the number of particles in each segmented first container unit can be monitored, and the number of particles in each first container unit can be compared with a quantity threshold to determine which first container units have a particle count greater than the threshold and which first container units have a particle count less than or equal to the threshold. Then, a secondary segmentation operation is performed on the first container units with a particle count greater than the threshold.
[0056] S203, if it is determined that the number of particles in any first container unit is greater than the number threshold, then the first container unit is divided according to the second scale segmentation rule to obtain at least two second container units.
[0057] S204, based on the at least two first container units and the at least two second container units, obtain at least two container units of the container.
[0058] S205, if it is determined that the number of particles in at least two first container units is less than or equal to a quantity threshold, then the at least two first containers are used as at least two container units of a container.
[0059] The first-scale segmentation rule, the second-scale segmentation rule, and the quantity threshold can be adaptively set according to the actual application needs.
[0060] In this embodiment of the invention, the segmentation accuracy of the second-scale segmentation rule is higher than that of the first-scale segmentation rule, i.e., the scale is smaller. That is to say, the first-scale segmentation rule performs large-scale segmentation of the container, while the second-scale segmentation rule further refines the segmentation of the container units after large-scale segmentation, thereby making the number of particles contained in each of the final segmented container units more uniform. This reduces communication loss during parallel computing when calculating particle movement and improves the overall efficiency of parallel computing.
[0061] For example, as shown in Figure 3(a), the container containing particles is first divided into 9 first container units based on the first scale segmentation rule, namely 301, 302, 303, 304, 305, 306, 307, 308 and 309 (as shown in Figure 3(b)). Assuming a quantity threshold of 100,000, the number of particles currently contained in the nine first container units is obtained. If the number of particles in unit 301 is 110,000, in unit 302 is 80,000, in unit 303 is 250,000, in unit 304 is 90,000, in unit 305 is 120,000, in unit 306 is 75,000, in unit 307 is 98,000, in unit 308 is 50,000, and in unit 309 is 160,000, then it is determined that the number of particles in units 301, 303, 305, and 309 all exceed 100,000. Therefore, the second-scale segmentation rule is used to further segment units 301, 303, 305, and 309. 301 is divided into two second container units: 3011 and 3012; 303 is divided into three second container units: 3031, 3032 and 3033; 305 is divided into two second container units: 3051 and 3052; and 309 is divided into two second container units: 3091 and 3092, so that the number of particles in the first container units 302, 304, 306, 307, 308 and the second container units 3011, 3012, 3031, 3032, 3033, 3051, 3052, 3091 and 3092 is less than or equal to the number threshold of 100,000. 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 (as shown in Figure 3(c)).
[0062] Furthermore, in this embodiment, after acquiring at least two container units, at least one processing node associated with the at least two container units can also be acquired.
[0063] In practice, obtaining at least one processing node associated with at least two container units can be achieved in the following ways:
[0064] Method 1:
[0065] Based on the number of particles in different container units, at least one processing node associated with each of the different container units is obtained.
[0066] Typically, a processing node can handle a certain number of particles. Therefore, in this embodiment, based on the number of particles in the unfilled container unit, a corresponding number of processing nodes can be assigned to different container units so that the processing nodes are in the optimal state when calculating the particle movement in the container unit.
[0067] In practical applications, a many-core processor can have multiple processing nodes. Therefore, in this embodiment, when allocating at least one processing node to different container units based on the number of particles in different container units, it is also possible to further allocate a corresponding number of processing nodes to each container unit based on the number of processing nodes that the many-core processor has.
[0068] Method 2:
[0069] In the pre-established mapping relationship between particle quantity and processing node, at least one processing node is determined to be associated with each container unit.
[0070] In other words, the embodiments of the present invention can pre-establish a mapping relationship between different particle numbers and corresponding processing nodes, so that after obtaining the particle number in different container units, the corresponding number of processing nodes can be directly obtained from the mapping relationship based on the particle number, thereby improving the speed of obtaining processing nodes.
[0071] It should be noted that the above description of obtaining at least one processing node associated with at least two container units is merely illustrative and is not intended to limit the scope of the present invention.
[0072] S102, based on the at least one processing node, concurrently determine the collision information and motion trajectory of the particles according to the position information of the particles in different container units.
[0073] In this embodiment of the invention, collision information refers to the collision situation and force between a particle and its adjacent particles, as well as the collision situation and force between a particle and the inner wall of the container unit. Specifically, the collision force between a particle and its adjacent particles refers to the sum of the collision forces between the particle and each of its adjacent particles. The motion trajectory refers to the trajectory of a particle after colliding with its adjacent particles or with the inner wall of the container unit, based on the collision force. It should be noted that in this embodiment, the collision information and motion trajectory of the particles are determined based on the position information of the particles in different container units; specifically, this determination operation is performed on each particle in the container unit.
[0074] For example, the particles in different container units can first be divided into multiple grids based on an Eulerian orthogonal grid. Then, according to the processing core in the processing node corresponding to each grid, the collision information and motion trajectory of the particles are determined concurrently based on the position information of the particles in different grids. This allows multiple processing cores to process the particles in multiple grids in parallel. In this embodiment of the invention, the size of the Eulerian orthogonal grid is set according to the particle size distribution in the simulation system, typically selected as 2.5-7.5 times the maximum particle size, and the size of the Eulerian orthogonal grid is smaller than the size of the container unit.
[0075] Specifically, based on the processing cores in the processing nodes corresponding to different grids, the collision information and motion trajectory of particles are determined in parallel according to the position information of particles in different grids. This includes: searching for adjacent particles of each particle in different grids to obtain the adjacent particle information of each particle, and then determining the collision information and motion trajectory of each particle based on the adjacent particle information. When any particle is adjacent to the inner wall of the container unit, the adjacent particle information also includes the information of the inner wall of the container unit.
[0076] In this embodiment, particle search refers to detecting the contact state between particles and establishing information on adjacent particles that may interact with each particle, so as to calculate the interaction force between particles.
[0077] Typically, processing nodes contain local memory, shared memory, or cache space. Therefore, in this embodiment of the invention, when at least one processing node searches for neighboring particles of each particle in different grids, it can store the searched neighboring particle information and particle position information in its own local memory, shared memory, or cache space. If the processing node can perform multi-threaded computation, multiple threads can share the neighboring particle information and particle position information to achieve sharing and reuse of the neighboring particle information and particle position information, reducing data loading volume, saving memory loading time, and thus improving the loading speed of neighboring particle information and particle position information.
[0078] Furthermore, after finding the neighboring particle information for each particle, at least one processing node is controlled to load the particle information for each particle from local memory, shared memory, or cache space. Based on the neighboring particle information, the collision information and motion trajectory of each particle are determined. In specific implementations, this can be calculated using the discrete element method or by applying computational particle methods, which will not be elaborated upon here. Specifically, when calculating the collision force between each particle and its neighboring particles, it is obtained by summing the collision forces of all neighboring particles. For calculating the collision information and motion trajectory between particles and the inner wall of different container units, a combination of single-precision floating-point and double-precision floating-point methods can be used, as detailed in the following embodiments, which will not be elaborated upon here.
[0079] S103, the collision information and motion trajectory of particles in different container units are summarized to obtain the current motion state of the particles in the container.
[0080] S104, when the stopping condition is met, the final motion state of the particles in the container is obtained.
[0081] The motion state of the particles can include: particle position, motion speed, and motion direction.
[0082] In this embodiment of the invention, the stopping condition specifically refers to the current motion state of the particles in the container being in a stable state, or the current motion state of the particles in the container not being in a stable state but reaching a preset time. The preset time can be set according to actual application needs. For example, 5 hours (h), etc., are not specifically limited here.
[0083] In other words, after obtaining the current motion state of the particles in the container, it is first determined whether the current motion state is in a stable state; if it is in a stable state, the current motion state of the particles is determined as the final motion state; if it is not in a stable state, it is further determined whether the particle motion simulation time has reached the preset time; if it has, the current motion state of the particles is determined as the final motion state; if it has not, it is further executed to determine the collision information and motion trajectory of the particles based on the position information of the particles in different container units, and the collision information and motion trajectory of the particles in different container units are summarized to obtain the new motion state of the particles in the container, until the stopping condition is met.
[0084] Specifically, when it is determined that the current motion state of the particles in the container is not stable and the preset time has not been reached, the collision information and motion trajectory of the particles are determined based on the position information of the particles in different container units. The motion state (particle position, motion speed and motion direction) of each particle in different container units can be monitored. When it is determined based on the motion state of the particles that the motion distance of any particle is greater than the redundant distance with the previously searched adjacent particles, the information of the adjacent particles of the particle is re-acquired and the collision information and motion trajectory of the particle are re-determined based on the newly acquired information of the adjacent particles.
[0085] In this embodiment of the invention, the motion state of each particle in different container units can be monitored by using the frog-jumping algorithm to iterate the motion state of the particles, or by using the prediction-correction algorithm to iterate the motion state of the particles, etc., without being specifically limited here.
[0086] Furthermore, after obtaining the final motion state of the particles in the container, it can be output at a preset frequency so that technicians can analyze and determine the motion patterns and morphologies of the large number of particles contained in the container based on the output final motion state.
[0087] It is understood that, in this embodiment of the invention, the entire container is divided into multiple container units. At least one associated processing node is used to concurrently calculate the collision information and motion trajectory of each particle in each container unit. Then, the collision information and motion trajectories of particles in all container units are summarized to obtain the overall motion state of the particles in the entire container. This achieves the goal of calculating the motion of particles in the container in parallel blocks, followed by summarization to obtain the overall motion state of the particles in the entire container. This improves both computational speed and computational scale. Specific performance details are as follows: Figure 4 As shown.
[0088] The technical solution provided by this invention divides a container containing particles into at least two container units. Based on at least one processing node associated with each container unit, it concurrently determines the collision information and motion trajectory of the particles according to their position information in different container units. Then, it summarizes the collision information and motion trajectories of the particles in different container units to obtain the current motion state of the particles in the container. Finally, when a stopping condition is met, it obtains the final motion state of the particles in the container. This allows for the division of a container containing a large number of particles into multiple container units, enabling concurrent motion analysis of the particles in each container unit. The results of the motion analysis of particles in all container units are then summarized to obtain the final motion state of the particles in the entire container. This improves the simulation scale and efficiency of particle motion and enhances the user experience.
[0089] Example 2
[0090] Based on the above embodiment one, the optimization of determining the collision information and motion trajectory of particles concurrently based on the position information of particles in different container units based on the at least one processing node in embodiment one of the present invention is as follows: based on the at least one processing node, concurrently searching for the neighboring particle information of particles in different container units, and determining the collision information and motion trajectory of particles in different container units based on the neighboring particle information. The following is in conjunction with... Figure 5 The above-described situation of the particle motion simulation method of the present invention will be explained.
[0091] Figure 5 This is a schematic flowchart of a particle motion simulation method provided in Embodiment 2 of the present invention. Figure 5 As shown, the method may include the following:
[0092] S501, acquire at least two container units containing particles and at least one processing node associated with the container units, the at least two container units being obtained by dividing the containers.
[0093] S502, based on the at least one processing node, concurrently search for neighboring particle information of particles in different container units, and based on the neighboring particle information, determine the collision information and motion trajectory of particles in different container units.
[0094] In practice, the particle size of each particle in the Euler orthogonal grid in different container units is determined to be the same (i.e., whether it is a single particle size). If they are the same, it means that the number of adjacent particles of different particles is not significantly different. In this case, a single-threaded, single-particle approach is used to search for the adjacent particle information of particles in different Euler orthogonal grids. Then, based on the adjacent particle information, the collision information and motion trajectory of particles in different container units are determined. If they are different, it means that there are large-diameter particles and small-diameter particles in the grid. The number of adjacent particles of large-diameter particles is much greater than that of small-diameter particles. In this case, a multi-threaded, single-particle approach is used to search for the adjacent particle information of particles in different Euler orthogonal grids. Then, based on the adjacent particle information, the collision information and motion trajectory of particles in different container units are determined to achieve a balance in the collision calculation of large and small particles.
[0095] In practical applications, if it is determined that the particle sizes in the Eulerian orthogonal mesh are different, and the computational performance of the processing core in any processing node is strong, but it is impossible to launch many threads simultaneously, a single-threaded, multi-particle approach is adopted. This involves searching for neighboring particle information in different Eulerian orthogonal meshes, and then determining the collision information and motion trajectory of particles in different container cells based on the neighboring particle information. In other words, one thread handles the collision calculation of multiple neighboring particles.
[0096] The above methods, including single-threaded single-particle, multi-threaded single-particle, and single-threaded multi-particle approaches, search for neighboring particle information in different Eulerian orthogonal meshes. Based on this neighboring particle information, collision information and motion trajectories of particles in different container cells are determined. Specifically, as follows... Figures 6(a)-6(c) As shown in the figure. Among them, Figure 6(a) is the single-threaded single-granularity method; Figure 6(b) is the multi-threaded single-granularity method; and Figure 6(c) is the single-threaded multi-granularity method.
[0097] In other words, in this embodiment of the invention, based on the at least one processing node, the system concurrently searches for neighboring particle information of particles in different container units, and based on the neighboring particle information, determines the collision information and motion trajectory of particles in different container units, including:
[0098] Determine whether the particle size is the same in the Euler orthogonal grid;
[0099] If so, a single-threaded, single-particle approach is used to search for the neighboring particle information of the particles in the Euler orthogonal grid, and based on the neighboring particle information, the collision information and motion trajectory of the particles in different container units are determined.
[0100] If not, a multi-threaded single-particle approach is used to search for neighboring particle information in the Euler orthogonal grid, and based on the neighboring particle information, the collision information and motion trajectory of particles in different container units are determined.
[0101] The method employs a multi-threaded, single-particle approach to search for neighboring particle information within the Eulerian orthogonal mesh, and based on this neighboring particle information, determines the collision information and motion trajectories of particles in different container units. It also includes:
[0102] If any processing node cannot execute the multi-threaded single-particle mode, then the single-threaded multi-particle mode is adopted to search for the neighboring particle information of the particles in the Euler orthogonal mesh, and based on the neighboring particle information, to determine the collision information and motion trajectory of the particles in different container units.
[0103] Furthermore, in this embodiment of the invention, when at least one processing node determines the collision information and motion trajectory of particles in different container units based on the information of adjacent particles, the collision information includes: collision information between particles and adjacent particles, and collision information between particles and the inner wall of the container unit.
[0104] The collision information between particles and adjacent particles can be determined using existing discrete element methods or computational particle modeling methods. However, the collision information between particles and the inner wall of the container unit is more complex. This is because the inner wall structure of the container unit may be complex or have large spatial scale differences, resulting in larger triangular facets and thus greater computational resources. Furthermore, due to the motion of particles and the precision of floating-point numbers used in modeling triangular facets in computer equipment, single-precision floating-point calculations may be insufficient when calculating the relevant collision relationships between particles and triangular facets. Therefore, this embodiment of the invention uses single-precision floating-point numbers for triangular facet storage and double-precision floating-point numbers for calculating the collision information between particles and triangular facets. This combines single-precision and double-precision floating-point numbers, fully utilizing the computational speed advantage of single-precision floating-point numbers and the precision advantage of double-precision floating-point numbers to achieve high-precision and high-efficiency calculation of collision information between complex container inner walls and particles.
[0105] In other words, in the embodiments of the present invention, when processing the collision information between particles in the Euler orthogonal mesh and the inner wall of the container unit using the processing node, a combination of single and double precision floating-point calculations can be used to achieve the goal of high precision and high efficiency.
[0106] As another alternative implementation, the present invention can also use a combination of half-precision floating-point numbers, single-precision floating-point numbers, and double-precision floating-point numbers to calculate the collision information between particles and the inner wall of the container unit.
[0107] S503, the collision information and motion trajectory of particles in different container units are summarized to obtain the current motion state of the particles in the container.
[0108] S504, when the stopping condition is met, the final motion state of the particles in the container is obtained.
[0109] The technical solution provided by this invention calculates the collision information between particles and triangular elements by using single-precision floating-point numbers and double-precision floating-point numbers. This combines single-precision floating-point numbers and double-precision floating-point numbers, fully utilizing the speed advantage of single-precision floating-point numbers and the precision advantage of double-precision floating-point numbers to achieve high-precision and high-efficiency calculation of collision information between the inner wall of complex containers and particles.
[0110] Example 3
[0111] To achieve the above objectives, embodiments of the present invention also propose a particle motion simulation device. Figure 7 This is a schematic diagram of the structure of a particle motion simulation device provided in Embodiment 3 of the present invention. Figure 7 As shown, the particle motion simulation device 700 of this embodiment includes: an acquisition module 710, a determination module 712, a summarization module 713, and a control module 714.
[0112] The acquisition module 710 is used to acquire 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 the container.
[0113] The determination module 712 is used to determine the collision information and motion trajectory of the particles based on the at least one processing node and concurrently according to the position information of the particles in different container units.
[0114] The aggregation module 713 is used to aggregate the collision information and motion trajectory of particles in different container units to obtain the current motion state of the particles in the container.
[0115] The control module 714 is used to obtain the final motion state of the particles in the container when the stopping condition is met.
[0116] As an optional implementation of this invention, the determining module 712 is specifically used for:
[0117] Based on the at least one processing node, the neighboring particle information of particles in different container units is searched concurrently, and based on the neighboring particle information, the collision information and motion trajectory of particles in different container units are determined.
[0118] As an optional implementation of this invention, the determining module 712 further includes:
[0119] First determining subunit, second determining subunit, and third determining subunit;
[0120] The first determining sub-unit is used to determine whether the particle size of the particles in the Euler orthogonal grid is the same;
[0121] The second determining subunit is used to search for the neighboring particle information of the particle in the Euler orthogonal grid in a single-threaded single-particle manner if the condition is met, and to determine the collision information and motion trajectory of the particles in different container units based on the neighboring particle information.
[0122] The third determining sub-unit is used to, if not, employ a multi-threaded-single-particle approach to search for neighboring particle information in the Eulerian orthogonal grid, and based on the neighboring particle information, determine the collision information and motion trajectory of particles in different container units.
[0123] As an optional implementation of this invention, the third determining subunit is further configured to:
[0124] If any processing node cannot execute the multi-threaded single-particle mode, then the single-threaded multi-particle mode is adopted to search for the neighboring particle information of the particles in the Euler orthogonal mesh, and based on the neighboring particle information, to determine the collision information and motion trajectory of the particles in different container units.
[0125] As an optional implementation of this invention, the acquisition module 710 is specifically used for:
[0126] According to the first-scale segmentation rule, the container is segmented to obtain at least two first container units;
[0127] If it is determined that the number of particles in any first container unit is greater than the number threshold, then the first container unit is divided according to the second scale segmentation rule to obtain at least two second container units;
[0128] Based on the at least two first container units and the at least two second container units, at least two container units of the container are obtained.
[0129] As an optional implementation of this invention, the acquisition module 710 is further configured to:
[0130] Based on the number of particles in different container units, at least one processing node associated with each of the different container units is obtained.
[0131] It should be noted that the foregoing explanation of the particle motion simulation method embodiment also applies to the particle motion simulation device of this embodiment, and its implementation principle is similar, so it will not be repeated here.
[0132] The technical solution provided by this invention divides a container containing particles into at least two container units. Based on at least one processing node associated with each container unit, it concurrently determines the collision information and motion trajectory of the particles according to their position information in different container units. Then, it summarizes the collision information and motion trajectories of the particles in different container units to obtain the current motion state of the particles in the container. Finally, when a stopping condition is met, it obtains the final motion state of the particles in the container. This allows for the division of a container containing a large number of particles into multiple container units, enabling concurrent motion analysis of the particles in each container unit. The results of the motion analysis of particles in all container units are then summarized to obtain the final motion state of the particles in the entire container. This improves the simulation scale and efficiency of particle motion and enhances the user experience.
[0133] Example 4
[0134] To achieve the above objectives, embodiments of the present invention also provide a computer device. Preferably, the computer device in the embodiments of the present invention is a supercomputer. See also Figure 8 This embodiment provides a computer device 800, which includes: one or more processors 810; and a storage device 812 for storing one or more programs. When the one or more programs are executed by the one or more processors 810, the one or more processors 810 implement the particle motion simulation method provided in this embodiment of the invention, including:
[0135] Obtain 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 the containers;
[0136] Based on the at least one processing node, the collision information and motion trajectory of the particles are determined concurrently according to the position information of the particles in different container units.
[0137] The collision information and motion trajectory of particles in different container units are summarized to obtain the current motion state of the particles in the container;
[0138] When the stopping condition is met, the final motion state of the particles in the container is obtained.
[0139] Of course, those skilled in the art will understand that the processor 810 can also implement the technical solutions of the particle motion simulation method provided in any embodiment of the present invention.
[0140] It should be noted that, in this embodiment of the invention, the processor specifically refers to a many-core processor.
[0141] like Figure 8As shown, the computer device 800 is presented in the form of a general-purpose computing device. The components of the 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 connecting different system components (including storage device 812 and processor 810).
[0142] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0143] Computer device 800 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 800, including volatile and non-volatile media, removable and non-removable media.
[0144] Storage device 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. Computer device 800 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 8 Not shown; usually referred to as a "hard drive"). Although Figure 8 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile 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 via one or more data media interfaces. Storage device 812 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0145] 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 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0146] Computer device 800 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 800, and / or with any device that enables the computer device 800 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed via input / output (I / O) interface 22. Furthermore, computer device 800 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 20. As shown, network adapter 20 communicates with other modules of computer device 800 via bus 18. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with 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.
[0147] The processor 810 executes various functional applications and data processing by running programs stored in the storage device 812, such as implementing the particle motion simulation method provided in the embodiments of the present invention.
[0148] It should be noted that the foregoing explanation of the particle motion simulation method embodiment also applies to the computer device of this embodiment, and its implementation principle is similar, so it will not be repeated here.
[0149] The technical solution provided by this invention divides a container containing particles into at least two container units. Based on at least one processing node associated with each container unit, it concurrently determines the collision information and motion trajectory of the particles according to their position information in different container units. Then, it summarizes the collision information and motion trajectories of the particles in different container units to obtain the current motion state of the particles in the container. Finally, when a stopping condition is met, it obtains the final motion state of the particles in the container. This allows for the division of a container containing a large number of particles into multiple container units, enabling concurrent motion analysis of the particles in each container unit. The results of the motion analysis of particles in all container units are then summarized to obtain the final motion state of the particles in the entire container. This improves the simulation scale and efficiency of particle motion and enhances the user experience.
[0150] Example 5
[0151] To achieve the above objectives, the present invention also provides a computer-readable storage medium. The computer-readable storage medium provided in the embodiments of the present invention stores a computer program thereon, which, when executed by a processor, implements the particle motion simulation method of the embodiments of the present invention. The method includes:
[0152] Obtain 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 the containers;
[0153] Based on the at least one processing node, the collision information and motion trajectory of the particles are determined concurrently according to the position information of the particles in different container units.
[0154] The collision information and motion trajectory of particles in different container units are summarized to obtain the current motion state of the particles in the container;
[0155] When the stopping condition is met, the final motion state of the particles in the container is obtained.
[0156] Of course, the computer-readable storage medium provided in the embodiments of the present invention, which stores computer program executable instructions thereon, is not limited to the method operation described above, but can also perform related operations in the particle motion simulation method provided in any embodiment of the present invention.
[0157] The computer storage medium of this invention can be any combination of one or more computer-readable media. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0158] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0159] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including—but not limited to—wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0160] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0161] Note that the above description is merely a preferred embodiment of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, readjustments, and substitutions can be made without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments, and may include many other equivalent embodiments without departing from the concept of the present invention, the scope of which is determined by the scope of the appended claims.
Claims
1. A method for simulating particle motion, characterized in that, include: Obtain 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 the containers; Based on the at least one processing node, the collision information and motion trajectory of the particles are determined concurrently according to the position information of the particles in different container units. The collision information and motion trajectory of particles in different container units are summarized to obtain the current motion state of the particles in the container; When the stopping condition is met, the final motion state of the particles in the container is obtained; Specifically, based on the at least one processing node, and concurrently determining the collision information and motion trajectory of particles according to the position information of particles in different container units, including: Based on the at least one processing node, the adjacent particle information of particles in different container units is searched concurrently, and based on the adjacent particle information, the collision information and motion trajectory of particles in different container units are determined; wherein, the motion trajectory refers to the motion trajectory of a particle when it moves based on the collision force after colliding with an adjacent particle or the inner wall of the container unit.
2. The method according to claim 1, characterized in that, Based on the at least one processing node, the system concurrently searches for neighboring particle information of particles in different container units, and determines the collision information and motion trajectory of particles in different container units based on the neighboring particle information, specifically including: Determine whether the particle size is the same in the Euler orthogonal grid; If so, a single-threaded, single-particle approach is used to search for the neighboring particle information of the particles in the Euler orthogonal grid, and based on the neighboring particle information, the collision information and motion trajectory of the particles in different container units are determined. If not, a multi-threaded single-particle approach is used to search for neighboring particle information in the Euler orthogonal grid, and based on the neighboring particle information, the collision information and motion trajectory of particles in different container units are determined.
3. The method according to claim 2, characterized in that, Using a multi-threaded, single-particle approach, the method searches for neighboring particle information within the Eulerian orthogonal mesh, and based on this neighboring particle information, determines the collision information and motion trajectories of particles in different container units. The method also includes: If any processing node cannot execute the multi-threaded single-particle mode, then the single-threaded multi-particle mode is adopted to search for the neighboring particle information of the particles in the Euler orthogonal mesh, and based on the neighboring particle information, to determine the collision information and motion trajectory of the particles in different container units.
4. The method according to claim 1, characterized in that, Obtain at least two container units containing particles, including: According to the first-scale segmentation rule, the container is segmented to obtain at least two first container units; If it is determined that the number of particles in any first container unit is greater than the number threshold, then the first container unit is divided according to the second scale segmentation rule to obtain at least two second container units; Based on the at least two first container units and the at least two second container units, at least two container units of the container are obtained.
5. The method according to claim 1, characterized in that, Obtaining at least one processing node associated with the at least two container units includes: Based on the number of particles in different container units, at least one processing node associated with each of the different container units is obtained.
6. A particle motion simulation device, characterized in that, include: An acquisition module is used to acquire 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 the container; The determination module is used to determine the collision information and motion trajectory of particles based on the at least one processing node and concurrently according to the position information of particles in different container units. The aggregation module is used to aggregate the collision information and motion trajectory of particles in different container units to obtain the current motion state of the particles in the container. The control module is used to obtain the final motion state of the particles in the container when the stopping condition is met. The determining module is specifically used for: Based on the at least one processing node, the adjacent particle information of particles in different container units is searched concurrently, and based on the adjacent particle information, the collision information and motion trajectory of particles in different container units are determined; wherein, the motion trajectory refers to the motion trajectory of a particle when it moves based on the collision force after colliding with an adjacent particle or the inner wall of the container unit.
7. A computer device, characterized in that, include: One or more processors; Storage device for storing one or more programs. When the one or more programs are executed by the one or more processors, the one or more processors implement the particle motion simulation method as described in any one of claims 1-5.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the particle motion simulation method as described in any one of claims 1-5.