[Gmsh] Surface mesh contains ugly elements

Martin Vymazal martin.vymazal at vki.ac.be
Wed Oct 30 13:44:43 CET 2013


Hello,

 the surface was only a part of a 3D geometry. I'm sending the whole thing.

 Best regards,

   Martin Vymazal


On Wednesday 30 October 2013 13:33:38 Jean-François Remacle wrote:
> could you attach the .geo file ?
> 
> Le 30 oct. 2013 à 12:14, Martin Vymazal <martin.vymazal at vki.ac.be> a écrit :
> > Hello,
> > 
> > I'm trying to generate a surface mesh of a bump given by a sine function.
> > I
> > tried
> > 1) to take the contour of the bump (defined by a spline) and extrude it
> > 2) generate two contours (front and back), then create a line loop and a
> > surface
> > 
> > In both cases, I have a bad mesh at the beginning and at the end of the
> > bump. I'd prefer to have a fully unstructured mesh, but transfinite will
> > do as well. Unfortunately neither of them works (see attached pictures).
> > 
> > Does anyone have an idea how to fix it?
> > 
> > Thank you.
> > 
> >  Martin Vymazal
> > 
> > <bump_ruled_surface.png><bump_transfinite_surface.png>____________________
> > ___________________________ gmsh mailing list
> > gmsh at geuz.org
> > http://www.geuz.org/mailman/listinfo/gmsh
> 
> ------------------------------------------------------------------
> Prof. Jean-Francois Remacle
> Universite catholique de Louvain (UCL)
> Ecole Polytechnique de Louvain (EPL) - Louvain School of Engineering
> Institute of Mechanics, Materials and Civil Engineering (iMMC)
> Center for Systems Engineering and Applied Mechanics (CESAME)
> Tel : +32-10-472352 -- Mobile : +32-473-909930
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bump_contour.geo
Type: text/x-csrc
Size: 12334 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20131030/b3f7f301/attachment.geo>
-------------- next part --------------
Include "bump_contour.geo";

Mesh.Algorithm = 2; //1=MeshAdapt, 2=Automatic, 5=Delaunay, 6=Frontal, 7=bamg, 8=delquad
Mesh.Algorithm3D = 1; //1=Delaunay, 4=Frontal, 5=Frontal Delaunay, 6=Frontal Hex, 7=MMG3D
Mesh.CharacteristicLengthFromPoints = 1;
Mesh.CharacteristicLengthExtendFromBoundary = 1;

// =============================================================
// SURFACES
// =============================================================

// Left wall
Line Loop(1) = {1:4};
Plane Surface(1) = {1};

// Extrusion of the domain contour
out[] = Extrude{0,0,2*W}{ Surface{1}; };

nb_pts_length = 50;
nb_pts_width  = 15;
nb_pts_height = 15;

Transfinite Line{1} = nb_pts_length Using Bump 0.90;
Transfinite Line{3} = nb_pts_length Using Bump 0.90;
Transfinite Line{6} = nb_pts_length Using Bump 0.90;
Transfinite Line{8} = nb_pts_length Using Bump 0.90;

Transfinite Line{11}  = nb_pts_width;
Transfinite Line{12}  = nb_pts_width;
Transfinite Line{16}  = nb_pts_width;
Transfinite Line{20}  = nb_pts_width;


Transfinite Line{2}  = nb_pts_height;
Transfinite Line{4}  = nb_pts_height;
Transfinite Line{7}  = nb_pts_height;
Transfinite Line{9}  = nb_pts_height;

Transfinite Surface{13};

dist = 1.5;

Field[1] = Box;
Field[1].XMin = 2.0 - dist;
Field[1].XMax = 2.0 + dist;
Field[1].YMin =  0.0;
Field[1].YMax =  0.4;
Field[1].ZMin = -W;
Field[1].ZMax =  W;
Field[1].VIn =   0.5*lc;
Field[1].VOut =  0.8*lc;

Field[2] = Min;
Field[2].FieldsList = {1};

Background Field = 2;

// =============================================================
// PHYSICAL ENTITIES
// =============================================================
Physical Surface("Inlet") = {25};
Physical Surface("Outlet") = {17};
Physical Surface("SymmetryLeft") = {1};
Physical Surface("SymmetryRight") = {26};
Physical Surface("Bottom") = {13};
Physical Surface("Top") = {21};

Physical Volume("Fluid") = {1};