abaqus+python后处理导出数据? 20
浏览:2254 回答:6
请问各位大佬,用python将abaqus里的某一个set结果导出来,根据网上的不同教程写了程序,但是写不到txt里面,请问能帮忙看看哪里出错了吗?
from odbAccess import *
from abaqusConstants import*
import sys
import os
odb=openOdb(path='0-bmi15.odb')
odb
cpFile=open('1.txt','w')
M=odb.steps['load'].frames[-1].fieldOutputs['S']
filed=odb.rootAssembly.instances['PART-1-1'].elementSets['SET-10']
set=M.getSubset(region=filed)
setvalues=set.values
for v in setvalues:
cpFile.write(v.elementLabel,v.mises,v.maxPrincipal)
cpFile.close()
odb.close()