# Import NASTRAN File

With this option, PREFEKO can import a model from a NASTRAN file. It supports both 8-character and 16-character wide column based files as well as comma separated files. NASTRAN files in cylindrical, spherical coordinate systems, as well as files in Cartesian coordinate systems are supported. Only the keywords GRID, CTRIA3, CQUAD4, CTETRA, CBAR and CROD for nodes, triangles, quadrangles (divided into two triangles along the shortest diagonal), tetrahedral elements, and segments are processed.

NASTRAN does not support polygonal plates, but all other parameters in the general section of the IN card above apply. The label selection uses the NASTRAN properties which are converted to Feko labels.

As when importing FEMAP neutral files, the wire radius must be set with the IP card preceding the IN card, and an ME card must be used when specifying dielectric surfaces in the same way as when the IN card is not present.

The user can also import points from the NASTRAN file. The points defined in the NASTRAN file will then be available in PREFEKO as points (as if they were defined by DP cards) of the form Nxxx where xxx is the index of the grid point. This may be used, for example, to attach additional structures to the geometry. In addition, the coordinate values of the point are available as variables in PREFEKO. For example, the variables #n1234x, #n1234y and #n1234z give the coordinates of the NASTRAN grid point with index 1234.
Note: That points are not included by default.

Since grid points do not have an associated property, points are imported irrespective of their label, but they may be limited to those used for the imported geometry.

Each line in the 8-character column based format consists of one keyword such as GRID starting in column 1. From column 9 onwards follow 9 input fields with widths of 8 characters each. Thus input field 1 uses columns 9 to 16, input field 2 uses columns 17 to 24 and the rest. The ninth (and last) input field ends at column 80. Below is a very simple NASTRAN example file consisting of a plate (property 1; subdivided into eight triangles) and a rod (property 2; subdivided into two segments).

|1             |9        |17     |25      |33      |41      |49
ID XXXXXXXX,YYYYYYYY
CEND
BEGIN BULK
GRID           1             0.0     0.0     0.0
GRID           2         0.50000     0.0     0.0
GRID           3         1.00000     0.0     0.0
GRID           4             0.0 0.50000     0.0
GRID           5         0.50000 0.50000     0.0
GRID           6         1.00000 0.50000     0.0
GRID           7             0.0 1.00000     0.0
GRID           8         0.50000 1.00000     0.0
GRID           9         1.00000 1.00000     0.0
GRID          10         0.50000 0.50000 2.00000
GRID          11         0.50000 0.50000 1.00000
CROD           9       2       5      11
CROD          10       2      11      10
CTRIA3         1       1       4       5       8
CTRIA3         2       1       4       8       7
CTRIA3         3       1       5       6       9
CTRIA3         4       1       5       9       8
CTRIA3         5       1       1       2       5
CTRIA3         6       1       1       5       4
CTRIA3         7       1       2       3       6
CTRIA3         8       1       2       6       5
ENDDATA

For the node points Feko also supports 16 character wide input fields. The keyword GRID in columns 1 to 4 is followed by a star and three spaces. The node ID is then in columns 9 to 24, the x coordinate in columns 43 to 56, y in columns 57 to 72 and z in columns 9 to 24 of the next line.

For example

|1      |9              |25...     |43           |57             |73     |81
GRID*                  1              50.000000000   -18.480176926       1
*      1    23.222875595
GRID*                  2              50.000000000   -18.480176926       2
*      2   -13.410394669

For the comma separated format, the individual entries are separated by comas

GRID,1,0,-238.533,186.7983,0.000000,0
GRID,2,0,-244.777,214.3057,172.9991,0
GRID,3,0,288.0060,115.1831,339.8281,0
GRID,4,0,356.2201,50.15516,0.000000,0
CTRIA3,1,1,1,2,3,,0.0,,
CTRIA3,2,1,1,2,4,,0.0,,