VTOSUB

ModelingComputes the rotational force components for a torque only vector entity.

Use

User-defined vector force calling a VTOSUB:

<Force_Vector_TwoBody
     id                    = "30701"
     type                  = "TorqueOnly"
     i_marker_id           = "30701010"
     body1_id              = "30301"
     j_floating_marker_id  = "30701012"
     body2_id              = "30101"
     ref_marker_id         = "30301010"
     ref_body_id           = "30101"
     usrsub_param_string   = "USER(1,30800,30700,30301)"
     usrsub_dll_name       = "NULL">
  </Force_Vector_TwoBody>

Format

Fortran Calling Syntax
SUBROUTINE VTOSUB (ID, TIME, PAR, NPAR, DFLAG, IFLAG, RESULTS)
C/C++ Calling Syntax
void STDCALL VTOSUB (int *id, double *time, double *par, int *npar, int *dflag, int *iflag, double *results)
Python Calling Syntax
def VTOSUB(id, time, par, npar, dflag, iflag):
    return results
MATLAB Calling Syntax
function results = VTOSUB(id, time, par, npar, dflag, iflag)

Attributes

ID
[integer]
The user-defined torque element identifier.
TIME
[double precision]
The current simulation time.
PAR
[double precision]
An array that contains the constant arguments from the list provided in the user defined statement.
NPAR
[integer]
The number of entries in the PAR array.
DFLAG
[logical]
The differencing flag.
IFLAG
[logical]
The initialization flag.

Output

RESULTS
[double precision]
The output value array of dimension 3 that contains the torque value components (X, Y, and Z) that the VTOSUB has computed.

Example

def VTOSUB(id, time, par, npar, dflag, iflag):

    ipar = 2*[0]
    results = 3*[0.0]

    ipar[0] = int(par[1])
    ipar[1] = 1;
    [results[2], errflg] = py_sysfnc("ARYVAL",ipar)

    return results