×
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!

*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

ANSYS Workbench commands

ANSYS Workbench commands

ANSYS Workbench commands

(OP)
Hi guys,
i'm new to ANSYS and i have some difficulties with APDL commands on Workbench.
I have a component with some named selections and i need to find the surface area of some areas. I need to use it in another command so i need to store it in a variable. I think i should use this *GET, Par, AREA, 0, Item1, IT1NUM, Item2, IT2NUM , but previously i think i should use ASEL and ASUM but i obtain errors. This is my code but surely is wrong.
ASEL,s,contact
ASUM,DEFAULT
*GET, my_area, AREA,0,AREA
Do you know how to do it?
thank you very much.

RE: ANSYS Workbench commands

Not sure if you can use asum and then how do you know the area number, since there are not areas like in the sense of apdl where yo define them usin A command. Not sure:

This is an alternative, it just needs for your to know the type number of the contacts:

CODE --> apdl

totarea=0
arel=0

*dim,eltyp,array,1,1 ! temporary array, length = ncount2


*get,ncount2,elem,,count


*do,i,1,ncount2,1
*vget,eltyp(1),elem,i,ATTR,TYPE
*if,eltyp(1),EQ,1,THEN ! change this to type number you need for the contacts
*get,arel,elem,i,AREA
totarea=totarea+arel
*endif
*enddo 

hh=totarea 

RE: ANSYS Workbench commands

(OP)
Ho Eric, thank you for your Answer.
The problem is that i have the same elements for all the areas of the component. Is not possibile to select the area through the name adopted in the named selections?
Thank you!

RE: ANSYS Workbench commands

As we said Areas (A) lines (L) volumes (V) and key points (KP) are geometrical entities in ansys apdl, not in workbench where geometry is defined via DM or SC and probably has a different description than apdl, so selecting using ASEL is OK in apdl classic, but not in WB.

here is a workaround where the area is calculated based on a nodal named selection (surfarean), which is easy to generate from a face name selection (just right click on the named selection for the face and choose create a nodal named selection). Dummy elements are then created there (on that face), and their total area is calculated (totarea) - finally these elements are deleted so they are not used in the solution.

CODE --> WB

/prep7
ET,200,SHELL181   
!*  
KEYOPT,200,1,1
sect,200,shell,,  
secdata, 0.0000001,1,0.0,3
secoffset,MID   
seccontrol,,,, , , , 

type,200
secnum,200
cmsel,s,surfarean

     
esurf   
allsel,all  


totarea=0
arel=0

NUMCP,ELEM

*dim,eltyp,array,1,1 ! temporary array, length = ncount2
*get,ncount2,elem,,count

*do,i,1,ncount2,1
*vget,eltyp(1),elem,i,ATTR,TYPE
*if,eltyp(1),EQ,200,THEN ! 
*get,arel,elem,i,AREA
totarea=totarea+arel
*endif
*enddo 

!hiha=totarea 
esel,s,type,,200
edele,all
allsel,all

/solu 

Alternatively you can look on scripting things and adding an extension - I do not have so much experience in that field so I do not know much, except that there is a guide for all api calls, say to get the area of face is .Area which is a member of the IBaseGeoFace interface I believe

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! Already a Member? Login



News


Close Box

Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close