利用Python读取Abaqus的历史输出数据
from odbAccess import *#打开结果文件
odb = openOdb(path='compDispMagHist.odb')
#创建变量endSet,得到节点集 TIP
endSet = odb.rootAssembly.instances['BEAM-1-1'].nodeSets['TIP']
#创建变量histPoint,得到节点集中的第一个节点
histPoint = HistoryPoint(node=endSet.nodes)
#创建中间变量tipHistories
tipHistories = odb.steps['Step-2'].getHistoryRegion(
point=histPoint)
maxAllowableDisp = 5.0
sum = 0
componentLabels = ('U1', 'U2', 'U3')
for name in componentLabels:
sum = sum + power(tipHistories.historyOutputs, 2.0)
sum = sqrt(sum) / maxAllowableDisp
print 'History:', sum.name
print 'Time Magnitude'
for dataPair in sum.data:
print "%5.4f%5.2f"%(dataPair, dataPair)
转自:http://blog.sina.com.cn/s/blog_6465f2ed0102x4fp.html
页:
[1]