ansys 这个错误是什么意思?该如何解决?
我运行ansys时出现这个错误该如何解决?
Subscript 1 is out of range for parameter CIR, Specified value is 4, Maximum value is 3
这是我这部分的代码:
*SET,num,3
!
*SET,rmin,2.5
*SET,rmax,12.5
!
*dim,cir,array,num,3
*SET,cum,0
*do,i,1,1000000
*if,cum,eq,num,then
*exit
*endif
*SET,x,rand(xmin,xmax)
*SET,y,rand(ymin,ymax)
*SET,r,10
*if,x-r,gt,xmin,and,x+r,lt,xmax,then
*if,y-r,gt,ymin,and,y+r,lt,ymax,then
*if,cum,eq,0,then
*do,j,11,20
*set,dist2,sqrt((kx(j)-x)**2+(ky(j)-y)**2)
*if,dist2,lt,1.1*r,then
*exit
*else
*SET,cum,cum+1
*SET,cir(cum,1),x
*SET,cir(cum,2),y
*SET,cir(cum,3),r
*endif
*enddo
*else
*SET,sum,0
*do,j,1,cum
*SET,dist,sqrt((cir(j,1)-x)**2+(cir(j,2)-y)**2)
*if,dist,lt,1.1*(cir(j,3)+r),then
*exit
*else
*endif
*enddo
*if,sum,eq,cum,then
*SET,cum,cum+1
*SET,cir(cum,1),x
*SET,cir(cum,2),y
*SET,cir(cum,3),r
*endif
*endif
*endif
*endif
*enddo
/prep7