pyNastran icon indicating copy to clipboard operation
pyNastran copied to clipboard

PCOMP stress not accesible for frequency response results

Open AlejandroStewart opened this issue 6 months ago • 8 comments

Hello, I am trying to access some frequency response stress results con CQUAD4+PCOMP elements with no luck. The op2 does indeed contain the results, the debug messages point to them and I can access them in hyperview

The problem can be replicated with the attached model (results included) Code:

from pyNastran.op2.op2 import OP2,read_op2

op2 = read_op2('C:\\WORK\\LINCE\\Sine_debug_pynastran\\mini_model.op2',mode='msc')
print(op2.result_names)

output:

DEBUG:   op2_scalar.py:607            set_subcases - subcases = []
DEBUG:   op2.py:589                   combine=True
DEBUG:   op2.py:590                   -------- reading op2 with read_mode=1 (array sizing) --------
INFO:    op2_scalar.py:1963           op2_filename = 'C:\\WORK\\LINCE\\Sine_debug_pynastran\\mini_model.op2'
DEBUG:   op2_reader.py:382            mode='msc' version=''
DEBUG:   op2_scalar.py:2172             table_name=b'PVT0'     (PARAM cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GPL'      (grid point list)
DEBUG:   op2_scalar.py:2172             table_name=b'GPDT'     (grid point locations)
DEBUG:   op2_scalar.py:2172             table_name=b'EPT'      (property cards)
DEBUG:   op2_scalar.py:2172             table_name=b'MPT'      (material cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM2'    (element cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM4'    (load cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM1'    (grid/coord cards)
DEBUG:   op2_scalar.py:2172             table_name=b'BGPDT'    (grid points in cid=0 frame)
DEBUG:   op2_scalar.py:2172             table_name=b'DITS'     (TABLEx cards (superelement)))
DEBUG:   op2_scalar.py:2172             table_name=b'DYNAMICS' (dynamic cards (superelement))
DEBUG:   op2_scalar.py:2172             table_name=b'CASECC'   (case control)
WARNING: subcase.py:683               nwords_to_lsem=1000 nwords_to_lsem//4=250
DEBUG:   op2_scalar.py:2172             table_name=b'LAMA'     (eigenvalues)
DEBUG:   op2_scalar.py:2172             table_name=b'BOUGV1'   (g-set U in cid=0 frame)
DEBUG:   op2_scalar.py:2172             table_name=b'OES1C'    (composite stress)
DEBUG:   op2.py:609                   -------- reading op2 with read_mode=2 (array filling) --------
DEBUG:   op2_scalar.py:2172             table_name=b'PVT0'     (PARAM cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GPL'      (grid point list)
DEBUG:   op2_scalar.py:2172             table_name=b'GPDT'     (grid point locations)
DEBUG:   op2_scalar.py:2172             table_name=b'EPT'      (property cards)
DEBUG:   op2_scalar.py:2172             table_name=b'MPT'      (material cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM2'    (element cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM4'    (load cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM1'    (grid/coord cards)
DEBUG:   op2_scalar.py:2172             table_name=b'BGPDT'    (grid points in cid=0 frame)
DEBUG:   op2_scalar.py:2172             table_name=b'DITS'     (TABLEx cards (superelement)))
DEBUG:   op2_scalar.py:2172             table_name=b'DYNAMICS' (dynamic cards (superelement))
DEBUG:   op2_scalar.py:2172             table_name=b'CASECC'   (case control)
WARNING: subcase.py:683               nwords_to_lsem=1000 nwords_to_lsem//4=250
DEBUG:   op2_scalar.py:2172             table_name=b'LAMA'     (eigenvalues)
DEBUG:   op2_scalar.py:2172             table_name=b'BOUGV1'   (g-set U in cid=0 frame)
DEBUG:   op2_scalar.py:2172             table_name=b'OES1C'    (composite stress)
DEBUG:   op2.py:899                   combine_results
DEBUG:   op2.py:623                   finished reading op2
{'accelerations'}

Image

Image

Pynastran version = 1.4.1 Python version = 3.9.12

Thank you in advance

AlejandroStewart avatar Jun 30 '25 08:06 AlejandroStewart

Run Test_bdf fem.op2

Or add print(model.get_op2_stats()) After reading the file to see what you have.

Hyperview is also quite a bit different and I don’t have test decks, so I wouldn’t be surprised if things are broken.

On Mon, Jun 30, 2025 at 1:29 AM Alejandro Stewart @.***> wrote:

AlejandroStewart created an issue (SteveDoyle2/pyNastran#838) https://github.com/SteveDoyle2/pyNastran/issues/838

Hello, I am trying to access some frequency response stress results con CQUAD4+PCOMP elements with no luck. The op2 does indeed contain the results, the debug messages point to them and I can access them in hyperview

The problem can be replicated with the attached model (results included)

DEBUG: op2_scalar.py:607 set_subcases - subcases = [] DEBUG: op2.py:589 combine=True DEBUG: op2.py:590 -------- reading op2 with read_mode=1 (array sizing) -------- INFO: op2_scalar.py:1963 op2_filename = 'C:\WORK\LINCE\Sine_debug_pynastran\mini_model.op2' DEBUG: op2_reader.py:382 mode='msc' version='' DEBUG: op2_scalar.py:2172 table_name=b'PVT0' (PARAM cards) DEBUG: op2_scalar.py:2172 table_name=b'GPL' (grid point list) DEBUG: op2_scalar.py:2172 table_name=b'GPDT' (grid point locations) DEBUG: op2_scalar.py:2172 table_name=b'EPT' (property cards) DEBUG: op2_scalar.py:2172 table_name=b'MPT' (material cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM2' (element cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM4' (load cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM1' (grid/coord cards) DEBUG: op2_scalar.py:2172 table_name=b'BGPDT' (grid points in cid=0 frame) DEBUG: op2_scalar.py:2172 table_name=b'DITS' (TABLEx cards (superelement))) DEBUG: op2_scalar.py:2172 table_name=b'DYNAMICS' (dynamic cards (superelement)) DEBUG: op2_scalar.py:2172 table_name=b'CASECC' (case control) WARNING: subcase.py:683 nwords_to_lsem=1000 nwords_to_lsem//4=250 DEBUG: op2_scalar.py:2172 table_name=b'LAMA' (eigenvalues) DEBUG: op2_scalar.py:2172 table_name=b'BOUGV1' (g-set U in cid=0 frame) DEBUG: op2_scalar.py:2172 table_name=b'OES1C' (composite stress) DEBUG: op2.py:609 -------- reading op2 with read_mode=2 (array filling) -------- DEBUG: op2_scalar.py:2172 table_name=b'PVT0' (PARAM cards) DEBUG: op2_scalar.py:2172 table_name=b'GPL' (grid point list) DEBUG: op2_scalar.py:2172 table_name=b'GPDT' (grid point locations) DEBUG: op2_scalar.py:2172 table_name=b'EPT' (property cards) DEBUG: op2_scalar.py:2172 table_name=b'MPT' (material cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM2' (element cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM4' (load cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM1' (grid/coord cards) DEBUG: op2_scalar.py:2172 table_name=b'BGPDT' (grid points in cid=0 frame) DEBUG: op2_scalar.py:2172 table_name=b'DITS' (TABLEx cards (superelement))) DEBUG: op2_scalar.py:2172 table_name=b'DYNAMICS' (dynamic cards (superelement)) DEBUG: op2_scalar.py:2172 table_name=b'CASECC' (case control) WARNING: subcase.py:683 nwords_to_lsem=1000 nwords_to_lsem//4=250 DEBUG: op2_scalar.py:2172 table_name=b'LAMA' (eigenvalues) DEBUG: op2_scalar.py:2172 table_name=b'BOUGV1' (g-set U in cid=0 frame) DEBUG: op2_scalar.py:2172 table_name=b'OES1C' (composite stress) DEBUG: op2.py:899 combine_results DEBUG: op2.py:623 finished reading op2

image.png (view on web) https://github.com/user-attachments/assets/a9d38e3b-804f-4f53-b003-b9f376f14273

image.png (view on web) https://github.com/user-attachments/assets/b91de7ad-faeb-4b83-ba3a-4c9d7b897dce

Pynastran version = 1.4.1 Python version = 3.9.12

Thank you in advance

— Reply to this email directly, view it on GitHub https://github.com/SteveDoyle2/pyNastran/issues/838, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUWNWBKA3JQSAWJHBT333GDYNDAVCNFSM6AAAAACANQUU26VHI2DSMVQWIX3LMV43ASLTON2WKOZTGE4DONRRGM2TGNI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

SteveDoyle2 avatar Jun 30 '25 13:06 SteveDoyle2

Hyperview is just to check that the OP2 contains said results, thats what I have at hand :)

Updatedf output with get_op2_stats:


DEBUG:   op2_scalar.py:607            set_subcases - subcases = []
DEBUG:   op2.py:589                   combine=True
DEBUG:   op2.py:590                   -------- reading op2 with read_mode=1 (array sizing) --------
INFO:    op2_scalar.py:1963           op2_filename = 'C:\\WORK\\LINCE\\Sine_debug_pynastran\\mini_model.op2'
DEBUG:   op2_reader.py:382            mode='msc' version=''
DEBUG:   op2_scalar.py:2172             table_name=b'PVT0'     (PARAM cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GPL'      (grid point list)
DEBUG:   op2_scalar.py:2172             table_name=b'GPDT'     (grid point locations)
DEBUG:   op2_scalar.py:2172             table_name=b'EPT'      (property cards)
DEBUG:   op2_scalar.py:2172             table_name=b'MPT'      (material cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM2'    (element cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM4'    (load cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM1'    (grid/coord cards)
DEBUG:   op2_scalar.py:2172             table_name=b'BGPDT'    (grid points in cid=0 frame)
DEBUG:   op2_scalar.py:2172             table_name=b'DITS'     (TABLEx cards (superelement)))
DEBUG:   op2_scalar.py:2172             table_name=b'DYNAMICS' (dynamic cards (superelement))
DEBUG:   op2_scalar.py:2172             table_name=b'CASECC'   (case control)
WARNING: subcase.py:683               nwords_to_lsem=1000 nwords_to_lsem//4=250
DEBUG:   op2_scalar.py:2172             table_name=b'LAMA'     (eigenvalues)
DEBUG:   op2_scalar.py:2172             table_name=b'BOUGV1'   (g-set U in cid=0 frame)
DEBUG:   op2_scalar.py:2172             table_name=b'OES1C'    (composite stress)
DEBUG:   op2.py:609                   -------- reading op2 with read_mode=2 (array filling) --------
DEBUG:   op2_scalar.py:2172             table_name=b'PVT0'     (PARAM cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GPL'      (grid point list)
DEBUG:   op2_scalar.py:2172             table_name=b'GPDT'     (grid point locations)
DEBUG:   op2_scalar.py:2172             table_name=b'EPT'      (property cards)
DEBUG:   op2_scalar.py:2172             table_name=b'MPT'      (material cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM2'    (element cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM4'    (load cards)
DEBUG:   op2_scalar.py:2172             table_name=b'GEOM1'    (grid/coord cards)
DEBUG:   op2_scalar.py:2172             table_name=b'BGPDT'    (grid points in cid=0 frame)
DEBUG:   op2_scalar.py:2172             table_name=b'DITS'     (TABLEx cards (superelement)))
DEBUG:   op2_scalar.py:2172             table_name=b'DYNAMICS' (dynamic cards (superelement))
DEBUG:   op2_scalar.py:2172             table_name=b'CASECC'   (case control)
WARNING: subcase.py:683               nwords_to_lsem=1000 nwords_to_lsem//4=250
DEBUG:   op2_scalar.py:2172             table_name=b'LAMA'     (eigenvalues)
DEBUG:   op2_scalar.py:2172             table_name=b'BOUGV1'   (g-set U in cid=0 frame)
DEBUG:   op2_scalar.py:2172             table_name=b'OES1C'    (composite stress)
DEBUG:   op2.py:899                   combine_results
DEBUG:   op2.py:623                   finished reading op2
{'accelerations'}
params:
  POST = -2
op2_results.cstm: CSTM:
  headers_str = dict_keys(['cid', 'cid_type', 'unused_int_index', 'unused_double_index', 'ox', 'oy', 'oz', 'T11', 'T12', 'T13', 'T21', 'T22', 'T23', 'T31', 'T32', 'T33'])
  headers_ints = dict_values([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
  data = None
accelerations[1]
  isubcase = 1
  type=ComplexAccelerationArray ntimes=100 nnodes=6, table_name=BOUGV1
  data: [t1, t2, t3, r1, r2, r3] shape=[100, 6, 6] dtype=complex64
  node_gridtype.shape = (6, 2)
  sort1
  freqs = [  1.          2.          3.          4.          5.          6.
   6.9999995   8.          9.         10.         10.999999   12.
  13.         13.999999   15.         16.         17.         18.
  19.         20.         20.999998   21.999998   22.999998   24.
  25.         26.         26.999998   27.999998   28.999998   30.
  31.         32.         32.999996   34.         35.         36.
  37.         38.         38.999996   40.         41.         41.999996
  43.         43.999996   45.         45.999996   47.         48.
  48.999996   50.         50.999996   52.         53.         53.999996
  55.         55.999996   57.         57.999996   59.         60.
  60.999996   62.         62.999996   64.         65.         65.99999
  67.         68.         69.         70.         71.         72.
  72.99999    74.         75.         76.         77.         77.99999
  79.         80.         81.         82.         83.         83.99999
  84.99999    86.         87.         87.99999    89.         90.
  90.99999    91.99999    93.         94.         94.99999    96.
  97.         97.99999    99.        100.       ]; dtype=float32

eigenvalues[]
  type=RealEigenvalues neigenvalues=19
  title, extraction_order, eigenvalues, radians, cycles, generalized_mass, generalized_stiffness

AlejandroStewart avatar Jun 30 '25 19:06 AlejandroStewart

Looks like it skipped it. I’d need to see an example

On Mon, Jun 30, 2025 at 12:40 PM Alejandro Stewart @.***> wrote:

AlejandroStewart left a comment (SteveDoyle2/pyNastran#838) https://github.com/SteveDoyle2/pyNastran/issues/838#issuecomment-3020478513

Hyperview is just to check that the OP2 contains said results, thats what I have at hand :)

Updatedf output with get_op2_stats:

DEBUG: op2_scalar.py:607 set_subcases - subcases = [] DEBUG: op2.py:589 combine=True DEBUG: op2.py:590 -------- reading op2 with read_mode=1 (array sizing) -------- INFO: op2_scalar.py:1963 op2_filename = 'C:\WORK\LINCE\Sine_debug_

pynastran\mini_model.op2' DEBUG: op2_reader.py:382 mode='msc' version='' DEBUG: op2_scalar.py:2172 table_name=b'PVT0' (PARAM cards) DEBUG: op2_scalar.py:2172 table_name=b'GPL' (grid point list) DEBUG: op2_scalar.py:2172 table_name=b'GPDT' (grid point locations) DEBUG: op2_scalar.py:2172 table_name=b'EPT' (property cards) DEBUG: op2_scalar.py:2172 table_name=b'MPT' (material cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM2' (element cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM4' (load cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM1' (grid/coord cards) DEBUG: op2_scalar.py:2172 table_name=b'BGPDT' (grid points in cid=0 frame) DEBUG: op2_scalar.py:2172 table_name=b'DITS' (TABLEx cards (superelement))) DEBUG: op2_scalar.py:2172 table_name=b'DYNAMICS' (dynamic cards (superelement)) DEBUG: op2_scalar.py:2172 table_name=b'CASECC' (case control) WARNING: subcase.py:683 nwords_to_lsem=1000 nwords_to_lsem//4=250 DEBUG: op2_scalar.py:2172 table_name=b'LAMA' (eigenvalues) DEBUG: op2_scalar.py:2172 table_name=b'BOUGV1' (g-set U in cid=0 frame) DEBUG: op2_scalar.py:2172 table_name=b'OES1C' (composite stress) DEBUG: op2.py:609 -------- reading op2 with read_mode=2 (array filling) -------- DEBUG: op2_scalar.py:2172 table_name=b'PVT0' (PARAM cards) DEBUG: op2_scalar.py:2172 table_name=b'GPL' (grid point list) DEBUG: op2_scalar.py:2172 table_name=b'GPDT' (grid point locations) DEBUG: op2_scalar.py:2172 table_name=b'EPT' (property cards) DEBUG: op2_scalar.py:2172 table_name=b'MPT' (material cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM2' (element cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM4' (load cards) DEBUG: op2_scalar.py:2172 table_name=b'GEOM1' (grid/coord cards) DEBUG: op2_scalar.py:2172 table_name=b'BGPDT' (grid points in cid=0 frame) DEBUG: op2_scalar.py:2172 table_name=b'DITS' (TABLEx cards (superelement))) DEBUG: op2_scalar.py:2172 table_name=b'DYNAMICS' (dynamic cards (superelement)) DEBUG: op2_scalar.py:2172 table_name=b'CASECC' (case control) WARNING: subcase.py:683 nwords_to_lsem=1000 nwords_to_lsem//4=250 DEBUG: op2_scalar.py:2172 table_name=b'LAMA' (eigenvalues) DEBUG: op2_scalar.py:2172 table_name=b'BOUGV1' (g-set U in cid=0 frame) DEBUG: op2_scalar.py:2172 table_name=b'OES1C' (composite stress) DEBUG: op2.py:899 combine_results DEBUG: op2.py:623 finished reading op2 {'accelerations'} params: POST = -2 op2_results.cstm: CSTM: headers_str = dict_keys(['cid', 'cid_type', 'unused_int_index', 'unused_double_index', 'ox', 'oy', 'oz', 'T11', 'T12', 'T13', 'T21', 'T22', 'T23', 'T31', 'T32', 'T33']) headers_ints = dict_values([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15]) data = None accelerations[1] isubcase = 1 type=ComplexAccelerationArray ntimes=100 nnodes=6, table_name=BOUGV1 data: [t1, t2, t3, r1, r2, r3] shape=[100, 6, 6] dtype=complex64 node_gridtype.shape = (6, 2) sort1 freqs = [ 1. 2. 3. 4. 5. 6. 6.9999995 8. 9. 10. 10.999999 12. 13. 13.999999 15. 16. 17. 18. 19. 20. 20.999998 21.999998 22.999998 24. 25. 26. 26.999998 27.999998 28.999998 30. 31. 32. 32.999996 34. 35. 36. 37. 38. 38.999996 40. 41. 41.999996 43. 43.999996 45. 45.999996 47. 48. 48.999996 50. 50.999996 52. 53. 53.999996 55. 55.999996 57. 57.999996 59. 60. 60.999996 62. 62.999996 64. 65. 65.99999 67. 68. 69. 70. 71. 72. 72.99999 74. 75. 76. 77. 77.99999 79. 80. 81. 82. 83. 83.99999 84.99999 86. 87. 87.99999 89. 90. 90.99999 91.99999 93. 94. 94.99999 96. 97. 97.99999 99. 100. ]; dtype=float32

eigenvalues[] type=RealEigenvalues neigenvalues=19 title, extraction_order, eigenvalues, radians, cycles, generalized_mass, generalized_stiffness

— Reply to this email directly, view it on GitHub https://github.com/SteveDoyle2/pyNastran/issues/838#issuecomment-3020478513, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAICUWKPD2L63CNCDFCQJVT3GGHELAVCNFSM6AAAAACANQUU26VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTAMRQGQ3TQNJRGM . You are receiving this because you commented.Message ID: @.***>

SteveDoyle2 avatar Jun 30 '25 21:06 SteveDoyle2

Here it is, I thought I had shared it, my bad

mini_model.zip

AlejandroStewart avatar Jul 01 '25 05:07 AlejandroStewart

some tests I have done so far:

  • When reading an OP2 file containing frequency response (complex) composite stress results (OES1C table, CQUAD4/CTRIA3), pyNastran does not parse or save these results.
  • The OES1C table is detected and _read_oes1_4 is called with key: (95, 2, 12, b'OES1C').
  • The stress mapper does not contain the correct entry for this key, tried adding it pointing to ComplexCompositePlateStressArray.
  • However, after reading, both [op2.result_names] and [op2.op2_results.stress.cquad4_composite_stress , ctria3_composite_stress] are empty
  • No errors or exceptions are raised; the table is simply skipped or not saved.

AlejandroStewart avatar Jul 04 '25 13:07 AlejandroStewart

if you flip the is_release flag (in the pyNastran init.py file), you'll get it to throw an error.

Complex composite stress/strain with numwide=12 is not supported. I'm used to that being 11 and in the OESCP/OESTRCP table or 13 and being in the OESVM1C/OSTRVM1C table.

SteveDoyle2 avatar Jul 07 '25 05:07 SteveDoyle2

Oh, I see, thank you. If I create the 12 word parser, do you think the rest of the code is ready to accomodate the results? mainly the ComplexLayeredCompositeStressArray class

AlejandroStewart avatar Jul 07 '25 06:07 AlejandroStewart

I think I have a basic version running, Ill give a bit of thought snd try to do a pull request when ready

AlejandroStewart avatar Jul 07 '25 10:07 AlejandroStewart