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!
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.
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
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!
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!!!
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.
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.....
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?