Model Element |
|||||||||||||||||||||||||||||||||||
Description |
|||||||||||||||||||||||||||||||||||
Force_Scalar_TwoBody defines a force or torque acting between two Reference_Markers. 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. |
||||||||||||||||||||||||||||||||||
Comments |
|||||||||||||||||||||||||||||||||||
An action-reaction translational Force_Scalar_TwoBody. Note the force acts along the line from Reference_Marker J to Reference_Marker I.
An action-only translational Force_Scalar_TwoBody. Note the force at Reference_Marker I acts along the z-axis of Reference_Marker J.
An action-reaction, rotational Force_Scalar_TwoBody. Note the torque always acts along the z-axis of Reference_Marker J.
An action-only rotational Force_Scalar_TwoBody. Note the torque always acts along the z-axis of Reference_Marker J.
|
|||||||||||||||||||||||||||||||||||
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. Coulomb and Smoothed Coulomb Friction Models Assume for the purpose of this example:
The normal force in the joint may be calculated as:
The slip velocity in the joint may be calculated as:
The smoothed coefficient of friction may be calculated as:
The smoothed Coulomb Friction Force is:
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:
|
Model Element |
|
Description |
|
SFORCE defines a force or torque acting between two markers. The force or torque is characterized by a magnitude and a direction. The direction is pre-defined dependent on TYPE and ACTIONONLY for details see below. 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. |
|
Declaration |
|
def SFORCE(id, LABEL="", I=0, J=0, TYPE="TRANSLATION", ACTIONONLY=False, FUNCTION="", ROUTINE="", INTERPRETER="", SCRIPT=""): |
|
Attributes |
|
id |
Element identification number (integer>0). This number is unique among all the SFORCE elements. It uniquely identifies the modeling element. |
LABEL |
The name of the SFORCE element. |
I |
Specifies the ID of the marker at which the force is applied. This is designated as the point of application of the force. |
J |
Specifies the ID of the marker at which an equal and opposite reaction force is applied. |
TYPE |
Specifies the type of SFORCE being defined. Select from "TRANSLATION" and "ROTATION"."TRANSLATION": The element applies a force between the two markers. No torque is applied."ROTATION": The element applies a torque between the two markers. No force is applied. |
ACTIONONLY |
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 markerDefault value is FALSE. |
FUNCTION |
Specifies the magnitude of a constant valued force.OrThe magnitude of the force vector as a function expression.OrThe 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. |
ROUTINE |
Specifies an alternative name for the user subroutine SFOSUB. |
INTERPRETER |
Specifies the interpreted language that the user script is written in. Valid choices are MATLAB or PYTHON. |
SCRIPT |
Specifies the path and name of the user written script that contains the routine. |
CommentsSee Force_Scalar_TwoBody |
|
For a TYPE=”TRANSLATION”, ACTIONONLY=FALSE the direction of the force on Marker I is defined by the unit vector from MARKER J to MARKER I. The force on MARKER J is equal and opposite. An action-reaction translational SFORCE. Note the force acts along the line from marker J to marker I. For a TYPE=”TRANSLATIONAL”, ACTIONONLY=TRUE the direction of the force on Marker I is defined by the unit vector along the z-axis of Marker J as shown in the image below. There is no reaction force on the body containing Marker J. An action-only translational SFORCE. Note the force at marker I acts along the z-axis of marker J. For a TYPE=”ROTATION”, ACTIONONLY=FALSE, the direction of the torque is defined by the z-axis of Marker J. The z-axis of Marker I and Marker J are required to always be parallel. An action-reaction, rotational SFORCE. Note the torque always acts along the z-axis of marker J. For a TYPE=”ROTATION”, ACTIONONLY=TRUE, the direction of the torque is also defined by the z-axis of Marker J. There is no reaction torque on the body containing Marker J. An action-only rotational SFORCE. Note the torque always acts along the z-axis of marker J. |
|
ExampleThe example below shows how a SFORCE may be defined.SFORCE(7,LABEL="Force 0",I=71,J=81,TYPE="ROTATION",FUNCTION="(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 MDL Model statements:
*ActionReactionForce() - line of action
*ActionReactionForce() - single component rotation
*ActionReactionForcePair() - line of action
*ActionReactionForcePair() - single component rotation
*SetForce() - asymmetric force pair with user subroutine
*SetForce() - asymmetric line of action
*SetForce() - asymmetric rotational
*SetForce() - asymmetric single component rotation
*SetForce() - asymmetric translational
*SetForce() - asymmetric translational and rotational
*SetForce() - single component rotation
*SetForce() - single force with user subroutine
*SetForce() - symmetric line of action
*SetForce() - symmetric rotational
*SetForce() - symmetric single component rotation
*SetForce() - symmetric translational
*SetForce() - symmetric translational and rotational
*SetForce() - translational and rotational