Distinguished from conventional subtractive methodologies, additive manufacturing (AM) implies layer-by-layer shaping and consolidation of feedstock to arbitrary configurations. Powder bed fusion (PBF) is a family of the common techniques that actualize the AM fabrication in a fashion of sequentially layer-by-layer powder spreading and subsequent binding driven by beam scans, such as selective laser melting/sintering (SLM/SLS) and selective electron beam melting.1,2,3 Although PBF is conceptually simple, the processes are not yet fully controllable, reproducible, or predictable.1 As a result, its wide application is currently limited mostly by quality issues of the end-use products, e.g., insufficient hardness and fracture resistance due to the deformation, cracks, and porosity. In recent years, experimental efforts focusing on optimization of the process parameters, mostly related to beam power, scan speed, and powder materials, have achieved significant progress. Nevertheless, these investigations often suffer from the trial-and-error principle, which is time-consuming and not sufficient to provide transferable fundamental insights into the process–microstructure–property relationships.

To this end, modeling and simulation of PBF on the mesoscopic scale of powders indubitably play a crucial role in successful manufacturing, since it allows the direct linkage between the process parameters and the resultant microstructure that determines the macroscopic performance of the final product.1 However, the underlying physics are complicated and cover a broad range of time and length scales. These physics include but are not limited to beam–powder bed interaction, heat and mass transfer, phase transitions, melt pool behaviors, and structural relaxation.4 To date, various methods have been applied or extended for the simulation of PBF targeting at specific issues. Computational fluid dynamics (CFD), implemented with finite element method (FEM) and finite volume method (FVM), is a common approach to model the melting process as well as melt flow dynamics. Among existent CFD models, Navier–Stokes equations of incompressible Newtonian (INS) are widely utilized to describe the behavior of melt flow, which is usually associated with heat transfer, inertia force, capillary effect (also known as wetting) and/or thermocapillary effect (also known as Marangoni flow), and vapor pressure. The volume-of-fluid approach is additionally implemented to identify the evolution of the liquid–gas interface. Khairallah et al. presented the first three-dimensional (3D) model of a SLM single scan using the CFD code implemented with a hybrid of FEM and FVM. Arbitrary Lagrangian–Eulerian has also been implemented to deal with the mesh vertices which may flow with the fluid (Lagrangian) or be fixed (Eularian).5,6,7 A well-resolved mesoscopic powder bed geometry was also created in order to reproduce the experimental setup with least approximations. This model was later extended with recoil pressure and Marangoni convection,8 and denudation effects of metal powders9 for laser-based PBF. Körner et al. reported the first numerical lattice Boltzmann model (LBM) to analyze melting processes on the powder scale during SLM.10 This model was extended further with physics, such as the phase transitions and capillary forces.11,12 Besides the efforts on melt pool behaviors and pore structure evolution, generation of grain structure is also a highly concerned topic in modeling and simulation of PBF, due to its significant influence on the mechanical and functional (e.g., magnetic, electric or optical) properties of the final product. Commonly used methods include cellular automata (CA).13,14,15,16 Rai et al. reported a CA-LBM coupled model, which simulates two-dimensional (2D) re-solidification under a uniform thermal field.13 Recent publications have shown that the CA approach can also be successfully employed for the 3D simulation of coupled re-solidification.15,16,17

Nevertheless, the above-mentioned works are subject to strong simplifications and segregated modeling schemes, considering either only selected aspects or with the thermal history taken as input from separate numerical schemes. In fact, the heat transfer and thus also the melt pool is sensitive to the powder bed morphology, and has a strong local impact on melting, re-solidification, pore/bubble evolution and grain growth. A unified scenario considering interactions of the mentioned processes is thereby essential. Only in this way can one arrive at a thermodynamically consistent modeling of the PBF system and thus reliable microstructure prediction. One promising approach is phase-field modeling.18,19,20,21 Phase-field models apply order parameters (OP) to represent the microstructure (pore/liquid/solid phases, grains, or even the solid-state phases), and can involve natural thermodynamic quantities like temperature (or internal energy) and mechanical fields. The OPs take different constant values in different regions and have rapid spatial variation across the interfaces. The microstructure and its evolution are thus recaptured by the distribution of the OPs in space and time, with no need for interface tracking. Thanks to the features such as generality of the theoretical framework, straightforward numerical implementation and coupling of multi-physics, phase-field modeling have been extensively studied for solidification,19,21 grain growth,22,23,24 sintering,25 and fluid dynamics.26,27,28 Even though these models are mostly proposed for isothermal cases with specific formulation of free energies, they provide a solid and rich background for phase-field modeling of non-isothermal cases and for application in PBF modeling.

Surprisingly, very few phase-field efforts have been made for the AM process, and they are mostly limited to individual microstructure aspects. Taking the temperature gradient and solidification velocity as parameters in established isothermal phase-field models, Gong and Chou29 and Sahoo and Chou30 simulated the variation of the dendrite morphology in a single scan. Nevertheless, there is still debate as to whether and to what extent a dendritic structure forms, since PBF-AM involves a very high solidification rate and solidification with a planar front may occur. Krivilyov et al.31 presented phase-field simulations based on their multiphase flow model to study powder consolidation behavior, but with no explicit thermal information of AM. Zhang et al.32 directly adopted the phase-field model constructed under an isothermal condition for SLS, while the heat transfer and the coupled non-isothermal microstructure evolution were not addressed. Yang et al.33 proposed a thermodynamically consistent non-isothermal phase-field model for SLS, and proceeded with 3D simulations with a mesoscopic powder bed geometry. This model recapitulates processes during SLS, such as a temperature field with a high gradient, mass transfer through partial melting, and diffusion, particle/grain necking and coarsening. For the simulation of PBF, melting is dominant and the melt flow has a large influence on the pore and surface morphology. In 2018, Lu et al.34 made the first attempt to construct a unified phase-field simulation of melting, re-solidification and grain structure formation under an evolving temperature field in the same spatially resolved powder bed. Their 2D simulations demonstrated that the model can reproduce many important microstructure phenomena observed experimentally. However, the model disregards the fluid dynamics of the melt pool.

In recent decades, the phase-field method has been successfully applied to solving fluid-phase-coupled problems involving a transient interface and/or topological variations (e.g., fluid jet, droplets and large-deformation waves) by the so-called Navier–Stokes–Cahn–Hilliard (NSCH) system35,36 and the Navier–Stokes–Allen–Cahn (NSAC) system.37,38 This shows the potential to model and simulate the PBF system in a unified and thermodynamically consistent way, which, however, has not been incorporated in the existent phase-field works.

In this work, we propose a unified non-isothermal phase-field model considering coupled processes among heat transfer, melt flow dynamics, and microstructure evolution (noted as “heat–melt–microstructure-coupled processes”). The model is constructed from the entropy level following our former work33,39 explicitly considering the contributions from heat transfer, configurational and gradient terms, which results in a free energy density functional receiving the influences from pore/liquid/solid phases as well as grains inside the solid phase, and the local temperature field. A coupled kinetic system for OPs (including the pore–substance, solid–liquid inside substance, and grains inside solid), melt flow dynamics and the thermal evolution under non-isothermal conditions are also derived. As examples, we perform 2D simulations of the PBF single scans on a stainless steel 316L (SS316L) powder bed. The influences from the beam power and scan speed on key features, such as the temperature field, melt pool geometry and interior process including grain growth and pore morphology evolution, are also discussed.

Non-isothermal Phase-Field Model

In this model, a conserved OP \(\rho \) is employed to represent the substance and atmosphere/pores; a set of non-conserved OPs \(\phi _{\rm s}\) and \(\phi _{\rm l}\) are employed to represent the solid and liquid phase, respectively; and a series of non-conserved OPs \(\{\eta _j\}\) are employed to represent the orientation distribution among the powders/grains. According to this scenario (Fig. 1), it is anticipated that none of the non-conserved OPs are valued when \(\rho =0\), and when \(\rho =1\), only one of \(\phi _{\rm s}\) and \(\phi _{\rm l}\) equals unity. This becomes the first constraint of OPs to restrict the existence of liquid as well as solid within the substance:

$$\begin{aligned} (1-\rho )+\phi _{\rm l}+\phi _{\rm s}=1. \end{aligned}$$

