Abaqus Python在每个节点上获取压力并保存在文本文件中

Abaqus Python在每个节点上获取压力并保存在文本文件中,python,text,abaqus,Python,Text,Abaqus,我试图提取每个节点或每个积分点的应力。 我可能会有压力,但我不知道压力值在哪里。 如何添加节点编号或节点坐标?下面是我提取所有应力分量的代码 from odbAccess import * import numpy as np odb = openOdb(path='C:/Users/Solal/Job-1.odb') lastFrame = odb.steps['Step-1'].frames[-1] location = lastFrame.fieldOutputs['COORD']

我试图提取每个节点或每个积分点的应力。 我可能会有压力,但我不知道压力值在哪里。 如何添加节点编号或节点坐标?下面是我提取所有应力分量的代码

from odbAccess import *
import numpy as np

odb = openOdb(path='C:/Users/Solal/Job-1.odb')

lastFrame = odb.steps['Step-1'].frames[-1]


location = lastFrame.fieldOutputs['COORD']
stress=lastFrame.fieldOutputs['S']  
sortie = open('Resu_PE_maillage.txt', 'w')
sortie.write('\t S11 \t\t S22 \t\t S33 \t\t  S12 \t\t S23 \t\t S13 \n')


for S in stress.values:
    sortie.write('%.10e\t\t %.10e\t\t %.10e\t\t %.10e\t\t %.10e\t\t %.10e\n' % (S.data[0], S.data[1], S.data[2], S.data[3], S.data[4], S.data[5]))

sortie.close()
  • 开放式odb
  • 在部件中选择步骤和帧编号
  • 按编号索引在节点上循环:

    for i in range (len(....nodes)):
    
        N=....nodes[i]
    
  • 查找每个节点的应力

  • 在文本文件中写入i和重音

  • 试着用prettyPrint查看S中的所有内容。你可以从S获得标签。