A remote force acceleration method for heterogeneous optimization of material dislocation dynamics simulation
By designing the Dis_segment_vector and HashCellList data structures, as well as heterogeneous parallel algorithms, the computational efficiency of MLFMA is optimized, and the calculation cost of inter-dislocation interaction force in discrete dislocation dynamics simulation is solved, and the computing force surges during multi-layer expansion of MLFMA is achieved more efficient simulation speed.
Patent Information
- Application Number
- CN202411120024.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-15
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-08-15
AI Technical Summary
In discrete dislocation dynamics simulation, the calculation cost of interdislocation elastic interaction forces is high, and the computing power surges when MLFMA multi-layer unfolds, affecting the simulation scale and scalability.
Two new data structures Dis_segment_vector and HashCellList are designed, and a MLFMA heterogeneous parallel algorithm suitable for discrete dislocation dynamics simulation is proposed. By formulating the misalignment segment attribute rules and heterogeneous friendly storage structure, the computational efficiency of MLFMA is optimized.
By increasing the number of multi-layer expansion layers, the calculation cost of interaction between dislocations is reduced, the total simulation time is minimized, and the DDD simulation speed is improved.
Smart Images

Figure CN119049608B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of nuclear material radiation damage computational simulation application technology and high performance computing technology, and in particular to a remote force acceleration method for heterogeneous optimization of material dislocation dynamics simulation. Background Art
[0002] Under extreme conditions such as long-term irradiation, materials undergo permanent plastic deformation. The microscopic mechanism is mainly caused by dislocation motion. Dislocation behavior will determine the final mechanical property changes of the material (such as creep, hardening). The movement and evolution of a large number of dislocations will lead to plastic deformation of the material. At low temperatures, deformation is dominated by dislocation slip, while at high temperatures, defect diffusion causes dislocation climb and creep of the material. Discrete Dislocation Dynamics (DDD), as a mesoscopic method, is the main method for studying dislocation motion and the interaction between dislocations and defects. Based on the dislocation elasticity theory, DDD regards dislocations as linear defects in crystalline materials, ignoring the atomic details of dislocations, and directly obtains the plastic response of crystalline materials by simulating the dynamic evolution of a large number of discrete dislocation segments.
[0003] The calculation steps of DDD are mainly divided into the following steps (such as Figure 1 shown):
[0004] (1) Discretization: discretize the dislocation line into dislocation segments;
[0005] (2) Driving force calculation: Calculate the force on each dislocation segment;
[0006] (3) Velocity calculation: Calculate the velocity of each dislocation segment;
[0007] (4) Time integration: updating the position of the dislocation after the force motion;
[0008] (5) Processing dislocation core reactions: Processing dislocation collision reactions;
[0009] (6) Calculation of plastic strain increment: Calculate plastic strain;
[0010] Then repeat the above steps until the loading is completed. In step (2), the stress field between the dislocation segments is calculated, which is given by the Peach-Koehler formula:
[0011] f pk(x) =(σ(x)·b)×t(x)
[0012] Where σ(x) is the local stress at the end point x of the dislocation segment, b is the Burgers vector, and t(x) is the local tangent vector of the dislocation. The stress field formula for the finite dislocation segment x3-x4 is as follows (where x' is the integration point on the dislocation end):
[0013]
[0014] By integrating the local PK force generated by the stress of segment 3-4 on segment 1-2, the nodal force generated on the endpoints x1 and x2 due to another dislocation segment 3-4 is calculated as:
[0015]
[0016] in is the unit tangent vector, N1 and N2 are linear shape functions of the dislocation segment 1-2, and:
[0017] N1(x1)=1, N1(x2)=0, N2(x1)=0, N2(x2)=1.
[0018] In typical metals, dislocation densities range from 10 10 ~10 15 m -2 , and usually the dislocation density increases rapidly with the accumulation of plastic strain after stress is applied. Due to the interaction between all dislocation segments in the entire simulation system, DDD becomes an N-body problem with a computational complexity of O(N 2 ), making the simulation time account for more than 95% of the total simulation time. This will dramatically increase the time required to calculate the stress field between dislocation segments, becoming the biggest challenge affecting the scale and scalability of DDD simulation. In order to solve this problem, it is necessary to find a way to speed up the solution of the N-body problem. Common methods for solving the N-body problem include the method of moments (MOM), tree code, and multilevel fast multipole algorithm (MLFMA), with time complexities of O(N 2 ), O(Nlog(N)), and O(N). It can be seen that MLFMA is an effective method for solving N-body problems and has the potential to effectively accelerate the calculation of DDD dislocation interaction forces.
[0019] However, when the size of dislocation segments reaches tens of millions or even hundreds of millions, although the computational cost of direct interactions between dislocations can be directly reduced by increasing the number of MLFMA expansion layers, and the computational speed of interactions between dislocations can be accelerated, this also leads to a linear increase in the amount of computation of MLFMA. This is specifically manifested in the increase in the number of upward and downward traversals after multi-level expansion, which shows a trend of one increasing while the other decreasing. Therefore, how to optimize MLFMA will become the focus of attention when applied to DDD simulation. With the emergence of massively parallel computers, heterogeneous hybrid architectures play an increasingly important role in high-performance computing, among which heterogeneous computing power plays a major role in computer performance.
[0020] In view of the above background, the present invention proposes a remote force acceleration method for heterogeneous optimization of material dislocation dynamics simulation. Summary of the invention
[0021] The purpose of the present invention is to propose a remote force acceleration method for heterogeneous optimization of material dislocation dynamics simulation to solve the huge computational cost of elastic interaction forces between dislocations during discrete dislocation dynamics simulation and the surge in computing power during MLFMA multi-layer expansion. Based on the characteristics of MLFMA in DDD simulation, the present invention designs two new data structures and proposes a MLFMA heterogeneous parallel algorithm suitable for discrete dislocation dynamics simulation on this basis, which reduces the computational cost of interactions between dislocations while increasing the number of layers of multi-layer expansion, and ensures that the total simulation time is minimized to improve the simulation speed of DDD.
[0022] In order to achieve the above object, the present invention adopts the following technical solutions:
[0023] A remote force acceleration method for heterogeneous optimization of material dislocation dynamics simulation, including the following:
[0024] (1) Formulate the dislocation segment attribution rules: Each dislocation segment belongs to only one unit in MLFMA. The attribution rules of dislocation segments and units are determined according to the characteristics of the dislocation segments;
[0025] (2) Design heterogeneous friendly storage structure: Based on the characteristics of upstream traversal and downstream traversal, two heterogeneous storage continuous data structures, Dis_segment_vector and HashCellList, are designed;
[0026] (3) Design of heterogeneous parallel algorithms: By utilizing heterogeneous-friendly storage structures, parallel algorithms are designed based on heterogeneous architectures for the dislocation segment aggregation and layer-by-layer dislocation factor transfer operations of the bottom-level units.
[0027] Preferably, the step (2) specifically includes the following contents:
[0028] 2.1) Design Dis_segment_vector:
[0029] Construct the dislocation segment Dis_segment and Dis_segment_vec arrays required for the bottom-level aggregation operation. The first-level for loop traverses all initialized dislocation nodes (each dislocation node includes coordinates, ID, neighbor nodes and other information) and accesses the neighbor nodes of all nodes in a linked list. The second-level for loop traverses the neighbor nodes of each node to construct the structure Dis_segment for storing dislocation segment information; add the current dislocation segment information to the Dis_segment_vec array;
[0030] 2.2) Design HashCellList:
[0031] A fixed memory HashCellList is opened to store the cell structure Cell, and all the sub-cell Cell structures in the current layer are stored consecutively in the HashCellList hash table according to the Cell ID.
[0032] Preferably, the step (3) specifically includes the following contents:
[0033] 3.1) The lowest level dislocation segment aggregation: The dislocation segment information required for the lowest level aggregation operation is stored in the Dis_segment structure. All structures are stored in vector arrays. Video memory is allocated on the device side, and the dislocation segment information stored in the hash array is transferred to the device side video memory. Then the array is converted into a structure array allocated on the heterogeneous device side, and the Kernel1 kernel function is started to implement heterogeneous parallelism. Each heterogeneous thread accesses the corresponding dislocation segment, performs an aggregation operation (S2M), returns the etatemp array where the result is written back, and then accumulates the etatemp corresponding to the dislocation segment in the same unit to obtain the multi-level expansion coefficient mpCoeff of the unit, and then transfers the data from the device side video memory to the host side memory.
[0034] 3.2) Dislocation factors are transferred layer by layer: a fixed video memory is allocated on the device side, and all Cell structures of HashCellList are stored continuously on the device side; the Kernel2 kernel function is started to set the number of blocksize for each thread block, and each thread block performs hash mapping to access the corresponding Cell in the HashCellList hash table according to the thread id, and calculates the local expansion coefficient localCoeff (M2L) of each remote cell to the current near-field cell according to the multi-level expansion coefficient mpCoeff of the Cell calculated in step 3.1).
[0035] Compared with the prior art, the present invention provides a remote force acceleration method for heterogeneous optimization of material dislocation dynamics simulation, which has the following beneficial effects:
[0036] (1) The present invention can effectively avoid redundant calculation of the interaction forces between dislocation segments existing across units and the centers of multiple units by formulating the dislocation segment attribution rules.
[0037] (2) The Dis_segment_vector and HashCellList data structures of the present invention respectively allocate continuous space for storage of dislocation segments and MLFMA sub-units in the computer based on the concepts of array and hash table, thereby realizing dynamic and fast search and modification of dislocation segments and sub-units.
[0038] (3) In DDD simulation, considering the high dislocation density of typical metal materials under extreme environments, the calculation cost of the interaction force between dislocations is quite expensive. The present invention uses MLFMA to reduce the complexity of force calculation to , while the cost of the bottom-level aggregation and layer-by-layer transfer increases sharply with the increase of the number of expanded layers. With the help of the designed heterogeneous memory access continuous data structure, the parallel acceleration of aggregation and transfer operations on the heterogeneous end can be achieved to improve the MLFMA calculation efficiency and DDD simulation efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Figure 1 It is a basic flow chart of Discrete Dislocation Dynamics (DDD) mentioned in the background technology of the present invention;
[0040] Figure 2 It is a schematic diagram of the underlying interaction (aggregation, transfer) and tree structure calculation process of the two-dimensional MLFMA mentioned in Example 1 of the present invention;
[0041] Figure 3 This is a flow chart of the remote force acceleration method for heterogeneous optimization of material dislocation dynamics simulation mentioned in Example 1 of the present invention;
[0042] Figure 4 is a distribution diagram of dislocations in the simulation system mentioned in Example 1 of the present invention;
[0043] Figure 5 This is a schematic diagram of heterogeneous parallel aggregation of the bottom dislocation segments mentioned in Example 1 of the present invention;
[0044] Figure 6 This is a schematic diagram of the heterogeneous parallel process of the MLFMA layer-by-layer transfer mentioned in Example 1 of the present invention. DETAILED DESCRIPTION
[0045] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments.
[0046] Embodiment 1:
[0047] Aiming at the huge computational cost of elastic interaction forces between dislocations in discrete dislocation dynamics simulation and the surge in computing power during MLFMA multi-layer expansion, the present invention designs two new data structures based on the characteristics of MLFMA in DDD simulation and proposes a MLFMA heterogeneous parallel algorithm suitable for discrete dislocation dynamics simulation on this basis, which reduces the computational cost of interactions between dislocations while increasing the number of layers of multi-layer expansion, and ensures that the total simulation time is minimized to improve the simulation speed of DDD.
[0048] First, in order to more clearly describe the specific implementation process of the present invention, the calculation steps of discrete dislocation dynamics (DDD) are first explained. Figure 1 , including the following:
[0049] (a) The entire curved dislocation line is divided into multiple straight line segments, and the length of each line segment is nanometer scale;
[0050] (b) Calculate the force on each dislocation segment based on the elastic theory of dislocation;
[0051] (c) Calculate the initial movement speed of the dislocation segment after being subjected to force based on the dislocation movement mode and energy law;
[0052] (d) updating the new position of the dislocation segment according to the time integration scheme;
[0053] (e) Treat the interaction between dislocations according to the physical rules and geometric conditions of dislocations;
[0054] (f) Calculate the plastic strain increment of the current time step based on the motion trajectory of the dislocation and the area swept on the slip plane;
[0055] (g) Repeat the cycle (a)-(f) until the simulation end condition is met.
[0056] Next, we explain MLFMA as follows. Figure 2 , which is a schematic diagram of the underlying interaction (aggregation, transfer) and tree structure calculation process of two-dimensional MLFMA, where: Figure 2 The gray part in the upper part is the near-field unit (the interaction between all dislocation segments in this area needs to be accurately calculated using the direct method). The rest is the far-field unit, and the interaction between the dislocation segments in this area and the near-field unit needs to be calculated through the aggregation (blue dotted line) and transfer (black dotted line) operations of MLFMA. Figure 2 The lower part is the tree structure corresponding to MLFMA. The upward arrows indicate bottom-level aggregation and layer-by-layer aggregation (S2M, M2M), the downward arrows indicate layer-by-layer divergence (L2L), and the dotted lines indicate layer-by-layer transfer (M2L); Figure 2 As shown in the figure, the specific implementation process of MLFMA in discrete dislocation dynamics simulation is:
[0057] (1) Multipole Expansion: In three-dimensional cases, MLFMA divides the region to be solved into L layers, each containing 8 l-1 Each unit is then further decomposed into 8 sub-units until the bottom layer to form a multi-level hierarchical structure.
[0058] (2) Upward Pass: This is the layer-by-layer aggregation process. At the bottom layer, the multi-level expansion coefficient (Segment to Moment, S2M) of each dislocation segment to the center of its subunit is calculated, and then the expansion coefficient (Moment to Moment, M2M) of the subunit center of each layer to the center of the parent unit of the upper layer is calculated, that is, the information of the eight subunits to their common parent unit is aggregated until the top layer is recursively reached. The amount of calculation is proportional to the dislocation density ρ and the number of multi-level expansion layers L.
[0059] (3) Downward Pass: Transfer layer by layer: Starting from the top layer, all units in the current layer (a total of 8 l-1 Each sub-unit will communicate with the corresponding far-field unit (each sub-unit corresponds to 6 3 -3 3 = 189 far-field units) interact with each other and calculate the local expansion coefficients (Moment to Local, M2L) of all sub-units in each layer. Diverge layer by layer: Then calculate the local expansion coefficients (Local to Local, L2L) of the parent unit center of each layer to the centers of its 8 sub-units until the bottom layer. The amount of calculation is proportional to the number of layers L, where the number of transfers t per layer is 189×8 l-1 , the total number of transfers is t(L-1), which is the process with the largest computational workload.
[0060] See also Figure 3 Based on the above content, the method proposed in the present invention mainly includes the following steps:
[0061] (1) Formulate the attribution rules of dislocation segments: Unlike particles, dislocation segments are line segments with length and may exist across units. However, each dislocation segment can only be attributed to one unit in MLFMA. Therefore, the attribution rules of dislocation segments and units need to be determined.
[0062] (2) Design heterogeneous friendly storage structure: According to the characteristics of upstream traversal and downstream traversal, two heterogeneous storage continuous data structures (Dis_segment_vector and HashCellList) are designed.
[0063] (3) Design of heterogeneous parallel algorithms: By utilizing heterogeneous-friendly storage structures, parallel algorithms are designed based on heterogeneous architectures for the dislocation segment aggregation and layer-by-layer dislocation factor transfer operations of the bottom-level units.
[0064] The above steps are described in detail below with reference to specific examples.
[0065] (1) Formulate dislocation segment attribution rules
[0066] See also Figure 4 , which is the distribution diagram of dislocations in the simulation system. Discrete dislocation segments have length scales and exist across unit boundaries in MLFMA implementation, such as the red dislocation segment in the figure; as shown in Figure 4, it is stipulated that the unit where the center node of the dislocation segment (such as node C) is located has the authority to calculate this dislocation segment, that is, only the interaction force of the dislocation segment on the center of the unit where node C is located is calculated to avoid repeated calculations.
[0067] (2) Constructing the structure
[0068] a) Construct the dislocation segment Dis_segment and Dis_segment_vec arrays
[0069] Construct the dislocation segment Dis_segment and Dis_segment_vec arrays required for the bottom-level aggregation operation. The first-level for loop traverses all initialized dislocation nodes (each dislocation node includes coordinates, ID, neighbor nodes and other information) and accesses the neighbor nodes of all nodes in a linked list. The second-level for loop traverses the neighbor nodes of each node to construct the structure Dis_segment for storing dislocation segment information. Add the current dislocation segment information to the Dis_segment_vec array, as shown in the following pseudo code.
[0070]
[0071] Among them, vec1 stores the tangent vector of the dislocation segment, vec2 stores the direction vector of the line between the starting node x1 of the dislocation segment and the center of the unit to which it belongs, cellCtr is the coordinate of the unit center point, Burgers is the Burgers vector of the dislocation segment, and the etatemp array stores the multi-level expansion coefficients of each dislocation segment to the unit center.
[0072] b) Build the HashCellList hash table
[0073] A fixed memory HashCellList of appropriate size is allocated to store the cell structure Cell, and all sub-cell Cell structures in the current layer are stored in the HashCellList hash table continuously according to the CellID, as shown in the following table.
[0074] HashCellList hash table data structure
[0075]
[0076]
[0077] (3) Heterogeneous Parallel Algorithms
[0078] a) The bottom dislocation segment aggregation:
[0079] The dislocation segment information required for the bottom-level aggregation operation is stored in the Dis_segment structure. All structures are stored in vector arrays. Video memory is opened on the device side, and the dislocation segment information stored in the hash array is transferred to the device side video memory. The array is converted into a structure array opened on the heterogeneous device side, and the Kernel1 kernel function is started to realize heterogeneous parallelism. Each heterogeneous thread i Access the corresponding dislocation segment dis_segment i , perform a gather operation (S2M) and write the result back to dis_segment i The etatemp array is then accumulated for the dislocation segments in the same unit to obtain the multi-level expansion coefficient mpCoeff of the unit, and then the data is transferred from the device-side video memory to the host-side memory. Figure 5 As shown, it uses the designed Dis_segment data structure to achieve parallel computing of heterogeneous terminals.
[0080] Dislocation factors are transferred layer by layer: Open up fixed video memory on the device side and store all Cell structures of HashCellList continuously on the device side. Start the Kernel2 kernel function and set the blocksize of each thread block to 216. There are (8 l-1 +blocksize-1) / blocksize thread blocks, each thread block performs hash mapping to access the corresponding Cell in the HashCellList hash table according to the thread id, and calculates the local expansion coefficient localCoeff (M2L) of each remote cell to the current near-field cell according to the multi-level expansion coefficient mpCoeff calculated in process a). Figure 6 As shown, with the help of the designed HashCellList data structure, parallel computing of heterogeneous terminals is realized.
[0081] The above is only a preferred specific implementation of the present invention, but the protection scope of the present invention is not limited thereto. The remote force acceleration method for heterogeneous optimization of material dislocation dynamics simulation involved in the present invention, including the hybrid grid region decomposition algorithm, parallel spectral element grid generation method, node number synchronization algorithm, and subgrid merging and spectral element grid data output method provided in the invention are all considered to be within the protection scope of the present invention. It should be pointed out that the above is a preferred implementation of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications should also be considered to be within the protection scope of the present invention.
Claims
1. A remote force acceleration method for heterogeneous optimization of material dislocation dynamics simulation, characterized in that: Includes the following: (1) Formulate the dislocation segment attribution rules: Each dislocation segment belongs to only one unit in MLFMA. The attribution rules of dislocation segments and units are determined according to the characteristics of the dislocation segments; (2) Design heterogeneous friendly storage structure: Based on the characteristics of upstream traversal and downstream traversal, two heterogeneous storage continuous data structures, Dis_segment_vector and HashCellList, are designed. Specifically, they include the following contents: 2.1) Design Dis_segment_vector: Construct the dislocation segment Dis_segment and Dis_segment_vec arrays required for the bottom-level aggregation operation. The first-level for loop traverses all initialized dislocation node lists to access the neighbor nodes of all nodes. The second-level for loop traverses the neighbor nodes of each node to construct the structure Dis_segment for storing dislocation segment information; add the current dislocation segment information to the Dis_segment_vec array; 2.2) Design HashCellList: Open up a fixed memory HashCellList to store the cell structure Cell, and store all the sub-cell Cell structures in the current layer in the HashCellList hash table according to the Cell ID; (3) Design of heterogeneous parallel algorithms: Using heterogeneous-friendly storage structures, we respectively focus on the dislocation segment aggregation and layer-by-layer dislocation factor transfer operations of the bottom-level units, and design parallel algorithms based on heterogeneous architectures. Specifically, the following are included: 3.1) The lowest level dislocation segment aggregation: The dislocation segment information required for the lowest level aggregation operation is stored in the Dis_segment structure. All structures are stored in vector arrays. Video memory is allocated on the device side, and the dislocation segment information stored in the hash array is transferred to the device side video memory. Then the array is converted into a structure array allocated on the heterogeneous device side, and the Kernel1 kernel function is started to implement heterogeneous parallelism. Each heterogeneous thread accesses the corresponding dislocation segment, performs an aggregation operation, returns the etatemp array where the result is written back, and then accumulates the etatemp corresponding to the dislocation segment in the same unit to obtain the multi-level expansion coefficient mpCoeff of the unit, and then transfers the data from the device side video memory to the host side memory. 3.2) Dislocation factors are transferred layer by layer: a fixed video memory is allocated on the device side, and all Cell structures of HashCellList are stored continuously on the device side; the Kernel2 kernel function is started to set the number of blocksize for each thread block, and each thread block performs hash mapping to access the corresponding Cell in the HashCellList hash table according to the thread id, and calculates the local expansion coefficient localCoeff of each remote cell to the current near-field cell according to the multi-level expansion coefficient mpCoeff of the Cell calculated in step 3.1).