Abaqus CAE Python后处理提取每一帧最大等效应力
3月5日 浏览:1276 收藏:8
使用Python语言对Abaqus CAE后处理结果进行分析,并提取一个分析步中每一帧的最大等效应力,其中Python代码如下:
from abaqus import * from abaqusConstants import * from odbAccess import * import visualization myFile=open('DATA.txt','w') print('********************************\n') myFile.write('********************************\n') myOdb=openOdb(path='viewer_tutorial.odb') myStepValue=myOdb.steps.values() for step in myStepValue: print('The current step is: %s.\n'%step.name) myFile.write('The current step is: %s.\n'%step.name) frameID=0 for frame in step.frames: print('The current frame is: %d.\n'%frameID) myFile.write('The current frame is: %d.\n'%frameID) frameID=frameID+1 stressValue=frame.fieldOutputs['S'].values maxMisesValue=0 for misesValue in stressValue: if misesValue.mises>maxMisesValue: maxMisesValue=misesValue.mises print('The maximum mises value of the current frame in current step is: %10.6f\n'%maxMisesValue) myFile.write('The maximum mises value of the current frame in current step is: %10.6f\n'%maxMisesValue) print('********************************\n') myFile.write('********************************\n') myFile.close()
点赞 2 评论 收藏 8