[Gmsh] Gmsh transfinite surface question

r96941104 at ntu.edu.tw r96941104 at ntu.edu.tw
Sun Nov 1 23:58:12 CET 2009


Dear authors:
I am a master student at National Taiwan University and my research is  
about the simulation of the semiconductor device (LED) especially in  
thermal and electrical aspects.
Recently, I met a problem. When I solve the Poisson equation, I need  
to let the mesh uniform because of its convergence. The entire device  
is L-shaped, and approximately it indeed is composed of rectangles.  
However, at the top of the device, there exists a finger-shaped metal  
(or other shapes) and it can't use transfinite surface. As a result,  
two parts, the top and the volume below the top are non-uniform meshes.

I just wonder know that are there exist any command or some methods to  
make the whole mesh uniform? The attachment is a *.geo file I use. thx~

Best Regards.

-------------- next part --------------
/********************************************************************* 
 *
 *  Gmsh ion
 * 
 *  Variables, elementary entities (points, lines, surfaces), physical
 *  entities (points, lines, surfaces)
 *
 *********************************************************************/

//L-shape x-z plane, 11 region, 0.03cmx0.03xm dimension and add wafer to 0.06cmx0.06cm
lc=0.0001;//0.00015;//0.0005;

Point(1) = {0, 0, 0, lc};
Point(2) = {.03, 0, 0, lc} ;
Point(3) = {.036, 0, 0, lc} ;
Point(4) = {.036, .03, 0, lc} ;
Point(5) = {.03, .03, 0, lc} ;
Point(6) = {0, .03, 0, lc} ;

Line(1) = {1,2} ;
Line(2) = {2,3} ;
Line(3) = {3,4} ;
Line(4) = {4,5} ;
Line(5) = {5,6} ;
Line(6) = {1,6} ;
Line(7) = {2,5} ;


//counterclockwise
Line Loop(32) = {1,7,5,-6} ;
Line Loop(33) = {2,3,4,-7} ;

//Surface num = Line Loop num + 20
Plane Surface(52) = {32} ;
Plane Surface(53) = {33} ;



//
//device.msh:5,100,5   

h1=-.00001*100;
Extrude {0, 0, h1} {
    Surface{52}; Layers{2};
  }
Extrude {0, 0, h1} {
    Surface{53}; Layers{2};
  }
h2=.000018*100;
Extrude {0, 0, h2} {
    Surface{52}; Layers{2};
  }
Extrude {0, 0, h2} {
    Surface{53}; Layers{2};
  }
h3=.00002*100;
Extrude {0, 0, h3} {
    Surface{119}; Layers{2};
  }
Extrude {0, 0, h3} {
    Surface{141}; Layers{2};
  }
h4=.000014*100;
Extrude {0, 0, h4} {
    Surface{163}; Layers{5};
  }
Extrude {0, 0, h4} {
    Surface{185}; Layers{5};
  }
h5=.00002*100;
Extrude {0, 0, h5} {
    Surface{207}; Layers{10};
  }


h6=.0000014*100;
Extrude {0, 0, h6} {
    Surface{251}; Layers{5};
  }
h7=.0000003*100;
Extrude {0, 0, h7} {
    Surface{273}; Layers{2};
  }
h8=.0000014*100;
Extrude {0, 0, h8} {
    Surface{295}; Layers{5};
  }
h9=.0000003*100;
Extrude {0, 0, h9} {
    Surface{317}; Layers{2};
  }
h10=.0000014*100;
Extrude {0, 0, h10} {
    Surface{339}; Layers{5};
  }
h11=.0000003*100;
Extrude {0, 0, h11} {
    Surface{361}; Layers{2};
  }
h12=.0000014*100;
Extrude {0, 0, h12} {
    Surface{383}; Layers{5};
  }
h13=.0000003*100;
Extrude {0, 0, h13} {
    Surface{405}; Layers{2};
  }
h14=.0000014*100;
Extrude {0, 0, h14} {
    Surface{427}; Layers{5};
  }
h15=.0000003*100;
Extrude {0, 0, h15} {
    Surface{449}; Layers{2};
  }
h16=.000006*100;
Extrude {0, 0, h16} {
    Surface{471}; Layers{3};
  }


Point(497) = {0, 0, .0000965*100, lc} ;
Point(498) = {.03, 0, .0000965*100, lc};
Point(499) = {.03, .03, .0000965*100, lc};
Point(500) = {0, .03, .0000965*100, lc} ;
Point(501) = {.001, .002, .0000965*100, lc};
Point(502) = {.006, .002, .0000965*100, lc} ;
Point(503) = {.029, .002, .0000965*100, lc} ;
Point(504) = {.029, .003, .0000965*100, lc};
Point(505) = {.006, .003, .0000965*100, lc};
Point(506) = {.006, .007, .0000965*100, lc} ;
Point(507) = {.029, .007, .0000965*100, lc} ;
Point(508) = {.029, .008, .0000965*100, lc};
Point(509) = {.006, .008, .0000965*100, lc} ;
Point(510) = {.006, .012, .0000965*100, lc} ;
Point(511) = {.029, .012, .0000965*100, lc};
Point(512) = {.029, .013, .0000965*100, lc} ;
Point(513) = {.006, .013, .0000965*100, lc} ;
Point(514) = {.006, .017, .0000965*100, lc};
Point(515) = {.029, .017, .0000965*100, lc} ;
Point(516) = {.029, .018, .0000965*100, lc} ;
Point(517) = {.006, .018, .0000965*100, lc} ;
Point(518) = {.006, .022, .0000965*100, lc};
Point(519) = {.029, .022, .0000965*100, lc} ;
Point(520) = {.029, .023, .0000965*100, lc} ;
Point(521) = {.006, .023, .0000965*100, lc};
Point(522) = {.006, .027, .0000965*100, lc} ;
Point(523) = {.029, .027, .0000965*100, lc} ;
Point(524) = {.029, .028, .0000965*100, lc};
Point(525) = {.006, .028, .0000965*100, lc} ;
Point(526) = {.001, .028, .0000965*100, lc};




