-
Notifications
You must be signed in to change notification settings - Fork 1
/
estrutura_edificio_deslocamentos.py
39 lines (25 loc) · 1.17 KB
/
estrutura_edificio_deslocamentos.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import numpy as np
import numpy.linalg as la
import matplotlib.pyplot as plt
import pandas as pd
import Dynas as dyn
### ENTRADA DE DADOS ###
t = np.linspace(0,39.98,num=2000)
Mr = pd.read_excel('matriz de massa.xlsx').to_numpy()
Kr = pd.read_excel('matriz de rigidez.xlsx').to_numpy()
u0 = np.zeros((np.shape(Mr)[0],1))
v0 = np.zeros((np.shape(Mr)[0],1))
### ANÁLISE MODAL ###
fk, wk, Phi = dyn.modal_analysis(Kr, Mr, 4)
### MATRIZ DE AMORTECIMENTO ###
Cr = dyn.damping_matrix(wk[1], wk[3], 0.01, 0.01, Mr, Kr)
##################################################
### RESOLUÇÃO DO PROBLEMA PARA SISMO REAL ###
##################################################
F_real = pd.read_excel('forca_sismo_real.xlsx').to_numpy()
u_real, v_real, a_real = dyn.Newmark('real',Kr,Mr,Cr,F_real,u0,v0,t)
###################################################
### RESOLUÇÃO DO PROBLEMA PARA SISMO ARTIFICIAL ###
###################################################
F_artificial = pd.read_excel('forca_sismo_artificial.xlsx').to_numpy()
u_artificial, v_artificial, a_artificial = dyn.Newmark('artificial',Kr,Mr,Cr,F_artificial,u0,v0,t)