[Gmsh] experimenting with ThruSections

Marco Antolovic marco_antolovic at yahoo.it
Tue Oct 24 08:46:10 CEST 2017


Dear all,
The code below is trying to create a cylinder using ThruSections. I manage to create and mesh the cylinder but I always get an error during meshing (there is a strange curve inside the cylinder geometry...). To my knowledge there is no example on how to use so ThruSections I went on by trial & error.
I'm aware that the command Cylinder will give the same result but I'm really curious about ThruSections...
My code is as follows:
// define constantslc0 = 0.0025;rd = .0025;Mesh.CharacteristicLengthMin = lc0;Mesh.CharacteristicLengthMax = lc0;
// Create base circle line loopbase_circle = newl; Circle(newl) = {0,0,0, rd};base_circle_ll = newll; Line Loop (newll) = {base_circle};
// Create base circle surface, this will be used to draw the wire connecting upper and base circlebase_circle_surface = news; Plane Surface (news) = {base_circle_ll};
// Create upper circle line loopupper_circle = Translate { 0, 0, .02 } { Duplicata{ Line { base_circle }; }};upper_circle_ll = newll; Line Loop (newll) = {upper_circle};
// Create upper circle surface, this will be used to draw the wire connectiong upper and base circleupper_circle_surface = news; Plane Surface (news) = {upper_circle_ll};
// Build wire connectiong upper and base circleextrac_points() = PointsOf { Surface{ base_circle_surface, upper_circle_surface }; };line_cylinder = newl; Line (line_cylinder) = { extrac_points(0), extrac_points(1) };wire_cylinder = newl; Wire (wire_cylinder) = { line_cylinder };
// Create ruled surfaceRuled ThruSections { base_circle_ll, upper_circle_ll, wire_cylinder }


And the error log can be found here:
how_to_create_throughsection_OPENCASCADE_V06.c'Info    : Finalized high order topology of periodic connectionsInfo    : Meshing 1D...Info    : Meshing curve 1 (Circle)Info    : Meshing curve 2 (Circle)Info    : Meshing curve 6 (Line)Info    : Meshing curve 7 (Bezier)Info    : Meshing curve 8 (BSpline)Info    : Meshing curve 9 (BSpline)Info    : Done meshing 1D (0.011603 s)Info    : Meshing 2D...Info    : Meshing surface 3 (Plane, MeshAdapt)Info    : Meshing surface 5 (Plane, MeshAdapt)Info    : Meshing surface 6 (Unknown, MeshAdapt)Info    : 0 points that are duplicated for Delaunay meshingInfo    : Meshing surface 7 (BSpline surface, MeshAdapt)Error   : Could not open file 'debugp.pos'Error   : Could not open file 'debugr.pos'Error   : Unable to recover the edge 16 (7/7) on GEdge 2 (on GFace 7)Error   : Could not open file 'wrongmesh.pos'Error   : Could not open file 'wrongparam.pos'Info    : Done meshing 2D (0.07397 s)Info    : Meshing 3D...Info    : Done meshing 3D (7e-06 s)Info    : 126 vertices 258 elementsError   : ------------------------------Error   : Mesh generation error summaryError   :     0 warningsError   :     5 errorsError   : Check the full log for detailsError   : ------------------------------
Any suggestion on how to make this work is much appreciated.

Many thanks,
Marco
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20171024/cb3d62ca/attachment.html>


More information about the gmsh mailing list