[Gmsh] Problem making a bulged cylinder using Gmsh

Geordie McBain gdmcbain at freeshell.org
Mon Jan 16 23:30:03 CET 2012


2012/1/16  <rahulsn at iitk.ac.in>:
> Hello friends,
>
> I am having problem making a simple geometry in Gmsh. I am trying to
> make a cylinder with a bulge. The bulged part of the cylinder is based
> on a 2D equation. The cylinder part is Ok but i am not able to draw the
> bulged part of the cylinder in Gmsh. I tried to import the Iges file
> from solidworks and save it as .geo file but the saved .geo has a lot of
> splines in it. I was thinking is there a simpler way to draw this
> geometry directly into Gmsh. I have attached IGS file for the same geometry.

Hello.  It's usually better to Merge a CAD geometry into Gmsh and then
work with that; unrolling it as .geo is generally recommended against,
I believe.  In this fashion, I have made an extremely coarse mesh of
your surface, as shown in the attached image.  See
https://geuz.org/trac/gmsh/wiki/STLRemeshing for a proper example.
That approach certainly works, I have used it to generate
three-dimensional finite element meshes with millions of tetrahedra
for FreeFem++.

On the other hand if you do want to work at the .geo level, depending
on what your "2D equation" is like, you may well be able to define the
shape in .geo commands yourself.  If it's a little too complicated for
that, you might be able to write a script in your preferred language
that writes the .geo file.  Once you've constructed the generatrix, I
think Extrude with rotation should do the trick, shouldn't it?
<http://geuz.org/gmsh/doc/texinfo/gmsh.html#Extrusions>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Geometry.png
Type: image/png
Size: 39597 bytes
Desc: not available
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20120117/20e546b8/attachment.png>