Introduction

Metal additive manufacturing (AM) possesses tremendous advantages in fabricating geometrically complex parts and tailoring microstructures and properties of the as-built products, prompting its growing application in various industries1. Among various AM technologies2, powder-bed-fusion (PBF) is one of the most commonly used technologies. Depending on the heat source, PBF can be further divided into selective laser melting (SLM) and selective electron beam melting (SEBM). The AM process parameters, such as laser/electron beam power, scanning speed and scanning strategy, strongly influence the microstructure formed during AM processes3,4,5,6. Furthermore, the microstructure affects the mechanical properties of final products7,8. Thus, the microstructure serves as a key bridge between the manufacturing process and the mechanical properties. It is very important to understand the mechanisms of microstructure evolution and tailor the microstructure by adjusting process parameters to obtain the desired properties. However, due to the large number of AM process parameters, trial-and-error experimentation is costly and time-consuming. On the other hand, with the development of computing capabilities, numerical simulation has become a powerful tool for understanding the underlying mechanisms and exploring the process-microstructure relation to achieve microstructure control in AM.

The cellular automata (CA) method9,10,11,12,13,14,15,16,17,18 and phase-field (PF) method19,20,21,22,23 are two commonly used methods for simulating the microstructure evolution in AM processes. A relatively large number of CA simulations of grain evolution have been reported. Zinovieva et al.12 developed a three-dimensional (3D) CAFD (cellular automata-finite difference) method to investigate the grain evolution of titanium specimens fabricated through SLM. Koepf et al.15 applied a 3D CA model for the grain structure prediction in SEBM on the scale of small parts (several millimeters), with the temperature field calculated using an analytical solution of the transient heat conduction equation. Lian et al.16 simulated the 3D grain evolution during single-track SEBM through a CA method, with the temperature field input from a powder-scale thermal-fluid flow (TFF) model24. Yan et al.18 proposed an integrated process-structure-property modeling framework where the CA model was applied for the prediction of grain structure during the two-layer two-track process. However, it should be noted that the nucleation of grains in AM processes is an important factor which determines the grain morphology. Recently, Li et al.14 used a 3D CA model including bulk nucleation and epitaxial growth to investigate the effect of the nucleation mechanism on grain structure during the multi-layer single-track direct laser deposition. Epitaxial growth means the phenomenon that the grain grows from the substrate, powder particles or previously solidified regions into the solidifying region continuously. Shi et al.17 employed a coupled ALE3D-CA model to study the columnar to equiaxed transition (CET) during the single-track laser PBF process under different laser beam shapes. In the CA models, the grain nucleation is usually generated through an empirical approach, where the nuclei density is a Gaussian function of local undercooling9,10,13,14,16,17 and the number and the critical undercooling of nucleation cells are pre-assigned according to a predetermined nucleation distribution13,14,16.

The PF method is considered as an accurate method for the simulation of microstructure evolution due to its foundation on thermodynamics and physically-informed parameters. The reported PF simulations of grain evolution during AM processes are mainly in two dimensions20,21,22. Lu et al.20 established a two-dimensional (2D) PF model to simulate PBF AM, and analyzed the influence of process parameters on the morphologies of the molten pool and grains. Liu et al.21 developed a temperature-dependent 2D PF model to simulate grain growth during multi-layer single-track scanning processes. Then, Liu et al.23 extended the 2D PF model to three dimensions, and coupled the nucleation model with PF model to study the mechanism of CET during the single-track process. The nuclei density was also characterized by the Gaussian function. So far, the 3D PF simulations of grain evolution during AM processes are few, and the simulation results are limited to the cases of single track23.

The grain evolutions such as competitive growth, epitaxial growth and through-the-layer grain growth during PBF processes have been reproduced well using the above CA and PF models. However, there are still some grain evolution phenomena that are always ignored. Firstly, repeated track stacking causes cyclic heating and cooling in the as-built part and substrate, further results in the grain coarsening in the heat affected zone (HAZ), and finally changes the grain size of the final product. However, in the existing simulation work, little attention has been paid to the grain coarsening in HAZs. Secondly, the powder bed with discrete powder particles is assumed to be a continuum in most simulation models. Rai et al. considered the discrete powder particles but assumed that each powder particle contained a single grain11. The simulation which incorporates grain evolution in discrete polycrystalline powder particles is still lacking.

In this work, to address the critical issue on nucleation and comprehensively understand the microstructure evolution, a 3D PF model is established to predict the grain evolution during the three-layer three-track PBF process, where the powder-scale TFF model is used to provide physically-informed temperature profiles. The nucleation model is derived from classical nucleation theory. The phenomena, including grain nucleation and growth, competitive growth, epitaxial growth from powder particles, substrate and previous tracks, re-melting and re-growth in overlapping zones and grain coarsening in HAZs, are considered comprehensively in the PF model. The well-studied 316 L stainless steel is adopted as the model material. The corresponding experiment is carried out to validate the simulation. Furthermore, to demonstrate the promising potential of our model, the grain refinement by adding nanoparticles is preliminarily reproduced and compared against the experimental results in the literature.

Results and discussion

Molten pool morphology and grain evolutions

The initial powder bed geometry in TFF simulation is shown in Fig. 1a, where the thermal profile during the three-layer three-track SLM process is simulated. The temperature profile in the black box region in Fig. 1a is then extracted to simulate the corresponding grain evolution. The initial grain morphologies in the 1st powder layer and substrate are shown in Fig. 1b. The shape of initial grains is equiaxed, and grains with different orientations are colored by the IPF (inverse pole figure) color with respect to the build direction. Due to the limited storage capacity, only 36 random orientations are considered, and the corresponding Euler angle for each orientation is given in Supplementary Table 1. It is assumed that there are about 5 to 10 small grains in a single powder particle (depending on the size of powder particle), to simulate the epitaxial growth of grains from powder particles. The detailed evolutions of the temperature field and grains are described as follows.

Fig. 1: Initial states.
figure 1

