Q. I am trying to get the array data from a selected node set and I find that the data stored in the array are not from the selected set.
What could I be doing wrong?

A. By default *VGET is going to start at node number 1. You might need the *VMASK with *VGET command after selecting the node set of interest.
Below is a simple APDL input file that illustrates how to store all nodal UY displacements from a selected node set to an array called "displ".

/prep7
rect,,10,,1
et,1,182
mp,ex,1,30e6
mp,prxy,1,0.3
amesh,all
nsel,s,loc,x
d,all,all
nsel,s,loc,x,10
d,all,uy,1
allse
/solu
solve
!
/post1
set,last
plnsol,u,y
!
!select nodes of interest
nsel,s,loc,x,5,6
!
!determine the max node number in the set and store this value to a parameter called "ncount"
*get,ncount,node,,num,max
!
!define an array called "displ" and assign it the number of rows equal to "ncount"
*dim,displ,array,ncount,2
!
*vget,displ(1,2),node,1,nsel
*vmask,displ(1,2)
!retreive the nodal displacement values and save them to predefined array "displ"
*vget,displ(1),NODE,,U,Y


Q. I am trying to get the array data from a selected node set and I find that the data stored in the array are not from the selected set.
What could I be doing wrong?

A. By default *VGET is going to start at node number 1. You might need the *VMASK with *VGET command after selecting the node set of interest.
Below is a simple APDL input file that illustrates how to store all nodal UY displacements from a selected node set to an array called "displ".

/prep7
rect,,10,,1
et,1,182
mp,ex,1,30e6
mp,prxy,1,0.3
amesh,all
nsel,s,loc,x
d,all,all
nsel,s,loc,x,10
d,all,uy,1
allse
/solu
solve
!
/post1
set,last
plnsol,u,y
!
!select nodes of interest
nsel,s,loc,x,5,6
!
!determine the max node number in the set and store this value to a parameter called "ncount"
*get,ncount,node,,num,max
!
!define an array called "displ" and assign it the number of rows equal to "ncount"
*dim,displ,array,ncount,2
!
*vget,displ(1,2),node,1,nsel
*vmask,displ(1,2)
!retreive the nodal displacement values and save them to predefined array "displ"
*vget,displ(1),NODE,,U,Y





Show Form
No comments yet. Be the first to add a comment!