Providing tech support to users of Mechanical APDL gives us a wide exposure to a varied set of users. And through the years we have discovered that there are some simple, basic, but important things every MAPDL users needs to know. The ten most important things every user shoudl know are:
1. /SHOW,3D
2. /EFACET,2
3. Picking window reset button
4. Hot Spots for Picking and Press and Hold
5. Displaying More than 9 Results Contours
6. CNCHECK
7. Copy and Paste into Input Window
8. /EOF for Input File Debugging
9. Use the Log File
10. Making Results Plot Files
/SHOW,3D
This command tells ANSYS Mechanical APDL to use your computer’s video card to control dynamic rotations of your model, rather than use software to rotate the model. The big difference is that you’ll see a shaded image of your model during dynamic manipulation of the view, rather than shaded > wireframe while rotating > shaded. For some users, switching to this option is like getting a color TV after years of watching just black and white.
To active this option from the Mechanical APDL Product Launcher, go to the Customization/Preferences Tab and change the Graphics Device Name to 3D.
If you are running ANSYS from the command line, you can use the –d 3D option after the ANSYS executable specification.
/EFACET,2
If you are running with mid-side noded elements, you’ll most likely want to include results for the midside nodes, and also make results plots which include any curvature of the element edges. The default, however, is to not include midside noded results in listings or plots and to only give one facet per element edge in results plots. The fix for that is to set the number of facets to 2 (or even 4) on the /EFACET command. Note that Powergraphics needs to be on for this to work.
Picking Window Reset Button
If you have spent a lot of time working interactively in ANSYS Mechanical APDL, you have probably encountered the scenario in which you click on a command that is supposed to activate a picking window, but no picking window shows up. No matter how many times you click on the command, you won’t get the needed picking window. My understanding is this is due to a glitch in the Tcl/Tk GUI language used by ANSYS, Inc. to create the Mechanical APDL user interface. Earlier versions had a fix implemented which was somewhat primitive: while in the ANSYS session, simultaneously press Control-Shift-Delete. This would reset the picking window so we could click on the desired command again and successfully get the needed picking window. The last couple of releases of ANSYS have had an improvement over that, namely the Reset Picking button. This button resides near the upper right corner of the user interface, in between the Raised Hidden “Cheese Sandwich” button and the Contact Manager button.
Hot Spots for Picking and Press and Hold
This is really two things, but they are closely related so we’ll consider them as one. Have you ever have trouble using the mouse to pick the entity you want? You click where you think you’ll be picking the desired entity but some other entity gets highlighted. If this happens a lot, you’re probably not familiar with how ANSYS uses Hot Spots for picking, nor with the Press and Hold left mouse button behavior.
First we’ll discuss hot spots, which are locations on each geometric entity. Areas and volumes each have one hot spot, at or very near the centroid. Lines have three hot spots, one at the middle of the line and one close to each end. When you click a location in the graphics window to select an entity, the entity which has a hot spot closest to the picking location is the one which gets picked. Note that hot spots can be outside of an entity (think of an annulus, for example). That means you might click on an entity, but another entity might have its hot spot closer to where you clicked, so that’s the one the is selected. Thinking about where hot spots are can assist greatly in selecting the entities we want.
Second, another useful tool for ensuring we actually pick entities we want is to press and hold the left mouse button while picking. If you press and hold, the entity that’s going to be picked will be highlighted. If you press and hold and drag the mouse around in the screen, different entities can be highlighted, the idea being you press, hold, and drag until the desired entity is highlighted. You then release the left mouse button and that entity is now picked.
Displaying More Than 9 Results Contours
By default results plots in /POST1 have 9 color contours. Sometimes we want more. If you are using the Win32 or X11 graphics drivers, you can obtain up to 14 color contours by issuing
/show,win32c,,,8 !or /show,x11c,,,8
/contour,,14,auto
Note that if you are using the 3D graphics driver (see above), you can display up to 128 color contours using the same /contour command. There are other useful options on this command so check the ANSYS help for more info.
CNCHECK
What did we do before CNCHECK?
We attempted a lot more contact debugging solves than are needed today, that’s for sure. CNCHECK can be used to interrogate one or more contact pairs prior to solving to help us ensure that contact regions are setup appropriately. Not only does it tell us which contact and target element sets are associated with each other, but it lists all of the ‘calculated’ settings such as the actual value of contact stiffness, penetration tolerance, etc. If there is an initial gap, it will tell us the gap distance. If a contact region is supposed to be initially touching but isn’t, CNCHECK will tell us. We can then hopefully take corrective action before we start the solution. This can be a huge timesaver. CNCHECK has other useful capabilities, all discussed in the Help.
Copy and Paste into Input Window
If you work with ANSYS MAPDL commands a lot, you are hopefully familiar with copying commands from a text file or from an editor (PADT’s PeDal editor specifically created for ANSYS input files comes to mind) and pasting them into the ANSYS command window. ANSYS, Inc. tells us this is not a supported feature, but we at PADT and other users have been doing this for years and it works great. Whether you are building an input file to automate your process or just checking out a few commands from the Help, you can copy the desired command lines and paste them into the input window. You then click the Enter key and all of those commands will be executed within ANSYS, in sequence from first to last. Try it.
/EOF for Input File Debugging
If you routinely build ANSYS MAPDL input files or are just starting to work with them, you should be aware of the /EOF command. You can place that anywhere in your file and the input will stop being read at that location. If you have 2000 lines of APDL code and just want to debug the first 20 by reading only those lines in, you just place the line /EOF after those first 20 lines of code, save the file, and read it in. The remaining 1980 lines will be ignored and you can easily verify the action of those first 20 commands. You can then delete the /EOF command and place a new one farther down to work in the next section. Hopefully you now see the value of /EOF.
Use the Log File
The log file (jobname.log) is a running list of all the MAPDL commands you have executed in your current ANSYS session. It doesn’t matter if you typed them in, pasted them in, or used the GUI, they are there in the log file, sequentially from top to bottom. Further, if you have multiple ANSYS MAPDL sessions in the same working directory using the same jobname, you’ll have a multiple-session history in your log file, each with its own time and date stamp.
How is this useful? If you find yourself repeating your steps over and over, you should consider automating those steps using an input file. An easy way to create an input file is to edit the log file, extract the portion you want to automate, save that into a new file, and perhaps do some further editing to get it to be robust and tailored to your specific application. How to do all that is beyond the scope of this article (see our APDL training classes at www.padtinc.com/support/training), but a quick set of instructions is to execute a command once using the GUI, then view the bottom of the log file to see how it was used. Combine that with the ANSYS Help and you are off and running in building your own MAPDL input files.
Making Results Plot Files
A quick way to make a result plot file is to get the plot and view setup the way you want on the screen, then click on Plotters > Hard Copy > To File. There are several plot file formats available, such as .jpg and .png. This command will automatically ‘reverse video’ meaning you get black text on a white background in your plot file. There are other techniques for getting results plots into plot files, but this is a quick and easy way that you will hopefully find helpful.
—That’s 10!