Here are some edited notes given to me by a colleague who is writing software programs to import Nastran data into Matlab.


DMAP (Direct Matrix Abstraction Programming) is the language running under the hood in the various nastran solution sequences.  All the math that happens in nastran is basically written in DMAP.  Some folks write DMAP alters to jump into the middle of a sequence of solution steps to extract info (like a stiffness matrix) or to change something in the process, or to do their own solution.  Generally only the local guru is writing alters and other folks would use them.  It’s almost like speaking Aramaic IMHO.  Old irritating language compared to Matlab.  Internally in Nastran, there is also something called NDDL (Nastran Data Definition Language)  This is even more obscure than DMAP, I think, but I used the NDDL to figure out how to parse the binary op2 files.

We were parsing nastran *.pch ascii files to read mode shapes, but we found that for large datasets the binary reader is MUCH faster.  Literally, hours vs. a couple seconds.  It’s also nice to have the data packaged into neat little Matlab structures.


An op4 file may contain matrices only and is generated using dmap alters in nastran.  These matrices maybe complex single, complex double, real single, real double or null.  The storage scheme may be dense, or two different flavors of sparse.  The files may also be ascii or binary.  I gave you an example of each of these in the zip file.  The file names hint at whether it is ascii or binary and the storage scheme (dense or sparse).   Op4 is a common format for exchanging craig bampton models.


An op2 file is generated using param,post,-1 in nastran.  I believe this is the most common binary output format in nastran, with xdb coming in second.  This format can store matrices if you write a dmap to do it, but more generally, it stores “datablocks” that have structured data of “whatever.”

– Tom Irvine

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s