×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

How to get elements that are connected to a node?

How to get elements that are connected to a node?

How to get elements that are connected to a node?

(OP)
Hi gents,

I'm trying to write a python script that gives the list of all elements that are connected to a specified node. I did not find the answer on eng tips or with google.
One possbility is to make a loop testing for all elements if the specifiec node belongs to element.connectivity, but it appears costly if the model has hundred thousand nodes.
Furthermore, the viewer gives the information if we ask it. I suppose it is possible to get this information with an internal abaqus command, isn't it?

Can anyone help me?

thanks in advance.

V.

RE: How to get elements that are connected to a node?

Dear VzHache,

I've had the same problem and haven't been able to resolve it myself. I also noticed that the viewer can do it. That gave me the idea to check the .rpy-file to get the command behind it. Unfortunately, that didn't work as no line was added to that file once I performed the action in the Viewer.

RE: How to get elements that are connected to a node?

(OP)
Helle deyentl,

finally, I did this:

M3D6_list=[]                   # list of all available M3D6 elements in the current part
M3D6_connectivity_dict = {}    # dictionnary with all M3D6 elements
node_num_M3D6_tri_dict={}      # Dictionnary containing the connectivities of the nodes of M3D6 of the model ("connectivity" means : elements connected to a same node) ; the keys  correspond to the node numbers
m=0
for i in odb_instance.element :
    if (i.type=='M3D6') :
        M3D6_list.append(i.label)
        M3D6_connectivity_dict[i.label]=i.connectivity
        m=m+1
for j in M3D6_connectivity_dict.keys() :
    for k in M3D6_connectivity_dict[j] :
        node_num_M3D6_tri_dict[k]=[]
for i in M3D6_connectivity_dict.keys() :
        for k in M3D6_connectivity_dict[i][0:3] :
                node_num_M3D6_tri_dict[k].append(i)

It doesn't take too long as I feared.

RE: How to get elements that are connected to a node?

if you know the elementset, surface, etc. on which the element resides, you can further cut down on time.

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources