r'''Calculates internal convection Nusselt number for turbulent vertical
    upward flow in a pipe under supercritical conditions according to [1]_.
        
    .. math::
        Nu_b = 0.0068 Re_b^{0.9} \bar{Pr}_b^{0.63}
        \left(\frac{\rho_w}{\rho_b}\right)^{0.17}
        \left(\frac{k_w}{k_b}\right)^{0.29}

        \bar{Cp} = \frac{H_w-H_b}{T_w-T_b}
        
    Parameters
    ----------
    Re : float
        Reynolds number with bulk fluid properties, [-]
    Pr : float
        Prandtl number with bulk fluid properties and an average heat capacity
        between the wall and bulk temperatures [-]
    rho_w : float, optional
        Density at the wall temperature, [kg/m^3]
    rho_b : float, optional
        Density at the bulk temperature, [kg/m^3]
    k_w : float, optional
        Thermal conductivity at the wall temperature, [W/m/K]
    k_b : float, optional
        Thermal conductivity at the bulk temperature, [W/m/K]

    Returns
    -------
    Nu : float
        Nusselt number with bulk fluid properties, [-]

    Notes
    -----
    For the data used to develop the correlation, P varied from 22 to 30 MPa,
    and D was 26 mm. G varied from 600-1200 kg/m^2/s and q varied from 200 to 
    600 kW/m^2.    
    
    Cp used in the calculation of Prandtl number should be the average value
    of those at the wall and the bulk temperatures.

    On the overall database in [2]_, this was the 8th most accurate 
    correlation,and ninth most accurate against normal heat transfer.
    
    If the extra density and thermal conductivity information is not provided, 
    it will not be used.

    Examples
    --------
    >>> Nu_Zhu(1E5, 1.2, 330, 290., 0.63, 0.69)
    240.1459854494706

    References
    ----------
    .. [1] Zhu, Xiaojing, Qincheng Bi, Dong Yang, and Tingkuan Chen. "An 
       Investigation on Heat Transfer Characteristics of Different Pressure 
       Steam-Water in Vertical Upward Tube." Nuclear Engineering and Design 
       239, no. 2 (February 2009): 381-88. doi:10.1016/j.nucengdes.2008.10.026.
    .. [2] Chen, Weiwei, Xiande Fang, Yu Xu, and Xianghui Su. "An Assessment of
       Correlations of Forced Convection Heat Transfer to Water at 
       Supercritical Pressure." Annals of Nuclear Energy 76 (February 2015): 
       451-60. doi:10.1016/j.anucene.2014.10.027.

def Nu_Zhu(Re, Pr, rho_w=None, rho_b=None, k_w=None, k_b=None):
    r'''Calculates internal convection Nusselt number for turbulent vertical
    upward flow in a pipe under supercritical conditions according to [1]_.
        
    .. math::
        Nu_b = 0.0068 Re_b^{0.9} \bar{Pr}_b^{0.63}
        \left(\frac{\rho_w}{\rho_b}\right)^{0.17}
        \left(\frac{k_w}{k_b}\right)^{0.29}

        \bar{Cp} = \frac{H_w-H_b}{T_w-T_b}
        
    Parameters
    ----------
    Re : float
        Reynolds number with bulk fluid properties, [-]
    Pr : float
        Prandtl number with bulk fluid properties and an average heat capacity
        between the wall and bulk temperatures [-]
    rho_w : float, optional
        Density at the wall temperature, [kg/m^3]
    rho_b : float, optional
        Density at the bulk temperature, [kg/m^3]
    k_w : float, optional
        Thermal conductivity at the wall temperature, [W/m/K]
    k_b : float, optional
        Thermal conductivity at the bulk temperature, [W/m/K]

    Returns
    -------
    Nu : float
        Nusselt number with bulk fluid properties, [-]

    Notes
    -----
    For the data used to develop the correlation, P varied from 22 to 30 MPa,
    and D was 26 mm. G varied from 600-1200 kg/m^2/s and q varied from 200 to 
    600 kW/m^2.    
    
    Cp used in the calculation of Prandtl number should be the average value
    of those at the wall and the bulk temperatures.

    On the overall database in [2]_, this was the 8th most accurate 
    correlation,and ninth most accurate against normal heat transfer.
    
    If the extra density and thermal conductivity information is not provided, 
    it will not be used.

    Examples
    --------
    >>> Nu_Zhu(1E5, 1.2, 330, 290., 0.63, 0.69)
    240.1459854494706

    References
    ----------
    .. [1] Zhu, Xiaojing, Qincheng Bi, Dong Yang, and Tingkuan Chen. "An 
       Investigation on Heat Transfer Characteristics of Different Pressure 
       Steam-Water in Vertical Upward Tube." Nuclear Engineering and Design 
       239, no. 2 (February 2009): 381-88. doi:10.1016/j.nucengdes.2008.10.026.
    .. [2] Chen, Weiwei, Xiande Fang, Yu Xu, and Xianghui Su. "An Assessment of
       Correlations of Forced Convection Heat Transfer to Water at 
       Supercritical Pressure." Annals of Nuclear Energy 76 (February 2015): 
       451-60. doi:10.1016/j.anucene.2014.10.027.
    '''
    Nu = 0.0068*Re**0.9*Pr**0.63
    if rho_w and rho_b:
        Nu *= (rho_w/rho_b)**0.17
    if k_w and k_b:
        Nu *= (k_w/k_b)**0.29
    return Nu