Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Python Commands: Find nodes on an edge 2

Status
Not open for further replies.

PeterP1

Materials
Mar 27, 2009
9
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
 
Replies continue below

Recommended for you

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...
 
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!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor