def WyllieModel(Phi, Vpmat, Vpfl):
    """
    WYLLIE MODEL
    Wyllie's equation.
    Written by Dario Grana (August 2020)

    Parameters
    ----------
    Phi : float or array_like
        Porosity (unitless).
    Vpmat : float or array_like
        P-wave velocity of the solid phase (km/s).
    Vpfl : float or array_like
        P-wave velocity of the fluid phase (km/s).
        
    Returns
    -------
    Vp : float or array_like
        P-wave velocity of saturated rock (km/s).

    References: Grana, Mukerji, Doyen, 2021, Seismic Reservoir Modeling: Wiley - Chapter 2.1
    """

    # Wyllie 
    Vp = 1 / ((1 - Phi) / Vpmat + Phi / Vpfl)
    
    return Vp