def Kv_to_K(Kv, D):
    """Convert valve flow coefficient from common metric units to regular
    loss coefficients.

    .. math::
        K = 1.6\\times 10^9 \\frac{D^4}{K_v^2}
        
    Parameters
    ----------
    Kv : float
        Metric Kv valve flow coefficient (flow rate of water at a pressure drop  
        of 1 bar) [m^3/hr]
    D : float
        Inside diameter of the valve [m]

    Returns
    -------
    K : float
        Loss coefficient, [-]

    Notes
    -----
    Crane TP 410 M (2009) gives the coefficient of 0.04 (with diameter in mm).
    
    It also suggests the density of water should be found between 5-40°C. 
    Older versions specify the density should be found at 60 °F, which is
    used here, and the pessure for the appropriate density is back calculated.

    .. math::
        \\Delta P = 1 \\text{ bar} = \\frac{1}{2}\\rho V^2\\cdot K
        
        V = \\frac{\\frac{K_v\\cdot \\text{ hour}}{3600 \\text{ second}}}{\\frac{\\pi}{4}D^2}
        
        \\rho = 999.29744568 \\;\\; kg/m^3  \\text{ at } T=60° F, P = 703572 Pa

    The value of density is calculated with IAPWS-95; it is chosen as it makes
    the coefficient a very convenient round number. Others constants that have
    been used are 1.604E9, and 1.60045E9.

    Examples
    --------
    >>> Kv_to_K(2.312, .015)
    15.153374600399898

    References
    ----------
    .. [1] ISA-75.01.01-2007 (60534-2-1 Mod) Draft
    """
    return 1600000000.0 * D ** 4 * Kv ** -2
