FFOSUB
ModelingCalculates the frequency dependent force and torque for a frequency dependent force entity.
Use
User-defined force using forces and torques computed in a FFOSUB:
<Force_FreqDependent
id = "30701"
dof = "1"
i_marker_id = "30701010"
j_floating_marker_id = "30701012"
ref_marker_id = "30301010"
usrsub_param_string = "USER()"
usrsub_dll_name = "NULL"
/>
Format
- Fortran Calling Syntax
-
SUBROUTINE FFOSUB (ID, FREQ, MAG_U, PHASEU, PRELOAD, PAR, NPAR, DFLAG, IFLAG, KDYN, PHI_LOSS)
- C/C++ Calling Syntax
-
void STDCALL FFOSUB (int *id, double *freq, double* mag_u, double* phase_u, double* preload, double *par, int *npar, int *dflag, int *iflag, double* kdyn, double* phi_loss)
- Python Calling Syntax
-
def FFOSUB(id, freq, mag_u, phase_u, preload, par, npar, dflag, iflag): return [kdyn, phi_loss]
- MATLAB Calling Syntax
-
function results = FFOSUB(id, freq, mag_u, phase_u, preload, par, npar, dflag, iflag)
Attributes
- ID
- [integer]
- FREQ
- [double precision]
- MAG_U
- [double precision]
- PHASE_U
- [double precision]
- PRELOAD
- [double precision]
- PAR
- [double precision]
- NPAR
- [integer]
- DFLAG
- [logical]
- IFLAG
- [logical]
Output
- KDYN
- [double precision]
- PHI_LOSS
- [double precision]
Example
Here, FFOSUB is used to compute the frequency dependent force equivalent to a spring damper.
The following mathematical equation is used for FFOSUB computation:
from math import *
def FFOSUB(id, freq, mag_u, phase_u, preload, par, npar, iflag, dflag):
# Spring damper
K = 200 * (1 + 1 * mag_u)
C = 3 * (1 + mag_u)
omega = freq * 4 * acos(0)
K = 200 * STEP(mag_u, 0, 4, 1, .5)
C = 50
K = 3000 + 750 / (0.03 - 0.1) * (mag_u - 0.1)
r = K
i = omega * C
kdyn = sqrt(r * r + i * i)
phi_loss = atan2(i, r)
return [kdyn, phi_loss]