pycba.modal.ModalResults#

class ModalResults(omega, phi, x, beam=None)[source]#

Bases: object

Natural frequencies and mode shapes from a free-vibration analysis.

omega#

Natural circular frequencies (rad/s), ascending.

Type:

np.ndarray

f#

Natural frequencies (Hz) = omega / (2 pi).

Type:

np.ndarray

periods#

Natural periods (s) = 1 / f.

Type:

np.ndarray

x#

Coordinates of the refined-mesh nodes along the beam.

Type:

np.ndarray

phi#

Mode-shape matrix, shape (2 * n_nodes, n_modes) over the full DOF set (restrained DOFs zero); column i is mode i.

Type:

np.ndarray

n_modes#

Number of modes returned.

Type:

int

Methods

mode_shape

Return (x, v) for a mode: the vertical mode shape sampled at the refined-mesh nodes, normalised to unit maximum amplitude.

plot_modes

Plot one or several mode shapes (normalised to unit amplitude).

plot_results

Two-panel figure: the beam schematic above the mode shapes, sharing the distance axis (mirroring pycba.analysis.BeamAnalysis.plot_results()).

mode_shape(mode=0)[source]#

Return (x, v) for a mode: the vertical mode shape sampled at the refined-mesh nodes, normalised to unit maximum amplitude.

plot_modes(modes=0, ax=None, units=None)[source]#

Plot one or several mode shapes (normalised to unit amplitude).

Parameters:
  • modes (Union[int, Sequence[int]]) – The 0-based mode index/indices to draw. The default is the fundamental mode (0).

  • ax (matplotlib.axes.Axes, optional) – Axes to draw into; a new figure is created if omitted.

  • units (str or pycba.units.UnitSystem, optional) – Display unit system for the distance axis (see pycba.set_units()).

Return type:

matplotlib.axes.Axes

plot_results(modes=None, units=None, figsize=None)[source]#

Two-panel figure: the beam schematic above the mode shapes, sharing the distance axis (mirroring pycba.analysis.BeamAnalysis.plot_results()).

Parameters:
  • modes (Union[int, Sequence[int], None]) – Mode index/indices to draw. Defaults to the first three modes (or all of them if fewer were computed).

  • units (str or pycba.units.UnitSystem, optional) – Display unit system (see pycba.set_units()).

  • figsize (tuple(float, float), optional) – Figure size in inches.

Returns:

  • matplotlib.figure.Figure

  • numpy.ndarray of matplotlib.axes.Axes – The (schematic, mode-shape) panel axes.