HyperWorks Solvers

SFOSUB

SFOSUB

Previous topic Next topic No expanding text in this topic  

SFOSUB

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

Subroutine Type

Modeling

Definition

Used to compute the force value for a force entity.

Use

User defined request calling a SFOSUB for the calculation of the force magnitude:

 

<Force_Scalar_TwoBody

    id                  = "30101"

    type                = "Force"

    i_marker_id         = "30103031"

    body1_id            = "30103"

    j_marker_id         = "30104041"

    body2_id            = "30104"

    usrsub_param_string = "USER(50,1000)"

    usrsub_dll_name     = "NULL">

 </Force_Scalar_TwoBody>

Calling Syntax

Fortran

SUBROUTINE SFOSUB (ID, TIME, PAR, NPAR, DFLAG,IFLAG, VALUE)

 

C

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

 

Python

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

    return value

 

MATLAB

function result = SFOSUB(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] VALUE

The output value that contains the force value that the SFOSUB has computed.

Example

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

    [dm, errflg] = py_sysfnc("DM", [par[0],par[1]])

    [vm, errflg] = py_sysfnc("VM", [par[2],par[3]])

    [vector, errflg] = py_impact(dm, vm, par[4], par[5], par[6], par[7], par[8], 0)

 

    return vector[0]

See Also:

Modeling Subroutines