Skip to content

Commit 0646493

Browse files
committed
debug successful
1 parent a0bc850 commit 0646493

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

Heat_TransferProject.vbp

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Reference=*\G{6EDAC1A3-C6D8-496B-8823-62F37FAA8B79}#1e.0#0#..\..\..\..\..\Progra
88
Form=..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio\VB98\Form1.frm
99
Module=Module1; Module1.bas
1010
Module=Module2; Module2.bas
11+
Form=Form2.frm
1112
IconForm="Form1"
1213
Startup="Form1"
1314
ExeName32="����1.exe"

Module1.bas

+3-3
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Public Function Variable_Change()
9191
End If
9292
Next i
9393

94-
qvLc = Form1.Text(0) '体积流量
94+
qmLc = Form1.Text(0) '体积流量
9595
qmLh = Form1.Text(1)
9696
Tc1 = Form1.Text(2)
9797
Tc2 = Form1.Text(3)
@@ -113,7 +113,7 @@ End Function
113113

114114
Public Function Variable_OUT()
115115

116-
Form1.Text(0) = qvLc '体积流量
116+
Form1.Text(0) = qmLc '体积流量
117117
Form1.Text(1) = qmLh
118118
Form1.Text(2) = Tc1
119119
Form1.Text(3) = Tc2
@@ -135,7 +135,7 @@ End Function
135135

136136
Public Function Variable_INPUT()
137137

138-
Form1.Text(0) = 30000 'qvLc体积流量
138+
Form1.Text(0) = 30000 'qmLc体积流量
139139
Form1.Text(1) = 9075 'qmLh
140140
Form1.Text(2) = 20 'Tc1
141141
Form1.Text(3) = 0 'Tc2

Module2.bas

+11-8
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,6 @@ Attribute VB_Name = "Module2"
88
Public str_Formula As String
99
Public dbVariable As Double
1010

11-
Declare Function EbExecuteLine Lib "VBA6.dll" (ByVal pStringToExec As Long, ByVal Unknownn1 As Long, ByVal Unknownn2 As Long, ByVal fCheckOnly As Long) As Long
12-
13-
Public Function ELine(sCode As String, Optional fCheckOnly As Boolean) As Boolean
14-
ELine = EbExecuteLine(StrPtr(sCode), 0&, 0&, Abs(fCheckOnly)) = 0
15-
End Function
1611

1712

1813
Public Function Formula_PhaiK() 'Phai = KAdTm
@@ -100,6 +95,7 @@ Attribute VB_Name = "Module2"
10095
ThickPipe = (aPipe / K) * (1 - K * (1 / aCool) - K * (1 / aHot))
10196
ElseIf (K <> 0) And (aCool <> 0) And (aHot = 0) And (ThickPipe <> 0) And (aPipe = 0) Then
10297
aPipe = (1 - K * (1 / aCool) - K * (1 / aHot)) / (K * ThickPipe)
98+
10399
End If
104100
End Function
105101

@@ -111,8 +107,9 @@ Attribute VB_Name = "Module2"
111107
FstCVarNum = 0
112108
LstCVarNum = 0
113109
CircleNumber = 0
110+
Form2.Show
114111

115-
Do While CircleNumber <= 10
112+
Do While (CircleNumber <= 4)
116113
FstCVarNum = NumVariable()
117114
Call Formula_PhaiK 'Phai = KAdTm
118115
Call Formula_dTm 'dTm = (dT2 - dT1) / (ln(dT1 / dT2))
@@ -121,13 +118,19 @@ Attribute VB_Name = "Module2"
121118
Call Formula_dT2 'dT2 = Th1 - Tc2
122119
Call Formula_dT1 'dT1 = Th2 - Tc1
123120
Call Formula_K 'K = 1 / ((1 / aCool) + (1 / aHot) + (ThickPipe / aPipe))
124-
121+
Form2.Print "K:"; K
122+
Form2.Print "Phai:"; Phai
123+
Form2.Print "dT1:"; dT1
124+
Form2.Print "dT2:"; dT2
125+
Form2.Print "Tc2:"; Tc2
126+
Form2.Print "dTm:"; dTm
127+
Form2.Print "A:"; A
128+
125129
LstCVarNum = NumVariable()
126130
If FstCVarNum = LstCVarNum Then
127131
CircleNumber = CircleNumber + 1
128132
Else: CircleNumber = 0
129133
End If
130-
Call Variable_Change
131134
Loop
132135

133136
Call Variable_OUT

0 commit comments

Comments
 (0)