from part import *
from material import *
from section import *
from assembly import *
from step import *
from interaction import *
from load import *
from mesh import *
from job import *
from sketch import *
from visualization import *
from connectorBehavior import *
odb=openOdb(path='sheared.odb');
myAssembly=odb.rootAssembly
frameRepository =odb.steps['Step-1'].frames;
frameE=[];
frameS=[];
frameIVOL=[];
frameE.insert(0,frameRepository[-1].fieldOutputs['E'].getSubset(position=INTEGRATION_POINT));
frameS.insert(0,frameRepository[-1].fieldOutputs['S'].getSubset(position=INTEGRATION_POINT));
frameIVOL.insert(0,frameRepository[-1].fieldOutputs['IVOL'].getSubset(position=INTEGRATION_POINT));
Tot_Vol=0;
Tot_Strain=0;
Tot_Stress=0;
for I1 in range(0,len(frameS[-1].values)):
Tot_Vol=Tot_Vol+frameIVOL[0].values[I1].data;
Tot_Strain=Tot_Strain+frameE[0].values[I1].data*frameE[0].values[I1].data;
Tot_Stress=Tot_Stress+frameS[0].values[I1].data*frameS[0].values[I1].data;
Avg_Strain=Tot_Strain/Tot_Vol;
Avg_Stress=Tot_Stress/Tot_Vol;
print'abaqus/standard stress tensor order:'
print '11-22-33-12-13-23'
print Avg_Strain;
print Avg_Stress;
print 'G12=',Avg_Stress[-1]
|