agilescientific / bruges

Bag of really useful geoscience equations and stuff
https://code.agilescientific.com/bruges
Apache License 2.0
276 stars 117 forks source link

Wrong name in petrophysics module #87

Open efpeel opened 3 years ago

efpeel commented 3 years ago

Dear all,

It was pointed out to me that the porosity_to_density function doesn't work. I traced it back to a from name in the module (phi_rho should be replaced by phi):

def porosity_to_density(phi, rho_matrix, rho_fluid):
    """
    Get density from a porosity log. Typical values:
        rho_matrix (sandstone) : 2650 kg/m^3
        rho_matrix (limestome): 2710 kg/m^3
        rho_matrix (dolomite): 2876 kg/m^3
        rho_matrix (anyhydrite): 2977 kg/m^3
        rho_matrix (salt): 20320 kg/m^3
        rho_fluid (fresh water): 1000 kg/m^3
        rho_fluid (salt water): 1100 kg/m^3
    See wiki.aapg.org/Density-neutron_log_porosity.
    Args:
        phi (ndarray): The porosity log.
        rho_matrix (float)
        rho_fluid (float)
    Returns:
        Estimate of bulk density, rho.
    """
    return rho_matrix * (1 - phi) + rho_fluid * phi_rhob
kwinkunks commented 2 years ago

@EvanBianco If you get a chance, can you take a look at this?