Metal–hydrogen systems are of great basic and technological interest in connection to the role of hydrogen as a clean energy carrier. Frequently, metal systems are involved in hydrogen purification, storage, and engines making use of this fuel. The presence of hydrogen in a metallic matrix gives rise to modifications of electrical, optical and mechanical properties. Hydrogen accumulation in metals may cause damage to the material by also producing fracture, thus limiting operating lifetime. Reducing the hydrogen permeation is an important task also for the fusion reactors: it is well known, indeed, that tritium is radioactive so that it is very important to be able to confine tritium during the nuclear fusion process. The theoretical study of permeation is thus of fundamental importance to obtain efficient barriers to permeation. Hydrogen trapping sites have a great influence on the hydrogen permeation through a slab sample. The diffusion of the hydrogen in a crystal is generally described by a parabolic partial differential equation with appropriate boundary conditions. The numerical simulation code PHM (Permeation of Hydrogen through Metals), realized for the study of the permeation of hydrogen in presence of trapping sites, is here described and utilized for the analysis of the influence of reversible and irreversible traps on the diffusion of hydrogen in a metal.