General Mechanical

General Mechanical

Calling a named node for local coordinate system definition

Tagged: 

    • Janne
      Subscriber

      Hello,

      I have a problem. I have created an equilateral triangle using ADPL. The origin is at the left bottom corner of the triangle. The node at this location is always numbered 1. Similarly, the right bottom corner node is always numbered 2. The 3rd node defining the triangle is the top node, which changes depending on the side lenght, which is a variable. See the figure for clarification.

      What I try to do, is define a local coordinate system based on these 3 nodes, using cs command. The problem is, that the 3rd node number always changes, so I have tried to write a code that selects that node, regardless of side length, and names it as topnodeThis is done by using cm command. I have managed to do this, no problem.

      But when I try to create the local coordinate system using the topnode name, it gives me an error "Node -596943967 is undefined or unselected. The CS command is ignored". The node number it gives as an error changes.

      Here is the code I have tried to use:

      nsel,s,loc,z,,10
      nsel,r,loc,x,,0
      nsel,u,loc,y,,(length-10)
      cm,topnode,node

      allsel

      cs,15,0,topnode,2,1
      rsys,15

      My question is: cannot I use named node in the cs definition?

      Thank you for reading the message.

    • Erik Kostson
      Ansys Employee

       

      Hi

       

      The answer is no.

       

      Instead use:

      cmsel,s,topnode

      mynodecs=0
      mynodecs=NDNEXT(mynodecs)
      cs,15,0,mynodecs,2,1

      allsel,all

       

       

       

      • Janne
        Subscriber

        Thank you for the prompt reply, it helped me to achieve what I wanted.

        I just had to add allsel between mynodecs=NDNEXT(mynodecs) and the cs command. Otherwise it couldn't find nodes 2 and 1.

Viewing 1 reply thread
  • You must be logged in to reply to this topic.