HyperWorks Solvers

GFOSUB

GFOSUB

Previous topic Next topic No expanding text in this topic  

GFOSUB

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

Subroutine Type

Modeling

Definition

Used to calculate the six component forces and torques for a general force entity.

Use

User-defined force using forces and torques computed in a GFOSUB:

 

<Force_Vector_TwoBody

    id                   = "30701"

    type                 = " ForceAndTorque"

    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,30700800,30700700,30301011)"

    usrsub_dll_name      = "NULL">

 </Force_Vector_TwoBody>

Calling Syntax

Fortran

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

 

C

void STDCALL GFOSUB (int *id, double *time, double *par, int *npar, int *dflag, int *iflag, double *result)

 

Python

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

    return result

 

MATLAB

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

Input Arguments

[integer] ID

The general 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] RESULT

The vector output value of dimension 6 that contains the computed forces/torques (three translational and three rotational components).

Example

Here, GFOSUB is used to compute the six components of GFORCE with three translational (Force) and three rotational (Torque) components, below.

The following mathematical equation is used for GFOSUB computation:

f = -k*x – c*xdot

See Also:

Modeling Subroutines