HyperWorks Solvers

FIESUB

FIESUB

Previous topic Next topic No expanding text in this topic  

FIESUB

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

Subroutine Type

Modeling

Definition

A field subroutine is used to calculate the six component forces/torques and their derivatives for a force field entity.

Use

User-defined field using forces/torques computed in a FIESUB:

 

<Force_Field

    id                  = "303001"

    i_marker_id         = "30301010"

    j_marker_id         = "30301020"

    body1_id            = "30101"

    body2_id            = "30301"

    usrsub_param_string = "USER(303001)"

    usrsub_dll_name     = "NULL"

 />

Calling Syntax

Fortran

SUBROUTINE FIESUB (ID, TIME, PAR, NPAR, DISP, VELO, DFLAG, IFLAG, FIELD, DFDDIS, DFDVEL)

 

C

void STDCALL FIESUB (int *id, double *time, double *par, int *npar, double *disp, double *veloint, int *dflag, int *iflag, double *field, double *dfddis, double *dfdvel)

 

Python

def FIESUB(id, time, par, npar, disp, velo, dflag, iflag):
    return [field, dfddis, dfdvel]

 

MATLAB

function [field, dfddis, dfdvel] = FIESUB(id, time, par, npar, disp1, velo, dflag, iflag)

Input Arguments

[integer] ID

The field 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.

 

[double precision] DISP

An array of dimension 6 that contains the transitional/rotational displacements of the I marker with respect to the J marker, expressed in the coordinate system of the J marker.

 

[double precision] VELO

An array of dimension 6 that contains the translational/rotational velocities of the I marker with respect to the J marker, expressed in the coordinate system of the J marker.

 

[logical] DFLAG

The differencing flag.

 

[logical] IFLAG

The initialization flag.

Output Values

[double precision] FIELD

The vector output value of dimension 6 that contains the computed forces/torques.

 

[double precision] DFDDIS

The vector output value of dimension 6 that contains the derivatives of the six force/torque components with respect to the displacement array.

 

[double precision] DFDVEL

The vector output value of dimension 6 that contains the derivatives of the six force/torque components with respect to the velocity array.

Example

def FIESUB(id, time, par, npar, disp, velo, dflag, iflag):

    dfddis=[]

    dfdvel=[]

        for i in xrange(6):        

            for j in xrange(6):

                dfddis.append(0.0)

                dfdvel.append(0.0)

    dfddis[0*6+0] = -14037.

    dfddis[1*6+1] = -1049.

    dfddis[2*6+2] = -1049.

    dfddis[3*6+3] = -2120.

    dfddis[4*6+4] = -9358.

    dfddis[5*6+5] = -9358.

        for i in xrange(6):

            for j in xrange(6):

                dfdvel[j*6+i] = 0.1*dfddis[j*6+i]

    d=list(disp);

    d[0] = d[0]-5.0;

    field=[]

        for i in xrange(6):

            field.append(0.0)

            for j in xrange(6):

                field[i] = field[i]+dfddis[j*6+i]*d[j]+dfdvel[j*6+i]*velo[j]

    return [field, dfddis, dfdvel]

See Also:

Modeling Subroutines