📄 fzl.frm
字号:
VERSION 5.00
Begin VB.Form fzl
Caption = "Form1"
ClientHeight = 5535
ClientLeft = 60
ClientTop = 435
ClientWidth = 8175
LinkTopic = "Form1"
ScaleHeight = 5535
ScaleWidth = 8175
StartUpPosition = 3 '窗口缺省
Begin VB.Frame Frame2
Caption = "传输几率法"
Height = 1215
Left = 240
TabIndex = 9
Top = 2520
Width = 7575
Begin VB.CommandButton Command1
Caption = "计算"
Height = 255
Left = 4320
TabIndex = 14
Top = 480
Width = 975
End
Begin VB.TextBox Text_c
Height = 270
Left = 1680
TabIndex = 13
Text = "Text6"
Top = 720
Width = 1215
End
Begin VB.TextBox Text_w
Height = 270
Left = 1680
TabIndex = 12
Text = "Text5"
Top = 360
Width = 1215
End
Begin VB.Label Label6
Caption = "总流导"
Height = 375
Left = 600
TabIndex = 11
Top = 720
Width = 615
End
Begin VB.Label Label5
Caption = "传输几率"
Height = 375
Left = 600
TabIndex = 10
Top = 360
Width = 855
End
End
Begin VB.Frame Frame1
Caption = "输入参数"
Height = 2055
Left = 240
TabIndex = 0
Top = 240
Width = 7575
Begin VB.TextBox molzl
Height = 270
Left = 2520
TabIndex = 16
Top = 1440
Width = 1455
End
Begin VB.TextBox wendu
Height = 270
Left = 720
TabIndex = 15
Top = 1440
Width = 1095
End
Begin VB.TextBox Text_b
Height = 270
Left = 6120
TabIndex = 4
Top = 480
Width = 1215
End
Begin VB.TextBox Text_h
Height = 270
Left = 4320
TabIndex = 3
Top = 480
Width = 1455
End
Begin VB.TextBox Text2_r
Height = 270
Left = 2520
TabIndex = 2
Top = 480
Width = 1335
End
Begin VB.TextBox Text_l
Height = 270
Left = 720
TabIndex = 1
Top = 480
Width = 1335
End
Begin VB.Label Label9
Caption = "气体的摩尔质量"
Height = 375
Left = 2520
TabIndex = 18
Top = 1080
Width = 1455
End
Begin VB.Label Label7
Caption = "温度T"
Height = 255
Left = 720
TabIndex = 17
Top = 1200
Width = 1095
End
Begin VB.Label Label4
Caption = "宽度b"
Height = 255
Left = 6240
TabIndex = 8
Top = 240
Width = 855
End
Begin VB.Label Label3
Caption = "高度h"
Height = 255
Left = 4560
TabIndex = 7
Top = 240
Width = 1215
End
Begin VB.Label Label2
Caption = "半径r"
Height = 255
Left = 2640
TabIndex = 6
Top = 240
Width = 975
End
Begin VB.Label Label1
Caption = "管长l"
Height = 255
Left = 1080
TabIndex = 5
Top = 240
Width = 855
End
End
End
Attribute VB_Name = "fzl"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim l As Single, r As Single, b As Single, h As Single, w As Single, a As Double
Dim t As Single, U As Single, rr As Single, pi As Single
Dim x As Single, tt As Single
l = Val(Text_l.Text)
r = Val(Text2_r.Text)
h = Val(Text_h.Text)
b = Val(Text_b.Text)
If b >= h Then
If b >= l Then
x = l * h * Log(l / h) / (2 * l + h * Log(l / h))
a = (((l - x) - ((l - x) ^ 2 + h ^ 2) ^ 0.5) - (x - (x ^ 2 + h ^ 2) ^ 0.5)) / _
((((2 * (l - x) - 2 * ((l - x) ^ 2 + h ^ 2)) ^ 0.5 + l * (l - x) / ((l - x) ^ 2 + h ^ 2) ^ 0.5)) - (2 * x - 2 * (x ^ 2 + h ^ 2) ^ 0.5 + l * x / (x ^ 2 + h ^ 2) ^ 0.5))
w = a * (1 - h / l * Log((l + (l ^ 2 + h ^ 2) ^ 0.5) / h)) - l / (2 * h) + (l ^ 2 + h ^ 2) ^ 0.5 / (2 * h) _
+ h * Log((l + (l ^ 2 + h ^ 2) ^ 0.5) / h) / (2 * l)
End If
End If
If h >= l Then
tt = (2 * (l + h - (l ^ 2 + h ^ 2) ^ 0.5 + l ^ 2 / (l * (l ^ 2 + h ^ 2) ^ 0.5)))
a = (l + h - (l ^ 2 + h ^ 2) ^ 0.5) / tt
w = a * (1 - h / l * Log((l + (l ^ 2 + h ^ 2) ^ 0.5) / h)) - l / (2 * h) + (l ^ 2 + h ^ 2) ^ 0.5 / (2 * h) _
+ h * Log((l + (l ^ 2 + h ^ 2) ^ 0.5) / h) / (2 * l)
End If
t = wendu.Text
U = molzl.Text
pi = 3.1415926
rr = 8.31
c = (rr * t / (2 * pi * U)) ^ 0.5 * h * b * w
Text_w.Text = w
Text_c = c
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -