Force: Two Body Scalar

Model ElementForce_Scalar_TwoBody defines a force or torque acting between two Reference_Markers.

Description

The force or torque is characterized by a magnitude and a direction. The direction is pre-defined (see Comments 2 - 6 for more information). The magnitude may be defined using a function expression, a user-defined subroutine, a Python script or a MATLAB script. The magnitude can be a function of any system state and time.

Format

<Force_Scalar_TwoBody
     id                   = "integer"     
     label                = "Name of Force"
     i_marker_id          = "integer"     
     j_marker_id          = "integer"     
     is_action_only       = "TRUE | FALSE"
     type                 = { "FORCE" | "TORQUE" } 

{     
     val                  = "real"   
   | 
     val_expression       = "motionsolve_expression"   
   |      
     usrsub_dll_name      = "valid_path_name"
     usrsub_param_string  = "USER( [[par_1 [, ...][,par_n]] )" 
     usrsub_fnc_name      = "fnc_name"  
   |     
     script_name          = "valid_path_name"
     interpreter          = "PYTHON" | "MATLAB"
     usrsub_param_string  = "USER( [[par_1 [, ...][,par_n]] )"
     usrsub_fnc_name      = "fnc_name" 
} 
/>

Attributes

id
Element identification number (integer>0). This number is unique among all Force_Scalar_TwoBody elements. It uniquely identifies the modeling element.
label
The name of the Force_Scalar_TwoBody element.
i_marker_id
Specifies the Reference_Marker at which the force is applied. This is designated as the point of application of the force.
j_marker_id
Specifies the Reference_Marker at which an equal and opposite reaction force is applied.
is_action_only
Boolean variable. Select from "TRUE" and "FALSE".
"TRUE"
The element applies a force/torque on the I marker but no reaction on the J marker.
"FALSE"
The element applies a force/torque on the I marker and also a reaction force/torque on the J marker.

Default value is FALSE.

type
Specifies the type of Force_Scalar_TwoBody being defined. Select from "FORCE" and "TORQUE".
"FORCE"
The element applies a force between the two Reference_Markers. No torque is applied.
"TORQUE"
The element applies a torque between the two Reference_Markers. No force is applied.
val
Specifies the magnitude of a constant valued force.
val_expression
Specifies the magnitude of the force vector as a function expression in the XML input file.
usrsub_param_string
The list of parameters that are passed from the data file to the user defined subroutine, SFOSUB. This attribute is common to all types of user subroutines and scripts.
usrsub_dll_name
Specifies the path and name of the DLL or shared library containing the user subroutine. MotionSolve uses this information to load the user subroutine in the DLL at run time.
usrsub_fnc_name
Specifies an alternative name for the user subroutine SFOSUB.
script_name
Specifies the path and name of the user written script that contains the routine specified by usrsub_fnc_name.
interpreter
Specifies the interpreted language that the user script is written in. Valid choices are MATLAB or PYTHON.

Example

The example below shows how a simple friction model in a revolute joint may be modeled using this component.

The first static friction model was developed by Leonardo Da Vinci. Friction force is proportional to load, opposes the direction of motion, and is independent of contact area. Coulomb (1785) further developed this model and the friction phenomena described by the model became known as Coulomb friction.

The Coulomb friction model is shown in Figure 1a below. This model, however, is hard to implement numerically because of the infinite slope (discontinuity) at zero velocity. It is common practice to approximate the infinite slope using the step function when the relative slip in the joint is less than a transition value Vs. This is shown in figure 1b. Our goal is to model the friction model in Figure 1b.



Figure 1. Coulomb and Smoothed Coulomb Friction Models
Assume for the purpose of this example:
  • joint_id = 7
  • i_marker_id = 71; BODY1_ID = 7
  • j_marker_id = 81; BODY2_ID = 8
  • Radius of the joint = 0.44 m
  • µs = 0.3
  • Vsub = 0.01 m/s
  • Pre-load in the radial direction = 1167 N
