Is there a way to calculate E from stress and strain in ABAQUS? The reason I ask is because there is no field like that in the field output or history output requests list...
# The actual transformation happens in the next three lines
s_AGlobalCoord = session.scratchOdbs[OdbName].rootAssembly.datumCsyses['AGlobalSys']
tmpField1 = mystress.getTransformedField(datumCsys=s_AGlobalCoord)
mystress=tmpField1
tmpField2 = mystrain.getTransformedField(datumCsys=s_AGlobalCoord)
mystrain=tmpField2
# Home made for exercise 1 - calculation for all boundary conditions
############# Actual calculations ##############
strain11 = 0
strain22 = 0
stress11 = 0
# Loop over all elements
for j in range(len(mystress.values)):
# data[0] means S11, values[j] indicates the element
stress11 = stress11 + mystress.values[j].data[0]*myivol.values[j].data
for j in range(len(mystrain.values)):
# data[0] means E11, values[j] indicates the element
strain11 = strain11 + mystrain.values[j].data[0]*myivol.values[j].data
strain22 = strain22 + mystrain.values[j].data[1]*myivol.values[j].data
# Take the average over the volume
stress11 = stress11/UVol
strain11 = strain11/UVol
strain22 = strain22/UVol
# Calculate stiffness
stiffness = stress11/strain11
poisson = -strain22/strain11