[Gmsh] Conformal mesh on two parts

Johannes Wimmer johannes.wimmer at rwth-aachen.de
Thu Jan 7 09:33:43 CET 2016


Hi Krzysztof,
I am not sure about the stl-files. When I open them in GMSH, nothing 
appears on screen. Cannot be meshed either. If it was geo however, i 
assume that you did not include the facets of your inner cube in the 
surface loop of the outer cube.

I am attaching an example that works. In line 67:

Surface Loop(65) = {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64};

This should do the trick.

Cheers,
Johannes


On 07.01.2016 08:09, Krzysztof Bzowski wrote:
> Hi,
> I have two parts, which need to be meshed. One part is located inside
> another. To simplify the problem, imagine two cubes: one inside another.
>
> http://i.stack.imgur.com/h87gD.png
>
> Geometries are stored in STL files. From CAD point of view, one file
> contains an internal cube, another contains cube with a hole for an
> internal cube. All dimensions fits (there are no intersections). My task
> is to create a conformal tetrahedral mesh suitable for mechanical FEM
> analysis - without duplicated nodes on shared faces. Each element should
> contain information to which part it belongs. File format does not
> matter but Abaqus is preferred.
>
> I decided to use gmsh, but I cannot mesh both parts together.
> I tried the following commands:
>
>   1. File -> Open Internal cube
>   2. Add volume to internal cube
>   3. File -> Merge External cube
>   4. Add volume to external cube
>
> This produces mesh but elements in internal cube are duplicated. It
> looks like gmsh does not treat hole (in external cube) as a void. I also
> tried to use Coherence in gmsh but it failed with error:
>
>  > Error   : Self intersecting surface mesh, computing intersections
> (this could take a while)
>
>  > Error   : Surface mesh is wrong, cannot do the 3D mesh
>
> I assume, that my geometries are fine:
>
>   - Internal cube: http://pastie.org/10673562
>   - External cube: http://pastie.org/10673564
>
> How to create such a mesh which satisfy my requirements?
>
> Best regards,
> Krzysztof
>
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

-- 
Dipl.-Ing. Johannes Wimmer
RWTH Aachen
Institut für Angewandte Mechanik
Mies-van-der-Rohe-Str.1
D-52074 Aachen

Tel.: +49 (0)241 80 25013
Fax : +49 (0)241 80 22001
www.ifam.rwth-aachen.de
-------------- next part --------------
/*** 2 polyhedra for gmsh ***/
lc = 0.1;
Point(1) = {0.000000, 0.000000, 0.000000, lc};
Point(2) = {1.493802, 0.000000, 0.000000, lc};
Point(3) = {1.493802, 1.493802, 0.000000, lc};
Point(4) = {0.000000, 1.493802, 0.000000, lc};
Point(5) = {1.493802, 0.000000, 1.493802, lc};
Point(6) = {0.000000, 0.000000, 1.493802, lc};
Point(7) = {1.493802, 1.493802, 1.493802, lc};
Point(8) = {0.000000, 1.493802, 1.493802, lc};
Point(9) = {0.197262, 0.196496, 1.2, lc};
Point(10) = {1.197262, 0.196496, 1.2, lc};
Point(11) = {1.197262, 1.196496, 1.2, lc};
Point(12) = {0.197262, 1.196496, 1.2, lc};
Point(13) = {1.197262, 0.196496, 0.812275, lc};
Point(14) = {1.197262, 1.196496, 0.812275, lc};
Point(15) = {0.197262, 0.196496, 0.812275, lc};
Point(16) = {0.197262, 1.196496, 0.812275, lc};
Line(17) = {1, 2};
Line(18) = {2, 3};
Line(19) = {3, 4};
Line(20) = {4, 1};
Line(21) = {2, 5};
Line(22) = {5, 6};
Line(23) = {6, 1};
Line(24) = {3, 7};
Line(25) = {7, 5};
Line(26) = {4, 8};
Line(27) = {8, 6};
Line(28) = {7, 8};
Line(29) = {9, 10};
Line(30) = {10, 11};
Line(31) = {11, 12};
Line(32) = {12, 9};
Line(33) = {13, 14};
Line(34) = {14, 16};
Line(35) = {16, 15};
Line(36) = {15, 13};
Line(37) = {15, 9};
Line(38) = {10, 13};
Line(39) = {16, 12};
Line(40) = {14, 11};
Line Loop(41) = {17, 18, 19, 20};
Line Loop(42) = {17, 21, 22, 23};
Line Loop(43) = {18, 24, 25, -21};
Line Loop(44) = {-20, 26, 27, 23};
Line Loop(45) = {-19, 24, 28, -26};
Line Loop(46) = {25, 22, -27, -28};
Line Loop(47) = {29, 30, 31, 32};
Line Loop(48) = {33, 34, 35, 36};
Line Loop(49) = {-36, 37, 29, 38};
Line Loop(50) = {-35, 39, 32, -37};
Line Loop(51) = {33, 40, -30, 38};
Line Loop(52) = {34, 39, -31, -40};
Plane Surface(53) = {41};
Plane Surface(54) = {42};
Plane Surface(55) = {43};
Plane Surface(56) = {44};
Plane Surface(57) = {45};
Plane Surface(58) = {46};
Plane Surface(59) = {48};
Plane Surface(60) = {49};
Plane Surface(61) = {50};
Plane Surface(62) = {51};
Plane Surface(63) = {52};
Plane Surface(64) = {47};
Surface Loop(65) = {53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64};
Surface Loop(66) = {59, 60, 61, 62, 63, 64};
Volume(67) = {65};
Volume(68) = {66};
Physical Volume(0) = {67};
Physical Volume(1) = {68};


More information about the gmsh mailing list