-
-
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.
-
- You must be logged in to reply to this topic.

Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Saving & sharing of Working project files in .wbpz format
- Solver Pivot Warning in Beam Element Model
- Understanding Force Convergence Solution Output
- An Unknown error occurred during solution. Check the Solver Output…..
- What is the difference between bonded contact region and fixed joint
- whether have the difference between using contact and target bodies
- The solver engine was unable to converge on a solution for the nonlinear problem as constrained.
- User manual
- Colors and Mesh Display
- material damping and modal analysis
-
3744
-
2573
-
1821
-
1236
-
594
© 2023 Copyright ANSYS, Inc. All rights reserved.