loop over the node component/selected node, in which nodes numbers are not in sequence.
loop over the node component/selected node, in which nodes numbers are not in sequence.
(OP)
Hello, everybody
Is it possible to loop over the node component or the selected node numbers, in which nodes number are not in sequence.
Thank you a lot
wind
Is it possible to loop over the node component or the selected node numbers, in which nodes number are not in sequence.
Thank you a lot
wind





RE: loop over the node component/selected node, in which nodes numbers are not in sequence.
CODE -->
nsel,s,node,,....... ! select the node set *get,currn,node,0,num,min ! get minimum node num in variable currn *get,num_of_nodes,node,0,count ! get num of nodes ! Create a loop to carry out some function such ! as finding the nodal x co-ordinate *do,J,1,num_of_nodes ncx = nx(currn) *get,currn,node,currn,nxth ! Get the node number in the set higher than currn node = currn *enddo------------
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: loop over the node component/selected node, in which nodes numbers are not in sequence.
RE: loop over the node component/selected node, in which nodes numbers are not in sequence.
*get,nmax,node,platei,count
*get,minno,node,platei,num,min
*dim,p1node,,nmax
n0=minno
p1node(1)=n0
*do,i,2,nmax
n0=ndnext(n0)
p1node(i)=n0
*enddo
*do,in,1,nmax ! start loop over all nodes in one plate
*get,xno,node,p1node(in),loc,x
*get,yno,node,p1node(in),loc,y
*get,zno,node,p1node(in),loc,z
dz = wopl*(b1*sin(pi*(xno-0)/a)+b3*sin(3*(xno-0)*pi/a))*sin(pi*(yno+375)/b)
n,p1node(in),xno,yno,zno+dz
*end do
RE: loop over the node component/selected node, in which nodes numbers are not in sequence.
I combined what you two said, and write the above code, it works.
many thanks to you two.
cheers