Hi all,

A problem I thought I'd gotten around a while ago, but I guess not.

The geometry in question is a rectangular box (surface), with a second box immediately adjacent it (mostly empty space, but defines my meshing region). Now immediately above the surface there is a small region which I have been using to define a metal piece, it is entirely outside but just touching the surface (in the ideal case). Usually I use the metal as a void when I define the region above the surface (plus other objects, irrelevant here).

The problem is that if I don't leave a gap (even if tiny) between the metal and the surface then the 3d mesh invariably fails, but if I do leave a gap then it throws off the field calculation dramatically (because of small meshing volumes at the corner of that region). I can understand there would be a problem with a void that overlaps the boundary of a volume, or it might be because of the adjacent volume, but...

Now I guess I could deliberately eliminate any mesh elements in that gap between the void and surface, not sure how though. Otherwise, is there anything else I can try? Any suggestions would be great.

I've included a version of the geo file, ignore the extra structure. Currently there is a 0.01 unit gap between surface and metal (the object between surfaces 12 and 13.

Thanks!

Shawn

lc= 100;

Point(1) = {0, 50, 338,lc};
Point(2) = {25, 25, 338,lc};
Point(3) = {0, 0, 338,lc};
Point(4) = {-25, 25, 338,lc};
Point(5) = {-25, 50, 338,lc};
Point(6) = {-25, 0, 338,lc};
Point(7) = {25, 0, 338,lc};
Point(8) = {25, 50, 338,lc};
Point(9) = {-200, 225,938,lc};
Point(10) = {-200, -175, 938,lc};
Point(11) = {200, -175, 938,lc};
Point(12) = {200, 225, 938,lc};
Point(13) = {-495, -490, 311,lc};
Point(14) = {-495, 0, 311,lc};
Point(15) = {495, -490, 311,lc};
Point(16) = {495, 0, 311,lc};
Point(17) = {-495, -490, 301,lc};
Point(18) = {-495, 0, 301,lc};
Point(19) = {495, 0, 301,lc};
Point(20) = {495, -490, 301,lc};
Point(21) = {-500, -500, 300,lc};
Point(22) = {-500, 500, 300,lc};
Point(23) = {500, -500, 300,lc};
Point(24) = {500, 500, 300,lc};
Point(25) = {-500, -500, 0,lc};
Point(26) = {-500, 500, 0,lc};
Point(27) = {500, 500, 0,lc};
Point(28) = {500, -500, 0,lc};
Point(30) = {0, 25, 338,lc};
Point(57) = {500, 500, 1000,lc};
Point(58) = {-500, 500, 1000,lc};
Point(60) = {500, -500, 1000,lc};
Point(61) = {-500, -500, 1000,lc};
Point(62) = {0, 25, 338,lc};
Point(63) = {25, 25, 338,lc};
Point(64) = {0, 50, 338,lc};
Point(65) = {-25, 25, 338,lc};
Point(66) = {0, 0, 338,lc};
Point(67) = {0, 25, 313,lc};
Point(68) = {0, 25, 363,lc};
Line(6) = {5, 4};
Line(7) = {1, 5};
Line(8) = {6, 3};
Line(9) = {4, 6};
Line(10) = {7, 2};
Line(11) = {3, 7};
Line(12) = {8, 1};
Line(13) = {2, 8};
Line(14) = {9, 10};
Line(15) = {10, 11};
Line(16) = {11, 12};
Line(17) = {12, 9};
Line(18) = {10, 6};
Line(19) = {9, 5};
Line(20) = {12, 8};
Line(21) = {11, 7};
Line(22) = {13, 14};
Line(23) = {15, 13};
Line(24) = {16, 15};
Line(25) = {14, 16};
Line(26) = {17, 18};
Line(27) = {18, 19};
Line(28) = {19, 20};
Line(29) = {20, 17};
Line(30) = {18, 14};
Line(31) = {17, 13};
Line(32) = {20, 15};
Line(33) = {19, 16};
Line(34) = {21, 22};
Line(35) = {23, 21};
Line(36) = {24, 23};
Line(37) = {22, 24};
Line(38) = {25, 26};
Line(39) = {26, 27};
Line(40) = {27, 28};
Line(41) = {28, 25};
Line(42) = {26, 22};
Line(43) = {25, 21};
Line(44) = {28, 23};
Line(45) = {27, 24};
Line(46) = {22, 58};
Line(47) = {24, 57};
Line(48) = {57, 58};
Line(49) = {57, 60};
Line(50) = {23, 60};
Line(51) = {60, 61};
Line(52) = {61, 21};
Line(53) = {61, 58};
Circle(72) = {2, 30, 1};
Circle(73) = {1, 30, 4};
Circle(74) = {4, 30, 3};
Circle(75) = {3, 30, 2};
Circle(76) = {1, 30, 67};
Circle(77) = {67, 30, 3};
Circle(78) = {3, 30, 68};
Circle(79) = {68, 30, 1};
Circle(80) = {2, 30, 68};
Circle(81) = {68, 30, 4};
Circle(82) = {4, 30, 67};
Circle(83) = {67, 30, 2};
Line Loop(7) = {14, 15, 16, 17};
Plane Surface(7) = {7};
Line Loop(8) = {6, 9, -18, -14, 19};
Plane Surface(8) = {8};
Line Loop(9) = {12, 7, -19, -17, 20};
Plane Surface(9) = {9};
Line Loop(10) = {10, 13, -20, -16, 21};
Plane Surface(10) = {10};
Line Loop(11) = {8, 11, -21, -15, 18};
Plane Surface(11) = {11};
Line Loop(12) = {22, 25, 24, 23};
Plane Surface(12) = {12};
Line Loop(13) = {26, 27, 28, 29};
Plane Surface(13) = {13};
Line Loop(14) = {22, -30, -26, 31};
Plane Surface(14) = {14};
Line Loop(15) = {23, -31, -29, 32};
Plane Surface(15) = {15};
Line Loop(16) = {24, -32, -28, 33};
Plane Surface(16) = {16};
Line Loop(17) = {25, -33, -27, 30};
Plane Surface(17) = {17};
Line Loop(18) = {34, 37, 36, 35};
Plane Surface(18) = {18};
Line Loop(19) = {38, 39, 40, 41};
Plane Surface(19) = {19};
Line Loop(20) = {34, -42, -38, 43};
Plane Surface(20) = {20};
Line Loop(21) = {35, -43, -41, 44};
Plane Surface(21) = {21};
Line Loop(22) = {36, -44, -40, 45};
Plane Surface(22) = {22};
Line Loop(23) = {37, -45, -39, 42};
Plane Surface(23) = {23};
Line Loop(55) = {51, 53, -48, 49};
Plane Surface(55) = {55};
Line Loop(57) = {48, -46, 37, 47};
Plane Surface(57) = {57};
Line Loop(59) = {53, -46, -34, -52};
Plane Surface(59) = {59};
Line Loop(66) = {50, 51, 52, -35};
Plane Surface(66) = {66};
Line Loop(68) = {36, 50, -49, -47};
Plane Surface(68) = {68};
Line Loop(71) = {12, 7, 6, 9, 8, 11, 10, 13};
Plane Surface(71) = {71};
Line Loop(85) = {73, -81, 79};
Ruled Surface(85) = {85};
Line Loop(87) = {81, 74, 78};
Ruled Surface(87) = {87};
Line Loop(89) = {-79, -80, 72};
Ruled Surface(89) = {89};
Line Loop(91) = {-82, -73, 76};
Ruled Surface(91) = {91};
Line Loop(93) = {-76, -72, -83};
Ruled Surface(93) = {93};
Line Loop(95) = {-74, 82, 77};
Ruled Surface(95) = {95};
Line Loop(97) = {-78, 75, 80};
Ruled Surface(97) = {97};
Line Loop(99) = {-75, -77, 83};
Ruled Surface(99) = {99};
Line Loop(107) = {11, 10, -75};
Plane Surface(107) = {107};
Line Loop(109) = {7, 6, -73};
Plane Surface(109) = {109};
Line Loop(111) = {9, 8, -74};
Plane Surface(111) = {111};
Line Loop(113) = {12, -72, 13};
Plane Surface(113) = {113};

