def API520_Kv(Re):
    """Calculates correction due to viscosity for liquid flow for use in
    API 520 relief valve sizing.

    .. math::
        K_v = \\left(0.9935 + \\frac{2.878}{Re^{0.5}} + \\frac{342.75}
        {Re^{1.5}}\\right)^{-1}

    Parameters
    ----------
    Re : float
        Reynolds number for flow out the valve [-]

    Returns
    -------
    Kv : float
        Correction due to viscosity [-]

    Notes
    -----
    Reynolds number in the standard is defined as follows, with Q in L/min, G1
    as specific gravity, mu in centipoise, and area in mm^2:

    .. math::
        Re = \\frac{Q(18800G_1)}{\\mu \\sqrt{A}}

    It is unclear how this expression was derived with a constant of 18800;
    the following code demonstrates what the constant should be:

    >>> from scipy.constants import *
    >>> liter/minute*1000./(0.001*(milli**2)**0.5)
    16666.666666666668

    Examples
    --------
    From [1]_, checked with example 5.

    >>> API520_Kv(100)
    0.6157445891444229

    References
    ----------
    .. [1] API Standard 520, Part 1 - Sizing and Selection.
    """
    return (0.9935 + 2.878 / Re ** 0.5 + 342.75 / Re ** 1.5) ** -1.0
