Tips, Tricks, & Errors of Common ANSYS Tasks

Tip #1. Creating LINEAR Bonded Contact or No Separation/Sliding Contact Between Parts

Tip #2. Documenting your Model and Saving it in the Database

Tip #3. Using CONTAC174 in a Thermal Analysis

Tip #4. Disabling the Mechanical Toolbar at startup with ANSYS/Professional

Tip#5. Performing ANSYS Solutions in Batch Under NT

Tip#6. Accessing the Contact Wizard by Commands or Macros

Tip#7. ANSYS Error Status Codes

Tip#8. Avoiding the POP UP windows when Listing Entities

Tip#9. Turning off the default gradient window background.

Tip#10. Turning off the Multilegend Option.

Tip#11. Figures missing in the online help?

Tip#12. ANSYS Product Variables

Tip #13. ANSYS Does Not Recognize New Licenses

Tip #14. Using the Proper Memory for the Sparse Solver

Tip #15. Printing from Batch Mode

Tip #16. Invoking the pre-ANSYS6.1 GUI

 

Tip #1. Creating LINEAR Bonded or No Separation/Sliding Contact Between Parts.
You can use ANSYS surface to surface contact elements to approximate linear bonded or frictionless sliding contact between parts in an assembly. Technically, this is a nonlinear analysis because ANSYS by default will try to do equilibrium iterations in which it updates the locations of the contact element nodes. In most cases, however, the solution to the first equilibrium iteration is sufficiently accurate. DRD recommends that you verify that one equilibrium iteration is sufficient by activating large deflections, allowing ANSYS to perform equilibrium iterations until it attains a converged solution, and then comparing the converged nonlinear solution to the solution with just one equilibrium iteration. You should also do standard solution checks such as checking reactions and using hand calculations to approximate deflections and nominal stresses.

The first step is to define the contact pair using surface to surface contact elements such as the 170/174 combination for 3D and the 169/172 combination for 2D. You will set the following key options:

keyoption 2 to 1   (Turns off Lagrange Multiplier Method and uses Penalty Method only)
keyoption 8 to 1   (Detects and ignore spurious contact)
keyoption 9 to 1   (Excludes the physical gap or interference. Also exclude the CNOF offset)
keyoption 12 to 5  (Activates bonded always contact)
keyoption 12 to 4  (Activates no separation always contact)

You need to set the number of equilibrium iterations to 1 so that ANSYS will treat the solution as linear. You will first need to turn off solution control and then explicitly set the number of equilibrium iterations to 1. There should be no other nonlinear effects in the model such as plasticity or large deflections. An example input file for setting the bonded always contact options and forcing a single equilibrium iteration using the Contact 174 element defined as element type 5 is provided below.

solcontrol,off
neqit,1
keyopt,5,2,1
keyopt,5,8,1
keyopt,5,9,1
keyopt,5,12,5

Back to Top of Page


Tip #2. Documenting your Model and Saving it in the Database
It is not 'Notepad', but ANSYS does allow you to save string parameters that can be used for documentation purposes (among other things). For example, if you would like to save with the database that this particular model is for the 'Maximum Torque load condition with 40 degree traction surface', you can put this in a string that can be examined at a later time. The commands for doing so are listed below:

*dim,document,string,64,5
document(1,1) = 'Maximum Torque load condition with 40 degree traction surface'

You can see the contents of the variable 'document' by typing:  *stat,document
Currently the length of the string is limited to 64 characters but can have as many as 100 of these parameters (only 5 is defined in the example above).

Back to Top of Page


Tip #3 Using CONTAC174 in a Thermal Analysis  

Guidelines for Using the Thermal Contact Capability in the Contact 174 Elements
(Note: This procedure is obsolete starting with ANSYS 5.7)


1. Using the contact wizard, you must generate the model with solid structural elements such as Solid45's, 92's, or 95's. You will later convert these elements to elements with heat conduction capabilities. Be sure to view the Optional Settings in the contact wizard. This is  necessary for you to view and edit the contact element type key options and real constants after you leave the Contact Wizard. If you don't view the option settings in the contact wizard, all contact real constants will be reported as zero by the RLIST command after you leave the contact wizard.

2. After you generate the contact elements, set key option 1 to 1 for the Contact 174 elements. This turns on the thermal capability in the Contact 174 elements. 

