GFOSUB
ModelingUsed to calculate the six component forces and torques for a general force entity.
Use
User-defined force using forces and torques computed in a GFOSUB:
<Force_Vector_TwoBody
id = "30701"
type = " ForceAndTorque"
i_marker_id = "30701010"
body1_id = "30301"
j_floating_marker_id = "30701012"
body2_id = "30101"
ref_marker_id = "30301010"
ref_body_id = "30101"
usrsub_param_string = "USER(1,30700800,30700700,30301011)"
usrsub_dll_name = "NULL">
</Force_Vector_TwoBody>
Format
- Fortran Calling Syntax
-
SUBROUTINE GFOSUB (ID, TIME, PAR, NPAR, DFLAG, IFLAG, RESULTS)
- C/C++ Calling Syntax
-
void STDCALL GFOSUB (int *id, double *time, double *par, int *npar, int *dflag, int *iflag, double *result)
- Python Calling Syntax
-
def GFOSUB(id, time, par, npar, dflag, iflag): return result
- MATLAB Calling Syntax
-
function results = GFOSUB(id, time, par, npar, dflag, iflag)
Attributes
- ID
- [integer]
- TIME
- [double precision]
- PAR
- [double precision]
- NPAR
- [integer]
- DFLAG
- [logical]
- IFLAG
- [logical]
Output
- RESULT
- [double precision]
Example
Here, GFOSUB is used to compute the six components of GFORCE with three translational (Force) and three rotational (Torque) components, below.
The following mathematical equation is used for GFOSUB computation:
f = -k*x - c*xdot