OSTR1ELC table read error

39 views
Skip to first unread message

James Cook

unread,
Oct 28, 2024, 11:01:12 PM10/28/24
to pyNastran Discuss
Error is this: RuntimeError: unexpected tout for b'OSTR1ELC': matrix_num=101 form=30 mrows=8 ncols=63 tout=24 nvalues=0 g=1

I am not sure what that is, a table? Here is how I read the op2:

isat = read_op2(op2_filename, build_dataframe=True, debug=False, skip_undefined_matrices=True,exclude_results='*strain_energy')

Any help is appreciated. It is an issue with any of my op2's that use composite elements. So it must be an output of some sorts for the composite parts? Did not see much in the "read_matrix.py" code as well. Thanks!


steve

unread,
Oct 28, 2024, 11:07:02 PM10/28/24
to pyNastran Discuss
That table is not supported. It's probably not a matrix and is instead a result table, but that's the fallback option.

Can you have a small example, so bdf/f06/op2 with the flags set to use PLOT, so like:
  STRAIN(PLOT,PRINT)=ALL

James Cook

unread,
Oct 30, 2024, 12:32:44 AM10/30/24
to pyNastran Discuss
Of course. The .DAT or.BDF file of a 4 element model is pasted below. 

$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$*
$*                    Simcenter v2306.0.0.7002 Translator
$*                    for Simcenter Nastran version 2306.0
$*
$*             FEM FILE: C:\Users\JamesCook\Documents\Analysis\Trial\Trial_fem1.fem
$*             SIM FILE: C:\Users\JamesCook\Documents\Analysis\Trial\Trial_fem1_sim1.sim
$*        ANALYSIS TYPE: Structural
$*        SOLUTION NAME: Tensile test
$*        SOLUTION TYPE: SOL 101 Linear Statics
$*
$*    SOLVER INPUT FILE: Laminate_ELSTRN_FIBER_CENTER_TEST.dat
$*        CREATION DATE: 29-Oct-2024
$*        CREATION TIME: 07:51:54
$*             HOSTNAME: DESKTOP-17GJO0V
$*      NASTRAN LICENSE: Desktop Bundle
$*
$*                UNITS: mm (milli-newton)
$*                      ... LENGTH : mm
$*                      ... TIME   : sec
$*                      ... MASS   : kilogram (kg)
$*                      ... TEMPERATURE : deg Celsius
$*                      ... FORCE  : milli-newton
$*                      ... THERMAL ENERGY : mN-mm (micro-joule)
$*
$*        SUBSET EXPORT: ON
$*
$* IMPORTANT NOTE:
$*     This banner was generated by Simcenter and altering this
$*     information may compromise the pre and post processing of results
$*
$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$*
$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$*
$* FILE MANAGEMENT
$*
$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$*
$*
$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$*
$* EXECUTIVE CONTROL
$*
$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$*
ID,NASTRAN,Laminate_ELSTRN_FIBER_CENTER_TEST
SOL 101
CEND
$*
$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$*
$* CASE CONTROL
$*
$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$*
ECHO = NONE
OUTPUT
DISPLACEMENT(PLOT,REAL) = ALL
ELSTRN(PLOT,FIBER,CENTER) = ALL
FORCE(PLOT,REAL,CENTER) = ALL
OTEMP(PLOT) = ALL
PLSTRN(PLOT) = ALL
SPCFORCES(PLOT,REAL) = ALL
STRAIN(PLOT,REAL,VONMISES,FIBER,CENTER) = ALL
STRESS(PLOT,REAL,VONMISES,CENTER) = ALL
THSTRN(PLOT) = ALL
$*  Step: Subcase - Statics 1
SUBCASE 1
  LABEL = Subcase - Statics 1
  LOAD = 17
  SPC = 18