a Initial powder bed geometry in the TFF simulation; b initial grain morphology in the 1st powder layer and substrate in the PF simulation. The black box in a shows the PF simulation domain (350 × 350 × 146 μm3) inside the whole domain of the TFF model (2 × 0.4 × 0.2 mm3).

The evolution of temperature field during the three-layer three-track SLM process in the black box region in Fig. 1a is shown in Fig. 2a–e. The liquidus temperature Tl of 316 L stainless steel is 1723 K, and the regions in red color (≥1723 K) in Fig. 2a–b represent the molten pool in the 1st layer 1st track and the 1st layer 2nd track, respectively. The free surface of the molten pool is captured, and the edge of the molten pool is irregular. Some powder particles located at the edge of the molten pool are partially melted, as indicated by the black arrows. During the scanning of the 1st layer (see Fig. 2a–c), the substrate temperature increases with track stacking due to continuous energy input. During the scanning of the 2nd layer and the 3rd layer, the scanning direction rotates 90o relative to the previous layer, thus the scanning trace as well as the temperature field rotates 90o (see Fig. 2d, e).

Fig. 2: Evolutions of temperature field and grains during the three-layer three-track SLM process.
figure 2

ae Temperature field evolution; fj grain evolution. The red regions in a and b show the molten pool morphologies in the two tracks. The scanning direction rotates 90o between adjacent layers. Partially melted powder particles are highlighted by the black arrows.

The corresponding grain evolution is shown in Fig. 2f–j. Supplementary Fig. 1 shows the detailed evolutions of representative grains in the local simulation domain during the SLM process. When the local temperature is higher than Tl, the powder particles and substrate melt into liquid phase, along with the grain structure dissolved in liquid (see Fig. 2f). When the local temperature drops below Tl, the liquid phase transforms into the solid phase, along with the grain formation in solidified region. During the scanning of the 1st layer 2nd track (see Fig. 2g), some grains formed in the 1st track are re-melted. After scanning the 1st layer 3rd track (see Fig. 2h), long grains and fine grains appear alternately from the top view (Z direction). From the side view (Y direction), we can see that these fine grains are actually the long grains with the longest side along Z direction. The final grain morphology after scanning the 3rd layer 3rd track is shown in Fig. 2j. The comparison of Fig. 2h–j indicates that coarse grains are formed in the upper layers.

To more clearly observe and analyze the molten pool morphology and grain evolutions, the 2D cross sections are extracted and compared with the experimental results, as shown in Figs. 3 and 4.

Fig. 3: Molten pool morphology.
figure 3

a Cross sections of the simulated molten pool during the scanning of the 2nd layer 3rd track; b molten pool trace in the cross section of the fabricated sample. The white dash-dot lines in a indicate the slice positions of YZ and XZ planes. Scale bars, 200 µm in a and 100 µm in b.

Fig. 4: Grain evolutions during SLM in the XZ cross section.
figure 4

ac From the 1st track to the 3rd track in the 1st layer; e after scanning the 2nd layer; f after scanning the 3rd layer. The scanning direction rotates 90o between adjacent layers. d The grain evolution in the black dashed box during the 1st layer 3rd track in c. The white dashed curves represent the molten pool boundaries of the scanning tracks in the 1st and 3rd layers, and the white dashed straight line represents the molten pool boundary of the 1st track in the 2nd layer. The grain morphologies in the white circles in b and c illustrate the grain coarsening in the substrate, and the grain morphologies in the red circles in e and f illustrate the grain evolution in the un-remelted region of the 2nd layer during the 3rd layer scanning. The red arrows in e and f indicate the grain growth directions. Scale bar, 50 µm in a, b, c, e, f.

A shallow and wide molten pool is formed during the SLM process (see Fig. 3a) due to the negligible recoil pressure. In the same layer, the depth (D) and the width (W) of the molten pool increase (by about 9 μm and 13 μm, respectively) from the 1st track to the 3rd track (see Fig. 4c) due to continuous heat accumulation in the substrate and as-built part. This agrees well with the molten pool change at the beginning of the fabrication. It should be noted that the molten pool size will not increase continuously as tracks pile up. Foroozmehr et al.25 studied the change of molten pool size of 316 L stainless steel under different scanning speeds, and showed that the molten pool size reached a steady condition after the third track. The average width and depth of the simulated molten pool in the 3rd layer 3rd track are 111.9 μm and 71.8 μm, respectively. Besides, the cross section of the rectangular samples of 316 L stainless steel is shown in Fig. 3b, where the light gray arc represents the molten pool trace for each scanning track. The average width and depth of the molten pool on the top layer in experiments are respectively 116.5 μm and 79.2 μm, with variations between ±10 μm and ±8 μm. The comparison of simulation and experimental results shows that the simulated molten pool morphology is consistent with the experimental molten pool morphology.

Different kinds of grain evolutions can be observed during the three-layer three-track SLM process (see Fig. 4). These evolutions are analyzed with respect to the following four aspects.

(1) Grain evolutions within the molten pool. Within the molten pool (see Fig. 4a–d), the direction of grain growth is perpendicular to the molten pool boundary (as shown by the white arrows in Fig. 4a), which is opposite to the direction of heat conduction. The grain morphologies near the molten pool boundary indicate the epitaxial growth of grains from the substrate and partially melted powder particles. Besides, new grains can be observed in the molten pool. Some of these new grains are from heterogeneous nucleation, such as grain “B” marked in Fig. 4c. The EBSD mapping of grain orientation is shown in Fig. 5a, which gives clear grain morphologies but provides no traces of the molten pools. Fine equiaxed grains can be found in the EBSD mapping, and some of them may come from nucleation. However, it is hard to distinguish which grain comes from nucleation in the 2D view, because some grains grow from back to front in 3D space and also show equiaxed morphology in the 2D sections.

Fig. 5: Grain morphology in the as-built sample.
figure 5

a EBSD mapping; b simulation result after scanning of the 3rd layer 3rd track; c, d SEM images. The white dashed curves in a and b denote the estimated molten pool boundaries. The red arrows in c and d indicate the grain growth directions. Z direction is the build direction. Scale bars, 50 µm in a, b, 40 µm in c and 20 µm in d.

