Viga en L Marco Bayona

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

In [ ]:

from math import asin, sqrt, pow , ceil , floor


import sympy as sym
import numpy as np
import matplotlib.pyplot as plt
m = 1. # define basic units -- output units
kN = 1. # define basic units -- output units
sec = 1. # define basic units -- output units
mm = m/1000. # define engineering units
cm = m/100.
N = kN/1000.
MPa = N/mm**2
GPa = MPa*1000
m2 = m*m # m^2
m3 = m*m*m # m^3
m4 = m*m*m*m # m^4
inch = cm*2.54
ft = 12.*inch
PI = 2*asin(1.0) # define constants
g = 9.81*m/pow(sec,2) # gravitational acceleration
Ubig = 1.e10 # a really large number
Usmall = 1/Ubig # a really small number
kip = 4.448*kN
ksi = kip/pow(inch,2)
psi = ksi/1000.
lbf = psi*inch*inch # pounds force
pcf = lbf/pow(ft,3) # pounds per cubic foot
psf = lbf/pow(ft,3) # pounds per square foot
in2 = inch*inch # inch^2
in4 = inch*inch*inch*inch # inch^4
pi = 3.14159265359
GConc = 24.*kN/pow(m,3) # Peso especifico del concreto

fc = float (input ("resistencia del concreto: "))


fc=fc*MPa
fy = float (input ("resistencia del acero: "))
fy=fy*MPa
db = float (input ("diametro de barra: "))
db = db*inch
Es = float (input ("modulo elasticidad del acero: "))
Es = Es*GPa
de = float (input ("diametro del estribo en decimales: "))
de = de*inch
rec = float (input ("recubrimiento: "))
rec = rec*cm
ecu =float (input ("deformacion unitaria ultima: "))
#valores columna L
h1 = float (input ("altura 1: "))
h1=h1*mm
h2 = float (input ("altura 2: "))
h2=h2*mm
b1 = float (input ("base 1: "))
b1=b1*mm
b2 = float (input ("base 2: "))
b2=b2*mm
nbh1 = float (input ("numero de barras en H1: "))
nbh2 = float (input ("numero de barras en H2: "))
nbb1 = float (input ("numero de barras en B1: "))
nbb2 = float (input ("numero de barras en B2: "))

#centroide
y = ((b1*h2*h2/2))+(b2*(h1-h2)*(h2+(h1-h2)/2))/(b2*(h1-h2)+b1*h2)
y1 = h1-y
def fi(c):
et=ecu*(dt-c)/c
if et>=0.005:
fi = 0.9
elif et<=0.002:
fi = 0.65
else:
fi = np.interp(et,[0.002,0.005],[0.65,0.9])
return fi
def fs(d,c):
es = ecu*(c-d)/c
es = ecu*(c-d)/c
if es>0:
fs = min(Es*es, fy)-0.85*fc
else:
fs = max(Es*es,-fy)
return fs
if fc<=28*MPa:
beta1 = 0.85
else:
beta1 = max(0.85-0.05*(fc-28*MPa)/(7*MPa),0.65)
Ab = (pi/4)*db**2
#areas de barras
As = np.zeros(nbh1+1)
Ast = 0
for f in range (1 , nbh1+1):
if f==nbh1:
As[f] = nbb1*Ab
elif f==1:
As[f] = nbb2*Ab
elif f==1+(nbh1-nbh2):
As[f] = ((nbb1-nbb2)+2)*Ab
else:
As[f] = 2*Ab
Ast = As[f]+Ast

dp = rec+de+db/2
ds = (h1-2*dp)/(nbh1-1)
d = np.zeros(nbh1+1)
#espacios entre barras de acero
for f in range (1, nbh1+1):
if f==1:
d[f] = dp
else:
d[f] = d[f-1]+ds
dt = d[nbh1]
Ag = h2*(b1-b2)+h1*b2
fic = 0.65
fiPn_max = 0.75*fic*(0.85*fc*(Ag-Ast)+fy*Ast)
ind = 1
cv = np.arange(h1/100,1.6*h1,h1/100)
ncv = np.size(cv)
fiPn = np.zeros(ncv+1)
fiMn = np.zeros(ncv+1)
for c in cv:
fta = 0
mfta = 0
fia = fi(c)
if c<=h1-h2:
A_c = c*b2
elif c<=h2-dp and c>h1-h2:
A_c = b1*c-(h1-h2)*(b1-b2)
for f in range (1, nbh1+1):
fsa = fs(d[f],c)
fta = fsa*As[f] + fta
mfta = fsa*As[f]*(y1-d[f])+mfta
cc = 0.85*fc*A_c*beta1
fiPn[ind] = min(fia*(cc+fta),fiPn_max)
fiMn[ind] = fia*(cc*(y1-beta1*c/2)+mfta)
ind = ind+1
fig, ax = plt.subplots()
ax.plot(fiMn[1:ncv]/(kN*m),fiPn[1:ncv]/kN,color="blue",linewidth=5)
ax.set(xlabel='fiMn(kN*m)',ylabel='fiPn(kN)',title='Grafica de Interaccion')
ax.grid(True)
plt.show()

You might also like