On the other hand, \(\{\eta _j\}\) have zero value when \(\rho =1\), \(\phi _{\rm l}=1\) and \(\phi _{\rm s}=0\), indicating that the substance is in the liquid phase and thereby no grains should be present. When it is inside the solid substance (\(\rho =1\), \(\phi _{\rm l}=0\) and \(\phi _{\rm s}=1\)), for a specific grain j, only \(\eta _j\) takes the unit value while the others \(\eta _{{j}^*}, j^*\ne j\) are equal to zero. This becomes the second constraint of OPs to have polycrystal inside the solid substance:

$$\begin{aligned} (1-\phi _{\rm s})+ \sum _j\eta _j=1. \end{aligned}$$
Fig. 1
figure 1

(a) Schematic of the physical processes during PBF, i.e., melting and re-solidification, multiple mass transfer paths, and grain boundary migration. Here, the bulk diffusion GB-N represents the path from grain boundary to neck through bulk, while SF-N presents the path from surface to neck through bulk; (b) profiles of different OPs across corresponding phases

Following this scenario, the entropy density functional \({\mathscr{S}}\) is constructed based on our latest work in Refs. 33 and 39:

$$\begin{aligned} \begin{aligned} {\mathscr{S}}=&\int _\Omega s(e,\rho ,\{\phi _i\},\{\eta _j\}) \text{d}\Omega \\ =&\int _\Omega \left[ \Phi _{\rm ht}(\rho ,\{\phi _i\},\{\eta _j\})s_{\rm ht}(e_{\rm ht})+s_{\rm cf}(\rho ,\{\phi _i\},\{\eta _j\}) -s_{\rm grad}(\nabla \rho ,\{\nabla \phi _i\},\{\nabla \eta _j\}) \right] \text{d}\Omega . \end{aligned} \end{aligned}$$


$$\begin{aligned}&s_{{\rm ht}}(e_{\rm ht}) =\frac{\int {\text{d}}e_{\rm ht}}{T},\\&s_{{\rm grad}}(\nabla \rho ,\{\nabla \phi _i\},\{\nabla \eta _j\})=\frac{1}{2} \kappa _\rho \left| \nabla \rho \right| ^2 + \frac{1}{2} \kappa _\phi \sum _i\left| \nabla \phi _i \right| ^2 +\frac{1}{2} \kappa _\eta \sum _j \left| \nabla \eta _j \right| ^2, \end{aligned} $$

where the entropy density s includes the contributions from thermal (\(s_{\rm ht}\)), configurational (\(s_{\rm cf}\)), and gradient (\(s_{\rm grad}\)) contributions. \(\kappa _\rho \), \(\kappa _\phi \) and \(\kappa _\eta \) represent the gradient constant. Here, \(\text{d}e_{\rm ht}\) represents the heat change within \(\Omega \). When there is no volume variation, i.e. \(\Omega \) is a constant, we have the internal energy density change \(\text{d}e=\text{d}e_{\rm ht}\) according to the first law of the thermodynamics. The monotonic interpolating function \(\Phi _{\rm ht}\) maps the heat contributions to the regions with a certain value of OPs \(\rho \), \(\{\phi _i\}\,(i=\text{l, s})\) and \(\{\eta _j\}\,(j=1,2,\ldots ,N)\). Correspondingly, the internal energy density functional \({\mathscr{E}}\) of a finite subdomain \(\Omega \) within the system can be formulated as:

$$\begin{aligned} \begin{aligned} {\mathscr{E}}=&\int _\Omega e(\rho ,\{\phi _i\},\{\eta _j\}) \text{d}\Omega \\ =&\int _\Omega \left[ \Phi _{\rm ht}(\rho ,\{\phi _i\},\{\eta _j\})e_{\rm ht}+e_{\rm pt}(\rho ,\{\phi _i\},\{\eta _j\})\right] \text{d}\Omega , \end{aligned} \end{aligned}$$

where the internal energy density e consists of heat (\(e_{\rm ht}\)) and potential (\(e_{\rm pt}\)) terms. To relate the entropy density functional to the free energy density functional \({\mathscr{F}}\), the Legendre transformation is performed40:

$$\begin{aligned} \begin{aligned} {\mathscr{F}} =&\int _\Omega \inf _{e} \left[ e(\rho ,\{\phi _i\},\{\eta _j\}) - T s(e,\rho ,\{\phi _i\},\{\eta _j\}) \right] \text{d}\Omega \\ =&\int _\Omega \left[ \Phi _{\rm ht}(\rho ,\{\phi _i\},\{\eta _j\}) f_{\rm ht}(T)+f_{\rm loc}(T,\rho ,\{\phi _i\},\{\eta _j\})\right. \\&\quad \left. +\,f_{\rm grad}(T,\nabla \rho ,\{\nabla \phi _i\},\{\nabla \eta _j\})\right] \text{d}\Omega . \end{aligned} \end{aligned}$$

The term \(f_{\rm ht} = \inf _{e_{\rm ht}}[e_{\rm ht}-Ts_{\rm ht}(e_{\rm ht})]\) represents the contribution from the transformed heat term \(e_{\rm ht}\), which leads to the relationship \(\text{d}(f_{\rm ht}/T)=e_{\rm ht}\text{d}(1/T).\)41 Here, the heat term is calculated by the temperature change and the latent heat from the solid–liquid phase transition, i.e., \(e_{\rm ht}=\Phi _{\rm ss}c_{\rm r}(T-T_{\rm M})+\Phi _{\rm l}{\mathscr{L}},\)33,39,41 where \(c_{\rm r}=\Phi _{\rm s}(c_{\rm s}-c_{\rm at})+\Phi _{\rm l}(c_{\rm l}-c_{\rm at})\) is the relative specific heat, setting the internal energy of the atmosphere/pores at a reference temperature \(T_{\rm M}\) of the system as the zero potential. \(c_{\rm l}\), \(c_{\rm s}\) and \(c_{\rm at}\) are the volumetric specific heat of the solid, liquid and the atmosphere/pores, while \(\Phi _{\rm ss}\), \(\Phi _{\rm l}\) and \(\Phi _{\rm s}\) are the interpolating functions to indicate the substance, liquid and solid phase, respectively. \({\mathscr{L}}\) represents the latent heat of the liquid–solid transition. In this fashion, \(f_{\rm ht}\) can be formulated as:

$$\begin{aligned} \begin{aligned} f_{\rm ht}(T)=T\int e_{\rm ht}\text{d}\left( \frac{1}{T}\right) =\Phi _{\rm ss}c_{\rm r}\left[ T\text{ln}\frac{T}{T_{\rm M}}-(T-T_{\rm M})\right] -\Phi _{\rm l}\left[ \frac{T-T_{\rm M}}{T_{\rm M}}{\mathscr{L}}\right] . \end{aligned} \end{aligned}$$

On the other hand, we simply formulate the local term \(f_{\rm loc}=e_{\rm pt}-Ts_{{\rm cf}}\) into a polynomial, presenting the multi-well-shape with barrier heights linearly correlated with temperature, by adopting the same form for both \(e_{\rm pt}\) and \(s_{\rm cf}\). As for a general PBF system, we specifically use three polynomials to separately reflect the landscapes \(f_{\rm loc}\) across corresponding interfaces, which are \(w_{\rm ss}\) for the pore–substance interface, \(w_{\rm sl}\) for the solid–liquid interface inside the substance, and \(w_{\rm gr}\) for the grain boundaries inside the solid, i.e.:

$$\begin{aligned} \begin{aligned} f_{\rm loc}(T,\rho ,\{\phi _i\},\{\eta _j\})=&\, e_{\rm pt}(T,\rho ,\{\phi _i\},\{\eta _j\})-Ts_{{\rm cf}}(T,\rho ,\{\phi _i\},\{\eta _j\})\\ =&\, w_{\rm ss}(T,\rho )+w_{\rm sl}(T,\rho ,\{\phi _i\})+w_{\rm gr}(T,\phi _{\rm s},\{\eta _j\}). \end{aligned} \end{aligned}$$

In this regard, \(w_{{\rm ss}}\) can be formulated in a simple double-well form

$$\begin{aligned} w_{{\rm ss}}(T,\rho )= \underline{C}(T)\left[ \rho ^2(1-\rho )^2 \right] , \end{aligned}$$

