×
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

Determine the area of a region with stress greater than the predetermined value

Determine the area of a region with stress greater than the predetermined value

Determine the area of a region with stress greater than the predetermined value

(OP)
Hi everyone,

After completing the solution, I can exploit the results on the body.
But how can I determine the area of a region with stress (or any result) greater than the predetermined value?
For example, the figure below is the stress result of one face, I want to calculate the area of the region with stress greater than 80MPa.
Is this possible?


Thank you.

RE: Determine the area of a region with stress greater than the predetermined value

Not sure, but for sure one can write a script for this.

Pseudo code:

1. Loop through all elements and get stresses
If it is above certain stress get node number and get area of the element and add it to total area, if not then do not do anything and go to the next Element until loop is complete.

This works in apdl (so could be a command snippet in solution in WB)

CODE --> apdl

/POST1

*get,ncount2,elem,,count

*dim,scrap2,array,ncount2,7 ! temporary array, length = ncount2
*dim,arlart,array,ncount2,3 ! temporary array, length = ncount2

! getting component stresses for all the elements and writing them in txt file
alls
SET,LAST
*VGET,scrap2(1,1),elem, , elist
etable,seq,s,eqv
*vget,scrap2(1,2),elem,,etab,seq

totarea=0
b=1

*do,i,1,ncount2,1


*if,scrap2(i,2),GT,4,THEN ! change this to the stress criteria needed (GT means greater then)

*get,arel,elem,i,AREA
totarea=totarea+arel

arlart(b,2)=i
arlart(b,3)=arel

b=b+1

*endif


*enddo 


RE: Determine the area of a region with stress greater than the predetermined value

(OP)
Hi,

Thank you for your reply.
I tried that code but the result was not satisfactory.
I understand in that code that the elements with stress greater than the predetermined value and the surface area of the elements are calculated.
In the case I am trying to achieve, it is the area on a surface. That means, there is only one side of an element on that surface.
I think this will be very difficult.

Anyway, thank you for your help.

RE: Determine the area of a region with stress greater than the predetermined value

Though you used shell element so I tried that on them and it was OK.

If you need the surface area on a 3d part then this should work.

We can add membrane element on that surface to get surface stresses something that is common and often used, then filter in the *do loop for elements only of type 2 say which are membrane elements (surface).

Below is an example (1x1x0.2 m block with applied pressure on one end) where the membrane elements are placed on top surface of the block to get accurate surface stresses, thus their total area is 1m2, so if we set the GT condition to 0, then we should get 1, and if we set it to high stresses say 100E6 Pa, then we should get zero area (since the applied stress is 1E6 Pa), so it works here - so perhaps something like this could be used:

CODE --> apdl

/clear
/prep7

W=1	! Width	
L=1	! Length	
TH=0.2	! Thickness

ET,1,SOLID185
ET,2,SHELL181   
!*  
KEYOPT,2,1,1
KEYOPT,2,3,0
KEYOPT,2,5,0
KEYOPT,2,8,0
KEYOPT,2,9,0
KEYOPT,2,10,0   
KEYOPT,2,11,0
sect,1,shell,,  
secdata, 0.0000005,1,0.0,3
secoffset,MID   
seccontrol,,,, , , ,   

MPTEMP,,,,,,,,  ! Material prop.
MPTEMP,1,0  
MPDATA,EX,1,,200E9  
MPDATA,PRXY,1,,0.3 
MPDATA,KXX,1,,51
MPDATA,ALPX,1,,0.0000115

BLOCK,0,W,0,L,0,TH,	!Define a block

ASEL,S,AREA,,4
SFA,ALL,1,PRES,1E6
ALLSEL,ALL

ASEL,S,AREA,,3
DA,ALL,ALL,0
ALLSEL,ALL

ESIZE,0.05,0	! Mesh
VMESH,ALL

type,2
nsel,s,loc,Z,0.2
esln,s,,,,
     
esurf   
allsel,all  


/SOL
!*  
ANTYPE,0
TREF,0	! Ref temp is 0 here
/STATUS,SOLU
SOLVE   
FINISH 

/POST1

allsel,all

*get,ncount2,elem,,count

*dim,scrap2,array,ncount2,7 ! temporary array, length = ncount2
*dim,arlart,array,ncount2,3 ! temporary array, length = ncount2
*dim,eltyp,array,1,1 ! temporary array, length = ncount2

SET,LAST
*VGET,scrap2(1,1),elem, , elist
etable,seq,s,eqv
*vget,scrap2(1,2),elem,,etab,seq


totarea=0
b=1

*do,i,1,ncount2,1
*vget,eltyp(1),elem,i,ATTR,TYPE

*if,scrap2(i,2),GT,0,AND,eltyp(1),EQ,2,THEN ! change this to the stress criteria needed (GT means greater then)

*get,arel,elem,i,AREA
totarea=totarea+arel

arlart(b,2)=i
arlart(b,3)=arel

b=b+1

*endif


*enddo 

RE: Determine the area of a region with stress greater than the predetermined value

(OP)
Thank you very much
I have understood and applied successfully.

RE: Determine the area of a region with stress greater than the predetermined value

No worries AnPham, glad I could help. You have helped a lot here but also in the ansys student community site - it is much appreciated that you continue doing that.

Thank you
Erik (jj77) :)

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


Resources

Solutions Brief - Protecting and Rescuing On-Ground Personnel
Keeping our warfighters safe and delivering them a competitive advantage is a key goal of departments of defense around the world. It’s a goal shared by embedded computing manufacturers like Abaco: we never forget who we serve.This case study describes how a major international contractor integrated an Abaco single board computer at the heart of its CAS/CSAR solution. Download Now
Datasheet - Top Enhancements Creo 7.0
PTC's Creo 7.0 has breakthrough innovations in the areas of generative design, real-time simulation, multibody design, additive manufacturing, and more! With Creo 7.0, you will be able to design the most innovative products faster than ever before, keeping you on the cutting edge of product design and ahead of your competition. Download Now

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