# Constraint: SFSF

Model ElementConstraint_SFSF defines a higher pair constraint. The constraint consists of a surface on one body rolling and sliding on a surface on a second body. The surfaces are required to have a unique contact point.

## Format

```
<Constraint_SFSF
id = "
```*integer"*
label = "Name of Constraint_SFSF element"
i_marker_id = "*integer"*
i_surface_id = "*integer"*
i_disp_x0 = "*real"*
i_disp_y0 = "*real"*
i_disp_z0 = "*real"*
j_marker_id = "*integer"*
j_surface_id = "*integer"*
j_disp_x0 = "*real"*
j_disp_y0 = "*real"*
j_disp_z0 = "*real"*
</Constraint_SFSF>

## Attributes

`id`- Element identification number (integer>0). This number is unique among all Constraint_SFSF elements.
`label`- The name of the Constraint_SFSF element.
`i_marker_id`- Specifies a marker that defines the coordinate system in which the
`i_surface`points are defined. It also implicitly defines the body on which the surface is "etched". The surface moves with the body.`i_marker_id`may belong to any type of body: flexible, rigid, or point. The parameter is mandatory. `i_surface_id`- Specifies the ID of the Reference_ParamSurface that contains the surface definition.
`i_disp_x0`,`i_disp_y0`,`i_disp_z0`- These three parameters specify the location of the contact point on
`i_surface`at the input configuration as measured in the`i_marker_id`coordinate system. The three parameters come as a set. All three must be specified or none may be defined. These parameters are optional. 8 `j_marker_id`- Specifies a Reference_Marker that defines the coordinate system in which the
`j_surface`points are defined. It also implicitly defines the body on which the surface is "etched". The surface moves with the body.`j_marker_id`may belong to any type of body: flexible, rigid, or point. The parameter is mandatory. `j_surface_id`- Specifies the ID of the Reference_ParamSurface that contains the surface definition.
`j_disp_x0`,`j_disp_y0`,`j_disp_z0`- These three parameters specify the location of the contact point on
`j_surface`at the input configuration as measured in the`j_marker_id`coordinate system. The three parameters come as a set. All three must be specified or none may be defined. These parameters are optional. 8

## Example

Surface I is defined with respect to Reference_Marker 1023; surface J is defined with respect to Reference_Marker 2046. Reference_ParamSurface 123 defines surface I and Reference_ParamSurface 246 defines surface J. The patch containing the contact point is also shown in figure 1.

An initial guess for the contact point on both surfaces is defined. Assume the initial contact point location on surface J, as measured in the coordinate system of 2046, is [1.466, 5.66, 0.1]. Assume the contact point location on surface I, as measured in the coordinate system of 1023, is [-0.522, -0.852, -0.453].

The Constraint_SFSF object may be defined as follows:

```
<Constraint_SFSF
id = "1"
i_marker_id = "1023"
i_surface_id = "123"
i_disp_x0 = "1.466"
i_disp_y0 = "5.66"
i_disp_z0 = "0.1"
j_marker_id = "2046"
j_surface_id = "246"
j_disp_x0 = "-0.522"
j_disp_y0 = "-0.852"
j_disp_z0 = "-0.452" >
</Constraint_SFSF>
```

## Comments

- Constraint_SFSF element
constrains the two surfaces as follows:
- They surfaces have exactly one contact point.
- The normal at the contact point for each surface are
anti-parallel. This is shown schematically in Figure 2 below. P
_{i}and P_{j}represent the contact point on the two surfaces I and J respectively. N_{i}and N_{j}are the normals at the contact point for Surface I and Surface J respectively. The contact conditions are shown mathematically in the box at the bottom-left.

- The surface-to-surface constraint does not allow lift-off. You can examine the sign of the constraint force to determine if any lift-off should have occurred if the constraint were not there. A positive value implies that the force is repulsive. A negative value implies an attractive force. The surfaces would separate if the constraint were not present. If your results require an accurate simulation of intermittent contact, you should model the contact forces directly using a Force_Contact or a Force_TwoBody object.
- Both open and closed surfaces supported by Constraint_SFSF.
- Open surfaces have a well defined spatial
extent. The surface is only defined in the domain α
_{min}<= α <= α_{max}, and β_{min}<= β <= β_{max}where α and β are the surface parameters. While enforcing the surface-to-surface constraint, it is possible for MotionSolve to find a solution outside this range. It is your responsibility to define appropriate forces at the surface ends, so that the contact point stays in the legal range for α and β. - The surfaces in a Constraint_SFSF are required to have a single point of contact. Convex surfaces will guarantee a single point of contact. A convex surface is one that intersects a straight line at just two points. See Figure 3 below for examples of convex and non convex shapes.
- The oval shaped closed surface on the left is an example of a convex shape. Notice that any straight line can intersect the surface at only two points. In contrast, the open surface on the right is non-convex. You can draw a straight line that intersects it at more than two points.
- Be suspicious of the correctness of your model, if ever one of the constraints belonging to a Constraint_SFSF is declared to be redundant. This will lead to unexpected behavior and is a sure indication that the model has not been correctly built.
- MotionSolve
does an initial search to exactly locate the contact point. While the
attributes
`i_disp_x0`,`i_disp_y0`,`i_disp_z0`,`j_disp_x0`,`j_disp_y0`, and`j_disp_z0`are not mandatory, it is a good idea to specify them if you know what they are.