📄 form4.frm
字号:
VERSION 5.00
Begin VB.Form Form4
BackColor = &H00E0E0E0&
Caption = $"Form4.frx":0000
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 7320
ControlBox = 0 'False
LinkTopic = "Form4"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 3195
ScaleWidth = 7320
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command2
BackColor = &H00C0C0C0&
Caption = "返回"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5880
Style = 1 'Graphical
TabIndex = 3
Top = 2040
Width = 1095
End
Begin VB.TextBox Text3
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 435
Left = 2400
TabIndex = 4
Top = 2100
Width = 2295
End
Begin VB.CommandButton Command1
BackColor = &H00C0C0C0&
Caption = "确定"
Default = -1 'True
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 5880
Style = 1 'Graphical
TabIndex = 2
Top = 600
Width = 1095
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3840
TabIndex = 1
Top = 960
Width = 1335
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3840
TabIndex = 0
Top = 240
Width = 1335
End
Begin VB.Label Label5
BackColor = &H00E0E0E0&
Caption = "mg/m3"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 4800
TabIndex = 9
Top = 2160
Width = 855
End
Begin VB.Label Label4
BackColor = &H00E0E0E0&
Caption = "此点浓度为:"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 6
Top = 2160
Width = 1935
End
Begin VB.Label Label3
BackColor = &H00E0E0E0&
Caption = "Y(m)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3120
TabIndex = 8
Top = 960
Width = 495
End
Begin VB.Label Label2
BackColor = &H00E0E0E0&
Caption = "X(m)"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 3120
TabIndex = 7
Top = 360
Width = 495
End
Begin VB.Label Label1
BackColor = &H00E0E0E0&
Caption = "请输入该点坐标:"
BeginProperty Font
Name = "隶书"
Size = 15.75
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 240
TabIndex = 5
Top = 600
Width = 2655
End
End
Attribute VB_Name = "Form4"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim c As Single
Call frmw1.canshu(q, h, u10, pa, w1, pa1, cp, qv, ts, ta, t1, vs, d, w2, w, a, b)
If frmw1.Option1 Then p = frmw1.txtFields(34) Else p = frmw1.txtFields(35)
u = u10 * (h / 10) ^ p
X = Text1: Y = Text2
If Text1 <> "" And Text2 <> "" Then
If frmw1.txtFields(6) = 1 Then '有风时的某点浓度
he = frmw1.taisheng(h, pa, qv, ts, ta, vs, w2, u, d)
Call frmw1.ar(w, X, a1, a2, r1, r2)
Y1 = r1 * X ^ a1: z1 = r2 * X ^ a2
f = 2 * Exp(-he ^ 2 / (2 * z1 ^ 2))
c = q / (2 * 3.1416 * u * Y1 * z1) * Exp(-Y ^ 2 * 0.5 / Y1 ^ 2) * f
ElseIf frmw1.txtFields(6) = 2 Then '小风静风时的某点浓度
If u10 < 0.5 Then r01 = frmw1.txtFields(18): r02 = frmw1.txtFields(20) Else r01 = frmw1.txtFields(19): r02 = frmw1.txtFields(21)
qh = 0.35 * pa * qv * (ts - ta) / ts
h2 = 5.5 * qh ^ 0.25 * (w2 + 0.0098) ^ -0.375
he = h + h2
n = Sqr(X ^ 2 + Y ^ 2 + (r01 / r02) ^ 2 * he ^ 2)
s = u * X / (r01 * n)
h3 = (s + 5) / 100
s1 = (Exp(-0.5 * s ^ 2) + Exp(-0.5 * 5 ^ 2)) * h3 / 2
For i = 1 To 99
s1 = s1 + Exp(-0.5 * (-5 + i * h3) ^ 2) * h3
Next i
s1 = 6.2832 ^ -0.5 * s1
g = Exp(-u ^ 2 / (2 * r01 ^ 2)) * (1 + Sqr(2 * 3.1416) * s * Exp(s * s * 0.5) * s1)
c = 20 * q * g / (6.2832 ^ 1.5 * r02 * n ^ 2)
Else: qh = 0.35 * pa * qv * (ts - ta) / ts '熏烟时的某点浓度
If u10 >= 1.5 Then
h2 = qh ^ (1 / 3) * (w2 + 0.0098) ^ (1 / 3) * u ^ -(1 / 3)
Else: h2 = 5.5 * qh ^ 0.25 * (w2 + 0.0098) ^ -0.375
End If
he = h + h2
If X < 1000 Then
a1 = frmw1.txtFields(8): r1 = frmw1.txtFields(10): a2 = frmw1.txtFields(12): r2 = frmw1.txtFields(15)
ElseIf X >= 1000 And X < 10000 Then
a1 = frmw1.txtFields(9): r1 = frmw1.txtFields(11): a2 = frmw1.txtFields(13): r2 = frmw1.txtFields(16)
Else: a1 = frmw1.txtFields(9): r1 = frmw1.txtFields(11): a2 = frmw1.txtFields(14): r2 = frmw1.txtFields(17)
End If
Y1 = r1 * X ^ a1: z1 = r2 * X ^ a2
y1f = Y1 + he / 8
hf = he + 2.15 * z1
c = q * Exp(-0.5 * Y ^ 2 / y1f ^ 2) / (Sqr(2 * 3.1416) * u * hf * y1f)
End If
Form4.Text3 = c
End If
End Sub
Private Sub Command2_Click()
Form4.Hide: frmw1.Show
Text3 = ""
End Sub
Private Sub Text1_gotFocus()
Text3 = ""
End Sub
Private Sub Text2_gotfocus()
Text3 = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -