op2 - Case Control Information

66 views
Skip to first unread message

Philipp Jörg

unread,
May 6, 2014, 6:02:58 AM5/6/14
to pynast...@googlegroups.com
Hi!

Each LoadCase or Subcase has a:
- Subcase ID
- MPC Set
- SPC Set
- Load Set
- Thermal Load Set

I'd like to exctract this information out of an op2 - file.

case A:
In some op2-files a Case Control Information CASECC block exists, where the information is stored.

case B:
If CASECC is missing I can catch the information from GEOM3 or GEOM4:
MPC Set from the record MPC or MPCADD
SPC Set from SPC, SPCADD, etc.
LOAD Set from LOAD, PLOAD, FORCE, etc.
Thermal Load Set from TEMP, TEMPD, etc.
- the SubcaseID's I can receive only from the result tables (OEF, OES) - fourth word

case C:
If CASECC and the IFP-Tables (GEOM3, GEOM4) are missing - i can extract:
Subcase ID from the result tables (OEF, OES) - 4th word
Load Set from the result tables - 8th word
Thermal Load Set from the result tables - 23th word

But where can I see the SPC and MPC Set in case C?

Thx - kind regards!

Philipp

Steven Doyle

unread,
May 6, 2014, 1:07:12 PM5/6/14
to Philipp Jörg, pynast...@googlegroups.com
Philipp,
 
I don't know what your procedure for generating the OP2 is, but I'd focus on always assuming a case and then finding out what PARAM card you need to generate that case.  I'd choose case A as case B isn't going to be very robust (not all cards are supported) and requires load tracing (e.g. LOAD=1 points to a LOAD card, which points to a FORCE=2).
 
If you have SPCFORCES=ALL and MPCFORCES=ALL, you can probably get the information from there, but then you need to include those, which will increase the size of your OP2.
The other suggestion is to just read the BDF.  That's probably the best choice.
 
Steve

--
You received this message because you are subscribed to the Google Groups "pyNastran dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Philipp Jörg

unread,
May 7, 2014, 4:53:51 AM5/7/14
to pynast...@googlegroups.com, Philipp Jörg
Hi Steve!

Thanks for your reply.
That's true - the only stable search is case C -> read from the results tables, to get
SubcaseID, LoadSet and Thermal Load Set.

In my op2-file GEOM3 and GEOM4 are missing.
The MPCFORCES are unchecked - so I cant find the MPCSetID - o.k.
I have SPCFORCES=ALL but cant find the SPCSetID in the op2?

Kind regards

Philipp

Philipp Jörg

unread,
May 13, 2014, 3:31:52 AM5/13/14
to pynast...@googlegroups.com
Dear Steve!

We have several large op2-files, containing only results data (OFP-tables like OEE, OQG, etc.) - IFP-tables like GEOM3, etc. are completely missing.
Using pyNastran - how can we extract only the SubcaseID's (integer) out of the op2-file -
without stepping through all the tables (OEE, etc.) reading each ident block (SUBCASE - word 4).

Kind regards

Philipp

Steven Doyle

unread,
May 13, 2014, 2:10:40 PM5/13/14
to Philipp Jörg, pynast...@googlegroups.com
Philipp,
 
I think I'm just confused on the use case for this.  If I understand correctly, you want to partially read a table for it's metadata and not read results.  Are there cases you do want to read the results for a given table?  If there's not, you can find the appropriate table4 function for the table you're interested in and modify it.  You can do this externally to pyNastran.
 
For the OEE/ONR (strain energy table) you can do something like:
 
 
class OP2_mod(OP2):
    def __init__(*args, **kwargs):  # might need fixing
        OP2.__init__(*args, **kwargs)  # might need fixing
        self.onr_meta_data_for = {}
 
    def _read_onr1_4(self, data): 
        # save the parameters of interest
        return len(data)
 
op2 = OP2_mod()
op2.read_op2(op2_filename)
 
 
Also, the GEOM-type tables are disabled as they are buggy and increase the complexity of the OP2 class (they use the BDF class).  You can reenable them in op2.py by uncommenting the inheritances and updating the table_mapper in the _get_table_mapper function to point to the proper table3 or table4 function instead of _table_passer.
 
Steve
 

--
Reply all
Reply to author
Forward
0 new messages