�
�
�
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,

        �

        /* 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}, 2*Pi }{ Line{L};};

        EndFor

        �

        /* Same profiles adapted for partial pi/2 revolution��

        Y[0] = y0 - r1;

        P0 = newp;

        P[0] = P0;

        Point(P0) = {X[0],Y[0],z0,c1};

        �

        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/4 }{ Line{L};};

        EndFor

        �

        Z[0] = z0 + r1;

        P0 = newp;

        P[0] = P0;

        Point(P0) = {X[0],y0,Z[0],c1};

        �

        For p In {1:np-1}

        X[p] = X[0] + p*dx;

        Z[p] = Z[0] + amp*Sinh(t0)*(1.0 + Cos(2*Pi*X[p]/lambda) );

        Pp = newp;

        Point(Pp) = {X[p],y0,Z[p],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/4 }{ Line{L};};

        EndFor

        �

        Z[0] = z0 - r1;

        P0 = newp;

        P[0] = P0;

        Point(P0) = {X[0],y0,Z[0],c1};

        �

        For p In {1:np-1}

        X[p] = X[0] + p*dx;

        Z[p] = Z[0] - amp*Sinh(t0)*(1.0 + Cos(2*Pi*X[p]/lambda) );

        Pp = newp;

        Point(Pp) = {X[p],y0,Z[p],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/4 }{ Line{L};};

        EndFor

        */

�
�
�
--

Gustavo PEIXOTO DE OLIVEIRA, Dr.

State University of Rio de Janeiro

�


�


�
�
_______________________________________________
gmsh mailing list
[email protected]
http://www.geuz.org/mailman/listinfo/gmsh

Reply via email to