Skip to content

Commit d755933

Browse files
committed
add example Nu_cylinder_bank
1 parent ab8124d commit d755933

File tree

1 file changed

+39
-16
lines changed

1 file changed

+39
-16
lines changed

src/polykin/transport/hmt.py

Lines changed: 39 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ def Nu_tube(Re: float,
9292
>>> mu = 1e-3 # Pa.s
9393
>>> cp = 4.2e3 # J/kg/K
9494
>>> k = 0.6 # W/m/K
95-
>>> v = 2. # m/s
95+
>>> v = 2.0 # m/s
9696
>>> D = 25e-3 # m
9797
>>> Re = rho*v*D/mu
9898
>>> Pr = cp*mu/k
9999
>>> Nu = Nu_tube(Re, Pr, D_L=0, er=0)
100100
>>> h = Nu*k/D
101-
>>> print(f"h={h:.1e} W/m².K")
102-
h=7.8e+03 W/m².K
101+
>>> print(f"h={h:.1e} W/m²·K")
102+
h=7.8e+03 W/m²·K
103103
"""
104104
if Re < 2.3e3:
105105
return 3.66 + (0.0668*D_L*Re*Pr)/(1 + 0.04*(D_L*Re*Pr)**(2/3))
@@ -203,14 +203,14 @@ def Nu_cylinder(Re: float, Pr: float) -> float:
203203
>>> mu = 1e-3 # Pa.s
204204
>>> cp = 4.2e3 # J/kg/K
205205
>>> k = 0.6 # W/m/K
206-
>>> v = 2. # m/s
206+
>>> v = 2.0 # m/s
207207
>>> D = 33.7e-3 # m (OD from pipe chart)
208208
>>> Re = rho*v*D/mu
209209
>>> Pr = cp*mu/k
210210
>>> Nu = Nu_cylinder(Re, Pr)
211211
>>> h = Nu*k/D
212-
>>> print(f"h={h:.1e} W/m².K")
213-
h=7.0e+03 W/m².K
212+
>>> print(f"h={h:.1e} W/m²·K")
213+
h=7.0e+03 W/m²·K
214214
"""
215215
check_range_warn(Re*Pr, 0.2, inf, 'Re*Pr')
216216

@@ -275,8 +275,8 @@ def Nu_cylinder_free(Ra: float, Pr: float) -> float:
275275
>>> Ra = Gr*Pr
276276
>>> Nu = Nu_cylinder_free(Ra, Pr)
277277
>>> h = Nu*k/D
278-
>>> print(f"h={h:.1e} W/m².K")
279-
h=1.1e+03 W/m².K
278+
>>> print(f"h={h:.1e} W/m²·K")
279+
h=1.1e+03 W/m²·K
280280
"""
281281
check_range_warn(Ra, 0, 1e12, 'Ra')
282282

@@ -456,19 +456,19 @@ def Nu_tank(
456456
tank equiped with a HE3 impeller operated at 120 rpm. Assume water properties
457457
and default geometry.
458458
>>> from polykin.transport import Nu_tank
459-
>>> T = 2. # m
459+
>>> T = 2.0 # m
460460
>>> D = T/3 # m
461461
>>> rho = 1e3 # kg/m³
462462
>>> mu = 1e-3 # Pa.s
463463
>>> k = 0.6 # W/m.K
464464
>>> cp = 4.2e3 # J/kg.K
465465
>>> Re = (120/60) * D**2 * rho / mu
466466
>>> Pr = mu*cp/k
467-
>>> mur = 1. # neglect temperature correction
467+
>>> mur = 1.0 # neglect temperature correction
468468
>>> Nu = Nu_tank('wall', 'HE3', Re, Pr, mur)
469469
>>> h = Nu*k/T
470-
>>> print(f"h={h:.1e} W/m².K")
471-
h=1.6e+03 W/m².K
470+
>>> print(f"h={h:.1e} W/m²·K")
471+
h=1.6e+03 W/m²·K
472472
"""
473473

474474
# Default parameters
@@ -629,6 +629,29 @@ def Nu_cylinder_bank(v: float,
629629
See also
630630
--------
631631
* [`Nu_cylinder`](Nu_cylinder.md): specific method for a single cylinder.
632+
633+
Examples
634+
--------
635+
Estimate the external heat transfer coefficient for air flowing across a bank
636+
of staggered tubes. The tube outside diameter is 16.4 mm, the longitudinal
637+
pitch is 34.3 mm, the transversal pitch is 31.3 mm, and the number of rows
638+
is 7. The tube surface temperature is 70°C, while the upstream air stream
639+
has a temperature of 15°C and a velocity of 6 m/s.
640+
>>> from polykin.transport import Nu_cylinder_bank
641+
>>> v = 6.0 # m/s
642+
>>> ST = 31.3e-3 # m
643+
>>> SL = 34.3e-3 # m
644+
>>> D = 16.4e-3 # m
645+
>>> NL = 7
646+
>>> rho = 1.2 # kg/m³ (at 15°C, neglecting temperature increase)
647+
>>> mu = 1.8e-5 # Pa·s
648+
>>> k = 0.025 # W/m·K
649+
>>> Pr = 0.72
650+
>>> Prs = 0.71 # (at 70°C)
651+
>>> Nu = Nu_cylinder_bank(v, rho, mu, Pr, Prs, False, D, ST, SL, NL)
652+
>>> h = Nu*k/D
653+
>>> print(f"h={h:.1e} W/m²·K")
654+
h=1.4e+02 W/m²·K
632655
"""
633656

634657
# Maximum fluid velocity
@@ -751,8 +774,8 @@ def Nu_sphere_free(Ra: float, Pr: float) -> float:
751774
>>> Ra = Gr*Pr
752775
>>> Nu = Nu_sphere_free(Ra, Pr)
753776
>>> h = Nu*k/D
754-
>>> print(f"h={h:.1e} W/m².K")
755-
h=7.8e+02 W/m².K
777+
>>> print(f"h={h:.1e} W/m²·K")
778+
h=7.8e+02 W/m²·K
756779
"""
757780
check_range_warn(Ra, 0, 1e11, 'Ra')
758781
check_range_warn(Pr, 0.7, inf, 'Pr')
@@ -851,8 +874,8 @@ def Nu_plate_free(orientation: Literal['vertical',
851874
>>> Ra = Gr*Pr
852875
>>> Nu = Nu_plate_free('vertical', Ra, Pr)
853876
>>> h = Nu*k/L
854-
>>> print(f"h={h:.1e} W/m².K")
855-
h=3.7e+00 W/m².K
877+
>>> print(f"h={h:.1e} W/m²·K")
878+
h=3.7e+00 W/m²·K
856879
"""
857880
if orientation == 'vertical':
858881
if Pr:

0 commit comments

Comments
 (0)