(2) Grain re-melting and re-growth in the overlapping zone. As shown in Fig. 4b, d and c, the grain in overlapping zone is partially or completely re-melted during the scanning of the 3rd track, then the partially re-melted grain (such as grain “A”) grows into the region of the 3rd track through epitaxial growth. The corresponding grain evolution in three dimensions is shown in Supplementary Fig. 1e–h. In addition, the re-melting and re-growth of grains in the overlapping zone between adjacent layers also occur. As shown in Fig. 4e, the region within the blue dashed rectangle is re-melted and re-solidified during the scanning of the 2nd layer, along with the partially melted grains in the 1st layer extending to the 2nd layer (see Supplementary Fig. 1i–l). In the process of epitaxial growth from the 1st layer to the 2nd layer, grains grow competitively, and only a part of grains can successfully extend into the 2nd layer (see Fig. 4e). The grains showing higher competitiveness during the 2nd layer scanning may lose their competitiveness when extending to the 3rd layer (see Fig. 4f), such as grain “C” marked in Fig. 4e. This can be attributed to the 90o-rotated scanning path. From the 2nd layer to the 3rd layer, the scanning direction rotates 90o, thus the heat conduction direction and temperature gradient also rotate 90o. The <001> directions of grains (such as grain “C”) that were close to the temperature gradient during the scanning of the 2nd layer are away from the temperature gradient during the scanning of the 3rd layer, and thus such grains are eliminated during the scanning of the 3rd layer. The continuous epitaxial growth through multiple layers can result in the formation of texture26. However, for the SLM process with the 90o-rotated scanning path, the continuous epitaxial growth of grains becomes challenging, and the preferred crystal orientation constantly changes from layer to layer, thereby reducing the possibility of forming a strong texture5.

(3) Changes of grain growth direction between adjacent layers. The grain growth direction changes when the grain grows from the 1st layer to the 3rd layer, as indicated by the red arrows in Fig. 4e–f. Supplementary Fig. 1e–l shows the detailed process of the grain growth direction changing between the first two layers. Zig-zag grains can be observed after scanning the 3rd layer (see Fig. 4f). The grain preferentially grows along the direction opposite to the heat conduction direction, and the heat conduction direction rotates 90o between two adjacent layers. This results in the rotation of grain growth direction between two adjacent layers. Similar rotations of grain growth direction are also observed in the experiment. As shown in Fig. 5c–d, elongated grains can extend over several layers, and the growth directions of some grains rotate between adjacent layers, as marked by the red arrows.

(4) Grain coarsening in HAZs. As shown in the white circles in Fig. 4b–c, the grain near the molten pool boundary coarsens in the pattern that large grains grow up at the expense of small grains (such as the disappearing blue grain in the center of the white circle). The temperature of the substrate increases with the stack of tracks (see Fig. 2a–c). High temperature causes high interfacial mobility and thus leads to grain coarsening in the substrate. The grain coarsening also occurs in the partially melted powders. Comparing Fig. 4b and c, we find that the grain in the right partially melted powder in Fig. 4c coarsens during the scanning of the 3rd track. In addition, the grains in the un-remelted region of the 2nd layer evolve during the 3rd layer scanning, such as the grain within the red circle in Fig. 4e and f. When scanning the upper layer, the temperature in the lower layer region rises, causing in-situ heat treatment, and finally resulting in the grain coarsening in the lower layer region.

In addition, mainly two kinds of grain morphologies are observed in the EBSD mapping (see Fig. 5a). One consists of coarse grains of larger size in the horizontal direction and concave boundary, as marked as region I. The other consists of clustered slender grains, as shown in region II. Similar grain morphologies can be found in Fig. 5b, which shows the grain morphologies in the XZ section after the 3rd layer scanning. From the simulation results it is known that the grains in region I mainly distribute in the overlapping zone of two adjacent tracks. When scanning a new track, the grain formed in the former track is re-melted partially and then re-grows during the next track scanning. The growth directions of this grain in two adjacent tracks are very different (see Supplementary Fig. 1g), thereby forming a coarse grain with wider size in horizontal direction and concave boundary. The clustered slender grains mainly distribute in the middle of molten pools. Therefore, according to the distributions of grains with different morphologies, a rough estimation of the molten pool morphology can be obtained from the EBSD mapping, as shown by the white dashed curves in Fig. 5a.

Evolution of grain size

The evolution of grain size is shown in Fig. 6. All the data of the grain sizes are calculated based on the 3D simulation results. Firstly, the aspect ratios of grains in all solidified regions of the scanning tracks are shown in Fig. 6a. The aspect ratio of grain (Φg) is defined as the ratio between major axis and minor axis of the ellipsoid equivalent to the grain shape, i.e., Φg = 2a/(b+c) where a, b and c are given in the diagram in the upper right corner of Fig. 6a. In this study, the grains are considered as equiaxed grains if Φg ≤ 1.5, and columnar grains if Φg > 1.5. The aspect ratios of 83.4% grains are larger than 1.5, indicating that mainly the columnar grains are formed in the three-layer three-track manufacturing. Some equiaxed grains are introduced through grain nucleation, and the nucleation sites are shown in Fig. 7. Some equiaxed grains are grains that grow from the substrate/powder particles. They do not extend too much or shrink (due to the grain coarsening) during the manufacturing, resulting in an equiaxed morphology. The distribution of the grain aspect ratio obtained from the experiment is also shown in Fig. 6a, where there is good consistency between the experiment and simulation. Secondly, the evolutions of grain number and average grain volume in the solidified region of the 2nd layer 2nd track with scanning time are shown in Fig. 6b. As time increases, the molten pool moves forward, and grains continuously form (through nucleation and epitaxial growth from previously solidified regions and powder particles), grow and coarsen in the behind solidified region. Thus, the grain number and average grain volume increase with time in the early stage. After the solidification is completed, the grain number tends to be stable because new grains cannot be introduced; while the average grain volume increases slightly due to continuous grain coarsening and finally tends to be stable. The evolutions of grain number and average grain volume with time in the other scanning tracks are similar to those in the 2nd layer 2nd track. The final grain number and average grain volume in the solidified region of each specific track are shown in Fig. 6c and d, respectively. The average grain volume increases from the 1st track to the 3rd track in the same layer and from the 1st layer to the 3rd layer. For the three tracks in the same layer, the temperatures of the substrate and as-built part increase with new track scanning. This causes the temperature gradient between liquid and solid to reduce. Thus, grains grow under a higher temperature, resulting in the increase of average grain volume. For different layers, many grains formed in the lower layers extend to the upper layers and grow competitively, resulting in the average grain volume in the upper layers larger than that in the lower layers. That is, the average grain size increases from lower layers to upper layers. In the work of Andreau et al.26, a similar trend of the grain size from lower layers to upper layers has also been observed.

Fig. 6: Evolutions of grain size during the SLM.
figure 6

a Aspect ratios of grains within all the scanning tracks; b evolutions of grain number and average grain volume in the solidified region during the scanning of the 2nd layer 2nd track. The blue dot line in b indicates the time when the scanning track is completely solidified. c Final grain number and d average grain volume in the solidified region of each specific track, where the symbols such as 1-1 and 2-3 donate the specific layer and track such as the 1st layer 1st track and 2nd layer 3rd track.

Fig. 7: Nucleation sites in each scanning track.
figure 7

The purple dots represent the nuclei and the blue areas indicate the scanning tracks. j is the 2D view of c.

Grain nucleation

As mentioned above, some of equiaxed grains are formed by heterogeneous nucleation. The nucleation sites in each scanning track are shown in Fig. 7. The grain nuclei distribute randomly among the scanning track. As shown in Fig. 7j, in the top region of the scanning track, more nuclei are formed on the side of powder particles. The comparison of nuclei numbers in the center of the 1st layer 3rd track and the 2nd layer 3rd track shows that the nuclei number in the 2nd layer 3rd track is slightly lower than that in the 1st layer 3rd track. This can be explained as follows.

The grain nucleation is dependent on the temperature field. On the one hand, the temperature gradients (GT) in the mushy zone and pure solid phase region of the 1st layer 3rd track are higher than those of the 2nd layer 3rd track (see Fig. 8 a–b). The average GT in mushy zone is 3.60 × 107 K m−1 for the 1st layer 3rd track and 3.12 × 107 K m−1 for the 2nd layer 3rd track. A lower GT induces a wider supercooled zone where nucleation can occur, which is conducive for grain nucleation. On the other hand, the temperature in the 1st layer 3rd track drops faster than that in the 2nd layer 3rd track (see Fig. 8c). From the liquidus temperature to the solidus temperature, the average cooling rate is 5.44 × 105 K s−1 for the 1st layer 3rd track and 2.94 × 105 K s−1 for the 2nd layer 3rd track. During the continuous cooling process, a high cooling rate induces large undercooling of supercooled liquid. The undercooling further affects the nucleation rate. The nucleation rate first increases and then decreases with the increase of undercooling, and the maximum nucleation rate appears when the undercooling is 37 K (see Methods Section). It should be noted that during the continuous cooling process, the existing grains and the nuclei formed earlier continue growing and consume the supercooled liquid, thereby inhibiting the appearance of the supercooled liquid with large undercooling (e.g., >37 K) and consequently the grain nucleation under large undercooling conditions. Thus, it is supposed that only the relationship that the nucleation rate increases with the increase of undercooling is valid during the continuous cooling process. Based on the relationship between cooling rate, undercooling and nucleation rate, it is evident that a higher cooling rate is beneficial to grain nucleation. To sum up, grain nucleation is affected by both GT and cooling rate, and low GT and high cooling rate favor grain nucleation. The GT and cooling rate for the 1st layer 3rd track are higher than those for the 2nd layer 3rd track, and the influence of cooling rate changes on grain nucleation is greater than the influence of GT changes on grain nucleation in the present work, thus the nuclei number in the 1st layer 3rd track is greater than that in the 2nd layer 3rd track. Jung et al.27 studied the grain size of inoculated Al-Ni alloys under two different temperature gradients. The results showed that at the same pulling velocity, the grain size was smaller under high GT than that under low GT, implying more nuclei formed under high GT. It should be noted that at a constant pulling velocity, a change of GT will also change the cooling rate28. More nuclei formed under the higher GT was the result of the combined effect of temperature gradient and cooling rate. Xu et al.28 studied the isolated temperature gradient effect and cooling rate effect on the heterogeneous nucleation and grain growth during directional solidification, and found that the temperature gradient effect on grain nucleation could be reduced by increasing cooling rate. These two experimental results about the heterogeneous nucleation provide good supports for analyzing the difference in nuclei number between the two tracks.

Fig. 8: Analysis on the temperature field.
figure 8

Temperature gradient at the longitudinal section of the molten pool in a 1st layer 3rd track and b 2nd layer 3rd track, with yellow/purple dashed line indicating the contour of liquidus/solidus temperature. The region between the two curves is named mushy zone. The color bar represents the value of \(\log 10G_T\). c Temperature histories of the 1st layer 3rd track and 2nd layer 3rd track. Scale bar, 50 µm in a, b.

Application to nanoparticle-induced grain refinement in SLM

The present PF model coupling with the nucleation model can be further used to predict the grain refinement by adding nanoparticles in SLM. One of the main purposes of adding nanoparticles is to serve as heterogeneous nucleation sites, thereby inducing many fine grains in the supercooled liquid and hindering grain growth. The heterogeneous nucleation is considered in the present nucleation model, and the nucleation region is selected automatically (as discussed in Methods Section). Under the condition of adding nanoparticles, the liquid region is automatically selected as the nucleation region, and a constant contact angle in liquid region is assigned, so that the heterogeneous nucleation induced by nanoparticles can occur in the supercooled liquid during simulations.

A simplified simulation of grain refinement of 316 L stainless steel fabricated by SLM and refined by TiB2 nanoparticles has been conducted. The manufacturing parameters used are the same as those in the experiment of AlMangour et al.29 (see Methods Section). The contact angle in liquid is assigned as 21° to describe the heterogeneous nucleation on TiB2 nanoparticles30. The simulated grain morphology in half of the molten pool is shown in Fig. 9a–c. The detailed grain evolution during the process is presented in Supplementary Fig. 2. Since nanoparticles are implicitly considered no nanoparticles are shown in Fig. 9a–c. Elongated grains are distributed at the molten pool boundary, and a large number of fine grains are distributed in the interior of the molten pool. The distribution of nuclei (see Supplementary Fig. 2d) shows that more nuclei can be formed in the interior of the molten pool rather than at the bottom, resulting in such distributions of columnar and fine grains. This pattern is also observed in the corresponding experimental results by AlMangour et al.29 as shown in Fig. 9d. The comparison between simulation and experimental results indicates that the present simulation can qualitatively reproduce the grain refinement. It should be noted that the nanoparticles not only serve as heterogeneous nucleation sites, but also act as the secondary phase particles to pin the grain boundaries and thus slow down the grain growth. This pinning phenomenon is called the Zener pinning effect, which has not been considered in the present model. Therefore, the size of refined grain in the simulation is larger than that in the experiment. Nevertheless, this demonstrates the promising potentials of our model in investigating the grain refinement by adding nanoparticles in AM, which is worthy of systematic study in the future.

Fig. 9: Grain morphology of SLMed 316 L stainless steel refined by TiB2 nanoparticles.
figure 9

ac Simulation results; d EBSD mapping adopted from the work of AlMangour et al.29. The black dashed lines in b and c indicate the molten pool boundary. The PF simulation domain is 175 × 105 × 100 μm3. Figures d is reprinted from ref. 29 with permission from Elsevier. Scale bars, 25 µm in b, c and 50 µm in d.

Advantages and disadvantages of the PF model

A 3D PF model has been established to study grain evolutions during PBF AM processes. The liquid/solid (L/S) transformation has been explicitly considered in the model, and a physical-based nucleation model has been incorporated to simulate heterogeneous nucleation, without the pre-assignment of nucleation sites and critical undercooling. The grain evolutions, including grain nucleation and growth, competitive growth, epitaxial growth from powder particles/substrate/previous tracks, grain re-melting and re-growth in overlapping zones, and grain coarsening in HAZs, can all be reproduced in the present model, which shows the comprehensiveness of this model. However, it should be noted that in the model, the L/S transformation is controlled by the temperature field, and the composition diffusion between the two phases is not considered. The different composition distributions in two phases may lead to enrichment or depletion of specific elements near the L/S interfaces, which changes the local undercooling and further affects the grain nucleation. Besides, the present model can only simulate grain evolution in a limited number of layers and tracks due to the high computational cost. To further extend the model for more layers and tracks, the possible numerical strategy are as follows. (1) For the acquisition of the temperature profile, the TFF model can be replaced by machine learning models to reduce the computation time. (2) For the PF model, adaptive meshing may be worth to try. Fine mesh is employed near the liquid-solid transition region and coarse mesh is employed in other regions, which can reduce the computation load and increase the simulation domain. (3) Using multiple GPUs is an effective method, which provides both large computation power and wide memory bandwidth. In addition, non-smooth surfaces can be observed in the PF simulation results, which are attributed to the lack of reconstruction of the surfaces in the PF model. There are two possible approaches to incorporate the smooth surface in the PF model: (1) Transfer the surface data to the PF model from the TFF model, including the fluid volume fraction and surface normal vector in each cell, and then reconstruct the smooth surface using the same volume of fluid algorithm in the TFF model. The shortcomings will include remarkably higher computational cost and larger volume of data to transfer. (2) Use conforming mesh instead of voxel mesh in the PF model, so that we can precisely represent the smooth surfaces. However, there will be two main problems. Firstly, the conforming mesh is irregular, which reduces the calculation accuracy and efficiency and worsens the solution convergence. Secondly, the surface keeps changing with time, so constantly tracking the surface using conforming mesh will require intensive re-meshing and thus greatly increase computation time.

Methods

Materials fabrication and sample preparation

Rectangular samples of 316 L stainless steel (10 × 10 × 30 mm3) were fabricated by a commercial SLM machine DiMetal-100 (Laseradd Technology Co. Ltd, China). The gas atomized powder with the diameter ranging between 20 μm and 40 μm was used, and a 90o-rotated scanning path was used as schematically shown in Fig. 10c. The manufacturing parameters used in the experiment (named Case I) are listed in Supplementary Table 2.

Fig. 10: Schematic diagrams for SLM process simulation.
figure 10

a Temperature field calculated by the TFF model; b liquid/solid phases and grain morphologies under the temperature profile; c scanning path.The black box in a shows the simulated PF region inside the whole domain of the TFF model.

The sample was cut along the plane parallel to the build direction, followed by mechanical polishing and chemical etching. The chemical etchant consists of 10 mL HCl, 0.2 g CuSO4 and 10 mL H2O. The microstructure was observed using the scanning electron microscope (SEM) and electron beam backscatter diffraction (EBSD) techniques.

Temperature profile from the TFF model

To ensure the accuracy of the temperature profile, the powder-scale TFF model developed by Yan et al.24 is used where the individual powder particles are resolved and major physical factors in the molten pool flow, such as thermal conduction, latent heat of melting, surface tension, Marangoni effect, viscosity, evaporation and recoil pressure, are incorporated. The powder bed is generated by simulating the powder spreading process using the discrete element method (DEM)31,32. The governing equations for the TFF model (Eqs. 13) are mass continuity, momentum conservation and energy conservation, given by

