IM Calculator Module
The im_calculator
module provides a class IMCalculator
that calculates
various intensity measures (IMs) from ground-motion records, such as response
spectra, amplitude-based IMs (e.g., peak ground acceleration, peak ground velocity,
peak ground displacement), structure-dependent IMs (e.g., spectral acceleration and
average spectral acceleration), Arias Intensity, Cumulative Absolute Velocity (CAV),
and significant duration. The module also supports the computation of velocity and
displacement histories, as well as advanced IMs like the filtered incremental velocity (FIV3).
Classes
- class im_calculator.IMCalculator(acc, dt, damping=0.05)
A class to compute various intensity measures (IMs) from a ground-motion record.
Attributes:
acc: list or np.array The acceleration time series (m/s² or g).
dt: float The time step of the accelerogram (s).
damping: float The damping ratio (default is 5%).
- Parameters:
acc (list or np.array) – The acceleration time series (m/s² or g).
dt (float) – The time step of the accelerogram (s).
damping (float, optional) – The damping ratio (default is 5%).
- get_spectrum(periods=np.linspace(1e-5, 4.0, 100), damping_ratio=0.05)
Computes the response spectrum using the Newmark-beta method.
- Parameters:
periods (np.array) – List of periods to compute spectral response (s).
damping_ratio (float) – Damping ratio (default is 5%).
- Returns:
Periods, spectral displacement (m), spectral velocity (m/s), and spectral acceleration (g).
- Return type:
tuple(np.array, np.array, np.array, np.array)
- get_sa(period)
Computes the spectral acceleration at a given period.
- Parameters:
period (float) – The target period (s).
- Returns:
Spectral acceleration (g) at the given period.
- Return type:
float
- get_saavg(period)
Computes the geometric mean of spectral accelerations over a range of periods.
- Parameters:
period (float) – Conditioning period (s).
- Returns:
Average spectral acceleration at the given period.
- Return type:
float
- get_saavg_user_defined(periods_list)
Computes the geometric mean of spectral accelerations for a user-defined list of periods.
- Parameters:
periods_list (list or np.array) – List of user-defined periods (s) for spectral acceleration calculation.
- Returns:
Geometric mean of spectral accelerations over user-defined periods.
- Return type:
float
- get_velocity_displacement_history()
Computes velocity and displacement history with baseline drift correction.
- Returns:
Velocity time-history (m/s) and displacement time-history (m).
- Return type:
tuple(np.array, np.array)
- get_amplitude_ims()
Computes amplitude-based intensity measures, including PGA, PGV, and PGD.
- Returns:
Peak ground acceleration (g), peak ground velocity (m/s), and peak ground displacement (m).
- Return type:
tuple(float, float, float)
- get_arias_intensity()
Computes the Arias Intensity.
- Returns:
Arias intensity (m/s).
- Return type:
float
- get_cav()
Computes the Cumulative Absolute Velocity (CAV).
- Returns:
Cumulative absolute velocity (m/s).
- Return type:
float
- get_significant_duration(start=0.05, end=0.95)
Computes the significant duration (time between 5% and 95% of Arias intensity).
- Parameters:
start (float, optional) – Start threshold for significant duration (default is 5%).
end (float, optional) – End threshold for significant duration (default is 95%).
- Returns:
Significant Duration (s).
- Return type:
float
- get_duration_ims()
Computes duration-based intensity measures: Arias Intensity, CAV, and 5%-95% significant duration.
- Returns:
Arias Intensity (m/s), Cumulative Absolute Velocity (m/s), and 5%-95% Significant Duration (s).
- Return type:
tuple(float, float, float)
- get_FIV3(period, alpha, beta)
Computes the filtered incremental velocity (FIV3) intensity measure for a given ground motion record.
- Parameters:
period (float) – The period (in seconds) used to filter the ground motion record.
alpha (float) – A period factor that defines the length of the time window used for filtering.
beta (float) – A cut-off frequency factor that influences the low-pass filter applied to the ground motion record.
- Returns:
FIV3 intensity measure, filtered incremental velocity time series, time series, filtered acceleration time history, peaks, and troughs.
- Return type:
tuple(float, np.array, np.array, np.array, np.array, np.array)
References
Cordova, P.P., Deierlein, G.G., Mehanny, S.S., and Cornell, C.A. (2000). “Development of a two-parameter seismic intensity measure and probabilistic assessment procedure” in Proceedings of the 2nd US–Japan Workshop on Performance-Based Earthquake Engineering Methodology for RC Building Structures (Sapporo, Hokkaido, 2000).
Eads, L., Miranda, E., and Lignos, D.G. (2015). “Average spectral acceleration as an intensity measure for collapse risk assessment”, Earthquake Engineering and Structural Dynamics, 44, 2057–2073. doi: 10.1002/eqe.2575.
Kempton, J.J., and Stewart J.P. (2006). “Prediction equations for significant duration of earthquake ground motions considering site and near-source effects”, Earthquake Spectra, 22(4), 985-1013.
Arias, A. (1970). “A measure of earthquake intensity”, in Seismic Design for Nuclear Power Plants (R.J. Hansen, ed.). The MIT Press, Cambridge, MA. 438-483.
Dávalos, H. and Miranda, E. (2019). “Filtered incremental velocity: A novel approach in intensity measures for seismic collapse estimation.” Earthquake Engineering & Structural Dynamics, 48(12), 1384–1405. DOI: 10.1002/eqe.3205.