Problem reading OESVM1 data

75 views
Skip to first unread message

Baptiste V

unread,
Apr 23, 2024, 9:51:37 AM4/23/24
to pyNastran Discuss
Hello all,

I've been using pyNastran for a while now for static and it worked perfectly fine.
I tried using it for random analysis (sol111) to extract rms Von mises stresses and pyNastran seems to have difficulties reading my op2 file :

image.png
The following error occurs:
RuntimeError: result='modal_contribution.cpyram_stress' is invalid; the name changed or it's a typo.

I'm using pyNastran v1.4.1 and nx 2306.
Does someone have the same issue? Do you have any solution?

Thanks in advance,
Cheers,

Baptiste

Steven Doyle

unread,
Apr 23, 2024, 11:36:24 AM4/23/24
to pynastra...@googlegroups.com
Baptiste,

Looks like there’s a bug with API cleanup.  The data should be passed to model.op2_results.modal_contribution.cpyram_stress.  Could you make a small example?

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/28dc8660-b82a-4528-bc0e-d5e93e5a4bbcn%40googlegroups.com.

Baptiste V

unread,
Apr 24, 2024, 1:01:11 PM4/24/24
to pyNastran Discuss
Thank you for your quick answer.

When a try to exclude  'modal_contribution.cpyram_stress' from in read_op2 function. It indicates that it's not a valid result to remove. By looking at the list provided, it also seems like 'rms.cpyram_stress', 'psd.cpyram_stress' and other results don't exist for cpyram elements.
Is it a misunderstanding on my part or is this really the case ?

Cheers,
Baptiste

Steven Doyle

unread,
Apr 24, 2024, 7:20:32 PM4/24/24
to pynastra...@googlegroups.com
I just tested it and it works for me.  Can you provide a small example and script?

Baptiste V

unread,
Apr 25, 2024, 4:50:21 PM4/25/24
to pynastra...@googlegroups.com
Here is my script (basic one just to test the reading):
from pyNastran.op2.op2 import read_op2

op2_filename = 'model_random_test_sim2-copy_of_random_x_2.op2'

model = read_op2(op2_filename,
combine=True)

print(model.get_op2_stats())
input('...')

You will also find attached the .dat, .f06 files that show the error with cpyram element.The op2 file was too heavy.

Thank you for your help!

Cheers,
Baptiste

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/U4GEG3BNnhE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to pynastran-disc...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pynastran-discuss/CADJnEGE8VMzDO5YdF%2B1bjZNHekXdkBWFZMO1n9eRfd%2BjCu5Eiw%40mail.gmail.com.
model_random_test_sim2-copy_of_random_x_2.f06
model_random_test_sim2-copy_of_random_x_2.dat

Steven Doyle

unread,
Apr 25, 2024, 5:39:30 PM4/25/24
to pynastra...@googlegroups.com
Baptiste,

I need an example with the op2 to do anything.  All you need is one frequency and one element in the file.

Steve

Baptiste V

unread,
Apr 26, 2024, 10:08:36 AM4/26/24
to pynastra...@googlegroups.com
Hi Steven,

You will find attached the op2 file.

Baptiste

model_random_test_sim2-copy_of_random_x_2.op2

Baptiste V

unread,
May 16, 2024, 2:47:47 PM5/16/24
to pynastra...@googlegroups.com
Hello Steven,

Did you have the time to look at the op2 that I sent to you? Did you succeed in extracting the stresses without any problem ? 
If so, can you provide the code that you used because it is still not working on my side.

Thanks in advance for your response.

Cheers,

Baptiste

Steven Doyle

unread,
May 16, 2024, 2:59:19 PM5/16/24
to pynastra...@googlegroups.com
Oh yeah, sorry about that.

cpyram_stress, were not supported at all for that result, so you couldn't skip it.  chexa_stresses existed, so that one could be skipped.  The only workaround is in the latest release version is just remove those element types from the request.  If you; use the latest dev version, it won't crash.

Presumably you want the result though from it, so I need the corresponding f06 with the stress results printed out. The f06 you provided suppresses that, so I can't diff the result to make sure that I got it right.

Baptiste V

unread,
Jun 7, 2024, 10:45:56 AM6/7/24
to pynastra...@googlegroups.com
Hello,

Thanks for the latest version, it doesn't crash anymore but as you assumed my goal was to have those stresses. 
You will find attached the f06 file with the stresses (I had to remove some elements stresses in order for the file to be less than 8Mo, but all pyram stresses are still in the file).

Baptiste

model_random_test_sim2-random_x_2 - Copie.f06
Reply all
Reply to author
Forward
0 new messages