HyperWorks Solvers

Force: Two Body Scalar

Force: Two Body Scalar

Previous topic Next topic Expand/collapse all hidden text  

Force: Two Body Scalar

Previous topic Next topic JavaScript is required for expanding text JavaScript is required for the print function  
hmtoggle_plus1greyXML Format

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

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.

fstb_comfig0

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.

fstb_comfig3a

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.

fstb_comfig4a

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.

fstb_comfig5

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.

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.

FSTB_ExFig1

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
Vs = 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.
hmtoggle_plus1greyPython Format

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 marker

Default value is FALSE.

FUNCTION

Specifies the magnitude of a constant valued force.

Or

The magnitude of the force vector as a function expression.

Or

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.

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.

Comments

See 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.

sforce_python_fig1

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.

sforce_python_fig2

An action-only translational SFORCE.  Note the force at marker I acts along the z-axis of marker J.

For a TYPE=”ROTATION”, ACTIONONLY=FALSEthe 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.

sforce_python_fig3

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.

sforce_python_fig4

An action-only rotational SFORCE. Note the torque always acts along the z-axis of marker J.

Example

The 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)")

 

See Also:

Force_SpringDamper

Force_Vector_OneBody

Force_Vector_TwoBody

Model Statements

Command Statements

Functions

Notation and Syntax

The following MDL Model statements:

*ActionReactionForce()

*ActionReactionForce() - line of action

*ActionReactionForce() - single component rotation

*ActionReactionForcePair()

*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() - line of action

*SetForce() - 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

*SetForce() - translational and rotational