A controllable nanocomposite polycrystal modeling method based on weighted Thiessen polygons
Through the controllable nanocomposite polycrystal modeling method based on weighted Tyson polygons, the control problem of grain boundary distribution and relative grain size in the nanocrystal atom model is solved, and the controllable axis ratio and relative size of the nanocrystal model is achieved. , which promotes the study of the relationship between nanocrystal strength and grain boundary, and provides prediction and guidance for the design of new materials.
Patent Information
- Application Number
- CN202210157621.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-21
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-02-21
AI Technical Summary
The prior art is difficult to effectively control the grain boundary distribution and grain relative size in nanocrystal atomic models, resulting in uncontrollable axis ratio of the nanocrystal model, and lack of research on the relationship between nanocrystal intensity and grain boundary.
Controllable nanocomposite polycrystal modeling method based on weighted Tyson polygons is adopted. It does not rely on external software to generate uniform polycrystal nodes through initialization, and the node polycrystal orientation matrix and direction weight are given to achieve the grain axis ratio and relative size. control.
The controllability of grain boundary distribution and relative grain size of nanocrystal atom model is achieved, and nanocrystal models with different axial ratios and multiphase nanocrystal models proportional to relative sizes can be constructed to help understand grain boundary and dislocation. Relationships, providing predictions and guidance for new material design.
Smart Images