$$\nabla \cdot \left( {\rho {\mathbf{v}}} \right) = 0$$
(1)
$$\frac{\partial }{{\partial t}}\left( {\rho {\mathbf{v}}} \right) + \nabla \cdot \left( {\rho {\mathbf{v}} \otimes {\mathbf{v}}} \right) = \nabla \cdot \left( {\mu \nabla {\mathbf{v}}} \right) - \nabla p + \rho {\mathbf{g}} + f_B$$
(2)
$$\frac{\partial }{{\partial t}}\left( {\rho h_L} \right) + \nabla \cdot \left( {\rho {\mathbf{v}}h_L} \right) = q + \nabla \cdot \left( {k_t\nabla T} \right)$$
(3)

where v is the velocity vector, ρ is the density, μ is the viscosity, p is the pressure, g is the gravitational acceleration vector, fB is the buoyancy, q is the input energy from the laser beam, kt is the thermal conductivity, and T is the temperature. hL = chT + (1 − fs)Lm is the specific enthalpy, where ch is the specific heat, fs is the solidification fraction and Lm is the latent heat of fusion. Further details of the TFF model can be found in Refs. 18,24. The initial temperature of the simulation domain is 298 K, and the environmental pressure is 1.013 × 105 Pa. The boundary conditions include surface radiation, convective heat loss and evaporative heat loss for the energy conservation equation, and recoil pressure, surface tension and Marangoni effect for the momentum conservation equation. The relevant material parameters of 316 L stainless steel and the parameters used in the TFF simulation are listed in Supplementary Table 3.

Phase-field model of grain growth

To comprehensively understand the grain evolutions during the PBF process (see Fig. 10a–b), the PF model incorporates both the liquid-solid phase transformation and grain nucleation, growth and coarsening in solid regions, under the temperature profile from the TFF model. The assumptions below are considered in the PF model.

  1. (i)

    Since the focus of this model is to reproduce the grain evolution at the mesoscale rather than the more complex microscopic dendritic structures (formed due to micro-segregation of composition), the evolution of the composition field during the process is neglected. Moreover, because of the high temperature gradient and cooling rate in additive manufacturing, the composition distribution is more uniform at the grain scale than those under the solidification conditions of traditional manufacturing processes (e.g., casting), so the composition field would not remarkably influence the grain growth.

  2. (ii)

    The liquid-solid/grains transformation depends on the temperature: the solid/grains melt into liquid when the temperature is higher than Tl; and when the temperature drops below Tl, liquid transforms to solid/grains in turn.

  3. (iii)

    The grain growth is assumed to be temperature-dependent and anisotropic by incorporating the anisotropic grain boundary energy.

  4. (iv)

    Since the partially melted substrate and powder particles can act as the nucleation sites in the PBF process, the heterogeneous nucleation is considered.

Two kinds of non-conservative phase field parameters are introduced: \(\zeta ({\mathbf{r}},t)\) to describe the liquid and solid phases, and \(\eta _i({\mathbf{r}},t)\) (i = 1, 2, …, n, where n is the number of orientation) to identify the grains with different orientations. \(\zeta\) is 0 in the liquid phase and 1 in the solid phase, and changes from 0 to 1 at the L/S interface. \(\eta _i\) is 1 in the ith oriented grain and 0 in other orientated grains, and changes from 1 to 0 at the grain boundary. The solid regions consist of the previously solidified region, substrate and powder particles, and the grain evolves in all solid regions.

The governing equations for the microstructure evolution are the time-dependent Ginzburg-Landau equations:33

$$\frac{{\partial \zeta ({\mathbf{r}},t)}}{{\partial t}} = - L_{\mathrm{p}}\frac{{\delta F(\zeta ,\eta _i,T)}}{{\delta \zeta ({\mathbf{r}},t)}}$$
(4)
$$\frac{{\partial \eta _i({\mathbf{r}},t)}}{{\partial t}} = - L_{\mathrm{g}}\frac{{\delta F(\zeta ,\eta _i,T)}}{{\delta \eta _i({\mathbf{r}},t)}}$$
(5)

where \(t\) is time and \(F\) is the total free energy. \(L_p\) and \(L_g\) are the kinetic coefficients related to interfacial mobility of the L/S interface and grain boundary.

The total free energy \(F\) is given as:

$$F = {\int}_{V\,} {(f_{{\mathrm{local}}} + f_{{\mathrm{grad}}})dV}$$
(6)

where V is the volume of the studied system. \(f_{{\mathrm{local}}}\) and \(f_{{\mathrm{grad}}}\) respectively represent the local free energy density and the gradient energy density.

The local free energy density consists of two parts and is given as:

$$f_{{\mathrm{local}}} = f_{{\mathrm{phase}}} + f_{{\mathrm{grain}}}$$
(7)

where \(f_{{\mathrm{phase}}}\) and \(f_{{\mathrm{grain}}}\) respectively represent the free energy density originated from the liquid and solid phases and from the grains with different orientations. \(f_{{\mathrm{phase}}}\) is given as:

$$f_{{\mathrm{phase}}} = m_p\left\{ {(1 - \zeta )^2 \times \varphi \left( \tau \right) + \zeta ^2\left[ {1 - \varphi \left( \tau \right)} \right]} \right\}$$
(8)

where \(m_p\) is the pre-coefficient. \(\tau\) is the ratio between T and liquidus temperature \(T_l\), i.e. \(\tau = T/T_l\), and \(\varphi \left( \tau \right)\) is given as:

$$\varphi \left( \tau \right) = \frac{1}{2}\left\{ {1 - {\mathrm{tanh}}\left[ {\vartheta \times \left( {\tau - 1} \right)} \right]} \right\}$$
(9)

where \(\vartheta\) is a constant assigned to ensure that \(\varphi \left( \tau \right)\) tends to be 0 when \(\tau\) is bigger than 1, and 1 when \(\tau\) is smaller than 1. Thus, \(\varphi \left( \tau \right)\) is equal to 0 in the liquid phase and 1 in the solid phase. With this, the influence of temperature field on L/S transformation can be considered in the PF model, and \(f_{{\mathrm{phase}}}\) is minimized when \(\zeta\) is equal to 0 and 1, as shown in Supplementary Fig. 3a.

\(f_{{\mathrm{grain}}}\) is given as:

