⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 柱配筋.bas

📁 钢筋混凝土框架结构设计计算源程序
💻 BAS
📖 第 1 页 / 共 3 页
字号:
End Sub
Sub 验算强柱弱梁()               '节点号        梁号 1,2,3...
    Dim i As Integer, j As Integer, N1 As Integer, Nb As Integer
       '梁号(从一开始)左     右    柱号(从一开始)  下      上
    Dim NbL As Integer, NbR As Integer, NcB As Integer, NcA As Integer
    '梁左端点号          梁右端点号
    Dim NgnbL As Integer, NgnbR As Integer
      '下柱          上柱            '下柱分配系数   上柱分配系数
    Dim Mc1 As Single, Mc2 As Single, C1 As Single, C2 As Single, s As Single
    Dim ∑Mc As Single, ∑Mb As Single
    Dim flag As Integer    '计算的柱配筋      所选钢筋
    Dim 柱端力 As 杆端内力, 柱筋As As Integer, St As String, Str1 As String
    Dim k As Integer, B As Single, H As Single
    
    flag = 是否加3列
    '关键是计算出节点处的梁柱单元号.
    '按节点的顺序走
    N1 = Kuashu + 2
    For i = 1 To Cengshu
        For j = 1 To Kuashu + 1
            With Form8.Grid2
                If j Mod (Kuashu + 1) = 1 Then '左端点计算
                    Nb = (i - 1) * Kuashu + 1
                    NbL = 0
                    NbR = Nb   '梁单元号 1,2,3...
                ElseIf j Mod (Kuashu + 1) = 0 Then '右端点计算
                    Nb = i * Kuashu
                    NbL = Nb  '1,2,3....
                    NbR = 0
                Else   '中间点
                    NbL = (i - 1) * Kuashu + j - 1
                    NbR = NbL + 1
                End If
                NcB = N1 - Kuashu - 1 '下柱单元号
                NcA = N1             '上柱单元号
                
                If NcA > 柱总数 Then NcA = 0
                ∑Mb = 梁∑Mu(NbL, NbR)
                ∑Mc = 柱∑Mc(NcB, NcA)
                If 1.1 * ∑Mb > ∑Mc Then
                    ∑Mc = 1.1 * ∑Mb
                    s = EIL(NcB) + EIL(NcA)
                    C1 = EIL(NcB) / s
                    C2 = EIL(NcA) / s
                    Mc1 = C1 * ∑Mc   '下柱分配的弯矩
                    Mc2 = C2 * ∑Mc   '上柱分配的弯矩
                    柱筋As = 柱端主筋(Mc1, MN(NcB, 2), NcB)
                    B = BH(NcB, 1)
                    H = BH(NcB, 2)
                    If Abs(柱筋As - 0.007 * B * H / 2) <= 1 Then
                        Str1 = "构造"
                    Else
                        Str1 = ""
                    End If
                    .TextMatrix(NcB, 1) = Str1 + Str(柱筋As * 2)
                     St = 选配筋组合(柱筋As * 2)
                     k = InStr(St, "=")
                    .TextMatrix(NcB, 2) = Left(St, k - 1)
                    .TextMatrix(NcB, 3) = Mid(St, k + 1)
                    If NcA <> 0 Then
                        柱筋As = 柱端主筋(Mc1, MN(NcA, 2), NcA)
                        B = BH(NcA, 1)
                        H = BH(NcA, 2)
                        If Abs(柱筋As - 0.007 * B * H / 2) <= 1 Then
                           Str1 = "构造"
                        Else
                           Str1 = ""
                        End If
                        .TextMatrix(NcA, 1) = Str1 + Str(柱筋As * 2)
                        St = 选配筋组合(柱筋As)
                        k = InStr(St, "=")
                        .TextMatrix(NcA, 2) = Left(St, k - 1)
                        .TextMatrix(NcA, 3) = Mid(St, k + 1)
                    End If
                End If
       End With
      N1 = N1 + 1
    Next j, i
  End Sub
