One of the nicer features in ANSYS Mechanical is the fact that when you enter in any type of tabular data, or look at any type of tabular results, you can view it as a table or as a graph. But what if you want to make your own graph, maybe even viewing values from two different solutions? ANSYS Mechanical has a little used feature called “New Chart and Table” that will allow you to make a table or a graph (chart) of quantities in your model tree that make sense when displayed as a graph or table: Time, loads applied over time, and results over time.
I have found myself exporting data to excel and making graphs all the time. And this is OK if you just do it once. But if you make a change to the model, you need to export again and redo your graph. The Chart and Table function makes this an automatic step, right there in your model tree.
For this posting, we will just use a simple plasticity bending example. We hold the bottom of a round bar with a grove cut in the bottom part and push on the top with forces.
In its simplest form the “Chart and Table” duplicates what you see in the graph and Tabular Data windows when you click on a load or a result. Here is what you get when you click on a displacement:
And if you select the probe in the tree and click on the “New Chart and Table” icon you get:
No woop. But even if I want to just plot one value, I can now customize the look of the graph a bit. Take a look at the Details for the Chart:
With the Chart Controls you can define what is shown on the X axis; if you want lines, points or both with Plot Style, log or linear scale, and if you want horizontal, vertical, neither, or both gridlines.
This is what it looks like if I turn on both gridlines and use a log scale for the Y Axis.
Next, we can add axis labels with “Axis Labels:”
The “Report” Section tells the program what to do when a report is generated. By Default you get a table and a graph. But you can do either, both, or you can suppress it in the report. You can give the plot and/or table in the report a caption by filling in the Caption field. It comes out nice:
Note that it actually includes a legend in the report. If you want the legend when you are looking at a graph interacively, just Right Mouse Button on the graph and choose “Show Legend” to turn it on:
Note that the legend shows the name of the branch in the tree. That is not very informative. So I change it to something useful and now the legend is useful:
So even with a basic graph, we can do a lot. But the real power is when you want to look at more. Let’s say I want to plot the force and the stress over time. I create a new chart with the icon then select the force and the stress results as my “Outline Selection”
I get a lot of stuff on my graph. That is because the program starts by plotting all the components for the load, and all max and min stress over time for the result. I simply change the ones I don’t want from “Display” to “Omit.” Then I get:
Much more useful. Note that it does not create two separate Y axis. Instead it normalizes the values between the min and max for each. This is not ideal, and hopefully in the future they will support multiple axis, but it still works for most cases when you want to compare things. Note that I renamed the branches in my tree so they show up in the legend correctly. Next I will add some labels and turn on gridlines.
We have been neglecting the table. It also gets created:
As with any table in ANSYS Mechanical, it can be exported to Excel. So if you find yourself grabbing data from multiple input or result tables and pasted them into Excel, make a Chart and Table item to grab all the data you want in one place, then export it once. To be honest, the quality of the graphs that are made are good enough for engineering, but maybe not good enough for a presentation. By making a Chart & Table of what you need, then exporting to Excel or some other graphing tool, you can still save a lot of time.
Next, let us look at plotting values from multiple simulations. If you look at the tree, you will notice that the charts are a child of the model, not the simulations. This signals that we can show data form the same model, but different simulations:
In our example I’ve simply made one with a tip force in the Y direction, and one with a tip force in the X direction. And I can show that by making a chart:
And I get a table:
HINT: If you want to make a single table or chart that shows all your input loads over time, in a single simulation or across multiple simulations, this is the way to do it. If I add a third simulation where I vary the load in all three directions, I can capture all three cases in one table:
These examples show loads. Here is what it looks like if we review the deflection on the tip probe over time for two simulations:
Or mash it all up, and show stress and deflection for both cases:
In every case so far we have used time (Load Step for static) as our X axis. But you can put any value you want on the X axis. Here is Force applied vs Tip Deflection:
Make sure you turn off Time and loads you don’t want to see. This is a great way to plot hysteresis effects.
You may notice the plots in this posting are nice and big and have a good aspect ratio. And your screen looks like this:
Every window in ANSYS Mechanical can be dragged out of the frame and positioned/sized however you want. So I pull off the Graph window by itself and resize it to the aspect ratio I want. Now when I want to save the image all I have to do is select that window and hit Alt-Print Screen. The image is now stored in the clipboard and I can past it where I want.
To get the normal window configuration back, click View>Windows>Reset Layout.
As always, play with it to figure more out. I’ve included my simple test case in case you want to play with it first: