Subroutine Type |
Modeling |
|
Definition |
Used 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> |
||
Calling Syntax |
Fortran SUBROUTINE DMPSUB (ID, TIME, PAR, NPAR, FREQ, NMODE, H, CRATIOS)
C void STDCALL DMPSUB (int *ID, double *time, double *par, int *npar, double *freq, double *nmode, double *h, double *cratios)
Python def DMPSUB(id, time, par, npar, freq, nmode, h): return cratios
MATLAB function cratios = DMPSUB(id, time, par, npar, freq, nmode, h) |
|
Input Arguments |
[integer] ID |
The flexible body identifier. |
[double precision] TIME |
The current simulation time. |
|
[double precision] PAR |
An array that contains the constant arguments from the list provided in the user-defined statement. |
|
[integer] NPAR |
The number of entries in the PAR array. |
|
[double precision] FREQ |
The array of natural frequencies. |
|
[double precision] NMODE |
The number of modes associated with the flexible body. |
|
[double precision] H |
The integrator step size. |
|
Output Values |
[double precision] CRATIOS |
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 |
See Also: