Foaming behavior of rich hydrocarbon gas in viscous oil, sandstone formations