def K_lift_check_valve_Crane(D1, D2, fd=None, angled=True):
    r'''Returns the loss coefficient for a lift check valve as shown in [1]_.
        
    If β = 1:
        
    .. math::
        K = K_1 = K_2 = N\cdot f_d
        
    Otherwise:
    
    .. math::
        K_2 = \frac{K + \left[0.5(1-\beta^2) + (1-\beta^2)^2\right]}{\beta^4}
        
    For angled lift check valves N = 55; for straight valves, N = 600.
    
    Parameters
    ----------
    D1 : float
        Diameter of the valve seat bore (must be smaller or equal to `D2`), [m]
    D2 : float
        Diameter of the pipe attached to the valve, [m]
    fd : float, optional
        Darcy friction factor calculated for the actual pipe flow in clean 
        steel (roughness = 0.0018 inch) in the fully developed turbulent 
        region; do not specify this to use the original Crane friction factor!,
        [-]
    angled : bool, optional
        If True, returns a value 2x the unangled value; the style of the valve
        [-]
        
    Returns
    -------
    K : float
        Loss coefficient with respect to the pipe inside diameter [-]

    Notes
    -----    
    This method is not valid in the laminar regime and the pressure drop will
    be underestimated in those conditions.

    Examples
    --------
    >>> K_lift_check_valve_Crane(.01, .02)
    28.597361811128465
    
    References
    ----------
    .. [1] Crane Co. Flow of Fluids Through Valves, Fittings, and Pipe. Crane,
       2009.
    '''
    beta = D1/D2
    if fd is None:
        fd = ft_Crane(D2)
    if angled:
        K1 = 55*fd
        if beta == 1:
            return K1
        else:
            return (K1 + beta*(0.5*(1 - beta**2) + (1 - beta**2)**2))/beta**4
    else:
        K1 = 600.*fd
        if beta == 1:
            return K1
        else:
            return (K1 + beta*(0.5*(1 - beta**2) + (1 - beta**2)**2))/beta**4
def K_lift_check_valve_Crane ( D1 , D2 , fd = None , angled = True ) : beta = D1 / D2 if fd is None : fd = ft_Crane ( D2 ) if angled : K1 = 55 * fd if beta == 1 : return K1 else : return ( K1 + beta * ( 0.5 * ( 1 - beta ** 2 ) + ( 1 - beta ** 2 ) ** 2 ) ) / beta ** 4 else : K1 = 600. * fd if beta == 1 : return K1 else : return ( K1 + beta * ( 0.5 * ( 1 - beta ** 2 ) + ( 1 - beta ** 2 ) ** 2 ) ) / beta ** 4
r'''Returns the loss coefficient for a lift check valve as shown in [1]_.
        
    If β = 1:
        
    .. math::
        K = K_1 = K_2 = N\cdot f_d
        
    Otherwise:
    
    .. math::
        K_2 = \frac{K + \left[0.5(1-\beta^2) + (1-\beta^2)^2\right]}{\beta^4}
        
    For angled lift check valves N = 55; for straight valves, N = 600.
    
    Parameters
    ----------
    D1 : float
        Diameter of the valve seat bore (must be smaller or equal to `D2`), [m]
    D2 : float
        Diameter of the pipe attached to the valve, [m]
    fd : float, optional
        Darcy friction factor calculated for the actual pipe flow in clean 
        steel (roughness = 0.0018 inch) in the fully developed turbulent 
        region; do not specify this to use the original Crane friction factor!,
        [-]
    angled : bool, optional
        If True, returns a value 2x the unangled value; the style of the valve
        [-]
        
    Returns
    -------
    K : float
        Loss coefficient with respect to the pipe inside diameter [-]

    Notes
    -----    
    This method is not valid in the laminar regime and the pressure drop will
    be underestimated in those conditions.

    Examples
    --------
    >>> K_lift_check_valve_Crane(.01, .02)
    28.597361811128465
    
    References
    ----------
    .. [1] Crane Co. Flow of Fluids Through Valves, Fittings, and Pipe. Crane,
       2009.