Does GetFEM XFEM Support 3D Crack Growth?

Hi everyone,

I’m working on fracture mechanics problems and would like to ask whether the XFEM module in GetFEM currently supports 3D crack growth.

If anyone knows whether this functionality is available, or if there are examples or related work I could refer to, I’d really appreciate your guidance.

Thanks in advance!
Hanze

Hi and welcome,

to make things clear, GetFEM does not do crack growth, in principle GetFEM does not do anything else than computing integrals.

What GetFEM aspires is to be a general tool, that will allow you to easily model anything, also crack growth.

In fact, there are many very powerful features in GetFEM for working with levelsets that can be used to describe cracks. These features, documented in the text given below, are well tested in 2D. They should in principle also work in 3D but they are much less tested there. If you find any bugs, we will try to fix any issue that you may encounter.











1 Like

Hi Konstantinos,

Thank you very much for the detailed and helpful explanation. I really appreciate the guidance, and I’ll explore these functionalities further. If I encounter any issues, I’ll be happy to report them.

Best regards,
Hanze

Hi Konstantinos,

Thank you again for your previous detailed explanation.

Following interface/tests/python/demo_crack.py, I tested the level set and jump-function enrichment in 3D, and these parts work well. However, when I try to add crack tip enrichment, I consistently encounter an error.

I use the following code:

import getfem as gf

import numpy as np

L = [100.0, 100.0, 10.0] 
elements = [20, 20, 2] 

#3D case
mesh = gf.Mesh('cartesian', np.linspace(0, L[0], elements[0]+1),
                            np.linspace(0, L[1], elements[1]+1),
                            np.linspace(0, L[2], elements[2]+1))
level_set = gf.LevelSet(mesh, 1, 'y - 52','x-10')  # Horizontal crack at y=50
mesh_level_set = gf.MeshLevelSet(mesh)
mesh_level_set.add(level_set)
mesh_level_set.adapt()

ck0 = gf.GlobalFunction('crack',0)
ck1 = gf.GlobalFunction('crack',1)
ck2 = gf.GlobalFunction('crack',2)
ck3 = gf.GlobalFunction('crack',3)
meshFem_sing_u = gf.MeshFem('global function',mesh,level_set,[ck0,ck1,ck2,ck3],1)

and obtain the following error:

RuntimeError: (Getfem::InterfaceError) -- Error in getfem_fem_global_function.cc, line 103 virtual void getfem::fem_global_function::update_from_context() const: 
Convexes of different dimension: to be done

After checking the implementation in src/getfem_global_function.cc, I noticed that crack_singular_xy_function is defined only for 2D cases. Is this the source of the problem?

Do you think this limitation is indeed the reason for the error? And if so, would extending this crack-tip singular function to 3D be particularly challenging within the current GetFEM framework?

Thanks!

Hmm, in 2D this levelset definition

ls = gf.LevelSet(m, 2, "y-2.5*tanh(x/7.)", "x*x+y*y-16*16")

defines also two local coordinates, parallel to the crack and perpendicular to the crack, which are then used in the definition of the enrichment basis functions in

mf_enr = gf.MeshFem("global function", m, ls, [gf.GlobalFunction("crack",0),
                                               gf.GlobalFunction("crack",1),
                                               gf.GlobalFunction("crack",2),
                                               gf.GlobalFunction("crack",3)], 1)
mf_PoU = gf.MeshFem(m);
mf_PoU.set_classical_fem(1)
mf_sing = gf.MeshFem("product", mf_PoU, mf_enr)

the problem that I see is that gf.LevelSet cannot create levelsets with 3 functions, that could be used for defining the 3 coordinates for the enrichment functions of a 3D crack. It should not be too difficult to add this possibility to GetFEM, but as far I see currently is not possible to use the same smar implementation for enrichment functions in 3D as in the 2D examples.

@yves.renard do you agree with this analysis of the situation?

Hi Konstantinos,

In my understanding, the 2D crack-tip enrichment relies on defining a local crack-aligned coordinate system (normal and tangential to the crack), which can then be transformed into a polar coordinate system aligned with the crack tip (as illustrated in the figure below). The enrichment functions are formulated in this local polar frame.

This 2D enrichment strategy cannot be directly extended to 3D. However, I found a possible approach discussed in a review paper. In the 3D case, the crack tip becomes a crack front represented by a spatial curve. At each point S along the crack front, a local orthonormal coordinate system (X1, X2, X3) can be defined, where X1 is aligned with the crack growth direction, X2 is normal to the crack surface, and X3​ is tangential to the crack front. The local 2D polar coordinate system used for crack-tip enrichment is then defined in the X1​–X2​ plane, while the X3 direction accounts for variations along the crack front. For any intergration point X in the domain, the point is projected onto the crack front to identify its corresponding point S, and the enrichment functions are then evaluated based on this local coordinate system.

Thank you very much for your time and consideration.

Hanze

Dear HanzeLi and Konstas,

The enrichment in 3D is not an easy task, yes. Indeed the system of the two level sets don not furnish the third coordinate along the crack front. Additionaly, to make a consistent enrichment, you need a certain approximation along the crack front. Normally, the standard Xfem strategy (meaning multiplying the enrichment functions by the shape functions, although adding quite a lot of degrees of freedom, work in that context without having the necessity of a coordinate along the crack front. At least for the crack front enrichment (there is also specific singularities when the crack front encounter a boundary).

Best regards,

Yves

Dear Yves,

Thank you very much for your clear explanation.

Best regards,

Hanze

@yves.renard ok, then let’s come back to the error Hanze is getting when defining the global function mesh_fem for the enrichment. Shouldn’t that step just work?

Yes, there is a problem in using crack front enrichment which should not exist. What I do not understand is that I already used 3D crack front enrichment in the past (I think I can find the program in my archives but it was a C++ program). The point here is that the fem_global_function is initialized with the dimension of enrichment functions (2) and it is detected that the mesh has 3D elements. Of course, it will be used with the level_set coordinates that are 2D ones, so this is relevant. May be, just supress the test would make the things work again.