0

我想添加到下面的脚本中,仅在 2D 空间中的特定设置坐标处写入元素体积,例如在 (21,-11)、(32,-32) 等处。这背后的原因是;我想在吹瓶模拟的特定位置找到材料的质量(建模为壳)。

有人可以建议我如何做到这一点吗?我是 Python 脚本的新手。谢谢。

from odbAccess import *
from abaqusConstants import *
odb = openOdb(path='SBM_simulation_V1.odb')
lastFrame = odb.steps['Finalblow'].frames[-1]
volume=lastFrame.fieldOutputs['EVOL']
fieldValues=volume.values
myAssembly=odb.rootAssembly
text = ""
for v in fieldValues:
 output= str(v.elementLabel)+'\t'+str(v.data)
 text='\n'.join([text,output])
f1=open('Output STH.xls', 'a') #a writes to existing file
f1.write(text)
f1.close()
odb.close()```

4

0 回答 0