## 4 Review of XFEM for Stefan problem
### XFEM approximation
(31) can be rewritten in matrix form as  
\[\sum_{i=1}^{n}N_{i}\left(\mathbf{x}\right)=1,\ \ \ \mathbf{x}\in\Omega\,. \tag{21}\]3  
where the matrix \(\overline{\mathbf{N}}\left(\mathbf{x},t\right)=\left[N_{1}\left(\mathbf{x} \right),\ldots,N_{n}\left(\mathbf{x}\right),\psi_{1}\left(\mathbf{x},t\right) \ldots,\psi_{n_{A}}\left(\mathbf{x},t\right)\right]\) collects the standard (time-independent) and the enriched (time-dependent) shape functions, and the vector \(\overline{\mathbf{T}}\left(t\right)=\left[T_{1}\left(t\right),\ldots,T_{n} \left(t\right),a_{1}\left(t\right),\ldots,a_{n_{A}}\left(t\right)\right]^{T}\), the standard and additional nodal degrees of freedom. For all that is discussed above, this choice of enrichment function, initially proposed by [PERSON] et al. [16], seems the most consistent with the viewpoint of the XFEM. A different XFEM model for Stefan problem is proposed for the one-dimensional case in Reference [15], where Heaviside function is chosen for the enrichment and the device in Eq. (29) is not used, so that \(\psi_{i}\left(\mathbf{x},t\right)=N_{i}\left(\mathbf{x}\right)H\left(\phi \left(\mathbf{x},t\right)\right).\) This approach does not guarantee a priori the continuity of the temperature field across the interface, which is then (weakly) enforced. In any case, the continuity can be restored exactly only in one-dimensional cases. The choice of Heaviside function, which is natural in the case of strong discontinuities (we remind that the XFEM has been initially and intensively developed for fracture mechanics, see References [50; 51] and the review in Reference [52]), seems complicated in the case of the gradient discontinuity required by [PERSON] problem. Moreover, with those enrichment functions, the parameters \(T_{i}\) lose the meaning of nodal temperatures, since one has that \(T\left(\mathbf{x}_{i},t\right)=T_{i}\left(t\right)+H\left(\phi\left(\mathbf{x }_{i},t\right)\right)a_{i}(t)\), which is in general different from \(T_{i}\left(t\right).\) This issue could be cured by using the idea in Eq. (29) and rewriting the enrichment as \(\psi_{i}\left(\mathbf{x},t\right)=N_{i}\left(\mathbf{x}\right)\left(H\left( \phi\left(\mathbf{x},t\right)\right)-H\left(\phi\left(\mathbf{x},t\right) \right)\right).\)  
Operatively, in the XFEM the usual FE mesh is firstly produced and then, by considering the location of the discontinuities, a few nodal degrees of freedom are added. Only the nodes whose support is intersected by the interface are enriched, as shown in \[\sum_{i=1}^{n}N_{i}\left(\mathbf{x}\right)=1,\ \ \ \mathbf{x}\in\Omega\,. \tag{21}\]4 For implementing this condition, [PERSON] et al. [17] suggest to enrich a node if at least one of the element edges containing it is intersected by the interface (this criterion hold of course only in the case of finite elements with no internal nodes). Since the interface evolves with time, the set of enriched elements and nodes is also modified during a numerical simulation. At a given time instant, it is possible to distinguish three types of elements, as depicted in \[\sum_{i=1}^{n}N_{i}\left(\mathbf{x}\right)=1,\ \ \ \mathbf{x}\in\Omega\,. \tag{21}\]5 (i) elements with all nodes enriched, (ii) elements with only some nodes enriched, and (iii) elements with no enriched nodes. The first group is formed by the elements intersected by the phase-transition interface and their union is \(\Omega_{{}_{\Gamma}}\). In the region \(\Omega_{{}_{\Gamma}}\) the enrichment is fully considered and conformity is ensured, as the enrichment is multiplied by a partition of unity, see Eq. (27). The union of the elements in the second group is \(\Omega_{{}_{A}}\setminus\Omega_{{}_{\Gamma}}\). The treatment of these elements is discussed in detail in Section 6.5; here, it is noted that they do not have full enrichment since the subset \(A\) of the standard shape functions does not constitute a full partition of unity in this region.