In order to obtain the stress of embedded irregular defect in the side frame of railway freight car, an entire flow for stress analysis of the casting defect based on industrial computed tomography (CT) is designed. To analyze the stress of arbitrary shape defect, we improve the extended finite element method (XFEM) used in stress analysis by using the level set function (LSF) in Chan-Vese (C-V) method to constitute enrichment function of XFEM. A comparison between conventional finite element method (CFEM) and improved XFEM is made to verify th...