We model and simulate gas flow through nanopores using a single-walled carbon nanotube model. Efficient protocols for the simulation of methane molecules in nanotubes are developed and validated for both the self-diffusivity, following a pulse perturbation, and for the transport diffusivity in an imposed concentration gradient. The former is found to be at least an order of magnitude lower than the latter, and to decline with increasing initial pressure, while the latter increases as the pressure gradient increases until it reaches an asymptotic value. Our previous analytic model, developed for single-file diffusion in narrow pores, is extended to wider pores for the case of single species transport. The model, which predicts the observed numerical results invokes four regimes of transport. The dominant transport is by ballistic motion near the wall in not too wide nanotubes when a pressure gradient or concentration is imposed; this mode is absent in the case of self-diffusion due to periodic boundary conditions. We also present results from systematic comparisons of flexible versus rigid tubes and explicit atom versus effective atomic potentials.