**************************
Contact on Smooth Surfaces
**************************

A developmental option is available for contact on smooth surfaces (such as pins rotating in holes or ball bearings). In its current implementation, contact constructs a patch for each face in ``Side A`` that is in contact. For quad faces, this patch is a Gregory patch (following the method of [:footcite:`Puso02`]), while for tri3 faces, it is a Nagata patch (following the method of [:footcite:`Neto`]). This is done to predict the curvature of the face from an average node normal calculation. The node normals are updated every timestep in order to capture the deformation of the smooth surface. The contact gap and  resulting forces are computed in this current configuration, and the forces are distributed out to the nodes via the linear shape functions of the original face. Convergence is achieved via this method due to the Augmented Lagrangian enforcement iterations performed by DASH. Example syntax is shown below:

.. code-block:: sierrainput

   BEGIN CONTACT DEFINITION EXAMPLE_SMOOTH_CONTACT
     CONTACT SMOOTH SURFACE SMOOTH_SURF CONTAINS SURFACE_1
     CONTACT NODE SET NODE_SIDE CONTAINS NODELIST_1000
     BEGIN INTERACTION SMOOTH_1
       CONSTRAINT FORMULATION = NODE_FACE
       SIDE A = SMOOTH_SURF
       SIDE B = NODE_SIDE
     END
   END

.. warning::

   Smooth contact is only available for solid quad and tri3 faces.

.. warning::

   This option is only implemented for node-face contact. If unspecified it will default to node-face.

``Side A`` is the smooth surface side and ``Side B`` is the node side in a smooth contact node-face interaction.

Surface Normals and Curvature Metrics
=====================================

Smooth surfaces have two metrics that allow us to assess the curvature of the surface ``smooth_surface_altitude`` and ``smooth_surface_curvature``. Both of these are calculated on the interior nodes of the smooth contact surfaces. Interior nodes are nodes that belong to only one smooth surface. The nodal variables ``smooth_surface_curvature`` and ``smooth_surface_altitude`` can be requested for output onto the results file.   ``smooth_surface_altitude`` is calculated as the average signed distance of adjacent nodes to the plane created at the node with the nodal normal of the smooth surface, the average is scaled with the characteristic length. The ``curvature`` is the mean curvature calculated using the method of [:footcite:`Rusink04`]. 

The min and max curvature metrics are collected and printed to the log file for each smooth surface. For example:

.. parsed-literal::

   -------- DASH SMOOTH SURFACE METRICS --------
   Contact Entity    Surf Index   Node Normal              Min Altitude   Max Altitude   Min Curvature   Max Curvature
   ---------------   ----------   ----------------------   ------------   ------------   -------------   -------------
   smooth_surf       0            smooth_surface_normal    5.105e-02      5.105e-02      2.500e-01       2.500e-01

In addition the table in the log file indicates the nodal variable name used for the smooth surface nodal normal for each smooth surface. Each smooth surface has a unique normal so nodes shared between smooth surfaces will have multiple normals. The node normal variable can be used to visualize the smooth surface normal, when visualizing surface normals care should be taken to match the node normal variable name with the surface being visualized.

.. warning::

   Multiple smooth surfaces can be defined but a maximum of 5 surfaces can share a common node.

.. warning::

   Node normals are crucial for accurate smooth surfaces. Symmetry boundaries have a lack of information for the normal calculation, which leads to unexpected behavior. Modeling with symmetry boundaries are not currently recommended.

Automatic Selection of Side A and Side B
========================================

The best way to guarantee that a surface is used as a smooth surface is to set ``Side A`` using the ``side a =`` command to setup contact. The automatic selection of ``Side A`` and ``Side B`` occurs when the surface are specified with ``surfaces =``. The same selection logic applied to node-face contact is used when the characteristic lengths of the two sides are not within ``2x`` of each other. Otherwise, if one side is smooth and the other surface is not the ``Side A`` is set to the smooth side. Then if one side is flat and the other side has curvature, the side with curvature is used as ``Side A``. If both sides have curvature the side with the lower curvature is used as ``Side A``.

.. warning::

   In the case of two smooth surfaces, the current method will always assign a flat surface (i.e. one with zero curvature) as ``Side B``. If the intention is that the flat surface should be smoothed, e.g. in the case where it is expected to deform substantially, then it must be directly specified as ``Side A`` or it must be the only smooth surface in the interaction.

.. raw::
   html

   <hr>

.. footbibliography::
