  Hydrogen-enhanced decohesion (HEDE) is one of the many mechanisms of hydrogen
embrittlement, a phenomenon that severely impacts structural materials such as
iron and iron alloys. Grain boundaries (GBs) play a critical role in this
mechanism, where they can provide trapping sites or act as hydrogen diffusion
pathways. The interaction of H with GBs and other crystallographic defects, and
thus the solubility and distribution of H in the microstructure, depends on the
concentration, chemical potential, and local stress. Therefore, for a
quantitative assessment of HEDE, a generalized solution energy in conjunction
with the cohesive strength as a function of hydrogen coverage is needed. In
this paper, we carry out density functional theory calculations to investigate
the influence of H on the decohesion of the $\Sigma$5(310)[001] and
$\Sigma$3(112)[1$\bar{1}$0] symmetrical tilt GBs in bcc Fe, as examples for
open and close-packed GB structures. A method to identify the segregation sites
at the GB plane is proposed. The results indicate that at higher local
concentrations, H leads to a significant reduction of the cohesive strength of
the GB planes, significantly more pronounced at the $\Sigma$5 than at the
$\Sigma$3 GB. Interestingly, at finite stress, the $\Sigma$3 GB becomes more
favorable for H solution, as opposed to the case of zero stress, where the
$\Sigma$5 GB is more attractive. This suggests that, under certain conditions,
stresses in the microstructure can lead to a redistribution of H to the
stronger grain boundary, which opens a path to designing H-resistant
microstructures. To round up our study, we investigate the effects of typical
alloying elements in ferritic steel, C, V, Cr, and Mn, on the solubility of H
and the strength of the GBs.
