def compute_max_vapor_velocity(C_sbf, sigma, rho_L, rho_V, F_F, A_ha):
    """
    Return the maximum allowable vapor velocity
    through the net area of flow before flooding [U_f; in m/s].
    
    Parameters
    ----------
    C_sbf : 
        Maximum Capacity Parameter (m/s)
    sigma : 
        Liquid surface tension (dyn/cm)
    rho_L : 
        Liquid density
    rho_V : 
        Vapor density
    F_F : 
        Foaming factor
    A_ha : 
        Ratio of open area, A_h, to active area, A_a
    
    Notes
    -----
    The max vapor velocity is given by [3]_. See source code for details.
    
    """
    F_ST = (sigma/20)**0.2 # Surface tension factor
    
    # Working area factor
    if A_ha >= 0.1 and A_ha <= 1:
        F_HA = 1
    elif A_ha >= 0.06:
        F_HA = 5*A_ha + 0.5
    else:
        raise ValueError("ratio of open to active area, 'A', must be between 0.06 and 1") 
    
    return C_sbf * F_HA * F_ST * ((rho_L-rho_V)/rho_V)**0.5