response_spectra#

PySeismoSoil.helper_site_response.response_spectra(accel: ndarray, T_min: float = 0.01, T_max: float = 10, n_pts: int = 60, damping: float = 0.05, show_fig: bool = False, parallel: bool = False, n_cores: int | None = None, subsample_interval: int = 1) tuple[numpy.ndarray, ...][source]#

Single-degree-of-freedom elastic response spectra, using the “exact” solution to the equation of motion (Section 5.2, Dynamics of Structures, Second Edition, by Anil K. Chopra).

The input acceleration must be in m/s/s.

Re-written in Python based on the MATLAB function written by Jongwon Lee.

Parameters:
  • accel (np.ndarray) – Input acceleration. Must have exactly two columns (time and accel.).

  • T_min (float) – Minimum period value to calculate the response spectra. Unit: sec.

  • T_max (float) – Maximum period value to calculate the response spectra. Unit: sec.

  • n_pts (int) – Number of points you want for the response spectra. A high number increases computation time.

  • damping (float) – Damping of the dash pots. Do not use “percent” as unit. Unit: 1 (i.e., not percent).

  • show_fig (bool) – Whether to show a figure of the response spectra.

  • parallel (bool) – Whether to perform the calculation in parallel.

  • n_cores (int | None) – Number of cores to use in parallel. Not necessary if not parallel.

  • subsample_interval (int) – The interval at which to subsample the input acceleration in the time domain. A higher number reduces computation time, but could lead to less accurate results.

Returns:

(Tn, SA, PSA, SV, PSV, SD, fn) – Periods, spectral acceleration, pseudo spectral acceleration, spectral velocity, pseudo spectral velocity, spectral displacement, and frequencies, respectively. Units: SI.

Return type:

tuple[np.ndarray, …]

Raises:

ValueError – When the value of input parameters are incorrect