# Miscellaneous utilities (ht.core)¶

ht.core.LMTD(Thi, Tho, Tci, Tco, counterflow=True)[source]

Returns the log-mean temperature difference of an ideal counterflow or co-current heat exchanger.

$\Delta T_{LMTD}=\frac{\Delta T_1-\Delta T_2}{\ln(\Delta T_1/\Delta T_2)}$
$\text{For countercurrent: } \\ \Delta T_1=T_{h,i}-T_{c,o}\\ \Delta T_2=T_{h,o}-T_{c,i}$
$\text{Parallel Flow Only:} \\ {\Delta T_1=T_{h,i}-T_{c,i}}\\ {\Delta T_2=T_{h,o}-T_{c,o}}$
Parameters
Thifloat

Inlet temperature of hot fluid, [K]

Thofloat

Outlet temperature of hot fluid, [K]

Tcifloat

Inlet temperature of cold fluid, [K]

Tcofloat

Outlet temperature of cold fluid, [K]

counterflowbool, optional

Whether the exchanger is counterflow or co-current

Returns
LMTDfloat

Log-mean temperature difference [K]

Notes

Any consistent set of units produces a consistent output.

For the case where the temperature difference is the same in counterflow, the arithmeric mean difference (either difference in that case) is the correct result following evaluation of the limit.

For the same problem with the co-current case, the limit evaluates to a temperature difference of zero.

References

1

Bergman, Theodore L., Adrienne S. Lavine, Frank P. Incropera, and David P. DeWitt. Introduction to Heat Transfer. 6E. Hoboken, NJ: Wiley, 2011.

Examples

Example 11.1 in .

>>> LMTD(100., 60., 30., 40.2)
43.200409294131525
>>> LMTD(100., 60., 30., 40.2, counterflow=False)
39.75251118049003
>>> LMTD(100., 60., 20., 60)
40.0
>>> LMTD(100., 60., 20., 60, counterflow=False)
0.0

ht.core.countercurrent_hx_temperature_check(T0i, T0o, T1i, T1o)[source]

Perform a check on two sets of temperatures that could represent a countercurrent heat exchanger, and return whether they are possible or not.

Parameters
T0ifloat

Inlet temperature of one fluid, [K]

T0ofloat

Outlet temperature of one fluid, [K]

T1ifloat

Inlet temperature of another fluid, [K]

T1ofloat

Outlet temperature of another fluid, [K]

Returns
plausiblebool

Whether the exchange is possilble, [-]

ht.core.fin_efficiency_Kern_Kraus(Do, D_fin, t_fin, k_fin, h)[source]

Returns the efficiency eta_f of a circular fin of constant thickness attached to a circular tube, based on the tube diameter Do, fin diameter D_fin, fin thickness t_fin, fin thermal conductivity k_fin, and heat transfer coefficient h.

$\eta_f = \frac{2r_o}{m(r_e^2 - r_o^2)} \left[\frac{I_1(mr_e)K_1(mr_o) - K_1(mr_e) I_1(mr_o)} {I_0(mr_o) K_1(mr_e) + I_1(mr_e) K_0(mr_o)}\right]$
$m = \sqrt{\frac{2h}{k_{fin} t_{fin}}}$
$r_e = 0.5 D_{fin}$
$r_o = 0.5 D_{o}$
Parameters
Dofloat

Outer diameter of bare pipe (as if there were no fins), [m]

D_finfloat

Outer diameter of the fin, from the center of the tube to the edge of the fin, [m]

t_finfloat

Thickness of the fin (for constant thickness fins only), [m]

k_finfloat

Thermal conductivity of the fin, [W/m/K]

hfloat

Heat transfer coefficient of the finned pipe, [W/K]

Returns
eta_finfloat

Fin efficiency [-]

Notes

I0, I1, K0 and K1 are modified Bessel functions of order 0 and 1, modified Bessel function of the second kind of order 0 and 1 respectively.

A number of assumptions are made in deriving this set of equations :

• Temperature-independent fin thermal conductivity

• Constant heat transfer coefficient across the whole fin

• The fin base temperature is a constant value

• There is no constant resistance between the tube material and the added fin

