Вы находитесь на странице: 1из 3

Private Sub cmddesign_Click()

bf = Sheet3.Range("B1").Value 'bf=width of flange


tf = Sheet3.Range("B2").Value 'tf =thickness of flange
hw = Sheet3.Range("B3").Value 'hw =height of web
tw = Sheet3.Range("B4").Value 'tw=thickness of web
fyf = Sheet3.Range("B5").Value 'fyf=yeild stregnth of fange
fyw = Sheet3.Range("B6").Value 'fyw=yield stregnth of web
pmo = Sheet3.Range("B8").Value 'pmo=partial safety fator
pm1 = Sheet3.Range("B9").Value 'pm1=partial safety factor
hwtf = Sheet3.Range("B10").Value 'hwtf=sum of hw and tf
MED = Sheet3.Range("D1").Value 'MED=Design bending moment due to load
VED = Sheet3.Range("D2").Value 'VED=Design shear resistance
e = Sheet3.Range("D3").Value 'e=Modulus of elasticity
slr = Sheet3.Range("F2").Value 'slr=ratio of hw to tw
edd = Sheet3.Range("B11").Value 'edd=end distance from stiffner to end plates
aep = Sheet3.Range("B16").Value 'aep= area of end plates
raep = Sheet3.Range("B17").Value 'raep=equired area of end plates
epc = Sheet3.Range("F3").Value 'epc=end plates classification
ep = Sheet3.Range("F4").Value 'ep= epsilon for end plates (web)
bst = Sheet3.Range("B14").Value 'bst = width of bearing stiffners
tst = Sheet3.Range("B15").Value 'tst = thickness of bearing stiffners
k = 0.55 'Elastic moment resistance utilized
af = (bf * tf) 'af=area of flange
aw = (hw * tw) 'aw=area of web
n = Sheet3.Range("D5").Value 'n=ita value depands on grade of steel
'End plates calculation
If aep < raep Then
MsgBox ("Change End Plates Dimensions")
End If
If epc <= (9 * ep) Then
epdm.Value = "Class 1"
Else
If epc <= (10 * ep) Then
epdm.Value = "Class 2"
Else
If epc <= (14 * ep) Then
epdm.Value = "Class 3"
Else
epdm.Value = "Class 4"
MsgBox ("Change the End Plates dimensions")
epdm.BackColor = vbRed
End If
End If
End If
'Bending resistance
Myrd = ((af * (hwtf) * fyf) / pmo) * (10 ^ -6)
'Check for flange Buckling
a = (k * e * ((aw / af) ^ (0.5))) / fyf
If Myrd < MED And slr >= a Then
MsgBox ("Change Flange Dimesions")
UserForm7.Hide
UserForm4.Show
Else
bmrs = Round(Myrd, 2)
End If
'Shear resistance
lemdaw = hw / (86.4 * tw * ep)
If lemdaw < (0.83 / n) Then
xw = n
Else
If (0.83 / n) <= lemdaw And lemdaw < 1.08 Then
xw = (0.83 / lemdaw)
Else
If lemdaw >= 1.08 Then
xw = (1.37 / (0.7 + lemdaw))
End If
End If
End If
'shear contribution by web
Vbwrd = ((xw * fyw * hw * tw) / (1.732 * pm1)) * (10 ^ -3)
'shear contribution by web
a = 1400
c = a * (0.25 + ((1.6 * bf * tf * tf * fyf) / (tw * hw * hw * fyw)))
b = MED / Myrd
Vbfrd = (bf * tf * tf * fyf / c * pm1) * (1 - (b ^ 2)) * (10 ^ -3)
VRd = Round((Vbwrd + Vbfrd), 2)
If VRd < VED Then
UserForm7.Hide
UserForm9.Show
Else
sfrs.Value = VRd
'Design of Bearing stiffners
ast = ((30 * ep * tw) + tst) * tw + (2 * bst * tst)
sigma = VED / ast
If sigma <= (fyf / pmo) Then
lc = 0.75 * hw
Ist = 2 * (((tst * bst * bst * bst) / 12) + (bst * tst * ((bst - tw) / 2)))
r = Sqr(Ist / ast)
lemda = lc / r
lemda1 = 93.9 * ep
lemdabar = (lemda / lemda1)
If lemdabar < (0.83 / n) Then
xw1 = n
Else
If (0.83 / n) <= lemdabar And lemdabar < 1.08 Then
xw1 = (0.83 / lemdabar)
Else
If lemdabar >= 1.08 Then
xw1 = (1.37 / (0.7 + lemdabar))
End If
End If
End If
End If

NbRd = ((xw1 * ast * fyf) / (pm1)) * (10 ^ -3)


If NbRd < VED Then
MsgBox ("Change Bearing Stiffners Dimensions")
Else
bdrs.Value = Round((NbRd), 2)
End If
End If

End Sub

Private Sub cmdsave_Click()


Sheet3.Cells(12, 2).Value = txtwep
Sheet3.Cells(13, 2).Value = txttep
Sheet3.Cells(14, 2).Value = txtwbs
Sheet3.Cells(15, 2).Value = txttbs
End Sub