📄 form1.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "Msflxgrd.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5475
ClientLeft = 60
ClientTop = 345
ClientWidth = 11400
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5475
ScaleWidth = 11400
StartUpPosition = 2 'CenterScreen
Begin VB.CommandButton Command5
Caption = "数据文件输入"
Height = 495
Left = 10560
TabIndex = 21
Top = 3480
Width = 735
End
Begin VB.TextBox Text6
Height = 270
Left = 9240
TabIndex = 20
Text = "1"
Top = 1800
Width = 735
End
Begin VB.CommandButton Command3
Caption = "确定"
Height = 375
Left = 10560
TabIndex = 18
Top = 2520
Width = 735
End
Begin VB.TextBox Text5
Height = 270
Left = 6600
TabIndex = 12
Text = "0"
Top = 1800
Width = 975
End
Begin VB.TextBox Text4
Height = 270
Left = 3960
TabIndex = 11
Text = "101325"
Top = 1800
Width = 1215
End
Begin VB.TextBox Text3
Height = 270
Left = 1920
TabIndex = 10
Text = "9"
Top = 1800
Width = 855
End
Begin VB.TextBox Text2
Height = 270
Left = 4320
TabIndex = 8
Text = "C9-19"
Top = 240
Width = 1215
End
Begin VB.CommandButton Command4
Caption = "输出"
Height = 405
Left = 10560
TabIndex = 6
Top = 4440
Width = 735
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 9000
Top = 4920
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin MSFlexGridLib.MSFlexGrid GGrid3
Height = 2745
Left = 150
TabIndex = 5
Top = 2280
Width = 10020
_ExtentX = 17674
_ExtentY = 4842
_Version = 393216
Rows = 10
Cols = 6
TextStyle = 4
ScrollBars = 2
End
Begin MSFlexGridLib.MSFlexGrid GGrid1
Height = 930
Left = 150
TabIndex = 4
Top = 645
Width = 10155
_ExtentX = 17912
_ExtentY = 1640
_Version = 393216
Rows = 3
Cols = 10
ScrollBars = 0
End
Begin VB.CommandButton Command2
Caption = "确定"
Height = 375
Left = 10560
TabIndex = 3
Top = 1800
Width = 735
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 10560
TabIndex = 2
Top = 960
Width = 735
End
Begin VB.TextBox Text1
Height = 270
Left = 1680
TabIndex = 1
Text = "Gu-10"
Top = 240
Width = 1095
End
Begin VB.Label Label9
Caption = "设计点序号"
Height = 255
Left = 8040
TabIndex = 19
Top = 1800
Width = 975
End
Begin VB.Label Label8
Caption = "C"
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 7800
TabIndex = 17
Top = 1800
Width = 255
End
Begin VB.Label Label7
Caption = "0"
Height = 255
Left = 7680
TabIndex = 16
Top = 1800
Width = 135
End
Begin VB.Label Label6
Caption = "Pa"
Height = 270
Left = 5280
TabIndex = 15
Top = 1800
Width = 255
End
Begin VB.Label Label5
Caption = "温度"
Height = 270
Left = 5880
TabIndex = 14
Top = 1800
Width = 495
End
Begin VB.Label Label3
Caption = "大气压力"
Height = 255
Left = 3000
TabIndex = 13
Top = 1800
Width = 855
End
Begin VB.Label Label2
Caption = "输入性能曲线点数"
Height = 255
Left = 360
TabIndex = 9
Top = 1800
Width = 1575
End
Begin VB.Label Label4
Caption = "型号"
Height = 270
Left = 3240
TabIndex = 7
Top = 240
Width = 735
End
Begin VB.Label Label1
Caption = "模型编号"
Height = 270
Left = 240
TabIndex = 0
Top = 240
Width = 735
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i As Integer
Dim Np As Single, Ns As Single, b2 As Single, beta2 As Single, D2 As Single, D1 As Single, U2 As Single, Zi As Single, Zshort As Single '定义模型尺寸
Dim Pin As Single, tin As Single
Dim N As Integer 'N为工况点的个数
Dim Codenum As Integer
Dim Faim() As Single '各个工况点的流量系数
Dim Pstot() As Single '各个工况点的全压系数
Dim Eftot() As Single '各个工况点的全压效率
Dim Psst() As Single '各个工况点的静压系数
Dim Efst() As Single '各个工况点的静压效率
Dim Anoise() As Single '各个工况点的噪声,单位:分贝
Dim ssout, QQx(), Ptot(), Pst() As Single 'ssout:蜗壳出口面积, QQx() 流量, Ptot()全压升, Pst()静压升
Dim Last1(1 To 9)
Dim Last2() As Single
Dim Last3() As Single
Private Sub Form_Load() '****************网格初始化
Dim strR1 As String, strR2 As String, strR3 As String, strR4 As String, strR5 As String, strR6 As String, str As String, Temp As Variant
Dim strC1 As String, strC2 As String, strC3 As String, strC4 As String, strC5 As String, strC6 As String, strC7 As String
Dim strA1 As String, strA2 As String, strA3 As String, strA4 As String, strA5 As String, strA6 As String, strA7 As String
Dim count As Integer
Dim rr As Integer, Temp1 As String
GGrid1.Row = 2
GGrid1.Col = 1
GGrid3.Cols = 7
GGrid3.ScrollBars = flexScrollBarVertical
strR1 = "|^压力|^比转数|^出口宽度|^出口角度|^叶轮外径|^叶轮进口直径|^圆周速度|^长叶片数|^短叶片数"
strC1 = ";模型参数|单位"
strA1 = strR1 & strC1
strR2 = "|^N|^Φd|^Ψtot.d|^ηtot.d|^Ψst.d|^ηst.d|^Anoised|"
strC2 = ";设计点参数"
strA2 = strR2 & strC2
strR3 = "|^流量(m3/s)|^全压升(Pa)|^全压效率|^静压升(Pa)|^静压效率|^噪声(db)"
strC3 = ";工况点数|1|2|3|4|5|6|7|8|9|"
strA3 = strR3 & strC3
GGrid1.FormatString = strA1
GGrid3.FormatString = strA3
GGrid1.TextMatrix(1, 1) = "Np"
GGrid1.TextMatrix(1, 2) = "Ns"
GGrid1.TextMatrix(1, 3) = "b2(mm)"
GGrid1.TextMatrix(1, 4) = "β2"
GGrid1.TextMatrix(1, 5) = "D2(mm)"
GGrid1.TextMatrix(1, 6) = "D1(mm)"
GGrid1.TextMatrix(1, 7) = "U2(m/s)"
GGrid1.TextMatrix(1, 8) = "Zi"
GGrid1.TextMatrix(1, 9) = "Zshort"
For i = 5 To GGrid1.Cols - 1
GGrid1.ColWidth(i) = 1300
Next i
For i = 0 To GGrid3.Cols - 1
GGrid3.ColWidth(i) = 1000
Next i
GGrid1.RowHeight(0) = 400
'*******************************************************************'读入上次输入结果
Open App.Path & "\" & "Lastest.dat" For Input As #1
Do While Not EOF(1)
Line Input #1, media
If Val(media) = 0 Then
Else
count = count + 1
End If
Loop
count = count - 1
Close #1
Open App.Path & "\" & "Lastest.dat" For Input As #1
Input #1, Last1(1), Last1(2), Last1(3), Last1(4), Last1(5), Last1(6), Last1(7), Last1(8), Last1(9), rr
Line Input #1, Temp1
If count >= 1 Then
Text3.Text = count
Text6.Text = rr
GGrid3.Rows = count + 1
ReDim Last2(1 To count, 1 To 7)
For i = 1 To count
For j = 1 To 7
Input #1, Last2(i, j)
Next j
Next i
Else
Text3.Text = 9
End If
Close #1
For i = 1 To 9
GGrid1.TextMatrix(2, i) = Last1(i)
Next i
If count >= 1 Then
For i = 1 To count
For j = 1 To 6
GGrid3.TextMatrix(i, j) = Last2(i, j)
If GGrid3.TextMatrix(i, j) = 0 Then
GGrid3.TextMatrix(i, j) = ""
End If
Next j
Next i
End If
'*********************************************************************
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -