Python Abaqus ODB中张量数据的处理

Python Abaqus ODB中张量数据的处理,python,tensor,abaqus,Python,Tensor,Abaqus,我想求和我的odb的每个模态(模态分析中的帧)的所有应变能密度(ELSE)值,并将其保存在一个新的帧中 我的代码可以很好地处理位移'U'和type=VECTOR 但当我将其更改为“ELSE”并键入=TENSOR\u 3D\u FULL时,我得到了以下错误: Traceback (most recent call last): File "..\Python\modaldata.py", line 62, in <module> newField.addData(fie

我想求和我的odb的每个模态(模态分析中的帧)的所有应变能密度(ELSE)值,并将其保存在一个新的帧中

我的代码可以很好地处理位移'U'和type=VECTOR 但当我将其更改为“ELSE”并键入=TENSOR\u 3D\u FULL时,我得到了以下错误:

Traceback (most recent call last):    File "..\Python\modaldata.py", line 62, in <module> 
    newField.addData(field=strechtMode1)  OdbError: Fields are not compatible. They are either associated with different structural models or have incompatible attributes.
是总能量。
因此,其字段输出类型为标量。 这就是为什么你会得到你的错误,你试图用标量场值填充一个张量场

我强烈建议使用textRepr库中的prettyPrint来访问字段并更好地了解其属性

from textRepr import prettyPrint as pp  

pp(odb.steps['Modalanalyse'].frames[-1].fieldOutputs['ELSE'])
pp(sumAllModes_field)
pp(newField)
from textRepr import prettyPrint as pp  

pp(odb.steps['Modalanalyse'].frames[-1].fieldOutputs['ELSE'])
pp(sumAllModes_field)
pp(newField)