Drift Demands (Hayward)
This example uses the quakeio
package to parse a collection of ground motion records and calculate drift demands.
import quakeio
import quakeio.processing as spec
# file_name = "../dat/58658_007_20210426_10.09.54.P.zip"
= "../dat/nc73654060_ce58658p.zip" file_name
= quakeio.read(file_name, "csmip.zip")
collection # collection.motions.keys()
= collection.at(key="bent_4_north_column_top")
top = collection.at(key="bent_4_north_column_grnd_level") bot
=[top.tran.displ, bot.tran.displ],
spec.plot_grid(series=["Structure", "Ground"]) label
= 2.54
inches_to_cm = 47.0*12.0 * inches_to_cm height
= (top - bot).slice(28.,60.)
relative_resp # relative_resp is a QuakeMotion with long,tran,vert series
= relative_resp.long.displ.plot()
ax = relative_resp.tran.displ.plot(ax=ax)
ax = relative_resp.resultant().displ.plot(ax=ax) ax
= relative_resp.resultant().displ["peak_value"]/height
resultant_drift = relative_resp.tran.displ["peak_value"]/height transverse_drift
5.7846756828653446e-05
-5.362784106773887e-05
for component in collection.components:
=[0.001, 0.01]).plot() spec.Spectrum(component, damping
long,bot.long), damping=[0.001,0.01,0.05]).plot(); spec.TransferFunction((top.
long, damping=[0.0, 0.01]).plot() spec.Spectrum(bot.
<AxesSubplot:title={'center':'Response spectrum (Chn. 12)'}, xlabel='Period, (sec.)'>