0

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 I did using one of the othr questions, but I having a different error. I ran this in Abaqus PDE 2017 version.

I have read these questions at SO : 1. Selecting multiple partitioned regions in ABAQUS with findAt for setting mesh controls 2. Abaqus: script to select elements on a surface

length=float(120) 
height1=float(3)
height2=float(0.7)
th=float(45)
ElemSize=float(0.1)
dms=float(4) 
crack_offset=float(8.5)  

a = mdb.models['sdfdsf'].rootAssembly
RP_Cent = a.ReferencePoint(point=(length-th+crack+crack_offset,2*height1+height2,0))
a.features.changeKey(fromName='RP-1', toName='RP_Cent')
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')

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

All help is appreciated.

  • Its better if you respond to my answer or edit your question. It seems that your bounding box does not find anything. The box should be at a position and size so that all nodes of your elements are within it. Could you share your cae, so I can see where things go wrong? As for x,y,z coordinates you should ask a separate question to keep everything tidy. – UN4 Oct 30 '19 at 14:25

2 Answers2

0

From the code you show us it seems that your bounding box is of 0 height. That method returns elements that are within the bounding box. Try to make it thicker. Also try printing the size of Cent so you can diagnose if you got the right number of elements.

UN4
  • 587
  • 5
  • 19
0

@UN4 Hi sorry for the late reply. The reason it is 0 height, its because I am working on a 2D model. Having said that I did try to change the height, I am still getting the same error.

Additionally printing Cent does not help. There is no additional response and the error persists.

Also could you let me know how to extract the x,y,z co-ordinates for a particular reference point in pre-processing.