and \(w_{{\rm sl}}\) adapts the form of Landau-type polynomial42:

$$\begin{aligned} w_{{\rm sl}}(T,\rho ,\{\phi _i\})= \underline{H}(T)\left[ \rho ^2+6(1-\rho )\sum _i\phi _i^2- 4(2-\rho )\sum _i\phi _i^3 + 3\left( \sum _i\phi _i^2\right) ^2 \right] , \end{aligned}$$

\(w_{{\rm gr}}\) is also formulate in a similar way as:

$$\begin{aligned} w_{{\rm gr}}(T,\phi _{\rm s},\{\eta _j\})= \underline{D}(T)\left[ \phi _{\rm s}^2+6(1-\phi _{\rm s})\sum _j\eta _j^2 - 4(2-\phi _{\rm s})\sum _j\eta _j^3 + 3\left( \sum _j\eta _j^2 \right) ^2 \right] . \end{aligned}$$

As mentioned, \(\underline{C}(T)\), \(\underline{D}(T)\) and \(\underline{H}(T)\) are the temperature-dependent barrier height which contains the parameters derived from the internal energy and configuration entropy:

$$\begin{aligned} \begin{aligned}&\underline{C}(T)=\underline{C}_{\rm pt} - \underline{C}_{\rm cf}(T-T_{\rm M}) , \\&\underline{D}(T)=\underline{D}_{\rm pt} - \underline{D}_{\rm cf}(T-T_{\rm M}) , \\&\underline{H}(T)=\underline{H}_{\rm pt} - \underline{H}_{\rm cf}(T-T_{\rm M}). \end{aligned} \end{aligned}$$

Finally, the gradient term \(f_{\rm grad}\) is:

$$\begin{aligned} \begin{aligned} f_{{\rm grad}}(T,\nabla \rho ,\{\nabla \phi _i\},\{\nabla \eta _j\})&=T s_{{\rm grad}}(\nabla \rho ,\{\nabla \phi _i\},\{\nabla \eta _j\})\\&= \frac{1}{2} T \kappa _\rho \left| \nabla \rho \right| ^2 + \frac{1}{2} T \kappa _\phi \sum _i \left| \nabla \phi _i \right| ^2 + \frac{1}{2} T \kappa _\eta \sum _j \left| \nabla \eta _j \right| ^2. \end{aligned} \end{aligned}$$

Figure 2 presents the overall landscape of local free energy density \(f_{\rm loc}\). Since \(f_{\rm loc}\) reflects the local thermodynamic stability of a certain phase at a specific temperature, it is anticipated to have multiple minima, including (\(\rho =0,\{\phi _{\rm s}=0, \phi _{\rm l}=0\}, \{\eta _1=0,\eta _2=0, \ldots , \eta _N=0 \}\)) for an atmosphere/pores phase, (\(\rho =1,\{\phi _{\rm s}=0, \phi _{\rm l}=1\}, \{\eta _1=0,\eta _2=0, \ldots , \eta _N=0 \}\)) for a liquid phase and (\(\rho =1,\{\phi _{\rm s}=1, \phi _{\rm l}=0\}, \{\eta _1=1,\eta _2=0, \ldots , \eta _N=0 \}\)), (\(\rho =1,\{\phi _{\rm s}=1, \phi _{\rm l}=0\}, \{\eta _1=0,\eta _2=1, \ldots , \eta _N=0 \}\)), ..., (\(\rho =1,\{\phi _{\rm s}=1, \phi _{\rm l}=0\}, \{\eta _1=0,\eta _2=0, \ldots , \eta _N=1 \}\)) for grains with different orientations inside the solid. The heat term \(f_{\rm ht}\) tilts the multi-well due to the local temperature variation, manifesting the thermodynamic stability of a variable due to the change of local thermal conditions. To get a close view, we further separate \(f_{{\rm ht}}\) into two parts: the contribution from the heat absorbing/releasing due to local variation of temperature \(f_{\rm c}=\Phi _{\rm ss}\left[ c_{\rm r}T\text{ln}\frac{T}{T_{\rm M}}-c_{\rm r}(T-T_{\rm M})\right] \), and the contribution from the latent heat \(f_{\mathscr{L}}=\Phi _{\rm l}\left[ \frac{T-T_{\rm M}}{T_{\rm M}}{\mathscr{L}}\right] \). These two contributions are also indicated in Fig. 2a and b. When local temperature meets the thermal conditions of melting (i.e., overheating, when \(T>T_{\rm M}\)) and re-solidification (i.e., undercooling, when \(T<T_{\rm M}\)), vast tilting of the multi-well on the side of the liquid phase can be observed due to the additional contribution from \(f_{\mathscr{L}}\). This indicates the thermodynamic driving force of the phase transition. On the other hand, for every temperature variation, grains with the same temperature should still maintain equality in local thermodynamic stability (illustrated as the equal multi-well among \(\{\eta _j\}\)) for ideal grain growth, until the temperature gradient further breaks the local equilibrium among the grains.39 This is achieved by the interpolating function \(\Phi _{\rm ht}\). Constraints of Eqs. 1 and 2 are also presented as the lower bounds in Fig. 2 to maintain the shape of the \(f_{\rm loc}\) at the corresponding three-phase junctions. Note that the substance constraint in Eq. 1 is satisfied when \(\phi _{\rm l}=\rho -\phi _{\rm s}\). Therefore, we can safely use only \(\phi \) to represent the solid substance and \((\rho -\phi )\) to represent liquid substance. The other constraint in Eq. 2 is fulfilled using the penalty method. In this regard, the constraint term \(\hat{p}\Sigma _{\hat{g}}\) with a penalty coefficient \(\hat{p}\) and the penalty sum \(\Sigma _{\hat{g}}\) is added in the free energy density. Eventually, the explicit formulation of \({\mathscr{F}}\) in Eq. 5 becomes:

$$\begin{aligned} \begin{aligned}&{\mathscr{F}} = \int _\Omega \left[ \Phi _{\rm ht}(\rho ,\phi ,\{\eta _j\}) f_{\rm ht}(T)+ f_{\rm loc}(T,\rho ,\phi ,\{\eta _j\}) + f_{\rm grad}(T,\nabla \rho ,\nabla \phi ,\{\nabla \eta _j\}) +\hat{p}\Sigma _{\hat{g}}\right] \text{d}\Omega .\\&f_{\rm ht}(T)=\Phi _{\rm ss}c_{\rm r}\left[ T\text{ln}\frac{T}{T_{\rm M}}-(T-T_{\rm M})\right] -\Phi _{\rm l}\left[ \frac{T-T_{\rm M}}{T_{\rm M}}{\mathscr{L}}\right] ,\\&f_{\rm loc}(T,\rho ,\phi ,\{\eta _j\})= w_{\rm ss}(T,\rho )+w_{\rm sl}(T,\rho ,\phi )+w_{\rm gr}(T,\phi ,\{\eta _j\}),\\&f_{{\rm grad}}(T,\nabla \rho ,\phi ,\{\nabla \eta _j\})= \frac{1}{2} T \kappa _\rho \left| \nabla \rho \right| ^2 + \frac{1}{2} T \kappa _\phi \left| \nabla \phi \right| ^2 \\&\quad + \frac{1}{2} T \kappa _\phi \left| \nabla \rho - \nabla \phi \right| ^2 + \frac{1}{2} T \kappa _\eta \sum _j \left| \nabla \eta _j \right| ^2, \end{aligned} \end{aligned}$$


$$\begin{aligned} \begin{aligned}&w_{{\rm ss}}(T,\rho )= \underline{C}(T)\left[ \rho ^2(1-\rho )^2 \right] ,\\&w_{{\rm sl}}(T,\rho ,\phi )= \underline{H}(T)\left[ \rho ^2+6(1-\rho )\{\phi ^2+(\rho -\phi )^2\} \right. \\&\quad \left. - 4(2-\rho )\{\phi ^3+(\rho -\phi )^3\} + 3\{\phi ^2+(\rho -\phi )^2 \}^2 \right] ,\\&w_{{\rm gr}}(T,\phi ,\{\eta _j\})= \underline{D}(T)\left[ \phi ^2+6(1-\phi )\sum _j\eta _j^2 - 4(2-\phi )\sum _j\eta _j^3 + 3\left( \sum _j\eta _j^2 \right) ^2 \right] ,\\ \end{aligned} \end{aligned}$$
Fig. 2
figure 2

