CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   Mesh Generation & Pre-Processing (https://www.cfd-online.com/Forums/mesh-generation/)
-   -   How to extrude unstructured mesh from a surface with more than 5 points (https://www.cfd-online.com/Forums/mesh-generation/237522-how-extrude-unstructured-mesh-surface-more-than-5-points.html)

PenPencil July 21, 2021 16:33

How to extrude unstructured mesh from a surface with more than 5 points
 
2 Attachment(s)
Hello everyone,

I am trying to simply extrude an unstructured 2D mesh for some length. My 2D mesh is fine, but when I extrude, it seems that Gmsh does not extrude the elements as well, so what I am left with is a mesh without interior elements.

Please check the first image to see the geometry and the 2D unstructured mesh. The second image shows the net result after extrusion. Is there any workaround that I am missing out here?
Thanks.

Below you find my code:
Code:

lc=1.0;
Point(1) = {0, 5, 0, lc};
Point(2) = {0, 0, 0, lc};
Point(3) = {5, 5, 0, lc};
Point(4) = {5, 0, 0, lc};
Point(5) = {2.5, -2.5, 0, lc};
Line(1) = {2, 1};
Line(2) = {4, 3};
Line(3) = {5, 4};
Line(4) = {5, 2};
Line(5) = {1, 3};
Curve Loop(1) = {1, 5, -2, -3, 4};
Plane Surface(1) = {1};
Transfinite Surface {1,2,3,4,5};
//Extrude {0, 0, 50} {
//  Point{1}; Point{2}; Point{5}; Point{3}; Point{4}; Curve{1}; Curve{4}; Curve{5}; Curve{2}; Curve{3}; Surface{1};
//  Layers {5};
//}

Correction: the title of this thread should refer to surface with more than 4 points, not 5.

PenPencil July 21, 2021 18:07

I have figured out the problem. For future reference for anyone, here is the corrected code:

lc=1.0;
Point(1) = {0, 5, 0, lc};
Point(2) = {0, 0, 0, lc};
Point(3) = {5, 5, 0, lc};
Point(4) = {5, 0, 0, lc};
Point(5) = {2.5, -2.5, 0, lc};
Line(1) = {2, 1};
Line(2) = {4, 3};
Line(3) = {5, 4};
Line(4) = {5, 2};
Line(5) = {1, 3};
Curve Loop(1) = {1, 5, -2, -3, 4};
Plane Surface(1) = {1};
//Transfinite Surface {1,2,3,4,5};
Extrude {0, 0, 50} {
Point{1}; Point{2}; Point{5}; Point{3}; Point{4}; Curve{1}; Curve{4}; Curve{5}; Curve{2}; Curve{3}; Surface{1};
Layers {5};
}


All times are GMT -4. The time now is 04:42.