## 2 Materials and Methods  
In this work, thermomechanical simulations were conducted to analyze the effects of the AM deposition patterns and travel speeds on residual stress and distortion in the deposition. Thermal gradients induced by localized heat could generate residual stress and distortion. In thermal analysis, the heat transfer from conduction, convection, and radiation has been considered in the present numerical model as Equations (1)-(3). \[C_{p}\rho\frac{dT}{dt}=\frac{\partial}{\partial x}\bigg{(}\kappa\ \frac{dT}{dx}\bigg{)}+\frac{ \partial}{\partial y}\bigg{(}\kappa\frac{dT}{dy}\bigg{)}+\frac{\partial}{ \partial y}\bigg{(}\kappa\frac{dT}{dy}\bigg{)}+Q, \tag{1}\]  
where \(C_{p}\) is the heat capacity; \(\rho\) is the density; and \(\kappa\) is the thermal conductivity. \[q_{convection}=h(T-T_{amb}) \tag{2}\]  
\[q_{radiation}=\varepsilon\sigma\Big{(}T^{4}-T^{4}_{amb}\Big{)} \tag{3}\]Here, \(h\) is the convection coefficient, \(\varepsilon\) is the emissivity and \(\sigma\) is the Stephan-Boltzmann constant. For the heat source modeling, the double ellipsoidal model proposed by [PERSON]'s [32] was used for WAM deposition. The heat energy is applied to the wire as a volumetric heat source, which is defined as follows:  
\[Q_{f}=\frac{6\sqrt{3}f_{f}Q}{a_{f}bc\pi\sqrt{\pi}}\exp\left(-\frac{3x^{2}}{a_{ f}^{2}}-\frac{3y^{2}}{b^{2}}-\frac{3z^{2}}{c^{2}}\right) \tag{4}\]  
\[Q_{r}=\frac{6\sqrt{3}f_{f}Q}{a_{r}bc\pi\sqrt{\pi}}\exp\left(-\frac{3x^{2}}{a_{ r}^{2}}-\frac{3y^{2}}{b^{2}}-\frac{3z^{2}}{c^{2}}\right) \tag{5}\]  
\(a_{f}\) and \(a_{r}\) are parameters to specify the front and the rear size, respectively. \(Q\) is the AM deposition energy. Table 1 shows the heat source parameters used in the study, which are based on the previous reference [35]. A thermomechanical constitutive equation is employed in this work. The isotropic material and the small elastic deformation are assumed in the hypoelastic formulation. The strain is decomposed into elastic, plastic, and thermal parts as follows:  
\[\varepsilon^{tot}=\varepsilon^{E}+\varepsilon^{P}+\varepsilon^{Th} \tag{6}\]  
where \(\varepsilon^{tot}\) is the total strain; \(\varepsilon^{E}\) is the elastic strain; \(\varepsilon^{P}\) is the plastic strain; and \(\varepsilon^{Th}\) is the thermal strain. In the hypoelastic formulation, the trial stress is calculated using the generalized Hooke's Law as Equation (7). \[\sigma_{ij}=C_{ijkl}^{e}\ \varepsilon^{tot} \tag{7}\]  
Once the trial stress is calculated, the stress is relaxed such that the final stress satisfies the yield criterion using radial return mapping. 6061-T6 Al alloy is widely utilized in the aerospace and automotive industries due to its excellent performance. In this work, it was chosen as a material for both the substrate and the wire. Such a choice was made for its application of AM in maintenance and net-shape manufacturing. Figure 1 shows the material properties used in the present study. The values of the properties are from the reference of [36]. In the present study, four deposition patterns are examined as shown in Figure 2: alternate, in-out spiral, out-in spiral, and raster. Note that the alternate pattern has the interval between the deposition. In Figure 2a, the deposition sequence of the alternate pattern is illustrated with the line number. For example, \"L#1\"and \"L#2\" indicate \"Line #1\" and \"Line#2\", respectively. In the case of the alternate pattern, the solid lines are deposited first (i.e., from L#1 to L#n), and then the dashed lines are deposited between the solid lines, as the line numbers indicate in Figure 2a. The paths of the out-in and in-out deposition are the contour, while the alternate and raster follow line paths. The alternate and the raster deposition are discontinuous, while the paths of the in-out and the out-in are continuous. Different from the raster, the alternate deposition strategy leads to more lag time between the nearest deposition paths.