Energy landscape of \(f(T,\rho ,\{\phi _i\},\{\eta _j\})\) at: (a) the melt-solid-pore junction; (b) the melt-grain-grain junction; (c) the pore-grain-grain junction. Colors of the landscapes correspond to different temperatures, i.e., violet (\(T=0.4T_M\)), blue (\(T=0.6T_M\)), red (\(T=T_M\)) and orange (\(T=1.4T_M\)) (Color figure online)

Interpolating functions \(\Phi _{\rm ss}\), \(\Phi _{\rm s}\) and \(\Phi _{\rm l}\) can be simply formulated as:

$$\begin{aligned} \begin{aligned}&\Phi _{\rm ss}=\rho ^3\left( 10-15\rho +6\rho ^2\right) , \\&\Phi _{\rm s}=\phi ^3\left( 10-15\phi +6\phi ^2\right) , \\&\Phi _{\rm l}=1-\left[ \phi ^3\left( 10-15\phi +6\phi ^2\right) \right] , \\ \end{aligned} \end{aligned}$$

and for \(\Phi _{\rm ht}\), we simply adopt the formulation:

$$\begin{aligned} \Phi _{\rm ht}(\rho ,\phi ,\{\eta _j\}) = \xi \left( \underline{A}\rho + \underline{G}\phi + \underline{B}\sum _j\eta _j\right) . \end{aligned}$$

To include the constraint from Eq. 2, the penalty sum is formulated as:

$$\begin{aligned} \Sigma _{\hat{g}} = \left[ \left( \hat{g}_\phi + \sum _j\hat{g}_{\eta _j} \right) -1 \right] ^2, \end{aligned}$$

with the exterior penalty functions \(\hat{g}_\phi \) and \(\hat{g}_{\eta _j}\) as:

$$\begin{aligned} \hat{g}_\phi = 1 - \phi ^3\left( 10-15\phi +6\phi ^2 \right) ,\quad \hat{g}_{\eta _j} = {\eta _j}^3\left( 10-15{\eta _j}+6{\eta _j}^2 \right) . \end{aligned}$$

Model parameters \(\underline{A}, \underline{B}, \underline{G}, \underline{C}_{\rm pt}, \underline{C}_{\rm cf}, \underline{D}_{\rm pt}, \underline{D}_{\rm cf}, \underline{H}_{\rm pt}, \underline{H}_{\rm cf}\), as well as the gradient constants (\(\kappa _\rho \), \(\kappa _\phi \) and \(\kappa _\eta \)), are obtained from given diffusive interface width and the experimentally measured interface energies (i.e., \(\gamma _{\rm gs}^{\rm exp}\), \(\gamma _{\rm gl}^{\rm exp}\), \(\gamma _{\rm sl}^{\rm exp}\) and \(\gamma _{\rm gb}^{\rm exp}\) for the pore-solid, pore-liquid, solid–liquid interfaces, and grain boundary). Coefficient \(\xi \) is employed to favor the determination of model parameters by fitting the experimental results.33

A coupled kinetic system for OPs, a melting flow dynamic as well as heat transfer is then derived under the non-isothermal thermodynamic framework shown above. The derivations are explicitly presented in the Supplementary Note 1. As a result, we obtain the nonlinear kinetic system for the model as:

$$\begin{aligned}&\nabla \cdot {\mathbf {u}}=0, \end{aligned}$$
$$\begin{aligned} \varrho&\frac{\text{D}{\mathbf {u}}}{\text{D}t}=-\nabla p+\nu \nabla ^2{\mathbf {u}}-\nabla \cdot \varvec{\sigma }_{\rm K}+{\mathbf {b}}, \end{aligned}$$
$$\begin{aligned}&\frac{\partial e}{\partial T} \frac{{\text{D}}T}{{\text{D}}t} +\frac{\partial e}{\partial \rho }\frac{{\text{D}}\rho}{{\text{D}}t} +\frac{\partial e}{\partial \phi }\frac{{\text{D}}\phi}{{\text{D}}t}- \sum_j \frac{\partial e}{\partial \eta _{j}}\frac{{\text{D}}\eta_{j}}{{\text{D}}t}= \nabla \cdot \left( {\mathbf {k}}\cdot \nabla T\right) +\varvec{\sigma }:\nabla {\mathbf {u}}+q_{\mathbf {v}}, \end{aligned}$$
$$\begin{aligned}&\frac{\text{D}\rho }{\text{D}t}= \nabla \cdot \left[ {\mathbf {M}}\cdot \nabla \frac{\delta {\mathscr{F}}}{\delta \rho }+{\mathbf {M}}\cdot \left( -\frac{\delta {\mathscr{F}}}{\delta \rho }\frac{\nabla T}{T}\right) \right] , \end{aligned}$$
$$\begin{aligned}&\frac{\text{D}\phi }{\text{D}t}= -{L}_\phi \frac{\delta {\mathscr{F}}}{\delta \phi } , \end{aligned}$$
$$\begin{aligned}&\frac{{\text{D}}\eta _{j}}{{\text{D}}t}= -{L}_\eta \frac{\delta {\mathscr{F}}}{\delta \eta _j } , \end{aligned}$$


$$\begin{aligned} \begin{aligned}&\frac{\delta {\mathscr{F}}}{\delta {{\rho }}}=\frac{\partial f_{\rm loc}}{\partial \rho } -T\kappa _\rho \nabla ^2\rho -T\kappa _\phi (\nabla ^2\rho -\nabla ^2\phi ),\\&\frac{\delta {\mathscr{F}}}{\delta {{\phi }}}=\frac{\partial f_{\rm loc}}{\partial \phi } -T\kappa _\phi \nabla ^2\phi +T\kappa _\phi (\nabla ^2\rho -\nabla ^2\phi ) + \hat{p}\frac{\partial \Sigma _{\hat{g}}}{\partial \phi },\\&\frac{\delta {\mathscr{F}}}{\delta {{\eta _j}}}=\frac{\partial f_{\rm loc}}{\partial \eta _j }-T\kappa _\eta \nabla ^2\eta _j + \hat{p}\frac{\partial \Sigma _{\hat{g}}}{\partial \eta _j},\\&\varvec{\sigma }_{\rm K} = T\kappa _\rho \nabla \rho \otimes \nabla \rho + T\kappa _\phi \nabla \phi \otimes \nabla \phi + T\kappa _\phi \left( \nabla \rho - \nabla \phi \right) \\&\qquad \otimes \left( \nabla \rho - \nabla \phi \right) + T\kappa _\eta \sum _j\nabla \eta _j\otimes \nabla \eta _j. \end{aligned} \end{aligned}$$

Equations 16a and 16b govern the flow of the melts with the flow velocity vector \({\mathbf {u}}\) and hydrostatic stress p as the coupled variables. \(\nu \) is the dynamic viscosity, \({\mathbf {b}}\) is the body force, and \(\varrho \) is the density. The Cauchy stress tensor \(\varvec{\sigma }=-p{\mathbf {I}}+\nu \left[ \nabla {\mathbf {u}}+\left( \nabla {\mathbf {u}}\right) ^{\rm T}\right] -\varvec{\sigma }_{\rm K}\), in which the Korteweg stress tensor \(\varvec{\sigma }_{\rm K}\) reflects the effects of the interface tensions on the fluids, i.e., the capillary effect.26,43 Since in this case \(\varvec{\sigma }_{\rm K}\) is also a function of T, \(\nabla \cdot \varvec{\sigma }_{\rm K}\) thereby indicates the possible driving force due to the inhomogeneity of interface tensions which is induced by on-site temperature gradients. This is also known as the thermocapillary effect (or Gibbs–Marangoni effect).26,44,45 Apart from this, Eq. 16c presents the thermal evolution equation coupled with the transient microstructure (i.e., transient terms of OPs) and melt flow dynamics. Equations 16e and 16f result in the form of the Allen–Cahn equations.46 Equation 16d results in the form of the Cahn–Hilliard equation47 with a direct temperature gradient-induced diffusion term, which is also known as the thermophoresis effect (or Ludwig–Soret effect).48

