## 2 Methodology  
SAWs are elastic waves that propagate along the surface of a solid medium and decay exponentially with depth. They arise from the complex interaction and superposition of bulk waves (longitudinal and shear waves), with their velocity being primarily governed by the shear wave component due to its dominant contribution to surface displacement. The shear wave velocity \(c_{S}\), in turn, is determined by the relationship between the effective elastic modulus and the density of the material:  
\[c_{S}=\sqrt{\frac{E}{2\rho(1+\
u)}} \tag{1}\]  
where \(E\), \(\rho\), and \(\
u\) denote the elastic modulus, density, and Poisson's ratio of the material, respectively. For an isotropic and homogeneous elastic half-space, the classical SAW velocity \(c_{R0}\) can be approximated by the following [34]:  
\[c_{R0}=\frac{0.87+1.12\
u}{1+\
u}c_{S}=\frac{0.87+1.12\
u}{1+\
u}\sqrt{\frac{ E}{2\rho(1+\
u)}} \tag{2}\]  
Porosity, as a structural characteristic, affects both the elastic modulus and the density of the material. As the porosity increases, more void space is introduced within the material matrix, thereby reducing the overall stiffness and mass per unit volume. Consequently, the acoustic wave velocity, including the SAW velocity, is diminished. The relationship between porosity and effective density \(\rho_{P}\) can be modeled as follows:  
\[\rho_{P}=\rho_{0}(1-P) \tag{3}\]  
where \(\rho_{0}\) is the density of the fully dense matrix material, and \(P\) is the volumetric porosity of the material. To account for the effect of porosity on the elastic modulus, several micromechanical models have been developed. In this study, we adopt a simplified theoretical model based on the following assumptions: the matrix material is isotropic, homogeneous, and continuous; the pores are idealized as rigid spherical voids of radius; and the inter-pore distance is sufficiently large to neglect ultrasonic wave interactions between pores. Under these conditions, the effective elastic modulus \(E_{P}\) can be approximated by the following [35]:  
\[E_{P}=E_{0}(1-aP) \tag{4}\]  
where \(E_{0}\) is the elastic modulus of the dense matrix material, and \(a\) is a material-dependent constant reflecting the sensitivity of modulus reduction to porosity. In this study, \(a\) is taken as 2.5. By combining Equations (2)-(4), the dependence of the SAW velocity \(c_{R0}\) on porosity \(P\) can be derived:  
\[c_{R0}=\frac{0.87+1.12\
u}{1+\
u}\sqrt{\frac{E_{0}(1-aP)}{2\rho_{0}(1+\
u)(1- P)}}=\xi\times\sqrt{\frac{1-aP}{1-P}} \tag{5}\]  
where \(\xi\) is a constant that encapsulates the intrinsic material parameters of the fully dense matrix, including the elastic modulus, density, and Poisson's ratio. As shown in Figure 1, a pulsed grating laser source is directly illuminated onto the surface of the AM specimen, inducing narrowband SAWs with a fixed wavelength \(\lambda_{s}\) propagating in opposite directions. A detection probe is positioned in close proximity to the laser excitation region to acquire the SAW signal in real time. The received signal is subjected to frequency domain analysis using the fast Fourier transform (FFT), enablingthe extraction of its central frequency \(f\). Based on the fundamental wave relation, the SAW velocity \(c_{R1}\) is calculated as follows:  
\[c_{R1}=\lambda_{s}\times f \tag{6}\]  
This measurement strategy offers several key advantages: First, it is entirely non-contact in nature, relying on optical excitation and detection. Second, since the velocity estimation depends solely on the wavelength and frequency of the local SAW field, and not on the precise spatial separation between the excitation and detection points, the method exhibits strong robustness and high repeatability. These characteristics simplify the experimental setup and alignment procedures and make the technique particularly well suited for integration into online defect detection systems during the AM process.