Time History Analysis: MDF Frame
import ema as em
import matplotlib.pyplot as plt
import numpy as np
%config InlineBackend.figure_format = 'svg' # used to make plots look nicer
from ema_examples.dynamics import P09_07
from ema.utilities.ipyutils import disp_sbs
= 12
ft = 12*ft
h = 80/386.4
m = 29000
E = 1000
I = E*I
EI = False
RHA
= I = 3
N = P09_07(h = h, m = m, EI = EI)
mdl # fig, ax = plt.subplots()
# em.plot_structure(mdl, ax)
= em.Mass_matrix(mdl), em.K_matrix(mdl)
m, k = em.analysis.StaticCondensation(k, m)
k, m disp_sbs(m.df, k.df)
$u_{1}$ | $u_{2}$ | $u_{3}$ | |
---|---|---|---|
$u_{1}$ | 0.207039 | 0.000000 | 0.00000 |
$u_{2}$ | 0.000000 | 0.207039 | 0.00000 |
$u_{3}$ | 0.000000 | 0.000000 | 0.10352 |
$1$ | $2$ | $3$ | |
---|---|---|---|
$P_{1}$ | 466.177984 | -233.088992 | 0.000000 |
$P_{2}$ | -233.088992 | 466.177984 | -233.088992 |
$P_{3}$ | 0.000000 | -233.088992 | 233.088992 |
The function ema.analysis.ModalAnalysis
wraps a scipy routine for solving the eigenvalue problem.
= em.analysis.ModalAnalysis(mdl, norm='last')
freq2, Phi Phi
array([[ 5.00000000e-01, -1.00000000e+00, 5.00000000e-01],
[ 8.66025404e-01, 2.28035323e-16, -8.66025404e-01],
[ 1.00000000e+00, 1.00000000e+00, 1.00000000e+00]])
= np.array([np.sqrt(np.real(freq)) for freq in freq2])
omega omega
array([17.36843442, 47.45144529, 64.81987972])
= Phi.T@m@Phi
M = Phi.T@k@Phi K
Modal expansion of earthquake forces
\[\mathrm{p}_{\mathrm{eff}}(t)=-\mathrm{m} \iota \ddot{u}_{g}(t)\]
\[\mathbf{m} \iota=\sum_{n=1}^{N} \mathbf{s}_{n}=\sum_{n=1}^{N} \Gamma_{n} \mathbf{m} \phi_{n}\]
= N = 3
I = np.ones(I)
iota = np.array([sum(Phi.T[n,i]*sum(m[i,j]*iota[j] for j in range(I)) for i in range(I)) for n in range(N)])
L = Phi.T@m@iota
L L
Structural_Vector([ 0.38634066, -0.10351967, 0.02773801])
= np.array([L[n]/M[n,n] for n in range(N)])
gamma gamma
array([ 1.24401694, -0.33333333, 0.0893164 ])
= np.array([gamma[n]*(m@Phi.T[n]) for n in range(N)]).T
s s
array([[ 1.28780221e-01, 6.90131125e-02, 9.24600388e-03],
[ 2.23053886e-01, -1.57374274e-17, -1.60145485e-02],
[ 1.28780221e-01, -3.45065562e-02, 9.24600388e-03]])
a) Determine \(A_n\) and \(D_n\)
# Values read from response spectrum:
= np.array([0.877, 0.10, 0.04]) # inches
D D
array([0.877, 0.1 , 0.04 ])
# if RHA:
= []
D = []
u for i, w in enumerate(omega):
= 0.05
zeta = em.analysis.ElcentroRHA(zeta, w)
t, d max(d))
D.append(
u.append([t,d])print(D)
[0.923352660303864, 0.09304519274915218, 0.03763691127115581]
Plot modes:
= plt.subplots()
fig2, ax2
em.plot_structure(mdl, ax2)for i in range(3):
10*u[i][0],200+300*u[i][1], linewidth=0.5)
plt.plot( plt.show()
= np.array([D[n]*omega[n]**2 for n in range(N)])
A A
array([278.54088513, 209.50424621, 158.13587895])
b) Modal response quantities
Floor displacements
= np.array([[gamma[n]*Phi[i,n]*D[n] for n in range(N)]for i in range(I)])
Un Un
array([[ 5.74333174e-01, 3.10150642e-02, 1.68079666e-03],
[ 9.94774237e-01, -7.07253019e-18, -2.91122522e-03],
[ 1.14866635e+00, -3.10150642e-02, 3.36159333e-03]])
Story shears
= np.array([[sum(s[j,n]*A[n] for j in range(i, I)) for n in range(N)] for i in range(I)])
Vin Vin
array([[133.87074037, 7.22927006, 0.3917752 ],
[ 98.0001836 , -7.22927006, -1.07034975],
[ 35.87055677, -7.22927006, 1.46212495]])
Floor and base moments
= np.array([sum(s[i,n]*h*(i+1)*A[n] for i in range(I)) for n in range(N)])
M_base # kip-inch M_base
array([38554.77322731, -1041.01488801, 112.8312575 ])
= [h*(i+1) for i in range(I)]
H H
[144, 288, 432]
= np.array([[sum((H[j]-h*(i+1))*s[j,n]*A[n] for j in range(i,N)) for n in range(N)] for i in range(I)])
M_floor # kip-inch M_floor
array([[19277.38661365, -2082.02977602, 56.41562875],
[ 5165.36017531, -1041.01488801, 210.54599284],
[ 0. , 0. , 0. ]])
c) Peak modal response combination
For well-seperated modal frequencies, the SRSS method is employed.
def ro(rno):
return np.sqrt(sum(rn**2 for rn in rno))
Floor displacements
text
ro(Un.T)
array([0.57517246, 0.9947785 , 1.14908991])
Story shears
ro(Vin.T)
array([134.06636775, 98.27229508, 36.62099122])
Floor and base overturning moments
ro(M_base)
38568.98989471707
ro(M_floor)
array([19957.41918167, 2327.78005518, 217.97325126])