I created a volume mesh based on a simple cylinder in Netgen GUI 6.2.2004 with the option “Second order elements”.
I exported the mesh in ELMER format but it seems there is an error in the mesh files. The information between mesh files are different:
mesh.boundary → 306 type (quadratic triangle elements) ok
mesh.elements → 510 type (quadratic tetrahedrons elements) ok
mesh.header → indicates linear types: 303 and 504 (linear triangle and tetrahedron elements) (why?)
By using this mesh as this, the calculation in ELMER seems working. However there are pretty much triangles missing in the post-processing view of the .vtu files in Paraview.
I attached the geometry, the ELMER mesh and the .VTU output file of ELMER.
Thanks for helping.
After discussion in the ELMER forum, it seems that the problem is coming from the ordering of nodes in the mesh.elements.
The mesh.elements contains the node indexes of each element.
For quadratic tetrahedrons, there are 10 nodes.
An illustration of the problem. For example here the node #6 is not at the correct location:
Correct node ordering: 1 2 3 4 5 6 7 8 9 10
WRONG node ordering: 1 2 3 4 5 7 8 6 9 10 (ordering coming from Netgen export to Elmer format)
Moreover as I said, the mesh.header must also be corrected:
mesh.header indicates linear types: 303 and 504 instead of 306 and 510 (linear triangles and linear tetrahedrons instead of quadratic triangles and quadratic tetrahedrons).
Please, is it possible to include this correction in the next release of Netgen ?
Any comments would be appreciated.
thank you for pointing this out, and also providing the solution.
We’ll have the fix very soon in the nightly releases,
Two small questions about this topic.
- Can Netgen/NGSolve generate 3D brick elements while meshing? I see that in 2D, quads can be generated, but what about bricks in 3D?
- Where are element nodal orderings defined, such as what file(s) contains the actual internal ordering of nodes for elements generated by Netgen/NGSolve?
I’m currently implementing the fixes for the ELMER format export.
During this process I coincidentally did a documentaion of the node numbering in Netgen
The file is attached, the source code for it will be merged into master later today.
Excellent! the documentation of the node numbering looks great.
Thanks for taking care of this issue!
Testing a recent nightly build that includes the revised Elmer format code, using the sample geometry file ‘Cube.geo’, generating a mesh and exporting the Elmer format works properly.
Using the same nightly build, Netgen crashes on writing a 2D mesh.
Open Netgen GUI, and load the sample file ‘square.in2d’, click on generate mesh.
File → Export Filetype → Elmer format
Start of output log
Developed by Joachim Schoeberl at
2010-xxxx Vienna University of Technology
2006-2010 RWTH Aachen University
1996-2006 Johannes Kepler University Linz
Including OpenCascade geometry kernel
optfile ./ng.opt does not exist - using default values
togl-version : 2
OCC module loaded
Load 2D-Spline geometry file C:/Code/Elmer/1-examples/test-netgen-181/square.in2d
Load 2D Geometry V2
Generate Mesh from spline geometry
Meshing done, time = 0.011713 sec
Export mesh to file C:\Code\Elmer\1-examples\test-netgen-181\square-netgen… Please Wait!
Export mesh to file C:\Code\Elmer\1-examples\test-netgen-181\square-netgen, format is Elmer Format
write elmer mesh files
<<< end of output log.
If more details are needed, please ask.