A study of the porosities of polymer nanoporous films using numerical simulations and experimental methods