[Gmsh] Gmsh doubt
Christophe Geuzaine
cgeuzaine at ulg.ac.be
Sat Dec 14 20:26:21 CET 2013
On 14 Dec 2013, at 19:16, Joaquín Aranciaga <joa90_ at hotmail.com> wrote:
> Hello,
>
> I was wondering if you could help me out with one mesh I need to create with Gmsh. I need to make a tube's quarter structured mesh with hexahedron elements. For that, I wrote this code:
>
> Lc=1;
> Point(1) = {0, 0, 5, Lc};
> Point(2) = {0, 0, 10, Lc};
> Line(1) = {2, 1};
>
> Extrude {1, 0, 0} {
> Line{1};
> }
> Transfinite Line {1} = 10 Using Progression 1;
> Transfinite Surface {5};
> Extrude {{1, 0, 0}, {0, 0, 0}, -Pi/2} {
> Surface{5};
> }
> //;Layers{8}
> Transfinite Line {17, 13, 4, 8, 21, 12, 3, 10, 7, 9, 2, 1} = 10 Using Progression 1;
> Transfinite Surface {14};
> Transfinite Surface {18};
> Transfinite Surface {22};
> Transfinite Surface {22};
> Transfinite Surface {26};
> Transfinite Surface {27};
> Recombine Surface {22, 14, 18, 26, 5, 27};
>
>
> I can make a perfect 2D mesh with this code. But when I click on the 3D mesh, the program fills the geometry with unstructured hexahedra. I can't find the way to get what I need! Besides, if I put "Layers{n}" inside the Extrude command, it doesn't even work with the 3D mesh. What's the reason for that? How can I do to create the mesh I require?
>
> I'd appreciate it if you could give me a hand with this.
Use the "Layers" and "Recombine" options in extrusions:
Lc=1;
Point(1) = {0, 0, 5, Lc};
Point(2) = {0, 0, 10, Lc};
Line(1) = {2, 1};
Extrude {1, 0, 0} {
Line{1}; Layers{10};
}
Transfinite Surface {5};
Recombine Surface {5};
Extrude {{1, 0, 0}, {0, 0, 0}, -Pi/2} {
Surface{5}; Layers{10}; Recombine;
}
> Thanks in advance, and let me congratulate you for this amazing program. It's been really useful to many people I know.
>
> Greetings,
> Joaquín.
>
>
>
> _______________________________________________
> gmsh mailing list
> gmsh at geuz.org
> http://www.geuz.org/mailman/listinfo/gmsh
--
Prof. Christophe Geuzaine
University of Liege, Electrical Engineering and Computer Science
http://www.montefiore.ulg.ac.be/~geuzaine