HyperWorks Solvers

Force: Two Body Vector

Force: Two Body Vector

Previous topic Next topic Expand/collapse all hidden text  

Force: Two Body Vector

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

Command Element

Description

Modifies a Force_Vector_TwoBody force element.

Format

<Force_Vector_TwoBody

      id                         = "integer"

      i_marker_id                = "integer"

      j_floating_marker_id       = "integer"

      ref_marker_id              = "integer"

{  

      type = "forceonly"

      {

            fx_expression        = "motionsolve_expression"

            fy_expression        = "motionsolve_expression"

            fz_expression        = "motionsolve_expression"

          |

            usrsub_dll_name      = "valid_path_name"

            usrsub_param_string  = "USER( [[par_1 [, ...][,par_n]] )"

            usrsub_fnc_name      = "valid_function_name"

      }

    |

      type = "torqueonly"

      {

            tx_expression        = "motionsolve_expression"

            ty_expression        = "motionsolve_expression"

            tz_expression        = "motionsolve_expression"

          |

            usrsub_dll_name      = "valid_path_name"

            usrsub_param_string  = "USER( [[par_1 [, ...][,par_n]] )"

            usrsub_fnc_name      = "valid_function_name"

      }

    |

      type = "forceandtorque"

      {

            fx_expression        = "motionsolve_expression"

            fy_expression        = "motionsolve_expression"

            fz_expression        = "motionsolve_expression"

            tx_expression        = "motionsolve_expression"

            ty_expression        = "motionsolve_expression"

            tz_expression        = "motionsolve_expression"

          |

            usrsub_dll_name      = "valid_path_name"

            usrsub_param_string  = "USER( [[par_1 [, ...][,par_n]] )"

            usrsub_fnc_name      = "valid_function_name"

      }

}

/>

Attributes

id

Element identification number (integer>0).  This number is unique among all Force_Vector_TwoBody elements.

i_marker_id

Modifies the Reference_Marker at which the force is applied.  This is designated as the point of application of the force.

j_floating_marker_id

Modifies the Reference_Marker at which an equal and opposite reaction force is applied.  This marker is moved around on the parent body so that it is always superimposed on i_marker_id. Such a construct allows Newton’s third law to be automatically fulfilled.  Note j_floating_marker_id may belong to rigid bodies or point masses only.  They may not belong to flexible bodies.

ref_marker_id

Modifies the Reference_Marker whose coordinate system is used as the basis for defining the components of the force vector.

fx_expression

fy_expression

fz_expression

Modifies any of the three components of the force vector as function expressions.

tx_expression

ty_expression

tz_expression

Modifies any of the three components of the torque vector as function expressions.

usrsub_dll_name

Modifies 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_param_string

Modifies the list of parameters that are passed from the data file to the user defined subroutine.   The name of the user-subroutine depends on the type of the element.

"FORCEONLY": defaults to VFOSUB

"TORQUEEONLY": defaults to VTOSUB

"FORCEANDTORQUE": defaults to GFOSUB

usersub_fnc_name

Modifies an alternative name for the user subroutine VFOSUB or VTOSUB or GFOSUB.

Comments

1.The type of the Force_Vector_TwoBody cannot be changed in the command.
2.The way in which the force magnitude is specified cannot be changed.  For example, a force specified in a model element with expressions cannot be modified using a user subroutine and vice versa.

Example

<Force_Vector_TwoBody

 id            = "30101"

 fx_expression = "2"

 fy_expression = "-1"

 fz_expression = "-2"

/>

 

<Force_Vector_TwoBody

 id            = "30101"

 tx_expression = "1"

 ty_expression = "0"

 tz_expression = "0"

/>

hmtoggle_plus1greyPython Format

Command Element

Description

Modifies a GFORCE force element.

Declaration

def GFORCE(id, LABEL="", I= 0, JFLOAT= 0, RM= 0, FX="", FY="", FZ="", TX="", TY="", TZ="",FUNCTION="", ROUTINE="", INTERPRETER="", SCRIPT=""):

Attributes

id

Element identification number (integer>0).  This number is unique among all the GFORCE elements. It uniquely identifies the command element.

LABEL

Modifies name of the GFORCE element.

I

Modifies the ID of the marker at which the force/torque is applied.  This is designated as the point of application of the force/torque.

JFLOAT

Modifies the ID of the floating marker at which an equal and opposite reaction force/torque is applied.

RM

 

Modifies the marker whose coordinate system is used as the basis for defining the components of the force/torque vector.

FX

Modifies the magnitude of x-component's force vector as a constant value, or as a function expression that can be evaluated at run-time.

FY

Modifies the magnitude of y-component's force vector as a constant value, or as a function expression that can be evaluated at run-time.

FZ

Modifies the magnitude of z-component's force vector as a constant value, or as a function expression that can be evaluated at run-time.

TX

Modifies the magnitude of x-component's torque vector as a constant value, or as a function expression that can be evaluated at run-time.

TY

Modifies the magnitude of y-component's torque vector as a constant value, or as a function expression that can be evaluated at run-time.

TZ

Modifies the magnitude of z-components torque vector as a constant value, or as a function expression that can be evaluated at run-time

FUNCTION

Modifies the list of parameters that are passed from the data file to the user defined subroutine. The user defined subroutine VFOSUB is used when only forces are defined. VTOSUB is used when only torques are defined. GFOSUB is used when both forces and torques are defined. This attribute is common to all types of user subroutines and scripts.

ROUTINE

Modifies an alternative name for the user subroutine VFOSUB/VTOSUB/GFOSUB.

INTERPRETER

Modifies the interpreted language that the user script is written in. Valid choices are MATLAB or PYTHON.

SCRIPT

Modifies the path and name of the user written script that contains the routine.

Comments

See Force_Vector_TwoBody

Example

The example below shows how a GFORCE may be modified.

GFORCE(30101, FX="2", FY="-1", FZ="-2", TX="1", TY="0", TZ="0")

See Also:

Force_Scalar_TwoBody model element

Command Statements

Model Statements

Functions

Notation and Syntax