Simulation of gas adsorption on a surface and in slit pores with grand canonical and canonical kinetic Monte Carlo methods.