Keypad Shortcuts for Quick Views in Workbench

keypad1Hey, did you know that you can access predefined views in both ANSYS Mechanical and DesignModeler using your numeric keypad? You can! Assuming the front view is looking down the +Z-axis at the X-Y plane, here are the various views you can access via your numeric keypad.

For this to work, make sure you’ve clicked within the graphics window itself—not on the top window bar, or one of the tool bars, but right in the region where the model is displayed. You may need to turn off Num Lock, though it works for me on both my laptop and desktop with Num Lock on or off.

With that out of the way, here are the views:

0) Isometric view, a bit more zoomed in than the standard auto-fit isometric view. This is my preferred level of zoom while still being able to see the whole model, to be honest.

image

1) Front view (looking down the +Z-axis)

image

2) Bottom view (looking down the -Y-axis)

image

3) Right view (looking down the +X-axis)

image

4) Back up to the previous view

5) Isometric view, standard autofit (I don’t like the standard auto-fit—too much empty space. I prefer the keypad 0 level of zoom.)

image

6) Go forward to the next view in the cache

7) Left view (looking down the -X-axis)

image

8) Top view (looking down the +Y-axis)

image

9) Back view (looking down the -Z-axis)

image

Here’s a handy-dandy chart you can print out to refer to when using the numeric keypad to change views in Mechanical or DesignModeler. Share it with your friends.

image

Be a View Master: Customizing and Managing Views in ANSYS Mechanical

Accessing various predefined views in Mechanical is easy. You can click on the triad axes (including the negative sides of the axes) and view the model down those axes, or click the turquoise isometric ball for an isometric view. Or you can right click the graphics area and select from a variety of views (top, back, left, etc.) from the View menu.

But what if you want a predefined view that has the model rotated “just so” and zoomed out “just so?” What if you want to store these settings not just in your current model, but bring them into other models as well? Starting in R14.5 you can do this, using the Manage Views window.

To open the Manage Views window, click on the eye-in-a-box icon that looks like it was designed by Freemasons. image The Managed Views window appears at the lower left of the GUI. The window consists of the following:image

The labels are pretty self-explanatory, but let’s delve into a couple of examples. As you can see by observing the triad, the model viewpoint shown here does not coincide with any pre-defined view.

image

Click the Create a View button image and give the view a name (defaults to View 1 but any name can be given):

image

After rotating, panning, and zooming, you can return to this view by clicking the Apply a View button. image

image

As mentioned before, you can apply the same view between different models by using the View Export/Import capabilities. To do this, simply highlight the named view to be exported in the originating model and click the Export button. image Specify the xml file to which the view is to be stored. In another model, click the Import button image and browse to the xml file containing the view to be imported. This is basically the Mechanical equivalent of an APDL file containing /VIEW and /ZOOM commands. Example follows.

The following view is to be stored and exported to another model. Highlight the view name (“Sulk”) and click the Export button.

image

Frankie the Frowning Finite Element Model worries that views can’t be shared between models.

Specify the xml file name and click Save.

image

In a different model, click the Import button, browse to the xml stored in the previous step, and click open.

image

Highlight the imported view name and click the Apply a View button.

image

Sammy the Smiling Simulation Model is happy that views can be transferred between models.

The Managed Views window provides a significant amount of viewing versatility over the standard viewing definitions.

/HBC: One of Those Little Known Commands

The other day we received a tech support call requesting a way to remove the space between the element faces on a pressure plot.  He wanted this so that he could get a contour plot without seeing the contours of the elements on the back side of the part. So I built my trusty test block and applied a pressure. By turning on the pressure load symbols with  the /PSF command, also under PlotCrtls > Symbols, you can get plots like this.

image

Face Outlines (/PSF,1,1)

 

image

Arrows (/PSF,1,2)

 

image

Contours (/PSF,1,3)

Of course the customer was using this last contour plot option, but as you can see below, if you have pressure on both sides of the model, then the backside pressures show through the gaps. The plot can get a bit confusing. So after some digging, starting with the /PSF command, and not finding any reference on how to change the plot behavior, I asked around if anyone else had a way to do it, other than my first inclination which was to write a macro. So as I reverted to creating a macro, to do what should be a simple task, I thought, “No, there HAS to be an easier way.” Of course there is.

image

The one thing I’ve learned over the years… Well, yes, I’ve learned more than ONE thing, but I’m trying to make a point here… The one thing I’ve learned over the years, is that no matter how much I learn, there is always someone who know more than me.  So I asked Sheldon! (Not the Sheldon on Big Bang Theory; ANSYS, Inc’s very own Sheldon Imaoka.) I thought, “Surely he will know some undocumented command to save me time.  It took him all of three minutes to get back to me with the /HBC command. It is a fully documented, but seldom used, command that is hidden in the recesses of the Command Reference that determines how boundary condition symbols are displayed. When turned on, it will “use an improved pressure contour display.” So you go from the picture on the top, to the picture on the bottom.

imageimage

So I learned two new things. One is the /HBC command can give you nicer looking plots. The other, and even more useful thing, is to click the links on the help page at the upper right corner.

image

For if I did, I would have found the /HBC command on my own.

image

It looks like I need to sit down with a nice cup of hot chocolate* and the Command Reference and just scan the listing for commands that I don’t recognize and learn what they do.  Oh, what I go through for you people. Well, I’ll just make sure that it’s really good hot chocolate*.   I’ll write a new post from time to time on cool commands I find useful.

Have a great day!!!

*It’s 85 degrees here this week and I really meant iced tea, but I didn’t want to rub it in. Smile

Duh! Three ANSYS Mechanical Features I Should Know But Didn’t

Selection Information, Manage Views, and Changing Settings on Multiple Load Steps

