Search code examples
numericmeshnumerical-methodsfinite-element-analysis

Two Material Circular Mesh - Gmsh


I have the following .geo for 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};

I have drawn exactly the geometry I want to build but somehow Gmsh is only meshing inside Plane Surface 2. Is there anything wrong in this code?


Solution

  • The point definition for points 5 - 8 are not in plane z = 0 they are in plane (z = cl_1). A suggestion, when you write this kind of files try to arrange things in the following way:

    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};
    

    you can save lot of time only by inspection.