The derived kinetic system in Eqs. 16a16f can be regarded as the combination of the NSCH and NSAC systems coupled with a transient temperature field and temperature gradient-related terms, such as thermocapillary and thermophoresis. In the following simulation, however, the thermocapillary and thermophoresis terms will be tentatively dropped due to the consideration of the computational stability and cost. Those effects will be explicitly covered in upcoming works.

Simulation Setup

Implementation of Finite Element Method

The model is numerically implemented via the finite element method (FEM) within the program “NIsoS” developed by authors based on MOOSE framework.49 4-node quadrilateral Lagrangian elements are chosen to mesh the geometry. The Cahn–Hilliard equation is solved in a split way.50,51 A transient solver with a preconditioned Jacobian–Free Newton–Krylov method and backward Euler algorithm has been employed to solve the non-isothermal phase-field problems. Adaptive meshing and time stepping schemes are used to reduce the computation costs. In addition, to stabilize the calculation of NSCH and NSAC systems, streamline–upwind Petrov–Gelerkin and pressure-stabilized Petrov–Galerkin methods are introduced associated with the weak forms of the Navier–Stokes equations.52

Simulation Domain

In this work, we consider a 2D simulation domain of the powder bed mid-section, as shown in Fig. 3. Instead of performing 3D simulations directly, 2D mid-section scenarios can already provide sufficient microstructure information of a powder bed, i.e., particles with multiple sizes and various pores due to the particle packing. Although details of other sections are lost, it can still recapitulate multiple features observed during PBF processes, including melting/partial melting, re-solidification and sintering of particles/grains, melt flow as well as pores/bubbles behaviors, the thermal profile and its evolution, and resultant grain structures, without having a vast computational cost and severe issues of numerical stabilization. This also helps us to easily verify underlying physical processes and their interactions. The 2D simulation domain has a thickness of \(H_{\rm pb}\) and a length of \(l_{\rm pb}\). Particles inside the domain are generated with the random close packing procedure. Due to the uncertainty of the initial grain structure of a single particle, we simply treat each particle as a monocrystal with an unique random orientation following the reported simulation works.13,14,34,39 With the help of a minimum coloring algorithm and a grain-tracking algorithm,33,53 four \(\eta _i\) are sufficient to uniquely represent all the particles/grains for these simulations. Two type of boundaries (i.e., the atmosphere and substrate boundaries) are considered as the combination of three types of boundary conditions (BCs). The mass closed BC allows no mass flux or flow on the boundary

$$\begin{aligned} \left. \nabla \rho \right| _{\Gamma }\cdot \hat{\mathbf {n}}=0,\quad \left. {\mathbf {u}}\right| _{\Gamma }={\mathbf {0}}, \end{aligned}$$

where \(\hat{\mathbf {n}}\) is the normal vector of the boundary \(\Gamma \), \({\mathbf {0}}\) is the null vector. Next, the heat convective BC allowed heat dissipation as heat convection with the atmosphere

$$\begin{aligned} -\left. k\nabla T\right| _{\Gamma } \cdot \hat{\mathbf {n}}=h(\left. T\right| _{\Gamma }-T_{\rm E}), \end{aligned}$$

where h is the convective coefficient and \(T_{\rm E}\) is the environment temperature. Finally, the heat conductive BC allowed heat dissipation in a way of heat conduction through the substrate

$$\begin{aligned} -\left. k\nabla T\right| _{\Gamma } \cdot \hat{\mathbf {n}}=-\frac{k_{\rm sub}}{H_{\rm sub}}(\left. T\right| _{\Gamma }-T_{\rm P}), \end{aligned}$$
Fig. 3
figure 3

Schematics for the 2D mid-section scenario of the PBF single-scan simulation

where \(H_{\rm sub}\) and \(k_{\rm sub}\) are the thickness and the thermal conductivity constant of the homogeneous substrate, respectively. The bottom of the substrate is fixed at a temperature \(T_{\rm P}\), the pre-heating temperature.

To distinguish properties on substance (ss), atmosphere (at), surface (sf) and grain boundary (gb), interpolating functions \(\Phi _{\rm ss}\), \(\Phi _{\rm at}\), \(\Phi _{\rm sf}\) and \(\Phi _{\rm gb}\) are utilized, which obtain unity only in the corresponding region, to construct overall properties from individual ones. They can be simply formulated as:

$$\begin{aligned} \begin{aligned} \Phi _{\rm ss}&=\rho ^3\left( 10-15\rho +6\rho ^2\right) , \quad \Phi _{\rm at}=1-\rho ^3\left( 10-15\rho +6\rho ^2\right) , \\ \Phi _{\rm sf}&=16\rho ^2(1-\rho )^2, \quad \Phi _{\rm gb}=16\sum _{i\ne j}\eta _i^2\eta _j^2. \end{aligned} \end{aligned}$$

Assuming the isotropic diffusion and grain boundary migration, the effective value of mobility \(L_\eta \) and \(M_{\rm path}\) through possible paths (path \(=\) ss, at, sf and gb) are adopted correspondingly from the self-diffusivities \(D_{\rm path}^{{\rm eff}}\) and grain boundary mobility \(G_{\rm gb}^{{\rm eff}},\)39,54,55 i.e.:

$$\begin{aligned} M_{\rm path}=\frac{{D}_{{\rm path}}^{{\rm eff}}}{{\delta {\mathscr{F}}}/{\delta \rho }|_{\rho =1}},\, L_\eta =\frac{G_{\rm gb}^{{\rm eff}}\gamma _{\rm gb}}{T\kappa _\eta }. \end{aligned}$$

Then, the diffusive mobility M on the powder bed can be formulated as33,39:

$$\begin{aligned} M =\Phi _{\rm ss} M_{\rm ss}^{\rm eff} + \Phi _{\rm at}M_{\rm at}^{\rm eff} + \Phi _{\rm sf}M_{\rm sf}^{\rm eff} + \Phi _{\rm gb}M_{\rm gb}^{\rm eff}. \end{aligned}$$

Similarly, for isotropic heat conductivity k and density \(\varrho \) we distinguish them on the substance (ss) and atmosphere/pores (at):

$$\begin{aligned} k =\Phi _{\rm ss} k_{\rm ss}^{\rm eff} + \Phi _{\rm at}k_{\rm at}^{\rm eff}, \quad \varrho =\Phi _{\rm ss} \varrho _{\rm ss}+ \Phi _{\rm at}\varrho _{\rm at}, \end{aligned}$$

and for viscosity \(\nu \), the solid (s), melt (l) and atmosphere/pores (at):

$$\begin{aligned} \nu =\Phi _{\rm s} \nu _{\rm s} + \Phi _{\rm l} \nu _{\rm l}+ \Phi _{\rm at}\nu _{\rm at}. \end{aligned}$$

As mentioned, the thermal effect is equivalently treated as an internal heat source term \(q_{\mathbf {v}}\) moving with a velocity \({\mathbf {v}}\):

$$\begin{aligned} \begin{aligned} q_{\mathbf {v}}&=\Phi _{\rm ss}\beta P_0p_{x}(x,x_{\mathbf {v}})p_z(z,z_{\mathbf {v}})\\&=\beta P_0\left\{ \frac{\Pi }{\pi R_{\rm bm}^2}\exp \left[ -\Pi \frac{(x-x_{\mathbf {v}})^2}{R_{\rm bm}^2}\right] \right\} \left\{ \frac{2}{\zeta \sqrt{\pi }\left[ 1+\text{erf}(z_{\mathbf {v}}/\zeta )\right] }\exp\left [- \frac {(z-z_{\mathbf {v}})^2}{\zeta ^2}\right] \right\} , \end{aligned} \end{aligned}$$

in which \(P_0\) is the nominal beam power reaching the surface of the powder bed, \(\beta \) is the attenuation coefficient. (xz) is an arbitrary point inside the simulation domain, while \((x_{\mathbf {v}},z_{\mathbf {v}})\) is the moving center of the beam following the trajectory of the surface. Equation 25 can be regarded as the mid-section of a volumetric heat source with a 2D Gaussian distribution along the surface and a decay along the depth56,57 (also illustrated in Fig. 3), which still follows the scenario of this work. \(R_{\rm bm}\) and \(\zeta \) are the characteristic radius and penetration depth of the beam. Note that parameter \(\Pi \) is utilized to adjust the concentration of the deposited power inside the circular beam spot, e.g., when \(\Pi =4.6\) there is 99% of the \(P_0\) concentrated inside the circular beam spot characteristic by \(R_{\rm bm}\). \(\zeta /2\) indicates the half-decay depth of the deposited energy.

