[Gmsh] GMSH_Boundary Layer

claudio claudio.comis at alice.it
Tue Feb 8 15:32:46 CET 2011


Dear Sirs,

I have a great problem.
I have build the geometry of a simple wind tunnel, with a bump located
on the bottom. I built a boundary layer; the other part of the 3D mesh
is a structured mesh.
I succeeded in doing that, but a terrible problem remains: there is an
unwanted intersection between the boundary layer mesh and the rest of
the structured mesh.
I cannot find the proper commands to prevent this intersection.
I enclose the simple .geo file along with a screen shot.
I hope You can Help me, or forward this e mail to someone can resolve
this problem.


Yours sincerely,

Claudio Comis
--
Ing. Claudio Comis Da Ronco
University of Padova
Department of Mechanical Engineering
Via Venezia, 1 - 35131 Padova, Italy
Phone  3494552408
claudio.comis at unipd.it
claudio.comis at alice.it
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Problem.png
Type: image/png
Size: 104997 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20110208/09516539/attachment.png>
-------------- next part --------------

lc = 0.5;

dx = 2.0;
dy = 1.0;
dz = 5.0;
dy_bl = 0.05;
nx = 100;
ny1 = 10;//0.9;//(dy/(2*dy_bl))*ny2;
ny2 = 100;
nz = 1;

//cx = dx/nx;
//cy = dy/ny;
//cz = (cx + cy)/2;

Point(1) = {0.0,0.0,0.0,lc};
Point(2) = {0,dy,0.0,lc};
Point(3) = {dx,dy,0.0,lc};
Point(4) = {dx,0,0.0,lc};
Point(5) = {dx,0,0.0,lc};
Point(6) = {dx/2,0,0.0,lc};
Point(7) = {dx/2-0.2,0,0.0,lc};
Point(8) = {dx/2-0.05,dy/8,0.0,lc};
Point(9) = {dx/2+0.05,dy/8,0.0,lc};
Point(10) = {dx/2+0.2,0,0.0,lc};
Point(11) = {0,dy_bl,0.0,lc};
Point(12) = {dx,dy_bl,0.0,lc};
Point(13) = {0,dy-dy_bl,0.0,lc};
Point(14) = {dx,dy-dy_bl,0.0,lc};
Line(2) = {2,3};
Line(3) = {14,12};
Line(5) = {11,13};
Line(1) = {1,11};
Line(6) = {12,4};
Line(7) = {13,2};
Line(8) = {3,14};


Spline(4) = {4,10,9,8,7,1};

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

Plane Surface(6) = {5};
old = Geometry.ExtrudeReturnLateralEntities;
Printf("lateral entities = %g", old);
Geometry.ExtrudeReturnLateralEntities = 0;
e1[]= Extrude {0,0,1.000000} {Surface{6}; Layers{1}; Recombine;};

cells[0] = 0;
heights[0] = 0.01;
For i In {1:5}
  cells[i] = 1;
  heights[i] = heights[i-1] * 1.2;
EndFor
tmp[] = Extrude {Surface{49}; Layers{cells[],heights[]}; Recombine;};
Printf("top surface = %g", tmp[0]);
Extrude {Surface{19}; Layers{cells[],heights[]}; Recombine;};
Geometry.ExtrudeReturnLateralEntities = old;

// Top surface
//Physical Surface(33) = {15};

// Bottom surface
//Physical Surface(34) = {23};

// Left surface
//Physical Surface(35) = {19};

// Right surface
//Physical Surface(36) = {27};

// Front surface
//Physical Surface(37) = {28};

// Back surface
//Physical Surface(38) = {6};

// Box volume
//Physical Volume (39) = {32};

Transfinite Line {1,8} = (ny1) + 1 Using Progression 1;
Transfinite Line {7,6} = (ny1) + 1 Using Progression 1;
Transfinite Line {5,3} = (ny2) + 1 Using Progression 1.0;
Transfinite Line {2,4} = nx + 1 Using Progression 1.0;
//Transfinite Line {1,3} = ny + 1 Using Progression 1.0;
//Transfinite Line {14,18,13,22} = nz + 1 Using Progression 1.0;

Transfinite Surface {6} = {3,2,1,4};
Recombine Surface {6};
//Transfinite Surface {27} = {5,14,2,3};
//Transfinite Surface {15} = {5,3,4,6};
//Transfinite Surface {28} = {6,10,14,5};
//Transfinite Surface {23} = {14,2,1,10};
//Transfinite Surface {19} = {6,10,1,4};
//Surface Loop(1000) = {14:28:2}; // the sphere (only need for internal mesh)
Surface Loop(1001) = {72};//tmp[{0:14:2}]};  // The outside of the BL
Surface Loop(1002) = {21,25,29,33,6,37,41,45,49,50}; // the box (entire farfield surface loop)

//Volume(1000) = {1000}; /// inside the sphere
//Volume(1) = {1002, 1001}; /// FarField

Mesh.Algorithm3D = 4;
Mesh.Smoothing = 100;
Mesh.Optimize=1;
Mesh.OptimizeNetgen=1;
Mesh.OptimizeNetgen=1;