Line(801) = {501,502} ;
Line(802) = {502,503} ;
Line(803) = {503,504} ;
Line(804) = {504,505} ;
Line(805) = {505,506} ;
Line(806) = {506,507} ;
Line(807) = {507,508} ;
Line(808) = {508,509} ;
Line(809) = {509,510} ;
Line(810) = {510,511};
Line(811) = {511,512} ;
Line(812) = {512,513} ;
Line(813) = {513,514} ;
Line(814) = {514,515} ;
Line(815) = {515,516} ;
Line(816) = {516,517} ;
Line(817) = {517,518} ;
Line(818) = {518,519} ;
Line(819) = {519,520} ;
Line(820) = {520,521} ;
Line(821) = {521,522} ;
Line(822) = {522,523} ;
Line(823) = {523,524} ;
Line(824) = {524,525} ;
Line(825) = {525,526} ;
Line(826) = {526,501} ;

Line(827) = {502,505} ;
Line(828) = {506,509} ;
Line(829) = {510,513} ;
Line(830) = {514,517} ;
Line(831) = {518,521} ;
Line(832) = {522,525} ;


Line(900) = {181,497} ;
Line(901) = {182,498} ;
Line(902) = {186,499} ;
Line(903) = {190,500} ;
Line(904) = {497,498} ;
Line(905) = {498,499} ;
Line(906) = {499,500} ;
Line(907) = {500,497} ;


Line Loop(100) = {801,827,805,828,809,829,813,830,817,831,821,832,825,826} ;
Line Loop(101) = {802,803,804,-827} ;
Line Loop(102) = {806,807,808,-828} ;
Line Loop(103) = {810,811,812,-829} ;
Line Loop(104) = {814,815,816,-830} ;
Line Loop(105) = {818,819,820,-831} ;
Line Loop(106) = {822,823,824,-832} ;
//Line Loop(107) = {275,276,277,278} ;
//Line Loop(108) = {801,802,803,804,805,806,807,808,809,810,811,812,813,814,815,816,817,818,819,820,821,822,823,824,825,826} ;

Line Loop(109) = {473,901,-904,-900} ;
Line Loop(110) = {474,902,-905,-901} ;
Line Loop(111) = {475,903,-906,-902} ;
Line Loop(112) = {476,900,-907,-903} ;
Line Loop(113) = {904,905,906,907} ;

Plane Surface(700) = {100} ;
Plane Surface(701) = {101} ;
Plane Surface(702) = {102} ;
Plane Surface(703) = {103} ;
Plane Surface(704) = {104} ;
Plane Surface(705) = {105} ;
Plane Surface(706) = {106} ;
Plane Surface(707) = {100,101,102,103,104,105,106,113};
//{107,108} ;
Plane Surface(709) = {109} ;
Plane Surface(710) = {110} ;
Plane Surface(711) = {111} ;
Plane Surface(712) = {112} ;
//Plane Surface(713) = {113} ;
Surface Loop(600)={493,700,701,702,703,704,705,706,707,709,710,711,712};
Volume(21)={600};
h=0.000013*100;
Extrude {0, 0, h} {
    Surface{700}; Layers{4};
  }
Extrude {0, 0, h} {
    Surface{701}; Layers{4};
  }
Extrude {0, 0, h} {
    Surface{702}; Layers{4};
  }
Extrude {0, 0, h} {
    Surface{703}; Layers{4};
  }
Extrude {0, 0, h} {
    Surface{704}; Layers{4};
  }
Extrude {0, 0, h} {
    Surface{705}; Layers{4};
  }
Extrude {0, 0, h} {
    Surface{706}; Layers{4};
  }
//

Transfinite Line{1}=61; 
Transfinite Line{7}=61;
Transfinite Line{5}=61;
Transfinite Line{6}=61;
Transfinite Surface{52}={1,2,5,6};

Transfinite Line{2}=16; 
Transfinite Line{3}=61;
Transfinite Line{4}=16;
Transfinite Line{7}=61;
Transfinite Surface{53}={2,3,4,5};

//Transfinite Line{253}=41; 
//Transfinite Line{254}=41;
//Transfinite Line{255}=41;
//Transfinite Line{256}=41;
//Transfinite Surface{11}={81,82,86,90};