HyperWorks Solvers

VFOSUB

VFOSUB

Previous topic Next topic No expanding text in this topic  

VFOSUB

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

Subroutine Type

Modeling

Definition

Computes the translational force components for a force vector entity.

Use

User-defined vector force calling a VFOSUB:

 

<Force_Vector_TwoBody

    id                    = "30701"

    type                  = "ForceOnly"

    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>

Calling Syntax

Fortran

SUBROUTINE VFOSUB(ID, TIME, PAR, NPAR, DFLAG, IFLAG, RESULTS)

 

C

void STDCALL VFOSUB (int *id, double *time, double *par, int *npar, int *dflag, int *iflag, double *results)

 

Python

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

    return results

 

MATLAB

function results = VFOSUB(id, time, par, npar, dflag, iflag)

Input Arguments

[integer] ID

The user-defined force element identifier.

 

[double precision] TIME

The current simulation time.

 

[double precision] PAR

An array that contains the constant arguments from the list provided in the user defined statement.

 

[integer] NPAR

The number of entries in the PAR array.

 

[logical] DFLAG

The differencing flag.

 

[logical] IFLAG

The initialization flag.

Output Values

[double precision] RESULTS

The output value array of dimension 3 that contains the force value components (X, Y, and Z) that the VFOSUB has computed.

Example

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

 

    results = [000]

 

    [dx, errflg] = py_sysfnc("DX", [par[1],par[2]])

    [vx, errflg] = py_sysfnc("VX", [par[3],par[4]])

    [vector, errflg] = py_impact(dx, vx, par[5], par[6], par[7], par[8], par[9], 0)

    results[0] = vector[0]

 

    return results

See Also:

Modeling Subroutines