The normal force in the joint may be calculated as:
  • Fx = JOINT(7, 2, 0, 81)
  • Fy = JOINT(7, 3, 0, 81)
  • Fn = SQRT (JOINT(7, 2, 0, 81)**2 + JOINT(7, 3, 0, 81)**2) + 1167
The slip velocity in the joint may be calculated as:
  • Slip velocity = 0.44*WZ(71,81,81)
The smoothed coefficient of friction may be calculated as:
  • m = STEP (0.044*WZ(71,81,81), -0.01, 0.3, 0.01, -0.3)
The smoothed Coulomb Friction Force is:
  • Ff = Fn * STEP (0.044*WZ(71,81,81), -0.01, 0.3, 0.01, -0.3)

The Force_Scalar_TwoBody modeling element for this scenario is:

<Force_Scalar_TwoBody
     id             = "7"
     type           = "TORQUE"
     i_marker_id    = "71"
     j_marker_id    = "81" 
     val_expression = "(SQRT(JOINT(7, 2, 0, 71)**2 + JOINT(7, 3, 0, 71)**2) + 1167)*STEP(0.044*WZ(71,72,72),-0.01,0.3,0.01,-0.3)"
/>
The following points are worth noting about this model:
  • The simple model does not account for stiction, variation of friction with velocity (Stribeck effect), and hysteresis.
  • If you are interested in modeling stiction, hysteresis and friction compensation, please refer to the implementations suggested in: "Friction Models and Friction Compensation", H. Olsson, K.J. Åström, C. Canudas de Wit, M. Gäfvert and P. Lischinsky, 1997. These can be easily implemented in MotionSolve.
  • The friction force contribution of the reaction torque in the joint is ignored in the example. This may be incorporated by assuming a transverse force distribution in the revolute joint along the joint axis and an axial length.
  • The friction force caused by axial forces is not modeled. This could be incorporated by assuming an axial force distribution in the annulus shape between the joint inner and outer radii.

Comments

  1. i_marker_id is designated as the point of application of the Force_Scalar_TwoBody. j_marker_id is the point of reaction.
  2. For a translational, action-reaction Force_Scalar_TwoBody, the direction of the force on i_marker_id is defined by the unit vector from j_marker_id to i_marker_id. The force on j_marker_id is equal and opposite.


    Figure 2. An action-reaction translational Force_Scalar_TwoBody. Note the force acts along the line from Reference_Marker J to Reference_Marker I.
  3. For a translational, action-only Force_Scalar_TwoBody, the direction of the force on i_marker_id is defined by the unit vector along the z-axis of j_marker_id as shown in the image below. There is no reaction force on the body containing j_marker_id.


    Figure 3. An action-only translational Force_Scalar_TwoBody. Note the force at Reference_Marker I acts along the z-axis of Reference_Marker J.
  4. For a rotational, action-reaction Force_Scalar_TwoBody, the direction of the torque is defined by the z-axis of j_marker_id. The z-axis of i_marker_id and j_marker_id are required to always be parallel.


    Figure 4. An action-reaction, rotational Force_Scalar_TwoBody. Note the torque always acts along the z-axis of Reference_Marker J.
  5. For a rotational, action-only Force_Scalar_TwoBody, the direction of the torque is also defined by the z-axis of j_marker_id. There is no reaction torque on the body containing j_marker_id.


    Figure 5. An action-only rotational Force_Scalar_TwoBody. Note the torque always acts along the z-axis of Reference_Marker J.
  6. The force and torque expressions (or user subroutines) must be smooth and preferably differentiable. This enables the numerical methods to deal with the force effectively.
  7. If you are using velocity measures like VX(), VY(), and VZ() to calculate a damping force, make sure that the time derivative is taken in the correct reference frame.
  8. Force_Scalar_TwoBody can act on all types of bodies: Body_Rigid, Body_Flexible, and Body_Point.