#!/user/bin/python
# -*- coding:UTF-8 -*-
from visualization import *
from odbAccess import *
from abaqusConstants import *
import string
import xlwt
odb = openOdb(path = 'Job1.odb')
wbkName = 'RF2Exaction' #命名表格文件名
wbk = xlwt.Workbook() #创建新的表格
sheet = wbk.add_sheet('sheet1') #创建sheet1
myAssembly = odb.rootAssembly
frameRepository = odb.steps['Step-1'].frames
RefPointSet = myAssembly.nodeSets['Master Node 5']
for i in range(len(frameRepository)):
#提取参考点RF1在y方向的支反力
RForce = frameRepository[i].fieldOutputs['RF']
RefPointRForce = RForce.getSubset(region = RefPointSet)
RForceValues = RefPointRForce.values
RF_2 = RForceValues[0].data[2]
#提取参考点RF1的位移量
displacement =frameRepository[i].fieldOutputs['U']
RefPointDisp = displacement.getSubset(region = RefPointSet)
DispValue = RefPointDisp.values
Disp = DispValue[0].data[2]
#将结果写入相应的行和列
sheet.write(i,0,round(Disp,3))
sheet.write(i,1,round(RF_2,2))
wbk.save('wbkName.xls')
侵删,来源于微信公众号:ABAQUS二次开发
网友评论