OP2 Difference in xyz values.

57 views
Skip to first unread message

Calvin

unread,
Sep 23, 2022, 12:53:46 PM9/23/22
to pyNastran Discuss
Hey,

I'm loading an OP2 file using the command:
from pyNastran.op2.op2 import read_op2
read_op2(filename, load_geometry=True, build_dataframe=True)

I then recreate the mesh using pyvista and the data from the nodes and elements. On some files the recreated meshes look very distorted. 

I opened the same files with the pyNastranGUI and they do not look distorted at all. I chose some nodes at random and found that the GUI had different xyz values to those loaded with pure python. For example:
model.nodes[10218141].xyz
array([-146.11399841, -510.27200317, -101.31700134])

whereas probing the node in the GUI:
NodeID = 10218141; xyz=(-132.83604431152344, -526.622314453125, -101.6064453125); pierce_xyz=(-133.03369240275018, -526.7144295913313, -102.14456481433325) 

Majority of the nodes match, it's just certain ones. Any idea what the reason for the difference could be?

Thanks,
Calvin

Steven Doyle

unread,
Sep 23, 2022, 1:01:07 PM9/23/22
to pynastra...@googlegroups.com
There are a lot of steps in there so I’d need to see a model.  Coordinate systems. Offsets.  Pick tolerance 

--
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/a8defc85-e5b9-4de8-96a8-d24d7a755af6n%40googlegroups.com.

Calvin

unread,
Sep 26, 2022, 4:07:40 AM9/26/22
to pyNastran Discuss
Will confess to being a programmer rather than an engineer! 

The file is the same for both. Does the GUI not use the read_op2 function to read the file? I can't see any options to specify coordinate systems etc. there? How can I find which coordinate systems etc. that you mention are being used?

Steven Doyle

unread,
Sep 26, 2022, 10:51:46 AM9/26/22
to pynastra...@googlegroups.com
You don’t specify coordinate systems in the gui.  They’re in the bdf and they’re copied to the op2.

Node.xyz for node 1 could be in a cylindrical frame and node 2 could be in a spherical frame.  All nodes are transformed to global (coord=0) to display the model.  My guess is you have a coordinate system.  Check your bdf.

Reply all
Reply to author
Forward
0 new messages