$$f_{{\mathrm{grain}}} = m_g\left[ {\mathop {\sum }\limits_{i = 1}^n \left( {\frac{{(\eta _i)^4}}{4} - \frac{{(\eta _i)^2}}{2}} \right) + \gamma \mathop {\sum}\limits_{i = 1}^n {\mathop {\sum}\limits_{j \ne i} {(\eta _i)^2(\eta _j)^2} } + \frac{1}{4} + (1 - \zeta )^2\mathop {\sum}\limits_{i = 1}^n {(\eta _i)^2} } \right]$$
(10)

where \(m_g\) is the pre-coefficient, and \(\gamma\) is the model parameter with its value determined by grain boundary energy and width33. The last term in the bracket represents the interaction between phases and grain orientations, which ensures that with \(\zeta = 0\) (i.e. in liquid state), \(f_{{\mathrm{grain}}}\) cannot reach the minimum; with \(\zeta = 1\) (i.e. in solid state), \(f_{{\mathrm{grain}}}\) is minimized at \([\eta _1,\eta _2, \ldots ,\eta _n] = [1,0, \ldots ,0]\), \([0,1, \ldots ,0]\), …, \([0,0, \ldots ,1]\). In the case of two grains (grain i and j), for example, \(f_{{\mathrm{grain}}}\) is minimized at \([\eta _i,\eta _j] = [1,0]\) and \([0,1]\), as shown in Supplementary Fig. 3b. With this, the grain formation below \(T_l\) and the grain dissolution above \(T_l\) can be simulated.

The gradient energy is given as:

$$f_{{\mathrm{grad}}} = \frac{{\kappa _p}}{2}(\nabla \zeta )^2 + \frac{{\kappa _g}}{2}(\nabla \eta _i)^2$$
(11)

where \(\kappa _p\) and \(\kappa _g\) are the gradient term coefficients for L/S interface and grain boundary, respectively.

To couple the anisotropic grain boundary energy and the anisotropic grain growth into the PF model, the grain boundary energy is described by the spatial orientation \(\varphi _{{\mathrm{inc}}}\) of the boundary (i.e., inclination angle) with respect to the specific crystal orientation. Similar methods have been successfully applied to the modeling of crystal growth34 and grain growth35. Following the approach of Karma and Rappel34, the grain boundary energy \(\sigma _g\) is approximated as:

$$\sigma _g = \sigma _{g_0}\left( {1 + {\it{\epsilon }}^\prime ({\mathrm{cos}}^4\varphi _{{\mathrm{inc}}} + {\mathrm{sin}}^4\varphi _{{\mathrm{inc}}})} \right)$$
(12)

where \(\sigma _{g_0}\) is a constant, and \({\it{\epsilon }}^\prime\) is a phenomenological parameter that controls the degree of anisotropy. The inclination angle here is defined as the minima angle between the normal direction of the grain boundary and the <001> orientation. In this way, the grain boundaries parallel to the {001} planes have the highest boundary energy and the highest driving force for boundary movement. That is, the preferred grain growth directions are along the <001> orientation, which is consistent with the common sense of the preferred direction for cubic crystals5.

Similar to Ref. 33, the coefficients \(m_p\), \(m_g\), \(\kappa _p\) and \(\kappa _g\) are functions of L/S interfacial energy \(\sigma _p\), grain boundary energy, L/S interfacial width \(l_p\) and grain boundary width \(l_g\), to make the PF model quantitative. The coefficients are defined as follows:33

$$m_p = \frac{3}{4}\frac{{\sigma _p}}{{(\Delta f_p)l_p}}$$
(13)
$$m_g = \frac{3}{4}\frac{{\sigma _{g_0}}}{{(\Delta f_g)l_g}}$$
(14)
$$\kappa _p = \frac{3}{4}\sigma _pl_p$$
(15)
$$\kappa _g = a_k\sigma _gl_g$$
(16)

where \(\Delta f_p\) and \(\Delta f_g\) are respectively the maximum height of the barrier in the free energy density between two minima in Supplementary Fig. 3a and b, and \(a_k\) is the model parameter related to the anisotropic grain boundary energy. The detailed calculation of \(a_k\) can be found in Ref. 33.

The kinetic coefficient for grains \(L_g\) is given as:33

$$L_g = \frac{1}{{a_k}}\frac{{D_g}}{{l_g}}$$
(17)

where \(D_g\) represents the grain boundary mobility. The grain boundary mobility is temperature-dependent and given as:36

$$D_g = D_0{\mathrm{exp}}\left( { - \frac{{Q_g}}{{RT}}} \right)$$
(18)

where \(D_0\) is a constant pre-exponential coefficient, \(Q_g\) is the activation energy and R is the gas constant. Since the influences of both anisotropic grain boundary energy and temperature on grain growth have been considered in the PF model, the grains grow competitively during PBF processes. A simple simulation of grain growth during directional solidification using the present PF model is shown in Supplementary Fig. 4, which shows that grains with their <001> orientation close to the temperature gradient have strong competitiveness during solidification. In addition, it should be noted that the grain evolutions in all solid regions (see Fig. 11b) are simulated simultaneously though the grains are subjected to different temperatures. That is, the present model can reproduce the grain coarsening in HAZs which has rarely been reported in previous simulation work.

Grain nucleation model

In order to simulate grain nucleation and growth concurrently, a nucleation model is incorporated into the PF model. The Poisson seed method37,38 is used to describe the stochastic nucleation events with a large PF time step (relative to the nucleation time). The nuclei are introduced into individual mesh cells randomly with the probability related to the corresponding nucleation rate \(J\) at these cells. The expected nucleation probability \(P_n\) is approximated by unity minus the “zero event probability” of a Poisson distribution37,38 and given as:

$$P_n = 1 - {\mathrm{exp}}\left( { - J\Delta t(\Delta x)^3} \right)$$
(19)

where \(\Delta t\) and \(\Delta x\) are the time step and mesh size (cubic mesh used here), respectively. At the same time, a random number between 0 and 1 is generated. Only if \(P_n\) is greater than the random number, a nucleus is added at this cell.

