[Gmsh] spline with many points

Purvis Bedenbaugh pbedenbaugh at gmail.com
Wed Nov 4 03:57:41 CET 2020


The following test program, which generates a helical pipe by extruding a disk along a spline.

When the number of turns of the helix is 4, it generates an attractive helix, and 3D-mesh creates an attractive mesh.
When the number of turns of the helix is 5, it generates an attractive helix, and 3D mesh crashes gmsh.
When the number of turns is 12, the helix is ugly, and 3D mesh crashes gmsh.

I would very much appreciate your insight into diagnosing the error.


SetFactory("OpenCASCADE");
bottom = 0;
steps = 3000;

bodyturns = 12;

pitch = 5;  // vertical mm/turn
turnsteps =20;   // reference points for each turn of the helix

radius = 2.5;
lc = 0.05;

argmult =   2*Pi/pitch ;
nsteps = bodyturns*turnsteps;

For ii In {0:nsteps}
    zpos = (pitch/turnsteps) * ii;
    xpos = radius*Cos(argmult*(zpos));
    ypos = radius*Sin(argmult*(zpos));
    Point(ii) = {xpos, ypos, zpos, lc};
EndFor

Disk(1000) = {radius, 0, 0, 0.5};
jcoef = -pitch/Sqrt(pitch^2 + 4 * Pi^2);
kcoef = (2 * Pi)/Sqrt(pitch^2 + 4 * Pi^2);
Rotate {{-1, 0, 0}, {radius,0,0}, Asin(kcoef)} { Surface{1000}; }
Spline(2000) = {0:nsteps};
Wire(3000) = {2000};
Extrude { Surface{1000}; } Using Wire{3000}

Sent from Mail<https://go.microsoft.com/fwlink/?LinkId=550986> for Windows 10

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20201104/ccae2496/attachment.html>


More information about the gmsh mailing list