29
29
from fluids .piping import BWG_SI , BWG_integers
30
30
31
31
__all__ = ['effectiveness_from_NTU' , 'NTU_from_effectiveness' , 'calc_Cmin' ,
32
- 'calc_Cmax' , 'calc_Cr' , 'Pp ' , 'Pc ' ,
32
+ 'calc_Cmax' , 'calc_Cr' , 'P_NTU_Pp ' , 'P_NTU_Pc ' ,
33
33
'NTU_from_UA' , 'UA_from_NTU' , 'effectiveness_NTU_method' , 'F_LMTD_Fakheri' ,
34
34
'temperature_effectiveness_basic' , 'temperature_effectiveness_TEMA_J' ,
35
35
'temperature_effectiveness_TEMA_H' , 'temperature_effectiveness_TEMA_G' ,
36
36
'temperature_effectiveness_TEMA_E' , 'temperature_effectiveness_plate' ,
37
37
'temperature_effectiveness_air_cooler' ,
38
38
'P_NTU_method' , 'NTU_from_P_basic' ,
39
39
'NTU_from_P_J' , 'NTU_from_P_G' , 'NTU_from_P_E' , 'NTU_from_P_H' ,
40
- 'NTU_from_P_plate' , 'check_tubing_TEMA' , 'get_tube_TEMA' ,
40
+ 'NTU_from_P_plate' ,
41
41
'DBundle_min' , 'shell_clearance' , 'baffle_thickness' , 'D_baffle_holes' ,
42
42
'L_unsupported_max' , 'Ntubes' , 'size_bundle_from_tubecount' ,
43
43
'Ntubes_Perrys' , 'Ntubes_VDI' , 'Ntubes_Phadkeb' ,
@@ -804,7 +804,7 @@ def UA_from_NTU(NTU, Cmin):
804
804
return NTU * Cmin
805
805
806
806
807
- def Pp (x , y ):
807
+ def P_NTU_Pp (x , y ):
808
808
r'''Basic helper calculator which accepts a transformed R1 and NTU1 as
809
809
inputs for a common term used in the calculation of the P-NTU method for
810
810
plate exchangers.
@@ -835,7 +835,7 @@ def Pp(x, y):
835
835
836
836
Examples
837
837
--------
838
- >>> Pp (5, .4)
838
+ >>> P_NTU_Pp (5, .4)
839
839
0.713634370024
840
840
841
841
References
@@ -850,7 +850,7 @@ def Pp(x, y):
850
850
return (1. - exp (- x * (1. + y )))/ (1. + y )
851
851
852
852
853
- def Pc (x , y ):
853
+ def P_NTU_Pc (x , y ):
854
854
r'''Basic helper calculator which accepts a transformed R1 and NTU1 as
855
855
inputs for a common term used in the calculation of the P-NTU method for
856
856
plate exchangers.
@@ -881,7 +881,7 @@ def Pc(x, y):
881
881
882
882
Examples
883
883
--------
884
- >>> Pc (5, .7)
884
+ >>> P_NTU_Pc (5, .7)
885
885
0.920670368605
886
886
887
887
References
@@ -2434,45 +2434,45 @@ def temperature_effectiveness_plate(R1, NTU1, Np1, Np2, counterflow=True,
2434
2434
300-313. doi:10.1115/1.3250678.
2435
2435
'''
2436
2436
if Np1 == 1 and Np2 == 1 and counterflow :
2437
- return Pc (NTU1 , R1 )
2437
+ return P_NTU_Pc (NTU1 , R1 )
2438
2438
elif Np1 == 1 and Np2 == 1 and not counterflow :
2439
- return Pp (NTU1 , R1 )
2439
+ return P_NTU_Pp (NTU1 , R1 )
2440
2440
elif Np1 == 1 and Np2 == 2 :
2441
2441
# There are four configurations but all have the same formula
2442
2442
# They do behave different depending on the number of available plates
2443
2443
# but this model assues infinity
2444
2444
# There are four more arrangements that are equivalent as well
2445
- A = Pp (NTU1 , 0.5 * R1 )
2446
- B = Pc (NTU1 , 0.5 * R1 )
2445
+ A = P_NTU_Pp (NTU1 , 0.5 * R1 )
2446
+ B = P_NTU_Pc (NTU1 , 0.5 * R1 )
2447
2447
return 0.5 * (A + B - 0.5 * A * B * R1 )
2448
2448
elif Np1 == 1 and Np2 == 3 and counterflow :
2449
2449
# There are six configurations, two formulas
2450
2450
# Each behaves differently though as a function of number of plates
2451
- A = Pp (NTU1 , R1 / 3. )
2452
- B = Pc (NTU1 , R1 / 3. )
2451
+ A = P_NTU_Pp (NTU1 , R1 / 3. )
2452
+ B = P_NTU_Pc (NTU1 , R1 / 3. )
2453
2453
return 1 / 3. * (A + B * (1. - R1 * A / 3. )* (2. - R1 * B / 3. ))
2454
2454
elif Np1 == 1 and Np2 == 3 and not counterflow :
2455
- A = Pp (NTU1 , R1 / 3. )
2456
- B = Pc (NTU1 , R1 / 3. )
2455
+ A = P_NTU_Pp (NTU1 , R1 / 3. )
2456
+ B = P_NTU_Pc (NTU1 , R1 / 3. )
2457
2457
return 1 / 3. * (B + A * (1. - R1 * B / 3. )* (2. - R1 * A / 3. ))
2458
2458
elif Np1 == 1 and Np2 == 4 :
2459
2459
# four configurations
2460
2460
# Again a function of number of plates, but because expressions assume
2461
2461
# infinity it gets ignored and they're the same
2462
- A = Pp (NTU1 , 0.25 * R1 )
2463
- B = Pc (NTU1 , 0.25 * R1 )
2462
+ A = P_NTU_Pp (NTU1 , 0.25 * R1 )
2463
+ B = P_NTU_Pc (NTU1 , 0.25 * R1 )
2464
2464
t1 = (1. - 0.25 * A * R1 )
2465
2465
t2 = (1. - 0.25 * B * R1 )
2466
2466
t3 = t1 * t2 # minor optimization
2467
2467
return (1. - t3 * t3 )/ R1
2468
2468
elif Np1 == 2 and Np2 == 2 :
2469
2469
if counterflow and passes_counterflow :
2470
- return Pc (NTU1 , R1 )
2470
+ return P_NTU_Pc (NTU1 , R1 )
2471
2471
elif counterflow and not passes_counterflow :
2472
- A = Pp (0.5 * NTU1 , R1 )
2472
+ A = P_NTU_Pp (0.5 * NTU1 , R1 )
2473
2473
return (2. * A - A * A * (1. + R1 ))/ (1. - R1 * A * A )
2474
2474
elif not counterflow and passes_counterflow :
2475
- B = Pc (0.5 * NTU1 , R1 )
2475
+ B = P_NTU_Pc (0.5 * NTU1 , R1 )
2476
2476
return B * (2. - B * (1. + R1 ))
2477
2477
elif not counterflow and not passes_counterflow :
2478
2478
return temperature_effectiveness_plate (R1 , NTU1 , Np1 = 1 , Np2 = 1 ,
@@ -2483,8 +2483,8 @@ def temperature_effectiveness_plate(R1, NTU1, Np1, Np2, counterflow=True,
2483
2483
# One place says there are four configurations; no other discussion is
2484
2484
# presented
2485
2485
if counterflow :
2486
- H = Pp (0.5 * NTU1 , 2. / 3. * R1 )
2487
- G = Pc (0.5 * NTU1 , 2. / 3. * R1 )
2486
+ H = P_NTU_Pp (0.5 * NTU1 , 2. / 3. * R1 )
2487
+ G = P_NTU_Pc (0.5 * NTU1 , 2. / 3. * R1 )
2488
2488
E = 1. / (2. / 3. * R1 * G )
2489
2489
F = 1. / (2. / 3. * R1 * H )
2490
2490
E2 = E * E
@@ -2496,22 +2496,22 @@ def temperature_effectiveness_plate(R1, NTU1, Np1, Np2, counterflow=True,
2496
2496
return (A + 0.5 * B + 0.5 * C + D )/ R1
2497
2497
elif not counterflow :
2498
2498
D = 2 * R1 / 3.
2499
- A = Pp (NTU1 / 2 , D )
2500
- B = Pc (NTU1 / 2 , D )
2499
+ A = P_NTU_Pp (NTU1 / 2 , D )
2500
+ B = P_NTU_Pc (NTU1 / 2 , D )
2501
2501
return (A + B - (2 / 9. + D / 3. )* (A * A + B * B )
2502
2502
- (5. / 9. + 4. / 3. * D )* A * B
2503
2503
+ D * (1. + D )* A * B * (A + B )/ 3.
2504
2504
- D * D * A * A * B * B / 9. )
2505
2505
elif Np1 == 2 and Np2 == 4 :
2506
2506
# Both cases are correct for passes_counterflow=True or False
2507
2507
if counterflow :
2508
- A = Pp (0.5 * NTU1 , 0.5 * R1 )
2509
- B = Pc (0.5 * NTU1 , 0.5 * R1 )
2508
+ A = P_NTU_Pp (0.5 * NTU1 , 0.5 * R1 )
2509
+ B = P_NTU_Pc (0.5 * NTU1 , 0.5 * R1 )
2510
2510
D = 0.5 * (A + B - 0.5 * A * B * R1 )
2511
2511
return (2. * D - (1. + R1 )* D * D )/ (1. - D * D * R1 )
2512
2512
elif not counterflow :
2513
- A = Pp (0.5 * NTU1 , 0.5 * R1 )
2514
- B = Pc (0.5 * NTU1 , 0.5 * R1 )
2513
+ A = P_NTU_Pp (0.5 * NTU1 , 0.5 * R1 )
2514
+ B = P_NTU_Pc (0.5 * NTU1 , 0.5 * R1 )
2515
2515
D = 0.5 * (A + B - 0.5 * A * B * R1 )
2516
2516
return 2. * D - ((1. + R1 )* D * D )
2517
2517
if not reverse :
@@ -3736,7 +3736,7 @@ def NTU_from_P_plate(P1, R1, Np1, Np2, counterflow=True,
3736
3736
return log (- 1. / (P1 * (R1 + 1. ) - 1. ))/ (R1 + 1. )
3737
3737
except :
3738
3738
# raise ValueError("impossible") # numba: uncomment
3739
- raise ValueError (f'The maximum P1 obtainable at the specified R1 is { Pp (1E10 , R1 ):f} at the limit of NTU1=inf.' ) # numba: delete
3739
+ raise ValueError (f'The maximum P1 obtainable at the specified R1 is { P_NTU_Pp (1E10 , R1 ):f} at the limit of NTU1=inf.' ) # numba: delete
3740
3740
elif Np1 == 1 and Np2 == 2 :
3741
3741
NTU_max = 100.
3742
3742
elif Np1 == 1 and Np2 == 3 and counterflow :
@@ -4552,13 +4552,13 @@ def baffle_thickness(Dshell, L_unsupported, service='C'):
4552
4552
4553
4553
4554
4554
4555
- def D_baffle_holes (do , L_unsupported ):
4555
+ def D_baffle_holes (Do , L_unsupported ):
4556
4556
r'''Determines the diameter of holes in baffles for tubes according to
4557
4557
TEMA [1]_. Applies for all geometries.
4558
4558
4559
4559
Parameters
4560
4560
----------
4561
- do : float
4561
+ Do : float
4562
4562
Tube outer diameter, [m]
4563
4563
L_unsupported : float
4564
4564
Distance between tube supports, [m]
@@ -4573,23 +4573,23 @@ def D_baffle_holes(do, L_unsupported):
4573
4573
4574
4574
Examples
4575
4575
--------
4576
- >>> D_baffle_holes(do =.0508, L_unsupported=0.75)
4576
+ >>> D_baffle_holes(Do =.0508, L_unsupported=0.75)
4577
4577
0.0516
4578
- >>> D_baffle_holes(do =0.01905, L_unsupported=0.3)
4578
+ >>> D_baffle_holes(Do =0.01905, L_unsupported=0.3)
4579
4579
0.01985
4580
- >>> D_baffle_holes(do =0.01905, L_unsupported=1.5)
4580
+ >>> D_baffle_holes(Do =0.01905, L_unsupported=1.5)
4581
4581
0.019450000000000002
4582
4582
4583
4583
References
4584
4584
----------
4585
4585
.. [1] Standards of the Tubular Exchanger Manufacturers Association,
4586
4586
Ninth edition, 2007, TEMA, New York.
4587
4587
'''
4588
- if do > 0.0318 or L_unsupported <= 0.914 : # 1-1/4 inches and 36 inches
4588
+ if Do > 0.0318 or L_unsupported <= 0.914 : # 1-1/4 inches and 36 inches
4589
4589
extra = 0.0008
4590
4590
else :
4591
4591
extra = 0.0004
4592
- d = do + extra
4592
+ d = Do + extra
4593
4593
return d
4594
4594
4595
4595
0 commit comments