Surface Loop(3) = {18, 19, 20, 21, 22, 23};
Volume(3) = {3};

// make the electrode flush with the kbr (for historical reasons it wasn't)

Translate {0, 0, -0.99} {
  Surface{12, 13, 17, 16, 14, 15};
}


//translate the tip around from its initial position

Translate {0, 0, -10} {
  Surface{7, 10, 8, 11, 9, 89, 87, 95, 93, 91, 99, 97, 85, 71,107,111,109,113};
}

//delete a few redundant points
Delete {
  Point{62,63,64,65,66};
}

// form the surface loop which removes the electrode and tip from the "top" 
area, then delete them

Surface Loop(116) = {57, 55, 66, 68, 59, 18, 10, 9, 8, 11, 7, 12, 14, 17, 16, 
15, 13, 93, 91, 95, 99, 107, 111, 109, 113};
Volume(116) = {116};
Delete {
  Surface{85, 89, 97, 87};
}
Delete {
  Surface{71};
}

Field[1] = Box;
Field[1].VIn = lc/50;
Field[1].VOut = lc;
Field[1].XMax = 75;
Field[1].XMin = -75;
Field[1].YMax = 125;
Field[1].YMin = -50;
Field[1].ZMax = 350;
Field[1].ZMin = 250;

Field[2] = Attractor;
Field[2].EdgesList = {25};
Field[2].NNodesByEdge = 50;

Field[3] = Threshold;
Field[3].DistMax = 40;
Field[3].DistMin = 0;
Field[3].IField = 2;
Field[3].LcMax = lc;
Field[3].LcMin = lc/5;


Field[4] = Min;
Field[4].FieldsList = {1,3};
Background Field = 4;
_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh

Reply via email to