Robotran C Documentation
Functions
user_Link3DForces.c File Reference
#include "math.h"
#include "mbs_data.h"

Functions

double * user_Link3DForces (double PxF[4], double RxF[4][4], double VxF[4], double OMxF[4], double AxF[4], double OMPxF[4], MbsData *mbs_data, double tsim, int ixF)
 Compute an user-specified point to point force, with arbitrary line of action. More...
 

Function Documentation

◆ user_Link3DForces()

double* user_Link3DForces ( double  PxF[4],
double  RxF[4][4],
double  VxF[4],
double  OMxF[4],
double  AxF[4],
double  OMPxF[4],
MbsData s,
double  tsim,
int  ixF 
)

Compute an user-specified point to point force, with arbitrary line of action.

A 3D link force is attached from a body (called the parent body) to a second body (called children body). The parent and children bodies cannot be inverted as it change the definition of both the inputs arguments and outputs results.

For the documentation below, let:

  • point "A" be the anchor point on the parent body;
  • point "B" the anchor point on the children body;
  • point "M" the mid-point between "A" and "B";
  • frame [P], the frame attached to the parent body
  • frame [C], the frame attached to the children body

The returned force/torque component are expressed in the frame [P] and applied on both parent and children body at the location of point "B".

Parameters
[in]PxFThe vector "AB" (index starting at 1) with components expressed in frame [P].
[in]RxFThe rotation matrix (index starting at 1) such as [C] = Rxf*[P].
[in]VxFThe differential velocity vector (index starting at 1) with components expressed in frame [P]. The velocities are computed at the coordinates of point "M" linked to parent (Md_p), then linked to children (Md_c) body. The differential velocity vector is : Md_c - Md_p.
[in]OMxFThe differential angular velocity vector (index starting at 1) with components expressed in frame [P]. It is the difference between the parent angular velocity and the children angular velocity.
[in]AxFThe differential acceleration vector (index starting at 1) with components expressed in frame [P]. The accelerations are computed at the coordinates of point "M" linked to parent (Mdd_p), then linked to children (Mdd_c) body. The differential acceleration vector is : Mdd_c - Mdd_p.
[in]OMPxFThe differential angular acceleration vector (index starting at 1) with components expressed in frame [P]. It is the difference between the parent angular acceleration and the children angular acceleration.
[in,out]sThe MbsData structure of the model on which the force is computed.
[in]tsimThe current time of the simulation
[in]ixFThe ID identifying the computed link3D force.
Returns
A vector (of size 6, index starting at 1) with the content described for MbsData::l3DW The content of the returned vector Swr is [Fx; Fy; Fz; Mx; My; Mz]:
  • Force components (expressed in frame [P]) : Fx, Fy, Fz
  • Pure torque components (expressed in frame [P]) : Mx, My, Mz