-
Notifications
You must be signed in to change notification settings - Fork 0
/
flexvigas.py
79 lines (54 loc) · 1.56 KB
/
flexvigas.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
import math
def flexion(h,b,rec,fc,fy,mu,pu):
d = (h-rec)*10
h = h*10
b = b*10
d_p = rec*10
if mu <= 0.01:
return 0, 0, 0
mu = mu*9800000
pu = pu*9800
xi_lim = 0.003/(0.003+0.004)
b1 = 0.85
if (fc < 30):
b1 = 0.85
elif (fc >= 30 and fc <= 55):
b1 = 0.85-0.008*(fc-30)
else:
b1 = 0.65
nu_lim = b1 * xi_lim * ( 1 - b1 * xi_lim/2)
meu = mu + pu * (d - h / 2)
uc = 0.85 * fc * b * d
if (fy == 420):
aux1 = 0.25
aux2 = 0.233
elif (fy == 280):
aux1 = 0.208; aux2 = 0.345
else:
return("error en el acero")
compresion = False; xi = 0; xi2 = xi_lim
while True:
xi = xi2
fi = min(max(aux1/xi + aux2,0.65),0.9)
nu = meu / (fi*uc*d)
if (nu > nu_lim):
compresion = True
break
else:
xi2 = (1 - math.sqrt(1-2*nu))/b1
if (xi - xi2)<=0.01:
break
if compresion:
delta_p = d_p/d
w_p = (nu-nu_lim)/(1-delta_p)
v = pu / (fi * uc)
w = b1 * xi + w_p - v
else:
w_p = 0
v = pu / (fi * uc)
w = 1 -math.sqrt(1 - 2 * nu) - v
as1 = w * uc / fy
as2 = w_p * uc / fy
ro = as1 / (b * d)
rob = (0.003 / 0.005) * (0.85 * b1 * fc / fy)
return round(as1/100,1), round(as2/100,1), round(ro / rob * 100, 1)