# Path: ht/conv_internal.py
# def turbulent_Dittus_Boelter(Re, Pr, heating=True, revised=True):
#     r'''Calculates internal convection Nusselt number for turbulent flows
#     in pipe according to [1]_, and [2]_, a reprint of [3]_.
# 
#     .. math::
#         Nu = m*Re_D^{4/5}Pr^n
# 
#     Parameters
#     ----------
#     Re : float
#         Reynolds number, [-]
#     Pr : float
#         Prandtl number, [-]
#     heating : bool
#         Indicates if the process is heating or cooling, optional
#     revised : bool
#         Indicates if revised coefficients should be used or not
# 
#     Returns
#     -------
#     Nu : float
#         Nusselt number, [-]
# 
#     Notes
#     -----
#     The revised coefficient is m = 0.023.
#     The original form of Dittus-Boelter has a linear coefficient of 0.0243
#     for heating and 0.0265 for cooling. These are sometimes rounded to 0.024
#     and 0.026 respectively.
#     The default, heating, provides n = 0.4. Cooling makes n 0.3.
# 
#     0.6 ≤ Pr ≤  160
#     Re_{D} ≥ 10000
#     L/D ≥ 10
# 
#     Examples
#     --------
#     >>> turbulent_Dittus_Boelter(Re=1E5, Pr=1.2)
#     247.40036409449127
#     >>> turbulent_Dittus_Boelter(Re=1E5, Pr=1.2, heating=False)
#     242.9305927410295
# 
#     References
#     ----------
#     .. [1] Rohsenow, Warren and James Hartnett and Young Cho. Handbook of Heat
#        Transfer, 3E. New York: McGraw-Hill, 1998.
#     .. [2] Dittus, F. W., and L. M. K. Boelter. "Heat Transfer in Automobile
#        Radiators of the Tubular Type." International Communications in Heat
#        and Mass Transfer 12, no. 1 (January 1985): 3-22.
#        doi:10.1016/0735-1933(85)90003-X
#     .. [3] Dittus, F. W., and L. M. K. Boelter, University of California
#        Publications in Engineering, Vol. 2, No. 13, pp. 443-461, October 17,
#        1930.
#     '''
#     m = 0.023
#     if heating:
#         power = 0.4
#     else:
#         power = 0.3
# 
#     if heating and not revised:
#         m = 0.0243
#     elif not heating and not revised:
#         m = 0.0265
#     else:
#         m = 0.023
#     return m*Re**0.8*Pr**power


from math import sin, pi, log
from fluids.constants import g, R
from fluids.core import Reynolds, Prandtl
from ht.conv_internal import turbulent_Dittus_Boelter
    rhol : float
        Density of the liquid [kg/m^3]
    kl : float
        Thermal conductivity of liquid [W/m/K]
    mul : float
        Viscosity of liquid [Pa*s]
    Hvap : float
        Heat of vaporization of the fluid at P, [J/kg]
    L : float
        Length of the plate [m]
    angle : float, optional
        Angle of inclination of the plate [degrees]

    Returns
    -------
    h : float
        Heat transfer coefficient [W/m^2/K]

    Notes
    -----
    Optionally, the plate may be inclined.
    The constant 0.943 is actually:

    .. math::
        2\sqrt{2}/3

    Examples
    --------
    p. 578 in [1]_, matches exactly.


# Path: ht/conv_internal.py
# def turbulent_Dittus_Boelter(Re, Pr, heating=True, revised=True):
#     r'''Calculates internal convection Nusselt number for turbulent flows
#     in pipe according to [1]_, and [2]_, a reprint of [3]_.
# 
#     .. math::
#         Nu = m*Re_D^{4/5}Pr^n
# 
#     Parameters
#     ----------
#     Re : float
#         Reynolds number, [-]
#     Pr : float
#         Prandtl number, [-]
#     heating : bool
#         Indicates if the process is heating or cooling, optional
#     revised : bool
#         Indicates if revised coefficients should be used or not
# 
#     Returns
#     -------
#     Nu : float
#         Nusselt number, [-]
# 
#     Notes
#     -----
#     The revised coefficient is m = 0.023.
#     The original form of Dittus-Boelter has a linear coefficient of 0.0243
#     for heating and 0.0265 for cooling. These are sometimes rounded to 0.024
#     and 0.026 respectively.
#     The default, heating, provides n = 0.4. Cooling makes n 0.3.
# 
#     0.6 ≤ Pr ≤  160
#     Re_{D} ≥ 10000
#     L/D ≥ 10
# 
#     Examples
#     --------
#     >>> turbulent_Dittus_Boelter(Re=1E5, Pr=1.2)
#     247.40036409449127
#     >>> turbulent_Dittus_Boelter(Re=1E5, Pr=1.2, heating=False)
#     242.9305927410295
# 
#     References
#     ----------
#     .. [1] Rohsenow, Warren and James Hartnett and Young Cho. Handbook of Heat
#        Transfer, 3E. New York: McGraw-Hill, 1998.
#     .. [2] Dittus, F. W., and L. M. K. Boelter. "Heat Transfer in Automobile
#        Radiators of the Tubular Type." International Communications in Heat
#        and Mass Transfer 12, no. 1 (January 1985): 3-22.
#        doi:10.1016/0735-1933(85)90003-X
#     .. [3] Dittus, F. W., and L. M. K. Boelter, University of California
#        Publications in Engineering, Vol. 2, No. 13, pp. 443-461, October 17,
#        1930.
#     '''
#     m = 0.023
#     if heating:
#         power = 0.4
#     else:
#         power = 0.3
# 
#     if heating and not revised:
#         m = 0.0243
#     elif not heating and not revised:
#         m = 0.0265
#     else:
#         m = 0.023
#     return m*Re**0.8*Pr**power


# Path: ht/condensation.py
from math import sin, pi, log
from fluids.constants import g, R
from fluids.core import Reynolds, Prandtl
from ht.conv_internal import turbulent_Dittus_Boelter

    rhol : float
        Density of the liquid [kg/m^3]
    kl : float
        Thermal conductivity of liquid [W/m/K]
    mul : float
        Viscosity of liquid [Pa*s]
    Hvap : float
        Heat of vaporization of the fluid at P, [J/kg]
    L : float
        Length of the plate [m]
    angle : float, optional
        Angle of inclination of the plate [degrees]

    Returns
    -------
    h : float
        Heat transfer coefficient [W/m^2/K]

    Notes
    -----
    Optionally, the plate may be inclined.
    The constant 0.943 is actually:

    .. math::
        2\sqrt{2}/3

    Examples
    --------
    p. 578 in [1]_, matches exactly.


    >>> Nusselt_laminar(Tsat=370, Tw=350, rhog=7.0, rhol=585., kl=0.091,