linear_site_resp#
- PySeismoSoil.helper_site_response.linear_site_resp(soil_profile: numpy.ndarray | str, input_motion: numpy.ndarray | str, boundary: Literal['elastic', 'rigid'] = 'elastic', show_fig: bool = False, deconv: bool = False) tuple[numpy.ndarray, tuple[numpy.ndarray, numpy.ndarray]] [source]#
Perform linear site response analysis.
- Parameters:
soil_profile (np.ndarray | str) –
1D Vs profile. If it is a string, it means the file name that contains the data. If it is a 2D array, it has the following format:
Thickness [m]
Vs [m/s]
Damping
Density [kg/m^3]
Material No.
…
…
…
…
…
(Damping unit: 1)
input_motion (np.ndarray | str) – Input motion in the time domain (with two columns). If it is a string, it means the file name that contains the data. It should be the “rock outrcop” motion if
boundary
is set to"elastic"
, and it should be the recorded motion at the bottom of the Vs profile (i.e., the “borehole” motion) ifboundary
is set to"rigid"
.boundary (Literal['elastic', 'rigid']) – Boundary condition. “Elastic” means that the boundary allows waves to propagate through. “Rigid” means that all downgoing waves are reflected back to the soil medium.
show_fig (bool) – Whether to show a figure that shows the result of the analysis
deconv (bool) – Whether this operation is deconvolution. If True, it means that the
input_motion
will be propagated downwards, and the motion at the bottom will be collected.
- Returns:
response (np.ndarray) – The resultant ground motion in time domain. In the same format as
input_motion
.transfer_function (tuple[np.ndarray, np.ndarray]) – The transfer function (complex-valued) that corresponding to the given
soil_profile
andboundary
. It is a tuple of two 1D numpy arrays. The 0th array is frequency (real values) and the 1st array is the spectrum (complex values).
- Raises:
ValueError – The value of the input parameter is incorrect
Notes
If you want to get rock-outcrop motions, choose “elastic”; if you want to get bedrock motions (or “total” motions), choose “rigid”. If you happen to want incident motions, choose “elastic”, and then manually divide the result by 2.
(Original version in MATLAB: June 2013. Translated into Python on 4/5/2018.)