HyperWorks Solvers

PTdSFSUB

PTdSFSUB

Previous topic Next topic No expanding text in this topic  

PTdSFSUB

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

Subroutine Type

Modeling

Definition

Used to compute normal and friction force for a Force_PTdSF entity.

Use

User-defined PTdSF force using displacement and velocity of the point of contact and computing normal and friction force in a PTDSFSUB.

 

<Force_PTdSF

    id                   = "301001"

    i_marker_id          = "30103070"

    radius               = "0.1"

    ref_dsurface_id      = "301001"

    force_model          = "USERSUB"

    usersub_param_string = "USER(100, 1000, 0.1)"

    interpreter          = "Python"

    script_name          = "ptdsfsub.py"

    usrsub_fnc_name      = "PTDSFSUB"

 />

Calling Syntax

Fortran

SUBROUTINE PTDSFSUB (ID, TIME, PAR, NPAR, DISP, VELO, DFLAG, IFLAG, NORMAL_FORCE, FRIC_FORCE)

 

C

void STDCALL PTDSFSUB (int *id, double *time, double *par, int *npar, double *disp, double *velo, int *dflag, int *iflag, double *normal_force, double *fric_force)

 

Python

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

    return [normal_force, friction_force]

 

MATLAB

Not Supported

Input Arguments

[integer] ID

The user-defined motion 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 that contains the displacement data.

disp[0] – D [ Penetration Depth, Negative when in Contact]

disp[1] – X [ X of contact point with respect to the surface reference marker ]

disp[2] – Y [ Y of contact point with respect to the surface reference marker ]

disp[3] – Z [ Z of contact point with respect to the surface reference marker ]

 

[double precision] VELO

An array that contains the velocity data.

velo[0] – D_dot [ Penetration Velocity]

velo[1] – X_dot [ X of contact tangential velocity with respect to the surface reference marker ]

velo[2] – Y_dot [ Y of contact tangential velocity with respect to the surface reference marker ]

velo[3] – Z_dot [ Z of contact tangential velocity with respect to the surface reference marker ]

 

[integer] DFLAG

The differencing flag.

 

[logical] IFLAG

The initialization flag.

Output Values

[double precision] NORMAL_FORCE

The output value that contains the computed normal force. This scalar value is applied in the direction of the surface normal vector on the deformable surface at the point of contact.

 

[double precision] FRIC_FORCE

The output array that contains the computed friction force (Fric_x, Fric_y, Fric_z).

Example

The following is an example of how to write a PTdSFSUB in Python:

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

    normal_force = [0]

    friction_force = [0,0,0]

    normal_force[0] = par[1]*disp[0] + par[2]*velo[0]

    

    friction_force[0] = 0.01*normal_force[0]*velo[1]

    friction_force[1] = 0.01*normal_force[0]*velo[2]

    friction_force[2] = 0.01*normal_force[0]*velo[3]

    return [normal_force, friction_force]

Comments

When the sphere (centered at the I marker with given radius) is not in contact with the deformable surface or either u or v or both are out of range, the PTdSFSUB is only called at each converged time step, and the outputs (that is normal and friction forces) are completely ignored.

See Also:

Modeling Subroutines