声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 2352|回复: 0

利用Python读取Abaqus的历史输出数据

[复制链接]
发表于 2016-5-12 09:45 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
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[0])
#创建中间变量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[name], 2.0)
sum = sqrt(sum) / maxAllowableDisp




print 'History:', sum.name
print 'Time       Magnitude'
for dataPair in sum.data:
    print "%5.4f  %5.2f"%(dataPair[0], dataPair[1])
转自:http://blog.sina.com.cn/s/blog_6465f2ed0102x4fp.html

回复
分享到:

使用道具 举报

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-4-30 00:56 , Processed in 0.109970 second(s), 21 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表