fails to read OEFIT in op2 with Nastran 2021.1

115 views
Skip to first unread message

clarkbr...@gmail.com

unread,
Jul 8, 2022, 7:21:26 PM7/8/22
to pyNastran Discuss
Steve,
I just upgraded to MSC Nastran 2021.1 from 2018.1.  I appear to be using pyNastran 1.3.3. Near as I can tell, that is the current/latest. If not, point me at how to upgrade.
Note that while this model looks like an A-10, it is not representative of a real A-10. It is total fiction. The .dat that has composite elements and asks for the Hill index.
The model solves in 2021.1 and there are no apparent Nastran gripes in the .f06
This model solves and the op2 reads when using MSC Nastran 2018.1
Reading the 2021.1 .op2, I get an error like
failed reading b'OEFIT' isubtable=-4
AssertionError: flag='\x00\x00\x00\x00' flagb=b'\x00\x00\x00\x00'
The call back trace goes
Traceback (most recent call last):

  File "H:\CPACS\HCBTrials\A-10\get_stress_results.py", line 92, in <module>
    pressure_load_results = get_pressure_load_stress_results(op2_fname, dat_fname, 'wing', params,bVerbose)

  File "..\Pythonfiles\get_results.py", line 358, in get_pressure_load_stress_results
    op2 = read_op2(op2_fname, combine = True, build_dataframe = False, skip_undefined_matrices = False, encoding = None)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\op2.py", line 1295, in read_op2
    encoding=encoding)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\op2.py", line 564, in read_op2
    OP2_Scalar.read_op2(self, op2_filename=self.op2_filename, mode=mode)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\op2_interface\op2_scalar.py", line 1588, in read_op2
    table_names = self._read_tables(table_name)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\op2_interface\op2_scalar.py", line 1755, in _read_tables
    op2_reader.read_results_table()

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\op2_interface\op2_reader.py", line 4663, in read_results_table
    self.read_results_table4()

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\op2_interface\op2_reader.py", line 4686, in read_results_table4
    self._read_subtables()

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\op2_interface\op2_reader.py", line 4885, in _read_subtables
    self._read_subtable_3_4(table3_parser, table4_parser, passer)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\op2_interface\op2_reader.py", line 5010, in _read_subtable_3_4
    unused_n = op2._read_subtable_results(table4_parser, record_len)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\fortran_format.py", line 81, in _read_subtable_results
    n = table4_parser(data, ndata)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\tables\oef_forces\oef.py", line 435, in _read_oef1_4
    n = self._read_oef1_loads(data, ndata)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\tables\oef_forces\oef.py", line 1320, in _read_oef1_loads
    prefix, postfix)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\tables\oef_forces\oef.py", line 2592, in _oef_shells_composite
    n = oef_shells_composite_real_9(self, data, obj, nelements, ntotal, dt)

  File "C:\ProgramData\Anaconda3\lib\site-packages\pyNastran\op2\tables\oef_forces\oef.py", line 3983, in oef_shells_composite_real_9
    assert flag in ['', '-1', '-2', '-12', 'IN'], f'flag={flag!r} flagb={flagb!r}'

AssertionError: flag='\x00\x00\x00\x00' flagb=b'\x00\x00\x00\x00'

Perhaps not surprisingly, pyNastranGUI 1.3.4 can't read the MSC Nastran 2021.1 op2 but it can read the 2018.1 op2. It presents the same error. It can read the .dat.
If there is anything else I can provide to help, please let me know.
Sincerely,
Clark
Clark Briggs
A-10PressureLoad.dat
A-10_struct.dat
a-10pressureload.op2
a-10pressureload.f06

Steven Doyle

unread,
Jul 10, 2022, 3:23:34 PM7/10/22
to pyNastran Discuss
Clark,

I would give main/1.4-dev a try.  Looks like that works.

Steve


--
You received this message because you are subscribed to the Google Groups "pyNastran Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pynastran-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynastran-discuss/af36d790-38df-4449-b013-7927dac14a19n%40googlegroups.com.

clarkbr...@gmail.com

unread,
Jul 17, 2022, 7:34:18 PM7/17/22
to pyNastran Discuss
Steve,
Thanks. That looks encouraging. But...how to I install that particular version? The github page looks like v1.3.4 is current. I did get 1.3.4 to install, but that didn't fix it. The main doesn't appear to offer a 1.4-dev branch. I googled around and tried this and that, but I can't figure it out.
I have been using pip install pyNastran in an anaconda shell (as admin, coz... that's the way we do it). Carry me a little further please.
Clark

Steven Doyle

unread,
Jul 19, 2022, 1:19:23 AM7/19/22
to pyNastran Discuss
You can either clone the repo, which is nice if you want to just "pull" the new changes every so often:
and run:
>>> python setup.py develop

or you can download it from:
and just run:
 >>> pip install main.zip
If you wanted the latest, you would redownload and reinstall that.

clarkbr...@gmail.com

unread,
Nov 10, 2023, 12:37:47 PM11/10/23
to pyNastran Discuss
Steve,
I'm trying to do this. I did both download and install main.zip and then git clone and python setup.py. Both seemed to succeed and pip list shows pyNastran                  1.4.0+dev.no.checksum.error, but...
Both my Python function and test_op2 conclude with the error 
File C:\ProgramData\anaconda3\lib\site-packages\pyNastran\bdf\subcase.py:11
    from pyNastran.bdf.bdf_interface.subcase.utils import (

ModuleNotFoundError: No module named 'pyNastran.bdf.bdf_interface.subcase'

Clark

steve

unread,
Nov 11, 2023, 5:26:32 PM11/11/23
to pyNastran Discuss
It looks like Anaconda is having trouble with the install and might be conflicting with an old install.

I would delete all files/folders named pyNastran (e.g., pyNastran.egg-link, pyNastran-1.3.4-py3.9.whl), out of C:\ProgramData\anaconda3\lib\site-packages.  If you have C:\ProgramData\anaconda3\lib\site-packages\easy_install.pth, I'd delete out pyNastran related lines (e.g., c:\code\git\pynastran).  Then try to install again.
Reply all
Reply to author
Forward
0 new messages