SteveDoyle2 / pyNastran

A Python-based interface tool for Nastran's file formats
Other
393 stars 154 forks source link

Grid point forces from OptiStruct -> runtime Error #710

Closed DenisWalch closed 1 year ago

DenisWalch commented 2 years ago

Hello,

PyNastran had been working great to compare Siemens NX, MSC Nastran and Altair OptiStruct. I uploaded decks and associated op2 files for reference. tests.MSCAltair.zip

When requesting GPFORCES=ALL, two errors occured : DEBUG: op2.py:542 combine=True DEBUG: op2.py:543 -------- reading op2 with read_mode=1 (array sizing) -------- INFO: op2_scalar.py:1556 op2_filename = 'FEM.Altair.GPF.2021.op2' DEBUG: op2_reader.py:270 mode = 'optistruct' DEBUG: op2_scalar.py:1735 table_name=b'CASECC' DEBUG: op2_scalar.py:1735 table_name=b'GEOM1S' DEBUG: op2_scalar.py:1735 table_name=b'GEOM2S' DEBUG: op2_scalar.py:1735 table_name=b'GEOM3S' DEBUG: op2_scalar.py:1735 table_name=b'GEOM4S' DEBUG: op2_scalar.py:1735 table_name=b'EPTS' DEBUG: op2_scalar.py:1735 table_name=b'MPTS' DEBUG: op2_scalar.py:1735 table_name=b'OUGV1' DEBUG: op2_scalar.py:1735 table_name=b'OES1X' DEBUG: op2_scalar.py:1735 table_name=b'OEF1X' DEBUG: op2_scalar.py:1735 table_name=b'OGPFB1' ERROR: op2_reader.py:4897 isubtable=-8 ndata = 36: ints = (4, -10, 4, 4, 1, 4, 4, 0, 4) ndata = 500: strings = (b'\x04\x00\x00\x00\xf6\xff\xff\xff\x04\x00\x00\x00\x04\x00\x00\x00\x01\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\x00\x00\x00\x00\x04\x00\x00\x00\x04\x00\x00\x00\n\x00\x00\x00\x04\x00\x00\x00(\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00F-OF-MPC\xd9Q\xc2\xac\x97\x0eZ/\x82\xa4k/\x00\x00\x00\x80\x00\x00\x00\x80\x00\x00\x00\x80(\x00\x00\x00\x04\x00\x00\x00\n\x00\x00\x00\x04\x00\x00\x00(\x00\x00\x00\x0b\x00\x00\x00\xbc\x00\x00\x00QUAD4 \x13[;\xae\x8f\xd9b\xae\xf6\x9b\xaf\xaf\xe5\xf6\xad\xackcD+\x18S\xed+(\x00\x00\x00\x04\x00\x00\x00\n\x00\x00\x00\x04\x00\x00\x00(\x00\x00\x00\x0b\x00\x00\x00\x05\x00\x00\x00RBE3 \xd9Q\xc2\xac\x97\x0eZ/\x82\xa4k/\x00\x00\x00\x80\x00\x00\x00\x80\x00\x00\x00\x80(\x00\x00\x00\x04\x00\x00\x00\n\x00\x00\x00\x04\x00\x00\x00(\x00\x00\x00\x0b\x00\x00\x00\x00\x00\x00\x00TOTALSN\xa5S\xae4X!/\xd4&\xe7\xae\xe5\xf6\xad\xackcD+\x18S\xed+(\x00\x00\x00\x04\x00\x00\x00\n\x00\x00\x00\x04\x00\x00\x00(\x00\x00\x00\x15\x00\x00\x00\x00\x00\x00\x00F-OF-MPC\x9a\x12\xfe+\xd1r\xba/[li/\x00\x00\x00\x80\x00\x00\x00\x80\x00\x00\x00\x80(\x00\x00\x00\x04\x00\x00\x00\n\x00\x00\x00\x04\x00\x00\x00(\x00\x00\x00\x15\x00\x00\x00\xbc\x00\x00\x00QUAD4 s\xc4\x88\xae\x08\x18\x8a\xaf\x9b%u\xaeo\x1e\xa5\xab\x07\xb2\x16\xab\x0b\xf7Y,(\x00\x00\x00\x04\x00\x00\x00\n\x00\x00\x00\x04\x00\x00\x00(\x00\x00\x00\x15\x00\x00\x00\xbd\x00\x00\x00QUAD4 Nn\x8e.\xb2\x04\xd5\xae\xcbF`\xaf\x18\xa2\x94+\xd5\xc3\xb6+\r\xbbJ\xac(\x00\x00\x00\x04\x00\x00\x00\n\x00\x00\x00\x04\x00\x00\x00(\x00\x00\x00\x15\x00\x00\x00\x05\x00\x00\x00RBE3 \x9a\x12\xfe+\xd1r\xba/[li/',) ints = (4, -10, 4, 4, 1, 4, 4, 0, 4, 4, 10, 4, 40, 11, 0, 1179594054, 1129336109, -1396551207, 794431127, 795583618, -2147483648, -2147483648, -2147483648, 40, 4, 10, 4, 40, 11, 188, 1145132369, 538976308, -1371841773, -1369253489, -1347445770, -1397885211, 725902187, 736973592, 40, 4, 10, 4, 40, 11, 5, 860176978, 538976288, -1396551207, 794431127, 795583618, -2147483648, -2147483648, -2147483648, 40, 4, 10, 4, 40, 11, 0, 1414485034, 710102081, -1370249906, 790714420, -1360582956, -1397885211, 725902187, 736973592, 40, 4, 10, 4, 40, 21, 0, 1179594054, 1129336109, 738071194, 800748241, 795438171, -2147483648, -2147483648, -2147483648, 40, 4, 10, 4, 40, 21, 188, 1145132369, 538976308, -1366768525, -1349904376, -1368054373, -1415242129, -1424575993, 744093451, 40, 4, 10, 4, 40, 21, 189, 1145132369, 538976308, 781086286, -1361771342, -1352644917, 731161112, 733397973, -1404388595, 40, 4, 10, 4, 40, 21, 5, 860176978, 538976288, 738071194, 800748241, 795438171) floats = (5.605193857299268e-45, nan, 5.605193857299268e-45, 5.605193857299268e-45, 1.401298464324817e-45, 5.605193857299268e-45, 5.605193857299268e-45, 0.0, 5.605193857299268e-45, 5.605193857299268e-45, 1.401298464324817e-44, 5.605193857299268e-45, 5.605193857299268e-44, 1.5414283107572988e-44, 0.0, 13259.318359375, 208.3014678955078, -5.522898544746413e-12, 1.9832167852396054e-10, 2.1431570407237643e-10, -0.0, -0.0, -0.0, 5.605193857299268e-44, 5.605193857299268e-45, 1.401298464324817e-44, 5.605193857299268e-45, 5.605193857299268e-44, 1.5414283107572988e-44, 2.634441112930656e-43, 773.3330688476562, 1.3563182276334254e-19, -4.2599767463569194e-11, -5.15796814981595e-11, -3.194313147325545e-10, -4.944366530784672e-12, 6.977115825194946e-13, 1.6862925986127486e-12, 5.605193857299268e-44, 5.605193857299268e-45, 1.401298464324817e-44, 5.605193857299268e-45, 5.605193857299268e-44, 1.5414283107572988e-44, 7.006492321624085e-45, 4.592795477265099e-08, 1.3563156426940112e-19, -5.522898544746413e-12, 1.9832167852396054e-10, 2.1431570407237643e-10, -0.0, -0.0, -0.0, 5.605193857299268e-44, 5.605193857299268e-45, 1.401298464324817e-44, 5.605193857299268e-45, 5.605193857299268e-44, 1.5414283107572988e-44, 0.0, 3561881075712.0, 1.8767020543934004e-13, -4.812266557463474e-11, 1.467420074341419e-10, -1.0511561066017805e-10, -4.944366530784672e-12, 6.977115825194946e-13, 1.6862925986127486e-12, 5.605193857299268e-44, 5.605193857299268e-45, 1.401298464324817e-44, 5.605193857299268e-45, 5.605193857299268e-44, 2.942726775082116e-44, 0.0, 13259.318359375, 208.3014678955078, 1.805294845905192e-12, 3.391478486935995e-10, 2.1229722146909324e-10, -0.0, -0.0, -0.0, 5.605193857299268e-44, 5.605193857299268e-45, 1.401298464324817e-44, 5.605193857299268e-45, 5.605193857299268e-44, 2.942726775082116e-44, 2.634441112930656e-43, 773.3330688476562, 1.3563182276334254e-19, -6.219460363388052e-11, -2.5119128999051554e-10, -5.573995084939831e-11, -1.1732402159167488e-12, -5.353776775206265e-13, 3.097469112797735e-12, 5.605193857299268e-44, 5.605193857299268e-45, 1.401298464324817e-44, 5.605193857299268e-45, 5.605193857299268e-44, 2.942726775082116e-44, 2.6484540975739043e-43, 773.3330688476562, 1.3563182276334254e-19, 6.477006431193644e-11, -9.686952628928935e-11, -2.0397832034557695e-10, 1.0561022542598941e-12, 1.298623209834704e-12, -2.8809760566766984e-12, 5.605193857299268e-44, 5.605193857299268e-45, 1.401298464324817e-44, 5.605193857299268e-45, 5.605193857299268e-44, 2.942726775082116e-44, 7.006492321624085e-45, 4.592795477265099e-08, 1.3563156426940112e-19, 1.805294845905192e-12, 3.391478486935995e-10, 2.1229722146909324e-10) Traceback (most recent call last): File "D:\Data\b0514815\softs\Anaconda3\envs\BAWIN383\lib\site-packages\pyNastran\op2\op2_interface\op2_reader.py", line 4894, in _read_subtables self.read_3_markers([op2.isubtable, 1, 0]) File "D:\Data\b0514815\softs\Anaconda3\envs\BAWIN383\lib\site-packages\pyNastran\op2\op2_interface\op2_reader.py", line 4266, in read_3_markers self.read_3_markers4(markers, macro_rewind=macro_rewind) File "D:\Data\b0514815\softs\Anaconda3\envs\BAWIN383\lib\site-packages\pyNastran\op2\op2_interface\op2_reader.py", line 4294, in read_3_markers4 raise FortranMarkerError(f'imarker={imarker}; markers={markers}; ' pyNastran.op2.errors.FortranMarkerError: imarker=0; markers=[-8, 1, 0]; marker_actual=(-10, 1, 0) table_name=b'OGPFB1' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "", line 1, in File "D:\Data\b0514815\softs\PyCharm Community Edition 2019.2\helpers\pydev_pydev_bundle\pydev_umd.py", line 197, in runfile pydev_imports.execfile(filename, global_vars, local_vars) # execute the script File "D:\Data\b0514815\softs\PyCharm Community Edition 2019.2\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile exec(compile(contents+"\n", file, 'exec'), glob, loc) File "P:/Denis Walch/Victor/tests.pynAltair/TestRead.os.py", line 11, in femRes.read_op2(f, skip_undefined_matrices=True) File "D:\Data\b0514815\softs\Anaconda3\envs\BAWIN383\lib\site-packages\pyNastran\op2\op2.py", line 553, in read_op2 table_names = OP2_Scalar.read_op2(self, op2_filename=op2_filename, File "D:\Data\b0514815\softs\Anaconda3\envs\BAWIN383\lib\site-packages\pyNastran\op2\op2_interface\op2_scalar.py", line 1588, in read_op2 table_names = self._read_tables(table_name) File "D:\Data\b0514815\softs\Anaconda3\envs\BAWIN383\lib\site-packages\pyNastran\op2\op2_interface\op2_scalar.py", line 1755, in _read_tables op2_reader.read_results_table() File "D:\Data\b0514815\softs\Anaconda3\envs\BAWIN383\lib\site-packages\pyNastran\op2\op2_interface\op2_reader.py", line 4663, in read_results_table self.read_results_table4() File "D:\Data\b0514815\softs\Anaconda3\envs\BAWIN383\lib\site-packages\pyNastran\op2\op2_interface\op2_reader.py", line 4686, in read_results_table4 self._read_subtables() File "D:\Data\b0514815\softs\Anaconda3\envs\BAWIN383\lib\site-packages\pyNastran\op2\op2_interface\op2_reader.py", line 4907, in _read_subtables raise RuntimeError('marker0 < isubtable; marker0=%s isubtable=%s' % ( RuntimeError: marker0 < isubtable; marker0=-10 isubtable=-8

If you have time to fix these RunTime errors, I could run the deck with Altair OptiStruct a single time to produce an op2 that I can exploit with an another tool for GPF AND getting displacements for instance. Right now, I need to run it twice. Once for the GPF, Once without to be able to extract stuff using pynastran.

Thanks !

SteveDoyle2 commented 2 years ago

That's odd...I'll take a look at it. I don't have a ton of time these days, so sorry about the delay.

Can you make a model with fewer subcases? 60 is a lot to try and understand, so ideally 1. It just large and bad for testing. Fewer elements is good too. Results don't need to be particularly meaningful.

SteveDoyle2 commented 1 year ago

closing due to innactivity