通过单元查询与其相关的节点标签号
for element in mdb.models[Model_1].rootAssembly.instances[Part_1_1].elements:
for nodeNum in element.connectivity:
if mdb.models[Model_1].rootAssembly.instances[Part_1_1].nodes[nodeNum].label==node.label:
其中nodeNum不是节点的标签,是节点索引。
注意,而在odb中是标签
connectivity
A tuple of Ints specifying the internal node indices that define the nodal connectivity. It is important to note the difference with OdbMeshElement object of ODB where the connectivity is node labels instead of node indices.
Int元组,指定定义节点连接的内部节点索引。 重要的是要注意与ODB的OdbMeshElement对象的区别,其中连接是节点标签而不是节点索引。
---------------------
改进
abaqus中与单元相关的节点、与节点相关的单元
for element in mdb.models[Model_1].rootAssembly.instances[Part_1_1].elements:
temp_seq=[]
for node in element.getNodes():
temp_seq.append(node.label)
element_nodes[element.label]=temp_seq
for node in mdb.models[Model_1].rootAssembly.instances[Part_1_1].sets[Set_soil_s1_x1].nodes:
temp_seq=[]
for element in node.getElements():
temp_seq.append(element.label)
node_elements[node.label]=temp_seq