## A Simple Adjustment to Fix a Contact Convergence Problem in Ansys Mechanical

As I write this from home during the Covid-19 crisis, I want to assure you that PADT is conscious of many others working from home while using Ansys software as well.  We’re trying to help with those who may be struggling with certain types of models.  In this posting, I’ll talk about a contact convergence problem in Ansys Mechanical.  I’ll discuss steps we can take to identify the problem and overcome it, as well as a simple setting to make which dramatically helped in this case.

The geometry in use here is a fairly simple assembly from an old training class.  It’s a wheel or roller held by a housing, which is in turn bolted to something to hold it in place.

The materials used are linear properties for structural steel.  The loading consists of a bearing load representing a downward force applied by some kind of strap or belt looped over the wheel, along with displacement constraints on the back surfaces and around the bolt holes, as shown in the image below.  The flat faces on the back side have a frictionless support applied (allows in plane sliding only), while the circular faces where bolt heads and washers would be are fully constrained with fixed supports.

As is always the case in Ansys Mechanical, contact pairs are created wherever touching surfaces in the assembly are detected.  The default behavior for those contact pairs is bonded, meaning the touching surfaces can neither slide nor separate.  We will make a change to the default for the wheel on its shaft, though, changing the contact behavior from bonded to frictional.  The friction coefficient defined was 0.2.  This represents some resistance to sliding.  Unlike bonded contact in which the status of the contact pair cannot change during the analysis, frictional contact is truly nonlinear behavior, as the stiffness of the contact pair can change as deflection changes.

This shows the basic contact settings for the frictional contact pair:

At this point, we attempt a solve.  After a while, we get an error message stating, “An internal solution magnitude limit was exceeded,” as shown below.  What this means is that our contact elements are not working as expected, and part of our structure is trying to fly off into space.  Keep in mind in a static analysis there are no inertia effects, so an unconstrained body is truly unconstrained.

At this point, the user may be tempted to start turning multiple knobs to take care of the situation.  Typical things to adjust for contact convergence problems are adding more substeps, reducing contact stiffness, and possibly switching to the unsymmetric solver option when frictional contact is involved.  In this case, a simple adjustment is all it takes to get the solution to easily converge.

Another thing we might do to help us is to insert a Contact Tool in the Connections branch and interrogate the initial contact status:

This shows us that our frictional contact region is actually not in initial contact but has a gap.  There are multiple techniques available for handling this situation, such as adding weak springs, running a transient solution (computationally expensive), starting with a displacement as a load and then switching to a force load, etc.  However, if we are confident that these parts actually SHOULD be initially touching but are not due to some slop in the CAD geometry, there is a very easy adjustment to handle this.

### The Simple Adjustment That Gets This Model to Solve Successfully

Knowing that the parts should be initially in contact, one simple adjustment is all that is needed to close the initial gap and allow the simulation to successfully solve.  The adjustment is to set the Interface Treatment in the Contact Details for the contact region in question to Adjust to Touch:

This change automatically closes the initial gap and, in this case, allows the solution to successfully solve very quickly.

For your models, if you are confident that parts should be in initial contact, you may also find that this adjustment is a great aid in closing gaps due to small problems in the CAD geometry.  We encourage you to test it out.

## ANSYS Mechanical – Overcoming Convergence Difficulties with the Semi-Implicit Method

In our last blog, we discussed using Nonlinear Adaptive Region to overcome convergence difficulties by having the solver automatically trigger a remesh when elements have become excessively distorted.  You can read it here:  http://www.padtinc.com/blog/ansys-mechanical-overcoming-convergence-difficulties-with-automatic-remeshing-nonlinear-adaptive-region/

This time we look at another tool for overcoming convergence difficulties, the Semi-Implicit method.  ANSYS, Inc. describes the semi-implicit method as a hybrid, combining features of both implicit and explicit finite element methods.

In highly nonlinear problems involving significant deformations we may get a solver error like this one:

