## 6 Numerical study on the error and applications to planar-symmetric problems
### Two-phase solidification problem  
The planar-symmetric solidification process of aluminium in a case in which the heat conduction occurs in both the solid and the liquid phases is considered. The one-dimensional domain is \(\Omega=\left[0,\ell\right[,\) with \(\Omega_{\mbox{\tiny sol}}=\left[0,a[\,\ \Omega_{\mbox{\tiny liq}}=\left]a,\ell \right[,\) and \(\Gamma_{\mbox{\tiny tan}}=\left\{a\right\}.\) The boundary conditions are \(T\left(0,t\right)=T_{0}<T_{\mbox{\tiny tan}}\) and \(T\left(\ell,t\right)=T_{i}>T_{\mbox{\tiny tan}}\) ; both phases are initially at the temperature \(T_{i}.\)  
Under these conditions, no exact analytical solution is available. Then, [PERSON]'s solution for the case in which the domain is unbounded on the side of positive \(x\) (i.e. when \(\ell\) tends to infinity) and the  
Figure 16: Particular from Figure 15.  
Figure 17: Error in temperature field versus element size for embedded-discontinuity FEM. PSS solutions are used to compare the numerical results. [PERSON]'s solution is exact in the semi-infinite domain; therefore, in the finite domain it provides a good approximation only in the earliest instants of the melting process. On the other hand, the PSS solution is expected to provide a better and better approximation as the system approaches the steady state. For the two-phase problem described above, the interface position calculated through [PERSON]'s analytical solution is  
\[x_{*}^{\text{Neumann}}=a\sqrt{1+2\gamma\frac{k_{\text{sol}}}{\rho c_{\text{sol }}a^{2}}}t\, \tag{61}\]  
where \(\gamma\) gamma is the positive root of  
\[\frac{\exp\left(-\gamma/2\right)}{\text{erf}\sqrt{\gamma/2}}=\frac{k_{\text{ liq}}}{k_{\text{sol}}}\frac{\sqrt{\eta}\left(T_{1}-T_{\text{train}}\right)\exp \left(-\eta\,\gamma/2\right)}{\left(T_{\text{train}}-T_{0}\right)\text{erfc} \sqrt{\eta\,\gamma/2}}+\frac{L\sqrt{\pi\,\gamma/2}}{c_{\text{sol}}\left(T_{ \text{train}}-T_{0}\right)}\,, \tag{62}\]  
being \(\eta=\left(k_{\text{sol}}/c_{\text{sol}}\right)/\left(k_{\text{liq}}/c_{\text {liq}}\right)\) the solid-to-fluid thermal diffusivity ratio. The PSS approximation is developed analogously to the one-phase case of Section 6.1. From Eq. (52) we obtain linear temperature fields in the solid and liquid phases, and the evolution of the melting front is obtained (in an implicit form) as  
\[\frac{t}{\rho L}=\frac{\left(x_{*}^{\text{PSS}}\right)^{2}-a^{2}}{2\chi}-\frac {\chi_{z}\ell\left(x_{*}^{\text{PSS}}-a\right)}{\chi^{2}}-\frac{\chi_{z}\zeta _{z}\ell^{2}}{\chi^{3}}\log\frac{\chi x_{*}^{\text{PSS}}-\chi_{z}\ell}{\chi a- \chi_{z}\ell}\,, \tag{63}\]  
where the constants \(\chi_{1}=k_{\text{sol}}\left(T_{\text{train}}-T_{0}\right)\), \(\chi_{2}=k_{\text{liq}}\left(T_{1}-T_{\text{train}}\right)\), and \(\chi=\chi_{1}+\chi_{2}\) are introduced for the sake of conciseness. The numerical data used in the example are reported in Table 1 and the resulting Stefan number is  
\[\alpha=\frac{L}{\frac{c_{\text{liq}}+c_{\text{liq}}}{2}\left(T_{1}-T_{0}\right)} =17.3\,. \tag{64}\]  
As it can be evinced from Figure 18, the interface positions evaluated by the XFEM and the two analytical models are close in the initial time instants. Afterwards, the numerical solution and the PSS approximation converge to the steady state, whereas [PERSON]'s solution (which matches different boundary conditions) diverges. However, in the initial instants, when the position of thermostat \(T_{1}\) makes little difference, [PERSON]'s solution should be considered as reference, since it includes thermal inertia, contrarily to the PSS solution. The position of the phase-interface in such initial instants is represented in Figure 19, where the better agreement of the numerical simulation to [PERSON]'s results is highlighted. The temperature fields within the domain at some time instants are plotted in Figure 20. Initially, when the effects of thermal inertia are larger, the PSS (piecewise linear) temperature field poorly approximates the expected physical behaviour, which is more suitably represented by [PERSON]'s solution.