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]
The general force element identifier.
FREQ
[double precision]
The current simulation frequency.
MAG_U
[double precision]
The current magnitude of frequency input to Force_FreqDependent between the I and J markers.
PHASE_U
[double precision]
The current phase of frequency input to Force_FreqDependent between the I and J markers.
PRELOAD
[double precision]
The value of the preload expression evaluated from the previous static or transient simulation.
PAR
[double precision]
An array that contains the constant arguments from the list provided in the user defined statement.
NPAR
[integer]
The number of entries in the PAR array.
DFLAG
[logical]
The differencing flag.
IFLAG
[logical]
The initialization flag.

Output

KDYN
[double precision]
The output value of the magnitude of the dynamic stiffness.
PHI_LOSS
[double precision]
The output value of the loss angle.

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]