PTdSFSUB
ModelingUsed 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"
/>
Format
- Fortran Calling Syntax
-
SUBROUTINE PTDSFSUB (ID, TIME, PAR, NPAR, DISP, VELO, DFLAG, IFLAG, NORMAL_FORCE, FRIC_FORCE)
- C/C++ Calling Syntax
-
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 Calling Syntax
-
def PTdSFSUB(id, time, par, npar, disp, velo, dflag, iflag): return [normal_force, friction_force]
- MATLAB Calling Syntax
-
Not Supported
Attributes
- ID
- [integer]
- TIME
- [double precision]
- PAR
- [double precision]
- NPAR
- [integer]
- DISP
- [double precision]
- VELO
- [double precision]
- DFLAG
- [integer]
- IFLAG
- [logical]
Output
- NORMAL_FORCE
- [double precision]
- FRIC_FORCE
- [double precision]
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.