Creating edge and node sets in Abaqus using Python
Creating edge and node sets in Abaqus using Python
(OP)
Hi guys
I have not much experience in Python scripting for Abaqus. I am importing an step file from catia to Abaqus. I want to create edge and node sets for applying boundary conditions. I came across an "findat" option to do it.. But i am not successful with it.
Is there any other option of selecting specific nodes at specific edges to form a set in abaqus?
assembly = mdb.models['Upper_Rail'].rootAssembly
assembly.Set(edges=assembly.instances['al_part'].edges.findAt(((308.044891, -747.636108, 669.81366),),), name='fixed_edge')
assembly.Set(name='fixed_nodes', nodes=assembly.sets['fixed_edge'].nodes)
The coordinates is the starting point of the edge which i need to select.
i get an error
Warning: findAt could not find a geometric entity at (308.044891, -747.636108, 669.81366)
REg
Gokul
I have not much experience in Python scripting for Abaqus. I am importing an step file from catia to Abaqus. I want to create edge and node sets for applying boundary conditions. I came across an "findat" option to do it.. But i am not successful with it.
Is there any other option of selecting specific nodes at specific edges to form a set in abaqus?
assembly = mdb.models['Upper_Rail'].rootAssembly
assembly.Set(edges=assembly.instances['al_part'].edges.findAt(((308.044891, -747.636108, 669.81366),),), name='fixed_edge')
assembly.Set(name='fixed_nodes', nodes=assembly.sets['fixed_edge'].nodes)
The coordinates is the starting point of the edge which i need to select.
i get an error
Warning: findAt could not find a geometric entity at (308.044891, -747.636108, 669.81366)
REg
Gokul





RE: Creating edge and node sets in Abaqus using Python
If your coordinates are not precise enough, you could use getClosest().
RE: Creating edge and node sets in Abaqus using Python
I did this the place i want to create the sets are the exact one. But how do i say abaqus to select the edge which starts from this coordinate?
RE: Creating edge and node sets in Abaqus using Python
i = mdb.models['Model-1'].rootAssembly.instances['Part-1-1']
print i.faces.findAt((1,0,0),)
({'featureName': 'Part-1-1', 'index': 5, 'instanceName': 'Part-1-1', 'isReferenceRep': False, 'pointOn': ((9.166667, -4.166667, 0.0),)})
And creating a set:
x=i.faces.findAt((1,0,0),)
edges1 =i.edges[x.index:x.index+1]
mdb.models['Model-1'].rootAssembly.Set(edges=edges1, name='Set-1')
RE: Creating edge and node sets in Abaqus using Python
RE: Creating edge and node sets in Abaqus using Python
RE: Creating edge and node sets in Abaqus using Python
i = a.instances['Part-1-1']
x = i.edges.findAt((1,0,0),)
edges1 =i.edges[x.index:x.index+1]
a.Set(edges=edges1, name='Edge-Set-1')
RE: Creating edge and node sets in Abaqus using Python
Still it doesnt work fine with this "findat" command. Especially this line
x = i.edges.findAt((1,0,0),)
when i give my coordinates it doesnt have any geometric entity in it.. I am trying to find it using an "getbyboundingbox" command.
Thanks
RE: Creating edge and node sets in Abaqus using Python
Any idea on how to select the faces using python..? have tried it with many options not working out though..
Thanks
RE: Creating edge and node sets in Abaqus using Python
- if you know exactly the location, then you can use findAt()
- if you know an approximate location, you could use getClosest()
- searching by a bounding box or sphere is similar
- or you know that this face is the outer/innermost face of the structure in a direction, then you could cycle through all faces and check each pointOn() information
I can create an example script, but not without more information of your specific problem. So if you're interested, upload a CAE file with a part/instance and mark the face (with a set, i.e.) you would like to access via Python. Then I could script how to do that.
PS: And let me know if it should be done at part or assembly level and what information of that face you have in advance.
RE: Creating edge and node sets in Abaqus using Python
Thanks for ur help.. Actually i am using a .stp file imported from catia. So i will upload the .stp file to you. Because i am not sure whether i can use all the features of Python with imported parts. I hope u can just create a surface using python . Thanks a lot mate. I have also attached a picture showing the surface i want to select.
Reg
Gokul
RE: Creating edge and node sets in Abaqus using Python
RE: Creating edge and node sets in Abaqus using Python
RE: Creating edge and node sets in Abaqus using Python
RE: Creating edge and node sets in Abaqus using Python
And also i am finding the coordinates of the points in the part by writing a input file prior to the analysis, so that i can get the coordinates at certain locations. Is there any way to also see what informations that can be got just from the part imported from Catia.
When i use the keywrods like, getnodes(), getedges(), getfaces() i am not able to see anything. How to see in prior what infos i have in my part?
RE: Creating edge and node sets in Abaqus using Python
But with the coordinates from your first post you'll not get the face you want. The other face seems to be closer.
#your coordinates = 308.044891, -747.636108, 669.81366
#geometry vertex between faces = 308.044876,-747.636108,669.81366
In general it is not a good idea to use a coordinate where it is not clear which face is the closest.
CODE
RE: Creating edge and node sets in Abaqus using Python
RE: Creating edge and node sets in Abaqus using Python
Thanks
RE: Creating edge and node sets in Abaqus using Python
RE: Creating edge and node sets in Abaqus using Python
Setbyboolean helped me...
Thanks..
RE: Creating edge and node sets in Abaqus using Python
Is it possible to give a raw input to abaqus from python script.. I would like run my script having a raw input command to choose the material of the users choice. I am having a array of material values and i want abaqus to prompt whenever i run my script for materials
Think i have put it clearly to you.
Thanks