This tutorial was completed using ANSYS 7.0 The purpose of the tutorial is to describe how to utilize contact elements to simulate how two beams react when they come into contact with each other.

The beams, as shown below, are 100mm long, 10mm x 10mm in cross-section, have a Young's modulus of 200 GPa, and are rigidly constrained at the outer ends. A 10KN load is applied to the center of the upper, causing it to bend and contact the lower.


  1. Give example a Title Utility Menu > File > Change Title ...
    /title, Contact Elements

  2. Open preprocessor menu ANSYS Main Menu > Preprocessor
    /PREP7

  3. Define Areas Preprocessor > Modeling > Create > Area > Rectangle > By 2 Corners
    BLC4,WP X, WP Y, Width, Height

    We are going to define 2 rectangles as described in the following table:

    Rectangle Variables (WP X,WP Y,Width,Height)
    1 (0, 15, 100, 10)
    2 (50, 0, 100, 10)

  4. Define the Type of Element
  5. Define Real Constants
  6. Preprocessor > Real Constants... > Add...

    In the 'Real Constants for PLANE42' window, enter the following geometric properties:

    1. Thickness THK: 10

    This defines a beam with a thickness of 10 mm.

  7. Define Element Material Properties Preprocessor > Material Props > Material Models > Structural > Linear > Elastic > Isotropic

    In the window that appears, enter the following geometric properties for steel:

    1. Young's modulus EX: 200000
    2. Poisson's Ratio PRXY: 0.3

  8. Define Mesh Size Preprocessor > Meshing > Size Cntrls > ManualSize > Areas > All Lines...

    For this example we will use an element edge length of 2mm.

  9. Mesh the frame Preprocessor > Meshing > Mesh > Areas > Free > click 'Pick All'

  10. Define the Type of Contact Element
  11. It is important to note, CONTAC48 elements are created in the space between two surfaces prescribed by the user. This will be covered below. As the surfaces approach each other, the contact element is slowly "crushed" until it's upper node(s) lie along the same line as the lower node(s). Thus, ANSYS can calculate when the two prescribed surfaces have made contact. Other contact elements, such as CONTA175, require a target element, such as TARGE169, to function. When using contact elements in your own analyses, be sure to understand how the elements work. The ANSYS help file has plenty of useful information regarding contact elements and is worth reading.

  12. Define Real Constants for the Contact Elements
  13. Preprocessor > Real Constants... > Add...

    In the 'Real Constants for CONTAC48' window, enter the following properties:

    1. Normal contact stiffness KN: 200000
      CONTAC48 elements basically use a penalty approach to model contact. When one surface comes into "contact" with the other, ANSYS numerically puts a spring of stiffness KN between the two. ANSYS recommends a value between 0.01 and 100 times Young's modulus for the material. Since this "spring" is so stiff, the behaviour of the model is like the two surfaces have made contact. This KN value can greatly affect your solution, so be sure to read the help file on contact so you can recognize when your solution is not converging and why. A good rule of thumb is to start with a low value of KN and see how the solution converges (start watching the ANSYS Output Window). If there is too much penetration, you should increase KN. If it takes a lot of iterations to converge for a single substep, you should decrease KN.
    2. Target length tolerance TOLS: 10
      Real constant TOLS is used to add a small tolerance that will internally increase the length of the target. This is useful for problems when node to node contact is likely to occur, rather than node to element edge. In this situation, the contact node may repeatedly "slip" off one of the target nodes, resulting in convergence difficulties. A small value of TOLS, given in %, is usually enough to prevent such difficulties.

    The other real constants can be used to model sliding friction, tolerances, etc. Information about these other constants can be found in the help file.

  14. Define Nodes for Creating Contact Elements Unlike the normal meshing sequence used for most elements, contact elements must be defined in a slightly different manner. Sets of nodes that are likely to come into contact must be defined and used to generate the necessary elements. ANSYS has many recommendations about which nodes to select and whether they should act as target nodes or source nodes. In this simple case, source nodes are those that will move into contact with the other surface, where as target nodes are those that are contacted. These terms are important when using the automatic contact element mesher to ensure the elements will correctly model contact between the surfaces. A strong understanding of how the elements work is important when using contact elements for your own analysis.

    First, the source nodes will be selected.

    • Utility Menu > Select > Entities...
      Select Areas and By Num/Pick from the pull down menus, select From Full from the radio buttons and click OK. Select the top beam and click OK. This will ensure any nodes that are selected in the next few steps will be from the upper beam. In this case, it is not too hard to ensure you select the correct nodes. However, when the geometry is complex, you may inadvertantly select a node from the wrong surface and it could cause problems during element generation.

    • Utility Menu > Select > Entities...
      Select Nodes and By Location from the pull down menus, Y coordinates and Reselect from the radio buttons and enter a value of 15 and click OK. This will select all nodes along the bottom of the upper beam.

    • Utility Menu > Select > Entities...
      Select Nodes and By Location from the pull down menus, X coordinates and Reselect from the radio buttons and enter values of 50,100. This will select the nodes above the lower beam.

    • Now if you list the selected nodes, Utility Menu > List > Nodes... you should only have the following nodes remaining.

      It is important to try and limit the number of nodes you use to create contact elements. If you have a lot of contact elements, it takes a great deal of computational time to reach a solution. In this case, the only nodes that could make contact with the lower beam are those directly above it, thus those are the only nodes we will use to create the contact elements.

    • Utility Menu > Select > Comp/Assembly > Create Component
      Enter the component name Source as shown below, and click OK. Now we can use this component, Source, as a list of nodes to be used in other functions. This can be very useful in other applications as well.

    Now select the target nodes.
    Using the same procedure as above, select the nodes on the lower beam directly under the upper beam. Be sure to reselect all nodes before starting to select others. This is done by opening the entity select menu, Utility Menu > Select > Entities..., clicking the Also Select radio button, and click the Sele All button.
    These values will be the ones you'll use.

    • Click the lower area for the area select.
    • The Y coordinate is 10
    • The X coordinates vary from 50 to 100.

    When creating the component this time, enter the name Target.

    IMPORTANT: Be sure to reselect all the nodes before continuing. This is done by opening the entity select menu, Utility Menu > Select > Entities..., clicking the Also Select radio button, and click the Sele All button.

  15. Generate Contact Elements
  16. Main Menu > Preprocessor > Modeling > Create > Elements > Elem Attributes

    Fill the window in as shown below. This ensures ANSYS knows that you are dealing with the contact elements and the associated real constants.

    Main Menu > Preprocessor > Modeling> Create > Elements > Surf / Contact > Node to Surf

    The following window will pop up. Select the node set SOURCE from the first drop down menu (Ccomp) and TARGET from the second drop down menu (Tcomp). The rest of the selections remain unchanged.

    At this point, your model should look like the following.

    Unfortunately, the contact elements don't get plotted on the screen so it is sometimes difficult to tell they are there. If you wish, you can plot the elements (Utility Menu > Plot > Elements) and turn on element numbering (Utility Menu > PlotCtrls > Numbering > Elem/Attrib numbering > Element Type Numbers). If you zoom in on the contact areas, you can see little purple stars (Contact Nodes) and thin purple lines (Target Elements) numbered "2" which correspond to the contact elements, shown below.

    The preprocessor stage is now complete.


  1. Define Analysis Type
  2. Solution > Analysis Type > New Analysis > Static
    ANTYPE,0

  3. Set Solution Controls

    These solution control values are extremely important in determining if your analysis will succeed or fail. If you have too few substeps, the contact nodes may be driven through the target elements before ANSYS "realizes" it has happened. In this case the solution will resemble that of an analysis that didn't have contact elements defined at all. Therefore it is important to choose a relatively large number of substeps initially to ensure the model is defined properly. Once everything is working, you can reduce the number of substeps to optimize the computational time. Also, if the maximum number of substeps or iterations is left too low, ANSYS may stop the analysis before it has a chance to converge to a solution. Again, leave these relatively high at first.

  4. Apply Constraints
  5. Solution > Define Loads > Apply > Structural > Displacement > On Lines

    Fix the left end of the upper beam and the right end of the lower beam (ie all DOF constrained)

  6. Apply Loads
  7. Solution > Define Loads > Apply > Structural > Force/Moment > On Nodes

    Apply a load of -10000 in the FY direction to the center of the top surface of the upper beam. Note, this is a point load on a 2D surface. This type of loading should be avoided since it will cause a singularity. However, the displacement or stress near the load is not of interest in this analyis, thus we will use a point load for simplicity.

    The applied loads and constraints should now appear as shown in the figure below.

  8. Solve the System
  9. Solution > Solve > Current LS
    SOLVE

  1. Open postprocessor menu ANSYS Main Menu > General Postproc
    /POST1

  2. Adjust Graphical Scaling
  3. Utility Menu > PlotCtrls > Style > Displacement Scaling

    Click the 1.0 (true scale) radio button, then click ok. This is of huge importance! I lost many hours trying to figure out why the contact elements weren't working, when in fact it was just due to the displacement scaling to which ANSYS defaulted. If you leave the scaling as default, many times it will look like your contact nodes have gone through the target elements.

  4. Show the Stress Distribution in the Beams General Postproc > Plot Results > Contour Plot > Nodal Solu > Stress > von Mises

  5. Adjust Contour Scale Utility Menu > PlotCtrls > Style > Contours > Non-Uniform Contours

    Fill in the window as follows:

    This should produce the following stress distribution plot:

    As seen in the figure, the load on the upper beam caused it to deflect and come in contact with the lower beam, producing a stress distribution in both.


The above example was solved using a mixture of the Graphical User Interface (or GUI) and the command language interface of ANSYS. This problem has also been solved using the ANSYS command language interface that you may want to browse. Open the .HTML version, copy and paste the code into Notepad or a similar text editor and save it to your computer. Now go to 'File > Read input from...' and select the file. A .PDF version is also available for printing.