[英]Abaqus python scripting: How to add a vector field output with their resultant values in an odb
My code below could easily create a field output of my custom vector from the 'dataComponentsList' variable.我下面的代码可以轻松地从“dataComponentsList”变量创建我的自定义向量的字段输出。 But it merely displayed the components of vectors in the 'symbol plot' of Abaqus, as distinct from the default Abaqus field outputs which may also display the RESULTANT of vectors in the plot.但它仅在 Abaqus 的“符号图”中显示向量的分量,这与默认的 Abaqus 字段输出不同,默认的 Abaqus 字段输出也可能在图中显示向量的结果。 For example, if the vectors of displacement or reaction forces are requested, then the odb will include the components with the resultant of the vectors.例如,如果需要位移或反作用力矢量,则 odb 将包含具有矢量结果的分量。
newFieldOutput = odb.steps[stepName].frames[-1].FieldOutput(name = vectorName, description = '', type = VECTOR)
newFieldOutput.addData(position=ELEMENT_NODAL, instance = odbInstance, labels = elementsLabels, data = dataComponentsList)
So, my question is simple: How can I add the resultant of vectors in my vector field output.所以,我的问题很简单:如何在向量场输出中添加向量的结果。
Thanks in advance for any suggestions.在此先感谢您的任何建议。
由于您只对标量感兴趣,因此在 python 脚本中计算向量结果,然后将“.adddata”作为 type = SCALAR。
You may use您可以使用
vectorName = 'myVector'
newFieldOutput = odb.steps[stepName].frames[-1].FieldOutput(name = vectorName, componentLabels = (vectorName+'1', vectorName+'2', vectorName+'3'), description = '', type = VECTOR)
newFieldOutput.addData(position=ELEMENT_NODAL, instance = odbInstance, labels = elementsLabels, data = dataComponentsList, validInvariants=(MAGNITUDE, ))
The part那个部分
newFieldOutput.addData(....., validInvariants=(MAGNITUDE, ))
allows to get the magnitude.允许获得幅度。
However, with position=ELEMENT_NODAL, you will not be able to show vectors as Abaqus will output: "warning: symbol plotting of vector quantities is not supported at element nodes".但是,如果 position=ELEMENT_NODAL,您将无法显示向量,因为 Abaqus 将输出:“警告:元素节点不支持向量的符号绘图”。 You should give the vectors values you want at another location such as CENTROID or INTEGRATION_POINT of element, or NODAL for nodes.您应该在另一个位置提供所需的向量值,例如元素的 CENTROID 或 INTEGRATION_POINT,或节点的 NODAL。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.