ANSYS simulations can be time-consuming. Depending on the size of the model a simulation can take minutes to hours. In some instances the long run times are unavoidable, while in other cases there may be significant room for optimization. By optimization, we mean achieving a balance between accuracy and computational costs.
We have discussed time saving strategies on various articles on this website, but it is worthwhile to combine the points in a concise post.
The points that are mentioned below assume that the geometry is already optimized. Also, specific modeling techniques such as sub-modeling and sub-structuring are not discussed here.
It is obvious that one of the ways to speed up ANSYS runs is to upgrade your system – a faster CPU, more CPU Cores, a faster GPU, and more RAM are all hardware upgrades which can significantly reduce the solution time. For this article, we assume that you have a given workstation.
1. Optimize the mesh
This almost goes without saying. The more degrees of freedom (DOF) there are in a model the longer the computation time would be (What is a degree of freedom?).
Depending on the stage of a project, the FE mesh may be optimized using various strategies. Some of these are:
1) Change the global element sizing
2) Specify local element size (sphere of influence, contact sizing etc.)
2) Change element order (linear / quadratic)
3) Change element type (Tetrahedral vs Hexahedral)
4) Use surface meshing
5) Use slices for better mesh transition
2. Consider contact formulations
The number of techniques used to define the various contacts in a model can have a significant impact on the run times. Some contact formulations are computationally more expensive than others. Here are some things to consider:
Given all other aspects are the same:
- Normal Lagrange contact formulation is the most computationally expensive formulation.
- Pure penalty contact formulation is the least computationally expensive.
- Augmented Lagrange is in between (and often the best choice).
There are several other considerations with contact formulations. You can read those here.
3. Look for poorly defined contact and target surfaces
You may have seen a warning message similar to this:
“Too many nodes 25022 are included in the force-distributed-surface constraint identified by real constant set 116. This may greatly affect solver performance due to large wave fronts and memory
consumption. Also check results carefully and consider solving with a different unit system.“
This usually means that you have a contact defined where either the contact or target face (or both) includes more nodes than what ANSYS would like. For example, you may have a long cylinder in contact with a small ring. Selecting the entire outer surface of the cylinder for the contact could result in this warning. You may need to define a small selectable face in Design modeler or Space Claim. For example, instead of the entire outer surface of a cylinder you would select a band on the OD with similar width to the contacting ring.
4. Consider using joints instead of contacts
You may also consider replacing some of the contacts with joints (as long as this is feasible and fulfills your objectives). Unlike contacts which report contact interface behavior (penetration, friction, shear stress etc.) joints are essentially just DOF constraints. This is why a model with contacts replaced with joints would typically solve a lot faster.
5. Change the solver type
The direct solver is more system resource intensive than the iterative solver. You can read more about the solver types here.
It is possible that your system does not have the resources to handle the sparse direct solver. Changing the solver type to iterative may make the run go faster. Though keep in mind, that the iterative solver is less robust and could cause convergence difficulties.
6. Run ANSYS on a different (faster) hard drive
In many cases the bottleneck for the solver performance is a slow hard disk drive. If you have the option, you may run the solution on a faster drive. You could do this in two ways:
- Save the entire project on a different hard drive and run it off of there (ideal).
- You can also change the location of your scratch folder which is where ANSYS writes data as it is running the solution.
The scratch directory is only set for the duration of the solve (with either My Computer or My Computer, Background). After the solve is complete, this directory is set to blank. As desired, you can specify a unique disk location for this directory using the Scratch Solver Files Directory option in the Analysis Settings and Solution category of the Options preference settings. Specifying a different disk location for the scratch files enables you take advantage of a faster disk drive.