At this point you should turn on ANSYS beta capabilities in the GUI using the "keyw,beta,1 command". This command will make key option 1 for the contact elements available in the key option dialog box. To set key option 1 to 1 use the GUI path:

Preprocessor > Element Type > Add/Edit/Delete > Pick on the correct element type and select ‘Options’. Then select the DOF set UX, UY, UZ, TEMP with key option 1 in the dialog box. This is equivalent to setting key option 1 to 1.

3. Set the contact conductance for the Contact 174 elements. It is real constant 14. This constant has units of heat/(time*temp*area). A very large value implies no thermal resistance across the interface. Also, if there is a physical gap between the contact surfaces, you must specify a CNOF real constant whose value is at least equal to the gap size. CNOF is real constant 10. 

To set these real constants use the GUI path:

Preprocessor > Real Constants > Add/Edit/Delete > Select the correct real constant set to edit and select ‘Edit’, Select the correct element type and select [OK]. Then set the real constants in the dialog box.


4. If you want to do a thermal only problem, convert the structural elements to thermal elements that match the shape and number of nodes of the existing structural elements. For example, SOLID92's should be converted to Solid 87's. Solid 95's should be converted to Solid 90's. 

The GUI path to do this is:

Preprocessor > Element Type > Switch Element Type > Select ‘Structural to Thermal’ in the dialog box and then select [OK].


5. If you are doing a thermal only problem, you just constrain the UX, UY, and UZ degrees of freedom of the Target and Contact elements. Select these elements, select the nodes attached to them, and then set the displacements of these nodes to zero easily do this.

6. If you are doing a coupled thermal-structural problem, you can use the Solid 98 element. This element has displacement and temperature degrees of freedom (in addition to voltage and magnetic potential), so you can solve a thermal-structural problem in a single solution. In this case you should generate the model with Solid 98's and then use the directions provided in this note. You will not, however, need to convert the Solid 98 elements to a thermal element type.

7. If your model is linear, then set the equilibrium iterations to 1 and turn solution control off. This is necessary because ANSYS is currently programmed to do a nonlinear analysis when Contact 174 element types are in the model, even though the model can be linear. Limited testing at DRD has indicated that ANSYS will only do 1 equilibrium iteration when there the contact surfaces are coincident in a thermal analysis even if the number of equilibrium iterations is not explicitly set to 1. DRD recommends, however, that you always set the number of equilibrium iterations to 1 when the model is linear.

8. For postprocessing, you will be able to check the heat flux through the GUI just like any other contact item as flux will appear as one of the contact items alongside pressure, status, gap, etc. 

The GUI path is:

General Postprocessor > Plot Results > Nodal Solution. Then select ‘Contact’ in the box on the left and ‘Heat Flux in the box on the right.

Back to Top of Page


Tip #4. Disabling the Mechanical Toolbar at startup for ANSYS/Professional
(Note: The Mechanical Toolbar is unsupported starting with ANSYS 8.0)

These are the commands to turn off the Mechanical Tool bar GUI in ANSYS/Professional. You need to put them in the start56.ans file so they are effective upon starting ANSYS.

/mstart,mtool,off
/mstart,input,on
/mstart,tool,on
/mstart,main,on

Back to Top of Page


Tip #5. Performing ANSYS Solutions in Batch Under NT.

This is detailed on another page on this site.

Back to Top of Page


Tip #6. Accessing the Contact Wizard with Commands or Macros.

The contact wizard is part of enhanced UIDL. The command string to invoke the wizard is ~eui,'euidl::contactWizard'. This string can be typed in, or abbreviated with the *ABBR command, or put in a macro to invoke the wizard without having to go through the nested menus to start up with wizard.

Back to Top of Page


Tip #7. ANSYS Error Status Codes.

Occasionally ANSYS solutions may fail and produce an error indicating a specific error status. To assist you in determining where the problem may lie, a brief definition of each of these error codes is presented below:

0 - normal exit
1 - stack overflow error
2 - stack level overflow
3 - stack pop below zero
4 - names do not match in stkpxp
5 - command line argument error
6 - accounting file error
7 - auth file verification error
8 - indicated error or end-of-run
11 - error in user routine
12 - macro stop command
14 - untrapped xox error
15 - anserr fatal error
16 - possible full disk
17 - possible corrupted or missing file
18 - Error in VM routines (corrupt db?)
21 - unauthorized code section entered
25 - unable to open x11 server
30 - quit signal
31 - failure to get signal in max time
>32 - system dependent error

