DMPSUB

ModelingUsed to compute a custom modal damping ratio for a flexible body.

Use

Flexible Body using the damping ration computed in a DMPSUB:

<Body_Flexible
     id                  = "30103"
     lprf_id             = "63330103"
     h3d_file            = "../qa_depot/h3d/beam.h3d"
     is_user_damp        = "TRUE"
     usrsub_param_string = "USER(30102020,30101010)"
     usrsub_dll_name     = "NULL"
     flexdata_id         = "30102"
     v_ic_x              = "0."
     v_ic_y              = "0."
     v_ic_z              = "0."
     w_ic_x              = "0."
     w_ic_y              = "0."
     w_ic_z              = "0."
     v_ic_x_flag         = "FALSE"
     v_ic_y_flag         = "FALSE"
     v_ic_z_flag         = "FALSE"
     w_ic_flag           = "FALSE">
  </Body_Flexible>

Format

Fortran Calling Syntax
SUBROUTINE DMPSUB (ID, TIME, PAR, NPAR, FREQ, NMODE, H, CRATIOS)
C/C++ Calling Syntax
void STDCALL DMPSUB (int *ID, double *time, double *par, int *npar, double *freq, double *nmode, double *h, double *cratios)
Python Calling Syntax
def DMPSUB(id, time, par, npar, freq, nmode, h):
    return cratios
MATLAB Calling Syntax
function cratios = DMPSUB(id, time, par, npar, freq, nmode, h)

Attributes

ID
[integer]
The flexible body identifier.
TIME
[double precision]
The current simulation time.
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.
FREQ
[double precision]
The array of natural frequencies.
NMODE
[double precision]
The number of modes associated with the flexible body.
H
[double precision]
The integrator step size.

Output

CRATIOS
[double precision]
The vector output value of dimension NMODE that contains the damping ratios as a fraction of critical damping.

Example

def DMPSUB(id, time, par, npar, freq, nmode, h):
    cratios = nmode*[0.0]
    [nq, errflg] = py_nmodes(id)
    if nq<=30:
        [mode, xfreq, errflg] = py_modinf(id)
    for i in xrange(nmode):
        if freq[i] < par[1]:
            cratios[i] = par[0]
        elif freq[i] < par[3]:
            cratios[i] = par[2]
        else:
            cratios[i] = par[4]
        return cratios