Ansys Assistant will be unavailable on the Learning Forum starting January 30. An upgraded version is coming soon. We apologize for any inconvenience and appreciate your patience. Stay tuned for updates.
Ansys Products

Ansys Products

Discuss installation & licensing of our Ansys Teaching and Research products.

How to get the position of selected nodes in apdl using vget command?

TAGGED: ,

    • Mehdi Baghaee
      Subscriber

      How is it possible to get the position of some arbitrary selected nodes (e.g. attached to a specific area) within an array in apdl?

      Note that *VGET, NPOSX, NODE,  1, LOC,  X command returns the position of whole nodes (in successive mode) instead of the selected ones.

    • harshvardhan.negi
      Ansys Employee

      Hi,
      The  APDL command *VGET is executed on the previously selected entities. So if you have selected a group of nodes, and you need location of any one node, you will first need to resect that node so that only that node is selected and then run the *VGET command.

      Regards,
      Harshvardhan
      Ansys Help
      Ansys Learning Forum (Rules & Guidelines)

      • Mehdi Baghaee
        Subscriber

         

         

        Just to say that it does not work. I dont know why it returns the location of all nodes instead of the selected ones.

        You could check it through my following codes which returns a 484*1 array instead of 18*1 array.

        /BATCH  
        /input,menust,tmp,”
        WPSTYLE,,,,,,,,0
        /NOPR   
        KEYW,PR_SET,1   
        KEYW,PR_STRUC,1 
        KEYW,PR_THERM,0 
        KEYW,PR_FLUID,0 
        KEYW,PR_ELMAG,0 
        KEYW,MAGNOD,0   
        KEYW,MAGEDG,0   
        KEYW,MAGHFE,0   
        KEYW,MAGELC,0   
        KEYW,PR_MULTI,0 
        /GO 
        /PREP7  
        ET,1,SOLID185   
        MPTEMP,,,,,,,,  
        MPTEMP,1,0  
        MPDATA,EX,1,,1e9
        MPDATA,PRXY,1,,.3   
        MPTEMP,,,,,,,,  
        MPTEMP,1,0  
        MPDATA,DENS,1,,6700 
        BLOCK,0,10,0,10,0,1,
        FLST,5,8,4,ORDE,2   
        FITEM,5,1   
        FITEM,5,-8  
        CM,_Y,LINE  
        LSEL, , , ,P51X 
        CM,_Y1,LINE 
        CMSEL,,_Y   
        LESIZE,_Y1, , ,10, , , , ,1 
        MSHAPE,0,3D 
        MSHKEY,1
        CM,_Y,VOLU  
        VSEL, , , ,       1 
        CM,_Y1,VOLU 
        CHKMSH,’VOLU’   
        CMSEL,S,_Y  
        VMESH,_Y1   
        CMDELE,_Y   
        CMDELE,_Y1  
        CMDELE,_Y2  
        WPSTYLE,,,,,,,,0
        FLST,2,44,1,ORDE,12 
        FITEM,2,1   
        FITEM,2,-11 
        FITEM,2,122 
        FITEM,2,143 
        FITEM,2,153 
        FITEM,2,-161
        FITEM,2,243 
        FITEM,2,-244
        FITEM,2,267 
        FITEM,2,-268
        FITEM,2,287 
        FITEM,2,-304
        /GO 
        D,P51X,ALL, , , , , , , , , ,   
        ANTYPE,4
        TRNOPT,FULL 
        LUMPM,0
        ASEL,S,AREA,,6  
        APLOT, 
        NSLA, S, ALL
        *VGET, NAPOSX, NODE,  ALL, LOC,  X
        FINISH  

        Any suggestion?

         

         

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