-
-
June 30, 2019 at 9:52 am
Noelly
SubscriberHello,
I'm trying to find the average stress value on a face in Static Structural (the maximum value is the design criterion but for this application, I also need to report the average value). I've never used APDL before so I found this code online for a command:
! Commands inserted into this file will be executed immediately after the ANSYS /POST1 command.
! Active UNIT system in Workbench when this object was created: U.S. Customary (in, lbm, lbf, s, V, A)
! NOTE: Any data that requires units (such as mass) is assumed to be in the consistent solver unit system.
! See Solving Units in the help system for more information.
/post1
allsel,all
set,last ! Read result set
cmsel,s,face_01,node ! Select the node group
Atot=0.0 ! Reset total area value.
tot_stress=0.0 ! Reset total volume times stress value.
*GET,NNUM,NODE,0,COUNT ! Get total number of nodes in the name selection
ncounter = 0 ! Node number counter reset to zero
*DO,I,1,NNUM,1 ! Loop over all the selected nodes
ncounter = ndnext(ncounter) ! Acess the next node in the selection
narea = arnode(ncounter) ! Calculate the area associated with this node
*GET,vonmises,NODE,ncounter,s,EQV ! Calculate the stress at this node.
tot_stress = tot_stress + narea*vonmises
Atot = narea + Atot
*ENDDO
my_avestress1=tot_stress/Atot ! Calculate average stress.
fini
And I defined the face of interest as "face_01":
But there is no solution... I think the problem is to access the result set but I don't know why it does not work.Â
I also tried using the probe but it does not give average values.
-
June 30, 2019 at 10:35 am
-
June 30, 2019 at 6:12 pm
Noelly
SubscriberAlright, I will use your method. I trust it more and it actually works in my Ansys.
Thank you!
-
July 1, 2019 at 3:24 pm
peteroznewman
SubscriberGood choice. Please mark my post with Is Solution so the topic gets marked as Solved.
-
November 2, 2021 at 5:51 am
namandoshi
Subscriber.Hi,
- Name selection 'face_01' should be made before solving model.
- In end it should be 'finish' not 'fini'.
- Here they are using node area (narea) which i don't understand, can someone explain that.
- average stress/pressure on element face , can someone explain how to get it?
- Average stress directly available in ansys is = (sum of stresses over the selected face's nodes)/ (no of nodes)
- in 5th point, it may be possible that only some part of face is having stress but while calculating average stress, nodes having zero stress (on the selected face) is also included which can bring down average stress over the contact region.
.
-
Viewing 4 reply threads
- The topic ‘APDL for average values’ is closed to new replies.
Innovation Space
Trending discussions
Top Contributors
-
6034
-
1906
-
1425
-
1308
-
1021
Top Rated Tags
© 2026 Copyright ANSYS, Inc. All rights reserved.
Ansys does not support the usage of unauthorized Ansys software. Please visit www.ansys.com to obtain an official distribution.