$*
$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$*
$* BULK DATA
$*
$*$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$*
BEGIN BULK
$*
$* PARAM CARDS
$*
PARAM      K6ROT100.0000
PARAM     OIBULK     YES
PARAM    OMACHPR     YES
PARAM       POST      -2
PARAM    POSTEXT     YES
PARAM    UNITSYS   MN-MM
$*
$* GRID CARDS
$*
GRID*                  1               01.0000000000E+010.0000000000E+00+
*       1.2500000000E+01               0
GRID*                  2               00.0000000000E+000.0000000000E+00+
*       1.2500000000E+01               0
GRID*                  3               01.0000000000E+010.0000000000E+00+
*       0.0000000000E+00               0
GRID*                  4               01.0000000000E+010.0000000000E+00+
*       2.5000000000E+01               0
GRID*                  5               02.0000000000E+010.0000000000E+00+
*       1.2500000000E+01               0
GRID*                  6               00.0000000000E+000.0000000000E+00+
*       2.5000000000E+01               0
GRID*                  7               00.0000000000E+000.0000000000E+00+
*       0.0000000000E+00               0
GRID*                  8               02.0000000000E+010.0000000000E+00+
*       0.0000000000E+00               0
GRID*                  9               02.0000000000E+010.0000000000E+00+
*       2.5000000000E+01               0
$*
$* ELEMENT CARDS
$*
$*  Mesh Collector: Laminate
$*  Mesh: 2d_extracted_mesh(1)
CQUAD4         3       2       1       2       7       3
CQUAD4         4       2       5       1       3       8
$*  Mesh Collector: Laminate
$*  Mesh: 2d_mapped_mesh(1)
CQUAD4         1       2       9       4       1       5
CQUAD4         2       2       4       6       2       1
$*
$* PROPERTY CARDS
$*
$*  Property: Laminate1::Trial_fem1::[2]
PCOMPG         2          0.000015000.00    TSAI 20.0000  0.0000        +
+              1       60.195580  0.0000     YES                        +
+              2       60.195580 90.0000     YES                        +
+              3       60.195580  0.0000     YES                        +
+              4       60.195580 90.0000     YES                        +
+              5       60.195580  0.0000     YES                        +
+              6       60.195580  0.0000     YES                        +
+              7       60.195580 90.0000     YES                        +
+              8       60.195580  0.0000     YES                        +
+              9       60.195580 90.0000     YES                        +
+             10       60.195580  0.0000     YES
$*
$* MATERIAL CARDS
$*
$*  Material: T650-193/PW/5320-1_RTD_REV01::Trial_fem1::[6]
MAT8           66.7141+76.6727+70.0530005.0676+65.0676+65.0676+61.5440-6+
+         0.0000  0.0000        7.5017+56.2781+57.2943+55.8428+588680.21
$*
$* LOAD AND CONSTRAINT CARDS
$*
$*  Load: Force(1)
FORCE         17       4       050000.00  0.0000  0.00001.000000
FORCE         17       6       025000.00  0.0000  0.00001.000000
FORCE         17       9       025000.00  0.0000  0.00001.000000
$*  Constraint: Fixed(1)
SPC           18       3  123456  0.0000
SPC           18       7  123456  0.0000
SPC           18       8  123456  0.0000
ENDDATA 0a239f1c

I figured out that the  b'OSTR1ELC'  is an output for Elastic Strain at the Fiber Center. In the .DAT it shows in the output section as:  

ELSTRN.jpg
Not sure why I can't attach the op2 file here. I will email that to you.

Steven Doyle

unread,
Oct 30, 2024, 12:41:31 AM10/30/24
to pynastra...@googlegroups.com
Looks like it was caused by the PLSTRN. I need the f06 with PRINT to pull the data. I don't have access to NX.

INFO: op2_reader.py:3733 skipping table_name = b'OSTR1ELC' (???)
WARNING: op2_scalar.py:1856 skipping OSTR1THC (NX 2019.2 ply strains-thermal)


--
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 visit https://groups.google.com/d/msgid/pynastran-discuss/55b64d16-83fc-43a1-88ba-5f576de34c5an%40googlegroups.com.

James Cook

unread,
Oct 30, 2024, 1:19:49 AM10/30/24
to pynastra...@googlegroups.com
It is attached. What do you mean by "with PRINT"?

You received this message because you are subscribed to a topic in the Google Groups "pyNastran Discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pynastran-discuss/gndtm2KsrPY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pynastran-disc...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pynastran-discuss/CADJnEGGfJT2%2BSMHzy5JKwqSmgmQRjjXszLY3-fZOXPGMGAmY-Q%40mail.gmail.com.
laminate_elstrn_fiber_center_test.f06

Steven Doyle

unread,
Oct 30, 2024, 1:22:14 AM10/30/24
to pynastra...@googlegroups.com
You ran the model with PLOT on these two. That requests the op2:
                 13      OTEMP(PLOT) = ALL                                                                      
                 14      PLSTRN(PLOT) = ALL   
