Effect of trapping on hydrogen permeation