×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Warning Handeling

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

RE: Warning Handeling

Hello,

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

*get,ncount,node,,count
*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

(OP)
Hi Alex,

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

(OP)
Hi Alex,

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

First of all, I have found an error in my proposed code:

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

(OP)
Hi Alex,

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

Your loads on the model are perfectly symmetric, so the model can be solved. But you haven't defined any contraints. You could get numerical problems. In some cases Ansys will converge to a solution, in some other cases not. So it is the best thing to do, to constrain the 3 rigid body DOF by constraining 2 nodes in an appropriate way.

Regards,
Alex

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources