$$\rightleftharpoonup{xx}$$
$$\longleftharp{xx}$$,
$$\longrightharp{xx}$$,
A series of FE simulations were run using different combinations of arc travel length, arc advance speed, and net energy input rate. For the training set, the range of values used for arc travel length was 40 mm, 50 mm, 60 mm, 70 mm, and 80 mm. The range of values used for arc advance speed was 2 mm/s, 2.5 mm/s, 3 mm/s, 3.5 mm/s and 4 mm/s. The range of values used for the net energy input rate was 1000 W, 1500 W, 2000 W, 2500 W, and 3000 W. For the test set, the range of values used for arc travel length was 40 mm, 50 mm, 60 mm, 70 mm, and 80 mm. The range of values used for arc advance speed was 2.25 mm/s, 2.75 mm/s, 3.25 mm/s, and 3.75 mm/s. The range of values used for net energy input rate was 1250 W, 1750 W, 2250 W, and 2750 W. Longitudinal stresses along the BD line of those 205 simulations are collected and shown in Figure 2. This result was previously published in25. In particular, the case study results are employed in that study to substantiate the efficacy of the workflow. The present research extends beyond prior investigations by providing a comprehensive explanation of the specific settings applied in the welding simulation and detailing the Python scripting methodology employed for the general welding simulation.
The developed ANN model was applied to do prediction on the test set. The discrepancy between the model prediction and the FE simulation is shown in Figure 3. Out of 1680 test points, the majority of differences (759 occurrences) between the finite element analysis simulated and ANN predicted stress values fall within the 0-2 MPa range, accounting for 45.2% of the data. The frequency decreases as the difference increases, with very few data points showing differences greater than 10 MPa. A box plot is shown in Figure 4 to show the distribution of absolute discrepancies between the simulated stress and the predicted stress for different levels of simulated stress. Each box represents the interquartile range of the residuals within a specific bin of simulated stress levels, with the line inside the box indicating the median value. The histogram on the secondary y-axis shows the number of training data points within each stress level bin, providing additional context about the data distribution used for training the model. As shown in the figure, stress level bins with fewer training data points tend to exhibit higher maximum discrepancies in the test dataset. The performance in these regions could be potentially improved by increasing the amount of training data available for these stress levels.
Mean Square Error (MSE) was utilized to quantify the predictive performance, and the expression for MSE performance indicators is:

where yi is the stress value before reversing standardization for the i-th sample point,
is the predicted stress value before reversing standardization for the i-th sample, and n is the total number of samples.
The ANN's prediction of stress was very close to the FE simulation results, with an MSE of 0.0024. Predictions on four selected test cases are shown in Figure 5; the heat input for those four test cases are 333 J/mm, 538 J/mm, 692 J/mm, and 1222 J/mm, respectively. Among all these four cases, the ANN predictions show good agreement with the FE simulation results in general. However, in scenarios when the welding speed is 2.25 mm/s with a travel length of 50 mm and a net energy input rate of 2750 W or when the welding speed is 3.75 mm/s with a travel length of 40 mm and a net energy input rate of 1250 W, relatively big discrepancies are observed at the bottom of the BD line (near 17 mm depth). These discrepancies may be attributed to the increased complexity of the rules governing this region, resulting in a more intricate manifold within these specific parameter space regions. A possible solution would be to increase the density of the training dataset in this area.

Figure 1: Workflow. The proposed workflow has four steps (indicated in blue blocks): baseline FE model building, scripting, data generation, and surrogate model development. Orange blocks represent the input of each step, and green blocks represent the output of each step. Please click here to view a larger version of this figure.

Figure 2: Generated dataset. A total of 205 sets of longitudinal stress data are illustrated, each corresponding to a unique combination of travel length, net energy input rate, and welding speed. Within each set, 20 data points are plotted for different nodes along the BD line. To differentiate between sets, each one is represented by a different color, which corresponds to its net heat input rate. This value can be calculated by dividing the net energy input rate by welding speed. This figure has been modified from25. Please click here to view a larger version of this figure.

Figure 3: Frequency of the discrepancy between FE simulation results and ANN predictions. The differences between the FE simulation results and ANN predictions in the test dataset are categorized into 10 levels. The in-plot annotations indicate the frequency and percentage of occurrences for each level of difference in the test cases. Please click here to view a larger version of this figure.

Figure 4: Distribution of average absolute residuals and training dataset across different stress levels. The box plot describes the distribution of absolute discrepancies between the simulated stress and the predicted stress for different levels of simulated stress. The orange line inside each box represents the median, indicating the midpoint of the absolute discrepancies. The height of each box corresponds to the interquartile range, which spans the middle 50% of the data (from the 25th to the 75th percentile), reflecting the variability of the discrepancies. The whiskers extend from the box to show the minimum and maximum values of discrepancy. The blue histogram shows the number of training data points corresponding to each stress level in the training dataset. Please click here to view a larger version of this figure.

Figure 5: Comparison between simulation results and ANN predicted results. Four test cases are shown in this figure, with (A) welding speed is 3.75 mm/s, the travel length is 40 mm, and the net energy input rate is 1250 W; (B) welding speed is 3.25 mm/s, the travel length is 60 mm, and the net energy input rate is 1750 W; (C) welding speed is 3.25 mm/s, the travel length is 50 mm, and the net energy input rate is 2250 W; and (D) welding speed is 2.25 mm/s, the travel length is 50 mm, and the net energy input rate is 2750 W. The most notable discrepancy across all test cases is highlighted with a blue box, showing a difference of 19.4 MPa at a depth of 17 mm from the top surface in the test case (D). Please click here to view a larger version of this figure.
Table 1: Geometry information for weld specimen, refinement mesh region, and bead. The length, width, and depth of the rectangular weld specimen and refinement mesh region are listed in the table. The dimensions of the weld bead are illustrated with a sketch. In the modeling process, the width should be halved since only half of the model has been created. Please click here to download this Table.
Table 2: Material properties of AISI 316LN14. Density and Poisson's Ratio are treated as temperature-independent, and the other physical properties are treated as temperature-dependent. Please click here to download this Table.
Table 3: Plastic mechanical properties of AISI 316LN24. Mechanical properties of AISI 316LN stainless steel as a function of temperature; yield stress at zero plastic strain; kinematic hardening parameters (C1, Gamma 1, C2, Gamma 2); isotropic hardening parameter (Q-inf); and hardening parameter (b). Please click here to download this Table.
Supplementary Coding File 1: Create_input_files.py Please click here to download this File.
Supplementary Coding File 2: Run_thermal Please click here to download this File.
Supplementary Coding File 3: DFLUX.for Please click here to download this File.
Supplementary Coding File 4:Run_Mechanical Please click here to download this File.
Supplementary Coding File 5: extract_data.py Please click here to download this File.
Supplementary Coding File 6: ANN_development.py Please click here to download this File.