pyNastran
pyNastran copied to clipboard
New NASTRAN SOL144 files crash OP2 reader
Siemens' most recent NASTRAN version changed its SOL144 *.op2 files to include add'l tables not yet accounted for in the existing OP2 reader.
Using Simcenter Nastran 2022.1
At least one new table is tripping this issue, the only one identified so far is
b'OAEROTV'
(When using Simcenter Nastran 2020.1 the issue does not come up.)
Traceback (most recent call last):
File "C:\Users\Datum000\path2file\my_pynastran_tool.py", line 690, in <module>
main(
File "C:\Users\Datum000\path2file\my_pynastran_tool.py", line 58, in main
max_dict = make_boom_VMT_plots(
File "C:\Users\Datum000\path2file\my_pynastran_tool.py", line 180, in make_boom_VMT_plots
op2.read_op2(op2_path)
File "C:\Users\Datum000\anaconda3\envs\my_pynastran_env\lib\site-packages\pyNastran\op2\op2.py", line 553, in read_op2
table_names = OP2_Scalar.read_op2(self, op2_filename=op2_filename,
File "C:\Users\Datum000\anaconda3\envs\my_pynastran_env\lib\site-packages\pyNastran\op2\op2_interface\op2_scalar.py", line 1704, in read_op2
table_names = self._read_tables(table_name)
File "C:\Users\Datum000\anaconda3\envs\my_pynastran_env\lib\site-packages\pyNastran\op2\op2_interface\op2_scalar.py", line 1902, in _read_tables
raise NotImplementedError(msg)
NotImplementedError: Invalid Table = b'OAEROTV'
If you have matrices that you want to read, see:
model.set_additional_matrices_to_read(matrices)
matrices = {
b'BHH' : True,
b'KHH' : False,
} # you want to read some matrices, but not others
matrices = [b'BHH', b'KHH'] # assumes True
If you the table is a geom/result table, see:
model.set_additional_result_tables_to_read(methods_dict)
methods_dict = {
b'OUGV1' : [method3, method4],
b'GEOM4SX' : [method3, method4],
b'OES1X1' : False,
}
If you want to take control of the OP2 reader (mainly useful for obscure tables), see:
methods_dict = {
b'OUGV1' : [method],
}
model.set_additional_generalized_tables_to_read(methods_dict)
Best, -Datum000
Can you make a small example, so I can add support for it? My access to nastran is not as good as it used to be.
closing due to inactivity