Parameter Normalization

Following the conventions of the NSCH and NSAC systems, dimensionless quantities, including the Péclet number (\(\text{Pe}\)), Reynolds number (\(\text{Re}\)), Cahn number (\(\text{Ch}\)), Weber number (\(\text{We}\)) and Froude number (\(\text{Fr}\)) are defined to characterize the scale of diffusion, viscosity, interface, capillary and inertial force comparing to the scale of flow, respectively:

$$\begin{aligned} \text{Pe}=\frac{\bar{v}\ell \bar{l}}{\bar{\gamma } M},\, \text{Re}=\frac{\bar{\varrho }\bar{v}\bar{l}}{\nu }, \, \text{Ch}=\frac{\ell }{\bar{l}},\, \text{We}=\frac{\bar{\varrho }\bar{v}^2\bar{l}}{\bar{\gamma }}, \, \text{Fr}=\sqrt{\frac{\bar{\varrho }\bar{v}}{b\bar{l}}}, \, \end{aligned}$$

where \(\bar{v}\) and \(\bar{\varrho }\) are the characteristic velocity and density of the flow, while \(\bar{\gamma }\) is the characteristic surface tension. \(\nu \) is dynamic viscosity and M is the isotropic diffusivity. \(\bar{l}\) is the characteristic diameter of the viscous flow, while \(\ell \) is the characteristic width of the diffusive interface, and b is the inertial force (principally the gravity). For convenience, we use a set of simpler reference quantities to re-define those characteristic quantities, including the reference (melting) temperature \(T_{\rm M}\), the reference length scale \(\bar{l}\), and the time scale \(\bar{t}\). The reference energy density \(\underline{C}_{\rm pt}^{T_{\rm M}}=\kappa _\rho ^{T_{\rm M}}T_{\rm M}/\bar{l}^2\) which is the model parameter obtained at the reference temperature \(T_{\rm M}\). \(\kappa _\rho ^{T_{\rm M}}\) is the gradient model parameter at a reference temperature \(T_{\rm M}\). Then, we relate all of the characteristic quantities to the references as:

$$\begin{aligned} \bar{v}=\frac{\bar{l}}{\bar{t}},\, \bar{\varrho }=\frac{\underline{C}_{\rm pt}^{T_{\rm M}}\bar{l}^2}{\bar{t}^2},\, \bar{\gamma }=\sqrt{T_{\rm M}\kappa _\rho ^{T_{\rm M}}\underline{C}_{\rm pt}^{T_{\rm M}}}, \, \ell =\sqrt{\frac{T_{\rm M}\kappa _\rho ^{T_{\rm M}}}{\underline{C}_{\rm pt}^{T_{\rm M}}}}. \end{aligned}$$

Dimensionless quantities in Eq. 26 can be thereby modified as:

$$\begin{aligned} \text{Pe}^{\rm diff}_{\rm path}=\frac{\bar{l}^2}{M_{\rm path}\bar{t}\underline{C}_{\rm pt}^{T_{\rm M}}},\, \text{Re}=\frac{\underline{C}_{\rm pt}^{T_{\rm M}}\bar{l}^4}{\nu \bar{t}^3}, \, \text{ChWe}=1,\, \text{Fr}=\sqrt{\frac{\underline{C}_{\rm pt}^{T_{\rm M}}\bar{l}^3}{b\bar{t}^4}}, \, \end{aligned}$$

note here that we multiply the Cahn number by the Weber number to obtain 1. Also, since multiple diffusion paths are considered, the Péclet number of each diffusion path \(\text{Pe}^{\rm diff}_{\rm path}\) should be specifically calculated. Similarly, as for the NSAC system, we define another two Péclet-type numbers \(\text{Pe}^{\rm sl}\) and \(\text{Pe}^{\rm gb}\) to characterize the mobility of the solid–liquid phase transition as well as grain growth, respectively

$$\begin{aligned} \text{Pe}^{\rm sl}=\frac{1}{L_\phi \bar{t}\underline{C}_{\rm pt}^{T_{\rm M}}},\, \text{Pe}^{\rm gb}=\frac{1}{L_\eta \bar{t}\underline{C}_{\rm pt}^{T_{\rm M}}}. \, \end{aligned}$$

Dimensionless forms of other quantities are given in Table I. Spatial and time derivatives are also normalized with respect to \(\bar{t}\) and \(\bar{l}\), respectively. Dropping the tildes for simplicity, we eventually obtain the dimensionless forms of the kinetic equations in Eqs. 16a16f as:

$$\begin{aligned} \left. \begin{aligned}&\nabla \cdot {\mathbf {u}}=0, \\ \varrho&\frac{\text{D}{\mathbf {u}}}{\text{D}t}=-\nabla p+\frac{1}{\text{Re}}\nabla ^2{\mathbf {u}}+\frac{1}{\text{Fr}^2}, \\&\frac{\partial e}{\partial T} \frac{\text{D}T}{\text{D}t} +\frac{\partial e}{\partial \rho }\frac{\text{D}\rho }{\text{D}t} +\frac{\partial e}{\partial \phi }\frac{\text{D}\phi }{\text{D}t}- \sum _j \frac{\partial e}{\partial \eta _j} \frac{\text{D}\eta _j}{\text{D}t}= k\nabla ^2T+ \varvec{\sigma }:\nabla {\mathbf {u}}+q_{\mathbf {v}}, \\&\frac{\text{D}\rho }{\text{D}t}=\frac{1}{\text{Pe}^{\rm diff}} \nabla ^2 \frac{\delta {\mathscr{F}}}{\delta \rho }, \\&\frac{\text{D}\phi }{\text{D}t}= -\frac{1}{\text{Pe}^{\rm sl}}\frac{\delta {\mathscr{F}}}{\delta \phi } , \\&\frac{\text{D}\eta _j}{\text{D}t}= -\frac{1}{\text{Pe}^{\rm gb}}\frac{\delta {\mathscr{F}}}{\delta \eta _j } . \end{aligned} \right\} \end{aligned}$$
Table I The dimensionless forms of the quantities and operators involved in this model

Results and Discussion

The simulation results of the single scan of stainless steel 316L (SS316L) in an argon atmosphere are presented here. SS316L belongs to the family of austenite stainless steels. For this type of stainless steel, no solid structural transition is anticipated.66 The reference length scale is set as \(\bar{l}=1\,\upmu \hbox {m}\), and the time scale as \(\bar{t}=1\,\upmu \hbox {s}\). Characteristic radius and depth of the beam are set as \(R_{\rm bm}=10\,\upmu \hbox {m}\) and \(\zeta =80\,\upmu \hbox {m}\). The attenuation coefficients are set as \(\beta =0.50\). Scan speed v is simply defined as \(v=|{\mathbf {v}}|\). The melting point of SS316L is set as \(T_{\rm M}=1700\,\hbox {K}\). The temperature of the powder bed is initialized as \(T|_{t=0} = 0.4T_{\rm M}=680\,\hbox {K}\) , which is also the value of the pre-heating temperature \(T_{\rm P}\) and the environment temperature \(T_{\rm E}\). Utilized material properties are shown in Table II, and further calculated dimensionless quantities are listed in Table III. At equilibrium, when \(T=T_{\rm M}\), interface energies \(\gamma _{\rm gs}^{T_{\rm M}}\), \(\gamma _{\rm gl}^{T_{\rm M}}\), \(\gamma _{\rm sl}^{T_{\rm M}}\) and \(\gamma _{\rm gb}^{T_{\rm M}}\) can be calculated as33,39:

$$\begin{aligned} \begin{aligned}&\gamma _{\rm gs}^{T_{\rm M}} = \frac{1}{3\sqrt{2}}\sqrt{T_{\rm M}(\kappa _\rho +\kappa _\phi +\kappa _\eta )(\underline{C}_{\rm pt}+7\underline{D}_{\rm pt}+7\underline{H}_{\rm pt})},\\&\gamma _{\rm gl}^{T_{\rm M}} = \frac{1}{3\sqrt{2}}\sqrt{T_{\rm M}(\kappa _\rho +\kappa _\phi )(\underline{C}_{\rm pt}+7\underline{H}_{\rm pt})}, \\&\gamma _{\rm sl}^{T_{\rm M}} = \frac{1}{3\sqrt{2}}\sqrt{T_{\rm M}(2\kappa _\phi +\kappa _\eta )(7\underline{D}_{\rm pt}+12\underline{H}_{\rm pt})}, \\&\gamma _{\rm gb}^{T_{\rm M}} = \frac{2}{\sqrt{3}}\sqrt{T_{\rm M}\kappa _\eta \underline{D}_{\rm pt}}, \end{aligned} \end{aligned}$$

and the diffusive interface width of the grain boundary reads as \(l_{\rm diff}=2\sqrt{T_{\rm M}\kappa _\eta /3\underline{D}_{\rm pt}}\). Due to the difficulties in obtaining the experimental value as well as the temperature-dependent trend of \(\gamma _{\rm gl}^{{\rm exp}}\) and \(\gamma _{\rm sl}^{{\rm exp}}\), we assume the value of \(\underline{H}_{\rm pt}\), \(\underline{H}_{\rm cf}\) and \(\kappa _\phi \) as shown in Table III. We set \(l_{\rm diff}=2\,\upmu \hbox {m}\), parameters \(\underline{A},\underline{B},\underline{C}_{\rm pt}, \underline{C}_{\rm cf}, \underline{D}_{\rm pt}, \underline{D}_{\rm cf},\,\kappa _\eta \) and \(\kappa _\rho \) are fitted from the experimental surface and grain boundary energy \(\gamma _{\rm gs}^{{\rm exp}}\) and \(\gamma _{\rm gb}^{{\rm exp}}\) through the method we proposed in our latest work.33

Table II Material properties used in simulations
Table III Dimensionless quantities at \(T_{\rm M}\) and normalized model parameters

Figure 4 shows the chronological progress of the single scan and highlights the multiple phenomena. A powder bed with \(H_{\rm pb}=100\,\upmu \hbox {m}\) and \(l_{\rm pb}=500\,\upmu \hbox {m}\) is utilized. The thickness of the substrate is \(H_{\rm sub}=200\,\upmu \hbox {m}\). Due to the beam scan, the local temperature of the powder bed rapidly increases. A higher temperature gradient can be observed at the moving front of the beam than at the tail. Once the local temperature exceeds the melting point \(T_{\rm M}\) (i.e., the region is overheated), the melt pool is formed. Inside the melt pool, different kinds of melt flow can be observed. Due to the existence of the gravitational Froude term, melts at the convex position tend to flow down, causing a flat flow around the surface (Fig. 4c and d) and floating pores (inset in Fig. 4b). Due to the Allen–Cahn-governed phase transition (with the mobility \(L_{\phi }\)), we note that the melting process does not occur instantly inside the overheating region. As a result, partially melted particles/grains can be observed (Fig. 4a–d). Correspondingly, undercooled melts also exist (the melt phase in the region where \(T<T_{\rm M}\), i.e., the undercooling region) where the re-solidification of grains can be observed. It is anticipated that, when the re-solidification rate is approximately equal to the scan speed, a dragged tail of melt pool forms, behind which the columnar grains remains. Pores/bubbles which have not yet emerged to the surface are thereby trapped. Outside the melt pool, the local temperature is still high enough to activate diffusion and thus induces necking between adjacent particles (Fig. 4a and b), presenting the feature of sintering. Apart from the captured phenomena, Fig. 4 also presents the interactions between the local morphology, temperature field, and kinetics such as the melting, re-solidification and grain growth. It is obvious that the temperature field (i.e. isotherms) follows the morphology of the powder bed, showing the locally concentrated temperature gradient around the necks among the powders. Correspondingly, those kinetics interact mutually with the local morphology and the thermal profile. For instance, the melt flows flatten the surface and enlarge the melt pool. Since the melt flow transports not only mass but also energy, it thus influences the local thermal profile. Similarly, re-solidification of the grains does not just follow the local temperature field, but it also creates a grain structure which is distinct from the one before the beam scans, resulting in a different local environment for heat transfer at the tail of the melt pool compared to the front.

Fig. 4
figure 4

Simulation results on a PBF-processed SS316L powder bed with \(P_0=300\,\hbox {W}\) and \(v=2000\,\hbox {mm}\,{\text{s}^{-1}}\). Transient microstructure and featured phenomena are presented in (a)–(d). Here, \(T_{\rm M} = 1700\,\hbox {K}\) and \(\bar{v}=\bar{l}/\bar{t}=1000\,{\text{mm}}\,{\text{s}^{-1}}\)

We further perform a series of simulations with varying beam power \(P_0\) and scan speed v. In-process microstructures with melt pools are shown in Figs. 5 and 6 for increasing beam power (\(300\,\hbox {W}\)\(600\,\hbox {W}\), \(2000\,\hbox {mm}\,\hbox {s}^{-1}\)) and decreasing scan speed (\(400\,\hbox {W}\), \(3000\,\hbox {mm}\,\hbox {s}^{-1}\)\(1250\,\hbox {mm}\,\hbox {s}^{-1}\)) , respectively. The powder bed has the dimensions of \(H_{\rm pb}=100\,\upmu \hbox {m}\) and \(l_{\rm pb}=1000\,\upmu \hbox {m}\). The thickness of the substrate is \(H_{\rm sub}=200\,\upmu \hbox {m}\). The beam scans start at the horizontal position \(x=200\,\upmu \hbox {m}\) on the surface of the powder bed and end at \(x=900\,\upmu \hbox {m}\). The melt pools generated with varying geometries corresponding to the different \(P_0\) and v, move along with the beam scan. The dragged tails form for all cases, indicating the re-solidification has reached an equilibrium with the scan-induced melting (i.e., the re-solidification rate at the rear of melt pool equals the scan speed). A few interesting observations can be noted. Firstly, the re-solidification front follows the local profile of the temperature field. More exactly, grains are re-solidified along the local cooling directions, i.e., the negative gradient of the temperature field. Secondly, the melt pool size varies differently from the increasing power than from the decreasing scan speed. Figure 5 demonstrates that when \(P_0\) increases, both the length and the depth of the melt pool increase. On the the other hand, with decreasing scan speed, only the depth of the melt pool increases monotonically, while the length of the melt pool first increases and then decreases when v becomes small enough, as shown in Fig. 6. At the same time, the temperature gradient at the melting front becomes much higher. If we consider the linear power density as \(P_0/v\), it demonstrates the possible length reduction of the melt pool for a case with high linear power density. A possible reason is the enhancement of heat dissipation induced by the on-site morphological changes. Note that a less porous morphology is formed, which is preferred for heat conduction according to the implementation of k in Eq. 23. Therefore, in the cases with a low scan speed, although the linear power density is high enough to generate a melting pool with considerable depth, the rate of heat dissipation is competitive to the beam scan, resulting in the reduction in length of the melt pool. Apart from these, undercooled melts of all cases, regarded as the region from the isotherm of \(T=T_{\rm M}\) to the dragged tail, are observed to have the same undercooling degree. This is due to the implementation of a constant mobility of phase transition \(L_\phi \) (or the Péclet-type number \(\text{Pe}^{\rm sl}\)). In a near-realistic system, the relationship between \(L_\phi \) (\(\text{Pe}^{\rm sl}\)) and undercooling degree should be properly formulated.

Fig. 5
figure 5

Simulation results on PBF processing of the SS316L powder bed with a constant \(v=2000\,\hbox {mm}\,\hbox {s}^{-1}\) with varying \(P_0\), when the beam is at \(x=700\,\upmu \hbox {m}\) on the surface of powder bed. Tracked pore sets \(\hbox {S}_1\) (dash) and \(\hbox {S}_2\) (dash-dot) are also marked

Fig. 6
figure 6

Simulation results on PBF processing of the SS316L powder bed with a constant \(P_0=400\,\hbox {W}\) with varying v, when the beam is at \(x=700\,\upmu \hbox {m}\) on the surface of powder bed. Tracked pore sets \(\hbox {S}_1\) (dash) and \(\hbox {S}_2\) (dash-dot) are also marked