The heterogeneous nucleation rate \(J\) is calculated based on the classical nucleation theory39, which is physically-informed. The effects of undercooling and elemental diffusion on the nucleation rate are considered, and the formula for the nucleation rate is given as:

$$J = A\exp \left( { - \frac{{{{\Delta }}G_V^{{\mathrm{hom}}}f\left( \theta \right)}}{{kT}}} \right)$$
(20)
$$A = \frac{{kTN_{{\mathrm{atom}}}}}{h}{\mathrm{exp}}( - \frac{{Q_D}}{{RT}})$$
(21)
$$f\left( \theta \right) = 0.25 \times (2 + {\mathrm{cos}}\theta ) \times (1 - {\mathrm{cos}}\theta )^2$$
(22)
$${{\Delta }}G_V^{{\mathrm{hom}}} = \frac{{16\pi (\sigma _p)^3}}{{3(\Delta g_v)^2}}$$
(23)

where \(k\) is the Boltzmann constant, \(h\) is the Planck’s constant, \(N_{{\mathrm{atom}}}\) is the number of atoms in the L/S interface, \(\theta\) is the contact angle, and \(Q_D\) is the activation energy for diffusion of the atoms. \({{\Delta }}G_V^{{\mathrm{hom}}}\) represents the maximum free energy required for nucleus formation. \(\Delta g_v\) is the difference between the solid and liquid Gibbs free energies, which is approximated as \(\Delta g_v \approx L_m \times \Delta T/T_l\)39. The heterogeneous nucleation region during the changing temperature field is selected automatically according to the values of \(\mathop {\sum }\limits_{i = 1}^n (\eta _i)^2\), with \(\eta _i({\mathbf{r}},t)\) is position dependent and time dependent. From Methods Section, we know that when \(\mathop {\sum }\limits_{i = 1}^n (\eta _i)^2 = 1\), it represents the solid region; when \(\mathop {\sum }\limits_{i = 1}^n (\eta _i)^2 = 0\), it represents the liquid region; and when \(1 > \mathop {\sum }\limits_{i = 1}^n (\eta _i)^2\, > \,0\), it implies the L/S interface. It is assumed that the heterogeneous nucleation occurs at the L/S interfaces in the model, thus the region with \(1 > \mathop {\sum }\limits_{i = 1}^n (\eta _i)^2\, > \,0\) is selected as the heterogeneous nucleation region. Based on the Poisson seed method and values of \(\mathop {\sum }\limits_{i = 1}^n (\eta _i)^2\), the heterogeneous nucleation can be automatically selected and generated under the moving molten pool condition, without the pre-assignment of nucleation sites and critical undercooling.

The relationship between the nucleation probability and the undercooling of supercooled liquid (\(\Delta T = T_l - T_{{\mathrm{actual}}}\), where \(T_{{\mathrm{actual}}}\) is actual temperature of supercooled liquid) is shown in Supplementary Fig. 5, where the nucleation probability first increases and then decreases with the increase of undercooling. The maximum nucleation rate is obtained when the undercooling is 37 K. The shape of the nucleation probability curve indicates that the relationship between nucleation rate and undercooling does not strictly follow the Gaussian distribution. Thus, the simplified nucleation model in the previous models might induce inaccuracies.

The parameters used in the PF model and nucleation model are given in Supplementary Table 4. The pre-exponential factor is assigned as an adjustable variable due to rare report about the exact value. The solid phase consists of microscopic grains with various orientations, which is supposed to be isotropic as a whole. Based on this, the L/S interfacial energy is assumed to be isotropic and assigned a constant value. The grain boundary is dispersed by about eight mesh elements in the simulations. This dispersion is based on the study of Fan et al.40. Their results showed that the grain growth kinetics will slow down if the number of mesh elements is insufficient to resolve the grain boundaries. When there are more than seven mesh elements in grain boundary regions, the grain growth is independent of the grain boundary width. The Dirichlet boundary condition is used when solving the PF model.

Coupling of TFF model and PF model

A one-way coupling is used between the TFF model and PF model. The temperature fields at a series of time points are output from the TFF simulation. Because the mesh size and output time interval for the TFF model are larger than the mesh size and time step for the PF model, the temperature data is then linearly interpolated in space and time. Finally, the refined temperature data is input into the PF model to simulate the corresponding microstructure evolution.

Simulation cases and computation

The SLM process of three powder layers and three tracks in each layer is simulated, and the temperature profile in the middle of the scanning track is input into the PF model, as illustrated by the black box shown in Fig. 10a. The PF simulation region is 350 × 350 × 146 μm3, where most phenomena are reproduced, e.g., grain nucleation and growth, re-melting and re-solidification of previous layers and tracks, and grain coarsening due to cyclic heating. Thus, the simulation case is representative of the main characteristics of grain evolutions during SLM. The manufacturing parameters are the same as those in the experiment described in Supplementary Table 2 (see Case I). The TFF model is implemented into a commercial solver Flow3D, the number of cells is about 3 million, the physical time is about 0.0826 s, and the computation takes about 376 h on an Intel(R) Core(TM) i7-9700 CPU. The PF model is realized in a set of self-developed code and solved on GPU in parallel to accelerate computing. The number of PF cells is about 17.88 million, the total physical time is about 0.009 s (just the time for scanning the nine tracks in the simulation domain), and the computation time on a NVIDIA Tesla M2090 GPU (provided by the Centre HPC in NUS) is 311 h.

Furthermore, to demonstrate the promising potential of our model, the grain refinement by adding nanoparticles is preliminarily reproduced and compared against the experimental results of AlMangour et al.29. The matrix material is 316 L stainless steel powder, and the reinforcement is TiB2 particles with a volume fraction of 5%. The process parameters used in their experiment (named Case II) are listed in Supplementary Table 2, and the 90o-rotated scanning path is applied. It should be noted that nanoparticles are implicitly considered in the simulation. That is, the influence of nanoparticles on heterogeneous nucleation is considered in the model instead of explicitly tracking the nanoparticles. For simplicity, the grain morphology of a single track is simulated and compared with experiments.