<div dir="ltr"><div><div><div><div><div><div><div>I have used gmsh in my application for a while. However, one kind of simple and standard geometry still makes bad mesh result. The geometry is just a rectangular plane with four small holes at each corner like this:<br>-------------------------------------<br>|                                    |<br>|                                    |<br>|     __                    __    |<br>|     |  |                    |   |   |<br>|     ---                     ----   |<br>|                                    |<br>|                                    |<br>|     __                     __   |<br>|     |   |                    |   |  |<br>|     ----                     ----  |<br>|                                    |<br>|                                    |<br>|____________________ |<br><br></div>Surprisingly, gmsh generated fine mesh not only around the four holes, but also in the area between the holes. Therefore, the entire mesh size is huge. The ideal mesh should only have fine mesh around the holes at corner since coarse mesh is enough for the center area.<br><br></div>I read the history of the mailing list and find some discussion about this problem. However, no good solution has been provided. Someone suggested using<br>Mesh.CharacteristicLengthExtendFromBoundary= 0;<br></div>However, it indeed generated coarse mesh at the center but the triangle quality is bad with very sharp angle. <br></div><div>Using fields: "Attractor", and "Threshold" as in tutorial t10 does not work as well.<br></div><div><br></div>Here is the script of the simple test case as described above. I also attached the bad mesh result as I mentioned. Hope someone can discuss this classic problem with me.<br><br>lc = 10;<br>lc1 = 1;<br>Point(1) = {-100, -100, 0, lc};<br>Point(2) = {100, -100,  0, lc} ;<br>Point(3) = {100, 100, 0, lc} ;<br>Point(4) = {-100,  100, 0, lc} ;<br>Line(1) = {1,2} ;<br>Line(2) = {3,2} ;<br>Line(3) = {3,4} ;<br>Line(4) = {4,1} ;<br>Line Loop(1) = {4,1,-2,3};<br> <br>Point(5) = {49, 49, 0, lc1};<br>Point(6) = {49, 51,  0, lc1} ;<br>Point(7) = {51, 51, 0, lc1} ;<br>Point(8) = {51, 49, 0, lc1} ;<br>Line(6) = {5,6} ;<br>Line(7) = {7,6} ;<br>Line(8) = {7,8} ;<br>Line(9) = {8,5} ;<br>Line Loop(2) = {9,6,-7,8}; <br><br>Point(11) = {49, -49, 0, lc1};<br>Point(12) = {49, -51, 0, lc1};<br>Point(13) = {51, -51, 0, lc1};<br>Point(14) = {51, -49, 0, lc1};<br>Line(10) = {11,12} ;<br>Line(11) = {13,12} ;<br>Line(12) = {13,14} ;<br>Line(13) = {14,11} ;<br>Line Loop(3) = {13,10,-11,12}; <br><br>Point(15) = {-49, 49, 0, lc1};<br>Point(16) = {-49, 51,  0, lc1} ;<br>Point(17) = {-51, 51, 0, lc1} ;<br>Point(18) = {-51, 49, 0, lc1} ;<br>Line(14) = {15,16} ;<br>Line(15) = {17,16} ;<br>Line(16) = {17,18} ;<br>Line(17) = {18,15} ;<br>Line Loop(4) = {17,14,-15,16};<br><br>Point(19) = {-49, -49, 0, lc1};<br>Point(20) = {-49, -51,  0, lc1} ;<br>Point(21) = {-51, -51, 0, lc1} ;<br>Point(22) = {-51, -49, 0, lc1} ;<br>Line(18) = {19,20} ;<br>Line(19) = {21,20} ;<br>Line(20) = {21,22} ;<br>Line(21) = {22,19} ;<br>Line Loop(5) = {21,18,-19,20};<br><br>Plane Surface(1) = {1, 2, 3, 4, 5} ;<br>//Mesh.CharacteristicLengthExtendFromBoundary= 0;<br></div><br></div>Thanks,<br></div>Kim<br><div><div><br><br></div></div></div>