def cp_model(k_min: float, mu_min: float, phi: float, cp=0.4) -> tuple:
    """
    Build rock physics models using critical porosity concept.

    :param k_min: Bulk modulus of mineral (Gpa)
    :param mu_min: Shear modulus of mineral (Gpa)
    :param phi: Porosity (fraction)
    :param cp: critical porosity, default is 40%
    :return: Bulk and Shear modulus of rock frame

    Reference
        Critical porosity, Nur et al. (1991, 1995)
        Mavko, G, T. Mukerji and J. Dvorkin (2009), The Rock Physics Handbook: Cambridge University Press. p.353
    """
    k_frame = k_min * (1 - phi / cp)
    mu_frame = mu_min * (1 - phi / cp)
    return k_frame, mu_frame