[Gmsh] 2D meshing problem; extrude; 360 rotation; revolution solid.
Gustavo Charles Peixoto de Oliveira
gustavo.oliveira at uerj.br
Thu Mar 26 21:05:16 CET 2015
Thank you Prof. Geuzaine!
I didn't think on it!
;)
Regards,
On Thu, March 26, 2015 15:14, Christophe
Geuzaine wrote:
>
>> On 26 Mar 2015, at 05:49, Gustavo Charles Peixoto de Oliveira
>> <gustavo.oliveira at uerj.br> wrote:
>>
>>
>>
>>
>> Dear Gmshers,
>>
>> I'm trying to generate a revolution solid from a cosine function
profile
>> and sequential 2D surface meshing. Although I could get to the
surface
>> after a rotation around the x-axis with the 'Extrude' command,
Gmsh
>> returns an error if I try to mesh this "apparently
closed" resulting
>> solid.
>>
>> My insight is that there's a problem with overlapped entities
after the
>> 2*pi rotation, however I can't get rid of the error. I tried a
full
>> rotation of 2*pi and 4 partial rotations of pi/2 with the same
profile,
>> but both the strategies haven't work, while non-overlapping
angles ( <
>> 2*pi) have produced the expected mesh.
>>
>> Could someone help me to understand what's going wrong and how
can I
>> have the mesh working? Or maybe an alternative way. The .geo is
like
>> below.
>>
>> Thankfully,
>>
>
> Extrude in 2 steps:
>
> /* Defaults */
> Geometry.Surfaces = 1; //
>
> /* Settings */
> x0 = 0.0;
> y0 = 0.0;
> z0 = 0.0;
> c1 = 0.05;
> amp = 0.05;
> r1 = 0.5*amp;
> t0 = 2.0;
> R0 = 0.5;
> lambda = 2*R0;
> L = lambda;
>
> /* Discretization */
> np = 10;
> nt = 10;
> dx = L/(np - 1);
> Geometry.ExtrudeSplinePoints = nt;
>
> // initial point
> X[0] = x0 - lambda/2;
> Y[0] = y0 + r1;
> P0 = newp;
> P[0] = P0;
> Point(P0) = {X[0],Y[0],z0,c1};
>
> // 'revolution' profile
> For p In {1:np-1}
> X[p] = X[0] + p*dx;
> Y[p] = Y[0] + amp*Sinh(t0)*(1.0 + Cos(2*Pi*X[p]/lambda) );
> Pp = newp;
> Point(Pp) = {X[p],Y[p],z0,c1};
> P[p] = Pp;
> L = newl;
> Line(L) = {P[p-1],P[p]};
> extr[] = Extrude{ {0,0,0}, {1,0,0}, {0,0,0}, Pi }{ Line{L};};
> extr2[] = Extrude{ {0,0,0}, {1,0,0}, {0,0,0}, Pi }{
Line{extr[0]};};
> EndFor
>
>
>
> --
> Prof. Christophe Geuzaine
> University of Liege, Electrical Engineering and Computer Science
> http://www.montefiore.ulg.ac.be/~geuzaine
>
>
>
>
--
Gustavo PEIXOTO DE OLIVEIRA, Dr.
State University of Rio de Janeiro
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.geuz.org/pipermail/gmsh/attachments/20150326/95d63777/attachment.html>