# Multi-Resolution SPH Simulation of a Laser Powder Bed Fusion Additive Manufacturing Process
## 2 Computational Framework
### Dynamic Particle Refinement  
The novelty offered by this work lies in reducing the computational cost of the SPH LPBF simulations via spatial adaptivity. We propose a simple algorithm to refine SPH particles dynamically and increase the spatial resolution. This approach follows the procedure elaborated upon in the SPH metal cutting adoption of [PERSON] et al. [33], which is easy to implement and well-suited to the LPBF simulation. In brief, the refinement procedure is carried out via particle splitting to decrease the discretization size (i.e., increase the spatial resolution) in some regions of the computational domain. Here, a uniform mass splitting approach is used to conserve the mass and momentum of the system. More sophisticated mass splitting approaches can be found in [52; 53].  
Inspired by the multi-resolution SPH simulation of metal cutting in [33], the spatial adaptivity here occurs inside a moving frame in the vicinity of the laser processing area, where a cubic refinement pattern is chosen for particle splitting (see Figure 3). As far as an LPBF process is concerned, such a choice seems appropriate since the melt pool region is formed under the laser beam, and this is where the most challenging physics resides. The size of this frame can be sensitive to the configuration of the LPBF process, including the laser power, the beam radius, the powder bed geometry, and so on. Choosing proper dimensions for the refinement frame ensures that important areas (e.g., melting and re-solidification zones) are always discretized with the finest resolution available.  
Figure 3: Schematic illustration of the particle refinement approach: (**Left**) demonstrating the situation before and after splitting, where particle \(p\) meets the refinement criterion and is split into 4 smaller particles via a square splitting pattern; (**Right**) showing how the proposed refinement strategy works for an LPBF application. The initial refinement frame has a width of \(4R\), where \(R\) is the laser beam radius. Particles with lower mass are depicted in blue and with smaller size.  
In this work, we proposed using an initial refinement frame with a width of \(4R\) centered at the laser focal point, where \(R\) is the laser beam radius. This frame moves at the same speed as the scanning laser. Only one stage of refinement is permitted here, meaning a refined particle will never be refined or coarsened again. Figure 3 displays a graphical abstract of the proposed particle refinement approach.  
A second improvement of the present work stems from optimizing the nearest neighbor search algorithm within a multi-resolution domain. In particle-based simulations, using an efficient way to determine and organize neighbor particles is of vital importance. Previous multi-resolution SPH studies such as [33] rely on a cell-list structure where the size of each cell is twice the \"maximum\" smoothing length in the simulation. While this strategy is straightforward and ensures the completeness of particle interaction globally, the neighbor list of a particle would involve redundant particles in refined sub-domains. This paper, however, addresses this issue by reducing the cell size throughout the refined regions according to the \"current\" smoothing length instead of the \"maximum\" smoothing length. Therefore, a significant amount of unnecessary particle interactions in the refined sub-domains are avoided, and the computational performance of the code can be further enhanced. Figure 4 illustrates this optimization algorithm, where the choice of \(h_{r}<h_{u}\) provides a more efficient neighbor search.