Showing results for
Do you mean
Solved!

# Plotting mesh discretization error in NX

Hi all,

for the analysis report in a project I'm required to plot the mesh discretization error, using the same criteria that FEMAP uses.

This criteria is calculated according to the following formula:

My questions are:

Is there any way to ask NX to output this same error criteria in a contour plot?

I know I can use Adative Analysis with 0 iterations to get an error plot, but I believe it doesn't match the same criteria FEMAP uses.

I would like to create variables to calculate the error, and the use result probe to plot it. But NX won't allow me to get a Minimum or Maximum nodal combination of stress.

Is there any way to get a stress variable that does a Minimum or Maximum nodal combination?

And finally, the only way I've found to get this Maximum and Minimum nodal combination is with a Results envelope or results Reduction. With this I don't get a Result probe, but I get a Table field. I could use this table field to calculate the error in the formula above.

The question would be: How can get a conotur plot of a table field with node IDs and their error value?

Hope I'm making sense. Thank you in advance for any help!

5 REPLIES

## Re: Plotting mesh discretization error in NX

I think this all makes sense. At first I didn't think it was possible. Then with more prodding of probe capabilities I was able to get it to work. I was getting hung up on not being able to obtain the minimum or maximum value of element-nodal data at each node. I found a way to do that though.

I attached an example model that contains results probes. Before I get into details explaining my approach, I first want to summarize my interpretation of your equation's variables so that we can confirm that we're solving the same problem.

ValueMax - Maximum element-nodal value at a node across all related elements

ValueMin - Minimum element-nodal value at a node across all related elements

ValueAvg - The average value of element-nodal data at a node

ValueVectorMax - The same as ValueMax

If my interpretation is wrong, then some of the context here is wrong. Hopefully the example will help you work through your problem. I chose to work with Von Mises stress and results probes. I defined a single results variable (VMStress). It is unaveraged too. A contour plot of a probe defined as VMStress (using the Entire Model) would be equivalent to a standard unaveraged element-nodal von Mises stress display.

Then I defined results probes for components of your equation.

MinVMStressNode = VMStress

• Select nodes
• Nodal Averaging: Minimum

MaxVMStressNode = VMStress

• Select nodes
• Nodal Averaging: Maximum

AvgVMStressNode = VMStress

• Select nodes
• Nodal Averaging: Arithmetic Mean

The key to solving this was that I had to select NODES to obtain the max/min stress at a node.

Next I used the probes in another probe, replicating your equation. Using probes within a probe requires the use of the fd() function. I also used the max() function to obtain the maximum of the two numbers listed in your equation. My probe for your equation looks like:

StressError =

max(

(fd("MaxVMStressNode") - fd("AvgVMStressNode")) ,

(fd("AvgVMStressNode") - fd("MinVMStressNode"))

)

/fd("MaxVMStressNode")

The fd() function converts fields and probes into components that can be used by the NX expression system. The expression system is the underlying intelligence that processes equations defined in probes, boundary conditions, and other expressions UI.

I've done hand calculations on a few locations and I'm getting correct results. I have a spider element in the model that skews the results for nodes that it is attached to (the average and min is off because there is no stress on the spider, but it is used in the evaluations). The spider element also has zero stress at its core node. Including that node in the probe will lead to an evaluation error (i.e. divide by zero). I didn't include that node in the stress error evaluation probe.

The one downside with respect to NX 10 is that you cannot get a contour plot of these results. NX 10 supports contour plots of probes only when the Selection is set to Entire Model. I was able to contour plot these probes using NX 11. NX 10 lets you list the results to the Information window and create a spatial field from the probe. From the field you can construct a node ID field that you can display on the model.

Regards,

Mark

Mark Lamping

Simulation Product Management

Product Engineering Software

Siemens Industry Sector

Siemens Product Lifecycle Management Software Inc.

mark.lamping@siemens.com

www.siemens.com/plm

## Re: Plotting mesh discretization error in NX

Hi Mark,

first of all, thank you very much for your detailed explanation and the example provided.

Your interpretation of my question was quite precise, except that ValueVectorMax is a constant. It's the highest nodal value of the whole Von Mises Stress Vector.

After much exploring the options of the Probe command and the similar ones in the Manipulation Group, I too discovered that by selecting the nodes it became possible to get the Minimum and the Maximum nodal combination.

I did get stuck because I didn't know for sure it was possible to do operations with probes. I was about to prepare a tedious workflow in excel when your answer let me know about the use of the fd() function.

Now as, you were guessing, I'm stuck because I cannot get a countour plot of that probe. I'm working on a mesh with around 5 million nodes and I cannot even get a Table Field from the probe. I have right-clicked on the probe and hit "Information" and NX has been creating the text file with the node IDs and the Error values for over 10 hours now.

Once I get the text file I hope I can get it back into NX as a spatial field.

So the improvement that NX 11 already has would be a big help. In general any efforts in making the results more available and easier to manipulate within NX would be a great advantage. I've seen way too many workflows involving tedious output from NX to excels, then macros and then back to NX.

I will post later whether I am able to find some workaround to get the contour plot.

Regards,

David de Esteban

Solution
Solution
Accepted by topic author Decnika
‎08-26-2015 04:32 AM

## Re: Plotting mesh discretization error in NX

David,

I revisited this one more time to try to get you a results display. I was able to get it done with another obscure fields capability. I'll continue by referencing my past example.

I have a linear statics solve with a single subcase. My results probe that selects nodes can create a spatial field. However the field also includes step and iteration columns for the independent domain. This is the general solution for nonlinear, multi-steps solves. I have the degenerate case (1 step, 1 iteration). So the step and iteration columns are meaningless. I knew that I could create a new node ID field where I reference the spatial field from the probe and specify values for step and iteration. I can do this using the ug_fieldvarAt function. However, I can also define a new probe with ug_fieldvarAt as well. I can evaluate that probe over the Entire Model and get the desired contour plot! Here is what I did:

1. Define the stress error probe as outlined in the previous mail as StressError

2. Generate a field from StressError

The field contains step, iteration value, node ID, and parameter (dependent domain) columns. Listing the field to the information window leads to:

Name: StressErrorField
Type: Table
Independent variables: 3
step
iter_val
node_id
Dependent variables: 1
u

3. Define another results probe with ug_fieldvarAt as:

ug_fieldvarAt( "StressErrorField", "u", 0,0,node_id )

4. Specify Entire Model for the selection in the probe

5. Contour plot the new probe

The structure of ug_fieldvarAt is:

• Name of the field being evaluated
• Name of the dependent value being returned
• Values of independent variables (step, iter_val, node_id)
• I forced the step and iter_val variables to always be 0. This also reduces the field to just 1 independent variable (node_id). Node_id varies for every node in the model.
• Note that if I have a solution with multiple subcases, then the step or iter_val that I specify in ug_fieldvarAt will have meaning beyond this degenerate case.

I hope that this will give you the contour plot that you need.

Regards,

Mark

## Re: Plotting mesh discretization error in NX

Hi Mark,

thanks a lot for the final answer. Using - ug_fieldvarAt() - really did the trick.

I used it in a slightly different way, though, as I didn't have the step and iteration columns in the spatial field.

The statement I used was:

ug_fieldvarAt( "StressErrorField", "u", node_id )

and worked wonders in getting a contour plot of the error norm.

Again, thank you for saving me a lot of time of tedious data processing.

Regards,

David de Esteban

## Re: Plotting mesh discretization error in NX

Hello Decnica,

how do You do that plot of discretization error in FEMAP?

Could You describe this a little?

Juraj