Menu

Nodes and Elements

Jeffrey Thomsen

Node Files

In NC.inp the data of the geometry is given in the NODES section, where you can list the filenames containing the nodal information for different parts of the mesh.
The files containing the nodal data have the following format
%d
%d %f %f %f
..
%d %f %f %f
where the first line contains the number of nodes in the file all following lines are given by
1. Node number
2. x-coordinate
3. y-coordinate
4. z-coordinate
The node number is used to identify a given node in the element list. Node numbers do not need to start with 0. Also the node numbers do not need to be contiguous. Having said that, we have to note, that the ncdata2vtk.m script assumes that the node indices of the object mesh are contiguous, the same goes for the evaluation mesh. Every node has to have a unique node number.

Element files

In the ELEMENT section of NC.inp you are able to list the names of the files containing the element data of your mesh. The files containing the element data have the following format
%d
%d %d %d %d %d %d %d %d
or
%d %d %d %d %d %d %d
It is possible to define triangular as well as quadrilateral elements. The first line contains the number of elements defined in the file followed by lines with
1) Number of the element. This is needed for defining the boundary conditions
2)-4) or 2)-5) Number of the nodes (3 or 4) generating the element. The nodes should be
given counter-clock wise, otherwise the normal vector points in the wrong direction. You
haven’t really worked with BEM unless you have defined the normal vector wrong at least
once, and wondered for about half a day why your results look so funny.
5) or 6) Type of the element: 0 indicates an element on the boundary, 2 indicates an element
of the evaluation mesh
6) or 7) dummy: set it to 0
7) or 8) number of the element group. As already mentioned it is possible to define element
groups, for example if you only want to represent certain parts of your mesh. In general,
we use 0 for boundary elements and 1 for evaluation elements.
So how does NumCalc know if the element is a triangle or a quadrilateral? Quite simple,
it counts entries in the line, if the line contains only 7 elements, the element is a triangle, if it
contains 8 entries, we have a quadrilateral, otherwise NumCalc will stop with an error.
Example

2016 7938 7939 7940 7941 0 0 0
2017 7942 7943 7944 0 0 0

defines two elements on the boundary with numbers 2016 and 2017. The first one is a quadrilateral spanned by the nodes with numbers 7938, 7939, 7940, and 7941 the second one is a triangle spanned by nodes 7942, 7943, and 7944. Both elements are in the element group 0.

655 2522 2523 2524 2525 2 0 1

defines a quadrilateral of the evaluation mesh with element number 655 with nodes 2522, 2523, 2524, and 2525 as vertices. The element belongs to the element group 1.
Like for the nodes, jumps in the element indices are allowed, every element has to have a unique number (take care when combining eval mesh and object mesh) .
Warning: It is only possible to define different element groups in the object mesh, each element of the evaluation mesh has to be in the same group.


Related

Wiki: Evaluation grids
Wiki: Mesh2HRTF 1.0 and above
Wiki: NumCalc
Wiki: Structure of NC.inp

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.