Simulation of diffusion of small-molecule penetrants in polymers