It is also possible to read a finite element model from an “op2” file with “readOp2” method. The model stored in the file is imported into the NastranDb if the second string argument of the method is “Model” or “Model/Results”. The first String argument is the name of the “op2” file.
The format of these files is described in [Rey04]. One describes in section III.1.1.2 the reading of finite element entities, and in section III.1.1.8 the reading of Results. The reading of 32bits as well as 64bits “op2” files is possible. However there is no advantage in reading 64bits version. Actually, these files are larger and may take a longer time to read.
Note that the reading of “op2” files also checks the endianness of the file and, if needed, does corrections to the binary data. For example, it can switch the reading from little endians to big endians or reversely. This allows “op2” files produced on a machine to be read on another machine with different “endianness” so that the portability of results is improved. Also, the 32/64 bits version is checked when the file is opened.
Finite element entities are read into the NastranDb with method “readOp2” if one specifies “Model” or “Model/Results” for the entities to read. The finite element entities recognized by the method corresponding to the Nastran cards supported by the “readBdf” method (see section III.1.1.1). The corresponding Data Blocks in the “op2” file are “GEOM1”, “GEOM2”, “GEOM3”, “GEOM4”, “EPT” and “MPT” (see [Rey04]).
Note that one generally prefers to read FE entities from a Bulk Data File than from an “op2” file because the data stored are sometimes ambiguous in the “op2” file (orientation of material properties on 2D elements,...). However, the reading of op2 files is faster than the reading of BDF files.
The correct working of method “readOp2” has not been tested for many of the Nastran cards listed above. So, bugs are likely to occur when testing FeResPost for new finite element models. In order to reduce the gravity of such bugs, The NastranDb class allows to disable or enable some of the Nastran cards. See section III.1.1.8 for the use of the corresponding singleton methods. Note that the disabling of Nastran cards also influences the “readBdf” method.