[Gmsh] Compound volume

Jaco Du Plessis j.duplessis1 at uq.edu.au
Thu Sep 4 08:53:03 CEST 2014


Hello,

I am trying to use the compound volume function to combine 2 cubes I 
have extruded into one mesh. The cubes each have an individual 
characteristic length and need to be able tag the individuals cubes as 
physical sections. However when I try generate a 3d mesh i get the 
following error:

     Error   : Self intersecting surface mesh, computing intersections 
(this could take a while)

I have tried cut and merge faces but this does not appear to help.

Is there any easy way to achieve what I am trying to do with gmsh?

Code below:

     lc=5.000000;
     Point(1)={0,0,0,lc};
     Point(2)={100.000000,0,0,lc};
     Point(3)={100.000000,100.000000,0,lc};
     Point(4)={0,100.000000,0,lc};
     Point(5)={-50.0, -50.0, 50, 10*lc};
     Point(6)={150.0, -50.0, 50, 10*lc};
     Point(7)={150.0, 150.0, 50, 10*lc};
     Point(8)={-50.0, 150.0, 50, 10*lc};
     Line(1) = {1,2} ;
     Line(2) = {3,2} ;
     Line(3) = {3,4} ;
     Line(4) = {4,1} ;
     Line(5) = {5,6} ;
     Line(6) = {7,6} ;
     Line(7) = {7,8} ;
     Line(8) = {8,5} ;
     Line Loop(5) = {4,1,-2,3} ;
     Line Loop(6) = {8,5,-6,7} ;
     Plane Surface(6) = {5} ;
     Plane Surface(7) = {6} ;
     out0[] = Extrude {0, 0, -50.0000000} { Surface {6};};
     out1[] = Extrude {0, 0, -100.000000} { Surface {7};};
     s5=newreg;
     Compound Volume(s5) = {1,2};
     Physical Volume("cube1") = {1};
     Physical Volume("cube2") = {2};
     Physical Volume("s5") = {3};

Regards,
Jaco.