'Tinh cot thep cot doi xung
Function TamThang(macBT, macThep, ByVal N1, ByVal M, ByVal b, ByVal h, ByVal a0, ByVal l, ByVal yb2, ByVal yb3) ' Don vi M=KN.m b,h=m
Dim Rb1, am, ovga, CxiR, Gama As Double
Dim Rs1, Rsc1, Cxi, Eb1, eta, lamda, teta, Ncr As Double
Dim x, x1, ho, i, za, e1, ea, e0, exp0 As Double
Dim a, thamso As Double
Rb1 = Rb(macBT) * yb2 * yb3
Rb2 = Rb(macBT)
Rs1 = Rs(macThep)
Eb1 = Eb(macBT)
Rsc1 = Rsc(macThep)
b1 = b * 1000
h1 = h * 1000
a01 = a0 * 1000
l1 = l * 1000
ovga = 0.85 - (0.008 * Rb2)
CxiR = ovga / (1 + (Rs1 / 400) * (1 - (ovga / 1.1)))
M1 = Abs(M) * 1000000
N1 = Abs(N1) * 1000
h01 = h1 - a01
za = h01 - a01
e1 = (M1 / N1)
If (l1 / 600) >= (h1 / 30) Then
ea = l1 / 600
Else
ea = h1 / 30
End If
If e1 <= ea Then
e0 = ea
Else
e0 = e1
End If
lamda = l1 / h1
If lamda <= 8 Then
eta = 1
Else
i = (b1 * h1 * h1 * h1) / 12
teta = (0.2 * e0 + 1.05 * h1) / (1.5 * e0 + h1)
Ncr = (2.5 * teta * Eb1 * i) / (l1 * l1)
eta = 1 / (1 - (N1 / Ncr))
End If
e = eta * e0 + 0.5 * h1 - a01
x1 = N1 / (Rb1 * b1)
If x1 <= CxiR * h01 Then
If x1 >= (2 * a01) Then
TamThang = (N1 * (e + 0.5 * x1 - h01)) / (Rsc1 * za)
Else
TamThang = (N1 * (e - za)) / (Rs1 * za)
End If
Else
exp0 = e0 / h01
x1 = h01 * (CxiR + (1 - CxiR) / (1 + 50 * exp0 * exp0))
TamThang = ((N1 * e) - (Rb1 * b1 * x1) * (h01 - 0.5 * x1)) / (Rsc1 * za)
End If
If TamThang <= 0 Then
TamThang = "cau ta0"
Else
TamThang = Round(TamThang / 100, 2)
End If
End Function
'Tinh cot thep cot lech tam xiem
Function TamXien(macBT, macThep, ByVal N1, ByVal Mx, ByVal My, ByVal cx, ByVal cy, ByVal a0, ByVal l, ByVal yb2, ByVal yb3) ' Don vi M=KN.m b,h=m
Dim Rb1, am, ovga, CxiR, Gama As Double
Dim Rs1, M, N, Rsc1, Cxi, Eb1, etax, etay, lamdax, lamday, tetax, tetay, Ncrx, Ncry As Double
Dim x, x1, h0, m0, l1, Ix, Iy, za, e1x, e1y, eax, eay, e0x, e0y, exp0 As Double
Dim M1x, M1y As Double
Rb1 = Rb(macBT) * yb2 * yb3
Rb2 = Rb(macBT)
Rs1 = Rs(macThep)
Eb1 = Eb(macBT)
Rsc1 = Rsc(macThep)
c1x = cx * 1000
c1y = cy * 1000
a01 = a0 * 1000
l1 = l * 1000
Mx = Abs(Mx) * 1000000
My = Abs(My) * 1000000
N1 = Abs(N1) * 1000
e1x = (Mx / N1)
If (l1 / 600) >= (cx1 / 30) Then
eax = l1 / 600
Else
eax = cx1 / 30
End If
If e1x <= eax Then
e0x = eax
Else
e0x = e1x
End If
lamdax = l1 / c1x
If lamdax <= 8 Then
etax = 1
Else
Ix = (c1y * c1x * c1x * c1x) / 12
tetax = (0.2 * e0x + 1.05 * c1x) / (1.5 * e0x + c1x)
Ncrx = (2.5 * tetax * Eb1 * Ix) / (l1 * l1)
etax = 1 / (1 - (N1 / Ncrx))
End If
M1x = N1 * etax * e0x
e1y = (My / N1)
If (l1 / 600) >= (c1y / 30) Then
eay = l1 / 600
Else
eay = c1y / 30
End If
If e1y <= eay Then
e0y = eay
Else
e0y = e1y
End If
lamday = l1 / c1y
If lamday <= 8 Then
etay = 1
Else
Iy = (c1x * c1y * c1y * c1y) / 12
tetay = (0.2 * e0y + 1.05 * c1y) / (1.5 * e0y + c1y)
Ncry = (2.5 * tetay * Eb1 * Iy) / (l1 * l1)
etay = 1 / (1 - (N1 / Ncry))
End If
M1y = N1 * etay * e0y
If M1x / c1x > M1y / c1y Then
h = c1x
b = c1y
M1 = M1x
M2 = M1y
Else
h = c1y
b = c1x
M1 = M1y
M2 = M1x
End If
h0 = h - a01
za = h0 - a01
ovga = 0.85 - (0.008 * Rb2)
CxiR = ovga / (1 + (Rs1 / 400) * (1 - (ovga / 1.1)))
x1 = N1 / (Rb1 * b)
If x1 <= h0 Then
m0 = 1 - ((0.6 * x1) / h0)
Else
m0 = 0.4
End If
M = M1 + m0 * M2 * (h / b)
e0 = M / N1
e = e0 + 0.5 * h - a01
If x1 <= CxiR * h0 Then
If x1 >= (2 * a01) Then
TamXien = (N1 * (e + 0.5 * x1 - h0)) / (Rsc1 * za)
Else
TamXien = (N1 * (e - za)) / (Rs1 * za)
End If
Else
exp0 = e0 / h0
x = h0 * (CxiR + (1 - CxiR) / (1 + 50 * exp0 * exp0))
TamXien = ((N1 * e) - (Rb1 * b * x) * (h0 - 0.5 * x)) / (Rsc1 * za)
End If
If TamXien <= 0 Then
TamXien = 0.6 / 100 * cx * 100 * cy * 100
Else
TamXien = Round(2.5 * TamXien / 100, 2)
End If
End Function