Introduction
NASTRAN is a finite element analysis
program developed for NASA, which released the NASTRAN-95 version as open source.
Commercial descendants and many other solvers, meshers and converters use the same
style of input. A model is a text file of “cards”, one per grid point, element,
property, material, load or constraint, usually named .nas or
.bdf (bulk data file).
The card layout described here follows the NASTRAN-95 User’s Manual. Where later readers differ, this page follows pyNastran, which reads decks of current versions, and says so.
The data deck
A complete input file is divided into decks, in this order:
| Part | Begins and ends | Contents |
|---|---|---|
| NASTRAN card | Optional, first if present | Operating parameters |
| Executive control | From the ID card to CEND | Job name, solution type, time and diagnostics. Current decks name the solution with SOL |
| Substructure control | SUBSTRUCTURE to ENDSUBS | Only in substructure analyses |
| Case control | After CEND up to BEGIN BULK | Subcases, the selection of load and constraint sets, output requests |
| Bulk data | After BEGIN BULK to before ENDDATA | The model |
A line with $ in column 1 is a comment, in any deck. Bulk data cards may
come in any order; the program sorts them. Many files hold only bulk data cards, with
no executive or case control, so that they can be included in another deck.
NASTRAN-95 reads other files with READFILE name, which may be nested.
Current decks use INCLUDE followed by a file name, which pyNastran
resolves against the folder of the including file.
ID DEMO,PLATE
SOL 101
CEND
SUBCASE 1
LOAD = 2
SPC = 3
BEGIN BULK
$ four grid points and one plate
GRID,1,,0.0,0.0,0.0
GRID,2,,1.0,0.0,0.0
GRID,3,,1.0,1.0,0.0
GRID,4,,0.0,1.0,0.0
CQUAD4,10,20,1,2,3,4
PSHELL,20,30,0.01
MAT1,30,2.1+11,,0.3
SPC1,3,123456,1,4
FORCE,2,3,0,100.0,0.0,0.0,1.0
ENDDATA
2.1+11 is 2.1 × 1011.Fixed fields
The basic card is ten fields of 8 columns. Field 1 holds the card name, fields 2 to 9 hold data and field 10, columns 73 to 80, is free for an identifier. A value may sit anywhere inside its field but may not contain blanks.
In the large field form a card name followed by * gives data fields of
16 columns. Each logical card then takes two lines: columns 1–8, four fields of 16
columns, and columns 73–80. The second line starts with * and holds the
remaining four data fields.
| Form | Columns of the data fields on one line |
|---|---|
| Small field | 9–16, 17–24, 25–32, 33–40, 41–48, 49–56, 57–64, 65–72 |
| Large field | 9–24, 25–40, 41–56, 57–72 |
pyNastran also expands tab characters to the next multiple of 8 columns, and rejects a line that mixes tabs and commas.
Continuation lines
A card with more than eight data values continues on further lines. In NASTRAN-95,
field 10 of the line and field 1 of its continuation carry a matching unique
identifier: the continuation has + in column 1 (or * for
large fields) followed by the seven characters from columns 74–80 of the line above.
Column 73 is not compared. Small and large field lines may be mixed within one card.
A continuation is needed only if it holds data, but an empty one must be written when
a later line holds data.
pyNastran also accepts continuation lines whose first field is blank, and drops a
trailing + or * marker unless it begins a number such as
+1.5.
Free fields
Free field lines separate values with commas. They are recognised in NASTRAN-95 by a
comma or equals sign in the first ten columns, after BEGIN BULK, and may
use blanks as separators as well. They make only small field cards. Integers and words
are limited to 8 characters and real numbers to 12.
NASTRAN-95 adds shorthand that generates cards: = repeats a field of the
card before, == repeats all remaining fields, *(i) adds an
increment, %(E) steps to an end value and =(N) repeats the
operation N times. A continuation that follows its parent directly may simply
begin with a comma. pyNastran does not accept the equals sign shorthand, and in its
reading a free field large card (name with *) has four data values to a
line.
Values
| Type | Rules |
|---|---|
| Integer | Digits with an optional sign |
| Real | Must contain a decimal point or be in a recognisable exponent form. 7.0 may be written 7.0, .7E1, 0.7+1, 70.-1 or .70+1 |
| Double precision | A decimal point and an exponent with D, as 7.0D0; used in few places |
| Word | One to eight letters and digits, starting with a letter |
| Blank | Zero, or the card’s default |
The exponent without a letter, such as 2.1+11, is common in real files
and is the point most general number parsers get wrong.
Grid points and coordinate systems
In these tables, fields are numbered from the card name in field 1. Fields 12 onward are fields 2 onward of the first continuation line.
| Card | Data fields in order, from field 2 |
|---|---|
GRID | ID; CP, coordinate system of the position; X1, X2, X3; CD, coordinate system of displacements and constraints; PS, permanent constraints as digits 1–6 |
CORD2R | CID; RID, reference system; A1–A3; B1–B3; continuation: C1–C3 |
For CORD2R, point A is the origin, B lies on the z axis and C lies in the
x–z plane, all given in system RID; 0 is the basic system. CORD2C and
CORD2S define cylindrical and spherical systems. In a cylindrical system
X1, X2, X3 are radius, angle in degrees and z; in a spherical system radius and two
angles in degrees. GRDSET sets defaults for CP, CD and PS.
Elements
| Card | Data fields in order, from field 2 |
|---|---|
CBAR | EID; PID; GA; GB; X1 or G0; X2; X3; F (1 = fields 6–8 are a vector, 2 = field 6 is a grid point); continuation: PA, PB (pin flags); Z1A–Z3A; Z1B–Z3B (offsets) |
CTRIA3 | EID; PID; G1–G3; TM, material angle in degrees (real) or coordinate system (integer); ZO, offset; continuation: two blank fields, T1–T3 |
CQUAD4 | EID; PID; G1–G4; TM; ZO; continuation: two blank fields, T1–T4 |
CTETRA | EID; PID; G1–G4; with ten nodes, G5–G10 follow |
CHEXA | EID; PID; G1–G6; continuation: G7, G8; with twenty nodes, G9–G14 on the same line and G15–G20 on a third (current decks, from pyNastran) |
CPENTA | EID; PID; G1–G6; with fifteen nodes, G7–G14 and G15 on continuations (pyNastran) |
CPYRAM | EID; PID; G1–G5; with thirteen nodes, G6 on the first line and G7–G12 and G13 following (pyNastran) |
CIHEX1 | EID; PID; G1–G6; continuation: G7, G8. The eight node hexahedron of NASTRAN-95 |
In CIHEX1, G1 to G4 go round one face, counter-clockwise seen from inside
the element, and G5 to G8 round the opposite face in the same direction, with G5 next
to G1.
Properties, materials, loads and constraints
| Card | Data fields in order, from field 2 |
|---|---|
PBAR | PID; MID; area A; I1; I2; J; non-structural mass NSM; blank; continuation: stress points C1, C2, D1, D2, E1, E2, F1, F2; second continuation: K1, K2, I12 |
PSHELL | PID; MID1 (membrane); thickness T; MID2 (bending); 12I/T³ (default 1.0); MID3 (transverse shear); TS/T (default 0.833333); NSM; continuation: Z1, Z2; MID4; MCSID; SCSID; ZO |
MAT1 | MID; Young’s modulus E; shear modulus G; Poisson’s ratio NU; density RHO; expansion coefficient A; TREF; damping GE; continuation: stress limits ST, SC, SS; MCSID |
FORCE | load set SID; grid point G; coordinate system CID; scale F; vector N1, N2, N3. The force is F times N |
SPC1 | set SID; components C as digits 1–6; grid points G1 onward, continuing on further lines. Alternative form: SID, C, first point, THRU, last point |
In MAT1, a blank value among E, G and NU is computed from
E = 2(1 + NU)G. Load and constraint sets take effect only when the case control deck
selects them, for example with LOAD = 2.
Reading a file
- Find
BEGIN BULKandENDDATA. If there is neither, the file may be an included part holding bulk data only. - Skip comments, and join each card with its continuation lines.
- For each line choose free, large or small fields from the commas and the
*. - Interpret fields by card name. A card name the reader does not know can be kept as text.
There is no signature. A text file with lines starting GRID followed by
element cards beginning with C, or with BEGIN BULK, is very
likely bulk data.
Not described
The explorer has no Nastran viewer, so a dropped file shows as text.
Known, not yet covered
- Reference: most bulk data entries. Only the cards in the tables above are described; the NASTRAN-95 manual describes many more, and current commercial versions more again.
- Reference: the executive control and case control commands.
- Reference: the order of mid-edge nodes in the higher order solid elements.
- Reference: differences between the dialects of current commercial solvers, whose own guides were not used.
- Viewer: there is no Nastran plugin.
Also used for
- Glyph Bitmap Distribution Format – A bitmap font in plain text: each glyph as rows of hexadecimal pixels.
Links
Software
- NASTRAN-95 – NASA’s released solver source, manuals and sample decks (Fortran)
Developers
- pyNastran – reads, edits and writes bulk data decks (Python)
Reference
- NASTRAN-95 User’s Manual, bulk data deck – card formats and every card of that version
- NASTRAN-95 User’s Manual, data deck and executive control – deck order and included files
- pyNastran field splitting – how current decks are cut into fields (Python)
- pyNastran solid elements – layouts of CHEXA, CPENTA, CPYRAM and CTETRA (Python)