Abstract
The density-functional formalism has been used to treat self-consistently the nonlinear screening of a proton in an electron gas. The results have been used to calculate activation energies for diffusion of hydrogen in Al and Mg. The theory is in good agreement with experimental results which are only available for Al. Hydrogen-vacancy trapping has also been investigated and was found to be a distinct possibility in the case of Al.