?? 梁配筋.bas
字號:
qt = 荷載.s + qt
'梁單元端部柱單元編號=梁端結(jié)點號-柱總數(shù)(跨數(shù)+1)
Lch = BH(NGN(i, 1) - Kuashu - 1, 2) / 1000 '梁左單元端柱截面高
Rch = BH(NGN(i, 2) - Kuashu - 1, 2) / 1000 '梁右單元端柱截面高
L = Length(i)
Ln = L - (Lch + Rch) / 2
Vgb = Ln * qq / 2 '均布荷載 加上T型荷載
Vgb = Vgb + (L - a) * qt - Lch ^ 2 * qt / (a * 8) - Rch ^ 2 * qt / (a * 8)
'計算Mu--V
'計算梁端Vmax 一級抗震
'第一種情況,彎矩逆時針.
拉筋As1 = Form8.Grid1.TextMatrix(j, 8 + flag) '梁左端鋼筋,上部受拉,下部受壓.
壓筋As2 = Form8.Grid1.TextMatrix(j, 11 + flag)
LM = As1As2_Mu(拉筋As1, 壓筋As2, j)
拉筋As1 = Form8.Grid1.TextMatrix(j, 18 + flag) '梁右端鋼筋,上部受壓,下部受拉.
壓筋As2 = Form8.Grid1.TextMatrix(j, 15 + flag)
RM = As1As2_Mu(拉筋As1, 壓筋As2, j)
VbmaxL = 系數(shù) * (LM + RM) / Ln + Vgb
VbmaxR = Abs(系數(shù) * (LM + RM) / Ln - Vgb)
'第二種情況,彎矩順時針.
拉筋As1 = Form8.Grid1.TextMatrix(j, 11 + flag) '梁左端鋼筋,上部受壓,下部受拉.
壓筋As2 = Form8.Grid1.TextMatrix(j, 8 + flag)
LM = As1As2_Mu(拉筋As1, 壓筋As2, j)
拉筋As1 = Form8.Grid1.TextMatrix(j, 15 + flag) '梁右端鋼筋,上部受拉,下部受壓.
壓筋As2 = Form8.Grid1.TextMatrix(j, 18 + flag)
RM = As1As2_Mu(拉筋As1, 壓筋As2, j)
VbL = Abs(系數(shù) * (LM + RM) / Ln - Vgb)
VbR = 系數(shù) * (LM + RM) / Ln + Vgb
If VbL > VbmaxL Then VbmaxL = VbL
If VbR > VbmaxR Then VbmaxR = VbR
Get #20, j, 梁端力
Put #17, j, 梁端力 '將20的內(nèi)力存入17中,以便以后計算跨中剪力配筋.
梁端力.Q1 = VbmaxL
梁端力.Q2 = VbmaxR
Put #20, j, 梁端力
Next i
Close #11, #12, #13, #14, #17, #20
End Sub
Function As1As2_Mu(拉筋As1 As Integer, 壓筋As2 As Integer, 單元號 As Integer)
Dim ξb As Single, αsmax As Single
Dim SD1 As Single, SD2 As Single
Dim B As Integer, H As Integer, H0 As Integer
Dim fy As Single, fcm As Single, fc As Single, M As Single
Dim X As Single '受壓區(qū)高度
B = BH(單元號, 1)
H = BH(單元號, 2)
Call 彎曲抗壓及軸心抗壓強度設(shè)計值表(混凝土標號(單元號), fcm, fc)
Call 鋼筋強度設(shè)計值表(grade(3), fy)
ξb = 0.544
αsmax = 0.396
SD1 = 35 'mm
SD2 = 35
H0 = H - SD1
X = fy * ((拉筋As1 - 壓筋As2) / (B * fcm))
If X < 2 * SD2 Then '壓筋不屈服
M = 拉筋As1 * fy * (H0 - SD2)
ElseIf ξb * H0 >= X And X >= 2 * SD2 Then
M = fcm * B * X * (H0 - X / 2) + fy * 壓筋As2 * (H0 - SD2)
ElseIf X > ξb * H0 Then '破壞始自受壓區(qū)
M = 壓筋As2 * fy * (H0 - SD2) + αsmax * fcm * B * H0 ^ 2
End If
As1As2_Mu = M / 1000 ' 換算成 N*m
End Function
Sub 顯示梁跨中配箍筋()
Dim 梁端力 As 桿端內(nèi)力
Dim i As Integer, j As Integer
Dim flag As Integer
Open Fname & "跨中Q" For Random As #17 Len = Len(梁端力)
flag = 是否加3列
With Form8.Grid1
.Cols = 24 + flag
.ColWidth(23 + flag) = 1700
.TextMatrix(0, 23 + flag) = "跨中配箍筋"
For i = 柱總數(shù) + 1 To Ncell
j = i - 柱總數(shù)
Get #17, j, 梁端力
If Abs(梁端力.Q1) < Abs(梁端力.Q2) Then 梁端力.Q1 = 梁端力.Q2
.TextMatrix(j, 23 + flag) = 梁跨中配箍筋(Abs(梁端力.Q1), j)
Next i
End With
Close #17
End Sub
Sub 顯示梁端主筋()
Dim i As Integer, j As Integer
Dim n As Integer, flag As Integer
Dim Str1 As String, Str2 As String
Dim 受拉筋 As Integer, 受壓筋 As Integer
flag = 是否加3列
Call 讀梁M
With Form8.Grid1
'梁左端
For i = 6 + flag To 11 + flag
.ColWidth(i) = 1200
Next i
.TextMatrix(0, 6 + flag) = "計算As"
.TextMatrix(0, 7 + flag) = "選筋"
.TextMatrix(0, 8 + flag) = "實配As"
.TextMatrix(0, 9 + flag) = "計算As'"
.TextMatrix(0, 10 + flag) = "選筋"
.TextMatrix(0, 11 + flag) = "實配As'"
For i = 柱總數(shù) + 1 To Ncell
j = i - 柱總數(shù)
Debug.Print 桿端力(i).M1
Debug.Print
Str1 = 梁端主筋(桿端力(j).M1, i, Val(.TextMatrix(j, 4)))
受拉筋 = Val(Str1)
.TextMatrix(j, 6 + flag) = 受拉筋
Str2 = 選配筋組合(受拉筋)
n = InStr(Str2, "=")
.TextMatrix(j, 7 + flag) = Left(Str2, n - 1)
.TextMatrix(j, 8 + flag) = Mid(Str2, n + 1)
n = InStr(Str1, "|")
受壓筋 = Val(Mid(Str1, n + 1))
.TextMatrix(j, 9 + flag) = 受壓筋
If Abs(受壓筋 - Val(.TextMatrix(j, 4))) <= 0.05 * 受壓筋 Then
.TextMatrix(j, 10 + flag) = .TextMatrix(j, 3)
.TextMatrix(j, 11 + flag) = .TextMatrix(j, 4)
Else
Str2 = 選配筋組合(受壓筋)
n = InStr(Str2, "=")
.TextMatrix(j, 10 + flag) = Left(Str2, n - 1)
.TextMatrix(j, 11 + flag) = Mid(Str2, n + 1)
End If
Next i
'梁右端
For i = 13 + flag To 18 + flag
.ColWidth(i) = 1200
Next i
.TextMatrix(0, 13 + flag) = "計算As"
.TextMatrix(0, 14 + flag) = "選筋"
.TextMatrix(0, 15 + flag) = "實配As"
.TextMatrix(0, 16 + flag) = "計算As'"
.TextMatrix(0, 17 + flag) = "選筋"
.TextMatrix(0, 18 + flag) = "實配As'"
For i = 柱總數(shù) + 1 To Ncell
j = i - 柱總數(shù)
Str1 = 梁端主筋(桿端力(i).M2, i, Val(.TextMatrix(j, 4)))
受拉筋 = Val(Str1)
.TextMatrix(j, 13 + flag) = 受拉筋
Str2 = 選配筋組合(受拉筋)
n = InStr(Str2, "=")
.TextMatrix(j, 14 + flag) = Left(Str2, n - 1)
.TextMatrix(j, 15 + flag) = Mid(Str2, n + 1)
n = InStr(Str1, "|")
受壓筋 = Val(Mid(Str1, n + 1))
.TextMatrix(j, 16 + flag) = 受壓筋
If Abs(受壓筋 - Val(.TextMatrix(j, 4))) <= 0.05 * 受壓筋 Then
.TextMatrix(j, 17 + flag) = .TextMatrix(j, 3)
.TextMatrix(j, 18 + flag) = .TextMatrix(j, 4)
Else
Str2 = 選配筋組合(受壓筋)
n = InStr(Str2, "=")
.TextMatrix(j, 17 + flag) = Left(Str2, n - 1)
.TextMatrix(j, 18 + flag) = Mid(Str2, n + 1)
End If
Next i
End With
End Sub
Sub 顯示梁端最不利M()
Dim i As Integer, j As Integer
Dim a As Single, flag As Integer
flag = 是否加3列
Call 讀梁M
With Form8.Grid1
.TextMatrix(0, 5 + flag) = "梁左端Mmax(KN*m)"
.TextMatrix(0, 12 + flag) = "梁右端Mmax(KN*m)"
.ColWidth(5 + flag) = 1500
.ColWidth(12 + flag) = 1500
For i = 柱總數(shù) + 1 To Ncell
j = i - 柱總數(shù)
.TextMatrix(j, 5 + flag) = Format(桿端力(j).M1, "###")
.TextMatrix(j, 12 + flag) = Format(桿端力(j).M2, "###")
Next i
End With
End Sub
Sub 顯示梁端最不利Q及配箍筋()
Dim i As Integer, j As Integer
Dim flag As Integer
Dim a As Integer
Dim 梁端力 As 桿端內(nèi)力
Open Fname & "梁不利" For Random As #20 Len = Len(梁端力)
flag = 是否加3列
With Form8.Grid1
.TextMatrix(0, 19 + flag) = "左端Qmax(kN)"
.TextMatrix(0, 20 + flag) = "左端加密區(qū)配箍筋"
.ColWidth(19 + flag) = 1200
.ColWidth(20 + flag) = 1700
.TextMatrix(0, 21 + flag) = "右端Qmax(kN)"
.TextMatrix(0, 22 + flag) = "右端加密區(qū)配箍筋"
.ColWidth(21 + flag) = 1200
.ColWidth(22 + flag) = 1700
End With
a = 1000
With Form8.Grid1
For i = 柱總數(shù) + 1 To Ncell
j = i - 柱總數(shù)
Get #20, j, 梁端力
.TextMatrix(j, 19 + flag) = Format(Abs(梁端力.Q1) / a, "###")
.TextMatrix(j, 20 + flag) = 梁端斜截面配箍(Abs(梁端力.Q1), i)
.TextMatrix(j, 21 + flag) = Format(Abs(梁端力.Q2) / a, "###")
.TextMatrix(j, 22 + flag) = 梁端斜截面配箍(Abs(梁端力.Q2), i)
Next i
End With
Close #20
End Sub
Sub 顯示跨中配筋()
Dim i As Integer, j As Integer, St1 As String, St2 As String
Dim 受拉筋 As Integer, 受壓筋 As Integer
Dim n As Integer, 最小As As Integer
Dim B As Single, H As Single
Dim St As String
是否加3列 = 0
Call 讀梁M
With Form8.Grid1
.ColWidth(2) = 1000
.ColWidth(3) = 1200
For i = 4 To 7
.ColWidth(i) = 800
Next i
.TextMatrix(0, 2) = "計算As"
.TextMatrix(0, 3) = "選筋"
.TextMatrix(0, 4) = "實配As"
.TextMatrix(0, 5) = "計算As'"
.TextMatrix(0, 6) = "選筋"
.TextMatrix(0, 7) = "實配As'"
For i = 柱總數(shù) + 1 To Ncell
j = i - 柱總數(shù)
B = BH(i, 1)
H = BH(i, 2)
最小As = 0.0025 * B * H
St1 = 梁跨中主筋(桿端力(j).N1, i)
受拉筋 = Val(St1) '計算As
If Abs(最小As - 受拉筋) < 1 Then
St = "構(gòu)造"
Else
St = ""
End If
.TextMatrix(j, 2) = St + Str(受拉筋)
St2 = 選配筋組合(受拉筋)
n = InStr(St2, "=")
.TextMatrix(j, 3) = Left(St2, n - 1)
.TextMatrix(j, 4) = Mid(St2, n + 1)
n = InStr(St1, "|")
受壓筋 = Val(Mid(St1, n + 1)) '計算As'
If 受壓筋 > 0 Then
.TextMatrix(j, 5) = 受壓筋
St2 = 選配筋組合(受壓筋)
n = InStr(St2, "=")
.TextMatrix(j, 6) = Left(St2, n - 1)
.TextMatrix(j, 7) = Mid(St2, n + 1)
是否加3列 = 3
Else
.TextMatrix(j, 5) = ""
.TextMatrix(j, 6) = ""
.TextMatrix(j, 7) = ""
End If
Next i
End With
End Sub
Sub 顯示跨中最不利M()
Dim i As Integer, j As Integer, a As Integer, n As Integer
Call 讀梁M
With Form8.Grid1
.Rows = Ncell - 柱總數(shù) + 1
.Cols = 29
For i = 0 To .Cols - 1
.ColAlignment(i) = flexAlignCenterCenter
Next i
For i = 0 To 1
.ColWidth(i) = 1500
Next i
.TextMatrix(0, 0) = "梁位置"
.TextMatrix(0, 1) = "跨中Mmax(KN*m)"
n = 1
For i = 1 To Cengshu
For j = 1 To Kuashu
.TextMatrix(n, 0) = "第" + Str(i) + " " + "層" + "第" + Str(j) + " " + "跨"
.TextMatrix(n, 1) = Format(桿端力(n + 柱總數(shù)).N1, "###")
n = n + 1
Next j, i
End With
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -