我使用Python在Abaqus中创建了一个模型,我希望在Python代码中使用与质心卷最近的节点。但是,我永远找不到如何使用它,只有如何在Abaqus中手动找到卷质心(Tools -> Query ->和select instance)。然后我可以用这个点找到最近的节点。是否有代码可用于编写工具-->查询-->批量属性部分的脚本?
提前谢谢你。
发布于 2022-01-05 01:12:34
您可以在Abaqus脚本参考指南的第6.1 Assembly Object章中获得有关程序集的查询相关命令。不幸的是,查询命令没有记录在.rpy文件中。然而,人们应该始终检查参考指南的相关对象。
要获取大量属性,可以使用以下命令:
# Accessing the instance object
inst = mdb.models['Model-1'].rootAssembly.instances['Part-1-1']
# Getting the mass properties of the part instance
mp = mdb.models['Model-1'].rootAssembly.getMassProperties(regions=[inst,])
print(mp)质量属性变量mp是字典对象。当你打印它时:
{'volume': 74912600.0, 'massFromMassPerUnitSurfaceArea': None, 'area': None, 'volumeCentroid': (63.5161468164234, 500.0, 2578.95903759848), 'warnings': (MISSING_DENSITY,), 'momentOfInertia': (None, None, None, None, None, None), 'centerOfMass': (None, None, None), 'mass': None, 'areaCentroid': (None, None, None)}然后可以使用getClosest命令查找最近的节点。
inst.nodes.getClosest(mp['volumeCentroid'])https://stackoverflow.com/questions/70581897
复制相似问题