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