Back to Top of Page


Tip #8. Avoiding the POP-UP Windows when Listing Entities

To avoid the pop-up window precede the list commands with a $.   ( i.e.  $ELIST)

The primary use of the $ sign is to allow multiple commands on the same line and preventing pop-ups is one of the effects of using it. This also works for the xSUM commands as well.

Back to Top of Page


Tip #9. Turning off the gradient background of the graphics window.
(Note: The background is black by default starting with ANSYS 6.1)

ANSYS by default has a gradient blue background. You can turn it to black by typing in the command /color,pbak,off interactively. To turn off the blue background in the startXX.ans file, use the command /uis,pbak,off.

Back to Top of Page


Tip #10. Turning off the Multilegend Option.

ANSYS has another legend option aside from the default multilegend option. You can access this option to act as older versions of ANSYS by putting /uis,lege,0 in the startXX.ans file located in the ANSYSXX/docu directory. This will put all the legend information on the right side of the graphics window only.

Back to Top of Page


Tip #11. Figures Missing in the Online Help.

In the help system of ANSYS 6.0 sometimes none of the graphics in the Verification Manual and Theory Manual show up, only place markers. Due to a bug, the work around is to create a short cut to the following file, and to put this on your desktop to access this documentation with the graphics.

D:\ProgramFiles\AnsysInc\docu\english\ansyshelp.chm

Back to Top of Page


Tip #12. ANSYS Product Variables

ANSYS has a number of product variables that can be used to identify which product is being requested or is currently licensed in the authorization file. Select here for the listing of these variables.

Back to Top of Page


Tip #13. ANSYS Does Not Recognize New Licenses

There has been situations where, after adding a new INCREMENT line to an existing license key, the new licenses cannot be checked out because they have exactly the same increment variable as the previously existing licenses.  This is a bug in every version of FLEXLM.  The workaround is to set the ANSWAIT=TRUE environmental variable at the system level.

Back to Top of Page


Tip #14. Using the Proper Memory for the Sparse Solver

Although ANSYS does use dynamic memory, there are circumstances the sparse solver may not be able to gain the most efficient amount of memory for solving. For example, during a solution run the following output may appear from the sparse solver:

SPARSE MATRIX DIRECT SOLVER.
Number of equations = 99906, Maximum wavefront = 71
Memory available for solver = 139.68 MB
Memory required for in-core = 523.56 MB
Optimal memory required for out-of-core = 273.17 MB
Minimum memory required for out-of-core = 7.70 MB

In this case, it pages and creates a LN32 file that is non-zero in length because the memory available is less than the 'Optimal' memory required for solving out-of-core. When this happens, your solution time doubles, triples, or worse. As a minimum, you should increase your Total Workspace memory (-m) by at least 135 MB such that you have the amount of memory available for the solver that is 'Optimal' for running out-of-core. It is currently planned for ANSYS 7.0 to automatically obtain at least the Optimal amount of memory for solving out-of-core if it is available.

In an ideal situation, if you could increase your -m by 385 such that the entire model could be solved 'in-core' your model will also run that much faster as less disk I/O will occur (no LN09 file will be created which can be large for most models).  For most problems, it is not possible to obtain the memory to solve entirely 'in-core' so making sure you have at least the optimal memory allocated is the next best thing.

Back to Top of Page


Tip #15. Printing from Batch Mode

Below is a small input file which can be used as a template for printing while running in batch.  One of the keys will be getting the device name correct for the Windows Print command.  For the input file below, the device name is \\jaguar\downstairs, where 'jaguar' is the name of the server and 'downstairs' is the name of the printer.  This file also requires that a printer which can handle postscript is in use. 

resume
/solu
solve
fini
/post1
/show,pscr
plnsol,s,eqv
/show,close
/sys,print /D:\\jaguar\downstairs file000.eps
fini
/exit,nosav

Back to Top of Page


Tip #16. Invoking the pre-ANSYS6.1 GUI

The older ANSYS Graphical User Interface can be used instead of the newer, Tcl interface by placing the command /mstart,util,on in your startXX.ans file. Also please note that with starting with ANSYS 7.1, the startXX.ans file is located in the apdl directory of the ANSYS install location and not the docu directory.

Back to Top of Page


Copyright 2004. DRD Technology Corporation.