Warning Handeling
Warning Handeling
(OP)
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





RE: Warning Handeling
I would start by asking me, why the stresses are not available? Is it that you have suppressed result computation for some nodes (see command OUTRES)? If that so, then it's easy to know witch nodes don't have the stresses.
On the other hand, you could try another way, using the *vget command. See next code:
CODE
*set,rows,7
*DIM,StressArray,Array,rows,ncount
*Dim,StressArray2,Array,ncount,rows
*vget,StressArray(1,1),node,,loc,x
*vget,StressArray(1,2),node,,loc,y
*vget,StressArray(1,3),node,,loc,z
*vget,StressArray(1,4),node,,s,x
*vget,StressArray(1,5),node,,s,y
*vget,StressArray(1,6),node,,s,z
*vget,StressArray(1,7),node,,s,xy
And if the warnings are still there, then suppress them by /nerr,0
Regards,
Alex
RE: Warning Handeling
Thank you for the reply. I am not sure why the stresses are not available at some of the nodes. I have "two" holes inside a solid structure and I put pressure on the boundary of the holes. Perhaps, Ansys does not compute the stresses on the boundary nodes? I will try it the way you suggested which is more elegant anyway. Thankyou.
Regards,
Clint
RE: Warning Handeling
I have copied my model file below. I believe that there is no stress information in nodes contained in the side circles associated with material 2. Any idea why that would be so?
/PREP7
ET,1,PLANE2,,,2,,2,0
MP,EX,1,72
MP,NUXY,1,0.186
MP,ALPX,1,5e-7
MP,EX,2,72
MP,NUXY,2,0.186
MP,ALPX,2,3e-6
CYL4,0,0,100
CYL4,55,0,15
CYL4,-55,0,15
CYL4,0,40,15
CYL4,0,-40,15
ASBA,1,4
ASBA,6,5
AOVLAP,ALL
MSHKEY,0
MSHAPE,1,2D
SMRTSIZE,2
MAT,1
AMESH,4
MAT,2
AMESH,2
AMESH,3
/SOLU
ANTYPE,0
EQSLV,SPARSE
SFL,13,PRES,0.202e-3
SFL,14,PRES,0.202e-3
SFL,15,PRES,0.202e-3
SFL,16,PRES,0.202e-3
SFL,17,PRES,0.202e-3
SFL,18,PRES,0.202e-3
SFL,19,PRES,0.202e-3
SFL,20,PRES,0.202e-3
TUNIF,160
TREF,1500
SOLVE
APLOT,ALL
Regards,
Clint
RE: Warning Handeling
It has to be:
*DIM,StressArray,Array,ncount,rows
Secondly you are using old elements (plane2). This elements are not documented in the ansys v11 version. What kind of ansys version are you using? Anyway I suppose you should take the plane42 or better plane82 elements.
And thirdly you model is insufficiently constrained. You should restrain at least 2 nodes of the model.
Regards,
Alex
RE: Warning Handeling
I forgot to say: it works with plane42 elements!
Regards
Alex
RE: Warning Handeling
Thank you so much for your help! I am using Ansys 7.1. I know old old.. Anyway, I will change the element type to plane42. I am unclear what you mean by "insufficiently constrained". Are you saying I can't run this simulation and get effective results without specifying displacement or stress on at least two nodes?
Regards,
Clint
RE: Warning Handeling
Regards,
Alex