[Gmsh] Structured mesh

manar akel manar951 at msn.com
Wed Nov 11 10:44:52 CET 2015


Hi, 

I would like to structure the mesh non uniformly along the line.But the "Transfinite line" works only for the lines (not the nurbs).Could you advise me a way to do it?


Thank you

Manar

Here is my code:g=40; l=6;  dg=3;  h=2;  k=0.3;  r=0.5;  
xa=8; xc=5;xb=5;yb=8;
Point(6)={g+dg,h,0};Point(26)={g+(dg/2),h,0};Point(65)={g+dg, 0+k,0};Point(66)={g+(dg/2),0+k,0};
Point(800)= {(g+(dg/2)+r),h,0,10};Point(1200)= {(g+(dg/2)+dg/4),h,0,10};
//Point(801)= {(g+(dg/2)+r),k,0,10};//Point(1201)= {(g+(dg/2)+dg/4),k,0,10};
Line(36)={6,65};Line(218)={65, 66};Line(55)={26,66};Line(45)={6,26};

rList[0] = 6;For i In {1 : xa}rList[i] = newp;Point(rList[i]) ={g+dg-(i*(dg/4)/xa),h,0};EndForrList[xa+1] = 1200;Spline(newl) = rList[];
vList[0] = 1200;  For i In {1 : xb}vList[i] = newp;Point(vList[i]) ={(g+dg-dg/4)-(i*((dg/4)-r)/xb),h,0};EndForvList[xb+1] = 800;Spline(newl) = vList[];
aList[0] = 800; For i In {1 : xc}aList[i] = newp;Point(aList[i]) ={g+dg-(dg/2)+r-(i*r/xc),h,0};EndForaList[xc+1] = 26;Spline(newl) = aList[];

bbList[0] = 65;For i In {1 : yb}bbList[i] = newp;Point(bbList[i]) ={g+dg,k+i*(h-k)/yb, 0};EndForbbList[yb] = 6;Spline(newl) = bbList[];
// surface
Line Loop(221) = {45, 55, -218, -36};Plane Surface(222) = {221};
Transfinite Line {55, 36} = yb+1 ;Transfinite Line {45, 218} = xa+1;

//Transfinite Line {220, 223} = xb+1;//Transfinite Line {222, 219} = xc+1;
Transfinite Surface "*";Recombine Surface "*";
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20151111/3a9cd9ed/attachment-0001.html>