You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found that the (pseudo-)velocity values (psv, or sv) calculated by the pyrotd.calc_spec_accels(time_step, accel_ts, osc_freqs, osc_damping=0.05, max_freq_ratio=5, osc_type='psv') function must be multiplied by $g$ (the acceleration of gravity). In other words, the psv values are in units of g-s.
I obtained the spectral displacement (sd) of a record by the pyrotd.calc_spec_accels(time_step, accel_ts, osc_freqs, osc_damping=0.05, max_freq_ratio=5, osc_type='sd') function in the following script, but I can't figure out what the unit of these values is. I calculated the spectral displacement (sd) with pseudo-spectral acceleration $$Sd = pSa \cdot g \cdot \frac{T^2}{4\pi^2}$$ and there is a huge error between the calculated values by formula and the computed values by pyrotd library. There is a plot to illustrate of this huge error.
importnumpyasnpimportmatplotlib.pyplotaspltimportpyrotd#%% system of unitsm=1.0s=1.0kg=1.0N=kg*m/s/sg=9.80665*m/s/s#%% read recordrecord='RSN8883_14383980_13849360.AT2'record_content=open(record, mode='r').readlines()
# Flag indicating dt is found and that ground motion# values should be read -- ASSUMES dt is on last line# of header!!!flag=0record_samples= []
forlineinrecord_content:
ifline=='\n':
# Blank line --> do nothingcontinueelifflag==1:
words=line.split()
forwordinwords:
record_samples.append(float(word))
else:
words=line.split()
ifwords[0] =='NPTS=':
record_NPTS=words[1]
record_DT=float(words[3])
flag=1#%% compute spectral parameteresf=np.logspace(-1, 2, 91)
T=1/fxi=0.05pyrotd_pSa=pyrotd.calc_spec_accels(record_DT, record_samples, f, xi, max_freq_ratio=5, osc_type='psa')
pyrotd_Sd=pyrotd.calc_spec_accels(record_DT, record_samples, f, xi, max_freq_ratio=5, osc_type='sd')
formulated_Sd= []
forindex, psainenumerate(pyrotd_pSa.spec_accel):
formulated_Sd.append( psa*g* (T[index]**2) / (2/np.pi)**2 )
formulated_Sd=np.asarray(formulated_Sd)
#%% plotfig, axs=plt.subplots(layout='constrained')
fig.suptitle('Displacement spectra of '+record)
axs.plot(T, pyrotd_Sd.spec_accel, label='Sd')
axs.plot(T, formulated_Sd, label=r'Sd = $pSa \cdot g \cdot \frac{T^2}{4\pi^2}$')
axs.set_xlabel('Period, s')
axs.set_ylabel('Spectral displacement')
axs.legend()
plt.show()
I figured out that by multiplying sd values calculated by pyrotdlibrary by $g^3$, the error will be reduced significantly.
Hello everyone,
I found that the (pseudo-)velocity values ($g$ (the acceleration of gravity). In other words, the
psv
, orsv
) calculated by thepyrotd.calc_spec_accels(time_step, accel_ts, osc_freqs, osc_damping=0.05, max_freq_ratio=5, osc_type='psv')
function must be multiplied bypsv
values are in units ofg-s
.I obtained the spectral displacement ($$Sd = pSa \cdot g \cdot \frac{T^2}{4\pi^2}$$ and there is a huge error between the calculated values by formula and the computed values by
sd
) of a record by thepyrotd.calc_spec_accels(time_step, accel_ts, osc_freqs, osc_damping=0.05, max_freq_ratio=5, osc_type='sd')
function in the following script, but I can't figure out what the unit of these values is. I calculated the spectral displacement (sd
) with pseudo-spectral accelerationpyrotd
library. There is a plot to illustrate of this huge error.I figured out that by multiplying$g^3$ , the error will be reduced significantly.
sd
values calculated bypyrotd
library byThe text was updated successfully, but these errors were encountered: