×
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

Python Commands: Find nodes on an edge
2

Python Commands: Find nodes on an edge

Python Commands: Find nodes on an edge

(OP)
Hi!

Currently I'm building a parameterized and automated model in Abaqus. Therefor I modify the journal-file of a CAE model using Python Commands. My aim is to be able to change the dimensions of a component stepwise in a loop and to create a corresponding input file in each loop.

It works perfectly well but now I've come across a problem. For a Constraint (Equation) I need to define all nodes along an edge in a node set. Because the geometry of my component changes all the time also the mesh and the node labels change. Because of this I need a Python Command that finds the nodes on a specific edge. The label the edge itself I can find with the command
 
edges.findAt(x,y,z)
 
but how can I find the nodes?
In Abaqus 6.8. there is a Python Command for faces

faces.getNodes

I'd need an equal command to find all nodes on an edge.
Does anyone know such a command or another way how to solve this issue?

Kind regards!
Peter
 

RE: Python Commands: Find nodes on an edge

You need to be careful and distinguish between a Geometry Edge and a Mesh Edge. I suspect that you are getting the geometry Edge with your above command. If it were a Mesh Edge, then you could use this command to access it's nodes:

yourMeshEdge.getNodes()

However, with a geometry edge, you could create a set from the edge and then access it's nodes after you have meshed it.

yourSet = mdb.models[modelname].rootAssembly.Set(name='Set-1', edges=yourEdge)
mdb.models[modelname].rootAssembly.sets[yourSet].nodes

I haven't tested this out, but it should work something like that...
 

RE: Python Commands: Find nodes on an edge

(OP)
It works fine that way. Now I'm able to define the nodes on a specific edge in a set.

mdb.models['Model-1'].rootAssembly.Set(edges=
    mdb.models['Model-1'].rootAssembly.instances['Part-1-1'].edges.findAt(((x,y,z),),), name='myEdge')

mdb.models['Model-1'].rootAssembly.Set(name='myNodes', nodes=mdb.models['Model-1'].rootAssembly.sets['myEdge'].nodes)

Thanks a lot vumat721!!!  

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