[Gmsh] transfinite surfaces

Dr Colin J. Cotter colin.cotter at imperial.ac.uk
Tue Jul 13 18:15:09 CEST 2010


OK, I have the answer to my own question: need to reduce mesh smoothing.

--cjc

Dr Colin J. Cotter wrote:
> Dear Gmsh,
> 	I'm trying to make a structured mesh that has fine vertical resolution
> in a middle layer, and then gradually increasing resolution at the top
> and the bottom. I thought I might be able to do this using the
> transfinite surface algorithm, but what I got was that the mesh graded
> the resolution at the sides, but adjusted to equispaced resolution in
> the middle. What did I do wrong?
> 
> I have included the .geo file at the bottom of this email.
> 
> all the best
> --Colin
> 
> 
> lc = 0.05;
> H = 1.0;
> L = 10.0;
> LayerH = 0.1;
> BottomLeft = newp; Point(BottomLeft) = {0.0, -H, 0, lc};
> BottomRight = newp; Point(BottomRight) = {L, -H, 0, lc};
> TopRight = newp; Point(TopRight) = {L, H, 0, lc};
> TopLeft = newp; Point(TopLeft) = {0.0,H,0,lc};
> LayerBottomLeft = newp; Point(LayerBottomLeft) = {0.0, -LayerH, 0, lc};
> LayerBottomRight = newp; Point(LayerBottomRight) = {L, -LayerH, 0, lc};
> LayerTopRight = newp; Point(LayerTopRight) = {L, LayerH, 0, lc};
> LayerTopLeft = newp; Point(LayerTopLeft) = {0.0,LayerH,0,lc};
> 
> Bottom = newl; Line(Bottom) = {BottomLeft, BottomRight};
> BelowRightL = newl; Line(BelowRightL) = {BottomRight,LayerBottomRight};
> LayerRightL = newl; Line(LayerRightL) = {LayerBottomRight,LayerTopRight};
> TopRightL = newl; Line(TopRightL) = {LayerTopRight,TopRight};
> Top = newl; Line(Top) = {TopRight,TopLeft};
> TopLeftL = newl; Line(TopLeftL) = {TopLeft,LayerTopLeft};
> LayerLeftL = newl; Line(LayerLeftL) = {LayerTopLeft,LayerBottomLeft};
> BelowLeftL = newl; Line(BelowLeftL) = {LayerBottomLeft,BottomLeft};
> 
> AboveLayer = newl; Line(AboveLayer) = {LayerTopLeft, LayerTopRight};
> BelowLayer = newl; Line(BelowLayer) = {LayerBottomLeft, LayerBottomRight};
> 
> Line Loop(1) = {Bottom,BelowRightL,-BelowLayer,BelowLeftL};
> Plane Surface(1) = {1};
> Line Loop(2) = {BelowLayer,LayerRightL,-AboveLayer,LayerLeftL};
> Plane Surface(2) = {2};
> Line Loop(3) = {AboveLayer, TopRightL, Top, TopLeftL};
> Plane Surface(3) = {3};
> 
> layerwidth = 20;
> outsidelayerwidth = 20;
> domainwidth = 20;
> outsideprogression = 1.1;
> 
> Transfinite Line{Bottom} = domainwidth+1;
> Transfinite Line{Top} = domainwidth+1;
> Transfinite Line{AboveLayer} = domainwidth+1;
> Transfinite Line{BelowLayer} = domainwidth+1;
> Transfinite Line{BelowRightL} = outsidelayerwidth+1 Using Progression
> 1.0/outsideprogression;
> Transfinite Line{TopRightL} = outsidelayerwidth+1 Using Progression
> outsideprogression;
> Transfinite Line{BelowLeftL} = outsidelayerwidth+1  Using Progression
> outsideprogression;
> Transfinite Line{TopLeftL} = outsidelayerwidth+1  Using Progression
> 1.0/outsideprogression;
> Transfinite Line{LayerLeftL} = layerwidth+1;
> Transfinite Line{LayerRightL} = layerwidth+1;
> 
> 
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh