Error looking for centroid NL principal stress values

Skip to first unread message

Eric Roulo

Dec 4, 2012, 10:33:05 PM12/4/12

I'm trying to extract principal stresses from non-linear CQUAD4 output. I had the following code working for my linear model output.


The error is:
Traceback (most recent call last):
  File "Z:\octaweb\1103\", line 44, in <module>
KeyError: 'C'

So, the op2 file has both stress and nlstress being plotted. How can I request the non-linear vs. linear stress with the op2 reader?

Also, I know that principal is not output directly in the stress-strain item codes. Do I need to compute the value manually?



Eric J. Roulo
Owner, Roulo Consulting, Inc.
Engineering Analysis, Design, & Training

Steve Doyle

Dec 5, 2012, 12:19:39 PM12/5/12
My guess is you're not using the element type you think you are.  The data stored on the CQUAD4 is different in the linear and nonlinear cases, so you can check the type to find out the class and then look at the docs.  What you want is probably in op2.nonlinearPlateStress and not op2.plateStress.

Also, your max_major formula is only valid for a CQUAD4/CTRIA3 with a PSHELL with a Z0 and Z1.  A PCOMP with multiple layers would return the wrong value.

pyNastran doesn't create any generate any data that wasn't in the OP2, so if you can generate the table in the F06, there will be a corresponding one in the OP2.  Any value that doesn't exist in a table is not computed.  Some values that are in the F06/OP2 are not stored, but have functions to compute their values.

Reply all
Reply to author
0 new messages