Function ENT(T): '热焓的计算 CA = 373.15 / (T + 273.15) CB = 1 / CA C1 = (-0.00000013816) * (10 ^ (11.344 * (1 - CB)) - 1) C2 = 5.02808 * (WorksheetFunction.Log10(CA)) + (-7.90298 * (CA - 1)) + WorksheetFunction.Log10(1.03323) C3 = 0.0081328 * (10 ^ (-3.49149 * (CA - 1)) - 1) p = 10 ^ (C1 + C2 + C3) ENT = 0.24 * T + (597.3 + 0.441 * T) * 0.622 * p / (1.03323 - p) 结束: End Function Function UTNCTI(TW1, TW2, WB, N, C$): '根据CTI法U/N的计算 DT = TW1 - TW2 T1 = TW1: T2 = TW2: T3 = WB: T4 = 0.9 * DT + TW2: T5 = 0.6 * DT + TW2: T6 = 0.4 * DT + TW2: T7 = 0.1 * DT + TW2 I1 = ENT(T1): I2 = ENT(T2): I3 = ENT(T3): I4 = ENT(T4): I5 = ENT(T5): I6 = ENT(T6): I7 = ENT(T7) X1 = 1 / (I4 - (I3 + N * 0.9 * DT)) X2 = 1 / (I5 - (I3 + N * 0.6 * DT)) X3 = 1 / (I6 - (I3 + N * 0.4 * DT)) X4 = 1 / (I7 - (I3 + N * 0.1 * DT)) If X1 <= 0 Or X2 <= 0 Or X3 <= 0 Or X4 <= 0 Then UTNCTI = 0: GoTo 结束 UTNCTI = DT * (X1 + X2 + X3 + X4) / 4 If C$ = "C" Then GoTo 结束 Else If C$ <> "X" Then UTNCTI=0 SS=(I2 - (I3 + N * DT)) / (I1 - I3) If SS >= 1 Then UTNCTI=0: GoTo 结束 FF=1 - 0.106 * (1 - SS) ^ 3.5 UTNCTI=UTNCTI / FF 结束: End Function Function UTNFi(a, b, N): '填料的U/N的计算 UT以外 UTNFi=10 ^ (a * N + b) End Function Function UTNFi2(a, b, N): '填料的U/N的计算 UT专用 UTNFi2=a * N ^ b End Function Function N值(TW1, TW2, WB, CT$, C$, a, b, N0): 'N值的计算(选定) N=2: R=1: No=0 计算: UN1=UTNCTI(TW1, TW2, WB, N, C$) If CT$ = "UT(小)" Or CT$ = "UT(大)" Or CT$ = "UTW(小)" Or CT$ = "UTW(大)" Then UN2=UTNFi2(a, b, N) Else UN2=UTNFi(a, b, N) No=No + 1 If UN1=0 Then GoTo 大 If UN1 >= UN2 - 0.000004 And UN1 <= UN2 + 0.000004 Then GoTo 结束 If UN1> UN2 Then GoTo 大 Else GoTo 小 大: N = N - R: R = R / 2: If No < 50 Then GoTo 计算 Else N = 0: GoTo 结束 小: N = N + R: R = R / 2: If No < 50 Then GoTo 计算 Else N=0: GoTo 结束 结束: N值 = N: Beep End Function Function 入口水温(RT, TW2, WB, L, CT$, C$, a, b, N0, RT1): '入口水温的计算 TW1=(90 + TW2) / 2: RTW1=(TW1 - TW2) / 2: N=L / RT / RT1 * N0: No=0 计算: UN1=UTNCTI(TW1, TW2, WB, N, C$) If CT$ = "UT(小)" Or CT$ = "UT(大)" Or CT$ = "UTW(小)" Or CT$ = "UTW(大)" Then UN2=UTNFi2(a, b, N) Else UN2=UTNFi(a, b, N) No=No + 1 If UN1=0 Then GoTo 小 If UN1>= UN2 - 0.000004 And UN1 <= UN2 + 0.000004 Then GoTo 结束 If UN1> UN2 Then GoTo 大 Else GoTo 小 大: TW1 = TW1 - RTW1: RTW1 = RTW1 / 2: If No < 50 Then GoTo 计算 Else TW1 = 0: GoTo 结束 小: TW1 = TW1 + RTW1: RTW1 = RTW1 / 2: If No < 50 Then GoTo 计算 Else TW1=0: GoTo 结束 结束: 入口水温 = TW1 End Function Function 出口水温(RT, TW1, WB, L, CT$, C$, a, b, N0, RT1): '出口水温的计算 TW2=(TW1 + WB) / 2: RTW2=(TW1 - WB) / 4: N=L / RT / RT1 * N0: No=0 计算: UN1=UTNCTI(TW1, TW2, WB, N, C$) If CT$ = "UT(小)" Or CT$ = "UT(大)" Or CT$ = "UTW(小)" Or CT$ = "UTW(大)" Then UN2=UTNFi2(a, b, N) Else UN2=UTNFi(a, b, N) No=No + 1 If UN1=0 Then GoTo 大 If UN1>= UN2 - 0.000004 And UN1 <= UN2 + 0.000004 Then GoTo 结束 If UN1> UN2 Then GoTo 大 Else GoTo 小 大: TW2 = TW2 + RTW2: RTW2 = RTW2 / 2: If No < 50 Then GoTo 计算 Else TW2 = 0: GoTo 结束 小: TW2 = TW2 - RTW2: RTW2 = RTW2 / 2: If No < 50 Then GoTo 计算 Else TW2=0: GoTo 结束 结束: 出口水温 = TW2 End Function Function 湿球温度(RT, TW1, TW2, L, CT$, C$, a, b, N0, RT1): '湿球温度的计算 WB=(TW2 + (-20)) / 2: RWB=(TW2 - WB) / 2: N=L / RT / RT1 * N0: No=0 计算: UN1=UTNCTI(TW1, TW2, WB, N, C$) If CT$ = "UT(小)" Or CT$ = "UT(大)" Or CT$ = "UTW(小)" Or CT$ = "UTW(大)" Then UN2=UTNFi2(a, b, N) Else UN2=UTNFi(a, b, N) No=No + 1 If UN1=0 Then GoTo 小 If UN1>= UN2 - 0.000004 And UN1 <= UN2 + 0.000004 Then GoTo 结束 If UN1> UN2 Then GoTo 大 Else GoTo 小 大: WB = WB - RWB: RWB = RWB / 2: If No < 50 Then GoTo 计算 Else WB = 0: GoTo 结束 小: WB = WB + RWB: RWB = RWB / 2: If No < 50 Then GoTo 计算 Else WB=0: GoTo 结束 结束: 湿球温度 = WB End Function Function 温度状态(RT, DTW, WB, L, CT$, C$, a, b, N0, RT1): '温度状态的计算 TW1=(90 + (DTW + WB)) / 2: RTW1=(TW1 - (DTW + WB)) / 2: TW2=TW1 - DTW: N=L / RT / RT1 * N0: No=0 计算: UN1=UTNCTI(TW1, TW2, WB, N, C$) If CT$ = "UT(小)" Or CT$ = "UT(大)" Or CT$ = "UTW(小)" Or CT$ = "UTW(大)" Then UN2=UTNFi2(a, b, N) Else UN2=UTNFi(a, b, N) No=No + 1 If UN1=0 Then GoTo 大 If UN1>= UN2 - 0.000004 And UN1 <= UN2 + 0.000004 Then GoTo 结束 If UN1> UN2 Then GoTo 大 Else GoTo 小 大: TW1 = TW1 + RTW1: RTW1 = RTW1 / 2: TW2 = TW1 - DTW: If No < 50 Then GoTo 计算 Else TW1 = 0: GoTo 结束 小: TW1 = TW1 - RTW1: RTW1 = RTW1 / 2: TW2 = TW1 - DTW: If No < 50 Then GoTo 计算 Else TW1=0: GoTo 结束 结束: 温度状态 = TW1 End Function Function I—T(i) If i>= -1.356 And i < -0.527 Then I—T = i * 3.032 - 5.886 If i>= -0.527 And i < 0.346 Then I—T = i * 2.881 - 5.978 If i>= 0.346 And i < 1.27 Then I—T = i * 2.722 - 5.936 If i>= 1.27 And i < 2.253 Then I—T = i * 2.56 - 5.744 If i>= 2.253 And i < 3.305 Then I—T = i * 2.393 - 5.385 If i>= 3.305 And i < 4.437 Then I—T = i * 2.227 - 4.853 If i>= 4.437 And i < 5.66 Then I—T = i * 2.061 - 4.135 If i>= 5.66 And i < 6.988 Then I—T = i * 1.9 - 3.243 If i>= 6.988 And i < 8.438 Then I—T = i * 1.739 - 2.143 If i>= 8.438 And i < 10.03 Then I—T = i * 1.589 - 0.895 If i>= 10.03 And i < 11.77 Then I—T = i * 1.449 + 0.483 If i>= 11.77 And i < 13.7 Then I—T = i * 1.305 + 2.147 If i>= 13.7 And i < 15.84 Then I—T = i * 1.182 + 3.817 If i>= 15.84 And i < 18.21 Then I—T = i * 1.068 + 5.59 If i>= 18.21 And i < 20.85 Then I—T = i * 0.9558 + 7.608 If i>= 20.85 And i < 23.8 Then I—T = i * 0.8575 + 9.634 If i>= 23.8 And i < 27.1 Then I—T = i * 0.7667 + 11.765 If i>= 27.1 And i < 30.8 Then I—T = i * 0.6848 + 13.957 If i>= 30.8 And i < 34.95 Then I—T = i * 0.6096 + 16.236 If i>= 34.95 And i < 39.64 Then I—T = i * 0.5399 + 18.644 If i>= 39.64 And i < 44.92 Then I—T = i * 0.4793 + 21.015 If i>= 44.92 And i < 50.91 Then I—T = i * 0.4226 + 23.53 If i>= 50.91 And i < 57.7 Then I—T = i * 0.373 + 26.021 If i>= 57.7 And i < 65.42 Then I—T = i * 0.3282 + 28.575 If i>= 65.42 And i < 74.23 Then I—T = i * 0.2876 + 31.196 If i>= 74.23 And i < 84.33 Then I—T = i * 0.2509 + 33.887 If i>= 84.33 And i < 95.95 Then I—T = i * 0.2183 + 36.607 If i>= 95.95 And i < 109.37 Then I—T = i * 0.1892 + 39.362 End Function