# Finite Element Method vs Extended Finite Element Method (FEM vs XFEM)

What are main differences between FEM and XFEM? When should we (not) use XFEM intead of FEM and vice versa? In other words, when I meet a new problem, how I can know to use which one of them?

-
Most of the times I've encountered XFEM, it was to deal with discontinuities related to crack propagation and fracturing in solid mechanics. I haven't really seen it used outside of this one application though. –  Paul Feb 12 '14 at 16:12
Actually, there still are many other fields also using XFEM to solve. That's the reason why I need to know the way to recognize this method whenever I start to solve a problem. –  Oliver Feb 13 '14 at 7:41

The Finite Element Method (FEM) is the parent method which has inspired many, many other methods and methods which are actually FEM but pretend not to be.

In the finite element method, "shape functions" are used to provide an approximation space so that the solution can be represented by a vector. In the classical FEM, these shape functions are polynomials.

In the Extended Finite Element Method (XFEM), additional "enrichment" functions are used to approximate the solution in addition to the polynomial shape functions. These enrichment functions are chosen to have properties that the solution is known to follow.

The most obvious XFEM enrichment functions are power functions introduced at cracks sharp corners to represent the singularities in the solution gradient (i.e., the singularity in the stress for solid mechanics problems). The XFEM can be used for other enrichment functions and other solution domains (notably heat transfer), but the name synonymous with fracture analysis.

The distinction between various methods -- is this XFEM or not?, etc. -- is tricky and subtle and unimportant.

As for which to use, XFEM sees very little practical use. There are a handful of applications in real finite element codes, most notably Abaqus, but they have not seen widespread acceptance.

For almost all practical problems, the classical FEM would be used. For most fracture analysis problems, classical FEM might still be used with suitable mesh refinement and/or p-refinement in the area of the crack tip. Other, less rigorous, fracture models may also be used.

-
Without wanting to take away from this (excellent) answer, the singular functions that represent solution components at reentrant corners are in fact of type $r^{\alpha}$ where $r$ is the distance to the corner, $0<\alpha<1$ for the displacement (the solution) and $-1<\alpha<0$ for the stress (its derivative). –  Wolfgang Bangerth Feb 13 '14 at 3:17
@WolfgangBangerth, Thanks! I edited my answer to say 'power functions', which is what I meant to put in the first place, though it remains imprecise. I almost put sqrt(r) (for a closed crack) to paint a clearer picture, but I wasn't sure if it would be distracting. There's a ton more details, I know, to serious XFEM implementation (some I've studied and others not). –  Mike Feb 13 '14 at 4:19
@Mike: another less-related question is that what is difference between P1-bubble FEM and XFEM? Can you show me? –  Oliver Feb 15 '14 at 20:00
@PoBo, There is little similarity. Both methods involve adding shape functions without changing the mesh and both are based on the same basic math common to the whole FEM family, but that's where the resemblance ends. –  Mike Feb 15 '14 at 20:43
If you don't have a good understanding of the p-version or the P1-bubble shape function approach, you might try another top-level question or picking up one of the books on it (Szabo and Babuska's is fairly rigorous overall, but much less so than others covering the p-version.) –  Mike Feb 15 '14 at 20:45

Both Mike's answer and Jed's one describe well the XFEM/FEM dichotomy and correctly point out that the most important area of application is 3D Fracture Mechanics, where you have a crack, i.e. a displacement discontinuity across a surface inside your domain.

Cracks are hard to model in classical FEM for two reasons:

1. The mesh has to be congruent across the crack: more precisely the crack has to be at the boundary of a subdomain of FE's. The crack cannot lay inside (pass though) a finite element.

2. The singular stress field at crack tip requires special elements and/or meshing techniques (quarter point elements, focused mesh) to be modelled with good accuracy.

From an engineering point of view in fracture mechanics you have two main types of problems:

1. Stress intensity factor computation,

2. crack propagation analysis, e.g. in fatigue or damage tolerance analysis.

For the first type of problem classical FEM is more than adequate and is the standard engineering tool. (This is because, fortunately, there are energy methods to evaluate the stress intensity factors that are not sensitive to numerical errors near the crack tip.)

Crack propagation analysis is a completely different story: in most cases you do not know beforehand the crack path, and therefore frequent remeshing is necessary. The major promise of XFEM is to allow for crack propagation inside a fixed FEM mesh, the crack cutting his way not only at the boundary between subdomains, but inside the FE's themselves.

XFEM is a relatively new technique, still far from being a standard engineering tool. My answer to the the OP question, at least in solid mechanics and engineering analysis, is that XFEM has a very narrow and specialised application field in crack and damage propagation analysis, for complex 3D geometries, when the crack path cannot be estimated a priori.

Nevertheless let me stress that fracture mechanics is a very important field in engineering: e.g. today's aiplanes are safe also because it is possible to numerically predict damage and crack propagation between maintenance intervals. XFEM, or similar new techniques, are to become important tools in the near future.

-
the importance of XFEM in fracture mechanics is shown by you all but is there still other fields need to use XFEM instead of classical FEM? For example, in biofilm growth, the interface of the biofilm in substrate changes by time. The boundary is changable (moving boundary). If we use the classical FEM, the mesh must be generated at each time step, is that right? That is really not good, especially in 3D case. Or if we consider 2 phases of fluid with different concentration gradients, it seems need to use XFEM too? –  Oliver Feb 12 '14 at 22:56
There are a lot of problems in which you have free surfaces or moving boundaries, which are hard with pure Lagrangian approaches (due to frequent remeshing). XFEM is more about modelling discontinuities inside domains. I know of coupling procedures that make use of the discontinuity in order to represent a moving boundary... but I'm not an expert in these fields. –  Stefano M Feb 12 '14 at 23:46
another less-related question is that what is difference between P1-bubble FEM and XFEM? Can you show me? –  Oliver Feb 15 '14 at 20:01
I would suggest opening a new question. Briefly P1-bubble/P1 is a particular finite element (for the solution of the Stokes equation) while XFEM is a more general concept, pertaining the use of enrichment functions for the modelling of discontinuities, exploiting a Partition of Unity approach. –  Stefano M Feb 16 '14 at 21:33

FEM is a subset of XFEM. XFEM is a methodology for enriching finite-element spaces to handle problems with discontinuities (such as fracture). With classical FEM, attaining similar accuracy typically requires complicated conformal meshing and adaptive refinement, where as XFEM does it with a single mesh, moving that geometric complexity into the elements (XFEM is very complicated to implement, especially in 3D). Meanwhile, XFEM results in extremely ill-conditioned matrices that require either direct solvers or very specialized multigrid methods (e.g., Gerstenberger and Tuminaro (2012)).

-
Does the effort in moving the complexity from the mesh to the shape functions really pay out in the end? Both seem to be complicated the same way. –  shuhalo Feb 12 at 18:37
As so often happens in computational science, it depends who you ask and what problem you're solving. Many XFEM practitioners punt by using a crude quadrature instead of one adapted to the intra-element discontinuities. –  Jed Brown Feb 16 at 23:55