PRINT writes those tables to the F06, which helps to understand what data is in the file. Otherwise, it's just garbage.

James Cook

unread,
Oct 30, 2024, 4:59:25 AM10/30/24
to pynastra...@googlegroups.com
Understood. Attached are the updated files! Line 729 is the OSTR1ELC callout in the F06.

Laminate_ELSTRN_FIBER_CENTER_TEST.dat
laminate_elstrn_fiber_center_test.f06
laminate_elstrn_fiber_center_test.op2

James Cook

unread,
Nov 1, 2024, 12:55:27 AM11/1/24
to pynastra...@googlegroups.com
Just following up. Any guidance on how to prevent that error from happening? I don't mean to bug, I know you are very busy! Thanks for the help on this.

steve

unread,
Nov 1, 2024, 12:57:05 AM11/1/24
to pyNastran Discuss
Yup. If you download and install the latest git version, it'll at least not crash.

I need to add the results, but just busy.

Steven Doyle

unread,
Nov 1, 2024, 1:51:33 AM11/1/24
to pynastra...@googlegroups.com
That was a lot easier than expected.  It probably still fails for all the other elements, but it's a decent start. 

 You'll find plastic_strain and thermal_strain in addition to strain results in model.op2_results.

James Cook

unread,
Nov 1, 2024, 9:50:43 AM11/1/24
to pynastra...@googlegroups.com
Just by the connotation of OSTR1ELC, I read that as O-output STR-Strain EL-Elastic C-center. Just my 2 cents on it. Thanks again!

On Thu, Oct 31, 2024 at 11:52 PM James Cook <jam4...@gmail.com> wrote:
Awesome. Is Elastic strain also in there? Thank you so much!

James Cook

unread,
Nov 1, 2024, 9:50:47 AM11/1/24
to pynastra...@googlegroups.com
Awesome. Is Elastic strain also in there? Thank you so much!

Steven Doyle

unread,
Nov 2, 2024, 12:52:53 AM11/2/24
to pynastra...@googlegroups.com
Ahh...yeah I had two cancelling errors. I just diff the tables and it wrote correctly.

The code means:
OSTR - output element strain
1 - in SORT1 format
EL - elastic
C - composite
so OSTR1C is the typical total composite strain table. No idea why they split out composite vs. isotropic tables given they have different element codes (CQUAD4-centroid=33, corner=144, composite centroid=95).

I need to go through and add in:
 OSTR1PL, OSTR1PLC, OSTR1TH, OSTR1THC, OSTR1EL, OSTR1ELC

James Cook

unread,
Nov 2, 2024, 11:00:33 AM11/2/24
to pynastra...@googlegroups.com

James Cook

unread,
Nov 4, 2024, 2:59:40 PM11/4/24
to pyNastran Discuss
Hi Steve, sorry to be a pest again. I downloaded the new code successfully and when trying to run it I get the following error and I am not sure where this particular function originates. 

Traceback (most recent call last):

  File ~\anaconda3\Lib\site-packages\spyder_kernels\py3compat.py:356 in compat_exec
    exec(code, globals, locals)

  File c:\users\jamescook\documents\python_scripts\margin\readop2\test_5-hatch\results_from_op2.py:10
    from pyNastran.op2.op2 import read_op2, OP2

  File ~\anaconda3\Lib\site-packages\pyNastran\pyNastran\op2\op2.py:41
    from pyNastran.op2.writer.op2_writer import OP2Writer

  File ~\anaconda3\Lib\site-packages\pyNastran\pyNastran\op2\writer\op2_writer.py:10
    from pyNastran.op2.op2_interface.op2_f06_common import OP2_F06_Common

  File ~\anaconda3\Lib\site-packages\pyNastran\pyNastran\op2\op2_interface\op2_f06_common.py:6
    from pyNastran import is_release

ImportError: cannot import name 'is_release' from 'pyNastran' (unknown location)

Steven Doyle

unread,
Nov 5, 2024, 12:50:55 AM11/5/24
to pynastra...@googlegroups.com
I don't use Anaconda, so I might not be the best person to help with that. It does non-standard things with the python environment and I don't know how to fix it.

How did you install it? The expected way to install the dev version in editable mode is:
 >>> pip install -e .

The way to install that you can't modify is:
 >>> pip install .

You'd run either one in the folder with pyproject.toml

Reply all
Reply to author
Forward
0 new messages