Sub 验算轴压比()
    Dim i As Integer
    Dim Nmax As Single
    Dim 柱端力 As 杆端内力
    Dim B As Single, H As Single  'mm
    Dim fc As Single, fcm As Single   'N/mm^2
    Dim μn As Single   '轴压比
    Dim μ As Single
    Dim St As String
    
    
    Open Fname & "柱端力" For Random As #21 Len = Len(柱端力)
  
    With Form8.Grid2
        .TextMatrix(0, 4) = "轴压比"
        .ColWidth(4) = 800
        For i = 1 To 柱总数
            If 柱λ(i) <= 4 Then
                μn = 0.8 - 0.05
            Else
                μn = 0.8
            End If
            With 柱端力
                Get #21, i, 柱端力
                Nmax = .N1
                If Nmax < .N2 Then Nmax = .N2
                B = BH(i, 1)
                H = BH(i, 2)
                Call 弯曲抗压及轴心抗压强度设计值表(混凝土标号(i), fcm, fc)
                μ = Nmax * 1000 / (B * H * fc)
                μ = CInt(μ * 100) / 100
                If μ <= μn Then
                   St = "0" + Mid(Str(μ), 2)
                Else
                   St = "加大截面"
                End If
                Form8.Grid2.TextMatrix(i, 4) = St
            End With
        Next i
    End With
    Close #21
End Sub
Function 梁∑Mu(梁单元号1 As Integer, 梁单元号2 As Integer)
    '梁号(从一开始) 左      右
    Dim NbL As Integer, NbR As Integer
          '左M            右M
    Dim Mb1 As Single, Mb2 As Single
    Dim flag As Integer
    flag = 是否加3列

    NbL = 梁单元号1: NbR = 梁单元号2
    With Form8.Grid1
        If NbL = 0 And NbR <> 0 Then  '左端点计算
            Mb1 = 0
            Mb2 = As1As2_Mu(Val(.TextMatrix(NbR, 8 + flag)), _
                           Val(.TextMatrix(NbR, 11 + flag)), NbR)  '顺时针
            梁∑Mu = Mb2
            Mb2 = As1As2_Mu(Val(.TextMatrix(NbR, 11 + flag)), _
                           Val(.TextMatrix(NbR, 8 + flag)), NbR)  '逆时针
            If Mb2 > 梁∑Mu Then 梁∑Mu = Mb2
        ElseIf NbL <> 0 And NbR = 0 Then '右端点计算
            Mb2 = 0
            Mb1 = As1As2_Mu(Val(.TextMatrix(NbL, 18 + flag)), _
                       Val(.TextMatrix(NbL, 15 + flag)), NbL)  '顺时针
            梁∑Mu = Mb1
            Mb1 = As1As2_Mu(Val(.TextMatrix(NbL, 15 + flag)), _
                       Val(.TextMatrix(NbL, 18 + flag)), NbL)  '逆时针
            If 梁∑Mu < Mb1 Then 梁∑Mu = Mb1
        ElseIf NbL <> 0 And NbR <> 0 Then    '中间点
            Mb1 = As1As2_Mu(Val(.TextMatrix(NbL, 18 + flag)), _
                       Val(.TextMatrix(NbL, 15 + flag)), NbL)  '顺时针
            Mb2 = As1As2_Mu(Val(.TextMatrix(NbR, 8 + flag)), _
                       Val(.TextMatrix(NbR, 11 + flag)), NbR)  '顺时针
            梁∑Mu = Mb1 + Mb2
            Mb1 = As1As2_Mu(Val(.TextMatrix(NbL, 15 + flag)), _
                       Val(.TextMatrix(NbL, 18 + flag)), NbL)  '逆时针
            Mb2 = As1As2_Mu(Val(.TextMatrix(NbR, 11 + flag)), _
                       Val(.TextMatrix(NbR, 8 + flag)), NbR)  '逆时针
            If 梁∑Mu < Mb1 + Mb2 Then 梁∑Mu = Mb1 + Mb2
        End If
    End With
