📄 form1.frm
字号:
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 2160
TabIndex = 16
Top = 1560
Width = 975
End
Begin VB.Label Label8
AutoSize = -1 'True
Caption = "ζb的值为:"
Height = 180
Left = 240
TabIndex = 22
Top = 1200
Width = 990
End
Begin VB.Label Label7
AutoSize = -1 'True
Caption = "有效墙前水深比ζ的值为:"
Height = 180
Left = 240
TabIndex = 20
Top = 780
Width = 2160
End
Begin VB.Label Label9
AutoSize = -1 'True
Caption = "波坦L/H为:"
Height = 180
Left = 240
TabIndex = 18
Top = 360
Width = 990
End
End
Begin VB.Frame Frame2
Caption = "输入相关参数"
Height = 1935
Left = 3960
TabIndex = 8
Top = 120
Width = 3255
Begin VB.TextBox Text12
Height = 270
Left = 2400
TabIndex = 37
Top = 1440
Width = 735
End
Begin VB.TextBox Text11
Height = 270
Left = 2400
TabIndex = 13
Text = "2.8"
Top = 1040
Width = 735
End
Begin VB.TextBox Text4
Height = 270
Left = 2400
TabIndex = 11
Text = "-0.4"
Top = 640
Width = 735
End
Begin VB.TextBox Text3
Height = 270
Left = 2400
TabIndex = 9
Text = "3.9"
Top = 240
Width = 735
End
Begin VB.Label Label20
AutoSize = -1 'True
Caption = "输入折减系数μ0 (0.6-1):"
Height = 180
Left = 120
TabIndex = 36
Top = 1560
Width = 2250
End
Begin VB.Label Label19
AutoSize = -1 'True
Caption = "输入胸墙底面的宽度b(m):"
Height = 180
Left = 120
TabIndex = 14
Top = 1120
Width = 2160
End
Begin VB.Label Label6
AutoSize = -1 'True
Caption = "输入胸墙前水深d1(m):"
Height = 180
Left = 120
TabIndex = 12
Top = 680
Width = 1890
End
Begin VB.Label Label5
AutoSize = -1 'True
Caption = "输入计算波高H(m):"
Height = 180
Left = 120
TabIndex = 10
Top = 240
Width = 1620
End
End
Begin VB.Frame Frame1
Caption = "计算波长L:"
Height = 1935
Left = 120
TabIndex = 0
Top = 120
Width = 3255
Begin VB.TextBox Text1
Height = 270
Left = 2160
TabIndex = 3
Text = "7"
Top = 360
Width = 855
End
Begin VB.TextBox Text2
Height = 270
Left = 2160
TabIndex = 2
Text = "6.8"
Top = 720
Width = 855
End
Begin VB.CommandButton Command1
BackColor = &H00FF0000&
Caption = "计算波长"
BeginProperty Font
Name = "宋体"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 270
Left = 2040
TabIndex = 1
Top = 1440
Width = 975
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "输入水深d(m):"
Height = 180
Left = 240
TabIndex = 7
Top = 480
Width = 1260
End
Begin VB.Label Label2
AutoSize = -1 'True
Caption = "输入周期T(s):"
Height = 180
Left = 240
TabIndex = 6
Top = 840
Width = 1260
End
Begin VB.Label Label3
AutoSize = -1 'True
Caption = "所得波长L(m):"
Height = 180
Left = 240
TabIndex = 5
Top = 1200
Width = 1260
End
Begin VB.Label Label4
BorderStyle = 1 'Fixed Single
Height = 270
Left = 2160
TabIndex = 4
Top = 1080
Width = 855
End
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const PI As Single = 3.1415926
Const G As Single = 9.8
Dim D, T, L, B As Single
Dim D1, H, R, Z, DD, U As Single
Dim ζ, ζb, KP, KZ As Single
Dim P, PZ, PU As Single
Private Sub Command1_Click()
Dim Temp, K As Single
D = Val(Text1.Text)
T = Val(Text2.Text)
L = 10
Do
K = 2 * PI / L
Temp = G / 2 / PI * T ^ 2 * (Exp(K * D) - Exp(-K * D)) / (Exp(K * D) + Exp(-K * D))
L = L + (Temp - L) / 2
Loop Until Abs(L - Temp) < 0.01
Label4.Caption = Format(Str(L), "###.#")
End Sub
Private Sub Command2_Click()
H = Val(Text3.Text)
D1 = Val(Text4.Text)
D = Val(Text1.Text)
L = Val(Label4.Caption)
ζ = (D1 / D) * (D / H) ^ (2 * PI * H / L)
ζb = 3.29 * (H / L + 0.043)
Text5.Text = Format(Str(ζ), "##.###")
Text6.Text = Format(Str(ζb), "#.###")
Text7.Text = Format((Str(L / H)), "##.##")
End Sub
Private Sub Command3_Click()
U = Val(Text12.Text)
B = Val(Text11.Text)
R = 10.25
H = Val(Text3.Text)
D = Val(Text1.Text)
L = Val(Label4.Caption)
K = 2 * PI / L
KP = Val(Text8.Text)
KZ = Val(Text9.Text)
DD = H * ((Exp(K * D) - Exp(-K * D)) / (Exp(K * D) + Exp(-K * D))) * KZ
Text10.Text = Format(Val(DD), "##.##")
P = 0.24 * R * H * KP
Label14.Caption = Format(Str(P), "####.##")
PZ = U * P * DD
Label16.Caption = Format(Str(PZ), "####.##")
PU = 0.7 * U * B * P / 2
Label18.Caption = Format(Str(PU), "####.##")
End Sub
Private Sub Command4_Click()
Text1.Text = "": Text2.Text = "": Text3.Text = "": Text4.Text = "": Text5.Text = ""
Text6.Text = "": Text7.Text = "": Text8.Text = "": Text9.Text = "": Text10.Text = ""
Text11.Text = "": Text12.Text = "": Text13.Text = "": Text14.Text = "": Text15.Text = ""
Text23.Text = "": Text24.Text = "": Text25.Text = "": Text26.Text = "":
Label4.Caption = "": Label14.Caption = "": Label16.Caption = "": Label18.Caption = "":
Label25.Caption = " ": Label27.Caption = " ": Label29.Caption = " ":
Label31.Caption = "": Label33.Caption = "": Label35.Caption = "":
End Sub
Private Sub Command5_Click()
End
End Sub
Private Sub Command6_Click()
Dim FI, RS, HH, KKP, EP, EPP As Single
FI = Val(Text13.Text): RS = Val(Text14.Text): HH = Val(Text15.Text)
KKP = (Tan((45 + FI / 2) * PI / 180)) ^ 2
Label25.Caption = Format(Str(KKP), "###.###")
EP = RS * HH * KKP
Label27.Caption = Format(Str(EP), "###.##") + "KPa"
EPP = 0.5 * EP * HH * 0.3
Label29.Caption = Format(Str(EPP), "###.##") + "KN/m"
End Sub
Private Sub Command7_Click()
Dim MP, MU, MME, MG As Single
Dim R0, RP, RU, RG, RE, FF, RD, G As Single
Dim K1, K2 As Single
Dim Temp As Integer
R0 = Val(Text16.Text): RP = Val(Text17.Text): RU = Val(Text18.Text)
RG = Val(Text19.Text): RE = Val(Text20.Text): RD = Val(Text21.Text)
FF = Val(Text22.Text): G = Val(Text23.Text): MG = Val(Text26.Text)
P = Val(Label16.Caption)
PU = Val(Label18.Caption)
EPP = Val(Label29.Caption)
B = Val(Text11.Text)
DD = Val(Text10.Text)
HH = Val(Text15.Text)
MP = P * DD / 2
Label31.Caption = Format(Str(MP), "####.##") + "KN.m/m"
MU = PU * 2 * B / 3
Label33.Caption = Format(Str(MU), "####.##") + "KN.m/m"
MME = EPP * HH / 3
Label35.Caption = Format(Str(MME), "####.##") + "KN.m/m"
K1 = R0 * RP * P / ((RG * G - RU * PU) * FF + RE * EPP)
Text24.Text = Format(Str(K1), "##.##")
K2 = R0 * (RP * MP + RU * MU) / ((RG * MG + RE * MME) / RD)
Text25.Text = Format(Str(K2), "##.##")
If K1 < 1# Then Temp = MsgBox("胸墙抗滑稳定!", 64 + vbOKOnly)
If K2 < 1# Then Temp = MsgBox("胸墙抗倾稳定!", 64 + vbOKOnly)
If K1 > 1# Then Temp = MsgBox("胸墙抗滑不稳定!", 64 + vbOKOnly)
If K2 > 1# Then Temp = MsgBox("胸墙抗倾不稳定!", 64 + vbOKOnly)
End Sub
Private Sub Label37_Click()
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -