Using User Defined Results in ANSYS Mechanical

Categories:

I first started contemplating this article on user defined results several weeks ago, and I was planning on somehow working in a Jersey Shore reference.  But now that I’ve relocated to Colorado and am recovering from a climbing trip that was a bit above my ability, my creative juices are a little low (they were used up trying to improvise my way up an overhanging roof pitch).

A picture of a cliff used in an article on Ansys User Defined Results
Hmm…I’m noticing there aren’t a lot of foot-holds to get me over there, prussik to the rescue!

Exploring User Defined Results

Anyways, User Defined results were first introduced in R12 to grant the user access to element table items. 

pic1

When you insert a user-defined result, you are required to fill in the ‘expression’ line in the details window. 

pic3
Just like Johnny 5, ANSYS needs input

You can look up everything that’s available through the documentation, but we all know that no one reads the instructions

pic4
Reading is boring…I’ll wait until the movie comes out, I hear it stars the guy who voiced Johnny 5

There’s a much easier way to auto-populate the ‘expression’ line…the Worksheet view!  To access this, first click on the ‘Solution’ branch and then select ‘Worksheet’ (tab in R12, button in R12.1 and newer).  This will show you a list of all the user defined result expressions.  Find one you like, right-mouse-click on it and select ‘Create User Defined Result’. 

pic5
That’s more like it

This will insert a ‘User Defined Result’, the only work you need to do is scope it to a body (if necessary).  The only ‘tricky’ part of this process is that you need to solve the model first before using the Worksheet view.  This is because before the model has been solved, Mechanical doesn’t know what is in the result file.  So if the worksheet view is blank or grayed out, it’s because you haven’t solved the model.

So what’s the benefit of using the User Defined Results?  Say you wanted to look at total strain, kinetic energy, or reaction force contour plots…just to name a few.  In order to view any of those, you would either have to open the .rst file in MAPDL or use the User Defined Result.

pic7
Left = FX, Right = Total Strain

Here’s a quick description of the ‘headers’ available on the Worksheet tab.

U Displacement
S Stress
EPTO Total Strain
EPEL Elastic Strain
EPPL Plastic Strain
EPTT Thermal Strain
ENFO Element Nodal Reaction Forces
NDIR Nodal Orientation Values

There are more headers that are listed in the documentation (I know, we all agreed that was boring).  However if you’re looking for items stored in the NMISC or SMISC (for ‘regular’ or contact elements), those are accessible provided you properly format the expression line.

So now let’s go through an example where we actually use this functionality.  A customer called in asking how to calculate the volume of a part above a specified stress level.  Interesting question…

First we create a user defined result and use the ‘VOLUME’ expression.  So we’re half-way there.  Next, we need to understand about how the results are stored for a result item in the ‘Solution’ branch.  Each contour plot is actually a vector in the form of element/node vs result.  You can see this for yourself by right-mouse-clicking on the item in the tree and selecting ‘export’.  So right now we have a vector defined of element vs volume.  Now we just need another listing of element vs stress.

When you create a stress result in Mechanical, the default behavior is to show the nodal-stress, which represent the average of the adjacent elements.  That’s not what we want.  If we look into the ‘Integration Point Results’ we see there are more options.  Element mean seems like it might work for us, but when we export it, we see that it’s still reporting stresses at the node, only now it’s using a different integration scheme.

pic9
Averaged
pic10
Elemental Mean

In order to access the average stress value of the element (not node), we need to use the User Defined Results.  We’ll ask to evaluate the expression seqv (von Mises) and set the integration option of using the elemental mean.

pic11

Now when we export that result item we get what we want…element vs stress:

pic12

Now we just need to export both vectors (volume and stress), then copy/paste/sort/sum and you’re done.  Don’t forget the most important step…billing for 4 hours of post-processing work.

Long story short, all you MAPDL users who have been complaining about not being able to access element tables should take a look at the User Defined functions. 

If you found this article useful, please consider using PADT’s Ansys team for your training or consulting needs.

Get Your Ansys Products & Support from the Engineers who Contribute to this Blog.

Technical Expertise to Enable your Additive Manufacturing Success.

Share this post:

Upcoming Events

Apr 29
, 2025
New NVH Tools & Workflows in Ansys 2025 R1 - Webinar
Apr 29
, 2025
Design, Debug, and Test your Ansys Scade One Model - Webinar
May 01
, 2025
Applying Digital Engineering across Space Mission Analysis and Design - Webinar
May 07
, 2025
Meshing Updates in Ansys 2025 R1 - Webinar
May 07
, 2025
Transforming Robot Arm Design with Topology Optimization - Webinar
May 13
, 2025
Ansys Virtual Workshop - PCB Reliability with Sherlock
May 13
, 2025
Dynamic RF Interference: HFSS and STK for Antenna Array Control - Webinar
May 15
, 2025
Applying Digital Engineering across Space Mission Analysis and Design: Satellite - Webinar
May 21
, 2025
Optics Updates in Ansys 2025 R1 - Webinar
May 29
, 2025
Applying Digital Engineering across Space Mission Analysis and Design: Payload - Webinar
Jun 04
, 2025
Composites & Structural Optimization Updates in Ansys 2025 R1 - Webinar
Jun 09
- Jun 11
, 2025
TechConnect World 2025
Jun 18
, 2025
Fluent CPU - UI & UX Updates in Ansys 2025 R1 - Webinar
Jun 16
- Jun 20
, 2025
Turbo Expo
Jun 25
, 2025
E-Mobility and Clean Energy Summit
Jul 02
, 2025
Electric Machine & Consumer Electronics Updates in Ansys 2025 R1 - Webinar
Jul 11
, 2025
2025 Aerospace, Aviation, Defense and Manufacturing Conference
Jul 16
, 2025
HFSS Updates in Ansys 2025 R1 - Webinar
Aug 10
- Aug 13
, 2025
SmallSat 2025

Search the PADT Site

Contact Us

Most of our customers receive their support over the phone or via email. Customers who are close by can also set up a face-to-face appointment with one of our engineers.

For most locations, simply contact us: