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

📄 frmhybridgas.frm

📁 现在的热物理行业或者相关的专业经常需要计算干湿气体的物性参数
💻 FRM
📖 第 1 页 / 共 3 页
字号:
      Begin VB.Label Label5 
         Caption         =   "分子量"
         Height          =   255
         Left            =   2520
         TabIndex        =   44
         Top             =   240
         Width           =   615
      End
      Begin VB.Label Label1 
         Caption         =   "气体列表(请单击选择)"
         Height          =   255
         Left            =   3360
         TabIndex        =   43
         Top             =   240
         Width           =   1935
      End
   End
   Begin VB.Frame Frame3 
      Caption         =   "是否含水蒸气"
      Height          =   3975
      Left            =   120
      TabIndex        =   0
      Top             =   0
      Width           =   5655
      Begin VB.Frame Frame5 
         Height          =   975
         Left            =   120
         TabIndex        =   67
         Top             =   840
         Width           =   1695
         Begin VB.OptionButton Option4 
            Caption         =   "Option4"
            Height          =   255
            Left            =   120
            TabIndex        =   69
            Top             =   600
            Width           =   255
         End
         Begin VB.OptionButton Option3 
            Caption         =   "Option3"
            Height          =   180
            Left            =   120
            TabIndex        =   68
            Top             =   240
            Value           =   -1  'True
            Width           =   255
         End
         Begin VB.Label Label28 
            AutoSize        =   -1  'True
            Caption         =   "绝对湿度:"
            Height          =   180
            Left            =   480
            TabIndex        =   71
            Top             =   600
            Width           =   810
         End
         Begin VB.Label Label27 
            AutoSize        =   -1  'True
            Caption         =   "相对湿度:"
            Height          =   180
            Left            =   480
            TabIndex        =   70
            Top             =   240
            Width           =   810
         End
      End
      Begin VB.Frame Frame4 
         Height          =   615
         Left            =   120
         TabIndex        =   64
         Top             =   240
         Width           =   5295
         Begin VB.OptionButton Option2 
            Caption         =   "湿混合气(含水蒸气)"
            Height          =   255
            Left            =   3120
            TabIndex        =   66
            Top             =   240
            Value           =   -1  'True
            Width           =   1935
         End
         Begin VB.OptionButton Option1 
            Caption         =   "干混合气(不含水蒸气)"
            Height          =   180
            Left            =   240
            TabIndex        =   65
            Top             =   240
            Width           =   2295
         End
      End
      Begin VB.TextBox Text4 
         Height          =   375
         Left            =   2106
         TabIndex        =   10
         Top             =   960
         Width           =   988
      End
      Begin VB.CommandButton Command4 
         Caption         =   "确定"
         Height          =   315
         Left            =   1440
         TabIndex        =   9
         Top             =   3480
         Width           =   700
      End
      Begin VB.CommandButton Command2 
         Caption         =   "重输"
         Height          =   315
         Left            =   3480
         TabIndex        =   8
         Top             =   3480
         Width           =   700
      End
      Begin VB.TextBox Text5 
         Height          =   375
         Left            =   2106
         TabIndex        =   7
         Top             =   1440
         Width           =   988
      End
      Begin VB.TextBox Text8 
         Height          =   375
         Index           =   0
         Left            =   2115
         TabIndex        =   6
         Top             =   3000
         Width           =   988
      End
      Begin VB.TextBox Text7 
         Height          =   375
         Index           =   0
         Left            =   2085
         TabIndex        =   5
         Top             =   2025
         Width           =   988
      End
      Begin VB.TextBox Text7 
         Height          =   375
         Index           =   1
         Left            =   3840
         TabIndex        =   4
         Top             =   2025
         Width           =   1095
      End
      Begin VB.TextBox Text7 
         Height          =   375
         Index           =   2
         Left            =   2115
         TabIndex        =   3
         Top             =   2520
         Width           =   988
      End
      Begin VB.TextBox Text8 
         Height          =   375
         Index           =   1
         Left            =   3840
         TabIndex        =   2
         Top             =   3000
         Width           =   1095
      End
      Begin VB.TextBox Text7 
         Height          =   375
         Index           =   3
         Left            =   3840
         TabIndex        =   1
         Top             =   2535
         Width           =   1095
      End
      Begin VB.Label Label17 
         Caption         =   "(%)"
         Height          =   255
         Left            =   3240
         TabIndex        =   20
         Top             =   1080
         Width           =   375
      End
      Begin VB.Label Label18 
         Caption         =   "克水/千克干空气"
         Height          =   255
         Left            =   3240
         TabIndex        =   19
         Top             =   1485
         Width           =   1455
      End
      Begin VB.Label Label19 
         Caption         =   "进口压力:"
         Height          =   255
         Left            =   1080
         TabIndex        =   18
         Top             =   2160
         Width           =   720
      End
      Begin VB.Label Label20 
         Caption         =   "进口温度"
         Height          =   255
         Left            =   1080
         TabIndex        =   17
         Top             =   3120
         Width           =   735
      End
      Begin VB.Label Label21 
         Caption         =   "Pa"
         Height          =   255
         Left            =   3240
         TabIndex        =   16
         Top             =   2115
         Width           =   360
      End
      Begin VB.Label Label22 
         Caption         =   "K"
         Height          =   255
         Left            =   3240
         TabIndex        =   15
         Top             =   3120
         Width           =   255
      End
      Begin VB.Label Label23 
         Caption         =   "MPa"
         Height          =   240
         Left            =   5040
         TabIndex        =   14
         Top             =   2160
         Width           =   345
      End
      Begin VB.Label Label24 
         Caption         =   "kgf/cm2"
         Height          =   240
         Left            =   3120
         TabIndex        =   13
         Top             =   2640
         Width           =   690
      End
      Begin VB.Label Label26 
         Caption         =   "C"
         Height          =   255
         Left            =   5040
         TabIndex        =   12
         Top             =   3120
         Width           =   255
      End
      Begin VB.Label Label25 
         Caption         =   "bar"
         Height          =   255
         Left            =   5040
         TabIndex        =   11
         Top             =   2640
         Width           =   255
      End
   End
End
Attribute VB_Name = "frmHybridGas"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit


Dim flag As Integer
Dim molweight() As Single
Dim Sumcontent As Single       'Sumcontent 混合气体百分含量和
Dim Cp1(1 To 7) As Single
Dim test1(1 To 6) As String  '保存TEXT1,TEXT(2),TEXT(3)
Dim test2(1 To 6) As String
Dim test3(1 To 6) As String
Dim flag1 As Boolean
Dim flag2 As Boolean





Private Sub Form_Load()

   Dim total As Integer
    Me.AutoRedraw = True
    Me.Left = 0
    Me.Top = 0
    Me.Width = 6000
    Me.Height = 9300

    Call init
    total = sum + 1
     ReDim molweight(total - 1)
     flag = 0
     ta = Array(-16, -14, -12, -10, -8, -6, -4, -2, 0, 2, 4, 6, 8, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, 104.81, 109.32, 113.32, 116.93, 120.23, 127.43, 133.54, 138.88, 143.62, 147.92, 151.85, 158.84, 164.96, 170.42, 175.36, 179.88)
     pa = Array(175.5, 207, 243, 287, 334, 389.5, 452, 525, 610, 704, 812, 931, 1070, 1226, 1312, 1400, 1500, 1600, 1705, 1825, 1930, 2070, 2196, 2334, 2490, 2650, 2815, 2990, 3180, 3365, 3560, 3732, 4000, 4240, 4490, 4760, 5030, 5330, 5620, 5950, 6285, 6630, 7010, 7380, 7800, 8200, 8650, 9120, 9600, 10100, 10600, 11190, 11770, 12180, 15300, 19900, 25000, 31200, 38550, 47400, 57850, 70500, 84500, 101325, 120000, 140000, 160000, 180000, 200000, 25000, 300000, 350000, 400000, 450000, 500000, 600000, 700000, 800000, 900000, 1000000)
     For I = 1 To total - 1
     molweight(I - 1) = Wmi(I)
     List1.AddItem items(I)
     Next I
    For I = 0 To 5
     Text1(I) = ""
     Text2(I) = ""
     Text3(I) = ""
    Next I
    Text5.Text = ""
    Text7(0).Text = ""
    Text7(1).Text = ""
    Text7(2).Text = ""
    Text8(0).Text = ""
    Option1.Value = True
    Option2.Value = False
    Text4.Enabled = False
    Text5.Enabled = False
    Option3.Enabled = False
    Option4.Enabled = False
End Sub




Private Sub Command1_Click()
Dim hum_r As Single  '相对湿度
Dim hum_a As Single  '绝对湿度
Dim c_vol(1 To 6) As Single '体积百分比
Dim emi(1 To 6) As Single
Dim k As Single '绝热指数
Dim RdRw As Single
Dim Rm_h As Single
For I = 1 To 6
  c_vol(I) = 0
  emi(I) = 0
  test2(I) = Val(Text2(I - 1).Text)
Next I
hum_r = 0
hum_a = 0
Sumcontent = 0 'Sumcontent初始化
Wm_m = 0
Cp = 0
Text5.Enabled = True '**************************\



For I = 0 To 5                                      '检查体积百分含量的填写错误
  If Text1(I).Text = "" And Text2(I).Text <> "" Then
   MsgBox "输入不对应", vbCritical, "错误"
   Exit Sub
  End If
  If Text2(I).Text = "" And Text1(I).Text <> "" Then
    MsgBox "请输入" & Text1(I).Text & "体积含量", vbCritical, "错误"
  Exit Sub
  End If
  Sumcontent = Sumcontent + Val(Text2(I).Text)
Next I
If Sumcontent > 100.5 Or Sumcontent < 99.5 Then '检查含量
  MsgBox "输入总含量有误,请重新输入!", vbCritical, "错误"
  'For I = 0 To 5
  'Text1(I).Text = ""
  'Text2(I).Text = ""
  'Text3(I).Text = ""
  'Next I
  'flag = 0
  Exit Sub
  Else
End If


⌨️ 快捷键说明

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