End Function
Function 柱∑Mc(单元号1 As Integer, 单元号2 As Integer)
    '柱号(从一开始)  下      上
    Dim Ne1 As Integer, Ne2 As Integer
    Dim fcmk1 As Single, fcmk2 As Single
    Ne1 = 单元号1: Ne2 = 单元号2
    If Ne1 <> 0 And Ne2 = 0 Then
        柱∑Mc = MN(Ne1, 1)
    ElseIf Ne1 <> 0 And Ne2 <> 0 Then
        柱∑Mc = MN(Ne1, 1) + MN(Ne2, 2)
    End If
End Function
Sub 显示柱中剪力及配筋()
    Dim i As Integer
    Dim 柱中V As Single
    Dim 柱端力 As 杆端内力

    With Form8.Grid2
        .ColWidth(7) = 1200
        .ColWidth(8) = 1700
        .TextMatrix(0, 7) = "柱中剪力(kN)"
        .TextMatrix(0, 8) = "柱中配箍筋"
        For i = 1 To 柱总数
            Open Fname & "柱端力" For Random As #21 Len = Len(柱端力)
            Get #21, i, 柱端力
            柱中V = Abs(柱端力.Q1)
            Close #21
            .TextMatrix(i, 7) = Format(柱中V, "###")
            .TextMatrix(i, 8) = 柱中配箍(柱中V, i)
        Next i
    End With
End Sub
Sub 显示柱端剪力及配筋()
    Dim i As Integer
    Dim 柱V As Single
    With Form8.Grid2
        .ColWidth(5) = 1200
        .ColWidth(6) = 1500
        .TextMatrix(0, 5) = "柱端剪力(kN)"
        .TextMatrix(0, 6) = "柱端加密区配箍筋"
        For i = 1 To 柱总数
            柱V = 柱配筋后可承载极限剪力(i)
           .TextMatrix(i, 5) = Format(柱V, "###")
           .TextMatrix(i, 6) = 柱端配箍(柱V, i)
        Next i
    End With
End Sub
Sub 显示柱纵筋()
    Dim i As Integer, j As Integer, k As Integer, n As Integer
    Dim B As Single, H As Single
    Dim Str1 As String, St As String
    Dim 抗震等级 As Single
    抗震等级 = 0.007
    With Form8.Grid2
'        .Width = 8175
'        .Height = 4095
        .Rows = 柱总数 + 1
'        If .Rows < 21 Then .Height = .RowHeight(1) * (.Rows + 2)
        .Cols = 9
        For i = 0 To .Cols - 1
            .ColAlignment(i) = flexAlignCenterCenter
        Next i
        .ColWidth(0) = 1500
        .ColWidth(1) = 1000
        For i = 2 To 3
          .ColWidth(i) = 1200
        Next i
        .TextMatrix(0, 0) = "柱位置"
        .TextMatrix(0, 1) = "计算面积"
        .TextMatrix(0, 2) = "选筋"
        .TextMatrix(0, 3) = "实配"
        n = 1
        For i = 1 To Cengshu
          For j = 1 To Kuashu + 1
              B = BH(n, 1)
              H = BH(n, 2)
              .TextMatrix(n, 0) = "第" + Str(i) + " " + "层" + "第" + Str(j) + " " + "号"
              .TextMatrix(n, 1) = 主筋面积(n) * 2
              If Abs(主筋面积(n) - 抗震等级 * B * H / 2) <= 1 Then
                 Str1 = "构造"
              Else
                 Str1 = ""
              End If
               .TextMatrix(n, 1) = Str1 + Str(主筋面积(n) * 2)
              St = 选配筋组合(主筋面积(n) * 2)
              k = InStr(St, "=")
             .TextMatrix(n, 2) = Left(St, k - 1)
             .TextMatrix(n, 3) = Mid(St, k + 1)
              n = n + 1
        Next j, i
    End With
End Sub
Function 柱中配箍(计算V As Single, 单元号 As Integer)
       '设计剪力     ' 极限剪力
    Dim Vc As Single, Vu As Single
    Dim B As Single, H As Single, H0 As Single, D1 As Single
    Dim fc As Single, fyv As Single, fcm As Single, fy As Single
    Dim γRe As Single
    Dim Asv As Integer, Asv1 As Integer
    Dim s As Integer, D As Integer
       '剪跨比      框架柱轴向力设计值,
    Dim λ As Single, n As Single
    Dim 钢筋直径D As Variant, 柱端力 As 杆端内力
    Dim Dmax As Integer '纵筋最大直径.
    Dim 肢数N As Integer, 肢数 As String   '钢筋肢数
       '计算配箍率    最小配箍率
    Dim ρsv As Single, ρmin As Single
    Dim Smax As Integer       '箍筋最大间距 10d
    Dim i As Integer, Ne As Integer '单元号
    Dim π As Single
    Dim fg As Integer, fg1 As Integer
    Dim St As String, Str1 As String
    
    Ne = 单元号
    钢筋直径D = Array("Φ8@", "Φ10@")
    B = BH(Ne, 1)
    H = BH(Ne, 2)
    Call 弯曲抗压及轴心抗压强度设计值表(混凝土标号(单元号), fcm, fc)
    Call 钢筋强度设计值表(grade(4), fy)
    D1 = 35
    H0 = H - D1
    fyv = fc
    λ = 柱λ(Ne)
    '规范
    If λ > 3 Then λ = 3
    
    Open Fname & "柱端力" For Random As #21 Len = Len(柱端力)
       Get #21, Ne, 柱端力
       n = Abs(柱端力.N1)  'N
    Close #21
    
    '规范
    If n > 0.3 * fc * B * H0 Then n = 0.3 * fc * B * H0
    Dmax = Val(Right(Form8.Grid2.TextMatrix(Ne, 2), 2))
    Smax = 10 * Dmax
    Smax = Int(Smax / 10) * 10
    ρmin = 柱端ρ(Ne) / 2
    
    γRe = 0.85   '斜截面抗剪
    Vc = 计算V   'N
    Vu = (1 / γRe) * 0.2 * fc * B * H0
    fg1 = 0
    If Vu < Vc Then
       fg = 0
       GoTo L
    Else
       fg = 1
    End If
    '抗剪公式 Vc<=(0.8/γRe)*((0.2/(λ+1.5))*fc*b*h0+1.25*fyv*(Asv/s)*h0
    '              +0.07)
    ρsv = (Vc * (γRe / 0.8) - 0.2 * fc * B * H0 / (λ + 1.5) - 0.007 * n) _
            / (1.25 * fyv * H0 * B)
    If ρsv <= 0 Then ρsv = ρmin: fg1 = 1
    π = 3.14
    '选筋
    肢数N = 2
k:
    For i = 0 To 1
       D = Val(Mid(钢筋直径D(i), 2))
       Asv1 = π * D ^ 2 / 4
       Asv = 肢数N * Asv1
       s = Asv / (ρsv * B)        'ρsv = Asv / (S * b)
       s = Int(s / 10) * 10    '将S调整为整数。
M:
      ρsv = Asv / (B * s)
      If s >= 50 And ρsv >= ρmin Then
          GoTo L
'       ElseIf s >= 50 And ρsv < ρmin Then  '调间距
'          s = s - 10
'          GoTo M
       End If
       If i = 1 And D = 10 And 肢数N = 4 Then GoTo L
       If i = 1 And D = 10 Then 肢数N = 4: GoTo k
    Next i
    
L:
    If fg = 0 Then
       柱中配箍 = "加大截面"
    Else
       If 肢数N = 2 Then 肢数 = "双肢"
       If 肢数N = 4 Then 肢数 = "四肢"
       If s >= Smax Then s = Smax
       If (肢数N = 2 And s = Smax And i = 0) Or fg1 = 1 Then
          Str1 = "构造 "
       Else
          Str1 = ""
       End If
       柱中配箍 = Str1 + 肢数 + 钢筋直径D(i) + Mid(Str(s), 2)    '+ "  " + Str(Asv / (b * S))
    End If
End Function

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -