2024-03-29 09:07:36 发布
网友
我想使用python脚本获取特定节点的U2位移:
dy = odb.steps['LoadingStep'].frames[-1].fieldOutputs['U'].values[node_no].data[1]
问题是[value index]与节点号不匹配。这意味着使用values[10]无法找到第10个节点的输出
[value index]
values[10]
如何获得特定节点的位移
索引值中可能存在某些错误(例如,索引“9”可以访问标签为“10”的节点)
首先,尝试在Abaqus查看器python解释器中检查您的node_no是否获得了正确的节点:
node_no
nd = odb.rootAssembly.instaces['MY_INSTANCE'].nodes[node_no] highlight(nd)
Note that it will be much easier if, during the generation of your model, you define a Set with your node(s) of interest: after you can access them as easy as:for nd in odb.rootAssembly.nodeSets['MY_NODE_SET']: print(nd.label)
Note that it will be much easier if, during the generation of your model, you define a Set with your node(s) of interest: after you can access them as easy as:
Set
for nd in odb.rootAssembly.nodeSets['MY_NODE_SET']: print(nd.label)
识别节点后,您可以获得FieldOutput的子集,因此不会被FieldValueArray values中元素的顺序所困扰:
values
fieldU = frame.fieldOutputs['U'] ndFieldU = fieldU.getSubset(region=my_node, position=NODAL) ndU2 = ndFieldU.values[0].data[1]
索引值中可能存在某些错误(例如,索引“9”可以访问标签为“10”的节点)
首先,尝试在Abaqus查看器python解释器中检查您的
node_no
是否获得了正确的节点:识别节点后,您可以获得FieldOutput的子集,因此不会被FieldValueArray
values
中元素的顺序所困扰:相关问题 更多 >
编程相关推荐