Network calculation of mercury intrusion and absolute permeability in sandstone and other porous media