There is no way to hide the embarrassing reality. I am supposed to be an expert. I am introduced to people as such. People all over the world read stuff I write about how to use ANSYS products more effectively.  But last week and this week, humility has struck a devastating blow on my ego.  I found three very useful things in ANSYS Mechanical that I either didn’t know, or forgot about. I even mentioned one of them (Manage Views) in an update presentation as “cool and very important feature” then promptly forgot it was there.

As payment for my sins, I will share a brief description of each with all of you, in the hopes that I will: 1) make you feel better about yourself because you already knew this stuff, or 2) give you the knowledge you need to avoid the embarrassment, and lost productivity, that my ignorance has brought me. 

Selection Information

I mention this one first because it was pointed out to me by no less than the ANSYS Mechanical product manager at ANSYS, Inc. Yikes.  I believe he actually did a face palm when I asked him “What is Selection Information? There is an Icon with an i on the toolbar? Really?”

image

There it is, right next to the Worksheet icon, an icon I use all the time.  What it does is give you information about geometry, CAD and nodes, in your model.  There are three ways to get it, not just the icon on the toolbar:

  1. Click the Icon
  2. In the menu go to View>Windows>Selection Information
  3. Double-click on the Selection details at the bottom of the ANSYS Mechanical Window

image

However you use it, you will get a new window, embedded with the existing windows, that shows you information about the geometry entity of entities that you select. Normal selection options apply. You can pick vertices, edges, surfaces, or bodies. I like to drag it out as it’s own window so I can see it all.  (Notice how I talk like I do this all the time… yea, whatever.  I just figured out that it is a lot better if I drag it out and look at it by itself.) 

My sample model is just a cylinder, so If I pick the end and the cylinder I get:

image

See how it lists the two faces, and a summary. There is some internal info in there as well like ID’s that ANSYS mechanical uses to do stuff. The toolbar across the top lets you select a coordinate system to do the calculations in, set options (the green checkbox) or  control if you want individual info, summary info, or both. 

The options are useful because by default, everything is on. Turning some stuff off can reduce the clutter.

image

For nodes, I can get location, node number, and body information:

image

When you are in the window there are some useful things you can do with the list. The first is sort by clicking on the column headers.  What node is at your max X position in your cylindrical coordinate system?  Just set the Coordinate System and click on X(in) twice to sort from max o min:

image

If you select any of the cells, you can right mouse click and get a context menu that lets you reselect the entities being listed, export to a text or Excel file, Refresh, or copy to the clipboard:

image

Give it a shot next time your in a model and want to know some stuff.

Manage Views

One of the more useful capabilities in ANSYS Mechanical APDL is the ability to define views in a macro and call them back up again, getting the same standard views every time. Well you have been able to do that in Workbench when the introduced the “Scary Eye” icon at I think 14.5 (maybe 14):

image

Although it looks like a secret Masonic symbol, the icon actually represents a handy tool for saving views not only in your model but to files.  It is also available in View->Windows->Manage Views.

Not only that, it lets you save the view commands to an external file that you can use with other models or even go in and edit to create a very specific view.

When you start it up, it brings up its own little window as well, that has eye themed icons to control your view saving/recall experience.

image

  • “Spooky Eye Box with a Plus Sign” creates a view from the current view you are seeing
  • “X” deletes the currently selected view or views
  • “Guy with 80’s hair looking at a box” applies the currently selected view. Double-clicking on the view does the same thing.
  • “A-bar-B” is used to rename the selected view
  • “Spooky Eye Box with Green Blob” redefines the currently selected view with whatever the current view settings are in the graphics window. Think of it as an overwrite.
  • “Disk with arrow out” reads in a saved view file from disk.
  • “Disk with arrow in” saves the currently selected view to disk.

So, get your model positioned the way you want it using the mouse to control the view, then click the first icon to save it.  The program puts the window into “rename” mode so you can give it a descriptive name here. Just keep doing that till you have all your views defined.

If at some point you want to change view, no need to delete and recreate it. Simply Click on the view you want to redefine and then click on “Spooky Eye Box with Green Blob.”

Note: You can only select more than one view and delete it.  None of the other commands work for more than one view. But the save views command saves all the views, regardless of how many you have selected.

Here are some views I created:

image

image

image

image

Now it gets cool.  Click on a view and then click on the “Save” (last) icon.  It will save the views as an XML file.  Pop that into your handy-dandy XML editor and you can check out the view definitions:

image

This is where I get excited. Now you can go into this file and create your own view, or modify a view to be very specific.  I didn’t have enough time to figure out what all the options did, but if you get a view that is close to what you want, you should be able to modify it from there.

The last thing to talk about is what happens if you right mouse click on a view?  You get:

image

Yes, copy as MAPDL!  Not only is this useful for us old guys that just like to look at MAPDL, it lets you use the same view for any plots you may make with a code snippet as you used for the plots in ANSYS Mechanical.  So your views are consistent for all your plots!

image

Modifying Multiple Load Steps

This was one of those “there has to be a way to do this” moments. We were talking about different ways to speed up the solution of a transient thermal model and I suggested that instead of using automatic time step controls they put in some values. But for the life of me I couldn’t figure out how to change a bunch of load step settings at the same time, so I was changing them one at a time. For every step, change the step number, then change the value:

image

Yawn!  This started off a “well in ANSYS classic, I could write a script that would… blah… blah… blah…”

There has got to be a better way.  There is.  In the Graph window the load steps are shown on the X-axis. Simply multi-select the steps you want to change there:

image

In the example above I CTRL-Clicked steps 3, 5, and 7. Now my Analysis Settings details view looks like:

image

See how Current Step Number and Step End Time are “Multi Step”.  Any change I make to settings will now be applied to the selected steps.  A huge time savings.  And a big “Duh, I should have known that!”