Skip to content
arkottkePublic

About

Python scripts to compute the rotated response spectrum.

Topics

Resources

Contributing

Stars

25 stars

Watchers

4 watching

Forks

Repository files navigation

pyRotd

PyPI Python Documentation Build Status Code Quality License DOI

Acceleration response spectrum calculations implemented in Python.

Introduction

Simple Python functions for calculating pseudo-spectral acceleration and rotated pseudo-spectral acceleration. The response of the single-degree-of-freedom oscillator is computed in the frequency domain, with frequency-domain interpolation to accurately capture the high-frequency characteristics.

The response spectrum is computed with frequency-domain transfer functions. The motion is interpolated in the frequency domain to ensure that the frequency content extends to at least five times the natural frequency of the oscillator, and it is zero-padded in time so that the free vibration of the oscillator does not wrap around the end of the record. Two perpendicular ground motions can be rotated to compute the response at various percentiles. For example, the minimum, median, and maximum are computed with percentiles of 0, 50, and 100. The orientations of the minimum and maximum are provided, but not those of other percentiles because the rotated spectral acceleration is not monotonically increasing.

Installation

pyRotd requires Python 3.13 or later and is available from the Python Package Index:

python -m pip install pyrotd

Example

Spectral accelerations may be computed for a single time series:

import numpy as np
import pyrotd

osc_damping = 0.05
osc_freqs = np.logspace(-1, 2, 91)
spec_accels = pyrotd.calc_spec_accels(time_step, accels, osc_freqs, osc_damping)

Rotated spectral accelerations may be computed for a pair of time series:

rot_osc_resps = pyrotd.calc_rotated_spec_accels(
    time_step, accels_a, accels_b, osc_freqs, osc_damping
)

A more detailed example is in this Jupyter notebook.

Related packages

pyRotd is developed together with:

  • pyRVT: random vibration theory
  • pyGMM: ground motion, Fourier amplitude spectrum and soil curve models
  • pyStrata: site response analysis

Citation

Please cite this software using the DOI.

License

pyRotd is made available under the MIT License. See LICENSE.

About

Python scripts to compute the rotated response spectrum.

Topics

Resources

Contributing

Stars

25 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages