## 3 Numerical Examples
### Example 1  
This example is solved by three methods, analytic method, CFEM, and XFEM. The electric potential in the bubble and the liquid nitrogen can be obtained by the method of separation of variables in spherical coordinates [20].  
\[\begin{array}{l}\varphi_{\text{air}}=-\frac{3\varepsilon_{l}}{\varepsilon_{ a}+2\varepsilon_{l}}E_{0}rsin\theta+6\\ \varphi_{\text{liquid}}=-\Big{(}1-\frac{\varepsilon_{a}-\varepsilon_{l}}{ \varepsilon_{a}+2\varepsilon_{l}}\frac{R^{3}}{r^{3}}\Big{)}E_{0}rsin\theta+6 \end{array} \tag{7}\]  
where \(\varphi_{\text{air}}\) is the electric potential in the bubble, \(\varphi_{\text{liquid}}\) is the electric potential in liquid nitrogen, \(E_{0}=-\frac{l}{d}=-\frac{8}{25}\) V/mm is the electric field intensity between two electrodes, \(R\)  
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Point** & **Mesh-a** & **Mesh-b** & **Mesh-c** & **Mesh-d** \\ \hline (7.446, 4.482) & 7.4356 & 7.4361 & 7.4362 & 7.4362 \\ (5.817, \(-4.303\)) & 4.6215 & 4.6212 & 4.6211 & 4.6211 \\ (7.141, 4.514) & 7.4456 & 7.4461 & 7.4462 & 7.4462 \\ (2.405, \(-4.024\)) & 4.7075 & 4.7073 & 4.7072 & 4.7072 \\ (3.319, \(-1.273\)) & 5.5895 & 5.5893 & 5.5890 & 5.5890 \\ (1.553, 1.922) & 6.6287 & 6.6295 & 6.6299 & 6.6301 \\ (7.324, \(-9.541\)) & 2.9463 & 2.9462 & 2.9461 & 2.9461 \\ (3.412, 3.803) & 7.2199 & 7.2205 & 7.2208 & 7.2208 \\ (5.218, \(-3.169\)) & 4.9840 & 4.9838 & 4.9837 & 4.9837 \\ (6.383, 10.566) & 9.3816 & 9.3817 & 9.3817 & 9.3817 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Comparison of 10 nodal electric potentials of four kinds of meshes.  
Figure 4: Four types of meshes. (**a**) Coarser, (**b**) Coarse, (**c**) Fine, (**d**) Finer.  
From the distribution diagrams of the enrichment function imposed on the element E, the characteristics of enrichment function can be summarized as follows:  
1. The values on nodes of enrichment elements and inside the conventional elements are zero.
2. Meanwhile, the values inside the enrichment elements are positive.
3. The maximum of the values is located on the interface.  
Based on the above analysis, the electric potential of the axisymmetric field model is obtained by programming with XFEM. An enlarged view of the electric potential around the bubble is shown in Figure 8.  
Comparing Figure 8a,b, the calculation results between XFEM and CFEM have little difference. The electric potentials of all XFEM nodes are selected for comparison. The relative errors of XFEM and analytic solutions, as well as the relative errors of XFEM and CFEM are shown in Table 2.  
Figure 8: Electric potential distribution of a bubble in liquid nitrogen. (**a**) CFEM, (**b**) XFEM.  
Figure 7: Front view of the enrichment function diagram of chosen element E based on triangular elements.  
The relative error is shown in Equation (9).  
\[Relative\ Error=\frac{\varphi-\varphi_{\text{XFEM}}}{\varphi}\times 100\%, \tag{9}\]  
The error is related to the algebraic difference of point to point of two functions. \(\varphi\) is the electric potential of a point obtained by the analytic method or CFEM, and \(\varphi_{\text{XFEM}}\) is the electric potential of the same point obtained by XFEM. The maximum relative error is the largest error among all the nodes. The average relative error is the average of the norm of relative errors at all nodes.  
The relative errors are small, which can verify the calculation results of XFEM are reliable.