Abaqus VisError - xyDataListFromField 的问题

Abaqus VisError - problem with xyDataListFromField

我在 Abaqus gui 中有一个 python 脚本。当我尝试 运行 这个脚本时出现错误:VisError: No xy data was extracted using the provided options.

python脚本片段是:

 session.viewports['Viewport: 1'].setValues(displayedObject=o3)
session.viewports['Viewport: 1'].makeCurrent()
a = mdb.models['Model-1'].rootAssembly
session.viewports['Viewport: 1'].setValues(displayedObject=a)
session.mdbData.summary()
session.viewports['Viewport: 1'].setValues(
    displayedObject=session.odbs[os.getcwd() + '/' + 'Hotforging1.odb'])
session.viewports['Viewport: 1'].assemblyDisplay.setValues(
    adaptiveMeshConstraints=OFF)
session.linkedViewportCommands.setValues(_highlightLinkedViewports=False)
odb = session.odbs[os.getcwd() + '/' + 'Hotforging1.odb']
session.xyDataListFromField(odb=odb, outputPosition=INTEGRATION_POINT,
                            variable=(('HFL', INTEGRATION_POINT),
                                      ('LE', INTEGRATION_POINT),
                                      ('PE', INTEGRATION_POINT),
                                      ('S', INTEGRATION_POINT),),
                            elementPick=(('HBEAM-1', 4, ('[#0:15 #800 #0:3 #40000000 #900000 ]',)),), )

我知道问题出在 xyDataListFromField 功能上,但我不知道如何解决。

xyDataListFromField方法的元素输入错误。我想,输入'[#0:15 #800 #0:3 #40000000 #900000 ]',你一定是从getSequenceFromMask方法中得到的。此方法的输入是内部的,因此您不能在您的代码中使用它。
无论如何,首先,我没有找到此方法的 elementPick 选项。但是,您可以使用的一些替代选项是:elementSetselementLabels
这些信息我从 Abaqus 脚本参考指南中获得:

elementSets
A sequence of Strings specifying element sets or a String specifying a single element set.

elementLabels
A sequence of expressions specifying element labels per part instance in the model. Each part instance element expression is a sequence of a String specifying the part instance name and a sequence of element expressions; for example, (('partInstance1',(1,'7','3:15;3'),), ('partInstance2','8'),)).
The element expressions can be any of the following:
• An Int specifying a single element label; for example, 1.
• A String specifying a single element label; for example, '7'. • A String specifying a sequence of element labels; for example, '3:5' and '3:15:3'.

我觉得,elementSets选项很好用,只需要提供元素集名称即可。