• The surrounding fluid is at a constant temperature

References

1

Kern, Donald Quentin, and Allan D. Kraus. Extended Surface Heat Transfer. McGraw-Hill, 1972.

2

Thulukkanam, Kuppan. Heat Exchanger Design Handbook, Second Edition. CRC Press, 2013.

3

Bergman, Theodore L., Adrienne S. Lavine, Frank P. Incropera, and David P. DeWitt. Introduction to Heat Transfer. 6E. Hoboken, NJ: Wiley, 2011.

4

Kraus, Allan D., Abdul Aziz, and James Welty. Extended Surface Heat Transfer. 1st edition. New York: Wiley-Interscience, 2001.

5

Perrotin, Thomas, and Denis Clodic. “Fin Efficiency Calculation in Enhanced Fin-and-Tube Heat Exchangers in Dry Conditions.” In Proc. Int. Congress of Refrigeration 2003, 2003.

Examples

>>> fin_efficiency_Kern_Kraus(0.0254, 0.05715, 3.8E-4, 200, 58)
0.8412588620231153

ht.core.is_heating_property(prop, prop_wall)[source]

Checks whether or not a fluid side is being heated or cooled, from a property of the fluid at the wall and the bulk temperature. Returns True for heating the bulk fluid, and False for cooling the bulk fluid.

Parameters
propfloat

Viscosity (or Prandtl number) of flowing fluid away from the heat transfer surface, [Pa*s]

prop_wallfloat

Viscosity (or Prandtl number) of the fluid at the wall, [Pa*s]

Returns
is_heatingbool

Whether or not the flow is being heated up by the wall, [-]

Examples

>>> is_heating_property(1E-3, 1.2E-3)
False

ht.core.is_heating_temperature(T, T_wall)[source]

Checks whether or not a fluid side is being heated or cooled, from the temperature of the wall and the bulk temperature. Returns True for heating the bulk fluid, and False for cooling the bulk fluid.

Parameters
Tfloat

Temperature of flowing fluid away from the heat transfer surface, [K]

T_wallfloat

Temperature of the fluid at the wall, [K]

Returns
is_heatingbool

Whether or not the flow is being heated up by the wall, [-]

Examples

>>> is_heating_temperature(298.15, 350)
True

ht.core.wall_factor(mu=None, mu_wall=None, Pr=None, Pr_wall=None, T=None, T_wall=None, mu_heating_coeff=0.11, mu_cooling_coeff=0.25, Pr_heating_coeff=0.11, Pr_cooling_coeff=0.25, T_heating_coeff=0.11, T_cooling_coeff=0.25, property_option='Prandtl')[source]

Computes the wall correction factor for heat transfer, mass transfer, or momentum transfer between a fluid and a wall. Utility function; the coefficients for the phenomenon must be provided to this method. The default coefficients are for heat transfer of a turbulent liquid.

The general formula is as follows; substitute the property desired and the phenomenon desired into the equation for things other than heat transfer.

$\frac{Nu}{Nu_{\text{constant properties}}} = \left(\frac{\mu}{\mu_{wall}}\right)^n$
Parameters
mufloat, optional

Viscosity of flowing fluid away from the surface, [Pa*s]

mu_wallfloat, optional

Viscosity of the fluid at the wall, [Pa*s]

Prfloat, optional

Prandtl number of flowing fluid away from the surface, [-]

Pr_wallfloat, optional

Prandtl number of the fluid at the wall, [-]

Tfloat, optional

Temperature of flowing fluid away from the surface, [K]

T_wallfloat, optional

Temperature of the fluid at the wall, [K]

mu_heating_coefffloat, optional

Coefficient for viscosity - surface providing heating, [-]

mu_cooling_coefffloat, optional

Coefficient for viscosity - surface providing cooling, [-]

Pr_heating_coefffloat, optional

Coefficient for Prandtl number - surface providing heating, [-]

Pr_cooling_coefffloat, optional

Coefficient for Prandtl number - surface providing cooling, [-]

T_heating_coefffloat, optional

Coefficient for temperature - surface providing heating, [-]

T_cooling_coefffloat, optional

Coefficient for temperature - surface providing cooling, [-]

property_optionstr, optional

Which property to use for computing the correction factor; one of ‘Viscosity’, ‘Prandtl’, or ‘Temperature’.

Returns
factorfloat

Correction factor for heat transfer; to be multiplied by the Nusselt number or heat transfer coefficient or friction factor or pressure drop to obtain the actual result, [-]

Examples

>>> wall_factor(mu=8E-4, mu_wall=3E-4, Pr=1.2, Pr_wall=1.1, T=300,
... T_wall=350, property_option='Prandtl')
1.0096172023817749

ht.core.wall_factor_Nu(mu, mu_wall, turbulent=True, liquid=False)[source]

Computes the wall correction factor for heat transfer between a fluid and a wall. These coefficients were derived for internal flow inside a pipe, but can be used elsewhere where appropriate data is missing. It is also useful to compare these results with the coefficients used in various heat transfer coefficients.

$\frac{Nu}{Nu_{\text{constant properties}}} = \left(\frac{\mu}{\mu_{wall}}\right)^n$
Parameters
mufloat

Viscosity (or Prandtl number) of flowing fluid away from the heat transfer surface, [Pa*s]

mu_wallfloat

Viscosity (or Prandtl number) of the fluid at the wall, [Pa*s]

turbulentbool

Whether or not to use the turbulent coefficient, [-]

liquidbool

Whether or not to use the liquid phase coefficient; otherwise the gas coefficient is used, [-]

Returns
factorfloat

Correction factor for heat transfer; to be multiplied by the Nusselt number, or heat transfer coefficient to obtain the actual result, [-]

Notes

The exponents are determined as follows:

Regime

Phase

Heating

Cooling

Turbulent

Liquid

0.11

0.25

Turbulent

Gas

0.5

0

Laminar

Liquid

0.14

0.14

Laminar

Gas

0

0

References

1

Kays, William M., and Michael E. Crawford. Convective Heat and Mass Transfer. 3rd edition. New York: McGraw-Hill Science/Engineering/Math, 1993.

Examples

>>> wall_factor_Nu(mu=8E-4, mu_wall=3E-4, turbulent=True, liquid=True)
1.1139265634480144

>>> wall_factor_Nu(mu=8E-4, mu_wall=3E-4, turbulent=False, liquid=True)
1.147190712947014

>>> wall_factor_Nu(mu=1.5E-5, mu_wall=1.3E-5, turbulent=True, liquid=False)
1.0741723110591495

>>> wall_factor_Nu(mu=1.5E-5, mu_wall=1.3E-5, turbulent=False, liquid=False)
1.0

ht.core.wall_factor_fd(mu, mu_wall, turbulent=True, liquid=False)[source]

Computes the wall correction factor for pressure drop due to friction between a fluid and a wall. These coefficients were derived for internal flow inside a pipe, but can be used elsewhere where appropriate data is missing.

$\frac{f_d}{f_{d,\text{constant properties}}} = \left(\frac{\mu}{\mu_{wall}}\right)^n$
Parameters
mufloat

Viscosity (or Prandtl number) of flowing fluid away from the wall, [Pa*s]

mu_wallfloat

Viscosity (or Prandtl number) of the fluid at the wall, [Pa*s]

turbulentbool

Whether or not to use the turbulent coefficient, [-]

liquidbool

Whether or not to use the liquid phase coefficient; otherwise the gas coefficient is used, [-]

Returns
factorfloat

Correction factor for pressure loss; to be multiplied by the friction factor, or pressure drop to obtain the actual result, [-]

Notes

The exponents are determined as follows:

Regime

Phase

Heating

Cooling

Turbulent

Liquid

-0.25

-0.25

Turbulent

Gas

0.1

0.1

Laminar

Liquid

-0.58

-0.5

Laminar

Gas

-1

-1

References

1

Kays, William M., and Michael E. Crawford. Convective Heat and Mass Transfer. 3rd edition. New York: McGraw-Hill Science/Engineering/Math, 1993.

Examples

>>> wall_factor_fd(mu=8E-4, mu_wall=3E-4, turbulent=True, liquid=True)
0.7825422900366437