# Location Detection and Numerical Simulation of Guided Wave Defects in Steel Pipes
## 2 Theoretical Basis  
### Semi-Analytic Finite Element Algorithm for Steel Pipes  
The semi-analytical finite element method is a numerical calculation method which combines the finite element method and the semi-analytical method to solve the dispersion curve of UGWs in steel pipes. The displacement, strain, and stress vectors at any point in the pipeline are expressed as \(\mathbf{u}\), \(\varepsilon\), and \(\mathbf{\sigma}\). According to the principle of virtual work, the weak form of the wave control equation of a free-boundary pipeline is as follows:  
\[\int\limits_{V}\delta\mathbf{u}^{\text{T}}\cdot\mathbf{i}\text{d}V+\int\limits_{V} \delta\varepsilon^{\text{T}}\cdot\mathbf{\sigma}\text{d}V=0 \tag{1}\]  
In the formula, \(\mathbf{u}\) is displacement; \(\varepsilon\) is strain; and \(\mathbf{\sigma}\) is stress, which can be expressed as  
\[ \begin{cases}\mathbf{u}(r,\theta,z,t)=(u_{r}&u_{\theta}&u_{z})^{\text{T}}\\ \varepsilon(r,\theta,z,t)=(\varepsilon_{r}&\varepsilon_{\theta}&\varepsilon_{ z}&\gamma_{\theta z}&\gamma_{r\theta})^{\text{T}}\\ \mathbf{\sigma}(r,\theta,z,t)=(\sigma_{r}&\sigma_{\theta}&\sigma_{z}&\tau_{\theta z }&\tau_{r\theta})^{\text{T}}\end{cases}  \tag{2}\]The stress and strain relationship is as follows:  
\[\sigma=\mathbf{C}\varepsilon\]  
In the formula, \(\mathbf{C}\) represents the material stiffness matrix. The correlation between strain and displacement is as follows:  
\[\left\{ \begin{array}{l}\varepsilon_{r}=\frac{\dot{a}u_{r}}{\partial r}\\ \varepsilon_{\theta}=\frac{u_{r}}{r}+\frac{1}{r}\frac{\dot{a}u_{\theta}}{ \partial\theta}\\ \varepsilon_{z}=\frac{\dot{a}u_{z}}{\partial z}\\ \gamma_{\theta z}=\frac{1}{r}\frac{\dot{a}u_{\theta}}{\partial\theta}+\frac{ \dot{a}u_{\theta}}{\partial z}\\ \gamma_{rr}=\frac{\dot{a}u_{r}}{\partial z}+\frac{\dot{a}u_{\theta}}{\partial r }\\ \gamma_{r\theta}=\frac{1}{r}\frac{\dot{a}u_{r}}{\partial\theta}+\frac{\dot{a} u_{\theta}}{\partial\theta}-\frac{u_{\theta}}{r}\end{array} \right. \tag{3}\]  
The finite element method is used to discretize the radial direction of the pipeline. The number of node degrees of freedom at all units is three, and the node displacement \(\mathbf{u}(r,\theta,z,t)\) is as follows:  
\[\mathbf{u}(r,\theta,z,t)=\mathbf{N}(r)\mathbf{U}^{i}\exp(\mathrm{i}(kz+n\theta-\omega t)) \tag{4}\]  
In the formula, the displacement vector at the element \(j\) node is expressed as \(\mathbf{U}^{i}\), \(\mathbf{N}(r)\): a node shape function. For the first-order bar element, \(\mathbf{U}^{j}\) is the \(6\times 1\) column vector and \(\mathbf{N}(r)\) is a matrix with three rows and six columns. Substituting (4) into (3), the strain vector is expressed as follows:  
\[\varepsilon=(\mathbf{B}_{1}+\mathrm{i}n\mathbf{B}_{2}+\mathrm{i}k\mathbf{B}_{3})\mathbf{U}^{j }\exp(\mathrm{i}(kz+n\theta-\omega t)) \tag{5}\]  
In the formula, \(\mathbf{B}_{1}\), \(\mathbf{B}_{2}\), and \(\mathbf{B}_{3}\) are all six rows and six columns with their parameters. Substitute Formulas (2), (4) and (5) into (1) to obtain the wave control equation of the unit \(j\):  
\[\left(\mathbf{K}_{1}^{j}+\mathrm{i}n\mathbf{K}_{2}^{j}+\mathrm{i}k\mathbf{K}_{3}^{j}+n^{2 }\mathbf{K}_{4}^{j}+nk\mathbf{K}_{5}^{j}+k^{2}\mathbf{K}_{6}^{j}-\omega^{2}\mathbf{M}^{i} \right)\mathbf{U}^{i}=0 \tag{6}\]  
\[\left\{