[Gmsh] Question about structured grid
billy at dem.uminho.pt
billy at dem.uminho.pt
Tue Sep 26 00:42:45 CEST 2006
Hi,
Basically I had to create 3 surfaces instead of only 1. I don't know if it is
possible to build structured mesh of a surface with more than 4 edges.
n1 = 30;
n2 = 30;
Point(1) = {0,0,0,1};
Point(2) = {2,0,0,1};
Point(3) = {4,0,0,1};
Point(4) = {6,0,0,1};
Point(5) = {6,3,0,1};
Point(6) = {4,3,0,1};
Point(7) = {2,3,0,1};
Point(8) = {0,3,0,1};
Line(1) = {1,2};
Line(2) = {2,3};
Line(3) = {3,4};
Line(4) = {4,5};
Line(5) = {5,6};
Line(6) = {6,7};
Line(7) = {7,8};
Line(8) = {8,1};
Line(9) = {7,2};
Line(10) = {6,3};
Line Loop(11) = {7,8,1,-9};
Plane Surface(12) = {11};
Line Loop(13) = {6,9,2,-10};
Plane Surface(14) = {13};
Line Loop(15) = {5,10,3,4};
Plane Surface(16) = {15};
Transfinite Line{1,2,3,5,6,7} = n1+1 Using Progression 1;
Transfinite Line{4,8,9,10} = n2+1 Using Progression 1;
Transfinite Surface {16} = {4,5,6,3};
Transfinite Surface {14} = {3,6,7,2};
Transfinite Surface {12} = {7,8,1,2};
Recombine Surface{12,14,16};
Billy.
Quoting Xuanhang Zhang <zhangxuanhang at gmail.com>:
> Hi Billy,
>
> I tried my application. It failed. Could you please look into my code?
> All I need is a uniform structured grid. Thank you very much!
>
> Best,
> Simon
>
> Point(1) = {0,0,0,1};
> Point(2) = {2,0,0,1};
> Point(3) = {4,0,0,1};
> Point(4) = {6,0,0,1};
> Point(5) = {6,3,0,1};
> Point(6) = {4,3,0,1};
> Point(7) = {2,3,0,1};
> Point(8) = {0,3,0,1};
>
> Line(1) = {1,2};
> Line(2) = {2,3};
> Line(3) = {3,4};
> Line(4) = {4,5};
> Line(5) = {5,6};
> Line(6) = {6,7};
> Line(7) = {7,8};
> Line(8) = {8,1};
>
> Line Loop(9) = {1,2,3,4,5,6,7,8};
> Plane Surface(10) = {9};
>
> Transfinite Line{1,2,3,5,6,7} = 3 Using Progression 1;
> Transfinite Line{4,8} = 4 Using Progression 1;
>
> Transfinite Surface{9} = {1,2,3,4,5,6,7,8};
>
> Recombine Surface{9};
>
>
> On 9/25/06, billy at dem.uminho.pt <billy at dem.uminho.pt> wrote:
> >
> > Hi,
> >
> > Gmsh is a great program! You won't be disapointed when you get stuff to
> work. I
> > had same problem. I advise you to look at gmsh wiki.
> >
> > http://www.geuz.org/gmsh/wiki/FrontPage
> > (username: gmsh, password: wiki)
> >
> > Then click on lid.geo for example. That is structured quads then extruded
> to
> > make hexahedral. If you want only the quads, comment out the extrude part
> like so:
> >
> > /*
> >
> > Extrude Surface {6, {0,0,dz} } {
> >
> > Layers { {1}, {32}, {1.0} };
> >
> > Recombine;
> >
> > };
> >
> > */
> >
> > Then you can take a look at other examples.
> >
> > Billy.
> >
> > Quoting Xuanhang Zhang <zhangxuanhang at gmail.com>:
> >
> > > Hi,
> > >
> > > I am a grad student from Syracuse University. I am very excited to
> > > find your code. Thank you! I downloaded Gmsh for Windows
> > > (95/98/NT/2000/XP) and tried to model a simple 2D rectangle with
> > > structured grid. But I failed to get it work no matter what I tried in
> > > the program. It always showing a triangle grid or a unstructured one.
> > > Since I am new to Gmsh, please don't blame me if I asked something
> > > stupid like this. Appreciated for your help!
> > >
> > > Best,
> > > Simon
> > > _______________________________________________
> > > gmsh mailing list
> > > gmsh at geuz.org
> > > http://www.geuz.org/mailman/listinfo/gmsh
> > >
> >
> >
> >
>