tarres...@gmail.com
unread,May 26, 2015, 7:04:21 AM5/26/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to pynast...@googlegroups.com
Hi Steve,
Althoug this is not the correct forum to aks this question, it's the only I found to find some help me about.
I’m working on a free-source Java parser for Nastran OP2 files.
The purpose is to write a java library to open an op2 file and retrieve data to manipulate Nastran Results to, for example, average stress values, etc.
I have two sources of information to know which the file format of op2 files:
1.- pyNastran documention/code (thanks very much for your invaluable job!!!)
2.- DMAP programmer’s guide (pdf from MSC)
I’m able to open an op2 file, read data as integers (4-bytes), little endian, but I can´t link the data with the corresponding data structure that is defined in DMAP guide.
Perhaps this is explained within the pyNastran code, but I not Python programmer, so it´s hard to read trough the code.
I would appreciate if you could provide me with some hints/information about how to de-encrypt the data.
What I’m able to do so far is to read the file header (date, NASTRAN FORT TAPE ID CODE - XXXXXXXX ……. and separate different DATA BLOCKS (I guess there are two types of data blocks, IFP & OFP).
I have attached example of what the file includes for both, IFP & OFP blocks.
OFP Data Blocks
4, 2, 4,
8, 8-bytes length , 8, //When converted to CHAR => OES1X1
4, -1, 4,
4, 7, 4,
28, 28-bytes length , 28, //
4, -2, 4, //Marker
4, 1, 4,
4, 0, 4,
4, 7, 4,
28, 28-bytes length , 28, //
4, -3, 4, //Marker
4, 1, 4,
4, 0, 4,
4, 146, 4,
584, 584-bytes length , 584, //How to read the data, how the data is structured
4, -4, 4, //Marker
4, 1, 4,
4, 0, 4,
4, 12, 4,
120, 120-bytes length , 120, // How to read the data, how the data is structured
4, -5, 4, //Marker
4, 1, 4,
4, 0, 4,
4, 0, 4, //END OF DATA BLOCK
4, 0, 4, //END OF FILE (IF PRESENT)
IFP Data Blocks
4, 2, 4,
8, 8-bytes length , 8, //When converted to CHAR => GEOM2
4, -1, 4,
4, 7, 4,
28, 28-bytes length , 28 // (I guess) DMAP guide = Header + trailer word
4, -2, 4, //Marker
4, 1, 4,
4, 0, 4,
4, 2, 4,
8, 8-bytes length , 8, //
4, -3, 4, //Marker
4, 1, 4,
4, 0, 4,
4, 115, 4,
460, 28-bytes length , 460, //How to read the data, how the data is structured
4, -4, 4, //Marker
4, 1, 4,
4, 0, 4,
4, 3, 4,
12, 12-bytes length , 12 //I guess that this is some trailer record for IFP tables
4, -5, 4, //Marker
4, 1, 4,
4, 0, 4,
4, 0, 4, //END OF DATA BLOCK
Thanks very much in advance.
Javier