Figure CN114565736B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the field of metal materials, and in particular relates to a controllable nano-composite polycrystal modeling method based on weighted Thiessen polygons. Background Art
[0002] Most crystalline materials are composed of many grains. The interface between grains with different orientations is called grain boundary. Grain boundary is closely related to dislocations that determine the plasticity of materials. Grain boundary can emit dislocations, absorb dislocations, and hinder dislocation movement, so grain boundary is closely related to material strength. Polycrystalline with grain size less than 100 nanometers is called nanocrystal. The greatly increased density of grain boundaries makes nanocrystals have many unique properties, such as the size effect of nanocrystal yield stress and the effect of grain boundary amorphization on nanocrystal strength, which are all hot topics in molecular simulation in recent years.
[0003] However, conventional atomic modeling based on random number generation of nano-polycrystalline nodes produces inconsistent grain sizes in the nanocrystal model, which may have unnecessary effects on the simulation results; unlike nanocrystals prepared by repeated rolling experiments, the axial ratio of the nanocrystal model by traditional atomic modeling is uncontrollable, resulting in a lack of research on the relationship between the axial ratio of the nanocrystal and the strength of the nanocrystal; usually, the grain sizes of different phases in multiphase nanocrystals cannot be guaranteed to be basically consistent, and the nanocrystal model by old atomic modeling also does not include a method to deal with this situation.
[0004] After searching, it was found that there is an application number of 2013106719201 entitled "A method for establishing a multi-phase polycrystalline atomic structure model", but this application cannot control the distribution of grain boundaries and the relative size of grains in the nanocrystalline model, and the method needs to rely on external software Qhull. Summary of the invention
[0005] In view of the above problems, the present invention proposes a controllable nanocomposite polycrystal modeling method based on weighted Thiessen polygons, which does not rely on any external software except C language, and solves the problem of grain boundary distribution control and relative size of nanocrystalline atomic model; it can construct a nanocrystalline atomic model with controllable grain axis ratio or controllable grain relative size to realize the calculation of material nanocrystalline performance, which is convenient for users to build a large number of models to analyze material failure mechanism and provide prediction and guidance for new material design.
[0006] The controllable nanocomposite polycrystal modeling method based on weighted Thiessen polygons has the following specific steps:
[0007] Step 1: Initialize and generate uniform polycrystalline nodes and save them to the node list;
[0008] First, initialize various parameters: the user sets the reduction coefficient R d ; Reduce counter P d; Error counter P e ; Error counter upper limit P emax ; Model box size (x b ,y b ,z b ); total number of grains N; clear the node list;
[0009] Then, use the model box size (x b ,y b ,z b ) Calculate the initial cutoff radius as R0;
[0010] The calculation formula is:
[0011]
[0012] Next, random nodes are continuously generated and the conditions of the initial cutoff radius R0 are judged one by one, and the nodes that meet the judgment conditions are added to the node list;
[0013] The formula for generating random nodes is:
[0014] (x i ·y i ·z i )=[Rand()·x b ,Rand()·y b ,Rand()·z b ] (2)
[0015] Where (x i ,y i ,z i ) is the coordinate of the random node, and Rand() is a randomly generated number between 0 and 1;
[0016] The first randomly generated node is unconditionally saved to the node list; starting from the second node, determine whether the following conditions are met:
[0017]
[0018] Where (x j ,y j ,z j ) is the node coordinates already in the node list; n x Substitute -1, 0 and 1 respectively; n y Substitute -1, 0 and 1 respectively; n z Substitute -1, 0 and 1 respectively in a loop; that is, each node in the node list is judged 27 times.
[0019] When the 27 judgments of the second node all satisfy the judgment formula (3), the second node is saved in the node list; otherwise, the second node is deleted and the error counter P is increased. e Add 1.
[0020] Similarly, select the third random node and repeat the judgment, and so on, until the number of nodes in the node list is equal to the total number of grains, and then end;
[0021] When the error counter P is increasing while adding a random node to the node list, e Reaching the upper limit P emax , then reduce the counter P d Increment by 1, reinitialize the error counter P e Make a judgment.
[0022] Step 2, assigning a polycrystalline orientation matrix to each polycrystalline node in the node list;
[0023] There are three modes for generating polycrystalline orientation matrix: reading orientation matrix from file, generating orientation matrix completely randomly and generating orientation matrix randomly based on preferred orientation. Users can select any generation mode according to their needs.
[0024] For the first mode of reading orientation matrix from file: it contains N 3×3 temporary matrices and satisfies the orthogonal condition, namely:
[0025]
[0026] i, k represent any two unequal values between 1 and 3; all elements in the 3×3 temporary matrix are Used to calculate node orientation (O ij ) 3×3 ;
[0027] When the N 3×3 temporary matrices are read, matrix normalization is performed; that is, all elements of the N 3×3 temporary matrices are brought into the node orientation (O ij ) 3×3 Calculate the formula and save the result to the end of the node list.
[0028]
[0029] For the second fully random orientation matrix pattern:
[0030] First, generate the following elements of a temporary 3×3 matrix:
[0031] D 23 =(-D 11 D 21 -D 12 D 22 ) / D 13(6)
[0032] D 32 =D 31 (D 11 D 22 -D 12 D 21 ) / (D 22 D 13 -D 12 D 23 ) (7)
[0033] D 33 =(-D 11 D 31 -D 12 D 32 ) / D 13 (8)
[0034] Then, the remaining six components D 11 , D 12 , D 13 , D 21 , D 22 , D 31 are all random numbers between -0.5 and 0.5, and all elements of the generated 3×3 temporary matrix are brought into the node orientation (O ij ) 3×3 Calculate the formula and save the result to the end of the node list.
[0035] Randomly generate an orientation matrix pattern for the third preferred orientation:
[0036] First, the user specifies an orthogonal 3×3 temporary matrix, normalizes the temporary matrix, and then multiplies the matrix by a rotation matrix defined by three angles α, β, and θ.
[0037]
[0038] α, β, θ are generated by random numbers and represent the rotation angles along the x, y, and z axes respectively;
[0039] The upper and lower limits of the random number are specified by the user. When a preferred orientation is required in a certain direction, the upper limit of the rotation angle in that direction should be increased, and the upper limits of the rotation angle in other directions should be lowered. The result is saved in the node list and the process ends.
[0040] Step 3: The user assigns a set of weights (u, v, w) corresponding to the x, y, and z axis directions to each polycrystalline node in the node list;
[0041] There are two ways to assign weights:
[0042] 1) Make the weights of all grains equal and reduce the directional weights of all grains in one direction to obtain flake-shaped grains. At this time, the ratio of weights in different directions is the axial ratio of polycrystalline grains in different directions; or increase the directional weight in one direction to obtain spindle-shaped grains.
[0043] 2) For at least two different grains, reduce the directional weight of one of the grains in all directions. At this time, the ratio of the weights of different grains is the ratio of the relative sizes of the two grains.
[0044] Step 4: Periodically expand the polycrystalline nodes in the node list, and select the core nodes of the expanded new node list;
[0045] The expanded new node coordinates (x k ,y k ,z k )for:
[0046] (x k ,y k ,z k )=[x i +n x ·x b ,y i +n y ·y b ,z i +n z ·z b ] (10)
[0047] That is, every node in the node list will expand 27 new nodes. The grain direction weights and orientation matrices of these 27 new nodes are the same, and the new node list will overwrite the old node list. Define n x , n y , n z The node when both are 0 is the core node, and its coordinates are (x l ,y l ,z l )express.
[0048] Step 5: loop through each core node in the expanded new node list to determine the atomic coordinates and types of each core node, and apply the grain expansion and orientation to the atomic coordinates;
[0049] The specific steps are as follows:
[0050] Step 501, read the atomic model file, including: a 3×3 matrix (S ij ) 3×3 , the zero point coordinate of the atomic model (x s ,y s ,zs ), and the total number of atoms N A , the atomic coordinates (x a ,y a ,z a ) and type data of each atom.
[0051] Step 502: Using a 3×3 matrix (S ij ) 3×3 , respectively calculate the interplanar spacing l1, l2, l3 and the limit spacing l of the parallelepiped of the atomic model box max ;
[0052] l1=S1·(S2×S3) / |S2×S3| (11)
[0053] l2=S2·(S3×S1) / |S3×S1| (12)
[0054] l3=S3·(S1×S2) / |S1×S2| (13)
[0055]
[0056] Where S1 is the matrix (S ij ) 3×3 The vector of the first row of S2 is the matrix (S ij ) 3×3 The vector of the second row of S3 is the matrix (S ij ) 3×3 The vector formed by the 3rd row of .
[0057] Step 503: Calculate the extended coordinates (x c ,y c ,z c );
[0058] The formula is as follows:
[0059]
[0060] Where n1 is -INT(l max / l1+1) to INT(l max / l1+1) loop; n2 is -INT(l max / l2+1) to INT(l max / l2+1), n3 is -INT(l max / l3+1) to INT(l max / l3+1); INT means round down.
[0061] is the matrix (Sij ) 3×3 All components of
[0062] Step 504: Based on the expanded coordinates (x c ,y c ,z c ), calculate the coordinates of the determined atom (x t ,y t ,z t );
[0063] The formula is:
[0064]
[0065] (x m ,y m ,z m ) is specified by the user and is used to adjust the relative position of the filled atoms and the current core node l.
[0066] Step 505: Find the N nodes closest to the core node l to be tested. t nodes, substitute the coordinates of each node one by one to determine whether the judgment formula is satisfied;
[0067] N t Assign to the user;
[0068] For N t The current adjacent node n is selected from the nodes, and the determination formula is as follows:
[0069]
[0070] Among them, (x n ,y n ,z n ) is the coordinate of the current neighboring node n; (u l ,v l ,w l ) is the weight of the core node l to be tested; (u n ,v n ,w n ) is the weight corresponding to the current neighboring node n.
[0071] Step 506: When N t All nodes satisfy the judgment formula, and the judgment atomic coordinates (x t ,y t ,z t ) and the corresponding atom type.
[0072] Step 507, return to step 501 to re-read the atomic model file, continue to calculate the coordinates of the next core node, determine the atomic coordinates, and screen the atoms that have been successfully determined, and record the coordinates and atomic types; until the cycle determination of all core nodes is completed.
[0073] Step 6. Select the determination atoms corresponding to each core node one by one, correct the periodicity of the atoms and save the model box size, output the corrected atomic coordinates and atomic types to the file, and end.
[0074] The correction process is as follows:
[0075] To determine the atomic coordinates (x t ,y t ,z t ), when x t <0 for x t Add x b , when x t ≥x b Time x t Subtract x b , when y t <0 for y t Add y b , when y t ≥y b Time t Subtract y b , when z t <0 for z t Add z b , when z t ≥z b Time t Subtract z b .
[0076] The present invention has the following beneficial effects:
[0077] The present invention discloses a controllable nanocomposite polycrystal modeling method based on weighted Thiessen polygons, which solves the grain boundary distribution control and relative size problems of nanocrystal atomic models, can construct nanocrystal models with different axial ratios and construct multi-phase nanocrystal models with proportional relative sizes; the present invention can understand the relationship between grain boundaries and dislocations on a microscopic scale, and provides favorable assistance to the design of new materials. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 The schematic diagram of a controllable nanocomposite polycrystal modeling method based on weighted Thiessen polygons of the present invention;
[0079] Figure 2 A flow chart of a controllable nanocomposite polycrystal modeling method based on weighted Thiessen polygons of the present invention;
[0080] Figure 3 The spindle-shaped nanocrystal is constructed by the user of the embodiment of the present invention by assigning weights to the polycrystalline nodes.
[0081] Figure 4 The lamellar nanocrystals are constructed by the user of the embodiment of the present invention by assigning weights to the polycrystalline nodes.
[0082] Figure 5 Multiphase nanocrystals of different relative sizes constructed by users of embodiments of the present invention. DETAILED DESCRIPTION
[0083] The present invention is described in detail below in conjunction with the embodiments and drawings.
[0084] The present invention discloses a controllable nanocomposite polycrystalline modeling method based on weighted Thiessen polygons, which consists of six parts: homogenized polycrystalline node generation, polycrystalline orientation matrix generation, grain direction weight definition, periodic polycrystalline node generation, grain atom filling and grain atom periodic correction; Figure 1 As shown, first, the counter is initialized and random nodes are generated until the set number threshold is reached; the distance between the generated nodes is controlled to achieve uniform distribution of the generated polycrystalline nodes; then, the polycrystalline orientation matrix is generated, the direction weight of each grain node is read, and periodic polycrystalline nodes are generated. The atomic model is filled in each grain to determine the atom attribution; finally, the periodicity of the grain atoms is corrected to meet the application periodic boundary conditions.
[0085] The controllable nanocomposite polycrystal modeling method based on weighted Thiessen polygons is as follows: Figure 2 As shown, the specific steps are as follows:
[0086] Step 1: Initialize and generate uniform polycrystalline nodes and save them to the node list;
[0087] The spacing between the coordinates of each node is basically the same; this step includes initialization, generating random nodes and determining the node distance.
[0088] The specific steps are:
[0089] First, initialize various parameters: the user sets the reduction coefficient R d The default value is 0.001, which must be greater than 0; reduce the counter P d , is set to 0 for the first time; the error counter P e , default is 100000, integer and must be greater than 0; because the loop returns to the initial state, P e Set to 0; error counter upper limit P emax ;
[0090] Model box size (x b ,y b ,zb ); total number of grains N; define a set of node coordinates (x, y, z), the spacing of each node coordinate is basically the same; the weight of the node along the three axes (u, v, w) and the node orientation (O ij ) 3×3 , clear the node list;
[0091] Then, use the model box size (x b ,y b ,z b ) Calculate the initial cutoff radius as R0;
[0092] The calculation formula is:
[0093]
[0094] Next, random nodes are continuously generated and the conditions of the initial cutoff radius R0 are judged one by one, and the nodes that meet the judgment conditions are added to the node list;
[0095] The formula for generating random nodes is:
[0096] (x i ·y i ·z i )=[Rand()·x b ,Rand()·y b ,Rand()·z b ] (2)
[0097] Where (x i ,y i ,z i ) is the coordinate of the random node, and Rand() is a randomly generated number between 0 and 1;
[0098] The first randomly generated node is unconditionally saved to the node list; starting from the second node, it is determined whether it is too close to the previously saved node, that is, whether the following conditions are met:
[0099]
[0100] Where (x j ,y j ,z j ) is the node coordinates already in the node list; n x , n y and n z -1, 0 and 1 are substituted into each of them in a loop; that is, each node in the node list is judged 27 times.
[0101] When the 27 judgments of the second node all satisfy the judgment formula (3), the second node is saved in the node list; otherwise, the second node is deleted and the error counter P is increased.e Add 1.
[0102] Similarly, select the third random node and repeat the judgment, and so on, until the number of nodes in the node list is equal to the total number of grains, and then end;
[0103] When adding random nodes to the node list, when the newly generated random nodes are too close to the nodes previously saved in the list, the newly generated random nodes are also deleted, so that the error counter P e Increment by 1, when the error counter P e Reaching the upper limit P emax , then reduce the counter P d Increment by 1, reinitialize the error counter P e Make a judgment.
[0104] Step 2: assign a corresponding polycrystalline orientation matrix to each of the N polycrystalline nodes in the node list;
[0105] There are three modes for generating multipath orientation matrix: reading orientation matrix from file, generating orientation matrix completely randomly and generating orientation matrix randomly by selecting optimal orientation. Users can select any generation mode according to their needs.
[0106] For the first mode of reading orientation matrix from file: it contains N 3×3 temporary matrices and satisfies the orthogonal condition, namely:
[0107]
[0108] i, k represent any two unequal values between 1 and 3; all elements in the 3×3 temporary matrix are Used to calculate node orientation (O ij ) 3×3 ;
[0109] Expanding formula (4), we get:
[0110] D11*D21+D12*D22+D13*D23=0
[0111] D11*D31+D12*D32+D13*D33=0
[0112] D21*D31+D22*D32+D23*D33=0
[0113] When the N 3×3 temporary matrices are read, matrix normalization is performed; that is, all elements of the N 3×3 temporary matrices are brought into the node orientation (O ij ) 3×3 Calculate the formula and save the result to the end of the node list.
[0114]
[0115] For the second fully random orientation matrix pattern:
[0116] First, generate the following elements of a temporary 3×3 matrix:
[0117] D 23 =(-D 11 D 21 -D 12 D 22 ) / D 13 (6)
[0118] D 32 =D 31 (D 11 D 22 -D 12 D 21 ) / (D 22 D 13 -D 12 D 23 ) (7)
[0119] D 33 =(-D 11 D 31 -D 12 D 32 ) / D 13 (8)
[0120] Then, the remaining six components D 11 , D 12 , D 13 , D 21 , D 22 , D 31 are all random numbers between -0.5 and 0.5, and all elements of the generated 3×3 temporary matrix are brought into the node orientation (O ij ) 3×3 Calculate the formula and save the result to the end of the node list.
[0121] Randomly generate an orientation matrix pattern for the third preferred orientation:
[0122] First, the user specifies an orthogonal 3×3 temporary matrix, normalizes the temporary matrix, and then multiplies the matrix by a rotation matrix defined by three angles α, β, and θ.
[0123]
[0124] α, β, θ are generated by random numbers and represent the rotation angles along the x, y, and z axes respectively;
[0125] The upper and lower limits of the random number are specified by the user. When a preferred orientation is required in a certain direction, the upper limit of the rotation angle in that direction should be increased, and the upper limits of the rotation angle in other directions should be lowered. The result is saved in the node list and the process ends.
[0126] Step 3: The user assigns a set of weights (u, v, w) corresponding to the x, y, and z axis directions to each polycrystalline node in the node list;
[0127] The higher the weight of a direction, the longer the grain is in that direction;
[0128] In order to solve the problem of grain axis ratio control, the weights of all grains should be equal, and the directional weights of all grains in one direction should be reduced to obtain thin flake grains. At this time, the ratio of weights in different directions is the axis ratio of polycrystalline grains in different directions; or the directional weight in one direction can be increased to obtain spindle-shaped grains; taking the xy direction as an example, the xy axis ratio is u / v.
[0129] In order to solve the relative size problem of multi-phase polycrystals, the weights of the same grains should be equal, and the directional weight of one of the grains in all directions should be reduced. At this time, the ratio of the weights of different grains is the ratio of the relative sizes of these grains.
[0130] For example, u1 / u2 is the ratio of the sizes of different grains.
[0131] Step 4: Periodically expand the polycrystalline nodes in the node list, and select the core nodes of the expanded new node list;
[0132] The expanded new node coordinates (x k ,y k ,z k )for:
[0133] (x k ,y k ,z k )=[x i +n x ·x b ,y i +n y ·y b ,z i +n z ·z b ] (10)
[0134] n x , n y , n z Substitute -1, 0 and 1 respectively; that is, 27 new nodes will be added for each node in the node list. The grain direction weights and orientation matrices of these 27 new nodes are the same, and the new node list will overwrite the old node list. Define nx , n y , n z The node when both are 0 is the core node, and its coordinates are (x l ,y l ,z l )express.
[0135] Step 5: loop through each core node in the expanded new node list to determine the atomic coordinates and types of each core node, and apply the grain expansion and orientation to the atomic coordinates;
[0136] The specific steps are as follows:
[0137] Step 501: read an atomic model file in LAMMPS data format, LAMMPS custom format or VASP POSCAR format, including: a 3×3 matrix (S ij ) 3×3 , the zero point coordinate of the atomic model (x s ,y s ,z s ), and the total number of atoms N A , the atomic coordinates (x a ,y a ,z a ) and type data of each atom.
[0138] Each node can only correspond to one atomic model file, but different nodes can correspond to different atomic model files. The model constructed at this time is a multi-phase polycrystalline model.
[0139] Step 502: Using a 3×3 matrix (S ij ) 3×3 , respectively calculate the interplanar spacing l1, l2, l3 and the limit spacing l of the parallelepiped of the atomic model box max ;
[0140] l1=S1·(S2×S3) / |S2×S3| (11)
[0141] l2=S2·(S3×S1) / |S3×S1| (12)
[0142] l3=S3·(S1×S2) / |S1×S2| (13)
[0143]
[0144] Where S1 is the matrix (S ij ) 3×3 The vector of the first row of S2 is the matrix (S ij ) 3×3The vector of the second row of S3 is the matrix (S ij ) 3×3 The vector formed by the 3rd row of .
[0145] Step 503: Calculate the extended coordinates (x c ,y c ,z c );
[0146] The formula is as follows:
[0147]
[0148] Where n1 is -INT(l max / l1+1) to INT(l max / l1+1) loop; n2 is -INT(l max / l2+1) to INT(l max / l2+1), n3 is -INT(l max / l3+1) to INT(l max / l3+1); INT means round down.
[0149] is the matrix (S ij ) 3×3 All components of
[0150] Step 504: Based on the expanded coordinates (x c ,y c ,z c ), calculate the coordinates of the determined atom (x t ,y t ,z t );
[0151] The formula is:
[0152]
[0153] (x m ,y m ,z m ) is specified by the user and is used to adjust the relative position of the filled atoms and the current core node l.
[0154] Step 505: Find the N nodes closest to the core node l to be tested. t nodes, substitute the coordinates of each node one by one to determine whether the judgment formula is satisfied;
[0155] N t Specified by the user, the default value is 65; the lower the value, the faster the calculation. When the value is too low, it may cause grain overlap.
[0156] For N t The current adjacent node n is selected from the nodes, and the determination formula is as follows:
[0157]
[0158] Among them, (x n ,y n ,z n ) is the coordinate of the current neighboring node n; (u l ,v l ,w l ) is the weight of the core node l to be tested; (u n ,v n ,w n ) is the weight corresponding to the current neighboring node n.
[0159] Step 506: When N t All nodes satisfy the judgment formula, and the judgment atomic coordinates (x t ,y t ,z t ) and the corresponding atom type; and fill the determination atom into the core node l to be tested.
[0160] Step 507, return to step 501 to re-read the atomic model file, continue to calculate the coordinates of the next core node, determine the atomic coordinates, and screen the atoms that have been successfully determined, and record the coordinates and atomic types; until the cycle determination of all core nodes is completed.
[0161] Step 6. Select the judgment atoms corresponding to each core node one by one, correct the periodicity of the atoms and save the model box size to make it meet the periodic boundary conditions; output the corrected atomic coordinates and atomic types to the file, and end.
[0162] The correction process is as follows:
[0163] To determine the atomic coordinates (x t ,y t ,z t ), when x t <0 for x t Add x b , when x t ≥x b Time x t Subtract x b , when y t <0 for y t Add y b , when y t ≥y b Time t Subtract y b , when zt <0 for z t Add z b , when z t ≥z b Time t Subtract z b .
[0164] Example:
[0165] (1) Initialization: Reduction coefficient R d Set to 0.001; error counter upper limit P emax Set to 100000; set the model box size to (200,200,200); for model 1 and model 2, set the total number of grains to 27; for model 3, set the total number of grains to 54; reduce the counter P when entering this step for the first time d Set to 0; error counter P when entering this step or looping back to this step e Set to 0;
[0166] The initial truncation radius R0 is calculated using formula (1): and the node coordinates are created and screened according to formulas (2) and (3). Finally, 27 node coordinates are generated in model 1 and model 2, and 54 node coordinates are generated in model 3, and the data are merged into the node information list.
[0167] (2) Generation of polycrystalline orientation matrix: In all examples, orientation matrices are generated completely randomly. Formula (6), Formula (7), and Formula (8) are used to generate 27 random temporary orientation matrices in Model 1 and Model 2, and 54 random temporary orientation matrices are generated in Model 3. Formula (5) is used to obtain the corresponding orientation matrix and merge the data into the node list.
[0168] (3) Definition of grain direction weight: In order to obtain spindle-shaped crystals that are longer in one direction, the direction weights of all nodes in model 1 are set to (1, 1, 5). To obtain lamellar crystals that are shorter in one direction, the direction weights of all nodes in model 2 are set to (1, 5, 5). In order to obtain multiphase crystals of different relative sizes, the direction weights of the first 27 nodes in model 3 are set to (2, 2, 2), and the direction weights of the last 27 nodes in model 3 are set to (1, 1, 1). The data are then merged into the node information list.
[0169] (4) Periodic polycrystalline node generation: Substitute the node coordinates in all models into formula (10) to obtain 729 nodes in the expanded model 1, 729 nodes in the expanded model 2, and 1458 nodes in the expanded model 3. Mark the core nodes in each model.
[0170] (5) Grain atom filling: First, read the copper single crystal model containing 4 atoms in the LAMMPS data format, corresponding to model 1, all grains of model 2 and the first 27 grains of model 3, and read the iron single crystal model containing 2 atoms in the LAMMPS data format. After reading, use formula (11), formula (12), formula (13) and formula (14) to calculate the surface spacing l1, l2, l3 of each model and the limit spacing l max .
[0171] Apply formula (15) and formula (16) to the atomic coordinates in the copper single crystal model and all the node coordinates, orientation matrix, and direction weight of model 1 and model 2 to obtain the determined coordinates of all atoms and substitute them into formula (17) to obtain the coordinates of all atoms that pass the determination and save the corresponding atomic types.
[0172] Apply formula (15) to the atomic coordinates in the copper single crystal model and the coordinates of the first 27 core nodes of model 3, all node coordinates, orientation matrix, and direction weight. Formula (16) is used to obtain the determined coordinates of all atoms and is substituted into formula (17) to obtain the coordinates of all atoms that pass the determination and save the atomic types of the corresponding atoms.
[0173] Apply formula (15) to the atomic coordinates in the iron single crystal model and the coordinates of the last 27 core nodes of model 3, all node coordinates, orientation matrix, and direction weight. Formula (16) is used to obtain the determined coordinates of all atoms and is substituted into formula (17) to obtain the coordinates of all atoms that pass the determination and save the corresponding atomic types; note that Nt in the examples is 65.
[0174] (6) Determine the atomic coordinates saved in step (5):
[0175] When x t <0 for x t Add 200, when x t ≥200 for x t Subtract 200, when y t <0 for y t Add 200, when y t ≥200 for y t Subtract 200, when z t <0 for z t Add 200, when z t ≥200 for z t Minus 200.
[0176] Save the judgment results to a file.
[0177] Use the external software SPaMD Visualizer to read the file generated in step (6) and output it in image format. The output of model 1 is as follows: Figure 3As shown, light gray is the crystal, dark gray is the grain boundary, and it can be clearly seen that the crystal has a spindle-shaped structure with one long side and two narrow sides. The output of model 2 is as follows Figure 4 As shown, light gray is crystal, dark gray is grain boundary, and it can be clearly seen that the crystal is a lamellar structure with one narrow side and two long sides. The output of model 3 is as follows Figure 5 As shown, the large light gray area is the copper crystal, the small light gray area is the iron crystal, the dark gray is the grain boundary, and it is found that the size of the iron grain is smaller than the copper crystal. This proves that the algorithm can achieve the expected effect.
Claims
1. A controllable nanocomposite polycrystal modeling method based on weighted Thiessen polygons, characterized in that: The specific steps include: Step 1: Initialize and generate uniform polycrystalline nodes and save them to the node list; The specific process of generating uniform polycrystalline nodes is as follows: First, initialize various parameters: the user sets the reduction coefficient R d ; Reduce counter P d ; Error counter P e ; Error counter upper limit P emax ; Model box size (x b ,y b ,z b ); total number of grains N; clear the node list; Then, use the model box size (x b ,y b ,z b ) Calculate the initial cutoff radius as R0; The calculation formula is: Next, random nodes are continuously generated and the conditions of the initial cutoff radius R0 are judged one by one, and the nodes that meet the judgment conditions are added to the node list; The formula for generating random nodes is: (x i ·y i ·z i )=[Rand()·x b ,Rand()·y b ,Rand()·z b ] (2) Where (x i ,y i ,z i ) is the coordinate of the random node, and Rand() is a randomly generated number between 0 and 1; The first randomly generated node is unconditionally saved to the node list; starting from the second node, determine whether the following conditions are met: Where (x j ,y j ,z j ) is the node coordinates already in the node list; n x Substitute -1, 0 and 1 respectively; n y Substitute -1, 0 and 1 respectively; n z Substitute -1, 0 and 1 respectively in a loop; that is, each node in the node list is judged 27 times; When the 27 judgments of the second node all satisfy the judgment formula (3), the second node is saved in the node list; otherwise, the second node is deleted and the error counter P is increased. e Add 1; Similarly, select the third random node and repeat the judgment, and so on, until the number of nodes in the node list is equal to the total number of grains, and then end; When the error counter P is increasing while adding a random node to the node list, e Reaching the upper limit P emax , then reduce the counter P d Increment by 1, reinitialize the error counter P e Make judgments; Step 2: assign a polycrystalline orientation matrix and a set of weights (u, v, w) corresponding to the x, y, and z axis directions to each polycrystalline node in the node list; and periodically expand the polycrystalline nodes in the node list to select the core nodes of the expanded new node list; New node coordinates (x k ,y k ,z k )for: (x k ,y k ,z k )=[x i +n x ·x b ,y i +n y ·y b ,z i +n z ·z b ] (10) That is, every node in the node list will expand 27 new nodes. The grain direction weights and orientation matrices of these 27 new nodes are the same, and the new node list will overwrite the old node list. Define n x , n y , n z The node when both are 0 is the core node, and its coordinates are (x l ,y l ,z l )express; There are three modes for generating the polycrystalline orientation matrix, namely: reading the orientation matrix from a file, generating the orientation matrix completely randomly, and generating the orientation matrix randomly by selecting the preferred orientation; the user can select any one of the generation modes according to the needs; For the first mode of reading orientation matrix from file: it contains N 3×3 temporary matrices and satisfies the orthogonal condition, namely: i, k represent any two unequal values between 1 and 3; all elements in the 3×3 temporary matrix are For calculating node orientation (O ij ) 3×3 ; When the N 3×3 temporary matrices are read, matrix normalization is performed; that is, all elements of the N 3×3 temporary matrices are brought into the node orientation (O ij ) 3×3 Calculate the formula and save the result to the end of the node list; For the second fully random orientation matrix pattern: First, generate the following elements of a temporary 3×3 matrix: D 23 =(-D 11 D 21 -D 12 D 22 ) / D 13 (5) D 32 =D 31 (D 11 D 22 -D 12 D 21 ) / (D 22 D 13 -D 12 D 23 ) (6) D 33 =(-D 11 D 31 -D 12 D 32 ) / D 13 (7) Then, the remaining six components D 11 , D 12 , D 13 , D 21 , D 22 , D 31 are all random numbers between -0.5 and 0.5, and all elements of the generated 3×3 temporary matrix are brought into the node orientation (O ij ) 3×3 Calculate the formula and save the result to the end of the node list; Randomly generate an orientation matrix pattern for the third preferred orientation: First, the user specifies an orthogonal 3×3 temporary matrix, normalizes the temporary matrix, and multiplies the matrix by three angles. α , the rotation matrix defined by β,θ; α , β, θ are generated by random numbers and represent the rotation angles along the x, y, and z axes respectively; The upper and lower limits of the random number are specified by the user. If a preferred orientation is required in a certain direction, the upper limit of the rotation angle in that direction should be increased, and the upper limits of the rotation angles in other directions should be lowered. The results are saved in the node list and the process ends. Step 3, looping and judging each core node in the expanded new node list, obtaining the judged atomic coordinates and types filled in each core node, and applying the grain expansion and orientation to the atomic coordinates; The specific steps are as follows: Step 501, read the atomic model file, including: a 3×3 matrix (S ij ) 3×3 , the zero point coordinate of the atomic model (x s ,y s ,z s ), and the total number of atoms N A , the atomic coordinates (x a ,y a ,z a ) and type data of each atom; Step 502: Using a 3×3 matrix (S ij ) 3×3 , respectively calculate the interplanar spacing l1, l2, l3 and the limit spacing l of the parallelepiped of the atomic model box max ; l1=S1·(S2×S3) / |S2×S3| (11) l2=S2·(S3×S1) / |S3×S1| (12) l3=S3·(S1×S2) / |S1×S2| (13) Where S1 is the matrix (S ij ) 3×3 The vector of the first row of S2 is the matrix (S ij ) 3×3 The vector of the second row of S3 is the matrix (S ij ) 3×3 The vector formed by the third row of ; Step 503: Calculate the extended coordinates (x c ,y c ,z c ); The formula is as follows: Where n1 is -INT(l max / l1+1) to INT(l max / l1+1) loop; n2 is -INT(l max / l2+1) to INT(l max / l2+1), n3 is -INT(l max / l3+1) to INT(l max / l3+1) loop; INT is rounded down; is the matrix (S ij ) 3×3 All components of Step 504: Based on the expanded coordinates (x c ,y c ,z c ), calculate the coordinates of the determined atom (x t ,y t ,z t ); The formula is: (x m ,y m ,z m ) is specified by the user and is used to adjust the relative position of the filled atoms and the current core node l; Step 505: Find the N nodes closest to the core node l to be tested. t nodes, substitute the coordinates of each node one by one to determine whether the judgment formula is satisfied; N t Assign to the user; For N t The current neighboring node selected from the nodes n , the determination formula is as follows: Among them, (x n ,y n ,z n ) is the current neighboring node n The coordinates of (u l ,v l ,w l ) is the weight of the core node l to be tested; (u n ,v n ,w n ) is the current neighboring node n The corresponding weights; Step 506: When N t All nodes satisfy the judgment formula, and the judgment atomic coordinates (x t ,y t ,z t ) and the corresponding atom type; Step 507, return to step 501 to re-read the atomic model file of the next core node, continue to calculate the extended coordinates of the next determined atom, and determine the atomic coordinates, and select the atoms that have been successfully determined, and record the coordinates and atomic types; until the cyclic determination of all core nodes is completed; Step 4: Select the determination atoms corresponding to each core node one by one, save the model box size after correcting the periodicity of the atoms, output the corrected atomic coordinates and atomic types to the file, and end.
2. A controllable nanocomposite polycrystal modeling method based on weighted Thiessen polygons as claimed in claim 1, characterized in that: Assigning weights to each polycrystalline node specifically includes: By reducing or increasing the weight of all grains in one direction, the axial ratio of grains in different directions can be controlled; Alternatively, the weight of one type of grain in all directions can be reduced so that the relative size ratio of different grains can be controlled.
3. A controllable nanocomposite polycrystal modeling method based on weighted Thiessen polygons as claimed in claim 1, characterized in that: The correction of the periodicity of atoms includes: To determine the atomic coordinates (x t ,y t ,z t ), when x t <0 for x t Add x b , when x t ≥x b Time x t Subtract x b , when y t <0 for y t Add y b , when y t ≥y b Time t Subtract y b , when z t <0 for z t Add z b , when z t ≥z b Time t Subtract z b .
Citation Information
Patent Citations
Polycrystal geometric modeling method
CN108629147A
A method for automatic modeling of twisted and tilted grain boundaries based on repeated lattice searching
CN109002639A