Mr Thomas Anderson
Mr Thomas Anderson

Reputation: 85

How does one make meshes to match on two surfaces (2D) in GMSH?

Typically I am trying to merge two different solids (3D). And so I prefer the same mesh at the interface (2D) for my contact analysis. I took some information from this existing question link. I tried it via the GEO file and it did not work. It throws the error

Geometry.CopyMeshingMethod = 1;

lc = 0.2;
h=0.0;
Point(1) = {0, 0, 0, lc};
Point(2) = {1, 0, 0, lc};
Point(3) = {0.5, 0.5, 0, lc};
Point(4) = {0, 0, h, lc};
Point(5) = {1, 0, h, lc};
Point(6) = {0.5, 0.5, h, lc};

Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 1};

Line(4) = {4, 5};
Line(5) = {5, 6};
Line(6) = {6, 4};

Curve Loop(1) = {1, 2, 3};
Plane Surface(1) = {1};

Curve Loop(2) = {4, 5, 6};
Plane Surface(2) = {2};

Periodic Surface{1} = {2} Translate{0,0,1};

Mesh.ElementOrder = 1;
Mesh.Algorithm = 5;
Mesh 1;
Mesh 2;
Mesh.MshFileVersion = 2.2;

Error   : No corresponding point 4 for periodic connection of surface 2 to 1 (min. distance = 1, tolerance = 1.10803e-08)

Further more, I would like to achieve the same using the python API though as it is more versatile in coupling with other solutions. Also will the mesh change if I add Mesh(3) when this surface becomes part of a solid? If you are interested in this we can discuss more.

Upvotes: 0

Views: 132

Answers (0)

Related Questions