×
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 find nodes connected to a specific node

how to find nodes connected to a specific node

how to find nodes connected to a specific node

(OP)
hi everybody
does anyone have a suggestion on how to find the connected nodes (i mean the labels of those nodes) to a given node in a nodeset through a python script? it is important that this be carried out through a python script.
thanks a lot!

RE: how to find nodes connected to a specific node

(OP)
Since nobody has replied yet I'd like to add this to my request for help:

I need what I explained above to calculate a mean normal direction to a node in order to move that node along that direction during a postprocessing of the abaqus results.

All that could be avoided if somebody has an idea on how to obtain such normal direction to a node.

Thanks again to all of you

 

RE: how to find nodes connected to a specific node

thepiggy

I guess you could loop though all of the elements that are associated with the nodeset to work out if the target node resides in the connectivity list for a particular element. If so, you could then work out what other nodes are connected to that target node based upon its position in each associative elements connectivity list (you will need to refer to the documentation to ascertain what the connectivity is for the specific element you are using i.e. if using C3D8 and target node is first in element connectivity list then connected nodes are 2nd, 3rd, 4th & 5th of that element). If these connected nodes belong to the nodeset then you can store its label in an array etc and output as required

bfillery

RE: how to find nodes connected to a specific node

(OP)
thanks bfillery

that could be a good idea. i'm just wondering where i could find the info on the connectivity (i mean, on the fact that the first node in the element connectivity list is connected to the 2nd,3rd,4th,and 5th).
thanks a lot for your help!

RE: how to find nodes connected to a specific node

(OP)
could you bfillery or anybody else be so kind to explain to me how to access the labels of the nodes belonging to a specific set? i seem to not be able to. i'm still talking about python script
thanks a lot!!!

RE: how to find nodes connected to a specific node

Hi

Lets say that you have an element set defined in the assembly that contains all the elements that are associated with the node set you mentioned above. To access the connectivity for each of the elements in this element set you would loop over the elements as follows

for i in mdb.models[modelName].rootAssembly.instances[instanceName].sets[elementSetName].elements:
   element=i
   connectivityList=element.connectivity

This tells you what nodes are connected to each other node from an element perspective. You can then build your required connected nodes list accordingly.

RE: how to find nodes connected to a specific node

(OP)
great!
thanks a lot. you're cool bfillery.
i appreciated your help very much



 

RE: how to find nodes connected to a specific node

(OP)
excuse me bfillery
i ended up not needing to access mdb because i chose another way to do what i needed to do when i asked that question. but now i'd actually like to open my mdb and access some stuff in there.
could you kindly explain to me how to make what you suggested work?
you wrote
mdb.models[modelName].rootAssembly.instances[instanceName].sets[elementSetName].elements:
   element=i

but i can't get it to work
don't i have to define mdb first? i'm very confused on how to access a model database.....
 

RE: how to find nodes connected to a specific node

Hi,

Sorry, I think I wrote the wrong thing. If accessing the odb from within CAE one way is to use,

myOdb=session.openOdb(name='myOdb', path='C:/......')

then

myOdb.rootAssembly.instances[instanceName].sets[elementSetName].elements etc as discussed above.

RE: how to find nodes connected to a specific node

(OP)
thanks
though i'd like to access the model database, not the odb, because the node connectivity is in the model database, and i'd like to access it through a python script and not from within the CAE. could you help me with that?

 

RE: how to find nodes connected to a specific node

thepiggy

I am guessing by the database you mean a file.cae.

If this is the case then you still need to use a cae license but not run cae with a GUI

To do this you can call the script in the working directory as follows

abaqus cae noGUI=script_name.py

You will also need some stuff at the top of your script to help with the import of cae tools: i.e.

from abaqus import *
from abaqusConstants import *
from caeModules import *
from driverUtils import executeOnCaeStartup
executeOnCaeStartup()
Mdb()

From here you should be able to use:

mdb.models[modelName].rootAssembly.instances[instanceName].sets[elementSetName].elements etc as given above.

 

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