reserchenge
Materials
- Jan 28, 2008
- 6
Hi, I recently created a script file to store data from a simulation. I am fairly new to Ansys. The script file is below. One problem is that I keep getting "warning" messages that come up telling me that the requested information is not available at the specified node. The do loop runs through all the nodes so some of them do not have the information i am requesting. Is there a way to check to see if the info is at the node before i request it to avoid getting the errors?
*Get,MaxNode,Node,0,Num,max
*Get,MinNode,Node,0,Num,min
*set,rows,7
*DIM,StressArray,Array,rows,MaxNode
*Dim,StressArray2,Array,MaxNode,rows
*set,j,1
*DO,i,MinNode,MaxNode
*Get,Xcoord,Node,i,LOC,X
*Get,Ycoord,Node,i,LOC,y
*Get,Zcoord,Node,i,LOC,z
*Get,Xstress,Node,i,S,x
*Get,Ystress,Node,i,S,y
*Get,Zstress,Node,i,S,z
*Get,XYstress,Node,i,S,xy
StressArray(1,j) = Xcoord,Ycoord,Zcoord,Xstress,Ystress,Zstress,XYstress
*set,j,j+1
*ENDDO
*MFUN,StressArray2,TRAN,StressArray
*Get,MaxNode,Node,0,Num,max
*Get,MinNode,Node,0,Num,min
*set,rows,7
*DIM,StressArray,Array,rows,MaxNode
*Dim,StressArray2,Array,MaxNode,rows
*set,j,1
*DO,i,MinNode,MaxNode
*Get,Xcoord,Node,i,LOC,X
*Get,Ycoord,Node,i,LOC,y
*Get,Zcoord,Node,i,LOC,z
*Get,Xstress,Node,i,S,x
*Get,Ystress,Node,i,S,y
*Get,Zstress,Node,i,S,z
*Get,XYstress,Node,i,S,xy
StressArray(1,j) = Xcoord,Ycoord,Zcoord,Xstress,Ystress,Zstress,XYstress
*set,j,j+1
*ENDDO
*MFUN,StressArray2,TRAN,StressArray