6.5. Modal Analysis
- modeller.do_modal_analysis(num_modes=3, solver='-genBandArpack', doRayleigh=False, pFlag=False, plot_modes=True, export_path=None)[source]
Perform modal analysis on a multi-degree-of-freedom (MDOF) system to determine its natural frequencies and mode shapes.
This method calculates the natural frequencies and corresponding mode shapes of the system. The natural frequencies are determined by solving the eigenvalue problem, and the mode shapes are normalized for the system’s degrees of freedom. The results can be used to assess the dynamic characteristics of the system.
- Parameters:
num_modes (int, optional) – The number of modes to consider in the analysis. Default is 3. This parameter determines how many modes will be computed in the modal analysis.
solver (string, optional) – The type of solver to use for the eigenvalue problem. Default is ‘-genBandArpack’, which uses a generalized banded Arnoldi method for large sparse eigenvalue problems.
doRayleigh (bool, optional) – Flag to enable or disable Rayleigh damping in the modal analysis. This parameter is not used directly in this method but can be set in the OpenSees model. Default is False.
pFlag (bool, optional) – Flag to control whether to print the modal analysis report. If True, the fundamental period and mode shape will be printed to the console. Default is False.
plot_modes (bool, optional) – Flag to control whether to plot the modes. If True, the mode shapes are plotted against the undeformed shape. Default is True
export_path (str, optional) – If a string path is provided (e.g., ‘modal_results.png’), the plot will be saved to this location. If None, the plot will be only displayed and not saved. Default is None.
- Returns:
T (array) – The periods of vibration for the system, calculated as 2π/ω, where ω are the natural frequencies obtained from the eigenvalue problem.
mode_shape (list) – A list of the normalized mode shapes for the system, with each element representing the displacement in the x-direction for the corresponding mode. The mode shapes are normalized by the last node’s displacement.