The input grids for NSU3D are stored in a Fortran unformatted data structure as described here. Following the variable description is a sample Fortran code demonstrating a how the *.cell file is read into the code.
ntetra : Number of tetrahedra
npyr : Number of pyramids
nprizm : Number of prisms
nhex : Number of hexahedra
nnode : Number of grid points
nbface3 : Number of triangular Boundary Faces
nbface4 : Number of quadrilateral Boundary Faces
npatch : Number of geometry surface patches
ncomp : Number of components (groups of patches)
nbod : Number of bodies (groups of components)
nfrpts : Obsolete.. set = 0
Ordering for cells to vertex arrays:
Tetrahedra: Points listed as right hand rule: first 3 pts ordered such
that right-hand rule of the defined face normal points inwards
and towards 4th tet vertex
Pyramid: List 1st 4 pts on quad face in same right hand rule order
pointing to 5th point
Prisms: List 3 bottom triangular face pts using inward right-hand rule,
and 3 upper tri face pts pointing in same direction: ie up and
OUTWARDS
Hexahedra: List 4 bottom triangular face pts using inward right-hand rule,
and 4 upper tri face pts pointing in same direction: ie up and
OUTWARDS
----------------------------------------------------------------------------------
Triangular Boundary Faces: List 3 points ordered by right-hand rule defined
normal facing inwards to computational domain
Quadrilateral Boundary Faces: List 4 points ordered by right-hand rule defined
normal facing inwards to computational domain
ifbc: This is an obsolete dummy array
ifpat: Surface patch id for each boundary face (tri and quads)
The remaining entries are not needed by the flow solver in its present form and can be skipped by entering dummy values:
fspln: Designed to contain surface parameter coordinates, but can be
skipped by specifying any dummy value
icomp: Component id for each surface patch
ibod : Body id for each component
ifrpts: Obsolete
Example Fortran Code:
Cell Type Definitions
NSU3D accepts mixed element hybrid grids with cells of the types tetrahedral, prism, pyramid and hexahedral. The numbering of element nodes and edges is shown in the image below: