📄 form1.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 7470
ClientLeft = 2715
ClientTop = 2250
ClientWidth = 9750
LinkTopic = "Form1"
ScaleHeight = 7470
ScaleWidth = 9750
Begin VB.CommandButton Command2
Caption = "画图"
Height = 495
Left = 2880
TabIndex = 11
Top = 2400
Width = 855
End
Begin VB.TextBox Text3
Height = 495
Left = 1200
TabIndex = 10
Text = "1"
Top = 600
Width = 1575
End
Begin VB.TextBox Text5
Height = 495
Left = 6720
TabIndex = 9
Text = "1"
Top = 600
Width = 1335
End
Begin VB.TextBox Text4
Height = 495
Left = 3960
TabIndex = 8
Text = "1"
Top = 600
Width = 1335
End
Begin VB.TextBox text1
Height = 495
Left = 1200
TabIndex = 7
Text = "12"
Top = 1680
Width = 1815
End
Begin VB.CommandButton Command1
Caption = "计算"
Height = 495
Left = 1200
TabIndex = 6
Top = 2400
Width = 855
End
Begin VB.TextBox Text2
Height = 495
Left = 4080
TabIndex = 0
Top = 1680
Width = 2175
End
Begin VB.Label Label3
Caption = "参加工作的油缸个数"
Height = 375
Index = 2
Left = 6600
TabIndex = 5
Top = 240
Width = 1695
End
Begin VB.Label Label3
Caption = "参加工作的蓄压器个数"
Height = 375
Index = 1
Left = 3840
TabIndex = 4
Top = 240
Width = 1935
End
Begin VB.Label Label3
Caption = "参加工作的油泵数"
Height = 375
Index = 0
Left = 1200
TabIndex = 3
Top = 240
Width = 1695
End
Begin VB.Label Label2
Caption = "此时刻压力值"
Height = 255
Left = 4080
TabIndex = 2
Top = 1320
Width = 1215
End
Begin VB.Label Label1
Caption = "输入时刻(请不要超过16)"
Height = 255
Left = 1200
TabIndex = 1
Top = 1320
Width = 2415
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim pr As Single
Dim cip As Single
Dim cic As Single
Dim cd As Single
Dim w As Single
Dim midu As Single
Dim pa As Single
Dim n As Single
Dim v0 As Single
Dim ea As Single
Dim fl As Integer
Dim al As Integer
Dim kp As Integer
Dim ka As Integer
Dim kc As Integer
Private Sub Command1_Click() '计算
pr = 1
cip = 0.05
cic = 0.05
cd = 0.7
w = 0.1256
midu = 0.8
dt(m + 1) = dt(m) + 0.1
pa = 5
n = 1
v0 = 10
ea = 0.8
fl = 2
al = 1
kp = Int(Text3.Text)
ka = Int(Text4.Text)
kc = Int(Text5.Text)
p(0) = 5
For i = 0 To 179
p(i + 1) = ((kp * 5.7 + (kp * cip + kc * cic) * pr) - kc * cd * w * Sqr((p(i) - pr - fl / al) / midu) + 0.3 * p(i)) * (dt(m + 1) - dt(m)) / (ka * (pa / p(i)) ^ (1 / n) * v0 / ea) + p(i)
'If p(i + 1) >= 6 Then
'Exit For
'Text2.Text = 6
'End If
Next i
Text2.Text = p(Int(text1.Text))
End Sub
Private Sub Command2_Click() '画图
Form2.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -