# FRICTION

The FRICTION function computes the output of a Force_JointFriction corresponding to the ID and the component index specified in comp.

## Format

FRICTION(ID, comp, rm)

## Arguments

ID
The ID of the Force_JointFriction.
comp
The force component. Currently, a range of 1-18 is supported.
1 = Friction force FX along the x-axis of the J marker of the joint.
2 = Friction force FY along the y-axis of the J marker of the joint.
3 = Friction force FZ along the z-axis of the J marker of the joint.
4 = Friction torque TX along the x-axis of the J marker of the joint.
5 = Friction torque TY along the y-axis of the J marker of the joint.
6 = Friction torque TZ along the z-axis of the J marker of the joint.
7 = Translational friction coefficient along the x-axis of the J marker of the joint.
8 = Translational friction coefficient along the y-axis of the J marker of the joint.
9 = Translational friction coefficient along the z-axis of the J marker of the joint.
10 = Rotational friction coefficient about the x-axis of the J marker of the joint.
11 = Rotational friction coefficient about the y-axis of the J marker of the joint.
12 = Rotational friction coefficient about the z-axis of the J marker of the joint.
13 = Translational slip velocity along the x-axis of the J marker of the joint.
14 = Translational slip velocity along the y-axis of the J marker of the joint.
15 = Translational slip velocity along the z-axis of the J marker of the joint.
16 = Rotational slip velocity along the x-axis of the J marker of the joint.
17 = Rotational slip velocity along the y-axis of the J marker of the joint.
18 = Rotational slip velocity along the z-axis of the J marker of the joint.
rm
This attribute lets you specify a marker in whose frame the above results will be computed. When not specified, rm defaults to the J marker of the joint associated with the friction model.

## Examples

1. The example below shows how you can obtain all information relevant to friction in a REVOLUTE joint in one request. Assume that Force_JointFriction/39 is used to define the frictional force in the joint.
<Post_Request
id      = "1039"
type    = "EXPRESSION"
comment = "FRICTION force"
expr2   = "FRICTION(39, 6)"  <!--Obtain TZ value-->
expr3   = "FRICTION(39, 12)" <!--Obtain µRZ value-->
expr4   = "FRICTION(39, 18)" <!--Obtain WZ value-->
/>
2. The example below shows how you can obtain information relevant to friction in a SPHERICAL joint in one request. Assume that Force_JointFriction/40 is used to define the frictional force in the joint.
<Post_Request
id      = "1040"
type    = "EXPRESSION"
comment = "FRICTION force"
expr2   = "FRICTION(40, 4)"  <!--Obtain TX value-->
expr3   = "FRICTION(40, 5)"  <!--Obtain TY value-->
expr4   = "FRICTION(40, 6)"  <!--Obtain TZ value-->
expr6   = "FRICTION(40, 10)" <!--Obtain µRX value-->
expr7   = "FRICTION(40, 11)" <!--Obtain µRY value-->
expr8   = "FRICTION(40, 12)" <!--Obtain µRZ value-->
/>
3. The example below shows how you can obtain information relevant to friction in a TRANSLATIONAL joint in one request. Assume that Force_JointFriction/41 is used to define the frictional force in the joint.
<Post_Request
id      = "1041"
type    = "EXPRESSION"
comment = "FRICTION force"
expr2   = "FRICTION(41, 3)"   <!--Obtain FZ value-->
expr3   = "FRICTION(41, 9)"   <!--Obtain µZ value-->
expr4   = "FRICTION(41, 15)"  <!--Obtain VZ value-->
/>
4. The example below shows how you can obtain information relevant to friction in a PLANAR joint in one REQUEST. Assume that Force_JointFriction/41 is used to define the frictional force in the joint.
<Post_Request
id      = "1041"
type    = "EXPRESSION"
comment = "FRICTION force"
expr2   = "FRICTION(41, 1)"  <!--Obtain FX value-->
expr3   = "FRICTION(41, 2)"  <!--Obtain FY value-->
expr4   = "FRICTION(41, 6)"  <!--Obtain TZ value-->
expr1   = "FRICTION(41, 7)"  <!--Obtain µX value-->
expr2   = "FRICTION(41, 8)"  <!--Obtain µY value-->
expr3   = "FRICTION(41, 12)" <!--Obtain µRZ value-->
/>

1. The Friction() function may only be used in Post_Request and Sensor_Event model statements. It may not be used in any model elements that actually contribute terms in the equations of motion such as, Force_Scalar_TwoBody, Force_Vector_TwoBody or Control_StateEqn.
2. Depending on the joint type, many of the components of the Friction() function will be always zero. The joint type determines which component type is always zero. The table below identifies these zero components.
Comp Name Revolute Universal Spherical Translation Cylindrical Planar
1 FX 0   0 0 0
2 FY 0   0 0 0
3 FZ 0   0     0
4 TX 0     0 0 0
5 TY 0     0 0 0
6 TZ       0
7 µX 0   0 0 0
8 µY 0   0 0 0
9 µZ 0   0     0
10 µRX 0     0 0 0
11 µRY 0     0 0 0
12 µRZ       0
13 VX 0   0 0 0
14 VY 0   0 0 0
15 VZ 0   0     0
16 WX 0     0 0 0
17 WY 0     0 0 0
19 WZ       0