Steve,
This note was just an FYI that changing an element.nodes was inconsistent between two noded CBEAMs and four noded CQUADS. As shown, I can make both work, just differently.
re: "
It's not clear to me exactly what you're trying to do"
Replying here will mangle the message streams, but the answer to this question is:
On 2/10/2021 I wrote titled "Modifying element node numbers (again)":
"I tried to understand/follow the thread dated Apr 9, 2019
titled Modifying the nodes that define an element. I tried the various ways you
describe. Nothing will modify the element even tho none assignments generate a gripe.
I have a large model read from a .dat with the xref=True.
Wing spars are modeled as CBEAMs for upper and lower spar
caps and the web is a CQUAD. I want to change the node numbers for some of
them. For every CBEAM that has nodeA=3007 or 3019, I want it to be nodeA=3113.
I found the map:
nid_to_eids_map = model.get_node_id_to_elements_map()
Collected a list of elements:
elems=[]
elems.append(nid_to_eids_map[3007])
elems.append(nid_to_eids_map[3019])"
I have a large FEM and want to codefully change certain elements.
So far, I'm trying to change the nodes referenced on some CBEAMs and CQUADs.
There are a bunch of elements, but this snippet captures those that touch nodes 3007 and 3019. The goal is to replace node 3007 and 3019 in those elements with 3113.
There are some subsequent steps. I need to change the location of some nodes. set_position() seems to do that. I haven't checked well on that.
I will need to change the dependent node on some RBE3s, but my initial poking suggests the methods to alter RBEs don't work either.
The large model is an aircraft conceptual design model that was largely autogenerated (codefully). It generates wing carry through structure (between the right root rib and the left root rib) with simple continuation of the wing spars. We want to change the layout of the wing carry through structure and try to develop a more complex support structure into the fuselage. But this is too early/immature to justify hacking up the code in the big model generator. So I'm trying to make up a bit of post processing code, instead of just hand editing the original data deck.
I understand the value of a small example model. I have thought about what that might be, but didn't stop to do it. Given the prior 2019 questions, I thought you could straighten me out.
re: "
You shouldn't need to delete elements."
I figured that would be the case, but since I couldn't get modifying them to work, I set out to delete and replace. Right now, any way that works will get my job done.
Doing this by writing is difficult. Talking might be better. If you are willing, I will pass you my cell phone via email outside the forum.
Clark