I would like to add to the script below to only write the element volumes at specific set coordinates in a 2D space e.g at (21,-11), (32,-32) etc. The reasoning behind this is; I would like to find the mass of material (modelled as a shell) in specific locations in a bottle blowing simulation.
Could someone advise how I may do this please? I am new to Python scripting.Thanks.
from odbAccess import *
from abaqusConstants import *
odb = openOdb(path='SBM_simulation_V1.odb')
lastFrame = odb.steps['Finalblow'].frames[-1]
volume=lastFrame.fieldOutputs['EVOL']
fieldValues=volume.values
myAssembly=odb.rootAssembly
text = ""
for v in fieldValues:
output= str(v.elementLabel)+'\t'+str(v.data)
text='\n'.join([text,output])
f1=open('Output STH.xls', 'a') #a writes to existing file
f1.write(text)
f1.close()
odb.close()```