Melt pool geometries, varying with beam power and scan speed, significantly influence the morphology as well as the porosity/densification of the resultant microstructure, especially the morphology of the pores and grains. To systematically discuss such influences, we present the densification and corresponding microstructure of the PBF-processed powder bed as a distribution with different beam powers and scan speeds in Fig. 7. Densification factor \(\varpi \) is defined as:

$$\begin{aligned} \varpi =\frac{\varepsilon _0-\varepsilon }{\varepsilon _0-\varepsilon _{\rm min}}, \end{aligned}$$

where \(\varepsilon \) is the porosity of the final microstructure, while \(\varepsilon _0\) and \(\varepsilon _{\rm min}\) represent the initial and minimum porosity achieved through the processes, respectively. In this work, \(\varepsilon _{\rm min}=0\). According to the morphologies, This map can be roughly divided into four regions, as shown in Fig. 7a. Cases located in the wide intermediate region (indicated by \(\varpi =10\%\sim 95\%\)) result in the coexistence of columnar grains and irregular-shaped pores, which have been observed in the experimental works.67,68 The formation of the irregular-shaped pores can be explained by the competition between the bubble dynamics inside a melt pool and the solidification. We track two sets of the pores on the processed powder bed, labeled as \(\hbox {S}_1\) and \(\hbox {S}_2\). As shown in Figs. 5b–e and 6b–e, pores behave as floating bubbles, driven by the hydrostatic pressure due to the existence of the Froude term. During this process, large bubbles (\(\hbox {S}_2\)) deform, while small ones (\(\hbox {S}_1\)) reshape themselves into rounds or ellipses. When re-solidification occurs in the melt pools with relatively small sizes (Figs. 5b, c and 6c, d), large bubbles are trapped as irregular-shaped pores, yet their shapes are more or less similar to the original tunnel-like ones (\(\hbox {S}_2\) in Fig. 7\(\hbox {b}_3\)\(\hbox {b}_6\)). Small bubbles may also be trapped as is, though some of them around the surface find it difficult to emerge. As a result, there are concentrated small pores around the surface (\(\hbox {S}_1\) in Fig. 7\(\hbox {b}_3\)\(\hbox {b}_4\)). When the melt pools are relatively large (Figs. 5e and 6a), large pores may be significantly split into small ones and quickly ejected from the pools. Once trapped, they also present highly deformed/split shapes (\(\hbox {S}_2\) in Fig. 7\(\hbox {b}_1\)\(\hbox {b}_2\)). In addition, the columnar grains are also observed to have different heights corresponding to the melt pool size that has actually been achieved. When increasing the scan speed while fixing the beam power (compare Fig. 7\(\hbox {b}_1\)\(\hbox {b}_3\) and \(\hbox {b}_6\)), the depth of the melt pool reduces, resulting in grains with less height. This works in a similar fasion when decreasing the beam power while fixing the scan speed (compare Fig. 7\(\hbox {b}_2\)\(\hbox {b}_3\) and \(\hbox {b}_5\)). Cases of Fig. 7\(\hbox {b}_2\) and \(\hbox {b}_3\) locate at almost the same isoline of \(\varpi \), they present similar morphology of columnar grains and pores.

Fig. 7
figure 7

Densification map (a) and corresponding microstructure of PBF-processed powder bed using different beam power and scan speed. According to the resultant morphology, the microstructure is classified as (\(\hbox {b}_1\))–(\(\hbox {b}_6\)) columnar grains with irregular-shaped pores; (\(\hbox {c}_1\))–(\(\hbox {c}_3\)) tilted columnar grains without irregular-shaped pores; (\(\hbox {d}_1\))–(\(\hbox {d}_2\)) limited melting phenomenon with possible melt pool fragmentation; (e) no melting phenomenon. Tracked pore sets \(\hbox {S}_1\) (dash) and \(\hbox {S}_2\) (dash-dot) are also marked

Apart from this, packed tilted columnars with almost no irregular-shaped pores (Fig. 7\(\hbox {c}_1\)\(\hbox {c}_3\)) can be observed in cases located on the higher-left region (indicated by \(\varpi \ge 95\%)\)), which also presents the resemblance to the experimental observations on the SS316L.69 In those cases, significant melt pools with depths larger than the thickness of the powder bed are generated, and almost all pores are split and ejected from the melt pool. The number of residual pores is limited, and their shape is mostly round. However, they are found in the grain interior, at the grain boundary and at grain triple junctions. Re-solidified grains follow the local cooling directions and eventually form a tilted column shape. Note that grains at the end of scans tilt in the other direction from the beginning ones due to the reversal of the local cooling direction. It is worth remarking that intense vaporization can be expected in this region when the local temperature is over the boiling point (possibly caused by either sufficiently high beam power or sufficiently low scan speed). In this sense, the recoil pressure induced by vaporization applies additional force on the liquid–gas surface and creates a depression of the melt pool. As a result, there is a possible drop of the densification due to trapped extra pores after refilling of the depression.8 Since the related effects of the vaporization are not yet contained in this work, details about this densification drop are thereby lost.

As for cases located in the narrow strip-shaped region (indicated by \(\varpi =4\%\sim 10\%\)), the melt pools are rather limited and even fragmented, as shown in Fig. 7\(\hbox {d}_1\). Regarding melt pool fragmentation, there are different explanations, including flow instability or powder morphology.5,10,70 Since effects such as wetting and Marangoni flows have not yet been implemented in this work, the simulated melt pool fragmentation here should be attributed to the local stochastics of the powder bed. Enhanced heat dissipation induced by the on-site morphological changes is also a possible reason, causing the inhomogeneous heat loss from the melt pool. The resultant microstructure (Fig. 7\(\hbox {d}_2\)) inside this region presents similarities to those observed from liquid-state sintering where the particles are sintered with the existence of the liquid phase.33 Finally, cases located in the right-bottom region (indicated by \(\varpi \le 4\%\)) do not have melting phenomena, and barely present features observed from solid-state sintering except for necking.


In this work, we propose a unified non-isothermal phase-field model for the heat–melt–microstructure-coupled processes during PBF, which consists of a non-isothermal free energy density functional considering effects from pore/liquid/solid phases as well as the grains in the solid phase, and a framework deriving simultaneously the interactive kinetics for thermal evolution, melt flow dynamics and microstructure evolution. Using the proposed model, finite element simulations on PBF of SS316L were carried out. The results clearly demonstrate the promising capability of the model. The simulation results are briefly summarized in the following:

  1. 1.

    The proposed model is able to recapitulate phenomena during PBF, such as high-gradient temperature field, melt pool with various geometry, melt flow as well as pores/bubbles behaviors, partially melted particles, re-solidification and sintering of particles/grains, and resultant columnar grains with irregular-shaped pores. It also presents the interactions between transient temperature field, melt flow dynamics and grain structures, e.g., the enhanced heat dissipation due to the formation of on-site morphology with less porosity, and tilted re-solidified grains following the local cooling directions.

  2. 2.

    Simulation results on the melt pool indicate strong interaction between the melt pool and the powder bed morphology. Parameter studies imply that the melt pool length varies in different manners with respect to the increasing power and to the decreasing scan speed. The length increases monotonically with increasing power, but for decreasing speed, it first increases and then starts to decrease after the speed becomes small enough. This may be attributed to the competition between heat dissipation, enhanced by on-site morphological changes, and scan-induced melting.

  3. 3.

    A densification map with respect to the beam power and the scan speed was obtained. The isolines of the densification factor are not following the isolines of the specific line energy, indicating again that the beam power and the scan speed should be addressed as independent process parameters. Four regions of the parameter combinations are identified based on the resultant microstructure and pore features. In-process simulation results allow us to trace back the formation mechanism of the various types of irregular-shaped pores.

The current version of the proposed model should be further extended in the near future for different aspects, e.g., implementation of capillary/thermocapillary effects (Korteweg stress term), and the thermophoresis effect (direct temperature gradient-driven mass transfer). In order to consider the effects from the recoil pressure induced by vaporization, the pressure balance should be explicitly formulated at the liquid–gas surface via asymptotic analysis. In addition, quantitative description of the model should be further derived and examined.