I am trying to extrude a quadratic 3D mesh from a 2D CAD file using Gmsh 4.13.0.
I successfully created the mesh using linear elements (6 node prisms), however, when using quadratic elements (15 node prisms), I noticed that the additional higher order nodes on the extruded boundary are oddly displaced.
This displacement can be very small, but becomes large and clearly visible on edges with large curvature (see screenshots below).
I managed to create the following minimal reproducible example (elliptical disk, thin extrusion with 10 layers in z-direction):
SetFactory("OpenCASCADE");thickness = 0.01;nlayers = 10;Disk(1) = {0, 0, 0, 1.0, 0.5};Extrude {0, 0, thickness} { Surface{1}; Layers{ {nlayers}, {1} }; Recombine;}Mesh.ElementOrder = 2; // Quadratic elementsMesh.SecondOrderIncomplete = 1; // => Prism15// Better visibility of the problem in GUIMesh.Nodes = 1; // Show mesh nodes in GUIMesh.PointType = 1; // with 3D spheresGeometry.NumSubEdges = 500;Mesh 3;
↓ These are the nodes where the displacement is large.
↓ Close up of the displaced high order nodes (orange) on the extruded boundary. I expect them to be on a straight line with the blueish nodes on the extruded surface.
I found that the problem can be fixed for a surface mesh (2D mesh) by setting the following two options:
Mesh.HighOrderCurveOuterBL = 1; // Default: 0 (0 = do not curve, 1 = curve according to boundary, …)Mesh.HighOrderOptimize = 4; // Default: 0 (0: none, …, 4: fast curving)
↓ Then the extrusion works as I expect
But this does not work for the quadratic 3D mesh that I want.
Can this problem be fixed with any of the high order settings?
Or can you point me to an alternative way to generate the extruded mesh properly?