Topological analysis of gas and oil using petrophysical data