AbhishekM
Mechanical
- Oct 22, 2019
- 2
Hello all,
I am having trouble selecting elements from Abaqus using python script, it needs to be adaptable to varying mesh size and varying sample length/area.
I am trying to generalize part of script for element selection in pre-processing and using the element sets for use in post processing. I have searched and thought that I got the solution using one of the other questions, but I having a different error. I ran this for a 2D model in Abaqus PDE 2017 version.
I have read these questions :
1. Selecting multiple partitioned regions in ABAQUS with findAt for setting mesh controls
2. Abaqus: script to select elements on a surface
3. Selecting elements in Mesh Part (Orphan Mesh)
I am also attaching my code
The reference points are getting generated so the co-ordinates are not wrong.
I had expected the created set to be of element type and have 10 elements, however the set created is of geometry type and ofcourse has no elements. Error Screenshot. Please suggest a correction to my code or a better approach.
All help is appreciated.
I am having trouble selecting elements from Abaqus using python script, it needs to be adaptable to varying mesh size and varying sample length/area.
I am trying to generalize part of script for element selection in pre-processing and using the element sets for use in post processing. I have searched and thought that I got the solution using one of the other questions, but I having a different error. I ran this for a 2D model in Abaqus PDE 2017 version.
I have read these questions :
1. Selecting multiple partitioned regions in ABAQUS with findAt for setting mesh controls
2. Abaqus: script to select elements on a surface
3. Selecting elements in Mesh Part (Orphan Mesh)
I am also attaching my code
Python:
length=float(120)
height1=float(3)
height2=float(0.7)
th=float(45)
ElemSize=float(0.1)
dms=float(4)
crack=float(10)
crack_offset=float(8.5)
a = mdb.models['xxxxxx'].rootAssembly
RP_Cent = a.ReferencePoint(point=(length-th+crack+crack_offset,2*height1+height2,0))
a.features.changeKey(fromName='RP-1', toName='RP_Cent')
RP_Left = a.ReferencePoint(point=(length-th+crack+crack_offset-dms/2,2*height1+height2,0))
a.features.changeKey(fromName='RP-1', toName='RP_L')
RP_Right = a.ReferencePoint(point=(length-th+crack+crack_offset+dms/2,2*height1+height2,0))
a.features.changeKey(fromName='RP-1', toName='RP_R')
e1 = a.instances['Upper_Adh'].elements
Cent = e1.getByBoundingBox(length-th+crack+crack_offset-dms/2, 2*height1+height2-ElemSize, 0,
length-th+crack+crack_offset+dms/2, 2*height1+height2, 0)
a.Set(elements=Cent, name='Centroid_Elements')
The reference points are getting generated so the co-ordinates are not wrong.
I had expected the created set to be of element type and have 10 elements, however the set created is of geometry type and ofcourse has no elements. Error Screenshot. Please suggest a correction to my code or a better approach.
All help is appreciated.