I have a code to get data from ABAQUS by using MATLAB.

How do I convert this Python code from extracting data at integration points to unique nodal?

"from odbAccess import *

from sys import argv,exit

odbName = argv[2]

Ins_name = argv[3]

El_Set_name = argv[4]

stepname = argv[5]

saved_name= argv[6]

odb = openOdb(odbName)

#Part_1=odb.parts[partname]

#print odb

#print odb.steps

######################################################### 12

#print

S_elements=odb.rootAssembly.instances[Ins_name].elementSets[El_Set_name]

S_stresses=odb.steps[stepname].frames[-1].fieldOutputs['S']

stresses= S_stresses.getSubset(region=S_elements,position=INTEGRATION_POINT) # ELEMENT_NODAL

#print stresses.values[3].data

ii=0

outfile=open(saved_name, 'w')

for ss in stresses.values:

S11=stresses.values[ii].data[0]

S22=stresses.values[ii].data[1]

S33=stresses.values[ii].data[2]

Smin=stresses.values[ii].minPrincipal

Smax=stresses.values[ii].maxPrincipal

Pre=stresses.values[ii].press

elm_lable=stresses.values[ii].elementLabel

int_point_lable=stresses.values[ii].integrationPoint

# print elm_lable,int_point_lable,S11,S22,S33,Smin,Smax,Pre

outfile.write('%i %i %f %f %f %f %f %f' % (elm_lable,int_point_lable,S11,S22,S33,Smin,Smax,Pre))

outfile.write('\n')

ii=ii+1

outfile.close()

exit(1)"

More Manar Naser's questions See All
Similar questions and discussions