0

我有以下 .geo 用于 GMSH:

cl__1 = 1.125;
Point(1) = {0, 0, 0, cl__1};
Point(2) = {1, 0, 0, cl__1};
Point(3) = {1, 1, 0, cl__1};
Point(4) = {0, 1, 0, cl__1};
Point(5) = {0.350000,0.100000,cl__1};
Point(6) = {0.350000,0.350000,cl__1};
Point(7) = {0.100000,0.350000,cl__1};
Point(8) = {0.85,0.85,cl__1};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Circle(5) = {5,6,7};
Line(6) = {7,8};
Line(7) = {8,5};
Line Loop(1) = {1, 2, 3, 4};
Line Loop(2) = {5,6,7};
Plane Surface(1) = {1,2};
Plane Surface(2) = {2};
Circle {5} In Surface {2};
Line {6} In Surface {2};
Line {7} In Surface {2};

我已经准确地绘制了我想要构建的几何图形,但不知何故 Gmsh 只是在平面表面 2 内进行网格划分。这段代码有什么问题吗?

4

1 回答 1

1

点 5 - 8 的点定义不在平面 z = 0 中,它们在平面 (z = cl_1) 中。一个建议,当您编写此类文件时,请尝试按以下方式安排内容:

cl_1 = 1.125;
Point(1) = {0       , 0       , 0, cl_1};
Point(2) = {1       , 0       , 0, cl_1};
Point(3) = {1       , 1       , 0, cl_1};
Point(4) = {0       , 1       , 0, cl_1};
Point(5) = {0.350000, 0.100000, 0, cl_1};
Point(6) = {0.350000, 0.350000, 0, cl_1};
Point(7) = {0.100000, 0.350000, 0, cl_1};
Point(8) = {0.85    , 0.85    , 0, cl_1};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Circle(5) = {5,6,7};
Line(6) = {7,8};
Line(7) = {8,5};
Line Loop(1) = {1, 2, 3, 4};
Line Loop(2) = {5,6,7};
Plane Surface(8) = {1, 2};
Plane Surface(9) = {2};

只有通过检查才能节省大量时间。

于 2017-06-06T10:35:19.117 回答