r'''Calculates Nusselt number for crossflow across a single tube as shown
    in [1]_ at a specified `Re` and `Pr`, both evaluated at the free stream
    temperature. Recommends a viscosity exponent correction of 0.25, which is
    applied only if provided. Also shown in [2]_.

    .. math::
        Nu_D = (0.4 Re_D^{0.5} + 0.06Re_D^{2/3})Pr^{0.4}
        \left(\frac{\mu}{\mu_w}\right)^{0.25}

    Parameters
    ----------
    Re : float
        Reynolds number with respect to cylinder diameter, [-]
    Pr : float
        Prandtl number at free stream temperature, [-]
    mu : float, optional
        Viscosity of fluid at the free stream temperature [Pa*s]
    muw : float, optional
        Viscosity of fluid at the wall temperature [Pa*s]

    Returns
    -------
    Nu : float
        Nusselt number with respect to cylinder diameter, [-]

    Notes
    -----
    Developed considering data from 1 to 1E5 Re, 0.67 to 300 Pr, and range of
    viscosity ratios from 0.25 to 5.2. Found experimental data to generally
    agree with it within 25%.

    Examples
    --------
    >>> Nu_cylinder_Whitaker(6071, 0.7)
    45.94527461589126

    References
    ----------
    .. [1] Whitaker, Stephen. "Forced Convection Heat Transfer Correlations for
       Flow in Pipes, Past Flat Plates, Single Cylinders, Single Spheres, and
       for Flow in Packed Beds and Tube Bundles." AIChE Journal 18, no. 2
       (March 1, 1972): 361-371. doi:10.1002/aic.690180219.
    .. [2] Sanitjai, S., and R. J. Goldstein. "Forced Convection Heat Transfer
       from a Circular Cylinder in Crossflow to Air and Liquids." International
       Journal of Heat and Mass Transfer 47, no. 22 (October 2004): 4795-4805.
       doi:10.1016/j.ijheatmasstransfer.2004.05.012.

def Nu_cylinder_Whitaker(Re, Pr, mu=None, muw=None):
    r'''Calculates Nusselt number for crossflow across a single tube as shown
    in [1]_ at a specified `Re` and `Pr`, both evaluated at the free stream
    temperature. Recommends a viscosity exponent correction of 0.25, which is
    applied only if provided. Also shown in [2]_.

    .. math::
        Nu_D = (0.4 Re_D^{0.5} + 0.06Re_D^{2/3})Pr^{0.4}
        \left(\frac{\mu}{\mu_w}\right)^{0.25}

    Parameters
    ----------
    Re : float
        Reynolds number with respect to cylinder diameter, [-]
    Pr : float
        Prandtl number at free stream temperature, [-]
    mu : float, optional
        Viscosity of fluid at the free stream temperature [Pa*s]
    muw : float, optional
        Viscosity of fluid at the wall temperature [Pa*s]

    Returns
    -------
    Nu : float
        Nusselt number with respect to cylinder diameter, [-]

    Notes
    -----
    Developed considering data from 1 to 1E5 Re, 0.67 to 300 Pr, and range of
    viscosity ratios from 0.25 to 5.2. Found experimental data to generally
    agree with it within 25%.

    Examples
    --------
    >>> Nu_cylinder_Whitaker(6071, 0.7)
    45.94527461589126

    References
    ----------
    .. [1] Whitaker, Stephen. "Forced Convection Heat Transfer Correlations for
       Flow in Pipes, Past Flat Plates, Single Cylinders, Single Spheres, and
       for Flow in Packed Beds and Tube Bundles." AIChE Journal 18, no. 2
       (March 1, 1972): 361-371. doi:10.1002/aic.690180219.
    .. [2] Sanitjai, S., and R. J. Goldstein. "Forced Convection Heat Transfer
       from a Circular Cylinder in Crossflow to Air and Liquids." International
       Journal of Heat and Mass Transfer 47, no. 22 (October 2004): 4795-4805.
       doi:10.1016/j.ijheatmasstransfer.2004.05.012.
    '''
    Nu = (0.4*Re**0.5 + 0.06*Re**(2/3.))*Pr**0.3
    if mu and muw:
        Nu *= (mu/muw)**0.25
    return Nu