[Gmsh] spline with many points

Christophe Geuzaine cgeuzaine at uliege.be
Wed Nov 4 08:52:20 CET 2020



> On 4 Nov 2020, at 03:57, Purvis Bedenbaugh <pbedenbaugh at gmail.com> wrote:
> 
> 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.
>  

We still need to improve error messages (and prevent crashes...) when the requested mesh size is not appropriate. Here, the default mesh size is much too coarse. Add e.g.

Characteristic Length{:} = radius/10;

at the end of your script and you should be fine.

Christophe



>  
> 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 for Windows 10
>  
> _______________________________________________
> gmsh mailing list
> gmsh at onelab.info
> http://onelab.info/mailman/listinfo/gmsh

— 
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science 
http://people.montefiore.ulg.ac.be/geuzaine







More information about the gmsh mailing list