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.

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