×
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

Find neighbouring/nearest nodes APDL?

Find neighbouring/nearest nodes APDL?

Find neighbouring/nearest nodes APDL?

(OP)
Hello,
I'm wondering if there is a way to find neighbouring or nearest nodes in APDL? I know I can use the NODE(x,y,z) command and that will find the nearest node to the point x,y,z. But I'm wondering if there is a different command that will tell me the numbers of the neighbouring nodes given a node number?
I think it might be possible to write a routine that can do this, but it could be time consuming to write and to run so I was wondering if there is a command or subroutine already out there that would do the job?
Thanks
George

RE: Find neighbouring/nearest nodes APDL?

What do you mean by "neighbouring or nearest nodes"? Do you mean attached to the same element as a particular node? Or within a finite range of a particular node?


------------
See FAQ569-1083: Asking questions the smart way on Eng-Tips fora for details on how to make best use of Eng-Tips.com

RE: Find neighbouring/nearest nodes APDL?

(OP)
Hi Drej,
I mean within a finite range of a node. From the way I am creating my mesh I know the number of the nodes that are part of the same element as a particular node. I'd like to automate the process of finding the nodes that are nearby but not part of the same element.
Thanks
George

RE: Find neighbouring/nearest nodes APDL?

This code will get you started.

It selects a finite box of nodes based on a centre node ("nodenum") and a range which is box shaped ("range"), where the box edge lengths are twice the "range" variable. It only works in 2D also (X and Y plane) but easy enough to extend.

CODE -->

! =============================================
! Identify a node number and a finite range
nodenum = 1795
range = 2.6E-02
! =============================================

alls
nsel,s,node,,nodenum
xloc = NX(nodenum)
yloc = NY(nodenum)

nsel,s,loc,x,xloc-range,xloc+range
nsel,r,loc,y,yloc-range,yloc+range
nplot 



------------
See FAQ569-1083: Asking questions the smart way on Eng-Tips fora for details on how to make best use of Eng-Tips.com

RE: Find neighbouring/nearest nodes APDL?

(OP)
Hi Drej,
Thanks for the script, that should find all the nodes within a bounding box. I've found another command NNEAR(x), that will find the nearest node to node x, it only returns one node and I'm not sure how it decides which one when there are several nodes all the same distance apart from the target node.
Thanks
George

RE: Find neighbouring/nearest nodes APDL?

Create spherical locaL coordinate system, located at the node around which you desire to find other nodes. select new nodes based on the radius.
Commands
Local....
Nsel, s, loc,...

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