NumericalIRF Class
- class openirf.NumericalIRF(M=array([], shape=(0, 0), dtype=float64), C=array([], shape=(0, 0), dtype=float64), K=array([], shape=(0, 0), dtype=float64))
OpenIRF Numerical IRF Class
Stores numerical model (M,C,K) for IRF calculation.
Constraints
All matrices must have the same size
M & K matrices must be added simultaneously
Adding a C matrix is optional
Attributes
- param M:
Mass matrix of numerical model.
- type M:
ndarray
- param C:
Damping matrix of numerical model.
- type C:
ndarray
- param K:
Stiffness matrix of numerical model.
- type K:
ndarray
- param t_vec:
Time vector corresponding to calculated IRFs.
- type t_vec:
ndarray
- param H_d:
Displacement IRF matrix.
- type H_d:
ndarray
- param H_v:
Velocity IRF matrix.
- type H_v:
ndarray
- param H_a:
Acceleration IRF matrix.
- type H_a:
ndarray
- C = array([], shape=(0, 0), dtype=float64)
- H_a = array([], shape=(0, 0), dtype=float64)
- H_d = array([], shape=(0, 0), dtype=float64)
- H_v = array([], shape=(0, 0), dtype=float64)
- K = array([], shape=(0, 0), dtype=float64)
- M = array([], shape=(0, 0), dtype=float64)
- add_MCK(M, K, C=None)
Add MCK matrices
This method allows to add MCK matrices to the class istance.
Constraints
All matrices must have the same size
M & K matrices must be added simultaneously
Adding a C matrix is optional
Parameters
- param M:
Mass matrix of numerical model.
- type M:
ndarray, optional
- param C:
Damping matrix of numerical model.
- type C:
ndarray, optional
- param K:
Stiffness matrix of numerical model.
- type K:
ndarray, optional
- calculate_IRF(t_step, t_len, exci_dofs=None, resp_dofs=None, ic_type='shifted_force')
Calculates a numerical IRF matrix
Numerically calculates an IRF matrix using Newmark time integration with the specified discrete time step size (t_step) for the specified length (t_len). The IRF matrix is calculated for force inputs at the dofs specified in exci_dofs and responses at the dofs specified in resp_dofs. The initial condition type used for the calculation can be specified with ic_type.
Supported initial condition types
shifted_force(default): The Dirac impulse is applied as a force on the second time step.initial_force: The Dirac impulse is applied as a force on the first time step.initial_velocity: The Dirac impulse is applied as an initial system velocity.
Parameters
- param t_step:
Discrete time step size (in seconds).
- type t_step:
float
- param t_len:
Length of calculated IRFs (in seconds).
- type t_len:
float
- param exci_dofs:
List of excitation dofs for which IRFs should be calculated.
- type exci_dofs:
ndarray, optional
- param resp_dofs:
List of response dofs for which IRFs should be calculated.
- type resp_dofs:
ndarray, optional
- param ic_type:
Initial condition type used for IRF calculation.
- type ic_type:
string
- t_vec = array([], dtype=float64)