FIESUB
ModelingA field subroutine is used to calculate the six component forces/torques and their derivatives for a force field entity.
Use
Userdefined 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"
/>
Format
 Fortran Calling Syntax

SUBROUTINE FIESUB (ID, TIME, PAR, NPAR, DISP, VELO, DFLAG, IFLAG, FIELD, DFDDIS, DFDVEL)
 C/C++ Calling Syntax

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 Calling Syntax

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

function [field, dfddis, dfdvel] = FIESUB(id, time, par, npar, disp1, velo, dflag, iflag)
Attributes
 ID
 [integer]
 TIME
 [double precision]
 PAR
 [double precision]
 NPAR
 [integer]
 DISP
 [double precision]
 VELO
 [double precision]
 DFLAG
 [logical]
 IFLAG
 [logical]
Output
 FIELD
 [double precision]
 DFDDIS
 [double precision]
 DFDVEL
 [double precision]
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]