ABAQUS批量提交Job与Python读取ODB结果应力应变数据
# coding: utf-8
#微信公众号:ABAQUS二次开发
#作者:阿信老师CAE
#email:axin_cae@163.com
#2022.03.17
from abaqus import *
from abaqusConstants import *
jobList = mdb.jobs.keys() #获取所有计算任务的jobName
for jobName in jobList:
mdb.jobs[jobName].submit(consistencyChecking=OFF) #提交计算
mdb.jobs[jobName].waitForCompletion() #等待计算完成
print jobName , "is completed"
# coding: utf-8
#微信公众号:ABAQUS二次开发
#作者:阿信老师CAE
#email:axin_cae@163.com
#2022.03.17
from odbAccess import *
from visualization import *
frame_num = 20 #定义需要输出的帧
odbName = 'X:/***/***.odb' #odb路径和名称
elemSetName = '***' #单元set
odb = openOdb(path=odbName)#打开odb
region = odb.rootAssembly.elementSets[elemSetName]
frameRps = odb.steps['Step-1'].frames
f_S1 = frameRps[frame_num].fieldOutputs['S'] #需要输出的场变量
sub_f_S1 = f_S1.getSubset(region=region)
S_Value = sub_f_S1.values
#读取所有单元的应力值
for i in range(len(S_Value)):
Stress =S_Value[i].data
print Stress
odb.close()
文章来源:ABAQUS二次开发
点赞 2 评论 1 收藏 11