Some Issues Regarding Gmsh Meshing

Dear Baagaard,

When I tried to embed a fault into the block, a problem occurred. Before the embedding, the mesh could be generated normally, and according to the visualization plugin, I could see that I had 30 surfaces.

However, after I ran the embedding command, an error was produced.

gmsh.model.occ.fragment([(3, self.domain1)], [(2, self.s_kg)], removeTool=True)

Info    : Meshing 3D...
Info    : 3D Meshing 4 volumes with 1 connected component
Info    : Tetrahedrizing 19998 nodes...
Info    : Done tetrahedrizing 20006 nodes (Wall 0.231054s, CPU 0.203125s)
Info    : Reconstructing mesh...
Info    :  - Creating surface mesh
Info    : Found two exactly self-intersecting facets (dihedral angle  0.00000E+00).
Info    :   1st: [164, 163, 19365] #37
Info    :   2nd: [164, 163, 13517] #28
Error   : Invalid boundary mesh (overlapping facets) on surface 37 surface 28
Traceback (most recent call last):
  File "trace.py", line 305, in <module>
    App().main()
  File "F:\celltest\yt\gmsh_utils.py", line 110, in main
    self.generate_mesh(args.cell)
  File "trace.py", line 299, in generate_mesh
    gmsh.model.mesh.generate(3)
  File "E:\Anaconda3\envs\py37\lib\site-packages\gmsh.py", line 2164, in generate
    raise Exception(logger.getLastError())
Exception: Invalid boundary mesh (overlapping facets) on surface 37 surface 28

I checked the fault surface and found that the embedded fault intersected with the block boundary. In this case, could it be because the fault surface is not smooth enough, causing mesh distortion when fitting to the surface? How can I solve this type of problem?

1 Like

I can see the intersection of the green surface (fault?) and a yellow surface in the image, but I don’t understand the general context. Are the blue, yellow, and green surfaces three distinct surfaces or subsets of a single surface? What do they represent? What is the geometry of these surfaces relative to the domain? What are the constraints on the geometry of these surfaces? Are the discretizations of the surfaces consistent with the uncertainties in their geometry?

Sorry, maybe I didn’t make myself clear earlier.I’ve clarified my question.

The green and yellow surfaces are both vertical faults, and I want to embed them into my mantle model. However, during the fault generation stage, the two faults intersected because the fitting of one of the faults was not good. when I added the surface, the yellow one became distorted, so the two surfaces intersected. When generating the yellow fault, I used the command

gmsh.model.geo.add_surface_filling(wireTags: list) → int

When generating the green fault, I used the command

gmsh.model.geo.extrude(dimTags: list, dx: float, dy: float, dz: float) → list

The green fault was fitted very well and did not show any distortion.

The geometric positions of the faults themselves are shown below

Any help would be greatly appreciated!

My initial impression is that the discretization size is too coarse for the complex geometry. If you really want to model geometry this complex, then I would expect a finer discretization size would be needed to resolve the features associated with the complex deformation arising from the fault geometry.

It isn’t clear how many points are constraining the yellow fault surface. From your comments, it seems like you expected a smoother surface. You can try some of the other surface creation tools in Gmsh. You may want to switch to the OpenCascade geometry engine.

Thanks for the tip! I’ve already solved this problem.

 def addSurfaceFilling(wireTag, tag=-1, pointTags=[], degree=2, numPointsOnCurves=15, numIter=2, anisotropic=False, tol2d=0.00001, tol3d=0.0001, tolAng=0.01, tolCurv=0.1, maxDegree=8, maxSegments=9):

I have modified the parameter degree