Length mismatch

40 views
Skip to first unread message

Martin Merkl

unread,
Jul 4, 2024, 2:01:32 AM7/4/24
to pyNastran Discuss
I get the following error when trying to load .op2 generated by Femap with NX Nastran:
ValueError: Length mismatch: Expected axis has 1000 elements, new values have 1 elements

This is from a simple test model from the frequency response analysis (just a plate loaded with a unit acceleration). I use pyNastran extensively for "real" projects and never experienced this error. This error is produced when build_dataframe is set to True
model.read_op2(op2_file, build_dataframe=True)
What can be wrong with the op2 file? 

steve

unread,
Jul 4, 2024, 2:24:19 AM7/4/24
to pyNastran Discuss
If I had to guess you're using SORT2. It's supported, but there's lots of results. SORT1 is supported much better in both pyNastran and Femap.

Beyond that, I'd have to see an example.

Martin Merkl

unread,
Jul 4, 2024, 3:10:22 AM7/4/24
to pyNastran Discuss
Hi Steve - thanks for the reply and the suggestion - I've checked and I'm using SORT1. The only thing that I changed from my usual workflow is that I'm using the newest Femap 2406. But I tried running the same .dat in the older version that I use regularly (2022.1) and I get the same error.
I attached the .dat if you want to take a look at it.

Dne čtvrtek 4. července 2024 v 8:24:19 UTC+2 uživatel steve napsal:
sine_full-0002.dat

Steven Doyle

unread,
Jul 4, 2024, 9:43:52 AM7/4/24
to pynastra...@googlegroups.com
Martin,

I don’t have access to Nastran outside work, so I need the op2 and the associated f06 data PRINT’d to the f06.

--
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/b75ef6cc-39e5-40cf-9ece-c41920a82755n%40googlegroups.com.

Martin Merkl

unread,
Jul 15, 2024, 2:59:34 AM7/15/24
to pyNastran Discuss
Hi Steve,

here are the files if you find the time/will.
Dne čtvrtek 4. července 2024 v 15:43:52 UTC+2 uživatel steve napsal:
sine_assy_run_original_matrices-0001.f06
sine_assy_run_original_matrices-0001.op2

Martin Merkl

unread,
Jul 15, 2024, 5:33:33 AM7/15/24
to pyNastran Discuss
Looks like the issue was resolved by updating pyNastran to the latest version.
Thanks.

Dne pondělí 15. července 2024 v 8:59:34 UTC+2 uživatel Martin Merkl napsal:

Steven Doyle

unread,
Jul 15, 2024, 11:17:29 AM7/15/24
to pynastra...@googlegroups.com
Those are the best kind of errors!

Reply all
Reply to author
Forward
0 new messages