## 3 Methodology
### Finite Element Method for X65 Pipeline  
ANSYS (16.1) Mechanical APDL was used for the FEM. The considered material was an API 5L X65 grade steel pipeline, and the pipe model had an external diameter (D\({}_{\text{e}}\)) of 300 mm, a wall thickness (t) of 10 mm, and a pipe length (L) of 2000 mm. A quarter of the symmetrical pipe was modelled with a corrosion defect to reduce the needed computational resources. Figure 1 shows the dimension of the quarter pipe model.  
The corrosion defect was rectangular with varying defect depth, length, and width. The pipe was subjected to external longitudinal compressive stress. The range of parameters selected for this study is shown in Table 2.  
A pipe end cap was modelled for the application of longitudinal compressive stress to ensure more accurate FEA results [13]. Figure 2 shows the internal pressure applied on the internal surfaces, while longitudinal compressive stress was applied on the surface of the end cap. The loads were incrementally applied using timesteps through ramped loading in ANSYS. Longitudinal compressive stress was incrementally applied in the first timestep. Internal pressure was then incrementally applied in the second timestep while maintaining the load in the first timestep.  
The pipe body was brick-meshed with a SOLID185 element, and the pipe end cap was free-meshed with a SOLID186 element. The corrosion defect depth was modelled with three layers of element, and the thickness of the pipe was modelled with six layers of element for more accurate FEA [22]. To prevent unwanted motion when longitudinal compressive stress was applied, the model was constrained in three nodes near the end cap, as denoted by the triangle symbol in Figure 3[20; 23; 24]. Preliminary analysis showed negligible differences between the number of constrained nodes and their position (in the region at the end of the pipe model), with solution convergence. The density of element for the pipe model was distributed based on the region of interest in this study. The density at corrosion defect was the highest, and the element density gradually decreased away from the corrosion defect, as shown in Figure 3.  
\begin{table}
\begin{tabular}{c c} \hline \hline
**Parameters** & **Range** \\ \hline Defect Depth, \(d/t\) & 0.2, 0.4, 0.5, 0.6, 0.8 \\ Defect Length, \(l/D\) & 0.2, 0.4, 0.8, 1.2, 1.8 \\ Defect Width, \(w/t\) & 2, 6, 10, 14, 18 \\ Longitudinal Compressive Stress, \(\sigma_{c}/\sigma_{y}\) & 0.2, 0.4, 0.5, 0.6, 0.8, 1.0 \\ \hline \hline \end{tabular}
\end{table}
Table 2: Geometric parameters for corrosion defect and load applied to the corroded X65 pipeline.  
Figure 1: Dimension of the model.  
The true stress-strain curve of an API 5L X65 pipeline, as shown in Figure 4, was used to define its material property in ANSYS. Static, non-linear, structural analysis (Newton-Raphson) was used in the FEM to account for the non-linearity of the material.  
Figure 3: Pipe model meshed with elements.  
Figure 2: Internal pressure and longitudinal compressive stress applied in the model.  
The pipe end cap was considered to be rigid body to prevent deformation when longitudinal compressive stress was applied. A high stiffness material property was used for the pipe end cap. Table 3 lists the mechanical properties of the pipe body and end cap.  
The failure criterion adopted in this study was based on true ultimate tensile strength (UTS) of API 5L X65, as the criterion provides more accurate results [17; 20]. Pipe failure occurs when the von Mises stress reaches the reference stress (UTS) across the entire wall thickness, resulting in plastic collapse of the pipe.