Direct simulation of supercritical gas flow in complex nanoporous media and prediction of apparent permeability