Hi,
I am trying to create sets of elements using python script in ABAQUS. This is my code:
"# Set
a.regenerate()
inst = a.instances['Part-1-1']
tol = 200e-6
xmin, xmax = 0.0, 0.04
ymin, ymax = 0.0, 0.05
# Top edge → InfEU
elemsEU = inst.elements.getByBoundingBox(
xMin=xmin, xMax=0.0398,
yMin=ymax-tol, yMax=ymax+tol,
)
a.Set(name='InfEU', elements=elemsEU)
# Bottom edge → InfED
elemsED = inst.elements.getByBoundingBox(
xMin=-tol, xMax=0.0398+tol,
yMin=ymin-tol, yMax=ymin+tol,
)
a.Set(name='InfED', elements=elemsED)
# Upper-right corner → InfUC
elemsUC = inst.elements.getByBoundingBox(
xMin=0.0398, xMax=0.0399+tol,
yMin=0.0498-tol, yMax=ymax+tol,
)
a.Set(name='InfUC', elements=elemsUC)
# Lower-right corner → InfDC
elemsDC = inst.elements.getByBoundingBox(
xMin=0.0398, xMax=0.0399,
yMin=ymin-tol, yMax=0.001+tol,
)
a.Set(name='InfDC', elements=elemsDC)
# Right vertical edge → InfER
elemsER = inst.elements.getByBoundingBox(
xMin=xmax-tol, xMax=xmax+tol,
yMin=0.0002-201E-8, yMax=0.0498+201E-8,
)
a.Set(name='InfER', elements=elemsER)"
But the problem is this code is not working perfectly to create my desired element set. For example, I want all the elements connecting with the top edge should for a set 'InfEU', but after running the script the set is not being created like that. (Please see the attached image). Now, am I doing it in a right way? Or is there any more effective way to do it accurately? Please give me some suggestions.