*** ERROR ***                           CP =   18110.688   TIME= 11:58:42
Solution not converged at time 0.921 (load step 1 substep 185).           Run terminated.

Like it does with other problems that lead to convergence failures, the Solution branch will have telltale red lightning bolts, indicating the solution was not able to complete due to nonconvergence.

In this case, it can be difficult to determine from the error message in the solution output exactly what the problem is.  Plotting the Newton-Raphson residuals can be a good starting point.  In order to plot the Newton-Raphson residuals, though, we need to turn them on prior to solving.  See this older Focus blog for instructions on how to do that:

A plot of the Newton-Raphson residuals shows us where the highest force imbalance is in the model:

That’s a nice looking plot, but doesn’t tell us much without knowing more about the simulation.  The model is of a plastic bottle, subject to a force load tending to ‘crush’ the bottle from top to bottom.  There is a slight off center load as well, so that the force is not purely in the downward direction.

The bottle is constrained with a fixed support on the bottom flat surface, and contact elements between the outer surface of the bottle and a fixed surface representing a table or floor.  This is to prevent the bottle from deflecting below the plane of that surface.

The material used is a polyethylene plastic, from the ANSYS Granta Materials Data for Simulation add-on, which is a great tool to get access to hundreds of materials for ANSYS simulations.  The geometry of the bottle was created in SpaceClaim as a surface body and meshed with shell elements in ANSYS Mechanical.

The solution was run as nonlinear static, with large deflection effects turned on.  Automatic Time Stepping was manually activated with a starting and minimum number of substeps set to 200 and a maximum number of substeps set to 1000.

With these settings, the solution ran to about 92% of the full load, where it failed to solve after bisecting to the maximum number of substeps (minimum ‘time’ step).  The force convergence plots showed the bisections and failed convergence attempts started at about iteration 230 and ‘time’ 0.92.  (If you are not familiar with the convergence plots from a Newton-Raphson method solution, please see our Focus archives for an article on the topic – look for the link to the GST Plot:  http://www.padtinc.com/blog/wp-content/uploads/oldblog/PADT_TheFocus_08.pdf).

Even though our solution has not converged, it is probably helpful to view the deformation results for substeps which did converge (at partial load) as well as the unconverged results which will be written as the last set of results.

This plot shows the total deformation at the last converged substep (time value 0.92):

This plot shows the unconverged solution, ‘extrapolated’ to time 1.0:

From the unconverged deformation plot we can see that the top of the bottle is tending to experience very large deformations.  It’s not surprizing that convergence difficulties are being encountered.

One of the techniques we can utilize to get past this problem is the Semi-Implicit method in ANSYS Mechanical.  As of 2019 R2, this needs to be activated using a Mechanical APDL command object, but it can be as simple as adding a single word within the Static Structural branch:

SEMIIMPLICIT

There are some optional fields on that command, but minimally just the one word command is needed.

Once the semi-implicit method is activated, if the solver detects the default implicit solver is having trouble, it automatically switches to the semi-implicit solving scheme.  Like a traditional explicit solver, the semi-implicit method can better handle very large deformation, transitory-like effects.  The method can switch back to implicit if conditions warrant for a more efficient solution and in fact can switch back and forth between the two schemes.

The solver output will tell us if the semi-implicit scheme has been activated:

`EQUIL ITER  26 COMPLETED.  NEW TRIANG MATRIX.  MAX DOF INC=  0.9526        NONLINEAR DIAGNOSTIC DATA HAS BEEN WRITTEN TO  FILE: file.nd004     DISP CONVERGENCE VALUE   =  0.3918      CRITERION=   1.448     <<< CONVERGED     LINE SEARCH PARAMETER =  0.4113     SCALED MAX DOF INC =  0.3918        FORCE CONVERGENCE VALUE  =   44.44      CRITERION=  0.9960        MOMENT CONVERGENCE VALUE =   3.263      CRITERION=  0.1423       Writing NEWTON-RAPHSON residual forces to file: file.nr001    >>> TRANSITIONING TO SEMI-IMPLICIT METHOD     NONLINEAR DIAGNOSTIC DATA HAS BEEN WRITTEN TO  FILE: file.nd001    EQUIL ITER   1 COMPLETED.  NEW TRIANG MATRIX.  MAX DOF INC=  0.8788E-04     NONLINEAR DIAGNOSTIC DATA HAS BEEN WRITTEN TO  FILE: file.nd002 *** LOAD STEP     1   SUBSTEP   185  COMPLETED.    CUM ITER =    284 *** TIME =  0.920010         TIME INC =  0.100000E-04    Kinetic Energy = 0.2157        Potential Energy =  60.59    *** AUTO STEP TIME:  NEXT TIME INC = 0.10000E-04  UNCHANGED     NONLINEAR DIAGNOSTIC DATA HAS BEEN WRITTEN TO  FILE: file.nd003`

There are some ‘symptoms’ of the switch from implicit to explicit.  The most obvious is probably that the force convergence plot will stop updating.

Changing the Solution Output to the Solver Output will show the explicit scheme being used in that case.  The telltale is the information on Response Frequency and Period (the example shown is a static structural solution).

Deformation plot trackers and contact trackers continue to work as expected during the solution, however.

Using the semi-implicit method, the solution was able to successfully converge to the full load, and converged results are available at the last time point:

We also used the new keyframe animation technique to animate the results time history.

The semi-implicit method is well documented within the Mechanical APDL 2019 R2 Help, in the Advanced Analysis Guide, chapter 3 on Semi-Implicit Method.  We suggest reviewing that information to get a much better handle on the technique.

We hope this is helpful in getting your nonlinear solutions to converge the full value of applied loads.

## ANSYS Mechanical – Overcoming Convergence Difficulties with Automatic Remeshing (Nonlinear Adaptive Region)

One of the problems we can encounter in a nonlinear structural analysis in ANSYS Mechanical is that elements become so distorted that the solver cannot continue.  We get messages saying the solver was unable to complete, and the solver output will contain a message like this one:

`*** ERROR ***                           CP =      37.969   TIME= 14:40:06  Element 2988 (type = 1, SOLID187) (and maybe other elements) has become  highly distorted.  Excessive distortion of elements is usually a         symptom indicating the need for corrective action elsewhere.  Try        incrementing the load more slowly (increase the number of substeps or    decrease the time step size).  You may need to improve your mesh to      obtain elements with better aspect ratios.  Also consider the behavior   of materials, contact pairs, and/or constraint equations.  Please rule   out other root causes of this failure before attempting rezoning or      nonlinear adaptive solutions.  If this message appears in the first      iteration of first substep, be sure to perform element shape checking. `

The Solution branch will have the telltale red lightning bolts, indicating the solution was not able to complete due to nonconvergence.

If you are not aware, one technique we can use to get past this problem of excessive element distortion is to have ANSYS automatically remesh the model or a portion of the model while the solution is progressing.  The current state of the model is then mapped onto the new mesh, in the currently deflected state.  In this manner we can automatically continue with the solution after a slight pause for this remeshing to occur.  Minimally all we need to do as users is insert a Nonlinear Adaptive Region under the Static Structural branch, and review and specify a few settings (more on this later).

Let’s take a look at a simple example.  This is a wedge portion of a circular hyperelastic part, subject to a pressure load on the top surface.  Other boundary conditions include a fixed support on the bottom and frictionless supports on the two cut faces of the wedge.

For this case, the nonlinear adaptive region is the entire part.

The initial mesh was setup as a default mesh, although note that for 3D models the nonlinear adaptive capability requires a tetrahedral mesh up through the current version, 2019 R2.

Prior to solving with the nonlinear adaptive region included, this model fails to converge at about 56% of the total load.  With the addition of the nonlinear adaptive region, the model is automatically remeshed at the point of excessive element distortion, and the solution is able to proceed until the full load is applied.  The force convergence graph has a solid vertical orange line at the point where remeshing occurred.  The method can result in multiple remeshing steps although in the sample model shown here, only one remeshing was needed.

The image on the left, below, shows the original mesh at the last converged substep before remeshing occurred.  The image on the right is the first result set after remeshing was completed.

The tabular view of a result item will show in the last column if remeshing has occurred during the solution.

Here is the final deformation, for the full amount of pressure load applied on the top surface.

Next, let’s take a look at the nonlinear adaptive region capability in more detail.

First, multiple substeps must be used for the solution.  If we are performing a nonlinear analysis, this will be the case anyway.  Second, Large Deflection needs to be turned on in the Analysis Settings branch.  Also, results must be stored at all time points (note that time is a tracking parameter in a static analysis, but all static as well as transient results in ANSYS Mechanical are associated with a value of ‘time’).

There are several restrictions on features that CAN’T be in the model, such as cyclic symmetry (hence the frictionless support BC’s on the simple model shown above), Auto Asymmetric Contact, Joints, Springs, Remote Forces and Displacements, etc.  Also certain material properties are excluded, such as Cast Iron plasticity and Shape Memory Alloy.  Also, as mentioned above, for 3D models, the mesh must be tetrahedral.  For a full listing of these restrictions, refer to the ANSYS Mechanical User’s Guide.  A search on ‘nonlinear adaptive’ will take you to the right location in the Help.

Nonlinear Adaptive Regions can be scoped to 3D solid and 2D bodies, or to elements via a Named Selection.

In the Details view for the Nonlinear Adaptive Region, the main option to be defined is the Criterion by which remeshing will be initiated.  There are three options available in Mechanical:  Energy, Box, and Mesh.

The Energy criterion checks the strain energy of each element within the Nonlinear Adaptive Region.  If the strain energy is above a criterion, remeshing is triggered.  The input is an energy coefficient between zero and one, and is a multiplier on the ratio of total strain energy of the component divided by the number of elements of the component.  Recommended values are 0.85-0.9.  A lower coefficient will tend to cause remeshing to be more likely.

The Box criterion defines a geometry region based on a coordinate system and bounds relative to that coordinate system.  Elements in the Nonlinear Adaptive Region whose nodes have all moved within the box will be remeshed.  The idea is that if it’s known that elements will be highly distorted as they move into a certain region, we can ensure that remeshing will occur there.

The Mesh criterion allows us to specify that remeshing will occur if mesh quality measures drop below certain levels as the mesh distorts.  For 3D models, the available measures are Jacobian Ratio and Skewness.  These are described in the Mechanical User’s Guide in the section on Nonlinear Adaptive Region.

In the example shown above, the Energy criterion was used with an energy coefficient of 0.85.

There are some things to be aware of when you are trying to implement a Nonlinear Adaptive Region to help overcome convergence difficulties.  First, if any of the restricted features mentioned above are included in the model, such as remote displacements, it’s not going to work.  Therefore, it’s important to review the list of restrictions in the Help and make sure none of those are applied in your model.  Second, ‘buckling’ or element distortion due to an unstable structure is not a behavior that Nonlinear Adaptive Regions can help with.  The Nonlinear Adaptive Region capability is more suited to problems like hyperelastic seals being compressed or objects that are undergoing a high degree of bending (but not snapping through).

Also, a coarse mesh that distorts may not produce a usable remesh.  The remeshing step may occur, but the simulation may not be able to proceed beyond that and stops with an error in element formulation error.  More mesh refinement may be needed in this case.

As a further word of caution, self contact problems may not work very well within the context of Nonlinear Adaptive Regions.  If self contact is needed, consider splitting the bodies into multiple parts to avoid self contact.

There are some other considerations for the method as discussed in the Help, but hopefully the guidelines and recommendations presented here will allow you to filter potential applications appropriately and setup models that can take advantage of the Nonlinear Adaptive Region capability.  We have a short animation which shows the remeshing step in the sample model.

If you have nonlinear static structural models with convergence difficulties due to excessive element distortion, please consider using this method to help you get a fully converged solution.

Here is a video to help everyone visualize:

## All Things ANSYS Episode 005 – Getting to know convergence better and hidden gems in the ANSYS product family

 Published on: September 25, 2017 With: Tom Chadwick, Ted Harris, Eric Miller Description: In this episode your host and Co-Founder of PADT, Eric Miller is joined by PADT’s Senior CFD Engineer Tom Chadwick,  and Simulation Support Manager Ted Harris for a discussion on convergence with both FEA and CFD solutions, as well as a look at some of their favorite hidden gems in the ANSYS tools set. Learn about some beneficial ANSYS capabiliites you may not be aware of! Listen: Subscribe:

## Still Time to Attend an ANSYS User Group Conference

April is almost over, and you know what that means? It’s time for the ANSYS Convergence Regional Conference to begin.  These free events are held once a year and are an opportunity for the entire spectrum of ANSYS users to get together for one day. Each event is a bit different, but the goal is the same:  Users share presentations on what they have done and the experts from ANSYS, Inc. share what is new and exciting with the products.

These events are technical in nature, with a general session followed by specific technical tracks.

And PADT will be at the Santa Clara and Houston events this year, highlighting our services and products and presenting in Santa Clara.

The four US events are:

There are also 12 events in Asia, 12 in Europe, 7 in Latin America, and 7 in  the Africa/Middle East region.
See the full list here.

Remember, it’s free and always educational.  Even in our modern world of blogs, forums, and webinars, it is valuable to just spend some time talking with experts and other users.

PADT is a “Silver Sponsor” so we would love to see you there!

## Overcoming Convergence Difficulties in ANSYS Workbench Mechanical, Part II: Quick Usage of Mechanical APDL to Plot Distorted Elements

In part I if this series, we saw how to use Newton-Raphson residual plots as an aid to vanquishing convergence difficulties in ANSYS Workbench Mechanical.  In part II, we will see how to quickly launch the ANSYS Mechanical APDL user interface to plot elements that have undergone too much distortion, thereby resulting in a convergence failure.  Several problems can cause convergence failures, but one that can be particularly frustrating is elements that have undergone too much distortion.

Currently there isn’t a way to isolate and view elements that have triggered a convergence failure due to too much distortion within the Workbench Mechanical user interface.  Fortunately we have access to the older ANSYS Mechanical APDL interface, which does allow us to select and visualize elements that have undergone too much distortion.  This can be useful in that it tells us exactly where in the model the elements are failing.  Hopefully we can use this information to take corrective action in Mechanical such as making local mesh modifications, adding more details to geometry, etc.

So, how do we do this?  Rather than try to give a lesson on how to use the Mechanical APDL interface, we’re just going to give the commands needed to be clicked with the mouse or typed in.  We’re following the K.I.S.S. principal, meaning Keep It Simple, Silly.

The procedure to follow includes these steps:

1.  Identify the directory in which our results file resides.

2.  Launch ANSYS Mechanical APDL.

3.  Point to the results file identified in step 1.

4.  Modify the nodal coordinates so they are in the deflected state at the point of convergence failure.

5.  Plot those error-causing elements.

We will now go into more detail using a model that has convergence trouble.  This model solved successfully for the first 4 substeps, but on the 5th substep the solution failed to converge.  We get this error in the solver output (Solution Information):

*** ERROR *** CP = 2872.649 TIME= 16:29:51
One or more elements have become highly distorted. Excessive
distortion of elements is usually a symptom indicating the need for
corrective action elsewhere. Try incrementing the load more slowly
(increase the number of substeps or decrease the time step size). You
may need to improve your mesh to obtain elements with better aspect
ratios. Also consider the behavior of materials, contact pairs,
and/or constraint equations. If this message appears in the first
iteration of first substep, be sure to perform element shape checking.

Looking at the model, we see we have an indenter that is being pressed into a block of material.  The indenter is steel and the block is aluminum.  Both have nonlinear material properties defined.

Total deformation for the last converged substep looks like this:

The unconverged results show that we have some elements that have large nodal deflections:

So, our error message tells us that one or more elements have become highly distorted.  Which elements are they?  The following procedure will show us how to view those for sure, using Mechanical APDL.

Here are each of the 6 steps mentioned above, in detail:

1. Identify the directory in which our results file resides:

We do this from the Workbench window, by clicking on View > Files.  Scroll down in the resulting list of files until you find file.rst, the ANSYS Result file.  The location will be listed in the resulting information, but the text is not selectable.  To make it easier, right click on the file.rst row and select Open Containing Folder.

From the top of the resulting Windows Explorer window, select the folder path and right click > copy.

2. Launch ANSYS Mechanical APDL:

Click Start > All Programs > ANSYS 14.0 > ANSYS Mechanical APDL Product Launcher.  In the resulting window, paste in the directory path in the Working Directory box:

Click the Run button at the bottom of the window.  The Mechanical APDL user interface will start.

3. Point to the results file identified in step 1:

Click on General Postproc on the left, then Data & File Opts.  In the resulting Data and File Options window, click on the […] button below Read single result file:

You should see the result file, file.rst, available in the resulting window.  Click on that file, then click Open.  Click OK in the Data and File Options window.

We need to read in one set of results to load the model into the Mechanical APDL database.  Click General Postproc > Read Results > Last Set.

4. Modify the nodal coordinates so they are in the deflected state at the point of convergence failure:

Let’s plot the elements so we can see the model (this will show the elements with nodes in the original, undeflected positions).  We’ll just have you type in the command to make the element plot:  in the input line near the top of the window, type eplot, then return.

The plot will show in the default “front” view, looking down the global Z axis.  Note that if weak springs are on in Workbench Mechanical, you will see these as line elements pointing away from the model in a few places.

The nodal modification is performed in the preprocessor.  Click on the Preprocessor command on the left side of the window.  Type in this command in the input line to modify the nodal positions to those of the unconverged (last set) of results:

upgeom,,,,file,rst

Plot the elements again.  You should now see the deflected nodal positions.

Using the view controls over on the right side, we can rotate and zoom in. A short cut is to use the right mouse button to box zoom and Ctrl + Right Mouse Button to rotate the model.  Now we can better see where the deformations are occurring.  We still have all elements selected and plotted, so the next step will be to filter the plot to show the error-causing elements.

5.  Plot those error-causing elements:

Shape checking of elements consists of two levels, warning and error.  The solver will not continue if any elements exceed the error level.  Shape checking is discussed in detail in section 13.1 of the Theory Reference in the ANSYS Help.  We have the ability to plot both warning level elements and error level elements, using this procedure:

On the left side of the window, click on Meshing > Check Mesh > Individual Elm > Plot Warning/Error Messages.

With all boxed checked, this is the resulting plot in the front view.  “Good” elements are displayed in blue, “warning” elements in yellow, and “error” or failed elements are shown in red.

When the elements are very highly distorted, their surfaces can’t always be displayed and it looks like there is a hole in the model.  This won’t always happen depending on how highly distorted the elements are, viewing direction, etc..

If we uncheck the Good Elements (blue) box, then only the warning and error elements are displayed.

When you are done viewing the elements, click on the Quit button near the top, and exit without saving to get out of Mechanical APDL.

So what does all this tell us?  For this model, the elements below the indenter body are experiencing too much deformation (red elements).  Some elements in the indenter body are at the warning level but not the error level (yellow elements).  The fix could be to apply the load more gradually (more substeps), refine the mesh at this location, or maybe a combination of both.  In this case we also changed the Workbench Mechanical shape checking from Standard to Aggressive Mechanical.

ANSYS Penetration Model