Simulations of the welding process for butt joints using finite element analysis (FEA) of the effect of porosity are presented. The metal used was aluminium alloy (grade 2024), and the filler material was alloy ER5356. The simulations were performed using the commercial software ANSYS, considering a double ellipsoid heat source, temperature-dependent material properties, material deposits, mechanical analysis, transient heat transfer, and defects (porosity). In this study, the FEA simulations were constructed for two types of heat source (singleand double-ellipsoid) used in gas tungsten arc welding (GTAW), and the calculated residual stress results were compared with the experimental values. Two double ellipsoid models were constructed for cases with and without porosity. The porosity was measured by three-dimensional (3D) computed tomography (CT), and the size and location of pores were mapped onto the weld bead created by the birth-and-death technique.